Merge "Always update drawable container source res" into nyc-dev
diff --git a/api/current.txt b/api/current.txt
index 1eb35b6..44df333 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -338,6 +338,7 @@
field public static final int calendarViewStyle = 16843613; // 0x101035d
field public static final int canControlMagnification = 16844040; // 0x1010508
field public static final int canPerformGestures = 16844046; // 0x101050e
+ field public static final int canRecord = 16844061; // 0x101051d
field public static final int canRequestEnhancedWebAccessibility = 16843736; // 0x10103d8
field public static final int canRequestFilterKeyEvents = 16843737; // 0x10103d9
field public static final int canRequestTouchExplorationMode = 16843735; // 0x10103d7
@@ -1359,6 +1360,7 @@
field public static final int trimPathEnd = 16843785; // 0x1010409
field public static final int trimPathOffset = 16843786; // 0x101040a
field public static final int trimPathStart = 16843784; // 0x1010408
+ field public static final int tunerCount = 16844062; // 0x101051e
field public static final int type = 16843169; // 0x10101a1
field public static final int typeface = 16842902; // 0x1010096
field public static final int uiOptions = 16843672; // 0x1010398
@@ -4277,7 +4279,6 @@
public class DownloadManager {
method public long addCompletedDownload(java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, long, boolean);
- method public long addCompletedDownload(java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, long, boolean, android.net.Uri, android.net.Uri);
method public long enqueue(android.app.DownloadManager.Request);
method public static java.lang.Long getMaxBytesOverMobile(android.content.Context);
method public java.lang.String getMimeTypeForDownloadedFile(long);
@@ -5885,6 +5886,7 @@
method public boolean hasGrantedPolicy(android.content.ComponentName, int);
method public boolean installCaCert(android.content.ComponentName, byte[]);
method public boolean installKeyPair(android.content.ComponentName, java.security.PrivateKey, java.security.cert.Certificate, java.lang.String);
+ method public boolean installKeyPair(android.content.ComponentName, java.security.PrivateKey, java.security.cert.Certificate, java.lang.String, boolean);
method public boolean isActivePasswordSufficient();
method public boolean isAdminActive(android.content.ComponentName);
method public boolean isApplicationHidden(android.content.ComponentName, java.lang.String);
@@ -8469,6 +8471,7 @@
field public static final java.lang.String ACTION_AIRPLANE_MODE_CHANGED = "android.intent.action.AIRPLANE_MODE";
field public static final java.lang.String ACTION_ALL_APPS = "android.intent.action.ALL_APPS";
field public static final java.lang.String ACTION_ANSWER = "android.intent.action.ANSWER";
+ field public static final java.lang.String ACTION_APPLICATION_PREFERENCES = "android.intent.action.APPLICATION_PREFERENCES";
field public static final java.lang.String ACTION_APPLICATION_RESTRICTIONS_CHANGED = "android.intent.action.APPLICATION_RESTRICTIONS_CHANGED";
field public static final java.lang.String ACTION_APP_ERROR = "android.intent.action.APP_ERROR";
field public static final java.lang.String ACTION_ASSIST = "android.intent.action.ASSIST";
@@ -20204,6 +20207,8 @@
public class ExifInterface {
ctor public ExifInterface(java.lang.String) throws java.io.IOException;
+ ctor public ExifInterface(java.io.FileDescriptor) throws java.io.IOException;
+ ctor public ExifInterface(java.io.InputStream) throws java.io.IOException;
method public double getAltitude(double);
method public java.lang.String getAttribute(java.lang.String);
method public double getAttributeDouble(java.lang.String, double);
@@ -20225,6 +20230,10 @@
field public static final java.lang.String TAG_APERTURE = "FNumber";
field public static final java.lang.String TAG_DATETIME = "DateTime";
field public static final java.lang.String TAG_DATETIME_DIGITIZED = "DateTimeDigitized";
+ field public static final java.lang.String TAG_DIGITAL_ZOOM_RATIO = "DigitalZoomRatio";
+ field public static final java.lang.String TAG_EXPOSURE_BIAS_VALUE = "ExposureBiasValue";
+ field public static final java.lang.String TAG_EXPOSURE_MODE = "ExposureMode";
+ field public static final java.lang.String TAG_EXPOSURE_PROGRAM = "ExposureProgram";
field public static final java.lang.String TAG_EXPOSURE_TIME = "ExposureTime";
field public static final java.lang.String TAG_FLASH = "Flash";
field public static final java.lang.String TAG_FOCAL_LENGTH = "FocalLength";
@@ -20240,9 +20249,12 @@
field public static final java.lang.String TAG_IMAGE_LENGTH = "ImageLength";
field public static final java.lang.String TAG_IMAGE_WIDTH = "ImageWidth";
field public static final java.lang.String TAG_ISO = "ISOSpeedRatings";
+ field public static final java.lang.String TAG_LIGHT_SOURCE = "LightSource";
field public static final java.lang.String TAG_MAKE = "Make";
+ field public static final java.lang.String TAG_METERING_MODE = "MeteringMode";
field public static final java.lang.String TAG_MODEL = "Model";
field public static final java.lang.String TAG_ORIENTATION = "Orientation";
+ field public static final java.lang.String TAG_SUBJECT_DISTANCE = "SubjectDistance";
field public static final java.lang.String TAG_SUBSEC_TIME = "SubSecTime";
field public static final java.lang.String TAG_SUBSEC_TIME_DIG = "SubSecTimeDigitized";
field public static final java.lang.String TAG_SUBSEC_TIME_ORIG = "SubSecTimeOriginal";
@@ -22985,6 +22997,7 @@
field public static final java.lang.String ACTION_BLOCKED_RATINGS_CHANGED = "android.media.tv.action.BLOCKED_RATINGS_CHANGED";
field public static final java.lang.String ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED = "android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED";
field public static final java.lang.String ACTION_QUERY_CONTENT_RATING_SYSTEMS = "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS";
+ field public static final java.lang.String ACTION_SETUP_INPUTS = "android.media.tv.action.SETUP_INPUTS";
field public static final int INPUT_STATE_CONNECTED = 0; // 0x0
field public static final int INPUT_STATE_CONNECTED_STANDBY = 1; // 0x1
field public static final int INPUT_STATE_DISCONNECTED = 2; // 0x2
@@ -26876,6 +26889,7 @@
method public static void glProgramBinary(int, int, java.nio.Buffer, int);
method public static void glProgramParameteri(int, int, int);
method public static void glReadBuffer(int);
+ method public static void glReadPixels(int, int, int, int, int, int, int);
method public static void glRenderbufferStorageMultisample(int, int, int, int, int);
method public static void glResumeTransformFeedback();
method public static void glSamplerParameterf(int, int, float);
@@ -29543,6 +29557,7 @@
method protected int getPersistedInt(int);
method protected long getPersistedLong(long);
method protected java.lang.String getPersistedString(java.lang.String);
+ method public java.util.Set<java.lang.String> getPersistedStringSet(java.util.Set<java.lang.String>);
method public android.preference.PreferenceManager getPreferenceManager();
method public android.content.SharedPreferences getSharedPreferences();
method public boolean getShouldDisableView();
@@ -29577,6 +29592,7 @@
method protected boolean persistInt(int);
method protected boolean persistLong(long);
method protected boolean persistString(java.lang.String);
+ method public boolean persistStringSet(java.util.Set<java.lang.String>);
method public void restoreHierarchyState(android.os.Bundle);
method public void saveHierarchyState(android.os.Bundle);
method public void setDefaultValue(java.lang.Object);
@@ -36126,6 +36142,7 @@
method public final void conferenceRemoteConnections(android.telecom.RemoteConnection, android.telecom.RemoteConnection);
method public final android.telecom.RemoteConnection createRemoteIncomingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
method public final android.telecom.RemoteConnection createRemoteOutgoingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
+ method public final java.util.Collection<android.telecom.Conference> getAllConferences();
method public final java.util.Collection<android.telecom.Connection> getAllConnections();
method public final android.os.IBinder onBind(android.content.Intent);
method public void onConference(android.telecom.Connection, android.telecom.Connection);
@@ -36494,9 +36511,11 @@
package android.telephony {
public class CarrierConfigManager {
+ method public android.os.PersistableBundle getConfig(int);
method public android.os.PersistableBundle getConfig();
- method public android.os.PersistableBundle getConfigForSubId(int);
- method public void notifyConfigChangedForSubId(int);
+ method public deprecated android.os.PersistableBundle getConfigForSubId(int);
+ method public void notifyConfigChanged(int);
+ method public deprecated void notifyConfigChangedForSubId(int);
field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
field public static final java.lang.String BOOL_ALLOW_EMERGENCY_VIDEO_CALLS = "bool_allow_emergency_video_calls";
field public static final java.lang.String BOOL_ALLOW_VIDEO_PAUSE = "bool_allow_video_pause";
@@ -37134,12 +37153,18 @@
method public int getVoiceNetworkType(int);
method public android.net.Uri getVoicemailRingtoneUri(android.telecom.PhoneAccountHandle);
method public boolean hasCarrierPrivileges();
+ method public boolean hasCarrierPrivileges(int);
method public boolean hasIccCard();
method public boolean iccCloseLogicalChannel(int);
+ method public boolean iccCloseLogicalChannel(int, int);
method public byte[] iccExchangeSimIO(int, int, int, int, int, java.lang.String);
+ method public byte[] iccExchangeSimIO(int, int, int, int, int, int, java.lang.String);
method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(java.lang.String);
+ method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(int, java.lang.String);
method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, java.lang.String);
+ method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, int, java.lang.String);
method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String);
+ method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, int, java.lang.String);
method public boolean isHearingAidCompatibilitySupported();
method public boolean isNetworkRoaming();
method public boolean isNetworkRoaming(int);
@@ -37150,10 +37175,13 @@
method public boolean isWorldPhone();
method public void listen(android.telephony.PhoneStateListener, int);
method public java.lang.String sendEnvelopeWithStatus(java.lang.String);
+ method public java.lang.String sendEnvelopeWithStatus(int, java.lang.String);
method public boolean setLine1NumberForDisplay(java.lang.String, java.lang.String);
method public boolean setLine1NumberForDisplay(int, java.lang.String, java.lang.String);
method public boolean setOperatorBrandOverride(java.lang.String);
+ method public boolean setOperatorBrandOverride(int, java.lang.String);
method public boolean setPreferredNetworkTypeToGlobal();
+ method public boolean setPreferredNetworkTypeToGlobal(int);
method public boolean setVoiceMailNumber(java.lang.String, java.lang.String);
method public boolean setVoiceMailNumber(int, java.lang.String, java.lang.String);
field public static final java.lang.String ACTION_CONFIGURE_VOICEMAIL = "android.telephony.action.CONFIGURE_VOICEMAIL";
diff --git a/api/system-current.txt b/api/system-current.txt
index cfd3dd8..79d0cd7 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -433,6 +433,7 @@
field public static final int calendarViewStyle = 16843613; // 0x101035d
field public static final int canControlMagnification = 16844040; // 0x1010508
field public static final int canPerformGestures = 16844046; // 0x101050e
+ field public static final int canRecord = 16844061; // 0x101051d
field public static final int canRequestEnhancedWebAccessibility = 16843736; // 0x10103d8
field public static final int canRequestFilterKeyEvents = 16843737; // 0x10103d9
field public static final int canRequestTouchExplorationMode = 16843735; // 0x10103d7
@@ -1458,6 +1459,7 @@
field public static final int trimPathEnd = 16843785; // 0x1010409
field public static final int trimPathOffset = 16843786; // 0x101040a
field public static final int trimPathStart = 16843784; // 0x1010408
+ field public static final int tunerCount = 16844062; // 0x101051e
field public static final int type = 16843169; // 0x10101a1
field public static final int typeface = 16842902; // 0x1010096
field public static final int uiOptions = 16843672; // 0x1010398
@@ -4409,7 +4411,6 @@
public class DownloadManager {
method public long addCompletedDownload(java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, long, boolean);
- method public long addCompletedDownload(java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, long, boolean, android.net.Uri, android.net.Uri);
method public long enqueue(android.app.DownloadManager.Request);
method public static java.lang.Long getMaxBytesOverMobile(android.content.Context);
method public java.lang.String getMimeTypeForDownloadedFile(long);
@@ -6031,6 +6032,7 @@
method public boolean hasGrantedPolicy(android.content.ComponentName, int);
method public boolean installCaCert(android.content.ComponentName, byte[]);
method public boolean installKeyPair(android.content.ComponentName, java.security.PrivateKey, java.security.cert.Certificate, java.lang.String);
+ method public boolean installKeyPair(android.content.ComponentName, java.security.PrivateKey, java.security.cert.Certificate, java.lang.String, boolean);
method public boolean isActivePasswordSufficient();
method public boolean isAdminActive(android.content.ComponentName);
method public boolean isApplicationHidden(android.content.ComponentName, java.lang.String);
@@ -8781,6 +8783,7 @@
field public static final java.lang.String ACTION_AIRPLANE_MODE_CHANGED = "android.intent.action.AIRPLANE_MODE";
field public static final java.lang.String ACTION_ALL_APPS = "android.intent.action.ALL_APPS";
field public static final java.lang.String ACTION_ANSWER = "android.intent.action.ANSWER";
+ field public static final java.lang.String ACTION_APPLICATION_PREFERENCES = "android.intent.action.APPLICATION_PREFERENCES";
field public static final java.lang.String ACTION_APPLICATION_RESTRICTIONS_CHANGED = "android.intent.action.APPLICATION_RESTRICTIONS_CHANGED";
field public static final java.lang.String ACTION_APP_ERROR = "android.intent.action.APP_ERROR";
field public static final java.lang.String ACTION_ASSIST = "android.intent.action.ASSIST";
@@ -21712,6 +21715,8 @@
public class ExifInterface {
ctor public ExifInterface(java.lang.String) throws java.io.IOException;
+ ctor public ExifInterface(java.io.FileDescriptor) throws java.io.IOException;
+ ctor public ExifInterface(java.io.InputStream) throws java.io.IOException;
method public double getAltitude(double);
method public java.lang.String getAttribute(java.lang.String);
method public double getAttributeDouble(java.lang.String, double);
@@ -21733,6 +21738,10 @@
field public static final java.lang.String TAG_APERTURE = "FNumber";
field public static final java.lang.String TAG_DATETIME = "DateTime";
field public static final java.lang.String TAG_DATETIME_DIGITIZED = "DateTimeDigitized";
+ field public static final java.lang.String TAG_DIGITAL_ZOOM_RATIO = "DigitalZoomRatio";
+ field public static final java.lang.String TAG_EXPOSURE_BIAS_VALUE = "ExposureBiasValue";
+ field public static final java.lang.String TAG_EXPOSURE_MODE = "ExposureMode";
+ field public static final java.lang.String TAG_EXPOSURE_PROGRAM = "ExposureProgram";
field public static final java.lang.String TAG_EXPOSURE_TIME = "ExposureTime";
field public static final java.lang.String TAG_FLASH = "Flash";
field public static final java.lang.String TAG_FOCAL_LENGTH = "FocalLength";
@@ -21748,9 +21757,12 @@
field public static final java.lang.String TAG_IMAGE_LENGTH = "ImageLength";
field public static final java.lang.String TAG_IMAGE_WIDTH = "ImageWidth";
field public static final java.lang.String TAG_ISO = "ISOSpeedRatings";
+ field public static final java.lang.String TAG_LIGHT_SOURCE = "LightSource";
field public static final java.lang.String TAG_MAKE = "Make";
+ field public static final java.lang.String TAG_METERING_MODE = "MeteringMode";
field public static final java.lang.String TAG_MODEL = "Model";
field public static final java.lang.String TAG_ORIENTATION = "Orientation";
+ field public static final java.lang.String TAG_SUBJECT_DISTANCE = "SubjectDistance";
field public static final java.lang.String TAG_SUBSEC_TIME = "SubSecTime";
field public static final java.lang.String TAG_SUBSEC_TIME_DIG = "SubSecTimeDigitized";
field public static final java.lang.String TAG_SUBSEC_TIME_ORIG = "SubSecTimeOriginal";
@@ -24696,6 +24708,7 @@
field public static final java.lang.String ACTION_BLOCKED_RATINGS_CHANGED = "android.media.tv.action.BLOCKED_RATINGS_CHANGED";
field public static final java.lang.String ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED = "android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED";
field public static final java.lang.String ACTION_QUERY_CONTENT_RATING_SYSTEMS = "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS";
+ field public static final java.lang.String ACTION_SETUP_INPUTS = "android.media.tv.action.SETUP_INPUTS";
field public static final int INPUT_STATE_CONNECTED = 0; // 0x0
field public static final int INPUT_STATE_CONNECTED_STANDBY = 1; // 0x1
field public static final int INPUT_STATE_DISCONNECTED = 2; // 0x2
@@ -29176,6 +29189,7 @@
method public static void glProgramBinary(int, int, java.nio.Buffer, int);
method public static void glProgramParameteri(int, int, int);
method public static void glReadBuffer(int);
+ method public static void glReadPixels(int, int, int, int, int, int, int);
method public static void glRenderbufferStorageMultisample(int, int, int, int, int);
method public static void glResumeTransformFeedback();
method public static void glSamplerParameterf(int, int, float);
@@ -31912,6 +31926,7 @@
method protected int getPersistedInt(int);
method protected long getPersistedLong(long);
method protected java.lang.String getPersistedString(java.lang.String);
+ method public java.util.Set<java.lang.String> getPersistedStringSet(java.util.Set<java.lang.String>);
method public android.preference.PreferenceManager getPreferenceManager();
method public android.content.SharedPreferences getSharedPreferences();
method public boolean getShouldDisableView();
@@ -31946,6 +31961,7 @@
method protected boolean persistInt(int);
method protected boolean persistLong(long);
method protected boolean persistString(java.lang.String);
+ method public boolean persistStringSet(java.util.Set<java.lang.String>);
method public void restoreHierarchyState(android.os.Bundle);
method public void saveHierarchyState(android.os.Bundle);
method public void setDefaultValue(java.lang.Object);
@@ -37146,6 +37162,7 @@
public abstract interface IPersistentDataBlockService implements android.os.IInterface {
method public abstract int getDataBlockSize() throws android.os.RemoteException;
+ method public abstract int getFlashLockState() throws android.os.RemoteException;
method public abstract long getMaximumDataBlockSize() throws android.os.RemoteException;
method public abstract boolean getOemUnlockEnabled() throws android.os.RemoteException;
method public abstract byte[] read() throws android.os.RemoteException;
@@ -37157,12 +37174,19 @@
public class PersistentDataBlockManager {
ctor public PersistentDataBlockManager(android.service.persistentdata.IPersistentDataBlockService);
method public int getDataBlockSize();
+ method public int getFlashLockState();
method public long getMaximumDataBlockSize();
method public boolean getOemUnlockEnabled();
method public byte[] read();
method public void setOemUnlockEnabled(boolean);
method public void wipe();
method public int write(byte[]);
+ field public static final int FLASH_LOCK_LOCKED = 1; // 0x1
+ field public static final int FLASH_LOCK_UNKNOWN = -1; // 0xffffffff
+ field public static final int FLASH_LOCK_UNLOCKED = 0; // 0x0
+ }
+
+ public static abstract class PersistentDataBlockManager.FlashLockState implements java.lang.annotation.Annotation {
}
}
@@ -38749,6 +38773,7 @@
method public final void conferenceRemoteConnections(android.telecom.RemoteConnection, android.telecom.RemoteConnection);
method public final android.telecom.RemoteConnection createRemoteIncomingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
method public final android.telecom.RemoteConnection createRemoteOutgoingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
+ method public final java.util.Collection<android.telecom.Conference> getAllConferences();
method public final java.util.Collection<android.telecom.Connection> getAllConnections();
method public final android.os.IBinder onBind(android.content.Intent);
method public void onConference(android.telecom.Connection, android.telecom.Connection);
@@ -39201,10 +39226,12 @@
package android.telephony {
public class CarrierConfigManager {
+ method public android.os.PersistableBundle getConfig(int);
method public android.os.PersistableBundle getConfig();
- method public android.os.PersistableBundle getConfigForSubId(int);
+ method public deprecated android.os.PersistableBundle getConfigForSubId(int);
method public static android.os.PersistableBundle getDefaultConfig();
- method public void notifyConfigChangedForSubId(int);
+ method public void notifyConfigChanged(int);
+ method public deprecated void notifyConfigChangedForSubId(int);
method public void updateConfigForPhoneId(int, java.lang.String);
field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
field public static final java.lang.String BOOL_ALLOW_EMERGENCY_VIDEO_CALLS = "bool_allow_emergency_video_calls";
@@ -39864,12 +39891,18 @@
method public boolean handlePinMmi(java.lang.String);
method public boolean handlePinMmiForSubscriber(int, java.lang.String);
method public boolean hasCarrierPrivileges();
+ method public boolean hasCarrierPrivileges(int);
method public boolean hasIccCard();
method public boolean iccCloseLogicalChannel(int);
+ method public boolean iccCloseLogicalChannel(int, int);
method public byte[] iccExchangeSimIO(int, int, int, int, int, java.lang.String);
+ method public byte[] iccExchangeSimIO(int, int, int, int, int, int, java.lang.String);
method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(java.lang.String);
+ method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(int, java.lang.String);
method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, java.lang.String);
+ method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, int, java.lang.String);
method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String);
+ method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, int, java.lang.String);
method public boolean isDataConnectivityPossible();
method public boolean isHearingAidCompatibilitySupported();
method public boolean isIdle();
@@ -39887,12 +39920,15 @@
method public void listen(android.telephony.PhoneStateListener, int);
method public boolean needsOtaServiceProvisioning();
method public java.lang.String sendEnvelopeWithStatus(java.lang.String);
+ method public java.lang.String sendEnvelopeWithStatus(int, java.lang.String);
method public void setDataEnabled(boolean);
method public void setDataEnabled(int, boolean);
method public boolean setLine1NumberForDisplay(java.lang.String, java.lang.String);
method public boolean setLine1NumberForDisplay(int, java.lang.String, java.lang.String);
method public boolean setOperatorBrandOverride(java.lang.String);
+ method public boolean setOperatorBrandOverride(int, java.lang.String);
method public boolean setPreferredNetworkTypeToGlobal();
+ method public boolean setPreferredNetworkTypeToGlobal(int);
method public boolean setRadio(boolean);
method public boolean setRadioPower(boolean);
method public boolean setVoiceMailNumber(java.lang.String, java.lang.String);
diff --git a/api/test-current.txt b/api/test-current.txt
index 64854a8..4b62e28 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -338,6 +338,7 @@
field public static final int calendarViewStyle = 16843613; // 0x101035d
field public static final int canControlMagnification = 16844040; // 0x1010508
field public static final int canPerformGestures = 16844046; // 0x101050e
+ field public static final int canRecord = 16844061; // 0x101051d
field public static final int canRequestEnhancedWebAccessibility = 16843736; // 0x10103d8
field public static final int canRequestFilterKeyEvents = 16843737; // 0x10103d9
field public static final int canRequestTouchExplorationMode = 16843735; // 0x10103d7
@@ -1359,6 +1360,7 @@
field public static final int trimPathEnd = 16843785; // 0x1010409
field public static final int trimPathOffset = 16843786; // 0x101040a
field public static final int trimPathStart = 16843784; // 0x1010408
+ field public static final int tunerCount = 16844062; // 0x101051e
field public static final int type = 16843169; // 0x10101a1
field public static final int typeface = 16842902; // 0x1010096
field public static final int uiOptions = 16843672; // 0x1010398
@@ -4277,7 +4279,6 @@
public class DownloadManager {
method public long addCompletedDownload(java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, long, boolean);
- method public long addCompletedDownload(java.lang.String, java.lang.String, boolean, java.lang.String, java.lang.String, long, boolean, android.net.Uri, android.net.Uri);
method public long enqueue(android.app.DownloadManager.Request);
method public static java.lang.Long getMaxBytesOverMobile(android.content.Context);
method public java.lang.String getMimeTypeForDownloadedFile(long);
@@ -5887,6 +5888,7 @@
method public boolean hasGrantedPolicy(android.content.ComponentName, int);
method public boolean installCaCert(android.content.ComponentName, byte[]);
method public boolean installKeyPair(android.content.ComponentName, java.security.PrivateKey, java.security.cert.Certificate, java.lang.String);
+ method public boolean installKeyPair(android.content.ComponentName, java.security.PrivateKey, java.security.cert.Certificate, java.lang.String, boolean);
method public boolean isActivePasswordSufficient();
method public boolean isAdminActive(android.content.ComponentName);
method public boolean isApplicationHidden(android.content.ComponentName, java.lang.String);
@@ -8474,6 +8476,7 @@
field public static final java.lang.String ACTION_AIRPLANE_MODE_CHANGED = "android.intent.action.AIRPLANE_MODE";
field public static final java.lang.String ACTION_ALL_APPS = "android.intent.action.ALL_APPS";
field public static final java.lang.String ACTION_ANSWER = "android.intent.action.ANSWER";
+ field public static final java.lang.String ACTION_APPLICATION_PREFERENCES = "android.intent.action.APPLICATION_PREFERENCES";
field public static final java.lang.String ACTION_APPLICATION_RESTRICTIONS_CHANGED = "android.intent.action.APPLICATION_RESTRICTIONS_CHANGED";
field public static final java.lang.String ACTION_APP_ERROR = "android.intent.action.APP_ERROR";
field public static final java.lang.String ACTION_ASSIST = "android.intent.action.ASSIST";
@@ -20213,6 +20216,8 @@
public class ExifInterface {
ctor public ExifInterface(java.lang.String) throws java.io.IOException;
+ ctor public ExifInterface(java.io.FileDescriptor) throws java.io.IOException;
+ ctor public ExifInterface(java.io.InputStream) throws java.io.IOException;
method public double getAltitude(double);
method public java.lang.String getAttribute(java.lang.String);
method public double getAttributeDouble(java.lang.String, double);
@@ -20234,6 +20239,10 @@
field public static final java.lang.String TAG_APERTURE = "FNumber";
field public static final java.lang.String TAG_DATETIME = "DateTime";
field public static final java.lang.String TAG_DATETIME_DIGITIZED = "DateTimeDigitized";
+ field public static final java.lang.String TAG_DIGITAL_ZOOM_RATIO = "DigitalZoomRatio";
+ field public static final java.lang.String TAG_EXPOSURE_BIAS_VALUE = "ExposureBiasValue";
+ field public static final java.lang.String TAG_EXPOSURE_MODE = "ExposureMode";
+ field public static final java.lang.String TAG_EXPOSURE_PROGRAM = "ExposureProgram";
field public static final java.lang.String TAG_EXPOSURE_TIME = "ExposureTime";
field public static final java.lang.String TAG_FLASH = "Flash";
field public static final java.lang.String TAG_FOCAL_LENGTH = "FocalLength";
@@ -20249,9 +20258,12 @@
field public static final java.lang.String TAG_IMAGE_LENGTH = "ImageLength";
field public static final java.lang.String TAG_IMAGE_WIDTH = "ImageWidth";
field public static final java.lang.String TAG_ISO = "ISOSpeedRatings";
+ field public static final java.lang.String TAG_LIGHT_SOURCE = "LightSource";
field public static final java.lang.String TAG_MAKE = "Make";
+ field public static final java.lang.String TAG_METERING_MODE = "MeteringMode";
field public static final java.lang.String TAG_MODEL = "Model";
field public static final java.lang.String TAG_ORIENTATION = "Orientation";
+ field public static final java.lang.String TAG_SUBJECT_DISTANCE = "SubjectDistance";
field public static final java.lang.String TAG_SUBSEC_TIME = "SubSecTime";
field public static final java.lang.String TAG_SUBSEC_TIME_DIG = "SubSecTimeDigitized";
field public static final java.lang.String TAG_SUBSEC_TIME_ORIG = "SubSecTimeOriginal";
@@ -22994,6 +23006,7 @@
field public static final java.lang.String ACTION_BLOCKED_RATINGS_CHANGED = "android.media.tv.action.BLOCKED_RATINGS_CHANGED";
field public static final java.lang.String ACTION_PARENTAL_CONTROLS_ENABLED_CHANGED = "android.media.tv.action.PARENTAL_CONTROLS_ENABLED_CHANGED";
field public static final java.lang.String ACTION_QUERY_CONTENT_RATING_SYSTEMS = "android.media.tv.action.QUERY_CONTENT_RATING_SYSTEMS";
+ field public static final java.lang.String ACTION_SETUP_INPUTS = "android.media.tv.action.SETUP_INPUTS";
field public static final int INPUT_STATE_CONNECTED = 0; // 0x0
field public static final int INPUT_STATE_CONNECTED_STANDBY = 1; // 0x1
field public static final int INPUT_STATE_DISCONNECTED = 2; // 0x2
@@ -26885,6 +26898,7 @@
method public static void glProgramBinary(int, int, java.nio.Buffer, int);
method public static void glProgramParameteri(int, int, int);
method public static void glReadBuffer(int);
+ method public static void glReadPixels(int, int, int, int, int, int, int);
method public static void glRenderbufferStorageMultisample(int, int, int, int, int);
method public static void glResumeTransformFeedback();
method public static void glSamplerParameterf(int, int, float);
@@ -29553,6 +29567,7 @@
method protected int getPersistedInt(int);
method protected long getPersistedLong(long);
method protected java.lang.String getPersistedString(java.lang.String);
+ method public java.util.Set<java.lang.String> getPersistedStringSet(java.util.Set<java.lang.String>);
method public android.preference.PreferenceManager getPreferenceManager();
method public android.content.SharedPreferences getSharedPreferences();
method public boolean getShouldDisableView();
@@ -29587,6 +29602,7 @@
method protected boolean persistInt(int);
method protected boolean persistLong(long);
method protected boolean persistString(java.lang.String);
+ method public boolean persistStringSet(java.util.Set<java.lang.String>);
method public void restoreHierarchyState(android.os.Bundle);
method public void saveHierarchyState(android.os.Bundle);
method public void setDefaultValue(java.lang.Object);
@@ -36141,6 +36157,7 @@
method public final void conferenceRemoteConnections(android.telecom.RemoteConnection, android.telecom.RemoteConnection);
method public final android.telecom.RemoteConnection createRemoteIncomingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
method public final android.telecom.RemoteConnection createRemoteOutgoingConnection(android.telecom.PhoneAccountHandle, android.telecom.ConnectionRequest);
+ method public final java.util.Collection<android.telecom.Conference> getAllConferences();
method public final java.util.Collection<android.telecom.Connection> getAllConnections();
method public final android.os.IBinder onBind(android.content.Intent);
method public void onConference(android.telecom.Connection, android.telecom.Connection);
@@ -36509,9 +36526,11 @@
package android.telephony {
public class CarrierConfigManager {
+ method public android.os.PersistableBundle getConfig(int);
method public android.os.PersistableBundle getConfig();
- method public android.os.PersistableBundle getConfigForSubId(int);
- method public void notifyConfigChangedForSubId(int);
+ method public deprecated android.os.PersistableBundle getConfigForSubId(int);
+ method public void notifyConfigChanged(int);
+ method public deprecated void notifyConfigChangedForSubId(int);
field public static final java.lang.String ACTION_CARRIER_CONFIG_CHANGED = "android.telephony.action.CARRIER_CONFIG_CHANGED";
field public static final java.lang.String BOOL_ALLOW_EMERGENCY_VIDEO_CALLS = "bool_allow_emergency_video_calls";
field public static final java.lang.String BOOL_ALLOW_VIDEO_PAUSE = "bool_allow_video_pause";
@@ -37149,12 +37168,18 @@
method public int getVoiceNetworkType(int);
method public android.net.Uri getVoicemailRingtoneUri(android.telecom.PhoneAccountHandle);
method public boolean hasCarrierPrivileges();
+ method public boolean hasCarrierPrivileges(int);
method public boolean hasIccCard();
method public boolean iccCloseLogicalChannel(int);
+ method public boolean iccCloseLogicalChannel(int, int);
method public byte[] iccExchangeSimIO(int, int, int, int, int, java.lang.String);
+ method public byte[] iccExchangeSimIO(int, int, int, int, int, int, java.lang.String);
method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(java.lang.String);
+ method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(int, java.lang.String);
method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, java.lang.String);
+ method public java.lang.String iccTransmitApduBasicChannel(int, int, int, int, int, int, java.lang.String);
method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, java.lang.String);
+ method public java.lang.String iccTransmitApduLogicalChannel(int, int, int, int, int, int, int, java.lang.String);
method public boolean isHearingAidCompatibilitySupported();
method public boolean isNetworkRoaming();
method public boolean isNetworkRoaming(int);
@@ -37165,10 +37190,13 @@
method public boolean isWorldPhone();
method public void listen(android.telephony.PhoneStateListener, int);
method public java.lang.String sendEnvelopeWithStatus(java.lang.String);
+ method public java.lang.String sendEnvelopeWithStatus(int, java.lang.String);
method public boolean setLine1NumberForDisplay(java.lang.String, java.lang.String);
method public boolean setLine1NumberForDisplay(int, java.lang.String, java.lang.String);
method public boolean setOperatorBrandOverride(java.lang.String);
+ method public boolean setOperatorBrandOverride(int, java.lang.String);
method public boolean setPreferredNetworkTypeToGlobal();
+ method public boolean setPreferredNetworkTypeToGlobal(int);
method public boolean setVoiceMailNumber(java.lang.String, java.lang.String);
method public boolean setVoiceMailNumber(int, java.lang.String, java.lang.String);
field public static final java.lang.String ACTION_CONFIGURE_VOICEMAIL = "android.telephony.action.CONFIGURE_VOICEMAIL";
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 332c739..4792dc9 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -815,6 +815,9 @@
private int mDefaultKeyMode = DEFAULT_KEYS_DISABLE;
private SpannableStringBuilder mDefaultKeySsb = null;
+ private ActivityManager.TaskDescription mTaskDescription =
+ new ActivityManager.TaskDescription();
+
protected static final int[] FOCUSED_STATE_SET = {com.android.internal.R.attr.state_focused};
@SuppressWarnings("unused")
@@ -1116,6 +1119,34 @@
}
/**
+ * Attempts to extract the color from a given drawable.
+ *
+ * @return the extracted color or 0 if no color could be extracted.
+ */
+ private int tryExtractColorFromDrawable(Drawable drawable) {
+ if (drawable instanceof ColorDrawable) {
+ return ((ColorDrawable) drawable).getColor();
+ } else if (drawable instanceof InsetDrawable) {
+ return tryExtractColorFromDrawable(((InsetDrawable) drawable).getDrawable());
+ } else if (drawable instanceof ShapeDrawable) {
+ Paint p = ((ShapeDrawable) drawable).getPaint();
+ if (p != null) {
+ return p.getColor();
+ }
+ } else if (drawable instanceof LayerDrawable) {
+ LayerDrawable ld = (LayerDrawable) drawable;
+ int numLayers = ld.getNumberOfLayers();
+ for (int i = 0; i < numLayers; i++) {
+ int color = tryExtractColorFromDrawable(ld.getDrawable(i));
+ if (color != 0) {
+ return color;
+ }
+ }
+ }
+ return 0;
+ }
+
+ /**
* Called when activity start-up is complete (after {@link #onStart}
* and {@link #onRestoreInstanceState} have been called). Applications will
* generally not implement this method; it is intended for system
@@ -1136,6 +1167,36 @@
mTitleReady = true;
onTitleChanged(getTitle(), getTitleColor());
}
+
+ Resources.Theme theme = getTheme();
+ if (theme != null) {
+ // Get the primary color and update the TaskDescription for this activity
+ TypedArray a = theme.obtainStyledAttributes(
+ com.android.internal.R.styleable.ActivityTaskDescription);
+ if (mTaskDescription.getPrimaryColor() == 0) {
+ int colorPrimary = a.getColor(
+ com.android.internal.R.styleable.ActivityTaskDescription_colorPrimary, 0);
+ if (colorPrimary != 0 && Color.alpha(colorPrimary) == 0xFF) {
+ mTaskDescription.setPrimaryColor(colorPrimary);
+ }
+ }
+ if (mTaskDescription.getBackgroundColor() == 0) {
+ int windowBgResourceId = a.getResourceId(
+ com.android.internal.R.styleable.ActivityTaskDescription_windowBackground,
+ 0);
+ int windowBgFallbackResourceId = a.getResourceId(
+ com.android.internal.R.styleable.ActivityTaskDescription_windowBackgroundFallback,
+ 0);
+ int colorBg = tryExtractColorFromDrawable(DecorView.getResizingBackgroundDrawable(
+ this, windowBgResourceId, windowBgFallbackResourceId));
+ if (colorBg != 0 && Color.alpha(colorBg) == 0xFF) {
+ mTaskDescription.setBackgroundColor(colorBg);
+ }
+ }
+ a.recycle();
+ setTaskDescription(mTaskDescription);
+ }
+
mCalled = true;
}
@@ -3975,57 +4036,6 @@
}
theme.applyStyle(resid, false);
}
-
- // Get the primary color and update the TaskDescription for this activity
- if (theme != null) {
- TypedArray a = theme.obtainStyledAttributes(com.android.internal.R.styleable.Theme);
- int windowBgResourceId = a.getResourceId(
- com.android.internal.R.styleable.Window_windowBackground, 0);
- int windowBgFallbackResourceId = a.getResourceId(
- com.android.internal.R.styleable.Window_windowBackgroundFallback, 0);
- int colorPrimary = a.getColor(com.android.internal.R.styleable.Theme_colorPrimary, 0);
- int colorBg = tryExtractColorFromDrawable(DecorView.getResizingBackgroundDrawable(this,
- windowBgResourceId, windowBgFallbackResourceId));
- a.recycle();
- if (colorPrimary != 0) {
- ActivityManager.TaskDescription td = new ActivityManager.TaskDescription();
- if (Color.alpha(colorPrimary) == 0xFF) {
- td.setPrimaryColor(colorPrimary);
- }
- if (Color.alpha(colorBg) == 0xFF) {
- td.setBackgroundColor(colorBg);
- }
- setTaskDescription(td);
- }
- }
- }
-
- /**
- * Attempts to extract the color from a given drawable.
- *
- * @return the extracted color or 0 if no color could be extracted.
- */
- private int tryExtractColorFromDrawable(Drawable drawable) {
- if (drawable instanceof ColorDrawable) {
- return ((ColorDrawable) drawable).getColor();
- } else if (drawable instanceof InsetDrawable) {
- return tryExtractColorFromDrawable(((InsetDrawable) drawable).getDrawable());
- } else if (drawable instanceof ShapeDrawable) {
- Paint p = ((ShapeDrawable) drawable).getPaint();
- if (p != null) {
- return p.getColor();
- }
- } else if (drawable instanceof LayerDrawable) {
- LayerDrawable ld = (LayerDrawable) drawable;
- int numLayers = ld.getNumberOfLayers();
- for (int i = 0; i < numLayers; i++) {
- int color = tryExtractColorFromDrawable(ld.getDrawable(i));
- if (color != 0) {
- return color;
- }
- }
- }
- return 0;
}
/**
@@ -5651,18 +5661,18 @@
* @param taskDescription The TaskDescription properties that describe the task with this activity
*/
public void setTaskDescription(ActivityManager.TaskDescription taskDescription) {
- ActivityManager.TaskDescription td;
- // Scale the icon down to something reasonable if it is provided
- if (taskDescription.getIconFilename() == null && taskDescription.getIcon() != null) {
- final int size = ActivityManager.getLauncherLargeIconSizeInner(this);
- final Bitmap icon = Bitmap.createScaledBitmap(taskDescription.getIcon(), size, size, true);
- td = new ActivityManager.TaskDescription(taskDescription);
- td.setIcon(icon);
- } else {
- td = taskDescription;
+ if (mTaskDescription != taskDescription) {
+ mTaskDescription.copyFrom(taskDescription);
+ // Scale the icon down to something reasonable if it is provided
+ if (taskDescription.getIconFilename() == null && taskDescription.getIcon() != null) {
+ final int size = ActivityManager.getLauncherLargeIconSizeInner(this);
+ final Bitmap icon = Bitmap.createScaledBitmap(taskDescription.getIcon(), size, size,
+ true);
+ mTaskDescription.setIcon(icon);
+ }
}
try {
- ActivityManagerNative.getDefault().setTaskDescription(mToken, td);
+ ActivityManagerNative.getDefault().setTaskDescription(mToken, mTaskDescription);
} catch (RemoteException e) {
}
}
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index 7771139..b1927d0 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -946,11 +946,19 @@
* Creates a copy of another TaskDescription.
*/
public TaskDescription(TaskDescription td) {
- mLabel = td.mLabel;
- mIcon = td.mIcon;
- mIconFilename = td.mIconFilename;
- mColorPrimary = td.mColorPrimary;
- mColorBackground = td.mColorBackground;
+ copyFrom(td);
+ }
+
+ /**
+ * Copies this the values from another TaskDescription.
+ * @hide
+ */
+ public void copyFrom(TaskDescription other) {
+ mLabel = other.mLabel;
+ mIcon = other.mIcon;
+ mIconFilename = other.mIconFilename;
+ mColorPrimary = other.mColorPrimary;
+ mColorBackground = other.mColorBackground;
}
private TaskDescription(Parcel source) {
diff --git a/core/java/android/app/BackStackRecord.java b/core/java/android/app/BackStackRecord.java
index eb4b13e..4b0dfc7 100644
--- a/core/java/android/app/BackStackRecord.java
+++ b/core/java/android/app/BackStackRecord.java
@@ -470,6 +470,10 @@
}
if (containerViewId != 0) {
+ if (containerViewId == View.NO_ID) {
+ throw new IllegalArgumentException("Can't add fragment "
+ + fragment + " with tag " + tag + " to container view with no id");
+ }
if (fragment.mFragmentId != 0 && fragment.mFragmentId != containerViewId) {
throw new IllegalStateException("Can't change container ID of fragment "
+ fragment + ": was " + fragment.mFragmentId
diff --git a/core/java/android/app/DownloadManager.java b/core/java/android/app/DownloadManager.java
index 1e5f007..ed4bb28 100644
--- a/core/java/android/app/DownloadManager.java
+++ b/core/java/android/app/DownloadManager.java
@@ -1193,52 +1193,13 @@
boolean isMediaScannerScannable, String mimeType, String path, long length,
boolean showNotification) {
return addCompletedDownload(title, description, isMediaScannerScannable, mimeType, path,
- length, showNotification, false, null, null);
- }
-
- /**
- * Adds a file to the downloads database system, so it could appear in Downloads App
- * (and thus become eligible for management by the Downloads App).
- * <p>
- * It is helpful to make the file scannable by MediaScanner by setting the param
- * isMediaScannerScannable to true. It makes the file visible in media managing
- * applications such as Gallery App, which could be a useful purpose of using this API.
- *
- * @param title the title that would appear for this file in Downloads App.
- * @param description the description that would appear for this file in Downloads App.
- * @param isMediaScannerScannable true if the file is to be scanned by MediaScanner. Files
- * scanned by MediaScanner appear in the applications used to view media (for example,
- * Gallery app).
- * @param mimeType mimetype of the file.
- * @param path absolute pathname to the file. The file should be world-readable, so that it can
- * be managed by the Downloads App and any other app that is used to read it (for example,
- * Gallery app to display the file, if the file contents represent a video/image).
- * @param length length of the downloaded file
- * @param showNotification true if a notification is to be sent, false otherwise
- * @param uri the original HTTP URI of the download
- * @param referer the HTTP Referer for the download
- * @return an ID for the download entry added to the downloads app, unique across the system
- * This ID is used to make future calls related to this download.
- */
- public long addCompletedDownload(String title, String description,
- boolean isMediaScannerScannable, String mimeType, String path, long length,
- boolean showNotification, Uri uri, Uri referer) {
- return addCompletedDownload(title, description, isMediaScannerScannable, mimeType, path,
- length, showNotification, false, uri, referer);
+ length, showNotification, false);
}
/** {@hide} */
public long addCompletedDownload(String title, String description,
boolean isMediaScannerScannable, String mimeType, String path, long length,
boolean showNotification, boolean allowWrite) {
- return addCompletedDownload(title, description, isMediaScannerScannable, mimeType, path,
- length, showNotification, allowWrite, null, null);
- }
-
- /** {@hide} */
- public long addCompletedDownload(String title, String description,
- boolean isMediaScannerScannable, String mimeType, String path, long length,
- boolean showNotification, boolean allowWrite, Uri uri, Uri referer) {
// make sure the input args are non-null/non-zero
validateArgumentIsNonEmpty("title", title);
validateArgumentIsNonEmpty("description", description);
@@ -1249,18 +1210,10 @@
}
// if there is already an entry with the given path name in downloads.db, return its id
- Request request;
- if (uri != null) {
- request = new Request(uri);
- } else {
- request = new Request(NON_DOWNLOADMANAGER_DOWNLOAD);
- }
- request.setTitle(title)
+ Request request = new Request(NON_DOWNLOADMANAGER_DOWNLOAD)
+ .setTitle(title)
.setDescription(description)
.setMimeType(mimeType);
- if (referer != null) {
- request.addRequestHeader("Referer", referer.toString());
- }
ContentValues values = request.toContentValues(null);
values.put(Downloads.Impl.COLUMN_DESTINATION,
Downloads.Impl.DESTINATION_NON_DOWNLOADMANAGER_DOWNLOAD);
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index 4c8761c..78a054b 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -24,6 +24,7 @@
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.Configuration;
+import android.content.res.Resources.NotFoundException;
import android.content.res.TypedArray;
import android.os.Bundle;
import android.os.Debug;
@@ -960,12 +961,24 @@
if (!f.mFromLayout) {
ViewGroup container = null;
if (f.mContainerId != 0) {
- container = (ViewGroup)mContainer.onFindViewById(f.mContainerId);
+ if (f.mContainerId == View.NO_ID) {
+ throwException(new IllegalArgumentException(
+ "Cannot create fragment "
+ + f
+ + " for a container view with no id"));
+ }
+ container = (ViewGroup) mContainer.onFindViewById(f.mContainerId);
if (container == null && !f.mRestored) {
+ String resName;
+ try {
+ resName = f.getResources().getResourceName(f.mContainerId);
+ } catch (NotFoundException e) {
+ resName = "unknown";
+ }
throwException(new IllegalArgumentException(
"No view found for id 0x"
+ Integer.toHexString(f.mContainerId) + " ("
- + f.getResources().getResourceName(f.mContainerId)
+ + resName
+ ") for fragment " + f));
}
}
diff --git a/core/java/android/app/JobSchedulerImpl.java b/core/java/android/app/JobSchedulerImpl.java
index dacf4ea..b3a486f 100644
--- a/core/java/android/app/JobSchedulerImpl.java
+++ b/core/java/android/app/JobSchedulerImpl.java
@@ -46,9 +46,9 @@
}
@Override
- public int scheduleAsPackage(JobInfo job, String packageName, int userId) {
+ public int scheduleAsPackage(JobInfo job, String packageName, int userId, String tag) {
try {
- return mBinder.scheduleAsPackage(job, packageName, userId);
+ return mBinder.scheduleAsPackage(job, packageName, userId, tag);
} catch (RemoteException e) {
return JobScheduler.RESULT_FAILURE;
}
diff --git a/core/java/android/app/admin/DeviceAdminInfo.java b/core/java/android/app/admin/DeviceAdminInfo.java
index 4e9adf0..1de1d2f 100644
--- a/core/java/android/app/admin/DeviceAdminInfo.java
+++ b/core/java/android/app/admin/DeviceAdminInfo.java
@@ -240,7 +240,7 @@
/**
* The BroadcastReceiver that implements this device admin component.
*/
- final ResolveInfo mReceiver;
+ final ActivityInfo mActivityInfo;
/**
* Whether this should be visible to the user.
@@ -252,29 +252,42 @@
*/
int mUsesPolicies;
+
/**
* Constructor.
*
* @param context The Context in which we are parsing the device admin.
- * @param receiver The ResolveInfo returned from the package manager about
+ * @param resolveInfo The ResolveInfo returned from the package manager about
* this device admin's component.
*/
- public DeviceAdminInfo(Context context, ResolveInfo receiver)
+ public DeviceAdminInfo(Context context, ResolveInfo resolveInfo)
throws XmlPullParserException, IOException {
- mReceiver = receiver;
- ActivityInfo ai = receiver.activityInfo;
+ this(context, resolveInfo.activityInfo);
+ }
+ /**
+ * Constructor.
+ *
+ * @param context The Context in which we are parsing the device admin.
+ * @param activityInfo The ActivityInfo returned from the package manager about
+ * this device admin's component.
+ *
+ * @hide
+ */
+ public DeviceAdminInfo(Context context, ActivityInfo activityInfo)
+ throws XmlPullParserException, IOException {
+ mActivityInfo = activityInfo;
PackageManager pm = context.getPackageManager();
XmlResourceParser parser = null;
try {
- parser = ai.loadXmlMetaData(pm, DeviceAdminReceiver.DEVICE_ADMIN_META_DATA);
+ parser = mActivityInfo.loadXmlMetaData(pm, DeviceAdminReceiver.DEVICE_ADMIN_META_DATA);
if (parser == null) {
throw new XmlPullParserException("No "
+ DeviceAdminReceiver.DEVICE_ADMIN_META_DATA + " meta-data");
}
- Resources res = pm.getResourcesForApplication(ai.applicationInfo);
+ Resources res = pm.getResourcesForApplication(mActivityInfo.applicationInfo);
AttributeSet attrs = Xml.asAttributeSet(parser);
@@ -324,14 +337,14 @@
}
} catch (NameNotFoundException e) {
throw new XmlPullParserException(
- "Unable to create context for: " + ai.packageName);
+ "Unable to create context for: " + mActivityInfo.packageName);
} finally {
if (parser != null) parser.close();
}
}
DeviceAdminInfo(Parcel source) {
- mReceiver = ResolveInfo.CREATOR.createFromParcel(source);
+ mActivityInfo = ActivityInfo.CREATOR.createFromParcel(source);
mUsesPolicies = source.readInt();
}
@@ -339,7 +352,7 @@
* Return the .apk package that implements this device admin.
*/
public String getPackageName() {
- return mReceiver.activityInfo.packageName;
+ return mActivityInfo.packageName;
}
/**
@@ -347,7 +360,7 @@
* this device admin.
*/
public String getReceiverName() {
- return mReceiver.activityInfo.name;
+ return mActivityInfo.name;
}
/**
@@ -355,7 +368,7 @@
* device admin. Do not modify the returned object.
*/
public ActivityInfo getActivityInfo() {
- return mReceiver.activityInfo;
+ return mActivityInfo;
}
/**
@@ -363,8 +376,8 @@
*/
@NonNull
public ComponentName getComponent() {
- return new ComponentName(mReceiver.activityInfo.packageName,
- mReceiver.activityInfo.name);
+ return new ComponentName(mActivityInfo.packageName,
+ mActivityInfo.name);
}
/**
@@ -374,7 +387,7 @@
* resources.
*/
public CharSequence loadLabel(PackageManager pm) {
- return mReceiver.loadLabel(pm);
+ return mActivityInfo.loadLabel(pm);
}
/**
@@ -384,15 +397,9 @@
* resources.
*/
public CharSequence loadDescription(PackageManager pm) throws NotFoundException {
- if (mReceiver.activityInfo.descriptionRes != 0) {
- String packageName = mReceiver.resolvePackageName;
- ApplicationInfo applicationInfo = null;
- if (packageName == null) {
- packageName = mReceiver.activityInfo.packageName;
- applicationInfo = mReceiver.activityInfo.applicationInfo;
- }
- return pm.getText(packageName,
- mReceiver.activityInfo.descriptionRes, applicationInfo);
+ if (mActivityInfo.descriptionRes != 0) {
+ return pm.getText(mActivityInfo.packageName,
+ mActivityInfo.descriptionRes, mActivityInfo.applicationInfo);
}
throw new NotFoundException();
}
@@ -404,7 +411,7 @@
* resources.
*/
public Drawable loadIcon(PackageManager pm) {
- return mReceiver.loadIcon(pm);
+ return mActivityInfo.loadIcon(pm);
}
/**
@@ -464,12 +471,12 @@
public void dump(Printer pw, String prefix) {
pw.println(prefix + "Receiver:");
- mReceiver.dump(pw, prefix + " ");
+ mActivityInfo.dump(pw, prefix + " ");
}
@Override
public String toString() {
- return "DeviceAdminInfo{" + mReceiver.activityInfo.name + "}";
+ return "DeviceAdminInfo{" + mActivityInfo.name + "}";
}
/**
@@ -479,7 +486,7 @@
* @param flags The flags used for parceling.
*/
public void writeToParcel(Parcel dest, int flags) {
- mReceiver.writeToParcel(dest, flags);
+ mActivityInfo.writeToParcel(dest, flags);
dest.writeInt(mUsesPolicies);
}
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index ba8f1f4..74fe13a 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -2686,8 +2686,16 @@
}
/**
- * Called by a device or profile owner to install a certificate and private key pair. The
- * keypair will be visible to all apps within the profile.
+ * Called by a device or profile owner, or delegated certificate installer, to install a
+ * certificate and corresponding private key. All apps within the profile will be able to access
+ * the certificate and use the private key, given direct user approval.
+ *
+ * <p>Access to the installed credentials will not be granted to the caller of this API without
+ * direct user approval. This is for security - should a certificate installer become
+ * compromised, certificates it had already installed will be protected.
+ *
+ * <p>If the installer must have access to the credentials, call
+ * {@link #installKeyPair(ComponentName, PrivateKey, Certificate, String, boolean)} instead.
*
* @param admin Which {@link DeviceAdminReceiver} this request is associated with, or
* {@code null} if calling from a delegated certificate installer.
@@ -2699,11 +2707,35 @@
*/
public boolean installKeyPair(@Nullable ComponentName admin, @NonNull PrivateKey privKey,
@NonNull Certificate cert, @NonNull String alias) {
+ return installKeyPair(admin, privKey, cert, alias, false);
+ }
+
+ /**
+ * Called by a device or profile owner, or delegated certificate installer, to install a
+ * certificate and corresponding private key. All apps within the profile will be able to access
+ * the certificate and use the private key, given direct user approval.
+ *
+ * <p>The caller of this API may grant itself access to the credential immediately, without user
+ * approval. It is a best practice not to request this unless strictly necessary since it opens
+ * up additional security vulnerabilities.
+ *
+ * @param admin Which {@link DeviceAdminReceiver} this request is associated with, or
+ * {@code null} if calling from a delegated certificate installer.
+ * @param privKey The private key to install.
+ * @param cert The certificate to install.
+ * @param alias The private key alias under which to install the certificate. If a certificate
+ * with that alias already exists, it will be overwritten.
+ * @param requestAccess {@code true} to request that the calling app be granted access to the
+ * credentials immediately. Otherwise, access to the credentials will be gated by user approval.
+ * @return {@code true} if the keys were installed, {@code false} otherwise.
+ */
+ public boolean installKeyPair(@Nullable ComponentName admin, @NonNull PrivateKey privKey,
+ @NonNull Certificate cert, @NonNull String alias, boolean requestAccess) {
try {
final byte[] pemCert = Credentials.convertToPem(cert);
final byte[] pkcs8Key = KeyFactory.getInstance(privKey.getAlgorithm())
.getKeySpec(privKey, PKCS8EncodedKeySpec.class).getEncoded();
- return mService.installKeyPair(admin, pkcs8Key, pemCert, alias);
+ return mService.installKeyPair(admin, pkcs8Key, pemCert, alias, requestAccess);
} catch (RemoteException e) {
Log.w(TAG, REMOTE_EXCEPTION_MESSAGE, e);
} catch (NoSuchAlgorithmException | InvalidKeySpecException e) {
@@ -2715,8 +2747,8 @@
}
/**
- * Called by a device or profile owner to remove all user credentials installed under a given
- * alias.
+ * Called by a device or profile owner, or delegated certificate installer, to remove all user
+ * credentials installed under a given alias.
*
* @param admin Which {@link DeviceAdminReceiver} this request is associated with, or
* {@code null} if calling from a delegated certificate installer.
@@ -3140,31 +3172,6 @@
}
/**
- * Returns the DeviceAdminInfo as defined by the administrator's package info & meta-data
- * @hide
- */
- public DeviceAdminInfo getAdminInfo(@NonNull ComponentName cn) {
- ActivityInfo ai;
- try {
- ai = mContext.getPackageManager().getReceiverInfo(cn,
- PackageManager.GET_META_DATA);
- } catch (PackageManager.NameNotFoundException e) {
- Log.w(TAG, "Unable to retrieve device policy " + cn, e);
- return null;
- }
-
- ResolveInfo ri = new ResolveInfo();
- ri.activityInfo = ai;
-
- try {
- return new DeviceAdminInfo(mContext, ri);
- } catch (XmlPullParserException | IOException e) {
- Log.w(TAG, "Unable to parse device policy " + cn, e);
- return null;
- }
- }
-
- /**
* @hide
*/
public void getRemoveWarning(@Nullable ComponentName admin, RemoteCallback result) {
diff --git a/core/java/android/app/admin/IDevicePolicyManager.aidl b/core/java/android/app/admin/IDevicePolicyManager.aidl
index e78c0ac..b7a16aa 100644
--- a/core/java/android/app/admin/IDevicePolicyManager.aidl
+++ b/core/java/android/app/admin/IDevicePolicyManager.aidl
@@ -145,7 +145,8 @@
void uninstallCaCerts(in ComponentName admin, in String[] aliases);
void enforceCanManageCaCerts(in ComponentName admin);
- boolean installKeyPair(in ComponentName who, in byte[] privKeyBuffer, in byte[] certBuffer, String alias);
+ boolean installKeyPair(in ComponentName who, in byte[] privKeyBuffer, in byte[] certBuffer,
+ String alias, boolean requestAccess);
boolean removeKeyPair(in ComponentName who, String alias);
void choosePrivateKeyAlias(int uid, in Uri uri, in String alias, IBinder aliasCallback);
diff --git a/core/java/android/app/backup/BackupManager.java b/core/java/android/app/backup/BackupManager.java
index 2268400..7fcca09 100644
--- a/core/java/android/app/backup/BackupManager.java
+++ b/core/java/android/app/backup/BackupManager.java
@@ -468,7 +468,7 @@
*
* @param packages List of package names to backup.
* @param observer The {@link BackupObserver} to receive callbacks during the backup
- * operation.
+ * operation. Could be {@code null}.
* @return {@link BackupManager#SUCCESS} on success; nonzero on error.
* @exception IllegalArgumentException on null or empty {@code packages} param.
*
@@ -479,8 +479,9 @@
checkServiceBinder();
if (sService != null) {
try {
- BackupObserverWrapper observerWrapper =
- new BackupObserverWrapper(mContext, observer);
+ BackupObserverWrapper observerWrapper = observer == null
+ ? null
+ : new BackupObserverWrapper(mContext, observer);
return sService.requestBackup(packages, observerWrapper);
} catch (RemoteException e) {
Log.e(TAG, "requestBackup() couldn't connect");
diff --git a/core/java/android/app/job/IJobScheduler.aidl b/core/java/android/app/job/IJobScheduler.aidl
index f0c3302..3379f2e 100644
--- a/core/java/android/app/job/IJobScheduler.aidl
+++ b/core/java/android/app/job/IJobScheduler.aidl
@@ -24,7 +24,7 @@
*/
interface IJobScheduler {
int schedule(in JobInfo job);
- int scheduleAsPackage(in JobInfo job, String packageName, int userId);
+ int scheduleAsPackage(in JobInfo job, String packageName, int userId, String tag);
void cancel(int jobId);
void cancelAll();
List<JobInfo> getAllPendingJobs();
diff --git a/core/java/android/app/job/JobInfo.java b/core/java/android/app/job/JobInfo.java
index 5398e7f..4cbaf6c 100644
--- a/core/java/android/app/job/JobInfo.java
+++ b/core/java/android/app/job/JobInfo.java
@@ -83,6 +83,31 @@
*/
public static final int DEFAULT_BACKOFF_POLICY = BACKOFF_POLICY_EXPONENTIAL;
+ /**
+ * Default of {@link #getPriority}.
+ * @hide
+ */
+ public static final int PRIORITY_DEFAULT = 0;
+
+ /**
+ * Value of {@link #getPriority} for expedited syncs.
+ * @hide
+ */
+ public static final int PRIORITY_SYNC_EXPEDITED = 10;
+
+ /**
+ * Value of {@link #getPriority} for first time initialization syncs.
+ * @hide
+ */
+ public static final int PRIORITY_SYNC_INITIALIZATION = 20;
+
+ /**
+ * Value of {@link #getPriority} for the current foreground app (overrides the supplied
+ * JobInfo priority if it is smaller).
+ * @hide
+ */
+ public static final int PRIORITY_FOREGROUND_APP = 30;
+
private final int jobId;
private final PersistableBundle extras;
private final ComponentName service;
@@ -406,7 +431,7 @@
private int mJobId;
private PersistableBundle mExtras = PersistableBundle.EMPTY;
private ComponentName mJobService;
- private int mPriority;
+ private int mPriority = PRIORITY_DEFAULT;
// Requirements.
private boolean mRequiresCharging;
private boolean mRequiresDeviceIdle;
diff --git a/core/java/android/app/job/JobScheduler.java b/core/java/android/app/job/JobScheduler.java
index 5e1a4256..d1e563f 100644
--- a/core/java/android/app/job/JobScheduler.java
+++ b/core/java/android/app/job/JobScheduler.java
@@ -68,10 +68,11 @@
* @param packageName The package on behalf of which the job is to be scheduled. This will be
* used to track battery usage and appIdleState.
* @param userId User on behalf of whom this job is to be scheduled.
+ * @param tag Debugging tag for dumps associated with this job (instead of the service class)
* @return {@link #RESULT_SUCCESS} or {@link #RESULT_FAILURE}
* @hide
*/
- public abstract int scheduleAsPackage(JobInfo job, String packageName, int userId);
+ public abstract int scheduleAsPackage(JobInfo job, String packageName, int userId, String tag);
/**
* Cancel a job that is pending in the JobScheduler.
diff --git a/core/java/android/app/usage/IUsageStatsManager.aidl b/core/java/android/app/usage/IUsageStatsManager.aidl
index a9328bc..342c285 100644
--- a/core/java/android/app/usage/IUsageStatsManager.aidl
+++ b/core/java/android/app/usage/IUsageStatsManager.aidl
@@ -33,4 +33,5 @@
void setAppInactive(String packageName, boolean inactive, int userId);
boolean isAppInactive(String packageName, int userId);
void whitelistAppTemporarily(String packageName, long duration, int userId);
+ void onCarrierPrivilegedAppsChanged();
}
diff --git a/core/java/android/app/usage/UsageStatsManager.java b/core/java/android/app/usage/UsageStatsManager.java
index c74b0f2..2aeecfa 100644
--- a/core/java/android/app/usage/UsageStatsManager.java
+++ b/core/java/android/app/usage/UsageStatsManager.java
@@ -267,4 +267,15 @@
} catch (RemoteException re) {
}
}
+
+ /**
+ * Inform usage stats that the carrier privileged apps access rules have changed.
+ * @hide
+ */
+ public void onCarrierPrivilegedAppsChanged() {
+ try {
+ mService.onCarrierPrivilegedAppsChanged();
+ } catch (RemoteException re) {
+ }
+ }
}
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 8f2b9c8..09fa5e11 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -16,24 +16,13 @@
package android.content;
-import android.content.pm.ApplicationInfo;
-import android.os.ResultReceiver;
-import android.os.ShellCommand;
-import android.provider.MediaStore;
-import android.util.ArraySet;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
import android.annotation.AnyRes;
import android.annotation.IntDef;
import android.annotation.SdkConstant;
-import android.annotation.SystemApi;
import android.annotation.SdkConstant.SdkConstantType;
+import android.annotation.SystemApi;
import android.content.pm.ActivityInfo;
-
-import static android.content.ContentProvider.maybeAddUserId;
-
+import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Resources;
@@ -41,21 +30,24 @@
import android.graphics.Rect;
import android.net.Uri;
import android.os.Bundle;
-import android.os.Environment;
import android.os.IBinder;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Process;
+import android.os.ResultReceiver;
+import android.os.ShellCommand;
import android.os.StrictMode;
import android.os.UserHandle;
import android.provider.DocumentsContract;
import android.provider.DocumentsProvider;
+import android.provider.MediaStore;
import android.provider.OpenableColumns;
+import android.util.ArraySet;
import android.util.AttributeSet;
import android.util.Log;
-
import com.android.internal.util.XmlUtils;
-
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlSerializer;
import java.io.IOException;
@@ -71,6 +63,8 @@
import java.util.Objects;
import java.util.Set;
+import static android.content.ContentProvider.maybeAddUserId;
+
/**
* An intent is an abstract description of an operation to be performed. It
* can be used with {@link Context#startActivity(Intent) startActivity} to
@@ -759,6 +753,14 @@
"android.intent.extra.shortcut.ICON_RESOURCE";
/**
+ * An activity that provides a user interface for adjusting application preferences.
+ * Optional but recommended settings for all applications which have settings.
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_APPLICATION_PREFERENCES
+ = "android.intent.action.APPLICATION_PREFERENCES";
+
+ /**
* Represents a shortcut/live folder icon resource.
*
* @see Intent#ACTION_CREATE_SHORTCUT
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index b7f968c..4dd8155 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -602,7 +602,8 @@
/**
* Flag parameter for {@link #installPackage} to indicate that it is okay
* to install an update to an app where the newly installed app has a lower
- * version code than the currently installed app.
+ * version code than the currently installed app. This is permitted only if
+ * the currently installed app is marked debuggable.
*
* @hide
*/
diff --git a/core/java/android/content/res/TypedArray.java b/core/java/android/content/res/TypedArray.java
index 6067577..da49b64f 100644
--- a/core/java/android/content/res/TypedArray.java
+++ b/core/java/android/content/res/TypedArray.java
@@ -426,7 +426,9 @@
throw new RuntimeException("Cannot make calls to a recycled instance!");
}
+ final int attrIndex = index;
index *= AssetManager.STYLE_NUM_ENTRIES;
+
final int[] data = mData;
final int type = data[index+AssetManager.STYLE_TYPE];
if (type == TypedValue.TYPE_NULL) {
@@ -444,13 +446,13 @@
return defValue;
} else if (type == TypedValue.TYPE_ATTRIBUTE) {
final TypedValue value = mValue;
- getValueAt(index*AssetManager.STYLE_NUM_ENTRIES, value);
+ getValueAt(index, value);
throw new UnsupportedOperationException(
- "Failed to resolve attribute at index " + index + ": " + value);
+ "Failed to resolve attribute at index " + attrIndex + ": " + value);
}
- throw new UnsupportedOperationException("Can't convert to color: type=0x"
- + Integer.toHexString(type));
+ throw new UnsupportedOperationException("Can't convert value at index " + attrIndex
+ + " to color: type=0x" + Integer.toHexString(type));
}
/**
@@ -541,7 +543,9 @@
throw new RuntimeException("Cannot make calls to a recycled instance!");
}
+ final int attrIndex = index;
index *= AssetManager.STYLE_NUM_ENTRIES;
+
final int[] data = mData;
final int type = data[index+AssetManager.STYLE_TYPE];
if (type == TypedValue.TYPE_NULL) {
@@ -551,13 +555,13 @@
return data[index+AssetManager.STYLE_DATA];
} else if (type == TypedValue.TYPE_ATTRIBUTE) {
final TypedValue value = mValue;
- getValueAt(index*AssetManager.STYLE_NUM_ENTRIES, value);
+ getValueAt(index, value);
throw new UnsupportedOperationException(
- "Failed to resolve attribute at index " + index + ": " + value);
+ "Failed to resolve attribute at index " + attrIndex + ": " + value);
}
- throw new UnsupportedOperationException("Can't convert to integer: type=0x"
- + Integer.toHexString(type));
+ throw new UnsupportedOperationException("Can't convert value at index " + attrIndex
+ + " to integer: type=0x" + Integer.toHexString(type));
}
/**
@@ -587,7 +591,9 @@
throw new RuntimeException("Cannot make calls to a recycled instance!");
}
+ final int attrIndex = index;
index *= AssetManager.STYLE_NUM_ENTRIES;
+
final int[] data = mData;
final int type = data[index+AssetManager.STYLE_TYPE];
if (type == TypedValue.TYPE_NULL) {
@@ -597,13 +603,13 @@
data[index + AssetManager.STYLE_DATA], mMetrics);
} else if (type == TypedValue.TYPE_ATTRIBUTE) {
final TypedValue value = mValue;
- getValueAt(index*AssetManager.STYLE_NUM_ENTRIES, value);
+ getValueAt(index, value);
throw new UnsupportedOperationException(
- "Failed to resolve attribute at index " + index + ": " + value);
+ "Failed to resolve attribute at index " + attrIndex + ": " + value);
}
- throw new UnsupportedOperationException("Can't convert to dimension: type=0x"
- + Integer.toHexString(type));
+ throw new UnsupportedOperationException("Can't convert value at index " + attrIndex
+ + " to dimension: type=0x" + Integer.toHexString(type));
}
/**
@@ -634,7 +640,9 @@
throw new RuntimeException("Cannot make calls to a recycled instance!");
}
+ final int attrIndex = index;
index *= AssetManager.STYLE_NUM_ENTRIES;
+
final int[] data = mData;
final int type = data[index+AssetManager.STYLE_TYPE];
if (type == TypedValue.TYPE_NULL) {
@@ -644,13 +652,13 @@
data[index + AssetManager.STYLE_DATA], mMetrics);
} else if (type == TypedValue.TYPE_ATTRIBUTE) {
final TypedValue value = mValue;
- getValueAt(index*AssetManager.STYLE_NUM_ENTRIES, value);
+ getValueAt(index, value);
throw new UnsupportedOperationException(
- "Failed to resolve attribute at index " + index + ": " + value);
+ "Failed to resolve attribute at index " + attrIndex + ": " + value);
}
- throw new UnsupportedOperationException("Can't convert to dimension: type=0x"
- + Integer.toHexString(type));
+ throw new UnsupportedOperationException("Can't convert value at index " + attrIndex
+ + " to dimension: type=0x" + Integer.toHexString(type));
}
/**
@@ -682,7 +690,9 @@
throw new RuntimeException("Cannot make calls to a recycled instance!");
}
+ final int attrIndex = index;
index *= AssetManager.STYLE_NUM_ENTRIES;
+
final int[] data = mData;
final int type = data[index+AssetManager.STYLE_TYPE];
if (type == TypedValue.TYPE_NULL) {
@@ -692,13 +702,13 @@
data[index+AssetManager.STYLE_DATA], mMetrics);
} else if (type == TypedValue.TYPE_ATTRIBUTE) {
final TypedValue value = mValue;
- getValueAt(index*AssetManager.STYLE_NUM_ENTRIES, value);
+ getValueAt(index, value);
throw new UnsupportedOperationException(
- "Failed to resolve attribute at index " + index + ": " + value);
+ "Failed to resolve attribute at index " + attrIndex + ": " + value);
}
- throw new UnsupportedOperationException("Can't convert to dimension: type=0x"
- + Integer.toHexString(type));
+ throw new UnsupportedOperationException("Can't convert value at index " + attrIndex
+ + " to dimension: type=0x" + Integer.toHexString(type));
}
/**
@@ -724,7 +734,9 @@
throw new RuntimeException("Cannot make calls to a recycled instance!");
}
+ final int attrIndex = index;
index *= AssetManager.STYLE_NUM_ENTRIES;
+
final int[] data = mData;
final int type = data[index+AssetManager.STYLE_TYPE];
if (type >= TypedValue.TYPE_FIRST_INT
@@ -735,9 +747,9 @@
data[index+AssetManager.STYLE_DATA], mMetrics);
} else if (type == TypedValue.TYPE_ATTRIBUTE) {
final TypedValue value = mValue;
- getValueAt(index*AssetManager.STYLE_NUM_ENTRIES, value);
+ getValueAt(index, value);
throw new UnsupportedOperationException(
- "Failed to resolve attribute at index " + index + ": " + value);
+ "Failed to resolve attribute at index " + attrIndex + ": " + value);
}
throw new UnsupportedOperationException(getPositionDescription()
@@ -800,7 +812,9 @@
throw new RuntimeException("Cannot make calls to a recycled instance!");
}
+ final int attrIndex = index;
index *= AssetManager.STYLE_NUM_ENTRIES;
+
final int[] data = mData;
final int type = data[index+AssetManager.STYLE_TYPE];
if (type == TypedValue.TYPE_NULL) {
@@ -810,13 +824,13 @@
data[index+AssetManager.STYLE_DATA], base, pbase);
} else if (type == TypedValue.TYPE_ATTRIBUTE) {
final TypedValue value = mValue;
- getValueAt(index*AssetManager.STYLE_NUM_ENTRIES, value);
+ getValueAt(index, value);
throw new UnsupportedOperationException(
- "Failed to resolve attribute at index " + index + ": " + value);
+ "Failed to resolve attribute at index " + attrIndex + ": " + value);
}
- throw new UnsupportedOperationException("Can't convert to fraction: type=0x"
- + Integer.toHexString(type));
+ throw new UnsupportedOperationException("Can't convert value at index " + attrIndex
+ + " to fraction: type=0x" + Integer.toHexString(type));
}
/**
diff --git a/core/java/android/hardware/soundtrigger/IRecognitionStatusCallback.aidl b/core/java/android/hardware/soundtrigger/IRecognitionStatusCallback.aidl
index 597efa5..dcc3369 100644
--- a/core/java/android/hardware/soundtrigger/IRecognitionStatusCallback.aidl
+++ b/core/java/android/hardware/soundtrigger/IRecognitionStatusCallback.aidl
@@ -26,10 +26,20 @@
* Called when the keyphrase is spoken.
*
* @param recognitionEvent Object containing data relating to the
- * recognition event such as trigger audio data, if it was requested
- * and is available.
+ * keyphrase recognition event such as keyphrase
+ * extras.
*/
- void onDetected(in SoundTrigger.RecognitionEvent recognitionEvent);
+ void onKeyphraseDetected(in SoundTrigger.KeyphraseRecognitionEvent recognitionEvent);
+
+ /**
+ * Called when a generic sound trigger event is witnessed.
+ *
+ * @param recognitionEvent Object containing data relating to the
+ * recognition event such as trigger audio data (if
+ * requested).
+ */
+
+ void onGenericSoundTriggerDetected(in SoundTrigger.GenericRecognitionEvent recognitionEvent);
/**
* Called when the detection fails due to an error.
diff --git a/core/java/android/hardware/soundtrigger/SoundTrigger.aidl b/core/java/android/hardware/soundtrigger/SoundTrigger.aidl
index fec64ea..325a9ad 100644
--- a/core/java/android/hardware/soundtrigger/SoundTrigger.aidl
+++ b/core/java/android/hardware/soundtrigger/SoundTrigger.aidl
@@ -20,7 +20,7 @@
parcelable SoundTrigger.Keyphrase;
parcelable SoundTrigger.RecognitionEvent;
parcelable SoundTrigger.KeyphraseRecognitionEvent;
-parcelable SoundTrigger.GenericSoundRecognitionEvent;
+parcelable SoundTrigger.GenericRecognitionEvent;
parcelable SoundTrigger.KeyphraseRecognitionExtra;
parcelable SoundTrigger.KeyphraseSoundModel;
parcelable SoundTrigger.GenericSoundModel;
diff --git a/core/java/android/hardware/soundtrigger/SoundTrigger.java b/core/java/android/hardware/soundtrigger/SoundTrigger.java
index 882908a..cc2b764 100644
--- a/core/java/android/hardware/soundtrigger/SoundTrigger.java
+++ b/core/java/android/hardware/soundtrigger/SoundTrigger.java
@@ -595,7 +595,7 @@
}
};
- private static RecognitionEvent fromParcel(Parcel in) {
+ protected static RecognitionEvent fromParcel(Parcel in) {
int status = in.readInt();
int soundModelHandle = in.readInt();
boolean captureAvailable = in.readByte() == 1;
@@ -980,7 +980,7 @@
public static final Parcelable.Creator<KeyphraseRecognitionEvent> CREATOR
= new Parcelable.Creator<KeyphraseRecognitionEvent>() {
public KeyphraseRecognitionEvent createFromParcel(Parcel in) {
- return KeyphraseRecognitionEvent.fromParcel(in);
+ return KeyphraseRecognitionEvent.fromParcelForKeyphrase(in);
}
public KeyphraseRecognitionEvent[] newArray(int size) {
@@ -988,7 +988,7 @@
}
};
- private static KeyphraseRecognitionEvent fromParcel(Parcel in) {
+ private static KeyphraseRecognitionEvent fromParcelForKeyphrase(Parcel in) {
int status = in.readInt();
int soundModelHandle = in.readInt();
boolean captureAvailable = in.readByte() == 1;
@@ -1094,6 +1094,40 @@
captureDelayMs, capturePreambleMs, triggerInData, captureFormat,
data);
}
+
+ public static final Parcelable.Creator<GenericRecognitionEvent> CREATOR
+ = new Parcelable.Creator<GenericRecognitionEvent>() {
+ public GenericRecognitionEvent createFromParcel(Parcel in) {
+ return GenericRecognitionEvent.fromParcelForGeneric(in);
+ }
+
+ public GenericRecognitionEvent[] newArray(int size) {
+ return new GenericRecognitionEvent[size];
+ }
+ };
+
+ private static GenericRecognitionEvent fromParcelForGeneric(Parcel in) {
+ RecognitionEvent event = RecognitionEvent.fromParcel(in);
+ return new GenericRecognitionEvent(event.status, event.soundModelHandle,
+ event.captureAvailable, event.captureSession, event.captureDelayMs,
+ event.capturePreambleMs, event.triggerInData, event.captureFormat, event.data);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass()) return false;
+ RecognitionEvent other = (RecognitionEvent) obj;
+ return super.equals(obj);
+ }
+
+ @Override
+ public String toString() {
+ return "GenericRecognitionEvent ::" + super.toString();
+ }
}
/**
diff --git a/core/java/android/preference/Preference.java b/core/java/android/preference/Preference.java
index 5d64af5..d41bc07 100644
--- a/core/java/android/preference/Preference.java
+++ b/core/java/android/preference/Preference.java
@@ -1494,11 +1494,9 @@
* @return True if the Preference is persistent. (This is not whether the
* value was persisted, since we may not necessarily commit if there
* will be a batch commit later.)
- * @see #getPersistedString(Set)
- *
- * @hide Pending API approval
+ * @see #getPersistedStringSet(Set)
*/
- protected boolean persistStringSet(Set<String> values) {
+ public boolean persistStringSet(Set<String> values) {
if (shouldPersist()) {
// Shouldn't store null
if (values.equals(getPersistedStringSet(null))) {
@@ -1527,10 +1525,8 @@
* @return The value from the SharedPreferences or the default return
* value.
* @see #persistStringSet(Set)
- *
- * @hide Pending API approval
*/
- protected Set<String> getPersistedStringSet(Set<String> defaultReturnValue) {
+ public Set<String> getPersistedStringSet(Set<String> defaultReturnValue) {
if (!shouldPersist()) {
return defaultReturnValue;
}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 921e18f..eaff1ac 100755
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -7048,6 +7048,14 @@
"webview_data_reduction_proxy_key";
/**
+ * Whether or not the WebView fallback mechanism should be enabled.
+ * 0=disabled, 1=enabled.
+ * @hide
+ */
+ public static final String WEBVIEW_FALLBACK_LOGIC_ENABLED =
+ "webview_fallback_logic_enabled";
+
+ /**
* Name of the package used as WebView provider (if unset the provider is instead determined
* by the system).
* @hide
@@ -7882,6 +7890,52 @@
public static final String DOCK_AUDIO_MEDIA_ENABLED = "dock_audio_media_enabled";
/**
+ * The surround sound formats AC3, DTS or IEC61937 are
+ * available for use if they are detected.
+ * This is the default mode.
+ *
+ * Note that AUTO is equivalent to ALWAYS for Android TVs and other
+ * devices that have an S/PDIF output. This is because S/PDIF
+ * is unidirectional and the TV cannot know if a decoder is
+ * connected. So it assumes they are always available.
+ * @hide
+ */
+ public static final int ENCODED_SURROUND_OUTPUT_AUTO = 0;
+
+ /**
+ * AC3, DTS or IEC61937 are NEVER available, even if they
+ * are detected by the hardware. Those formats will not be
+ * reported.
+ *
+ * An example use case would be an AVR reports that it is capable of
+ * surround sound decoding but is broken. If NEVER is chosen
+ * then apps must use PCM output instead of encoded output.
+ * @hide
+ */
+ public static final int ENCODED_SURROUND_OUTPUT_NEVER = 1;
+
+ /**
+ * AC3, DTS or IEC61937 are ALWAYS available, even if they
+ * are not detected by the hardware. Those formats will be
+ * reported as part of the HDMI output capability. Applications
+ * are then free to use either PCM or encoded output.
+ *
+ * An example use case would be a when TV was connected over
+ * TOS-link to an AVR. But the TV could not see it because TOS-link
+ * is unidirectional.
+ * @hide
+ */
+ public static final int ENCODED_SURROUND_OUTPUT_ALWAYS = 2;
+
+ /**
+ * Set to ENCODED_SURROUND_OUTPUT_AUTO,
+ * ENCODED_SURROUND_OUTPUT_NEVER or
+ * ENCODED_SURROUND_OUTPUT_ALWAYS
+ * @hide
+ */
+ public static final String ENCODED_SURROUND_OUTPUT = "encoded_surround_output";
+
+ /**
* Persisted safe headphone volume management state by AudioService
* @hide
*/
@@ -8197,6 +8251,7 @@
EMERGENCY_TONE,
CALL_AUTO_RETRY,
DOCK_AUDIO_MEDIA_ENABLED,
+ ENCODED_SURROUND_OUTPUT,
LOW_POWER_MODE_TRIGGER_LEVEL
};
diff --git a/core/java/android/security/net/config/ManifestConfigSource.java b/core/java/android/security/net/config/ManifestConfigSource.java
index 0e137cd..be0821c 100644
--- a/core/java/android/security/net/config/ManifestConfigSource.java
+++ b/core/java/android/security/net/config/ManifestConfigSource.java
@@ -61,6 +61,7 @@
} catch (PackageManager.NameNotFoundException e) {
throw new RuntimeException("Failed to look up ApplicationInfo", e);
}
+ int targetSdkVersion = info.targetSdkVersion;
int configResourceId = 0;
if (info != null && info.metaData != null) {
configResourceId = info.metaData.getInt(META_DATA_NETWORK_SECURITY_CONFIG);
@@ -74,14 +75,15 @@
+ mContext.getResources().getResourceEntryName(configResourceId)
+ " debugBuild: " + debugBuild);
}
- source = new XmlConfigSource(mContext, configResourceId, debugBuild);
+ source = new XmlConfigSource(mContext, configResourceId, debugBuild,
+ targetSdkVersion);
} else {
if (DBG) {
Log.d(LOG_TAG, "No Network Security Config specified, using platform default");
}
boolean usesCleartextTraffic =
(info.flags & ApplicationInfo.FLAG_USES_CLEARTEXT_TRAFFIC) != 0;
- source = new DefaultConfigSource(usesCleartextTraffic);
+ source = new DefaultConfigSource(usesCleartextTraffic, targetSdkVersion);
}
mConfigSource = source;
return mConfigSource;
@@ -92,11 +94,11 @@
private final NetworkSecurityConfig mDefaultConfig;
- public DefaultConfigSource(boolean usesCleartextTraffic) {
- mDefaultConfig = NetworkSecurityConfig.getDefaultBuilder()
+ public DefaultConfigSource(boolean usesCleartextTraffic, int targetSdkVersion) {
+ mDefaultConfig = NetworkSecurityConfig.getDefaultBuilder(targetSdkVersion)
.setCleartextTrafficPermitted(usesCleartextTraffic)
.build();
- }
+ }
@Override
public NetworkSecurityConfig getDefaultConfig() {
diff --git a/core/java/android/security/net/config/NetworkSecurityConfig.java b/core/java/android/security/net/config/NetworkSecurityConfig.java
index ebe14691..6d6a92a 100644
--- a/core/java/android/security/net/config/NetworkSecurityConfig.java
+++ b/core/java/android/security/net/config/NetworkSecurityConfig.java
@@ -16,6 +16,7 @@
package android.security.net.config;
+import android.os.Build;
import android.util.ArrayMap;
import android.util.ArraySet;
import java.security.cert.X509Certificate;
@@ -37,7 +38,6 @@
public static final boolean DEFAULT_CLEARTEXT_TRAFFIC_PERMITTED = true;
/** @hide */
public static final boolean DEFAULT_HSTS_ENFORCED = false;
- public static final NetworkSecurityConfig DEFAULT = getDefaultBuilder().build();
private final boolean mCleartextTrafficPermitted;
private final boolean mHstsEnforced;
@@ -163,21 +163,28 @@
* <li>Cleartext traffic is permitted.</li>
* <li>HSTS is not enforced.</li>
* <li>No certificate pinning is used.</li>
- * <li>The system and user added trusted certificate stores are trusted for connections.</li>
+ * <li>The system certificate store is trusted for connections.</li>
+ * <li>If the application targets API level 23 (Android M) or lower then the user certificate
+ * store is trusted by default as well.</li>
* </ol>
*
* @hide
*/
- public static final Builder getDefaultBuilder() {
- return new Builder()
+ public static final Builder getDefaultBuilder(int targetSdkVersion) {
+ Builder builder = new Builder()
.setCleartextTrafficPermitted(DEFAULT_CLEARTEXT_TRAFFIC_PERMITTED)
.setHstsEnforced(DEFAULT_HSTS_ENFORCED)
// System certificate store, does not bypass static pins.
.addCertificatesEntryRef(
- new CertificatesEntryRef(SystemCertificateSource.getInstance(), false))
- // User certificate store, does not bypass static pins.
- .addCertificatesEntryRef(
- new CertificatesEntryRef(UserCertificateSource.getInstance(), false));
+ new CertificatesEntryRef(SystemCertificateSource.getInstance(), false));
+ // Applications targeting N and above must opt in into trusting the user added certificate
+ // store.
+ if (targetSdkVersion <= Build.VERSION_CODES.M) {
+ // User certificate store, does not bypass static pins.
+ builder.addCertificatesEntryRef(
+ new CertificatesEntryRef(UserCertificateSource.getInstance(), false));
+ }
+ return builder;
}
/**
diff --git a/core/java/android/security/net/config/XmlConfigSource.java b/core/java/android/security/net/config/XmlConfigSource.java
index 1706e95..2a8773c 100644
--- a/core/java/android/security/net/config/XmlConfigSource.java
+++ b/core/java/android/security/net/config/XmlConfigSource.java
@@ -3,9 +3,11 @@
import android.content.Context;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
+import android.os.Build;
import android.util.ArraySet;
import android.util.Base64;
import android.util.Pair;
+import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.XmlUtils;
import org.xmlpull.v1.XmlPullParser;
@@ -34,20 +36,29 @@
private final Object mLock = new Object();
private final int mResourceId;
private final boolean mDebugBuild;
+ private final int mTargetSdkVersion;
private boolean mInitialized;
private NetworkSecurityConfig mDefaultConfig;
private Set<Pair<Domain, NetworkSecurityConfig>> mDomainMap;
private Context mContext;
+ @VisibleForTesting
public XmlConfigSource(Context context, int resourceId) {
this(context, resourceId, false);
}
+ @VisibleForTesting
public XmlConfigSource(Context context, int resourceId, boolean debugBuild) {
+ this(context, resourceId, debugBuild, Build.VERSION_CODES.CUR_DEVELOPMENT);
+ }
+
+ public XmlConfigSource(Context context, int resourceId, boolean debugBuild,
+ int targetSdkVersion) {
mResourceId = resourceId;
mContext = context;
mDebugBuild = debugBuild;
+ mTargetSdkVersion = targetSdkVersion;
}
public Set<Pair<Domain, NetworkSecurityConfig>> getPerDomainConfigs() {
@@ -341,7 +352,7 @@
// Use the platform default as the parent of the base config for any values not provided
// there. If there is no base config use the platform default.
NetworkSecurityConfig.Builder platformDefaultBuilder =
- NetworkSecurityConfig.getDefaultBuilder();
+ NetworkSecurityConfig.getDefaultBuilder(mTargetSdkVersion);
addDebugAnchorsIfNeeded(debugConfigBuilder, platformDefaultBuilder);
if (baseConfigBuilder != null) {
baseConfigBuilder.setParent(platformDefaultBuilder);
diff --git a/core/java/android/service/persistentdata/IPersistentDataBlockService.aidl b/core/java/android/service/persistentdata/IPersistentDataBlockService.aidl
index 52db223..626b408 100644
--- a/core/java/android/service/persistentdata/IPersistentDataBlockService.aidl
+++ b/core/java/android/service/persistentdata/IPersistentDataBlockService.aidl
@@ -35,4 +35,6 @@
void setOemUnlockEnabled(boolean enabled);
boolean getOemUnlockEnabled();
+ int getFlashLockState();
}
+
diff --git a/core/java/android/service/persistentdata/PersistentDataBlockManager.java b/core/java/android/service/persistentdata/PersistentDataBlockManager.java
index 0ffdf68..ddb6980 100644
--- a/core/java/android/service/persistentdata/PersistentDataBlockManager.java
+++ b/core/java/android/service/persistentdata/PersistentDataBlockManager.java
@@ -17,9 +17,13 @@
package android.service.persistentdata;
import android.annotation.SystemApi;
+import android.annotation.IntDef;
import android.os.RemoteException;
import android.util.Slog;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
/**
* Interface for reading and writing data blocks to a persistent partition.
*
@@ -43,6 +47,27 @@
private static final String TAG = PersistentDataBlockManager.class.getSimpleName();
private IPersistentDataBlockService sService;
+ /**
+ * Indicates that the device's bootloader lock state is UNKNOWN.
+ */
+ public static final int FLASH_LOCK_UNKNOWN = -1;
+ /**
+ * Indicates that the device's bootloader is UNLOCKED.
+ */
+ public static final int FLASH_LOCK_UNLOCKED = 0;
+ /**
+ * Indicates that the device's bootloader is LOCKED.
+ */
+ public static final int FLASH_LOCK_LOCKED = 1;
+
+ @IntDef({
+ FLASH_LOCK_UNKNOWN,
+ FLASH_LOCK_LOCKED,
+ FLASH_LOCK_UNLOCKED,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface FlashLockState {}
+
public PersistentDataBlockManager(IPersistentDataBlockService service) {
sService = service;
}
@@ -140,6 +165,24 @@
}
}
+ /**
+ * Retrieves available information about this device's flash lock state.
+ *
+ * @return FLASH_LOCK_STATE_LOCKED if device bootloader is locked,
+ * FLASH_LOCK_STATE_UNLOCKED if device bootloader is unlocked,
+ * or FLASH_LOCK_STATE unknown if this information cannot be ascertained
+ * on this device.
+ */
+ @FlashLockState
+ public int getFlashLockState() {
+ try {
+ return sService.getFlashLockState();
+ } catch (RemoteException e) {
+ onError("getting flash lock state");
+ return FLASH_LOCK_UNKNOWN;
+ }
+ }
+
private void onError(String msg) {
Slog.v(TAG, "Remote exception while " + msg);
}
diff --git a/core/java/android/service/voice/AlwaysOnHotwordDetector.java b/core/java/android/service/voice/AlwaysOnHotwordDetector.java
index 76a401d..9464a87 100644
--- a/core/java/android/service/voice/AlwaysOnHotwordDetector.java
+++ b/core/java/android/service/voice/AlwaysOnHotwordDetector.java
@@ -617,11 +617,7 @@
}
@Override
- public void onDetected(RecognitionEvent event) {
- if (! (event instanceof KeyphraseRecognitionEvent)) {
- Slog.e(TAG, "onDetected() called for a soundtrigger event.");
- return;
- }
+ public void onKeyphraseDetected(KeyphraseRecognitionEvent event) {
if (DBG) {
Slog.d(TAG, "onDetected(" + event + ")");
} else {
@@ -632,6 +628,10 @@
event.captureFormat, event.captureSession, event.data))
.sendToTarget();
}
+ @Override
+ public void onGenericSoundTriggerDetected(SoundTrigger.GenericRecognitionEvent event) {
+ Slog.w(TAG, "Generic sound trigger event detected at AOHD: " + event);
+ }
@Override
public void onError(int status) {
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index a985517..de8133b 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -271,7 +271,8 @@
@Override
public void resized(Rect frame, Rect overscanInsets, Rect contentInsets,
Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw,
- Configuration newConfig, Rect backDropRect, boolean forceLayout) {
+ Configuration newConfig, Rect backDropRect, boolean forceLayout,
+ boolean alwaysConsumeNavBar) {
Message msg = mCaller.obtainMessageIO(MSG_WINDOW_RESIZED,
reportDraw ? 1 : 0, outsets);
mCaller.sendMessage(msg);
@@ -790,7 +791,7 @@
mFinalStableInsets.set(mDispatchedStableInsets);
WindowInsets insets = new WindowInsets(mFinalSystemInsets,
null, mFinalStableInsets,
- getResources().getConfiguration().isScreenRound());
+ getResources().getConfiguration().isScreenRound(), false);
if (DEBUG) {
Log.v(TAG, "dispatching insets=" + insets);
}
diff --git a/core/java/android/text/Emoji.java b/core/java/android/text/Emoji.java
index b437f48..c0f0663 100644
--- a/core/java/android/text/Emoji.java
+++ b/core/java/android/text/Emoji.java
@@ -23,15 +23,17 @@
* @hide
*/
public class Emoji {
- // See http://www.unicode.org/Public/emoji/2.0//emoji-data.txt
+ // See http://www.unicode.org/Public/emoji/3.0/emoji-data.txt
private static int[] EMOJI_MODIFIER_BASE = {
0x261D, 0x26F9, 0x270A, 0x270B, 0x270C, 0x270D, 0x1F385, 0x1F3C3, 0x1F3C4, 0x1F3CA,
0x1F3CB, 0x1F442, 0x1F443, 0x1F446, 0x1F447, 0x1F448, 0x1F449, 0x1F44A, 0x1F44B, 0x1F44C,
0x1F44D, 0x1F44E, 0x1F44F, 0x1F450, 0x1F466, 0x1F467, 0x1F468, 0x1F469, 0x1F46E, 0x1F470,
- 0x1F471, 0x1F472, 0x1F473, 0x1F474, 0x1F475, 0x1F476, 0x1F474, 0x1F478, 0x1F47C, 0x1F481,
- 0x1F482, 0x1F483, 0x1F485, 0x1F486, 0x1F487, 0x1F4AA, 0x1F575, 0x1F590, 0x1F595, 0x1F596,
- 0x1F645, 0x1F646, 0x1F647, 0x1F64B, 0x1F64C, 0x1F64D, 0x1F64E, 0x1F64F, 0x1F6A3, 0x1F6B4,
- 0x1F6B5, 0x1F6B6, 0x1F6C0, 0x1F918
+ 0x1F471, 0x1F472, 0x1F473, 0x1F474, 0x1F475, 0x1F476, 0x1F477, 0x1F478, 0x1F47C, 0x1F481,
+ 0x1F482, 0x1F483, 0x1F485, 0x1F486, 0x1F487, 0x1F4AA, 0x1F575, 0x1F57A, 0x1F590, 0x1F595,
+ 0x1F596, 0x1F645, 0x1F646, 0x1F647, 0x1F64B, 0x1F64C, 0x1F64D, 0x1F64E, 0x1F64F, 0x1F6A3,
+ 0x1F6B4, 0x1F6B5, 0x1F6B6, 0x1F6C0, 0x1F918, 0x1F919, 0x1F91A, 0x1F91B, 0x1F91C, 0x1F91D,
+ 0x1F91E, 0x1F926, 0x1F930, 0x1F933, 0x1F934, 0x1F935, 0x1F936, 0x1F937, 0x1F938, 0x1F939,
+ 0x1F93B, 0x1F93C, 0x1F93D, 0x1F93E
};
// See http://www.unicode.org/emoji/charts/emoji-zwj-sequences.html
diff --git a/core/java/android/view/IWindow.aidl b/core/java/android/view/IWindow.aidl
index 3688d50..70d0513 100644
--- a/core/java/android/view/IWindow.aidl
+++ b/core/java/android/view/IWindow.aidl
@@ -49,7 +49,8 @@
void resized(in Rect frame, in Rect overscanInsets, in Rect contentInsets,
in Rect visibleInsets, in Rect stableInsets, in Rect outsets, boolean reportDraw,
- in Configuration newConfig, in Rect backDropFrame, boolean forceLayout);
+ in Configuration newConfig, in Rect backDropFrame, boolean forceLayout,
+ boolean alwaysConsumeNavBar);
void moved(int newX, int newY);
void dispatchAppVisibility(boolean visible);
void dispatchGetNewSurface();
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 152dd66..2c9d691 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -743,7 +743,8 @@
@Override
public void resized(Rect frame, Rect overscanInsets, Rect contentInsets,
Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw,
- Configuration newConfig, Rect backDropRect, boolean forceLayout) {
+ Configuration newConfig, Rect backDropRect, boolean forceLayout,
+ boolean alwaysConsumeNavBar) {
SurfaceView surfaceView = mSurfaceView.get();
if (surfaceView != null) {
if (DEBUG) Log.v(
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 70a0e01..e7be7af 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -18916,7 +18916,8 @@
transformFromViewToWindowSpace(outLocation);
}
- void transformFromViewToWindowSpace(@Size(2) int[] inOutLocation) {
+ /** @hide */
+ public void transformFromViewToWindowSpace(@Size(2) int[] inOutLocation) {
if (inOutLocation == null || inOutLocation.length < 2) {
throw new IllegalArgumentException("inOutLocation must be an array of two integers");
}
@@ -22517,6 +22518,13 @@
final Rect mOutsets = new Rect();
/**
+ * In multi-window we force show the navigation bar. Because we don't want that the surface
+ * size changes in this mode, we instead have a flag whether the navigation bar size should
+ * always be consumed, so the app is treated like there is no virtual navigation bar at all.
+ */
+ boolean mAlwaysConsumeNavBar;
+
+ /**
* The internal insets given by this window. This value is
* supplied by the client (through
* {@link ViewTreeObserver.OnComputeInternalInsetsListener}) and will
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 2e10bec..b9eb0a9 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -313,6 +313,7 @@
final Rect mPendingContentInsets = new Rect();
final Rect mPendingOutsets = new Rect();
final Rect mPendingBackDropFrame = new Rect();
+ boolean mPendingAlwaysConsumeNavBar;
final ViewTreeObserver.InternalInsetsInfo mLastGivenInsets
= new ViewTreeObserver.InternalInsetsInfo();
@@ -623,6 +624,9 @@
mPendingContentInsets.set(mAttachInfo.mContentInsets);
mPendingStableInsets.set(mAttachInfo.mStableInsets);
mPendingVisibleInsets.set(0, 0, 0, 0);
+ mAttachInfo.mAlwaysConsumeNavBar =
+ (res & WindowManagerGlobal.ADD_FLAG_ALWAYS_CONSUME_NAV_BAR) != 0;
+ mPendingAlwaysConsumeNavBar = mAttachInfo.mAlwaysConsumeNavBar;
if (DEBUG_LAYOUT) Log.v(mTag, "Added window " + mWindow);
if (res < WindowManagerGlobal.ADD_OKAY) {
mAttachInfo.mRootView = null;
@@ -1345,7 +1349,8 @@
}
mLastWindowInsets = new WindowInsets(contentInsets,
null /* windowDecorInsets */, stableInsets,
- mContext.getResources().getConfiguration().isScreenRound());
+ mContext.getResources().getConfiguration().isScreenRound(),
+ mAttachInfo.mAlwaysConsumeNavBar);
}
return mLastWindowInsets;
}
@@ -1512,6 +1517,9 @@
if (!mPendingOutsets.equals(mAttachInfo.mOutsets)) {
insetsChanged = true;
}
+ if (mPendingAlwaysConsumeNavBar != mAttachInfo.mAlwaysConsumeNavBar) {
+ insetsChanged = true;
+ }
if (lp.width == ViewGroup.LayoutParams.WRAP_CONTENT
|| lp.height == ViewGroup.LayoutParams.WRAP_CONTENT) {
windowSizeMayChange = true;
@@ -1696,6 +1704,8 @@
final boolean outsetsChanged = !mPendingOutsets.equals(mAttachInfo.mOutsets);
final boolean surfaceSizeChanged = (relayoutResult
& WindowManagerGlobal.RELAYOUT_RES_SURFACE_RESIZED) != 0;
+ final boolean alwaysConsumeNavBarChanged =
+ mPendingAlwaysConsumeNavBar != mAttachInfo.mAlwaysConsumeNavBar;
if (contentInsetsChanged) {
mAttachInfo.mContentInsets.set(mPendingContentInsets);
if (DEBUG_LAYOUT) Log.v(mTag, "Content insets changing to: "
@@ -1715,6 +1725,10 @@
// Need to relayout with content insets.
contentInsetsChanged = true;
}
+ if (alwaysConsumeNavBarChanged) {
+ mAttachInfo.mAlwaysConsumeNavBar = mPendingAlwaysConsumeNavBar;
+ contentInsetsChanged = true;
+ }
if (contentInsetsChanged || mLastSystemUiVisibility !=
mAttachInfo.mSystemUiVisibility || mApplyInsetsRequested
|| mLastOverscanRequested != mAttachInfo.mOverscanRequested
@@ -1968,7 +1982,7 @@
boolean triggerGlobalLayoutListener = didLayout
|| mAttachInfo.mRecomputeGlobalAttributes;
if (didLayout) {
- performLayout(lp, desiredWindowWidth, desiredWindowHeight);
+ performLayout(lp, mWidth, mHeight);
// By this point all views have been sized and positioned
// We can compute the transparent area
@@ -3391,6 +3405,7 @@
mPendingOutsets.set((Rect) args.arg7);
mPendingBackDropFrame.set((Rect) args.arg8);
mForceNextWindowRelayout = args.argi1 != 0;
+ mPendingAlwaysConsumeNavBar = args.argi2 != 0;
args.recycle();
@@ -5570,6 +5585,10 @@
mWinFrame, mPendingOverscanInsets, mPendingContentInsets, mPendingVisibleInsets,
mPendingStableInsets, mPendingOutsets, mPendingBackDropFrame, mPendingConfiguration,
mSurface);
+
+ mPendingAlwaysConsumeNavBar =
+ (relayoutResult & WindowManagerGlobal.RELAYOUT_RES_CONSUME_ALWAYS_NAV_BAR) != 0;
+
//Log.d(mTag, "<<<<<< BACK FROM relayout");
if (restore) {
params.restore();
@@ -5841,7 +5860,8 @@
public void dispatchResized(Rect frame, Rect overscanInsets, Rect contentInsets,
Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw,
- Configuration newConfig, Rect backDropFrame, boolean forceLayout) {
+ Configuration newConfig, Rect backDropFrame, boolean forceLayout,
+ boolean alwaysConsumeNavBar) {
if (DEBUG_LAYOUT) Log.v(mTag, "Resizing " + this + ": frame=" + frame.toShortString()
+ " contentInsets=" + contentInsets.toShortString()
+ " visibleInsets=" + visibleInsets.toShortString()
@@ -5878,6 +5898,7 @@
args.arg7 = sameProcessCall ? new Rect(outsets) : outsets;
args.arg8 = sameProcessCall ? new Rect(backDropFrame) : backDropFrame;
args.argi1 = forceLayout ? 1 : 0;
+ args.argi2 = alwaysConsumeNavBar ? 1 : 0;
msg.obj = args;
mHandler.sendMessage(msg);
}
@@ -6879,12 +6900,13 @@
@Override
public void resized(Rect frame, Rect overscanInsets, Rect contentInsets,
Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw,
- Configuration newConfig, Rect backDropFrame, boolean forceLayout) {
+ Configuration newConfig, Rect backDropFrame, boolean forceLayout,
+ boolean alwaysConsumeNavBar) {
final ViewRootImpl viewAncestor = mViewAncestor.get();
if (viewAncestor != null) {
viewAncestor.dispatchResized(frame, overscanInsets, contentInsets,
visibleInsets, stableInsets, outsets, reportDraw, newConfig, backDropFrame,
- forceLayout);
+ forceLayout, alwaysConsumeNavBar);
}
}
diff --git a/core/java/android/view/WindowInsets.java b/core/java/android/view/WindowInsets.java
index 997e7e8..929fdac 100644
--- a/core/java/android/view/WindowInsets.java
+++ b/core/java/android/view/WindowInsets.java
@@ -37,6 +37,13 @@
private Rect mTempRect;
private boolean mIsRound;
+ /**
+ * In multi-window we force show the navigation bar. Because we don't want that the surface size
+ * changes in this mode, we instead have a flag whether the navigation bar size should always
+ * be consumed, so the app is treated like there is no virtual navigation bar at all.
+ */
+ private boolean mAlwaysConsumeNavBar;
+
private boolean mSystemWindowInsetsConsumed = false;
private boolean mWindowDecorInsetsConsumed = false;
private boolean mStableInsetsConsumed = false;
@@ -52,12 +59,12 @@
public static final WindowInsets CONSUMED;
static {
- CONSUMED = new WindowInsets(null, null, null, false);
+ CONSUMED = new WindowInsets(null, null, null, false, false);
}
/** @hide */
public WindowInsets(Rect systemWindowInsets, Rect windowDecorInsets, Rect stableInsets,
- boolean isRound) {
+ boolean isRound, boolean alwaysConsumeNavBar) {
mSystemWindowInsetsConsumed = systemWindowInsets == null;
mSystemWindowInsets = mSystemWindowInsetsConsumed ? EMPTY_RECT : systemWindowInsets;
@@ -68,6 +75,7 @@
mStableInsets = mStableInsetsConsumed ? EMPTY_RECT : stableInsets;
mIsRound = isRound;
+ mAlwaysConsumeNavBar = alwaysConsumeNavBar;
}
/**
@@ -87,7 +95,7 @@
/** @hide */
public WindowInsets(Rect systemWindowInsets) {
- this(systemWindowInsets, null, null, false);
+ this(systemWindowInsets, null, null, false, false);
}
/**
@@ -475,6 +483,13 @@
return result;
}
+ /**
+ * @hide
+ */
+ public boolean shouldAlwaysConsumeNavBar() {
+ return mAlwaysConsumeNavBar;
+ }
+
@Override
public String toString() {
return "WindowInsets{systemWindowInsets=" + mSystemWindowInsets
diff --git a/core/java/android/view/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java
index 1530b47..a1cbc1d 100644
--- a/core/java/android/view/WindowManagerGlobal.java
+++ b/core/java/android/view/WindowManagerGlobal.java
@@ -90,6 +90,13 @@
public static final int RELAYOUT_RES_SURFACE_RESIZED = 0x20;
/**
+ * In multi-window we force show the navigation bar. Because we don't want that the surface size
+ * changes in this mode, we instead have a flag whether the navigation bar size should always be
+ * consumed, so the app is treated like there is no virtual navigation bar at all.
+ */
+ public static final int RELAYOUT_RES_CONSUME_ALWAYS_NAV_BAR = 0x40;
+
+ /**
* Flag for relayout: the client will be later giving
* internal insets; as a result, the window will not impact other window
* layouts until the insets are given.
@@ -107,6 +114,11 @@
public static final int ADD_FLAG_APP_VISIBLE = 0x2;
public static final int ADD_FLAG_IN_TOUCH_MODE = RELAYOUT_RES_IN_TOUCH_MODE;
+ /**
+ * Like {@link #RELAYOUT_RES_CONSUME_ALWAYS_NAV_BAR}, but as a "hint" when adding the window.
+ */
+ public static final int ADD_FLAG_ALWAYS_CONSUME_NAV_BAR = 0x4;
+
public static final int ADD_OKAY = 0;
public static final int ADD_BAD_APP_TOKEN = -1;
public static final int ADD_BAD_SUBWINDOW_TOKEN = -2;
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index e36077b..2fbfd2d 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -920,9 +920,10 @@
* @param outStableInsets The areas covered by stable system windows irrespective of their
* current visibility. Expressed as positive insets.
* @param outOutsets The areas that are not real display, but we would like to treat as such.
- *
+ * @return Whether to always consume the navigation bar.
+ * See {@link #isNavBarForcedShownLw(WindowState)}.
*/
- public void getInsetHintLw(WindowManager.LayoutParams attrs, int rotation,
+ public boolean getInsetHintLw(WindowManager.LayoutParams attrs, int rotation,
Rect outContentInsets, Rect outStableInsets, Rect outOutsets);
/**
@@ -1351,6 +1352,12 @@
public void getStableInsetsLw(int displayRotation, int displayWidth, int displayHeight,
Rect outInsets);
+
+ /**
+ * @return true if the navigation bar is forced to stay visible
+ */
+ public boolean isNavBarForcedShownLw(WindowState win);
+
/**
* Calculates the insets for the areas that could never be removed in Honeycomb, i.e. system
* bar or button bar. See {@link #getNonDecorDisplayWidth}.
diff --git a/core/java/android/webkit/IWebViewUpdateService.aidl b/core/java/android/webkit/IWebViewUpdateService.aidl
index 89d5d69..5697dfc 100644
--- a/core/java/android/webkit/IWebViewUpdateService.aidl
+++ b/core/java/android/webkit/IWebViewUpdateService.aidl
@@ -38,10 +38,14 @@
WebViewProviderResponse waitForAndGetProvider();
/**
- * DevelopmentSettings uses this to notify WebViewUpdateService that a
- * new provider has been selected by the user.
+ * DevelopmentSettings uses this to notify WebViewUpdateService that a new provider has been
+ * selected by the user. Returns the provider we end up switching to, this could be different to
+ * the one passed as argument to this method since the Dev Setting calling this method could be
+ * stale. I.e. the Dev setting could be letting the user choose uninstalled/disabled packages,
+ * it would then try to update the provider to such a package while in reality the update
+ * service would switch to another one.
*/
- void changeProviderAndSetting(String newProvider);
+ String changeProviderAndSetting(String newProvider);
/**
* DevelopmentSettings uses this to get the current available WebView
@@ -53,4 +57,15 @@
* Used by DevelopmentSetting to get the name of the WebView provider currently in use.
*/
String getCurrentWebViewPackageName();
+
+ /**
+ * Used by Settings to determine whether a certain package can be enabled/disabled by the user -
+ * the package should not be modifiable in this way if it is a fallback package.
+ */
+ boolean isFallbackPackage(String packageName);
+
+ /**
+ * Enable or disable the WebView package fallback mechanism.
+ */
+ void enableFallbackLogic(boolean enable);
}
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 647d4dc..2eb258f 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -288,11 +288,11 @@
* helps Google improve WebView. Data is collected on a per-app basis for each app which has
* instantiated a WebView. An individual app can opt out of this feature by putting the following
* tag in its manifest:
- * </p>
* <pre>
- * <meta-data android:name="android.webkit.WebView.MetricsOptOut"
- * android:value="true" />
+ * <meta-data android:name="android.webkit.WebView.MetricsOptOut"
+ * android:value="true" />
* </pre>
+ * </p>
* <p>
* Data will only be uploaded for a given app if the user has consented AND the app has not opted
* out.
diff --git a/core/java/android/webkit/WebViewFactory.java b/core/java/android/webkit/WebViewFactory.java
index b04b4c0..ad50ff6 100644
--- a/core/java/android/webkit/WebViewFactory.java
+++ b/core/java/android/webkit/WebViewFactory.java
@@ -21,6 +21,7 @@
import android.app.AppGlobals;
import android.app.Application;
import android.content.Context;
+import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
@@ -134,6 +135,7 @@
// Whether or not the provider must be explicitly chosen by the user to be used.
private static String TAG_AVAILABILITY = "availableByDefault";
private static String TAG_SIGNATURE = "signature";
+ private static String TAG_FALLBACK = "isFallback";
/**
* Reads all signatures at the current depth (within the current provider) from the XML parser.
@@ -159,6 +161,7 @@
* @hide
* */
public static WebViewProviderInfo[] getWebViewPackages() {
+ int numFallbackPackages = 0;
XmlResourceParser parser = null;
List<WebViewProviderInfo> webViewProviders = new ArrayList<WebViewProviderInfo>();
try {
@@ -182,13 +185,21 @@
throw new MissingWebViewPackageException(
"WebView provider in framework resources missing description");
}
- String availableByDefault = parser.getAttributeValue(null, TAG_AVAILABILITY);
- if (availableByDefault == null) {
- availableByDefault = "false";
- }
- webViewProviders.add(
+ boolean availableByDefault = "true".equals(
+ parser.getAttributeValue(null, TAG_AVAILABILITY));
+ boolean isFallback = "true".equals(
+ parser.getAttributeValue(null, TAG_FALLBACK));
+ WebViewProviderInfo currentProvider =
new WebViewProviderInfo(packageName, description, availableByDefault,
- readSignatures(parser)));
+ isFallback, readSignatures(parser));
+ if (currentProvider.isFallbackPackage()) {
+ numFallbackPackages++;
+ if (numFallbackPackages > 1) {
+ throw new AndroidRuntimeException(
+ "There can be at most one webview fallback package.");
+ }
+ }
+ webViewProviders.add(currentProvider);
}
else {
Log.e(LOGTAG, "Found an element that is not a webview provider");
@@ -641,6 +652,18 @@
return result;
}
+ /**
+ * Returns whether the entire package from an ACTION_PACKAGE_CHANGED intent was changed (rather
+ * than just one of its components).
+ * @hide
+ */
+ public static boolean entirePackageChanged(Intent intent) {
+ String[] componentList =
+ intent.getStringArrayExtra(Intent.EXTRA_CHANGED_COMPONENT_NAME_LIST);
+ return Arrays.asList(componentList).contains(
+ intent.getDataString().substring("package:".length()));
+ }
+
private static IWebViewUpdateService getUpdateService() {
return IWebViewUpdateService.Stub.asInterface(ServiceManager.getService("webviewupdate"));
}
diff --git a/core/java/android/webkit/WebViewProviderInfo.java b/core/java/android/webkit/WebViewProviderInfo.java
index 94e8b70..64c2caa 100644
--- a/core/java/android/webkit/WebViewProviderInfo.java
+++ b/core/java/android/webkit/WebViewProviderInfo.java
@@ -40,11 +40,12 @@
public WebViewPackageNotFoundException(Exception e) { super(e); }
}
- public WebViewProviderInfo(String packageName, String description, String availableByDefault,
- String[] signatures) {
+ public WebViewProviderInfo(String packageName, String description, boolean availableByDefault,
+ boolean isFallback, String[] signatures) {
this.packageName = packageName;
this.description = description;
- this.availableByDefault = availableByDefault.equals("true");
+ this.availableByDefault = availableByDefault;
+ this.isFallback = isFallback;
this.signatures = signatures;
}
@@ -114,6 +115,10 @@
return availableByDefault;
}
+ public boolean isFallbackPackage() {
+ return isFallback;
+ }
+
private void updatePackageInfo() {
try {
PackageManager pm = AppGlobals.getInitialApplication().getPackageManager();
@@ -165,6 +170,7 @@
public String packageName;
public String description;
private boolean availableByDefault;
+ private boolean isFallback;
private String[] signatures;
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index b2ef687..881e5cd 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -4131,13 +4131,15 @@
}
if (isVisible()) {
- final int positionX = parentPositionX + mPositionX;
- final int positionY = parentPositionY + mPositionY;
+ // Transform to the window coordinates to follow the view tranformation.
+ final int[] pts = { mPositionX + mHotspotX + getHorizontalOffset(), mPositionY};
+ mTextView.transformFromViewToWindowSpace(pts);
+ pts[0] -= mHotspotX + getHorizontalOffset();
+
if (isShowing()) {
- mContainer.update(positionX, positionY, -1, -1);
+ mContainer.update(pts[0], pts[1], -1, -1);
} else {
- mContainer.showAtLocation(mTextView, Gravity.NO_GRAVITY,
- positionX, positionY);
+ mContainer.showAtLocation(mTextView, Gravity.NO_GRAVITY, pts[0], pts[1]);
}
} else {
if (isShowing()) {
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index 8fa71a2..4c81d1a 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -1632,6 +1632,7 @@
final PopupDecorView decorView = mDecorView;
final View contentView = mContentView;
+ final OnDismissListener dismissListener = mOnDismissListener;
final ViewGroup contentHolder;
final ViewParent contentParent = contentView.getParent();
@@ -1653,7 +1654,7 @@
// can expect the OnAttachStateChangeListener to have been called prior
// to executing this method, so we can rely on that instead.
final Transition exitTransition = mExitTransition;
- if (!mIsAnchorRootAttached && exitTransition != null && decorView.isLaidOut()) {
+ if (mIsAnchorRootAttached && exitTransition != null && decorView.isLaidOut()) {
// The decor view is non-interactive during exit transitions.
final LayoutParams p = (LayoutParams) decorView.getLayoutParams();
p.flags |= LayoutParams.FLAG_NOT_TOUCHABLE;
@@ -1675,19 +1676,16 @@
new TransitionListenerAdapter() {
@Override
public void onTransitionEnd(Transition transition) {
- dismissImmediate(decorView, contentHolder, contentView);
+ dismissImmediate(decorView, contentHolder,
+ contentView, dismissListener);
}
});
} else {
- dismissImmediate(decorView, contentHolder, contentView);
+ dismissImmediate(decorView, contentHolder, contentView, dismissListener);
}
// Clears the anchor view.
unregisterForViewTreeChanges();
-
- if (mOnDismissListener != null) {
- mOnDismissListener.onDismiss();
- }
}
/**
@@ -1729,7 +1727,8 @@
* Removes the popup from the window manager and tears down the supporting
* view hierarchy, if necessary.
*/
- private void dismissImmediate(View decorView, ViewGroup contentHolder, View contentView) {
+ private void dismissImmediate(View decorView, ViewGroup contentHolder,
+ View contentView, OnDismissListener listener) {
// If this method gets called and the decor view doesn't have a parent,
// then it was either never added or was already removed. That should
// never happen, but it's worth checking to avoid potential crashes.
@@ -1746,6 +1745,10 @@
mDecorView = null;
mBackgroundView = null;
mIsTransitioningToDismiss = false;
+
+ if (mOnDismissListener != null) {
+ mOnDismissListener.onDismiss();
+ }
}
/**
diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java
index 4ed175d..1cccfae 100644
--- a/core/java/android/widget/RemoteViews.java
+++ b/core/java/android/widget/RemoteViews.java
@@ -454,12 +454,19 @@
public void onClick(View v) {
// Insure that this view is a child of an AdapterView
View parent = (View) v.getParent();
+ // Break the for loop on the first encounter of:
+ // 1) an AdapterView,
+ // 2) an AppWidgetHostView that is not a RemoteViewsFrameLayout, or
+ // 3) a null parent.
+ // 2) and 3) are unexpected and catch the case where a child is not
+ // correctly parented in an AdapterView.
while (parent != null && !(parent instanceof AdapterView<?>)
- && !(parent instanceof AppWidgetHostView)) {
+ && !((parent instanceof AppWidgetHostView) &&
+ !(parent instanceof RemoteViewsAdapter.RemoteViewsFrameLayout))) {
parent = (View) parent.getParent();
}
- if (parent instanceof AppWidgetHostView || parent == null) {
+ if (!(parent instanceof AdapterView<?>)) {
// Somehow they've managed to get this far without having
// and AdapterView as a parent.
Log.e(LOG_TAG, "Collection item doesn't have AdapterView parent");
@@ -1973,13 +1980,13 @@
public SetRemoteInputsAction(Parcel parcel) {
viewId = parcel.readInt();
- remoteInputs = parcel.readParcelableArray(RemoteInput.class.getClassLoader());
+ remoteInputs = parcel.createTypedArray(RemoteInput.CREATOR);
}
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(TAG);
dest.writeInt(viewId);
- dest.writeParcelableArray(remoteInputs, flags);
+ dest.writeTypedArray(remoteInputs, flags);
}
@Override
diff --git a/core/java/android/widget/RemoteViewsAdapter.java b/core/java/android/widget/RemoteViewsAdapter.java
index 8278c5a..10abbab 100644
--- a/core/java/android/widget/RemoteViewsAdapter.java
+++ b/core/java/android/widget/RemoteViewsAdapter.java
@@ -288,7 +288,7 @@
* A FrameLayout which contains a loading view, and manages the re/applying of RemoteViews when
* they are loaded.
*/
- private static class RemoteViewsFrameLayout extends AppWidgetHostView {
+ static class RemoteViewsFrameLayout extends AppWidgetHostView {
private final FixedSizeRemoteViewsCache mCache;
public RemoteViewsFrameLayout(Context context, FixedSizeRemoteViewsCache cache) {
diff --git a/core/java/com/android/internal/app/PlatLogoActivity.java b/core/java/com/android/internal/app/PlatLogoActivity.java
index 0964dcf..5944568 100644
--- a/core/java/com/android/internal/app/PlatLogoActivity.java
+++ b/core/java/com/android/internal/app/PlatLogoActivity.java
@@ -73,62 +73,28 @@
final int size = (int)
(Math.min(Math.min(dm.widthPixels, dm.heightPixels), 600*dp) - 100*dp);
- final View im = new View(this);
+ final ImageView im = new ImageView(this);
+ final int pad = (int)(40*dp);
+ im.setPadding(pad, pad, pad, pad);
im.setTranslationZ(20);
im.setScaleX(0.5f);
im.setScaleY(0.5f);
im.setAlpha(0f);
- im.setOutlineProvider(new ViewOutlineProvider() {
- @Override
- public void getOutline(View view, Outline outline) {
- final int pad = (int) (8 * dp);
- outline.setOval(pad, pad, view.getWidth() - pad, view.getHeight() - pad);
- }
- });
- final float hue = (float) Math.random();
- final Paint bgPaint = new Paint();
- bgPaint.setColor(HSBtoColor(hue, 0.4f, 1f));
- final Paint fgPaint = new Paint();
- fgPaint.setColor(HSBtoColor(hue, 0.5f, 1f));
- final Drawable M = getDrawable(com.android.internal.R.drawable.platlogo_m);
- final Drawable platlogo = new Drawable() {
- @Override
- public void setAlpha(int alpha) { }
- @Override
- public void setColorFilter(@Nullable ColorFilter colorFilter) { }
-
- @Override
- public int getOpacity() {
- return PixelFormat.TRANSLUCENT;
- }
-
- @Override
- public void draw(Canvas c) {
- final float r = c.getWidth() / 2f;
- c.drawCircle(r, r, r, bgPaint);
- c.drawArc(0, 0, 2 * r, 2 * r, 135, 180, false, fgPaint);
- M.setBounds(0, 0, c.getWidth(), c.getHeight());
- M.draw(c);
- }
- };
im.setBackground(new RippleDrawable(
ColorStateList.valueOf(0xFFFFFFFF),
- platlogo,
+ getDrawable(com.android.internal.R.drawable.platlogo),
null));
- im.setOutlineProvider(new ViewOutlineProvider() {
- @Override
- public void getOutline(View view, Outline outline) {
- outline.setOval(0, 0, view.getWidth(), view.getHeight());
- }
- });
+// im.setOutlineProvider(new ViewOutlineProvider() {
+// @Override
+// public void getOutline(View view, Outline outline) {
+// outline.setOval(0, 0, view.getWidth(), view.getHeight());
+// }
+// });
im.setClickable(true);
im.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- if (mTapCount == 0) {
- showMarshmallow(im);
- }
im.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
@@ -175,9 +141,6 @@
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
if (keyCode != KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_DOWN) {
- if (mKeyCount == 0) {
- showMarshmallow(im);
- }
++mKeyCount;
if (mKeyCount > 2) {
if (mTapCount > 5) {
@@ -201,81 +164,4 @@
.setStartDelay(800)
.start();
}
-
- public void showMarshmallow(View im) {
- final Drawable fg = getDrawable(com.android.internal.R.drawable.platlogo);
- fg.setBounds(0, 0, im.getWidth(), im.getHeight());
- fg.setAlpha(0);
- im.getOverlay().add(fg);
-
- final Animator fadeIn = ObjectAnimator.ofInt(fg, "alpha", 255);
- fadeIn.setInterpolator(mInterpolator);
- fadeIn.setDuration(300);
- fadeIn.start();
- }
-
- /**
- * Convert HSB components to an ARGB color. Alpha set to 0xFF.
- * hsv[0] is Hue [0 .. 1)
- * hsv[1] is Saturation [0...1]
- * hsv[2] is Value [0...1]
- * If hsv values are out of range, they are pinned.
- * @param h Hue component
- * @param s Saturation component
- * @param b Brightness component
- * @return the resulting argb color
- */
- private static int HSBtoColor(float h, float s, float b) {
- h = MathUtils.constrain(h, 0.0f, 1.0f);
- s = MathUtils.constrain(s, 0.0f, 1.0f);
- b = MathUtils.constrain(b, 0.0f, 1.0f);
-
- float red = 0.0f;
- float green = 0.0f;
- float blue = 0.0f;
-
- final float hf = (h - (int) h) * 6.0f;
- final int ihf = (int) hf;
- final float f = hf - ihf;
- final float pv = b * (1.0f - s);
- final float qv = b * (1.0f - s * f);
- final float tv = b * (1.0f - s * (1.0f - f));
-
- switch (ihf) {
- case 0: // Red is the dominant color
- red = b;
- green = tv;
- blue = pv;
- break;
- case 1: // Green is the dominant color
- red = qv;
- green = b;
- blue = pv;
- break;
- case 2:
- red = pv;
- green = b;
- blue = tv;
- break;
- case 3: // Blue is the dominant color
- red = pv;
- green = qv;
- blue = b;
- break;
- case 4:
- red = tv;
- green = pv;
- blue = b;
- break;
- case 5: // Red is the dominant color
- red = b;
- green = pv;
- blue = qv;
- break;
- }
-
- return 0xFF000000 | (((int) (red * 255.0f)) << 16) |
- (((int) (green * 255.0f)) << 8) | ((int) (blue * 255.0f));
- }
-
}
diff --git a/core/java/com/android/internal/inputmethod/InputMethodUtils.java b/core/java/com/android/internal/inputmethod/InputMethodUtils.java
index 62e149a..4e48e45 100644
--- a/core/java/com/android/internal/inputmethod/InputMethodUtils.java
+++ b/core/java/com/android/internal/inputmethod/InputMethodUtils.java
@@ -32,6 +32,7 @@
import android.text.TextUtils.SimpleStringSplitter;
import android.util.ArrayMap;
import android.util.ArraySet;
+import android.util.LocaleList;
import android.util.Pair;
import android.util.Printer;
import android.util.Slog;
@@ -486,18 +487,29 @@
return NOT_A_SUBTYPE_ID;
}
+ private static final LocaleUtils.LocaleExtractor<InputMethodSubtype> sSubtypeToLocale =
+ new LocaleUtils.LocaleExtractor<InputMethodSubtype>() {
+ @Override
+ public Locale get(InputMethodSubtype source) {
+ return source != null ? source.getLocaleObject() : null;
+ }
+ };
+
@VisibleForTesting
public static ArrayList<InputMethodSubtype> getImplicitlyApplicableSubtypesLocked(
Resources res, InputMethodInfo imi) {
final List<InputMethodSubtype> subtypes = InputMethodUtils.getSubtypes(imi);
- final String systemLocale = res.getConfiguration().locale.toString();
+ final LocaleList systemLocales = res.getConfiguration().getLocales();
+ final String systemLocale = systemLocales.get(0).toString();
if (TextUtils.isEmpty(systemLocale)) return new ArrayList<>();
- final String systemLanguage = res.getConfiguration().locale.getLanguage();
+ final int numSubtypes = subtypes.size();
+
+ // Handle overridesImplicitlyEnabledSubtype mechanism.
+ final String systemLanguage = systemLocales.get(0).getLanguage();
final HashMap<String, InputMethodSubtype> applicableModeAndSubtypesMap = new HashMap<>();
- final int N = subtypes.size();
- for (int i = 0; i < N; ++i) {
+ for (int i = 0; i < numSubtypes; ++i) {
// scan overriding implicitly enabled subtypes.
- InputMethodSubtype subtype = subtypes.get(i);
+ final InputMethodSubtype subtype = subtypes.get(i);
if (subtype.overridesImplicitlyEnabledSubtype()) {
final String mode = subtype.getMode();
if (!applicableModeAndSubtypesMap.containsKey(mode)) {
@@ -508,42 +520,46 @@
if (applicableModeAndSubtypesMap.size() > 0) {
return new ArrayList<>(applicableModeAndSubtypesMap.values());
}
- for (int i = 0; i < N; ++i) {
+
+ final ArrayList<InputMethodSubtype> keyboardSubtypes = new ArrayList<>();
+ for (int i = 0; i < numSubtypes; ++i) {
final InputMethodSubtype subtype = subtypes.get(i);
- final String locale = subtype.getLocale();
- final String mode = subtype.getMode();
- final String language = getLanguageFromLocaleString(locale);
- // When system locale starts with subtype's locale, that subtype will be applicable
- // for system locale. We need to make sure the languages are the same, to prevent
- // locales like "fil" (Filipino) being matched by "fi" (Finnish).
- //
- // For instance, it's clearly applicable for cases like system locale = en_US and
- // subtype = en, but it is not necessarily considered applicable for cases like system
- // locale = en and subtype = en_US.
- //
- // We just call systemLocale.startsWith(locale) in this function because there is no
- // need to find applicable subtypes aggressively unlike
- // findLastResortApplicableSubtypeLocked.
- //
- // TODO: This check is broken. It won't take scripts into account and doesn't
- // account for the mandatory conversions performed by Locale#toString.
- if (language.equals(systemLanguage) && systemLocale.startsWith(locale)) {
- final InputMethodSubtype applicableSubtype = applicableModeAndSubtypesMap.get(mode);
- // If more applicable subtypes are contained, skip.
- if (applicableSubtype != null) {
- if (systemLocale.equals(applicableSubtype.getLocale())) continue;
- if (!systemLocale.equals(locale)) continue;
+ if (TextUtils.equals(SUBTYPE_MODE_KEYBOARD, subtype.getMode())) {
+ keyboardSubtypes.add(subtype);
+ } else {
+ final Locale locale = subtype.getLocaleObject();
+ final String mode = subtype.getMode();
+ // TODO: Take secondary system locales into consideration.
+ if (locale != null && locale.equals(systemLanguage)) {
+ final InputMethodSubtype applicableSubtype =
+ applicableModeAndSubtypesMap.get(mode);
+ // If more applicable subtypes are contained, skip.
+ if (applicableSubtype != null) {
+ if (systemLocale.equals(applicableSubtype.getLocaleObject())) continue;
+ if (!systemLocale.equals(locale)) continue;
+ }
+ applicableModeAndSubtypesMap.put(mode, subtype);
}
- applicableModeAndSubtypesMap.put(mode, subtype);
}
}
- final InputMethodSubtype keyboardSubtype
- = applicableModeAndSubtypesMap.get(SUBTYPE_MODE_KEYBOARD);
- final ArrayList<InputMethodSubtype> applicableSubtypes = new ArrayList<>(
- applicableModeAndSubtypesMap.values());
- if (keyboardSubtype != null && !keyboardSubtype.containsExtraValueKey(TAG_ASCII_CAPABLE)) {
- for (int i = 0; i < N; ++i) {
- final InputMethodSubtype subtype = subtypes.get(i);
+
+ final ArrayList<InputMethodSubtype> applicableSubtypes = new ArrayList<>();
+ LocaleUtils.filterByLanguage(keyboardSubtypes, sSubtypeToLocale, systemLocales,
+ applicableSubtypes);
+
+ boolean hasAsciiCapableKeyboard = false;
+ final int numApplicationSubtypes = applicableSubtypes.size();
+ for (int i = 0; i < numApplicationSubtypes; ++i) {
+ final InputMethodSubtype subtype = applicableSubtypes.get(i);
+ if (subtype.containsExtraValueKey(TAG_ASCII_CAPABLE)) {
+ hasAsciiCapableKeyboard = true;
+ break;
+ }
+ }
+ if (!hasAsciiCapableKeyboard) {
+ final int numKeyboardSubtypes = keyboardSubtypes.size();
+ for (int i = 0; i < numKeyboardSubtypes; ++i) {
+ final InputMethodSubtype subtype = keyboardSubtypes.get(i);
final String mode = subtype.getMode();
if (SUBTYPE_MODE_KEYBOARD.equals(mode) && subtype.containsExtraValueKey(
TAG_ENABLED_WHEN_DEFAULT_IS_NOT_ASCII_CAPABLE)) {
@@ -551,13 +567,16 @@
}
}
}
- if (keyboardSubtype == null) {
+
+ if (applicableSubtypes.isEmpty()) {
InputMethodSubtype lastResortKeyboardSubtype = findLastResortApplicableSubtypeLocked(
res, subtypes, SUBTYPE_MODE_KEYBOARD, systemLocale, true);
if (lastResortKeyboardSubtype != null) {
applicableSubtypes.add(lastResortKeyboardSubtype);
}
}
+
+ applicableSubtypes.addAll(applicableModeAndSubtypesMap.values());
return applicableSubtypes;
}
diff --git a/core/java/com/android/internal/inputmethod/LocaleUtils.java b/core/java/com/android/internal/inputmethod/LocaleUtils.java
new file mode 100644
index 0000000..99bb4cb
--- /dev/null
+++ b/core/java/com/android/internal/inputmethod/LocaleUtils.java
@@ -0,0 +1,142 @@
+/*
+ * 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.internal.inputmethod;
+
+import com.android.internal.annotations.VisibleForTesting;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.text.TextUtils;
+import android.util.LocaleList;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Objects;
+
+public final class LocaleUtils {
+
+ @VisibleForTesting
+ public interface LocaleExtractor<T> {
+ @Nullable
+ Locale get(@Nullable T source);
+ }
+
+ @Nullable
+ private static String getLanguage(@Nullable Locale locale) {
+ if (locale == null) {
+ return null;
+ }
+ return locale.getLanguage();
+ }
+
+ /**
+ * Filters the given items based on language preferences.
+ *
+ * <p>For each language found in {@code preferredLanguages}, this method tries to copy at most
+ * one best-match item from {@code source} to {@code dest}. For example, if
+ * {@code "en-GB", "ja", "en-AU", "fr-CA", "en-IN"} is specified to {@code preferredLanguages},
+ * this method tries to copy at most one English locale, at most one Japanese, and at most one
+ * French locale from {@code source} to {@code dest}. Here the best matching English locale
+ * will be searched from {@code source} as follows.
+ * <ol>
+ * <li>The first instance in {@code sources} that exactly matches {@code "en-GB"}</li>
+ * <li>The first instance in {@code sources} that exactly matches {@code "en-AU"}</li>
+ * <li>The first instance in {@code sources} that exactly matches {@code "en-IN"}</li>
+ * <li>The first instance in {@code sources} that partially matches {@code "en"}</li>
+ * </ol>
+ * <p>Then this method iterates the same algorithm for Japanese then French.</p>
+ *
+ * @param sources Source items to be filtered.
+ * @param extractor Type converter from the source items to {@link Locale} object.
+ * @param preferredLanguages Ordered list of locales with which the input items will be
+ * filtered.
+ * @param dest Destination into which the filtered items will be added.
+ * @param <T> Type of the data items.
+ */
+ @VisibleForTesting
+ public static <T> void filterByLanguage(
+ @NonNull List<T> sources,
+ @NonNull LocaleExtractor<T> extractor,
+ @NonNull LocaleList preferredLanguages,
+ @NonNull ArrayList<T> dest) {
+ final Locale[] availableLocales = new Locale[sources.size()];
+ for (int i = 0; i < availableLocales.length; ++i) {
+ availableLocales[i] = extractor.get(sources.get(i));
+ }
+ final Locale[] sortedPreferredLanguages = new Locale[preferredLanguages.size()];
+ if (sortedPreferredLanguages.length > 0) {
+ int nextIndex = 0;
+ final int N = preferredLanguages.size();
+ languageLoop:
+ for (int i = 0; i < N; ++i) {
+ final String language = getLanguage(preferredLanguages.get(i));
+ for (int j = 0; j < nextIndex; ++j) {
+ if (TextUtils.equals(getLanguage(sortedPreferredLanguages[j]), language)) {
+ continue languageLoop;
+ }
+ }
+ for (int j = i; j < N; ++j) {
+ final Locale locale = preferredLanguages.get(j);
+ if (TextUtils.equals(language, getLanguage(locale))) {
+ sortedPreferredLanguages[nextIndex] = locale;
+ ++nextIndex;
+ }
+ }
+ }
+ }
+
+
+ for (int languageIndex = 0; languageIndex < sortedPreferredLanguages.length;) {
+ // Finding the range.
+ final String language = getLanguage(sortedPreferredLanguages[languageIndex]);
+ int nextLanguageIndex = languageIndex;
+ for (; nextLanguageIndex < sortedPreferredLanguages.length; ++nextLanguageIndex) {
+ final Locale locale = sortedPreferredLanguages[nextLanguageIndex];
+ if (!TextUtils.equals(getLanguage(locale), language)) {
+ break;
+ }
+ }
+
+ // Check exact match
+ boolean found = false;
+ for (int i = languageIndex; !found && i < nextLanguageIndex; ++i) {
+ final Locale locale = sortedPreferredLanguages[i];
+ for (int j = 0; j < availableLocales.length; ++j) {
+ if (!Objects.equals(locale, availableLocales[j])) {
+ continue;
+ }
+ dest.add(sources.get(j));
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ // No exact match. Use language match.
+ for (int j = 0; j < availableLocales.length; ++j) {
+ if (!TextUtils.equals(language, getLanguage(availableLocales[j]))) {
+ continue;
+ }
+ dest.add(sources.get(j));
+ break;
+ }
+ }
+ languageIndex = nextLanguageIndex;
+ }
+ }
+}
\ No newline at end of file
diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java
index 4832881..df48d6d 100644
--- a/core/java/com/android/internal/policy/DecorView.java
+++ b/core/java/com/android/internal/policy/DecorView.java
@@ -1002,7 +1002,8 @@
boolean consumingNavBar =
(attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0
&& (sysUiVisibility & SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) == 0
- && (sysUiVisibility & SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0;
+ && (sysUiVisibility & SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0
+ || (insets != null && insets.shouldAlwaysConsumeNavBar());
// If we didn't request fullscreen layout, but we still got it because of the
// mForceWindowDrawsStatusBarBackground flag, also consume top inset.
@@ -1744,6 +1745,10 @@
mCaptionBackgroundDrawable = getContext().getDrawable(
R.drawable.decor_caption_title_focused);
}
+ if (mResizingBackgroundDrawable != null) {
+ mLastBackgroundDrawableCb = mResizingBackgroundDrawable.getCallback();
+ mResizingBackgroundDrawable.setCallback(null);
+ }
}
// Free floating overlapping windows require a caption.
@@ -1914,11 +1919,6 @@
final ThreadedRenderer renderer = getHardwareRenderer();
if (renderer != null) {
loadBackgroundDrawablesIfNeeded();
- if (mResizingBackgroundDrawable != null) {
- mLastBackgroundDrawableCb = mResizingBackgroundDrawable.getCallback();
- mResizingBackgroundDrawable.setCallback(null);
- }
-
mBackdropFrameRenderer = new BackdropFrameRenderer(this, renderer,
initialBounds, mResizingBackgroundDrawable, mCaptionBackgroundDrawable,
mUserCaptionBackgroundDrawable, getCurrentColor(mStatusColorViewState),
diff --git a/core/java/com/android/internal/view/BaseIWindow.java b/core/java/com/android/internal/view/BaseIWindow.java
index bcc310f..ab918c8 100644
--- a/core/java/com/android/internal/view/BaseIWindow.java
+++ b/core/java/com/android/internal/view/BaseIWindow.java
@@ -38,7 +38,7 @@
@Override
public void resized(Rect frame, Rect overscanInsets, Rect contentInsets, Rect visibleInsets,
Rect stableInsets, Rect outsets, boolean reportDraw, Configuration newConfig,
- Rect backDropFrame, boolean forceLayout) {
+ Rect backDropFrame, boolean forceLayout, boolean alwaysConsumeNavBar) {
if (reportDraw) {
try {
mSession.finishDrawing(this);
diff --git a/core/jni/android_media_AudioSystem.cpp b/core/jni/android_media_AudioSystem.cpp
index 80f8a64..7d9e4a2 100644
--- a/core/jni/android_media_AudioSystem.cpp
+++ b/core/jni/android_media_AudioSystem.cpp
@@ -388,18 +388,43 @@
}
static void
-android_media_AudioSystem_recording_callback(int event, int session, int source)
+android_media_AudioSystem_recording_callback(int event, int session, int source,
+ const audio_config_base_t *clientConfig, const audio_config_base_t *deviceConfig)
{
JNIEnv *env = AndroidRuntime::getJNIEnv();
if (env == NULL) {
return;
}
+ if (clientConfig == NULL || deviceConfig == NULL) {
+ ALOGE("Unexpected null client/device configurations in recording callback");
+ return;
+ }
+ // create an array for 2*3 integers to store the record configurations (client + device)
+ jintArray recParamArray = env->NewIntArray(6);
+ if (recParamArray == NULL) {
+ ALOGE("recording callback: Couldn't allocate int array for configuration data");
+ return;
+ }
+ jint recParamData[6];
+ recParamData[0] = (jint) audioFormatFromNative(clientConfig->format);
+ // FIXME this doesn't support index-based masks
+ recParamData[1] = (jint) inChannelMaskFromNative(clientConfig->channel_mask);
+ recParamData[2] = (jint) clientConfig->sample_rate;
+ recParamData[3] = (jint) audioFormatFromNative(deviceConfig->format);
+ // FIXME this doesn't support index-based masks
+ recParamData[4] = (jint) inChannelMaskFromNative(deviceConfig->channel_mask);
+ recParamData[5] = (jint) deviceConfig->sample_rate;
+ env->SetIntArrayRegion(recParamArray, 0, 6, recParamData);
+
+ // callback into java
jclass clazz = env->FindClass(kClassPathName);
env->CallStaticVoidMethod(clazz,
gAudioPolicyEventHandlerMethods.postRecordConfigEventFromNative,
- event, session, source);
+ event, session, source, recParamArray);
env->DeleteLocalRef(clazz);
+
+ env->DeleteLocalRef(recParamArray);
}
static jint
@@ -1819,7 +1844,7 @@
"dynamicPolicyCallbackFromNative", "(ILjava/lang/String;I)V");
gAudioPolicyEventHandlerMethods.postRecordConfigEventFromNative =
GetStaticMethodIDOrDie(env, env->FindClass(kClassPathName),
- "recordingCallbackFromNative", "(III)V");
+ "recordingCallbackFromNative", "(III[I)V");
jclass audioMixClass = FindClassOrDie(env, "android/media/audiopolicy/AudioMix");
gAudioMixClass = MakeGlobalRefOrDie(env, audioMixClass);
diff --git a/core/jni/android_opengl_GLES30.cpp b/core/jni/android_opengl_GLES30.cpp
index c9b5af7..2d69eaa 100644
--- a/core/jni/android_opengl_GLES30.cpp
+++ b/core/jni/android_opengl_GLES30.cpp
@@ -5155,6 +5155,21 @@
}
}
+/* void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint offset ) */
+static void
+android_glReadPixels__IIIIIII
+ (JNIEnv *_env, jobject _this, jint x, jint y, jint width, jint height, jint format, jint type, jint offset) {
+ glReadPixels(
+ (GLint)x,
+ (GLint)y,
+ (GLsizei)width,
+ (GLsizei)height,
+ (GLenum)format,
+ (GLenum)type,
+ reinterpret_cast<GLvoid *>(offset)
+ );
+}
+
static const char *classPathName = "android/opengl/GLES30";
static const JNINativeMethod methods[] = {
@@ -5320,6 +5335,7 @@
{"glTexStorage3D", "(IIIIII)V", (void *) android_glTexStorage3D__IIIIII },
{"glGetInternalformativ", "(IIII[II)V", (void *) android_glGetInternalformativ__IIII_3II },
{"glGetInternalformativ", "(IIIILjava/nio/IntBuffer;)V", (void *) android_glGetInternalformativ__IIIILjava_nio_IntBuffer_2 },
+{"glReadPixels", "(IIIIIII)V", (void *) android_glReadPixels__IIIIIII },
};
int register_android_opengl_jni_GLES30(JNIEnv *_env)
diff --git a/core/res/res/drawable-nodpi/platlogo.xml b/core/res/res/drawable-nodpi/platlogo.xml
index bb423fef5..defa83a 100644
--- a/core/res/res/drawable-nodpi/platlogo.xml
+++ b/core/res/res/drawable-nodpi/platlogo.xml
@@ -1,5 +1,5 @@
<!--
-Copyright (C) 2015 The Android Open Source Project
+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.
@@ -14,20 +14,24 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="48dp"
- android:height="48dp"
+ android:width="512dp"
+ android:height="512dp"
android:viewportWidth="48.0"
android:viewportHeight="48.0">
<path
- android:pathData="M34.9,13.2c-0.8,-0.8,-4.2,-2.4,-10.9,-2.4s-10.1,1.6,-10.9,2.4c-0.8,0.8,-2.4,4.2,-2.4,10.9s1.6,10.1,2.4,10.9 c0.8,0.8,4.2,2.4,10.9,2.4s10.1,-1.6,10.9,-2.4c0.8,-0.8,2.4,-4.2,2.4,-10.9S35.6,14,34.9,13.2z"
- android:fillColor="#FFFFFF"/>
+ android:fillColor="#FF7E5BBF"
+ android:pathData="M32.0,12.5l0.0,28.0l12.0,-5.0l0.0,-28.0z"/>
<path
- android:pathData="M34.7,13.7c0,0.8,-1.2,1.5,-3.1,2.1c-1.9,0.5,-4.6,0.8,-7.6,0.8s-5.6,-0.3,-7.6,-0.8 c-1.9,-0.5,-3.1,-1.2,-3.1,-2.1s1.2,-1.5,3.1,-2.1c1.9,-0.5,4.6,-0.8,7.6,-0.8s5.6,0.3,7.6,0.8C33.5,12.1,34.7,12.9,34.7,13.7z"
- android:fillColor="#EBEBEB"/>
+ android:fillColor="#FF7E5BBF"
+ android:pathData="M4.0,40.5l12.0,-5.0l0.0,-11.0l-12.0,-12.0z"/>
<path
- android:pathData="M30,13c-0.1,0,-0.1,0,-0.2,0c-0.4,-0.1,-0.7,-0.6,-0.6,-1l1.3,-5.5c0.1,-0.4,0.6,-0.7,1,-0.6c0.4,0.1,0.7,0.6,0.6,1 l-1.3,5.5C30.7,12.7,30.4,13,30,13z"
- android:fillColor="#FFFFFF"/>
+ android:fillColor="#40000000"
+ android:pathData="M44.0,35.5l-12.0,-12.0l0.0,-4.0z"/>
<path
- android:pathData="M18,13c-0.4,0,-0.7,-0.3,-0.8,-0.6l-1.3,-5.5c-0.1,-0.4,0.2,-0.9,0.6,-1c0.4,-0.1,0.9,0.2,1,0.6l1.3,5.5 c0.1,0.4,-0.2,0.9,-0.6,1C18.1,13,18.1,13,18,13z"
- android:fillColor="#FFFFFF"/>
+ android:fillColor="#40000000"
+ android:pathData="M4.0,12.5l12.0,12.0l0.0,4.0z"/>
+ <path
+ android:fillColor="#FF55C4F5"
+ android:pathData="M32.0,23.5l-16.0,-16.0l-12.0,5.0l0.0,0.0l12.0,12.0l16.0,16.0l12.0,-5.0l0.0,0.0z"/>
</vector>
+
diff --git a/core/res/res/drawable-nodpi/stat_sys_adb.xml b/core/res/res/drawable-nodpi/stat_sys_adb.xml
index 8cc9961..5043cba 100644
--- a/core/res/res/drawable-nodpi/stat_sys_adb.xml
+++ b/core/res/res/drawable-nodpi/stat_sys_adb.xml
@@ -1,5 +1,5 @@
<!--
-Copyright (C) 2014 The Android Open Source Project
+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.
@@ -14,23 +14,23 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="24.0dp"
- android:height="24.0dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="48.0"
+ android:viewportHeight="48.0">
<path
- android:pathData="M8.4,5.3c-0.2,0.0 -0.4,-0.2 -0.5,-0.4L7.1,1.6C7.0,1.4 7.2,1.1 7.4,1.0C7.7,0.9 8.0,1.1 8.0,1.4l0.8,3.3c0.1,0.3 -0.1,0.5 -0.4,0.6C8.5,5.3 8.4,5.3 8.4,5.3z"
- android:fillColor="#FFFFFF"/>
+ android:fillColor="#A0FFFFFF"
+ android:pathData="M32.0,12.5l0.0,28.0l12.0,-5.0l0.0,-28.0z"/>
<path
- android:pathData="M15.6,5.3c0.0,0.0 -0.1,0.0 -0.1,0.0c-0.3,-0.1 -0.4,-0.3 -0.4,-0.6L16.0,1.4C16.0,1.1 16.3,0.9 16.6,1.0c0.3,0.1 0.4,0.3 0.4,0.6l-0.8,3.3C16.1,5.1 15.9,5.3 15.6,5.3z"
- android:fillColor="#FFFFFF"/>
+ android:fillColor="#A0FFFFFF"
+ android:pathData="M4.0,40.5l12.0,-5.0l0.0,-11.0l-12.0,-12.0z"/>
<path
- android:pathData="M18.6,5.4c-0.1,-0.1 -0.2,-0.1 -0.3,-0.2c0.2,0.2 0.3,0.3 0.3,0.5c0.0,0.9 -2.9,1.7 -6.6,1.7S5.4,6.7 5.4,5.7c0.0,-0.2 0.1,-0.3 0.3,-0.5C5.6,5.3 5.5,5.4 5.4,5.4C5.0,5.9 4.0,8.0 4.0,12.0s1.0,6.1 1.4,6.6C5.9,19.0 8.0,20.0 12.0,20.0s6.1,-1.0 6.6,-1.4C19.0,18.1 20.0,16.0 20.0,12.0S19.0,5.9 18.6,5.4zM8.0,13.0c-0.6,0.0 -1.0,-0.4 -1.0,-1.0c0.0,-0.6 0.4,-1.0 1.0,-1.0s1.0,0.4 1.0,1.0C9.0,12.6 8.6,13.0 8.0,13.0zM16.0,13.0c-0.6,0.0 -1.0,-0.4 -1.0,-1.0c0.0,-0.6 0.4,-1.0 1.0,-1.0s1.0,0.4 1.0,1.0C17.0,12.6 16.6,13.0 16.0,13.0z"
- android:fillColor="#FFFFFF"/>
- <path
- android:pathData="M5.35,5.7
- a 6.6 1.75 0 1 1 13.25 0
- a 6.6 1.75 0 1 1 -13.25 0
- z"
- android:fillColor="#BBFFFFFF" />
+ android:fillColor="#40000000"
+ android:pathData="M44.0,35.5l-12.0,-12.0l0.0,-4.0z"/>
+ <path
+ android:fillColor="#40000000"
+ android:pathData="M4.0,12.5l12.0,12.0l0.0,4.0z"/>
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M32.0,23.5l-16.0,-16.0l-12.0,5.0l0.0,0.0l12.0,12.0l16.0,16.0l12.0,-5.0l0.0,0.0z"/>
</vector>
diff --git a/core/res/res/layout/text_edit_suggestion_container_material.xml b/core/res/res/layout/text_edit_suggestion_container_material.xml
index 20a80489..15b18dd 100644
--- a/core/res/res/layout/text_edit_suggestion_container_material.xml
+++ b/core/res/res/layout/text_edit_suggestion_container_material.xml
@@ -31,7 +31,7 @@
android:showDividers="middle">
<ListView
android:id="@+id/suggestionContainer"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="8dp"
android:paddingBottom="0dp"
diff --git a/core/res/res/values-ldrtl-television/config.xml b/core/res/res/values-ldrtl-television/config.xml
new file mode 100644
index 0000000..e237acc
--- /dev/null
+++ b/core/res/res/values-ldrtl-television/config.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for TV products. Do not translate. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- Default bounds [left top right bottom] on screen for picture-in-picture windows. -->
+ <string translatable="false" name="config_defaultPictureInPictureBounds">"112 54 592 324"</string>
+
+</resources>
diff --git a/core/res/res/values-television/config.xml b/core/res/res/values-television/config.xml
index 0f98cfb..a3a3112 100644
--- a/core/res/res/values-television/config.xml
+++ b/core/res/res/values-television/config.xml
@@ -25,10 +25,14 @@
<bool name="config_defaultWindowFeatureOptionsPanel">false</bool>
<!-- Default bounds [left top right bottom] on screen for picture-in-picture windows. -->
- <string translatable="false" name="config_defaultPictureInPictureBounds">"1420 100 1820 325"</string>
+ <string translatable="false" name="config_defaultPictureInPictureBounds">"1328 54 1808 324"</string>
<!-- Bounds [left top right bottom] on screen for picture-in-picture (PIP) windows, when the PIP
is located in center. -->
- <string translatable="false" name="config_centeredPictureInPictureBounds">"600 331 1320 749"</string>
+ <string translatable="false" name="config_centeredPictureInPictureBounds">"596 280 1324 690"</string>
+
+ <!-- Bounds [left top right bottom] on screen for picture-in-picture (PIP) windows,
+ when the PIP is shown with Recents. -->
+ <string translatable="false" name="config_pictureInPictureBoundsInRecents">"1480 123 1760 303"</string>
</resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 2ab95412..7c02128 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -8048,12 +8048,19 @@
{@link android.media.tv.TvInputService#SERVICE_META_DATA} meta-data entry.
Described here are the attributes that can be included in that tag. -->
<declare-styleable name="TvInputService">
- <!-- Component name of an activity for setup of this service.
- The setup includes scanning channels and registering EPG data. -->
+ <!-- Component name of an activity that allows the user to set up this service. -->
<attr name="setupActivity" format="string" />
- <!-- Component name of an activity that allows the user to modify
- the settings for this service. -->
+ <!-- Component name of an activity that allows the user to modify the settings for this
+ service. -->
<attr name="settingsActivity" />
+ <!-- Attribute whether the TV input service can record programs. This value can be changed
+ at runtime by calling
+ {@link android.media.tv.TvInputService#updateTvInputInfo(android.content.Context, android.media.tv.TvInputInfo)}. -->
+ <attr name="canRecord" format="boolean" />
+ <!-- The number of tuners that the TV input service is associated with. This value can be
+ changed at runtime by calling
+ {@link android.media.tv.TvInputService#updateTvInputInfo(android.content.Context, android.media.tv.TvInputInfo)}. -->
+ <attr name="tunerCount" format="integer" />
</declare-styleable>
<!-- Attributes that can be used with <code>rating-system-definition</code> tags inside of the
@@ -8175,4 +8182,18 @@
<!-- The current color for the offset inside the gradient. -->
<attr name="color" />
</declare-styleable>
+
+ <!-- @hide Attributes which will be read by the Activity to intialize the
+ base activity TaskDescription. -->
+ <declare-styleable name="ActivityTaskDescription">
+ <!-- @hide From Theme.colorPrimary, used for the TaskDescription primary
+ color. -->
+ <attr name="colorPrimary" />
+ <!-- @hide From Theme.windowBackground, used for calculating the
+ TaskDescription background color. -->
+ <attr name="windowBackground" />
+ <!-- @hide From Theme.windowBackgroundFallback, used for calculating the
+ TaskDescription background color. -->
+ <attr name="windowBackgroundFallback" />
+ </declare-styleable>
</resources>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 54f9093..9552820 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2444,6 +2444,10 @@
is located in center. -->
<string translatable="false" name="config_centeredPictureInPictureBounds">"0 0 300 300"</string>
+ <!-- Bounds [left top right bottom] on screen for picture-in-picture (PIP) windows,
+ when the PIP is shown with Recents. -->
+ <string translatable="false" name="config_pictureInPictureBoundsInRecents">"0 0 100 100"</string>
+
<!-- Controls the snap mode for the docked stack divider
0 - 3 snap targets: left/top has 16:9 ratio, 1:1, and right/bottom has 16:9 ratio
1 - 3 snap targets: fixed ratio, 1:1, (1 - fixed ratio)
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index dbaa737..06e2248 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2703,6 +2703,8 @@
<public type="attr" name="version" />
<public type="attr" name="backupInForeground" />
<public type="attr" name="countDown" />
+ <public type="attr" name="canRecord" />
+ <public type="attr" name="tunerCount" />
<public type="style" name="Theme.Material.Light.DialogWhenLarge.DarkActionBar" />
<public type="style" name="Widget.Material.SeekBar.Discrete" />
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 70bed2d..7b11302 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -4014,8 +4014,8 @@
<string name="lock_to_app_unlock_password">Ask for password before unpinning</string>
<!-- Multi-Window strings -->
- <!-- Warning message when a non-resizeble tasks is docked whose display windows are cropped. -->
- <string name="dock_cropped_windows_text">App is not resizeable, scroll it with two fingers.</string>
+ <!-- Warning message when an app that got forced to be resizable gets shown in split-screen -->
+ <string name="dock_forced_resizable">App may not work with split-screen.</string>
<!-- Warning message when we try to dock a non-resizeble tasks and launch it in fullscreen instead. -->
<string name="dock_non_resizeble_failed_to_dock_text">App does not support split-screen.</string>
@@ -4171,7 +4171,7 @@
<!-- Locale picker strings -->
<!-- Title for the language selection screen [CHAR LIMIT=25] -->
- <string name="language_selection_title">Language preference</string>
+ <string name="language_selection_title">Add a language</string>
<!-- Title for the region selection screen [CHAR LIMIT=25] -->
<string name="country_selection_title">Region preference</string>
<!-- Hint text in a search edit box (used to filter long language / country lists) [CHAR LIMIT=25] -->
diff --git a/core/res/res/values/styles_holo.xml b/core/res/res/values/styles_holo.xml
index 6c69141..fdf9e31 100644
--- a/core/res/res/values/styles_holo.xml
+++ b/core/res/res/values/styles_holo.xml
@@ -1175,7 +1175,6 @@
<style name="Widget.Holo.SuggestionItem" parent="TextAppearance.Holo.Medium">
<item name="background">@color/white</item>
<item name="drawablePadding">8dip</item>
- <item name="ellipsize">marquee</item>
<item name="gravity">start|center_vertical</item>
<item name="layout_gravity">start|center_vertical</item>
<item name="layout_height">wrap_content</item>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index f791ce6..ff247b5 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -306,6 +306,7 @@
<java-symbol type="bool" name="config_guestUserEphemeral" />
<java-symbol type="string" name="config_defaultPictureInPictureBounds" />
<java-symbol type="string" name="config_centeredPictureInPictureBounds" />
+ <java-symbol type="string" name="config_pictureInPictureBoundsInRecents" />
<java-symbol type="integer" name="config_wifi_framework_5GHz_preference_boost_threshold" />
<java-symbol type="integer" name="config_wifi_framework_5GHz_preference_boost_factor" />
<java-symbol type="integer" name="config_wifi_framework_5GHz_preference_penalty_threshold" />
@@ -609,7 +610,7 @@
<java-symbol type="string" name="display_manager_overlay_display_name" />
<java-symbol type="string" name="display_manager_overlay_display_secure_suffix" />
<java-symbol type="string" name="display_manager_overlay_display_title" />
- <java-symbol type="string" name="dock_cropped_windows_text" />
+ <java-symbol type="string" name="dock_forced_resizable" />
<java-symbol type="string" name="dock_non_resizeble_failed_to_dock_text" />
<java-symbol type="string" name="double_tap_toast" />
<java-symbol type="string" name="durationDays" />
diff --git a/core/tests/coretests/src/com/android/internal/inputmethod/InputMethodUtilsTest.java b/core/tests/coretests/src/com/android/internal/inputmethod/InputMethodUtilsTest.java
index f962a43..ac020e4 100644
--- a/core/tests/coretests/src/com/android/internal/inputmethod/InputMethodUtilsTest.java
+++ b/core/tests/coretests/src/com/android/internal/inputmethod/InputMethodUtilsTest.java
@@ -21,6 +21,7 @@
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.content.res.Configuration;
+import android.content.res.Resources;
import android.os.Parcel;
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.SmallTest;
@@ -36,6 +37,10 @@
import java.util.Locale;
import java.util.Objects;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.isIn;
+import static org.hamcrest.Matchers.not;
+
public class InputMethodUtilsTest extends InstrumentationTestCase {
private static final boolean IS_AUX = true;
private static final boolean IS_DEFAULT = true;
@@ -186,6 +191,9 @@
final InputMethodSubtype nonAutoEnGB = createDummyInputMethodSubtype("en_GB",
SUBTYPE_MODE_KEYBOARD, !IS_AUX, !IS_OVERRIDES_IMPLICITLY_ENABLED_SUBTYPE,
IS_ASCII_CAPABLE, IS_ENABLED_WHEN_DEFAULT_IS_NOT_ASCII_CAPABLE);
+ final InputMethodSubtype nonAutoEnIN = createDummyInputMethodSubtype("en_IN",
+ SUBTYPE_MODE_KEYBOARD, !IS_AUX, !IS_OVERRIDES_IMPLICITLY_ENABLED_SUBTYPE,
+ IS_ASCII_CAPABLE, IS_ENABLED_WHEN_DEFAULT_IS_NOT_ASCII_CAPABLE);
final InputMethodSubtype nonAutoFrCA = createDummyInputMethodSubtype("fr_CA",
SUBTYPE_MODE_KEYBOARD, !IS_AUX, !IS_OVERRIDES_IMPLICITLY_ENABLED_SUBTYPE,
IS_ASCII_CAPABLE, IS_ENABLED_WHEN_DEFAULT_IS_NOT_ASCII_CAPABLE);
@@ -233,9 +241,7 @@
subtypes);
final ArrayList<InputMethodSubtype> result =
InputMethodUtils.getImplicitlyApplicableSubtypesLocked(
- createTargetContextWithLocales(new LocaleList(LOCALE_EN_US))
- .getResources(),
- imi);
+ getResourcesForLocales(LOCALE_EN_US), imi);
assertEquals(1, result.size());
verifyEquality(autoSubtype, result.get(0));
}
@@ -257,9 +263,7 @@
subtypes);
final ArrayList<InputMethodSubtype> result =
InputMethodUtils.getImplicitlyApplicableSubtypesLocked(
- createTargetContextWithLocales(new LocaleList(LOCALE_EN_US))
- .getResources(),
- imi);
+ getResourcesForLocales(LOCALE_EN_US), imi);
verifyEquality(nonAutoEnUS, result.get(0));
}
@@ -279,9 +283,7 @@
subtypes);
final ArrayList<InputMethodSubtype> result =
InputMethodUtils.getImplicitlyApplicableSubtypesLocked(
- createTargetContextWithLocales(new LocaleList(LOCALE_EN_GB))
- .getResources(),
- imi);
+ getResourcesForLocales(LOCALE_EN_GB), imi);
assertEquals(1, result.size());
verifyEquality(nonAutoEnGB, result.get(0));
}
@@ -303,9 +305,7 @@
subtypes);
final ArrayList<InputMethodSubtype> result =
InputMethodUtils.getImplicitlyApplicableSubtypesLocked(
- createTargetContextWithLocales(new LocaleList(LOCALE_FR))
- .getResources(),
- imi);
+ getResourcesForLocales(LOCALE_FR), imi);
assertEquals(1, result.size());
verifyEquality(nonAutoFrCA, result.get(0));
}
@@ -323,9 +323,7 @@
subtypes);
final ArrayList<InputMethodSubtype> result =
InputMethodUtils.getImplicitlyApplicableSubtypesLocked(
- createTargetContextWithLocales(new LocaleList(LOCALE_FR_CA))
- .getResources(),
- imi);
+ getResourcesForLocales(LOCALE_FR_CA), imi);
assertEquals(1, result.size());
verifyEquality(nonAutoFrCA, result.get(0));
}
@@ -344,9 +342,7 @@
subtypes);
final ArrayList<InputMethodSubtype> result =
InputMethodUtils.getImplicitlyApplicableSubtypesLocked(
- createTargetContextWithLocales(new LocaleList(LOCALE_JA_JP))
- .getResources(),
- imi);
+ getResourcesForLocales(LOCALE_JA_JP), imi);
assertEquals(3, result.size());
verifyEquality(nonAutoJa, result.get(0));
verifyEquality(nonAutoEnabledWhenDefaultIsNotAsciiCalableSubtype, result.get(1));
@@ -364,9 +360,7 @@
subtypes);
final ArrayList<InputMethodSubtype> result =
InputMethodUtils.getImplicitlyApplicableSubtypesLocked(
- createTargetContextWithLocales(new LocaleList(LOCALE_FIL_PH))
- .getResources(),
- imi);
+ getResourcesForLocales(LOCALE_FIL_PH), imi);
assertEquals(1, result.size());
verifyEquality(nonAutoFil, result.get(0));
}
@@ -384,9 +378,7 @@
subtypes);
final ArrayList<InputMethodSubtype> result =
InputMethodUtils.getImplicitlyApplicableSubtypesLocked(
- createTargetContextWithLocales(new LocaleList(LOCALE_FI))
- .getResources(),
- imi);
+ getResourcesForLocales(LOCALE_FI), imi);
assertEquals(1, result.size());
verifyEquality(nonAutoJa, result.get(0));
}
@@ -402,9 +394,7 @@
subtypes);
final ArrayList<InputMethodSubtype> result =
InputMethodUtils.getImplicitlyApplicableSubtypesLocked(
- createTargetContextWithLocales(new LocaleList(LOCALE_IN))
- .getResources(),
- imi);
+ getResourcesForLocales(LOCALE_IN), imi);
assertEquals(1, result.size());
verifyEquality(nonAutoIn, result.get(0));
}
@@ -418,9 +408,7 @@
subtypes);
final ArrayList<InputMethodSubtype> result =
InputMethodUtils.getImplicitlyApplicableSubtypesLocked(
- createTargetContextWithLocales(new LocaleList(LOCALE_ID))
- .getResources(),
- imi);
+ getResourcesForLocales(LOCALE_ID), imi);
assertEquals(1, result.size());
verifyEquality(nonAutoIn, result.get(0));
}
@@ -434,9 +422,7 @@
subtypes);
final ArrayList<InputMethodSubtype> result =
InputMethodUtils.getImplicitlyApplicableSubtypesLocked(
- createTargetContextWithLocales(new LocaleList(LOCALE_IN))
- .getResources(),
- imi);
+ getResourcesForLocales(LOCALE_IN), imi);
assertEquals(1, result.size());
verifyEquality(nonAutoId, result.get(0));
}
@@ -450,12 +436,36 @@
subtypes);
final ArrayList<InputMethodSubtype> result =
InputMethodUtils.getImplicitlyApplicableSubtypesLocked(
- createTargetContextWithLocales(new LocaleList(LOCALE_ID))
- .getResources(),
- imi);
+ getResourcesForLocales(LOCALE_ID), imi);
assertEquals(1, result.size());
verifyEquality(nonAutoId, result.get(0));
}
+
+ // If there is no automatic subtype (overridesImplicitlyEnabledSubtype:true) and the system
+ // provides multiple locales, we try to enable multiple subtypes.
+ {
+ final ArrayList<InputMethodSubtype> subtypes = new ArrayList<>();
+ subtypes.add(nonAutoEnUS);
+ subtypes.add(nonAutoFrCA);
+ subtypes.add(nonAutoIn);
+ subtypes.add(nonAutoJa);
+ subtypes.add(nonAutoFil);
+ subtypes.add(nonAutoEnabledWhenDefaultIsNotAsciiCalableSubtype);
+ subtypes.add(nonAutoEnabledWhenDefaultIsNotAsciiCalableSubtype2);
+ final InputMethodInfo imi = createDummyInputMethodInfo(
+ "com.android.apps.inputmethod.latin",
+ "com.android.apps.inputmethod.latin", "DummyLatinIme", !IS_AUX, IS_DEFAULT,
+ subtypes);
+ final ArrayList<InputMethodSubtype> result =
+ InputMethodUtils.getImplicitlyApplicableSubtypesLocked(
+ getResourcesForLocales(LOCALE_FR, LOCALE_EN_US, LOCALE_JA_JP), imi);
+ assertThat(nonAutoFrCA, isIn(result));
+ assertThat(nonAutoEnUS, isIn(result));
+ assertThat(nonAutoJa, isIn(result));
+ assertThat(nonAutoIn, not(isIn(result)));
+ assertThat(nonAutoEnabledWhenDefaultIsNotAsciiCalableSubtype, not(isIn(result)));
+ assertThat(nonAutoEnabledWhenDefaultIsNotAsciiCalableSubtype, not(isIn(result)));
+ }
}
@SmallTest
@@ -638,6 +648,10 @@
.createConfigurationContext(resourceConfiguration);
}
+ private Resources getResourcesForLocales(Locale... locales) {
+ return createTargetContextWithLocales(new LocaleList(locales)).getResources();
+ }
+
private String[] getPackageNames(final ArrayList<InputMethodInfo> imis) {
final String[] packageNames = new String[imis.size()];
for (int i = 0; i < imis.size(); ++i) {
diff --git a/core/tests/coretests/src/com/android/internal/inputmethod/LocaleUtilsTest.java b/core/tests/coretests/src/com/android/internal/inputmethod/LocaleUtilsTest.java
new file mode 100644
index 0000000..b9c2da7
--- /dev/null
+++ b/core/tests/coretests/src/com/android/internal/inputmethod/LocaleUtilsTest.java
@@ -0,0 +1,194 @@
+/*
+ * 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.internal.inputmethod;
+
+import android.test.InstrumentationTestCase;
+import android.test.suitebuilder.annotation.SmallTest;
+import android.util.LocaleList;
+
+import java.util.ArrayList;
+import java.util.Locale;
+
+public class LocaleUtilsTest extends InstrumentationTestCase {
+
+ private static final LocaleUtils.LocaleExtractor<Locale> sIdentityMapper =
+ new LocaleUtils.LocaleExtractor<Locale>() {
+ @Override
+ public Locale get(Locale source) {
+ return source;
+ }
+ };
+
+ @SmallTest
+ public void testFilterByLanguageEmptyLanguageList() throws Exception {
+ final ArrayList<Locale> availableLocales = new ArrayList<>();
+ availableLocales.add(Locale.forLanguageTag("en-US"));
+ availableLocales.add(Locale.forLanguageTag("fr-CA"));
+ availableLocales.add(Locale.forLanguageTag("in"));
+ availableLocales.add(Locale.forLanguageTag("ja"));
+ availableLocales.add(Locale.forLanguageTag("fil"));
+
+ final LocaleList preferredLocales = LocaleList.getEmptyLocaleList();
+
+ final ArrayList<Locale> dest = new ArrayList<>();
+ LocaleUtils.filterByLanguage(availableLocales, sIdentityMapper, preferredLocales, dest);
+ assertEquals(0, dest.size());
+ }
+
+ @SmallTest
+ public void testFilterByLanguageEmptySource() throws Exception {
+ final ArrayList<Locale> availableLocales = new ArrayList<>();
+
+ final LocaleList preferredLocales = LocaleList.forLanguageTags("fr,en-US,ja-JP");
+
+ final ArrayList<Locale> dest = new ArrayList<>();
+ LocaleUtils.filterByLanguage(availableLocales, sIdentityMapper, preferredLocales, dest);
+ assertEquals(0, dest.size());
+ }
+
+ @SmallTest
+ public void testFilterByLanguageNullAvailableLocales() throws Exception {
+ {
+ final LocaleList preferredLocales =
+ LocaleList.forLanguageTags("en-AU,en-GB,en-US,en,en-IN");
+ final ArrayList<Locale> availableLocales = new ArrayList<>();
+ availableLocales.add(null);
+ final ArrayList<Locale> dest = new ArrayList<>();
+ LocaleUtils.filterByLanguage(availableLocales, sIdentityMapper, preferredLocales, dest);
+ assertEquals(0, dest.size());
+ }
+ {
+ final LocaleList preferredLocales =
+ LocaleList.forLanguageTags("en-AU,en-GB,en-US,en,en-IN");
+ final ArrayList<Locale> availableLocales = new ArrayList<>();
+ availableLocales.add(null);
+ availableLocales.add(null);
+ availableLocales.add(null);
+ final ArrayList<Locale> dest = new ArrayList<>();
+ LocaleUtils.filterByLanguage(availableLocales, sIdentityMapper, preferredLocales, dest);
+ assertEquals(0, dest.size());
+ }
+ {
+ final LocaleList preferredLocales =
+ LocaleList.forLanguageTags("en-AU,en-GB,en-US,en,en-IN");
+ final ArrayList<Locale> availableLocales = new ArrayList<>();
+ availableLocales.add(null);
+ availableLocales.add(Locale.forLanguageTag("en-US"));
+ availableLocales.add(null);
+ availableLocales.add(null);
+ final ArrayList<Locale> dest = new ArrayList<>();
+ LocaleUtils.filterByLanguage(availableLocales, sIdentityMapper, preferredLocales, dest);
+ assertEquals(1, dest.size());
+ assertEquals(availableLocales.get(1), dest.get(0)); // "en-US"
+ }
+ {
+ final LocaleList preferredLocales =
+ LocaleList.forLanguageTags("en-AU,en-GB,en-US,en,en-IN");
+ final ArrayList<Locale> availableLocales = new ArrayList<>();
+ availableLocales.add(null);
+ availableLocales.add(Locale.forLanguageTag("en"));
+ availableLocales.add(null);
+ availableLocales.add(null);
+ final ArrayList<Locale> dest = new ArrayList<>();
+ LocaleUtils.filterByLanguage(availableLocales, sIdentityMapper, preferredLocales, dest);
+ assertEquals(1, dest.size());
+ assertEquals(availableLocales.get(1), dest.get(0)); // "en"
+ }
+ {
+ final LocaleList preferredLocales =
+ LocaleList.forLanguageTags("en-AU,en-GB,en-US,en,en-IN");
+ final ArrayList<Locale> availableLocales = new ArrayList<>();
+ availableLocales.add(null);
+ availableLocales.add(Locale.forLanguageTag("ja-JP"));
+ availableLocales.add(null);
+ availableLocales.add(null);
+ final ArrayList<Locale> dest = new ArrayList<>();
+ LocaleUtils.filterByLanguage(availableLocales, sIdentityMapper, preferredLocales, dest);
+ assertEquals(0, dest.size());
+ }
+ }
+
+ @SmallTest
+ public void testFilterByLanguage() throws Exception {
+ final ArrayList<Locale> availableLocales = new ArrayList<>();
+ availableLocales.add(Locale.forLanguageTag("en-US"));
+ availableLocales.add(Locale.forLanguageTag("fr-CA"));
+ availableLocales.add(Locale.forLanguageTag("in"));
+ availableLocales.add(Locale.forLanguageTag("ja"));
+ availableLocales.add(Locale.forLanguageTag("fil"));
+
+ final LocaleList preferredLocales = LocaleList.forLanguageTags("fr,en-US,ja-JP");
+
+ final ArrayList<Locale> dest = new ArrayList<>();
+ LocaleUtils.filterByLanguage(availableLocales, sIdentityMapper, preferredLocales, dest);
+ assertEquals(3, dest.size());
+ assertEquals(availableLocales.get(1), dest.get(0)); // "fr-CA"
+ assertEquals(availableLocales.get(0), dest.get(1)); // "en-US"
+ assertEquals(availableLocales.get(3), dest.get(2)); // "ja"
+ }
+
+ @SmallTest
+ public void testFilterByLanguageTheSameLanguage() throws Exception {
+ {
+ final LocaleList preferredLocales =
+ LocaleList.forLanguageTags("en-AU,en-GB,en-US,en,en-IN");
+ final ArrayList<Locale> availableLocales = new ArrayList<>();
+ availableLocales.add(Locale.forLanguageTag("fr-CA"));
+ availableLocales.add(Locale.forLanguageTag("en-US"));
+ final ArrayList<Locale> dest = new ArrayList<>();
+ LocaleUtils.filterByLanguage(availableLocales, sIdentityMapper, preferredLocales, dest);
+ assertEquals(1, dest.size());
+ assertEquals(availableLocales.get(1), dest.get(0)); // "en-US"
+ }
+ {
+ final LocaleList preferredLocales =
+ LocaleList.forLanguageTags("en-AU,en-GB,en-US,en,en-IN");
+ final ArrayList<Locale> availableLocales = new ArrayList<>();
+ availableLocales.add(Locale.forLanguageTag("fr-CA"));
+ availableLocales.add(Locale.forLanguageTag("en"));
+ final ArrayList<Locale> dest = new ArrayList<>();
+ LocaleUtils.filterByLanguage(availableLocales, sIdentityMapper, preferredLocales, dest);
+ assertEquals(1, dest.size());
+ assertEquals(availableLocales.get(1), dest.get(0)); // "en"
+ }
+ {
+ final LocaleList preferredLocales =
+ LocaleList.forLanguageTags("en-AU,en-GB,en-US,en,en-IN");
+ final ArrayList<Locale> availableLocales = new ArrayList<>();
+ availableLocales.add(Locale.forLanguageTag("fr-CA"));
+ availableLocales.add(Locale.forLanguageTag("en-CA"));
+ availableLocales.add(Locale.forLanguageTag("en-IN"));
+ final ArrayList<Locale> dest = new ArrayList<>();
+ LocaleUtils.filterByLanguage(availableLocales, sIdentityMapper, preferredLocales, dest);
+ assertEquals(1, dest.size());
+ assertEquals(availableLocales.get(2), dest.get(0)); // "en-IN"
+ }
+ {
+ final LocaleList preferredLocales =
+ LocaleList.forLanguageTags("en-AU,en-GB,en-US,en-IN");
+ final ArrayList<Locale> availableLocales = new ArrayList<>();
+ availableLocales.add(Locale.forLanguageTag("fr-CA"));
+ availableLocales.add(Locale.forLanguageTag("en-CA"));
+ availableLocales.add(Locale.forLanguageTag("en-NZ"));
+ availableLocales.add(Locale.forLanguageTag("en-BZ"));
+ final ArrayList<Locale> dest = new ArrayList<>();
+ LocaleUtils.filterByLanguage(availableLocales, sIdentityMapper, preferredLocales, dest);
+ assertEquals(1, dest.size());
+ assertEquals(availableLocales.get(1), dest.get(0)); // "en-CA"
+ }
+ }
+}
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index f3f2e5e..e99c15a 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -631,6 +631,16 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>guide/topics/security/index.html">
+ <span class="en">Security</span>
+ </a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>guide/topics/security/security-config.html">
+ <span class="en">Network Security Config</span>
+ </a></li>
+ </ul>
+ </li>
</ul>
diff --git a/docs/html/guide/topics/security/index.jd b/docs/html/guide/topics/security/index.jd
new file mode 100644
index 0000000..22fb775
--- /dev/null
+++ b/docs/html/guide/topics/security/index.jd
@@ -0,0 +1,7 @@
+page.title=Security
+page.landing=true
+page.landing.intro=Configure the security of your application.
+
+@jd:body
+<div class="landing-docs">
+</div>
diff --git a/docs/html/guide/topics/security/security-config.jd b/docs/html/guide/topics/security/security-config.jd
new file mode 100644
index 0000000..4cee253
--- /dev/null
+++ b/docs/html/guide/topics/security/security-config.jd
@@ -0,0 +1,539 @@
+page.title=Network Security Config
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+<ol>
+<li><a href="#SupportedFeatures">Features</a></li>
+<li><a href="#Examples">Examples</a>
+ <ol>
+ <li><a href="#TrustingCustomCas">Trusting Custom CAs</a>
+ <ol>
+ <li><a href="#TrustingACustomCa">Trusting a Custom CA</a></li>
+ <li><a href="#LimitingCas">Limiting the Set of Trusted CAs</a></li>
+ <li><a href="#TrustingAdditionalCas">Trusting Additional CAs</a></li>
+ </ol>
+ </li>
+ <li><a href="#TrustingDebugCa">Debugging-only CAs</a></li>
+ <li><a href="#UsesCleartextTraffic">Cleartext Traffic Opt-Out</a></li>
+ <li><a href="#CertificatePinning">Certificate Pinning</a></li>
+ <li><a href="#ConfigInheritance">Configuration Inheritance</a></li>
+ </ol>
+</li>
+<li><a href="#FileFormat">Configuration File Format</a></li>
+</ol>
+</div>
+</div>
+
+<p>The Android Network Security Config lets apps customize their network security settings
+in a safe, declarative configuration file without modifying application code.
+These settings can be configured for specific domains and app-wide.</p>
+
+<h2 id="SupportedFeatures">Features</h2>
+<ul>
+<li><b>Custom trust anchors.</b> Lets an application customize which Certificate Authorities (CA) are trusted
+for its secure connections. For example, trusting particular self-signed certificates or restricting the set of public
+CAs that the app trusts.
+</li>
+<li><b>Debug-only overrides.</b> Lets an application developer safely debug secure connections of their
+application without added risk to the installed base.
+</li>
+<li><b>Cleartext traffic opt-out.</b> Lets an application protect itself from accidental usage of cleartext traffic.</li>
+<li><b>Certificate pinning.</b> An advanced feature that lets an application restrict pin its secure connection
+to particular certificates.</li>
+</ul>
+
+<h2 id="Examples">Examples</h2>
+<h3 id="TrustingCustomCas">Trusting Custom CAs</h3>
+<p>An application may want to trust a custom set of CAs instead of the platform
+default. The most common reasons of this are:
+<ul>
+<li>Connecting to a host with a custom certificate authority(self-signed, issued by an internal corporate CA, etc).</li>
+<li>Limiting the set of CAs to only the CAs you trust instead of every preinstalled CA.</li>
+<li>Trusting additional CAs not included in the system.</li>
+</ul>
+</p>
+<p>By default secure (e.g. TLS, HTTPS) connections from all applications trust the pre-installed system CAs, and
+applications targeting API level 23 (Android M) and below also trust the user-added CA store by default.
+An application can customize its own connections using {@code base-config} (for app-wide customization) or
+{@code domain-config} (for per-domain customization).</p>
+
+<h4 id="TrustingACustomCa">Trusting a Custom CA</h4>
+<p>Assume you want to connect to your host which uses a self-signed SSL certificate or to
+a host whose SSL certificate is issued by a non-public CA which you trust, e.g., your company's internal
+CA.</p>
+<p>
+<code>res/xml/network_security_config.xml</code>:
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <domain-config>
+ <domain includeSubdomains="true">example.com</domain>
+ <trust-anchors>
+ <certificates src="@raw/my_ca"/>
+ </trust-anchors>
+ </domain-config>
+</network-security-config>
+</pre>
+</p>
+<p>Add the self-signed or non-public CA certificate, in PEM or DER format, to {@code res/raw/my_ca}.</p>
+<p>
+In <code>AndroidManifest.xml</code> reference the above config
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+...
+<application ...>
+ <meta-data android:name="android.security.net.config"
+ android:resource="@xml/network_security_config" />
+ ...
+</pre>
+</p>
+<h4 id="LimitingCas">Limiting the Set of Trusted CAs</h4>
+<p>An application that does not want to trust all CAs trusted by system can instead specify its own
+reduced set of CAs to trust. This protects the application from fradulent certificates issued by any
+of the other CAs.</p>
+
+<p>The config to limit the set of trusted CAs is similar to <a href="#TrustingACustomCa">trusting a custom CA</a>
+for a specific domain except that multiple CAs are provided in the resource.</p>
+
+<p>
+<code>res/xml/network_security_config.xml</code>:
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <domain-config>
+ <domain includeSubdomains="true">secure.example.com</domain>
+ <domain includeSubdomains="true">cdn.example.com</domain>
+ <trust-anchors>
+ <certificates src="@raw/trusted_roots"/>
+ </trust-anchors>
+ </domain-config>
+</network-security-config>
+</pre>
+</p>
+<p>Add the trusted CAs, in PEM or DER format, to {@code res/raw/trusted_roots}.
+Note that if using PEM format the file must contain <em>only</em> PEM data and no extra text.
+You can also provide multiple <a href="certificates"><code><certificates></code></a> elements instead
+of one.</p>
+<p>
+In <code>AndroidManifest.xml</code> reference the above config
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+...
+<application ...>
+ <meta-data android:name="android.security.net.config"
+ android:resource="@xml/network_security_config" />
+ ...
+</pre>
+</p>
+
+<h4 id="TrustingAdditionalCas">Trusting Additional CAs</h4>
+<p>An application may want to trust additional CAs not trusted by the system, this could be due to
+the system not yet including the CA or a CA that does not meet the requirements for inclusion into
+the Android system. An application can do this by specifying multiple certificate sources for a configuration.
+</p>
+<p>
+<code>res/xml/network_security_config.xml</code>:
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <base-config>
+ <trust-anchors>
+ <certificates src="@raw/extracas"/>
+ <certificates src="system"/>
+ </trust-anchors>
+ </base-config>
+</network-security-config>
+</pre>
+</p>
+<p>
+In <code>AndroidManifest.xml</code> reference the above config
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+...
+<application ...>
+ <meta-data android:name="android.security.net.config"
+ android:resource="@xml/network_security_config" />
+ ...
+</pre>
+</p>
+
+<h3 id="TrustingDebugCa">Debugging-only CAs</h3>
+<p>When debugging an application that connects over HTTPS you may want to connect to a local development
+server, which does not have the SSL certificate for your production server. In order to support this
+without any modification to your application's code you can specify debug-only CAs that are
+<i>only</i> trusted when <a href="{@docRoot}guide/topics/manifest/application-element.html#debug">android:debuggable</a>
+is {@code true} by using {@code debug-overrides}. Normally IDEs and build tools set this flag automatically for non-release builds.</p>
+<p>This is safer than the usual conditional code because, as a security precaution, application stores
+do not accept applications which are marked debuggable.</p>
+
+<p>
+<code>res/xml/network_security_config.xml</code>:
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <debug-overrides>
+ <trust-anchors>
+ <certificates src="@raw/debug_cas"/>
+ </trust-anchors>
+ </debug-overrides>
+</network-security-config>
+</pre>
+</p>
+<p>
+In <code>AndroidManifest.xml</code> reference the above config
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+...
+<application ...>
+ <meta-data android:name="android.security.net.config"
+ android:resource="@xml/network_security_config" />
+ ...
+</pre>
+</p>
+
+<h3 id="UsesCleartextTraffic">Cleartext Traffic Opt-Out</h3>
+<p>Applications which intend to connect to destinations using only secure connections can opt-out
+of supporting cleartext (i.e. plain HTTP instead of HTTPS) to those destinations. This helps prevent
+accidental regressions in applications due to changes in URLs provided by external sources such as
+backend servers.</p>
+<p>See {a href="{@docRoot}reference/android/security/NetworkSecurityPolicy.html#isCleartextTrafficPermitted()} for more details.</p>
+
+<p>For example, an application may want to ensure that all connections to {@code secure.example.com} are always
+done over HTTPS to protect sensitive traffic from hostile networks.</p>
+
+<p>
+<code>res/xml/network_security_config.xml</code>:
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <domain-config usesCleartextTraffic="false">
+ <domain includeSubdomains="true">secure.example.com</domain>
+ </domain-config>
+</network-security-config>
+</pre>
+</p>
+<p>
+In <code>AndroidManifest.xml</code> reference the above config
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+...
+<application ...>
+ <meta-data android:name="android.security.net.config"
+ android:resource="@xml/network_security_config" />
+ ...
+</pre>
+</p>
+
+<h3 id="CertificatePinning">Certificate Pinning</h3>
+<p>Normally an application trusts all preinstalled CAs. If any of these CAs were to issue a fradulent certificate
+the application would be at risk from a MiTM attack. Some applications choose to limit the set of
+certificates they accept by either limiting the set of CAs they trust or by certificate pinning.</p>
+
+<p>Certificate pinning is done by providing a set of certificates by hash of the public key (SubjectPublicKeyInfo
+of the X.509 certificate). A certificate chain is then only valid if the certificate chain contains at least
+one of the pinned public keys.</p>
+
+<p>Note that when using certificate pinning you should always include a backup key so that if you
+are forced to switch to new keys, or change CAs (when pinning to a CA certificate or an intermediate of that CA),
+your application's connectivity is unaffected. Otherwise you will have to push out an update to the
+application to restore connectivity.</p>
+
+<p>Additionally it is possible to set an expiration time for pins after which pinning will not be
+performed. This helps prevent connectivity issues in applications which have not been updated.
+However, setting an expiration time on pins may enable pinning bypass.
+</p>
+
+<p>
+<code>res/xml/network_security_config.xml</code>:
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <domain-config>
+ <domain includeSubdomains="true">example.com</domain>
+ <pin-set expiration="2018-01-01">
+ <pin digest="SHA-256">7HIpactkIAq2Y49orFOOQKurWxmmSFZhBCoQYcRhJ3Y=</pin>
+ <!-- backup pin -->
+ <pin digest="SHA-256">fwza0LRMXouZHRC8Ei+4PyuldPDcf3UKgO/04cDM1oE=</pin>
+ </domain-config>
+</network-security-config>
+</pre>
+</p>
+<p>
+In <code>AndroidManifest.xml</code> reference the above config
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+...
+<application ...>
+ <meta-data android:name="android.security.net.config"
+ android:resource="@xml/network_security_config" />
+ ...
+</pre>
+</p>
+
+<h3 id="ConfigInheritance">Configuration Inheritance</h3>
+<p>Values not set in a specific config will be inherited.
+This allows more complex configurations while keeping the configuration file readable.</p>
+
+<p>If a value is not set in a specific entry then value from the next more general entry will be used.
+Values not set in a {@code domain-config} will be taken from the parent {@code domain-config}, if nested, or
+from the {@code base-config} if not. Values not set in the {@code base-config} will use
+the platform default values.
+
+<p>For example consider, where all connections to subdomains of {@code example.com}
+must use a custom set of CAs. Additonally cleartext traffic to these domains is permitted
+<em>except</em> when connecting to {@code secure.example.com}. By nesting the configuration
+for {@code secure.example.com} inside the configuration for {@code example.com} the
+{@code trust-anchors} does not need to be duplicated.</p>
+
+<p>
+<code>res/xml/network_security_config.xml</code>:
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <domain-config>
+ <domain includeSubdomains="true">example.com</domain>
+ <trust-anchors>
+ <certificates src="@raw/my_ca"/>
+ </trust-anchors>
+ <domain-config cleartextTrafficPermitted="false">
+ <domain includeSubdomains="true">secure.example.com</domain>
+ </domain-config>
+ </domain-config>
+</network-security-config>
+</pre>
+</p>
+<p>
+In <code>AndroidManifest.xml</code> reference the above config
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+...
+<application ...>
+ <meta-data android:name="android.security.net.config"
+ android:resource="@xml/network_security_config" />
+ ...
+</pre>
+</p>
+
+<h2 id="FileFormat">Configuration File Format</h2>
+<p>The configuration file is XML. Here is what it can contain:</p>
+</p>
+<pre>
+<?xml version="1.0" encoding="utf-8"?>
+<network-security-config>
+ <base-config>
+ <trust-anchors>
+ <certificates src="..."/>
+ ...
+ </trust-anchors>
+ </base-config>
+
+ <domain-config>
+ <domain>android.com</domain>
+ ...
+ <trust-anchors>
+ <certificates src="..."/>
+ ...
+ </trust-anchors>
+ <pin-set>
+ <pin digest="...">...</pin>
+ ...
+ </pin-set>
+ </domain-config>
+ ...
+ <debug-overrides>
+ <trust-anchors>
+ <certificates src="..."/>
+ ...
+ </trust-anchors>
+ </debug-overrides>
+</network-security-config>
+</pre>
+
+<h3 id="network-security-config"><network-security-config></h3>
+<dl class="xml">
+<dt>can contain:</dt>
+<dd>0 or 1 <code><a href="#base-config"><base-config></a></code>
+<br/>Any number of <code><a href="#domain-config"><domain-config></a></code>
+<br/>0 or 1<code><a href="#debug-overrides"><debug-overrides></a></code>
+</dd>
+</dl>
+
+
+<h3 id="base-config"><base-config></h3>
+<dl class="xml">
+<dt>syntax:</dt>
+<dd><pre class="stx"><base-config <a href="#usesCleartextTraffic">usesCleartextTraffic</a>=["true" | "false"]>
+ ...
+</base-config></pre></dd>
+<dt>can contain:</dt>
+<dd><code><a href="#trust-anchors"><trust-anchors></a></code></dd>
+<dt>descrption:</dt>
+<dd>
+The default configuration used by all connections whose destination is not covered by a
+<a href="#domain-config"><code>domain-config</code></a>.
+
+<p>Any values that are not set will use the platform default values.
+The default configuration for applications targeting above API level 24 and above:
+<pre>
+<base-config usesCleartextTraffic="true">
+ <trust-anchors>
+ <certificates src="system" />
+ </trust-anchors>
+</base-config>
+</pre>
+The default configuration for applications targeting API level 23 and below is:
+<pre>
+<base-config usesCleartextTraffic="true">
+ <trust-anchors>
+ <certificates src="system" />
+ <certificates src="user" />
+ </trust-anchors>
+</base-config>
+</pre>
+</p>
+</dd>
+</dl>
+
+<h3 id="domain-config"><domain-config></h3>
+<dl class="xml">
+<dt>syntax:</dt>
+<dd><pre class="stx"><domain-config <a href="#usesCleartextTraffic">usesCleartextTraffic</a>=["true" | "false"]>
+ ...
+</domain-config></pre></dd>
+<dt>Can Contain:</dt>
+
+<dd>
+1 or more <code><a href="#domain"><domain></a></code>
+<br/>0 or 1 <code><a href="#trust-anchors"><trust-anchors></a></code>
+<br/>0 or 1 <code><a href="#pin-set"><pin-set></code></a>
+<br/>Any number of nested <code><domain-config></code></dd>
+
+<dt>Descrption</dt>
+<dd>Configuration used for connections to specific destinations as the defined by {@code domain} elements.
+
+<p>Note that if multiple {@code domain-config} elements cover a destination the config with the most specific (longest)
+matching domain rule will be used.</p></dd>
+</dl>
+
+<h3 id="domain"><domain></h3>
+<dl class="xml">
+<dt>syntax:</dt>
+<dd><pre class="stx"><domain includeSubdomains=["true" | "false"]>example.com</domain></pre></dd>
+<dt>Attributes:</dt>
+<dd><dl class="attr">
+<dt>{@code includeSubdomains}</dt>
+<dd>If {@code "true"} then this domain rule will match the domain and all subdomains, including
+subdomains of subdomains, otherwise the rule only applies to exact matches.</dd>
+</dl>
+</dd>
+
+<dt>Descrption:</dt>
+</dl>
+
+<h3 id="debug-overrides"><debug-overrides></h3>
+<dl class="xml">
+<dt>syntax:</dt>
+<dd><pre class="stx"><debug-overrides>
+ ...
+</debug-overrides></pre></dd>
+<dt>Can Contain:</dt>
+<dd>0 or 1 <code><a href="#trust-anchors"><trust-anchors></a></code></dd>
+<dt>Description:</dt>
+<dd>Overrides to be applied when
+<a href="{@docRoot}guide/topics/manifest/application-element.html#debug">android:debuggable</a> is
+{@code "true"} which is normally the case for non-release builds generated by IDEs and build tools.
+Trust anchors specified in {@code debug-overrides} are added to all other configurations and certificate
+pinning is not performed when the server's certificate chain uses one of these debug-only trust anchors.
+If <a href="{@docRoot}guide/topics/manifest/application-element.html#debug">android:debuggable</a> is
+{@code "false"} then this section is completely ignored.
+</dd>
+</dl>
+
+<h3 id="trust-anchors"><trust-anchors></h3>
+<dl class="xml">
+<dt>syntax:</dt>
+<dd>
+<pre class="stx"><trust-anchors>
+...
+</trust-anchors>
+</pre></dd>
+<dt>Can Contain:</dt>
+<dd>Any number of <code><a href="#certificates"><certificates></a></code></dd>
+<dt>Description:</dt>
+<dd>Set of trust anchors for secure connections.</dd>
+</dl>
+
+
+<h3 id="certificates"><certificates></h3>
+<dl class="xml">
+<dt>syntax:</dt>
+<dd><pre class="stx"><certificates src=["system" | "user" | "<i>raw resource</i>"]
+ overridePins=["true" | "false"] />
+</pre></dd>
+<dt>description:</dt>
+<dd>Set of X.509 certificates for {@code trust-anchors} elements.</dd>
+
+<dt>attributes:</dt>
+<dd><dl class="attr">
+<dt>{@code src}</dt>
+<dd>
+The source of CA certificates, can be one of
+<ul>
+ <li>a raw resource id pointing to a file containing X.509 certificates. Certificates must be encoded in DER or PEM format.
+ In the case of PEM certificates the file <em>must not</em> contain extra non-PEM data such as comments.</li>
+ <li>{@code "system"} for the pre-installed system CA certificates</li>
+ <li>{@code "user"} for user-added CA certificates</li>
+</ul>
+</dd>
+
+<dt>{@code overridePins}</dt>
+<dd>
+Specifies if the CAs from this source bypass certificate pinning. If {@code "true"} then certificate chains which
+chain through one of the CAs from this source then pinning will not be performed. This can be useful
+for debug CAs or to support letting the user MiTM your app's secure traffic.
+<p>
+Default is {@code "false"} unless specified in a {@code debug-overrides} element, in which case the default is {@code "true"}.
+</p>
+</dd>
+</dl>
+</dd>
+
+<h3 id="pin-set"><pin-set></h3>
+<dl class="xml">
+<dt>syntax:</dt>
+<dd>
+<pre class="stx"><pin-set expiration="date">
+...
+</pin-set>
+</pre></dd>
+<dt>Can Contain:</dt>
+<dd>Any number of <code><a href="#pin"><pin></a></code></dd>
+<dt>Description:</dt>
+<dd>A set of public key pins. For a secure connection to be trusted, one of the public keys in the chain of trust must
+be in the set of pins. See <code><a href="#pin"><pin></a></code> for the format of pins.</dd>
+<dt>Attributes:</dt>
+<dd><dl class="attr">
+<dt>{@code expiration}</dt>
+<dd>The date, in {@code yyyy-MM-dd} format, at and after which the pins expire, thus disabling pinning.
+If the attribute is not set then the pins do not expire.
+<p>Expiration helps prevent connectivity issues in applications which do not get updates to their
+pin set, for example because the user disabled application updates.</p>
+</dd>
+</dl>
+</dd>
+
+<h3 id="pin"><pin></h3>
+<dl class="xml">
+<dt>syntax:</dt>
+<dd>
+<pre class="stx"><pin digest=["SHA-256"]>base64 encoded digest of X.509 SubjectPublicKeyInfo (SPKI)</pin></pre></dd>
+<dt>Attributes:</dt>
+<dd><dl class="attr">
+<dt>{@code digest}</dt>
+<dd>The digest algorithm used to generate the pin. Currently only {@code "SHA-256"} is supported.</dd>
+</dl>
+</dd>
+</dl>
diff --git a/libs/hwui/PixelBuffer.cpp b/libs/hwui/PixelBuffer.cpp
index 6df994c..165c7db 100644
--- a/libs/hwui/PixelBuffer.cpp
+++ b/libs/hwui/PixelBuffer.cpp
@@ -36,12 +36,14 @@
CpuPixelBuffer(GLenum format, uint32_t width, uint32_t height);
uint8_t* map(AccessMode mode = kAccessMode_ReadWrite) override;
- void unmap() override;
uint8_t* getMappedPointer() const override;
void upload(uint32_t x, uint32_t y, uint32_t width, uint32_t height, int offset) override;
+protected:
+ void unmap() override;
+
private:
std::unique_ptr<uint8_t[]> mBuffer;
};
@@ -81,12 +83,14 @@
~GpuPixelBuffer();
uint8_t* map(AccessMode mode = kAccessMode_ReadWrite) override;
- void unmap() override;
uint8_t* getMappedPointer() const override;
void upload(uint32_t x, uint32_t y, uint32_t width, uint32_t height, int offset) override;
+protected:
+ void unmap() override;
+
private:
GLuint mBuffer;
uint8_t* mMappedPointer;
@@ -118,6 +122,7 @@
LOG_ALWAYS_FATAL("Failed to map PBO");
}
mAccessMode = mode;
+ mCaches.pixelBufferState().unbind();
}
return mMappedPointer;
@@ -147,6 +152,7 @@
unmap();
glTexSubImage2D(GL_TEXTURE_2D, 0, x, y, width, height, mFormat,
GL_UNSIGNED_BYTE, reinterpret_cast<void*>(offset));
+ mCaches.pixelBufferState().unbind();
}
///////////////////////////////////////////////////////////////////////////////
diff --git a/libs/hwui/PixelBuffer.h b/libs/hwui/PixelBuffer.h
index aac5ec4..bbef36b 100644
--- a/libs/hwui/PixelBuffer.h
+++ b/libs/hwui/PixelBuffer.h
@@ -91,14 +91,6 @@
virtual uint8_t* map(AccessMode mode = kAccessMode_ReadWrite) = 0;
/**
- * Unmaps this buffer, if needed. After the buffer is unmapped,
- * the pointer previously returned by map() becomes invalid and
- * should not be used. After calling this method, getMappedPointer()
- * will always return NULL.
- */
- virtual void unmap() = 0;
-
- /**
* Returns the current access mode for this buffer. If the buffer
* is not mapped, this method returns kAccessMode_None.
*/
@@ -204,6 +196,14 @@
mFormat(format), mWidth(width), mHeight(height), mAccessMode(kAccessMode_None) {
}
+ /**
+ * Unmaps this buffer, if needed. After the buffer is unmapped,
+ * the pointer previously returned by map() becomes invalid and
+ * should not be used. After calling this method, getMappedPointer()
+ * will always return NULL.
+ */
+ virtual void unmap() = 0;
+
GLenum mFormat;
uint32_t mWidth;
diff --git a/libs/hwui/renderstate/MeshState.cpp b/libs/hwui/renderstate/MeshState.cpp
index 03cb5ce..b575c69 100644
--- a/libs/hwui/renderstate/MeshState.cpp
+++ b/libs/hwui/renderstate/MeshState.cpp
@@ -34,7 +34,6 @@
glGenBuffers(1, &mUnitQuadBuffer);
glBindBuffer(GL_ARRAY_BUFFER, mUnitQuadBuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(kUnitQuadVertices), kUnitQuadVertices, GL_STATIC_DRAW);
-
mCurrentBuffer = mUnitQuadBuffer;
uint16_t regionIndices[kMaxNumberOfQuads * 6];
@@ -78,26 +77,18 @@
// Buffer Objects
///////////////////////////////////////////////////////////////////////////////
-bool MeshState::bindMeshBuffer() {
- return bindMeshBuffer(mUnitQuadBuffer);
-}
-
-bool MeshState::bindMeshBuffer(GLuint buffer) {
- if (!buffer) buffer = mUnitQuadBuffer;
- return bindMeshBufferInternal(buffer);
-}
-
-bool MeshState::unbindMeshBuffer() {
- return bindMeshBufferInternal(0);
-}
-
-bool MeshState::bindMeshBufferInternal(GLuint buffer) {
+void MeshState::bindMeshBuffer(GLuint buffer) {
if (mCurrentBuffer != buffer) {
glBindBuffer(GL_ARRAY_BUFFER, buffer);
mCurrentBuffer = buffer;
- return true;
+
+ // buffer has changed, so invalidate cached vertex pos/texcoord pointers
+ resetVertexPointers();
}
- return false;
+}
+
+void MeshState::unbindMeshBuffer() {
+ return bindMeshBuffer(0);
}
void MeshState::genOrUpdateMeshBuffer(GLuint* buffer, GLsizeiptr size,
@@ -122,16 +113,22 @@
// Vertices
///////////////////////////////////////////////////////////////////////////////
-void MeshState::bindPositionVertexPointer(bool force, const GLvoid* vertices, GLsizei stride) {
- if (force || vertices != mCurrentPositionPointer || stride != mCurrentPositionStride) {
+void MeshState::bindPositionVertexPointer(const GLvoid* vertices, GLsizei stride) {
+ // update pos coords if !current vbo, since vertices may point into mutable memory (e.g. stack)
+ if (mCurrentBuffer == 0
+ || vertices != mCurrentPositionPointer
+ || stride != mCurrentPositionStride) {
glVertexAttribPointer(Program::kBindingPosition, 2, GL_FLOAT, GL_FALSE, stride, vertices);
mCurrentPositionPointer = vertices;
mCurrentPositionStride = stride;
}
}
-void MeshState::bindTexCoordsVertexPointer(bool force, const GLvoid* vertices, GLsizei stride) {
- if (force || vertices != mCurrentTexCoordsPointer || stride != mCurrentTexCoordsStride) {
+void MeshState::bindTexCoordsVertexPointer(const GLvoid* vertices, GLsizei stride) {
+ // update tex coords if !current vbo, since vertices may point into mutable memory (e.g. stack)
+ if (mCurrentBuffer == 0
+ || vertices != mCurrentTexCoordsPointer
+ || stride != mCurrentTexCoordsStride) {
glVertexAttribPointer(Program::kBindingTexCoords, 2, GL_FLOAT, GL_FALSE, stride, vertices);
mCurrentTexCoordsPointer = vertices;
mCurrentTexCoordsStride = stride;
@@ -143,10 +140,6 @@
mCurrentTexCoordsPointer = this;
}
-void MeshState::resetTexCoordsVertexPointer() {
- mCurrentTexCoordsPointer = this;
-}
-
void MeshState::enableTexCoordsVertexArray() {
if (!mTexCoordsArrayEnabled) {
glEnableVertexAttribArray(Program::kBindingTexCoords);
@@ -166,26 +159,18 @@
// Indices
///////////////////////////////////////////////////////////////////////////////
-bool MeshState::bindIndicesBufferInternal(const GLuint buffer) {
+void MeshState::bindIndicesBuffer(const GLuint buffer) {
if (mCurrentIndicesBuffer != buffer) {
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffer);
mCurrentIndicesBuffer = buffer;
- return true;
}
- return false;
}
-bool MeshState::bindQuadIndicesBuffer() {
- return bindIndicesBufferInternal(mQuadListIndices);
-}
-
-bool MeshState::unbindIndicesBuffer() {
+void MeshState::unbindIndicesBuffer() {
if (mCurrentIndicesBuffer) {
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
mCurrentIndicesBuffer = 0;
- return true;
}
- return false;
}
} /* namespace uirenderer */
diff --git a/libs/hwui/renderstate/MeshState.h b/libs/hwui/renderstate/MeshState.h
index 6c0fb78..dd68468 100644
--- a/libs/hwui/renderstate/MeshState.h
+++ b/libs/hwui/renderstate/MeshState.h
@@ -60,20 +60,16 @@
///////////////////////////////////////////////////////////////////////////////
// Buffer objects
///////////////////////////////////////////////////////////////////////////////
- /**
- * Binds the VBO used to render simple textured quads.
- */
- bool bindMeshBuffer();
/**
* Binds the specified VBO if needed. If buffer == 0, binds default simple textured quad.
*/
- bool bindMeshBuffer(GLuint buffer);
+ void bindMeshBuffer(GLuint buffer);
/**
- * Unbinds the VBO used to render simple textured quads.
+ * Unbinds the current VBO if active.
*/
- bool unbindMeshBuffer();
+ void unbindMeshBuffer();
void genOrUpdateMeshBuffer(GLuint* buffer, GLsizeiptr size, const void* data, GLenum usage);
void deleteMeshBuffer(GLuint);
@@ -85,21 +81,20 @@
* Binds an attrib to the specified float vertex pointer.
* Assumes a stride of gTextureVertexStride and a size of 2.
*/
- void bindPositionVertexPointer(bool force, const GLvoid* vertices,
+ void bindPositionVertexPointer(const GLvoid* vertices,
GLsizei stride = kTextureVertexStride);
/**
* Binds an attrib to the specified float vertex pointer.
* Assumes a stride of gTextureVertexStride and a size of 2.
*/
- void bindTexCoordsVertexPointer(bool force, const GLvoid* vertices,
+ void bindTexCoordsVertexPointer(const GLvoid* vertices,
GLsizei stride = kTextureVertexStride);
/**
* Resets the vertex pointers.
*/
void resetVertexPointers();
- void resetTexCoordsVertexPointer();
void enableTexCoordsVertexArray();
void disableTexCoordsVertexArray();
@@ -107,12 +102,8 @@
///////////////////////////////////////////////////////////////////////////////
// Indices
///////////////////////////////////////////////////////////////////////////////
- /**
- * Binds a global indices buffer that can draw up to
- * gMaxNumberOfQuads quads.
- */
- bool bindQuadIndicesBuffer();
- bool unbindIndicesBuffer();
+ void bindIndicesBuffer(const GLuint buffer);
+ void unbindIndicesBuffer();
///////////////////////////////////////////////////////////////////////////////
// Getters - for use in Glop building
@@ -121,8 +112,6 @@
GLuint getQuadListIBO() { return mQuadListIndices; }
private:
MeshState();
- bool bindMeshBufferInternal(const GLuint buffer);
- bool bindIndicesBufferInternal(const GLuint buffer);
GLuint mUnitQuadBuffer;
diff --git a/libs/hwui/renderstate/RenderState.cpp b/libs/hwui/renderstate/RenderState.cpp
index e535f2f..ea4391b 100644
--- a/libs/hwui/renderstate/RenderState.cpp
+++ b/libs/hwui/renderstate/RenderState.cpp
@@ -292,28 +292,27 @@
// ---------- Mesh setup ----------
// --------------------------------
// vertices
- const bool force = meshState().bindMeshBufferInternal(vertices.bufferObject)
- || (vertices.position != nullptr);
- meshState().bindPositionVertexPointer(force, vertices.position, vertices.stride);
+ meshState().bindMeshBuffer(vertices.bufferObject);
+ meshState().bindPositionVertexPointer(vertices.position, vertices.stride);
// indices
- meshState().bindIndicesBufferInternal(indices.bufferObject);
+ meshState().bindIndicesBuffer(indices.bufferObject);
if (vertices.attribFlags & VertexAttribFlags::TextureCoord) {
const Glop::Fill::TextureData& texture = fill.texture;
// texture always takes slot 0, shader samplers increment from there
mCaches->textureState().activateTexture(0);
+ mCaches->textureState().bindTexture(texture.target, texture.texture->id());
if (texture.clamp != GL_INVALID_ENUM) {
- texture.texture->setWrap(texture.clamp, true, false, texture.target);
+ texture.texture->setWrap(texture.clamp, false, false, texture.target);
}
if (texture.filter != GL_INVALID_ENUM) {
- texture.texture->setFilter(texture.filter, true, false, texture.target);
+ texture.texture->setFilter(texture.filter, false, false, texture.target);
}
- mCaches->textureState().bindTexture(texture.target, texture.texture->id());
meshState().enableTexCoordsVertexArray();
- meshState().bindTexCoordsVertexPointer(force, vertices.texCoord, vertices.stride);
+ meshState().bindTexCoordsVertexPointer(vertices.texCoord, vertices.stride);
if (texture.textureTransform) {
glUniformMatrix4fv(fill.program->getUniform("mainTextureTransform"), 1,
@@ -361,11 +360,9 @@
const GLbyte* vertexData = static_cast<const GLbyte*>(vertices.position);
while (elementsCount > 0) {
GLsizei drawCount = std::min(elementsCount, (GLsizei) kMaxNumberOfQuads * 6);
-
- // rebind pointers without forcing, since initial bind handled above
- meshState().bindPositionVertexPointer(false, vertexData, vertices.stride);
+ meshState().bindPositionVertexPointer(vertexData, vertices.stride);
if (vertices.attribFlags & VertexAttribFlags::TextureCoord) {
- meshState().bindTexCoordsVertexPointer(false,
+ meshState().bindTexCoordsVertexPointer(
vertexData + kMeshTextureOffset, vertices.stride);
}
diff --git a/media/java/android/media/AudioRecordConfiguration.java b/media/java/android/media/AudioRecordConfiguration.java
index 69df88f..61d239c 100644
--- a/media/java/android/media/AudioRecordConfiguration.java
+++ b/media/java/android/media/AudioRecordConfiguration.java
@@ -41,11 +41,12 @@
/**
* @hide
*/
- public AudioRecordConfiguration(int session, int source) {
+ public AudioRecordConfiguration(int session, int source,
+ AudioFormat clientFormat, AudioFormat deviceFormat) {
mSessionId = session;
mClientSource = source;
- mDeviceFormat = new AudioFormat.Builder().build();
- mClientFormat = new AudioFormat.Builder().build();
+ mDeviceFormat = deviceFormat;
+ mClientFormat = clientFormat;
mRecDevice = null;
}
@@ -129,13 +130,17 @@
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(mSessionId);
dest.writeInt(mClientSource);
+ mClientFormat.writeToParcel(dest, 0);
+ mDeviceFormat.writeToParcel(dest, 0);
+ //TODO marshall device info
}
private AudioRecordConfiguration(Parcel in) {
mSessionId = in.readInt();
mClientSource = in.readInt();
- mDeviceFormat = new AudioFormat.Builder().build();
- mClientFormat = new AudioFormat.Builder().build();
+ mClientFormat = AudioFormat.CREATOR.createFromParcel(in);
+ mDeviceFormat = AudioFormat.CREATOR.createFromParcel(in);
+ //TODO unmarshall device info
mRecDevice = null;
}
diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java
index b3f73be..59782cb 100644
--- a/media/java/android/media/AudioSystem.java
+++ b/media/java/android/media/AudioSystem.java
@@ -273,7 +273,17 @@
*/
public interface AudioRecordingCallback
{
- void onRecordingConfigurationChanged(int event, int session, int source);
+ /**
+ * Callback for recording activity notifications events
+ * @param event
+ * @param session
+ * @param source
+ * @param recordingFormat an array of ints containing respectively the client and device
+ * recording configuration. Each set of parameters contains the following parameters
+ * in this order: format, channel mask, sample rate
+ */
+ void onRecordingConfigurationChanged(int event, int session, int source,
+ int[] recordingFormat);
}
private static AudioRecordingCallback sRecordingCallback;
@@ -285,13 +295,23 @@
}
}
- private static void recordingCallbackFromNative(int event, int session, int source) {
+ /**
+ * Callback from native for recording configuration updates.
+ * @param event
+ * @param session
+ * @param source
+ * @param recordingFormat see
+ * {@link AudioRecordingCallback#onRecordingConfigurationChanged(int, int, int, int[])} for
+ * the description of the record format.
+ */
+ private static void recordingCallbackFromNative(int event, int session, int source,
+ int[] recordingFormat) {
AudioRecordingCallback cb = null;
synchronized (AudioSystem.class) {
cb = sRecordingCallback;
}
if (cb != null) {
- cb.onRecordingConfigurationChanged(event, session, source);
+ cb.onRecordingConfigurationChanged(event, session, source, recordingFormat);
}
}
diff --git a/media/java/android/media/ExifInterface.java b/media/java/android/media/ExifInterface.java
index 7fb67ee..1a387be 100644
--- a/media/java/android/media/ExifInterface.java
+++ b/media/java/android/media/ExifInterface.java
@@ -16,22 +16,51 @@
package android.media;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.system.ErrnoException;
+import android.system.Os;
+import android.system.OsConstants;
+import android.util.Log;
+import android.util.Pair;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.EOFException;
+import java.io.File;
+import java.io.FileDescriptor;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.util.regex.Pattern;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.ByteOrder;
+import java.nio.charset.Charset;
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
+import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.TimeZone;
+import java.util.regex.Pattern;
+
+import libcore.io.IoUtils;
+import libcore.io.Streams;
/**
* This is a class for reading and writing Exif tags in a JPEG file or a RAW image file.
* <p>
* Supported formats are: JPEG, DNG, CR2, NEF, NRW, ARW, RW2, ORF and RAF.
+ * <p>
+ * Attribute mutation is supported for JPEG image files.
*/
public class ExifInterface {
+ private static final String TAG = "ExifInterface";
+ private static final boolean DEBUG = false;
+
// The Exif tag names
/** Type is int. */
public static final String TAG_ORIENTATION = "Orientation";
@@ -97,6 +126,20 @@
public static final String TAG_FOCAL_LENGTH = "FocalLength";
/** Type is String. Name of GPS processing method used for location finding. */
public static final String TAG_GPS_PROCESSING_METHOD = "GPSProcessingMethod";
+ /** Type is double. */
+ public static final String TAG_DIGITAL_ZOOM_RATIO = "DigitalZoomRatio";
+ /** Type is double. */
+ public static final String TAG_SUBJECT_DISTANCE = "SubjectDistance";
+ /** Type is double. */
+ public static final String TAG_EXPOSURE_BIAS_VALUE = "ExposureBiasValue";
+ /** Type is int. */
+ public static final String TAG_LIGHT_SOURCE = "LightSource";
+ /** Type is int. */
+ public static final String TAG_METERING_MODE = "MeteringMode";
+ /** Type is int. */
+ public static final String TAG_EXPOSURE_PROGRAM = "ExposureProgram";
+ /** Type is int. */
+ public static final String TAG_EXPOSURE_MODE = "ExposureMode";
// Private tags used for thumbnail information.
private static final String TAG_HAS_THUMBNAIL = "hasThumbnail";
@@ -119,30 +162,321 @@
// Constants used for white balance
public static final int WHITEBALANCE_AUTO = 0;
public static final int WHITEBALANCE_MANUAL = 1;
+
private static SimpleDateFormat sFormatter;
+ // See Exchangeable image file format for digital still cameras: Exif version 2.2.
+ // The following values are for parsing EXIF data area. There are tag groups in EXIF data area.
+ // They are called "Image File Directory". They have multiple data formats to cover various
+ // image metadata from GPS longitude to camera model name.
+
+ // Types of Exif byte alignments (see JEITA CP-3451 page 10)
+ private static final short BYTE_ALIGN_II = 0x4949; // II: Intel order
+ private static final short BYTE_ALIGN_MM = 0x4d4d; // MM: Motorola order
+
+ // Formats for the value in IFD entry (See TIFF 6.0 spec Types page 15).
+ private static final int IFD_FORMAT_BYTE = 1;
+ private static final int IFD_FORMAT_STRING = 2;
+ private static final int IFD_FORMAT_USHORT = 3;
+ private static final int IFD_FORMAT_ULONG = 4;
+ private static final int IFD_FORMAT_URATIONAL = 5;
+ private static final int IFD_FORMAT_SBYTE = 6;
+ private static final int IFD_FORMAT_UNDEFINED = 7;
+ private static final int IFD_FORMAT_SSHORT = 8;
+ private static final int IFD_FORMAT_SLONG = 9;
+ private static final int IFD_FORMAT_SRATIONAL = 10;
+ private static final int IFD_FORMAT_SINGLE = 11;
+ private static final int IFD_FORMAT_DOUBLE = 12;
+ // Sizes of the components of each IFD value format
+ private static final int[] IFD_FORMAT_BYTES_PER_FORMAT = new int[] {
+ 0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8
+ };
+ private static final byte[] EXIF_ASCII_PREFIX = new byte[] {
+ 0x41, 0x53, 0x43, 0x49, 0x49, 0x0, 0x0, 0x0
+ };
+
+ // A class for indicating EXIF tag.
+ private static class ExifTag {
+ public final int number;
+ public final String name;
+
+ private ExifTag(String name, int number) {
+ this.name = name;
+ this.number = number;
+ }
+ }
+
+ // Primary image IFD TIFF tags (See JEITA CP-3451 Table 14. page 54).
+ private static final ExifTag[] IFD_TIFF_TAGS = new ExifTag[] {
+ new ExifTag("ImageWidth", 256),
+ new ExifTag("ImageLength", 257),
+ new ExifTag("BitsPerSample", 258),
+ new ExifTag("Compression", 259),
+ new ExifTag("PhotometricInterpretation", 262),
+ new ExifTag("ImageDescription", 270),
+ new ExifTag("Make", 271),
+ new ExifTag("Model", 272),
+ new ExifTag("StripOffsets", 273),
+ new ExifTag("Orientation", 274),
+ new ExifTag("SamplesPerPixel", 277),
+ new ExifTag("RowsPerStrip", 278),
+ new ExifTag("StripByteCounts", 279),
+ new ExifTag("XResolution", 282),
+ new ExifTag("YResolution", 283),
+ new ExifTag("PlanarConfiguration", 284),
+ new ExifTag("ResolutionUnit", 296),
+ new ExifTag("TransferFunction", 301),
+ new ExifTag("Software", 305),
+ new ExifTag("DateTime", 306),
+ new ExifTag("Artist", 315),
+ new ExifTag("WhitePoint", 318),
+ new ExifTag("PrimaryChromaticities", 319),
+ new ExifTag("JPEGInterchangeFormat", 513),
+ new ExifTag("JPEGInterchangeFormatLength", 514),
+ new ExifTag("YCbCrCoefficients", 529),
+ new ExifTag("YCbCrSubSampling", 530),
+ new ExifTag("YCbCrPositioning", 531),
+ new ExifTag("ReferenceBlackWhite", 532),
+ new ExifTag("Copyright", 33432),
+ new ExifTag("ExifIFDPointer", 34665),
+ new ExifTag("GPSInfoIFDPointer", 34853),
+ };
+ // Primary image IFD Exif Private tags (See JEITA CP-3451 Table 15. page 55).
+ private static final ExifTag[] IFD_EXIF_TAGS = new ExifTag[] {
+ new ExifTag("ExposureTime", 33434),
+ new ExifTag("FNumber", 33437),
+ new ExifTag("ExposureProgram", 34850),
+ new ExifTag("SpectralSensitivity", 34852),
+ new ExifTag("ISOSpeedRatings", 34855),
+ new ExifTag("OECF", 34856),
+ new ExifTag("ExifVersion", 36864),
+ new ExifTag("DateTimeOriginal", 36867),
+ new ExifTag("DateTimeDigitized", 36868),
+ new ExifTag("ComponentsConfiguration", 37121),
+ new ExifTag("CompressedBitsPerPixel", 37122),
+ new ExifTag("ShutterSpeedValue", 37377),
+ new ExifTag("ApertureValue", 37378),
+ new ExifTag("BrightnessValue", 37379),
+ new ExifTag("ExposureBiasValue", 37380),
+ new ExifTag("MaxApertureValue", 37381),
+ new ExifTag("SubjectDistance", 37382),
+ new ExifTag("MeteringMode", 37383),
+ new ExifTag("LightSource", 37384),
+ new ExifTag("Flash", 37385),
+ new ExifTag("FocalLength", 37386),
+ new ExifTag("SubjectArea", 37396),
+ new ExifTag("MakerNote", 37500),
+ new ExifTag("UserComment", 37510),
+ new ExifTag("SubSecTime", 37520),
+ new ExifTag("SubSecTimeOriginal", 37521),
+ new ExifTag("SubSecTimeDigitized", 37522),
+ new ExifTag("FlashpixVersion", 40960),
+ new ExifTag("ColorSpace", 40961),
+ new ExifTag("PixelXDimension", 40962),
+ new ExifTag("PixelYDimension", 40963),
+ new ExifTag("RelatedSoundFile", 40964),
+ new ExifTag("InteroperabilityIFDPointer", 40965),
+ new ExifTag("FlashEnergy", 41483),
+ new ExifTag("SpatialFrequencyResponse", 41484),
+ new ExifTag("FocalPlaneXResolution", 41486),
+ new ExifTag("FocalPlaneYResolution", 41487),
+ new ExifTag("FocalPlaneResolutionUnit", 41488),
+ new ExifTag("SubjectLocation", 41492),
+ new ExifTag("ExposureIndex", 41493),
+ new ExifTag("SensingMethod", 41495),
+ new ExifTag("FileSource", 41728),
+ new ExifTag("SceneType", 41729),
+ new ExifTag("CFAPattern", 41730),
+ new ExifTag("CustomRendered", 41985),
+ new ExifTag("ExposureMode", 41986),
+ new ExifTag("WhiteBalance", 41987),
+ new ExifTag("DigitalZoomRatio", 41988),
+ new ExifTag("FocalLengthIn35mmFilm", 41989),
+ new ExifTag("SceneCaptureType", 41990),
+ new ExifTag("GainControl", 41991),
+ new ExifTag("Contrast", 41992),
+ new ExifTag("Saturation", 41993),
+ new ExifTag("Sharpness", 41994),
+ new ExifTag("DeviceSettingDescription", 41995),
+ new ExifTag("SubjectDistanceRange", 41996),
+ new ExifTag("ImageUniqueID", 42016),
+ };
+ // Primary image IFD GPS Info tags (See JEITA CP-3451 Table 16. page 56).
+ private static final ExifTag[] IFD_GPS_TAGS = new ExifTag[] {
+ new ExifTag("GPSVersionID", 0),
+ new ExifTag("GPSLatitudeRef", 1),
+ new ExifTag("GPSLatitude", 2),
+ new ExifTag("GPSLongitudeRef", 3),
+ new ExifTag("GPSLongitude", 4),
+ new ExifTag("GPSAltitudeRef", 5),
+ new ExifTag("GPSAltitude", 6),
+ new ExifTag("GPSTimeStamp", 7),
+ new ExifTag("GPSSatellites", 8),
+ new ExifTag("GPSStatus", 9),
+ new ExifTag("GPSMeasureMode", 10),
+ new ExifTag("GPSDOP", 11),
+ new ExifTag("GPSSpeedRef", 12),
+ new ExifTag("GPSSpeed", 13),
+ new ExifTag("GPSTrackRef", 14),
+ new ExifTag("GPSTrack", 15),
+ new ExifTag("GPSImgDirectionRef", 16),
+ new ExifTag("GPSImgDirection", 17),
+ new ExifTag("GPSMapDatum", 18),
+ new ExifTag("GPSDestLatitudeRef", 19),
+ new ExifTag("GPSDestLatitude", 20),
+ new ExifTag("GPSDestLongitudeRef", 21),
+ new ExifTag("GPSDestLongitude", 22),
+ new ExifTag("GPSDestBearingRef", 23),
+ new ExifTag("GPSDestBearing", 24),
+ new ExifTag("GPSDestDistanceRef", 25),
+ new ExifTag("GPSDestDistance", 26),
+ new ExifTag("GPSProcessingMethod", 27),
+ new ExifTag("GPSAreaInformation", 28),
+ new ExifTag("GPSDateStamp", 29),
+ new ExifTag("GPSDifferential", 30),
+ };
+ // Primary image IFD Interoperability tag (See JEITA CP-3451 Table 17. page 56).
+ private static final ExifTag[] IFD_INTEROPERABILITY_TAGS = new ExifTag[] {
+ new ExifTag("InteroperabilityIndex", 1),
+ };
+ // IFD Thumbnail tags (See JEITA CP-3451 Table 18. page 57).
+ private static final ExifTag[] IFD_THUMBNAIL_TAGS = new ExifTag[] {
+ new ExifTag("ThumbnailImageWidth", 256),
+ new ExifTag("ThumbnailImageLength", 257),
+ new ExifTag("BitsPerSample", 258),
+ new ExifTag("Compression", 259),
+ new ExifTag("PhotometricInterpretation", 262),
+ new ExifTag("ImageDescription", 270),
+ new ExifTag("Make", 271),
+ new ExifTag("Model", 272),
+ new ExifTag("StripOffsets", 273),
+ new ExifTag("Orientation", 274),
+ new ExifTag("SamplesPerPixel", 277),
+ new ExifTag("RowsPerStrip", 278),
+ new ExifTag("StripByteCounts", 279),
+ new ExifTag("XResolution", 282),
+ new ExifTag("YResolution", 283),
+ new ExifTag("PlanarConfiguration", 284),
+ new ExifTag("ResolutionUnit", 296),
+ new ExifTag("TransferFunction", 301),
+ new ExifTag("Software", 305),
+ new ExifTag("DateTime", 306),
+ new ExifTag("Artist", 315),
+ new ExifTag("WhitePoint", 318),
+ new ExifTag("PrimaryChromaticities", 319),
+ new ExifTag("JPEGInterchangeFormat", 513),
+ new ExifTag("JPEGInterchangeFormatLength", 514),
+ new ExifTag("YCbCrCoefficients", 529),
+ new ExifTag("YCbCrSubSampling", 530),
+ new ExifTag("YCbCrPositioning", 531),
+ new ExifTag("ReferenceBlackWhite", 532),
+ new ExifTag("Copyright", 33432),
+ new ExifTag("ExifIFDPointer", 34665),
+ new ExifTag("GPSInfoIFDPointer", 34853),
+ };
+
+ // See JEITA CP-3451 Figure 5. page 9.
+ // The following values are used for indicating pointers to the other Image File Directorys.
+
+ // Indices of Exif Ifd tag groups
+ private static final int IFD_TIFF_HINT = 0;
+ private static final int IFD_EXIF_HINT = 1;
+ private static final int IFD_GPS_HINT = 2;
+ private static final int IFD_INTEROPERABILITY_HINT = 3;
+ private static final int IFD_THUMBNAIL_HINT = 4;
+ // List of Exif tag groups
+ private static final ExifTag[][] EXIF_TAGS = new ExifTag[][] {
+ IFD_TIFF_TAGS, IFD_EXIF_TAGS, IFD_GPS_TAGS, IFD_INTEROPERABILITY_TAGS,
+ IFD_THUMBNAIL_TAGS
+ };
+ // List of tags for pointing to the other image file directory offset.
+ private static final ExifTag[] IFD_POINTER_TAGS = new ExifTag[] {
+ new ExifTag("ExifIFDPointer", 34665),
+ new ExifTag("GPSInfoPointer", 34853),
+ new ExifTag("InteroperabilityIFDPointer", 40965),
+ };
+ // List of indices of the indicated tag groups according to the IFD_POINTER_TAGS
+ private static final int[] IFD_POINTER_TAG_HINTS = new int[] {
+ IFD_EXIF_HINT, IFD_GPS_HINT, IFD_INTEROPERABILITY_HINT
+ };
+ // Tags for indicating the thumbnail offset and length
+ private static final ExifTag JPEG_INTERCHANGE_FORMAT_TAG =
+ new ExifTag("JPEGInterchangeFormat", 513);
+ private static final ExifTag JPEG_INTERCHANGE_FORMAT_LENGTH_TAG =
+ new ExifTag("JPEGInterchangeFormatLength", 514);
+
+ // Mappings from tag number to tag name and each item represents one IFD tag group.
+ private static final HashMap[] sExifTagMapsForReading = new HashMap[EXIF_TAGS.length];
+ // Mapping from tag name to tag number and the corresponding tag group.
+ private static final HashMap<String, Pair<Integer, Integer>> sExifTagMapForWriting
+ = new HashMap<>();
+
+ // See JPEG File Interchange Format Version 1.02.
+ // The following values are defined for handling JPEG streams. In this implementation, we are
+ // not only getting information from EXIF but also from some JPEG special segments such as
+ // MARKER_COM for user comment and MARKER_SOFx for image width and height.
+
+ // Identifier for APP1 segment in JPEG
+ private static final byte[] IDENTIFIER_APP1 = "Exif\0\0".getBytes(Charset.forName("US-ASCII"));
+ // JPEG segment markers, that each marker consumes two bytes beginning with 0xff and ending with
+ // the indicator. There is no SOF4, SOF8, SOF16 markers in JPEG and SOFx markers indicates start
+ // of frame(baseline DCT) and the image size info exists in its beginning part.
+ private static final byte MARKER = (byte) 0xff;
+ private static final byte MARKER_SOI = (byte) 0xd8;
+ private static final byte MARKER_SOF0 = (byte) 0xc0;
+ private static final byte MARKER_SOF1 = (byte) 0xc1;
+ private static final byte MARKER_SOF2 = (byte) 0xc2;
+ private static final byte MARKER_SOF3 = (byte) 0xc3;
+ private static final byte MARKER_SOF5 = (byte) 0xc5;
+ private static final byte MARKER_SOF6 = (byte) 0xc6;
+ private static final byte MARKER_SOF7 = (byte) 0xc7;
+ private static final byte MARKER_SOF9 = (byte) 0xc9;
+ private static final byte MARKER_SOF10 = (byte) 0xca;
+ private static final byte MARKER_SOF11 = (byte) 0xcb;
+ private static final byte MARKER_SOF13 = (byte) 0xcd;
+ private static final byte MARKER_SOF14 = (byte) 0xce;
+ private static final byte MARKER_SOF15 = (byte) 0xcf;
+ private static final byte MARKER_SOS = (byte) 0xda;
+ private static final byte MARKER_APP1 = (byte) 0xe1;
+ private static final byte MARKER_COM = (byte) 0xfe;
+ private static final byte MARKER_EOI = (byte) 0xd9;
+
static {
- System.loadLibrary("jhead_jni");
System.loadLibrary("media_jni");
initRawNative();
-
sFormatter = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss");
sFormatter.setTimeZone(TimeZone.getTimeZone("UTC"));
+
+ // Build up the hash tables to look up Exif tags for reading Exif tags.
+ for (int hint = 0; hint < EXIF_TAGS.length; ++hint) {
+ sExifTagMapsForReading[hint] = new HashMap();
+ for (ExifTag tag : EXIF_TAGS[hint]) {
+ sExifTagMapsForReading[hint].put(tag.number, tag.name);
+ }
+ }
+
+ // Build up the hash tables to look up Exif tags for writing Exif tags.
+ // There are some tags that have the same tag name in the different group. For that tags,
+ // Primary image TIFF IFD and Exif private IFD have a higher priority to map than the other
+ // tag groups. For the same tags, it writes one tag in the only one IFD group, which has the
+ // higher priority group.
+ for (int hint = EXIF_TAGS.length - 1; hint >= 0; --hint) {
+ for (ExifTag tag : EXIF_TAGS[hint]) {
+ sExifTagMapForWriting.put(tag.name, new Pair<>(tag.number, hint));
+ }
+ }
}
private final String mFilename;
- private final HashMap<String, String> mAttributes = new HashMap<>();
+ private final FileDescriptor mFileDescriptor;
+ private final InputStream mInputStream;
private boolean mIsRaw;
+ private final HashMap<String, String> mAttributes = new HashMap<>();
private boolean mHasThumbnail;
// The following values used for indicating a thumbnail position.
private int mThumbnailOffset;
private int mThumbnailLength;
-
- // Because the underlying implementation (jhead) uses static variables,
- // there can only be one user at a time for the native functions (and
- // they cannot keep state in the native code across function calls). We
- // use sLock to serialize the accesses.
- private static final Object sLock = new Object();
+ private byte[] mThumbnailBytes;
// Pattern to check non zero timestamp
private static final Pattern sNonZeroTimePattern = Pattern.compile(".*[1-9].*");
@@ -155,7 +489,35 @@
throw new IllegalArgumentException("filename cannot be null");
}
mFilename = filename;
- // First test whether a given file is a one of RAW format or not.
+ mFileDescriptor = null;
+ mInputStream = new FileInputStream(filename);
+ loadAttributes();
+ }
+
+ /**
+ * Reads Exif tags from the specified image file descriptor.
+ */
+ public ExifInterface(FileDescriptor fileDescriptor) throws IOException {
+ if (fileDescriptor == null) {
+ throw new IllegalArgumentException("parcelFileDescriptor cannot be null");
+ }
+ mFilename = null;
+ mFileDescriptor = fileDescriptor;
+ mInputStream = new FileInputStream(fileDescriptor);
+ loadAttributes();
+ }
+
+ /**
+ * Reads Exif tags from the specified image input stream. Attribute mutation is not supported
+ * for input streams.
+ */
+ public ExifInterface(InputStream inputStream) throws IOException {
+ if (inputStream == null) {
+ throw new IllegalArgumentException("inputStream cannot be null");
+ }
+ mFilename = null;
+ mFileDescriptor = null;
+ mInputStream = inputStream;
loadAttributes();
}
@@ -188,9 +550,9 @@
}
/**
- * Returns the double value of the specified rational tag. If there is no
- * such tag in the image file or the value cannot be parsed as double, return
- * <var>defaultValue</var>.
+ * Returns the double value of the tag that is specified as rational or contains a
+ * double-formatted value. If there is no such tag in the image file or the value cannot be
+ * parsed as double, return <var>defaultValue</var>.
*
* @param tag the name of the tag.
* @param defaultValue the value to return if the tag is not available.
@@ -200,7 +562,7 @@
if (value == null) return defaultValue;
try {
int index = value.indexOf("/");
- if (index == -1) return defaultValue;
+ if (index == -1) return Double.parseDouble(value);
double denom = Double.parseDouble(value.substring(index + 1));
if (denom == 0) return defaultValue;
double num = Double.parseDouble(value.substring(0, index));
@@ -217,6 +579,10 @@
* @param value the value of the tag.
*/
public void setAttribute(String tag, String value) {
+ if (value == null) {
+ mAttributes.remove(tag);
+ return;
+ }
mAttributes.put(tag, value);
}
@@ -231,68 +597,74 @@
* file has a thumbnail inside.
*/
private void loadAttributes() throws IOException {
- HashMap map = getRawAttributesNative(mFilename);
- mIsRaw = map != null;
- if (mIsRaw) {
- for (Object o : map.entrySet()) {
- Map.Entry entry = (Map.Entry) o;
- String attrName = (String) entry.getKey();
- String attrValue = (String) entry.getValue();
+ FileInputStream in = null;
+ try {
+ if (mFilename != null) {
+ in = new FileInputStream(mFilename);
+ }
+ if (mFileDescriptor != null) {
+ in = new FileInputStream(mFileDescriptor);
+ }
+ if (in != null) {
+ // First test whether a given file is a one of RAW format or not.
+ HashMap map = getRawAttributesNative(Os.dup(in.getFD()));
+ mIsRaw = map != null;
+ if (mIsRaw) {
+ for (Object obj : map.entrySet()) {
+ Map.Entry entry = (Map.Entry) obj;
+ String attrName = (String) entry.getKey();
+ String attrValue = (String) entry.getValue();
- switch (attrName) {
- case TAG_HAS_THUMBNAIL:
- mHasThumbnail = attrValue.equalsIgnoreCase("true");
- break;
- case TAG_THUMBNAIL_OFFSET:
- mThumbnailOffset = Integer.parseInt(attrValue);
- break;
- case TAG_THUMBNAIL_LENGTH:
- mThumbnailLength = Integer.parseInt(attrValue);
- break;
- default:
- mAttributes.put(attrName, attrValue);
- break;
+ switch (attrName) {
+ case TAG_HAS_THUMBNAIL:
+ mHasThumbnail = attrValue.equalsIgnoreCase("true");
+ break;
+ case TAG_THUMBNAIL_OFFSET:
+ mThumbnailOffset = Integer.parseInt(attrValue);
+ break;
+ case TAG_THUMBNAIL_LENGTH:
+ mThumbnailLength = Integer.parseInt(attrValue);
+ break;
+ default:
+ mAttributes.put(attrName, attrValue);
+ break;
+ }
+ }
+
+ if (DEBUG) {
+ printAttributes();
+ }
+ return;
}
}
- return;
+ } catch (ErrnoException e) {
+ e.rethrowAsIOException();
+ } finally {
+ IoUtils.closeQuietly(in);
}
- // format of string passed from native C code:
- // "attrCnt attr1=valueLen value1attr2=value2Len value2..."
- // example:
- // "4 attrPtr ImageLength=4 1024Model=6 FooImageWidth=4 1280Make=3 FOO"
-
- String attrStr;
- synchronized (sLock) {
- attrStr = getAttributesNative(mFilename);
- }
-
- // get count
- int ptr = attrStr.indexOf(' ');
- int count = Integer.parseInt(attrStr.substring(0, ptr));
- // skip past the space between item count and the rest of the attributes
- ++ptr;
-
- for (int i = 0; i < count; i++) {
- // extract the attribute name
- int equalPos = attrStr.indexOf('=', ptr);
- String attrName = attrStr.substring(ptr, equalPos);
- ptr = equalPos + 1; // skip past =
-
- // extract the attribute value length
- int lenPos = attrStr.indexOf(' ', ptr);
- int attrLen = Integer.parseInt(attrStr.substring(ptr, lenPos));
- ptr = lenPos + 1; // skip pas the space
-
- // extract the attribute value
- String attrValue = attrStr.substring(ptr, ptr + attrLen);
- ptr += attrLen;
-
- if (attrName.equals(TAG_HAS_THUMBNAIL)) {
- mHasThumbnail = attrValue.equalsIgnoreCase("true");
- } else {
- mAttributes.put(attrName, attrValue);
+ try {
+ if (mFileDescriptor != null) {
+ Os.lseek(mFileDescriptor, 0, OsConstants.SEEK_SET);
}
+
+ getJpegAttributes(mInputStream);
+ } catch (ErrnoException e) {
+ e.rethrowAsIOException();
+ } finally {
+ IoUtils.closeQuietly(mInputStream);
+ }
+
+ if (DEBUG) {
+ printAttributes();
+ }
+ }
+
+ // Prints out attributes for debugging.
+ private void printAttributes() {
+ Log.d(TAG, "The size of tags: " + mAttributes.size());
+ for (Map.Entry<String, String> entry : mAttributes.entrySet()) {
+ Log.d(TAG, "tagName: " + entry.getKey() + ", tagValue: " + entry.getValue());
}
}
@@ -307,33 +679,63 @@
throw new UnsupportedOperationException(
"ExifInterface does not support saving attributes on RAW formats.");
}
+ if (mFileDescriptor == null && mFilename == null) {
+ throw new UnsupportedOperationException(
+ "ExifInterface does not support saving attributes for input streams.");
+ }
- // format of string passed to native C code:
- // "attrCnt attr1=valueLen value1attr2=value2Len value2..."
- // example:
- // "4 attrPtr ImageLength=4 1024Model=6 FooImageWidth=4 1280Make=3 FOO"
- StringBuilder sb = new StringBuilder();
- int size = mAttributes.size();
- if (mAttributes.containsKey(TAG_HAS_THUMBNAIL)) {
- --size;
- }
- sb.append(size).append(" ");
- for (Map.Entry<String, String> entry : mAttributes.entrySet()) {
- String key = entry.getKey();
- if (key.equals(TAG_HAS_THUMBNAIL)) {
- // this is a fake attribute not saved as an exif tag
- continue;
+ // Keep the thumbnail in memory
+ mThumbnailBytes = getThumbnail();
+
+ FileInputStream in = null;
+ FileOutputStream out = null;
+ File tempFile = null;
+ try {
+ // Move the original file to temporary file.
+ if (mFilename != null) {
+ tempFile = new File(mFilename + ".tmp");
+ File originalFile = new File(mFilename);
+ if (!originalFile.renameTo(tempFile)) {
+ throw new IOException("Could'nt rename to " + tempFile.getAbsolutePath());
+ }
}
- String val = entry.getValue();
- sb.append(key).append("=");
- sb.append(val.length()).append(" ");
- sb.append(val);
+ if (mFileDescriptor != null) {
+ tempFile = File.createTempFile("temp", "jpg");
+ Os.lseek(mFileDescriptor, 0, OsConstants.SEEK_SET);
+ in = new FileInputStream(mFileDescriptor);
+ out = new FileOutputStream(tempFile);
+ Streams.copy(in, out);
+ }
+ } catch (ErrnoException e) {
+ e.rethrowAsIOException();
+ } finally {
+ IoUtils.closeQuietly(in);
+ IoUtils.closeQuietly(out);
}
- String s = sb.toString();
- synchronized (sLock) {
- saveAttributesNative(mFilename, s);
- commitChangesNative(mFilename);
+
+ in = null;
+ out = null;
+ try {
+ // Save the new file.
+ in = new FileInputStream(tempFile);
+ if (mFilename != null) {
+ out = new FileOutputStream(mFilename);
+ }
+ if (mFileDescriptor != null) {
+ Os.lseek(mFileDescriptor, 0, OsConstants.SEEK_SET);
+ out = new FileOutputStream(mFileDescriptor);
+ }
+ saveJpegAttributes(in, out);
+ } catch (ErrnoException e) {
+ e.rethrowAsIOException();
+ } finally {
+ IoUtils.closeQuietly(in);
+ IoUtils.closeQuietly(out);
+ tempFile.delete();
}
+
+ // Discard the thumbnail in memory
+ mThumbnailBytes = null;
}
/**
@@ -349,27 +751,41 @@
* {@link android.graphics.BitmapFactory#decodeByteArray(byte[],int,int)}
*/
public byte[] getThumbnail() {
- if (mIsRaw) {
- if (mHasThumbnail) {
- try (RandomAccessFile file = new RandomAccessFile(mFilename, "r")) {
- if (file.length() < mThumbnailLength + mThumbnailOffset) {
- throw new IOException("Corrupted image.");
- }
- file.seek(mThumbnailOffset);
-
- byte[] buffer = new byte[mThumbnailLength];
- file.readFully(buffer);
- return buffer;
- } catch (IOException e) {
- // Couldn't get a thumbnail image.
- }
- }
+ if (!mHasThumbnail) {
return null;
}
-
- synchronized (sLock) {
- return getThumbnailNative(mFilename);
+ if (mThumbnailBytes != null) {
+ return mThumbnailBytes;
}
+
+ // Read the thumbnail.
+ FileInputStream in = null;
+ try {
+ if (mFileDescriptor != null) {
+ Os.lseek(mFileDescriptor, 0, OsConstants.SEEK_SET);
+ in = new FileInputStream(mFileDescriptor);
+ }
+ if (mFilename != null) {
+ in = new FileInputStream(mFilename);
+ }
+ if (in == null) {
+ // Should not be reached this.
+ throw new FileNotFoundException();
+ }
+ if (in.skip(mThumbnailOffset) != mThumbnailOffset) {
+ throw new IOException("Corrupted image");
+ }
+ byte[] buffer = new byte[mThumbnailLength];
+ if (in.read(buffer) != mThumbnailLength) {
+ throw new IOException("Corrupted image");
+ }
+ return buffer;
+ } catch (IOException | ErrnoException e) {
+ // Couldn't get a thumbnail image.
+ } finally {
+ IoUtils.closeQuietly(in);
+ }
+ return null;
}
/**
@@ -381,16 +797,10 @@
* @hide
*/
public long[] getThumbnailRange() {
- if (mIsRaw) {
- long[] range = new long[2];
- range[0] = mThumbnailOffset;
- range[1] = mThumbnailLength;
- return range;
- }
-
- synchronized (sLock) {
- return getThumbnailRangeNative(mFilename);
- }
+ long[] range = new long[2];
+ range[0] = mThumbnailOffset;
+ range[1] = mThumbnailLength;
+ return range;
}
/**
@@ -399,10 +809,10 @@
* Exif tags are not available.
*/
public boolean getLatLong(float output[]) {
- String latValue = mAttributes.get(ExifInterface.TAG_GPS_LATITUDE);
- String latRef = mAttributes.get(ExifInterface.TAG_GPS_LATITUDE_REF);
- String lngValue = mAttributes.get(ExifInterface.TAG_GPS_LONGITUDE);
- String lngRef = mAttributes.get(ExifInterface.TAG_GPS_LONGITUDE_REF);
+ String latValue = mAttributes.get(TAG_GPS_LATITUDE);
+ String latRef = mAttributes.get(TAG_GPS_LATITUDE_REF);
+ String lngValue = mAttributes.get(TAG_GPS_LONGITUDE);
+ String lngRef = mAttributes.get(TAG_GPS_LONGITUDE_REF);
if (latValue != null && latRef != null && lngValue != null && lngRef != null) {
try {
@@ -428,7 +838,7 @@
int ref = getAttributeInt(TAG_GPS_ALTITUDE_REF, -1);
if (altitude >= 0 && ref >= 0) {
- return (double) (altitude * ((ref == 1) ? -1 : 1));
+ return (altitude * ((ref == 1) ? -1 : 1));
} else {
return defaultValue;
}
@@ -461,6 +871,7 @@
}
msecs += sub;
} catch (NumberFormatException e) {
+ // Ignored
}
}
return msecs;
@@ -493,8 +904,7 @@
}
}
- private static float convertRationalLatLonToFloat(
- String rationalString, String ref) {
+ private static float convertRationalLatLonToFloat(String rationalString, String ref) {
try {
String [] parts = rationalString.split(",");
@@ -522,22 +932,1062 @@
}
}
- // JNI methods for JPEG.
- private static native boolean appendThumbnailNative(String fileName,
- String thumbnailFileName);
+ // Loads EXIF attributes from a JPEG input stream.
+ private void getJpegAttributes(InputStream inputStream) throws IOException {
+ // See JPEG File Interchange Format Specification page 5.
+ if (DEBUG) {
+ Log.d(TAG, "getJpegAttributes starting with: " + inputStream);
+ }
+ DataInputStream dataInputStream = new DataInputStream(inputStream);
+ byte marker;
+ int bytesRead = 0;
+ ++bytesRead;
+ if ((marker = dataInputStream.readByte()) != MARKER) {
+ throw new IOException("Invalid marker: " + Integer.toHexString(marker & 0xff));
+ }
+ ++bytesRead;
+ if (dataInputStream.readByte() != MARKER_SOI) {
+ throw new IOException("Invalid marker: " + Integer.toHexString(marker & 0xff));
+ }
+ while (true) {
+ ++bytesRead;
+ marker = dataInputStream.readByte();
+ if (marker != MARKER) {
+ throw new IOException("Invalid marker:" + Integer.toHexString(marker & 0xff));
+ }
+ ++bytesRead;
+ marker = dataInputStream.readByte();
+ if (DEBUG) {
+ Log.d(TAG, "Found JPEG segment indicator: " + Integer.toHexString(marker & 0xff));
+ }
- private static native void saveAttributesNative(String fileName,
- String compressedAttributes);
+ // EOI indicates the end of an image and in case of SOS, JPEG image stream starts and
+ // the image data will terminate right after.
+ if (marker == MARKER_EOI || marker == MARKER_SOS) {
+ break;
+ }
+ bytesRead += 2;
+ int length = dataInputStream.readUnsignedShort() - 2;
+ if (length < 0)
+ throw new IOException("Invalid length");
+ bytesRead += length;
+ switch (marker) {
+ case MARKER_APP1: {
+ if (DEBUG) {
+ Log.d(TAG, "MARKER_APP1");
+ }
+ bytesRead -= length;
+ if (length < 6) {
+ throw new IOException("Invalid exif");
+ }
+ byte[] identifier = new byte[6];
+ if (inputStream.read(identifier) != 6) {
+ throw new IOException("Invalid exif");
+ }
+ if (!Arrays.equals(identifier, IDENTIFIER_APP1)) {
+ throw new IOException("Invalid app1 identifier");
+ }
+ bytesRead += 6;
+ length -= 6;
+ if (length <= 0) {
+ throw new IOException("Invalid exif");
+ }
+ byte[] bytes = new byte[length];
+ if (dataInputStream.read(bytes) != length) {
+ throw new IOException("Invalid exif");
+ }
+ readExifSegment(bytes, bytesRead);
+ bytesRead += length;
+ length = 0;
+ break;
+ }
- private static native String getAttributesNative(String fileName);
+ case MARKER_COM: {
+ byte[] bytes = new byte[length];
+ if (dataInputStream.read(bytes) != length) {
+ throw new IOException("Invalid exif");
+ }
+ mAttributes.put("UserComment",
+ new String(bytes, Charset.forName("US-ASCII")));
+ break;
+ }
- private static native void commitChangesNative(String fileName);
+ case MARKER_SOF0:
+ case MARKER_SOF1:
+ case MARKER_SOF2:
+ case MARKER_SOF3:
+ case MARKER_SOF5:
+ case MARKER_SOF6:
+ case MARKER_SOF7:
+ case MARKER_SOF9:
+ case MARKER_SOF10:
+ case MARKER_SOF11:
+ case MARKER_SOF13:
+ case MARKER_SOF14:
+ case MARKER_SOF15: {
+ dataInputStream.skipBytes(1);
+ mAttributes.put("ImageLength",
+ String.valueOf(dataInputStream.readUnsignedShort()));
+ mAttributes.put("ImageWidth",
+ String.valueOf(dataInputStream.readUnsignedShort()));
+ length -= 5;
+ break;
+ }
- private static native byte[] getThumbnailNative(String fileName);
+ default: {
+ break;
+ }
+ }
+ if (length < 0) {
+ throw new IOException("Invalid length");
+ }
+ dataInputStream.skipBytes(length);
+ }
+ }
- private static native long[] getThumbnailRangeNative(String fileName);
+ // Stores a new JPEG image with EXIF attributes into a given output stream.
+ private void saveJpegAttributes(InputStream inputStream, OutputStream outputStream)
+ throws IOException {
+ // See JPEG File Interchange Format Specification page 5.
+ if (DEBUG) {
+ Log.d(TAG, "saveJpegAttributes starting with (inputStream: " + inputStream
+ + ", outputStream: " + outputStream + ")");
+ }
+ DataInputStream dataInputStream = new DataInputStream(inputStream);
+ ExifDataOutputStream dataOutputStream = new ExifDataOutputStream(outputStream);
+ int bytesRead = 0;
+ ++bytesRead;
+ if (dataInputStream.readByte() != MARKER) {
+ throw new IOException("Invalid marker");
+ }
+ dataOutputStream.writeByte(MARKER);
+ ++bytesRead;
+ if (dataInputStream.readByte() != MARKER_SOI) {
+ throw new IOException("Invalid marker");
+ }
+ dataOutputStream.writeByte(MARKER_SOI);
+
+ byte[] bytes = new byte[4096];
+
+ while (true) {
+ ++bytesRead;
+ if (dataInputStream.readByte() != MARKER) {
+ throw new IOException("Invalid marker");
+ }
+ dataOutputStream.writeByte(MARKER);
+ ++bytesRead;
+ byte marker = dataInputStream.readByte();
+ dataOutputStream.writeByte(marker);
+ switch (marker) {
+ case MARKER_APP1: {
+ // Rewrite EXIF segment
+ int length = dataInputStream.readUnsignedShort() - 2;
+ if (length < 0)
+ throw new IOException("Invalid length");
+ bytesRead += 2;
+ int read;
+ while ((read = dataInputStream.read(
+ bytes, 0, Math.min(length, bytes.length))) > 0) {
+ length -= read;
+ }
+ bytesRead += length;
+ writeExifSegment(dataOutputStream, bytesRead);
+ break;
+ }
+ case MARKER_EOI:
+ case MARKER_SOS: {
+ // Copy all the remaining data
+ Streams.copy(dataInputStream, dataOutputStream);
+ return;
+ }
+ default: {
+ // Copy JPEG segment
+ int length = dataInputStream.readUnsignedShort();
+ dataOutputStream.writeUnsignedShort(length);
+ if (length < 0)
+ throw new IOException("Invalid length");
+ length -= 2;
+ bytesRead += 2;
+ int read;
+ while ((read = dataInputStream.read(
+ bytes, 0, Math.min(length, bytes.length))) > 0) {
+ dataOutputStream.write(bytes, 0, read);
+ length -= read;
+ }
+ bytesRead += length;
+ break;
+ }
+ }
+ }
+ }
+
+ // Reads the given EXIF byte area and save its tag data into attributes.
+ private void readExifSegment(byte[] exifBytes, int exifOffsetFromBeginning) throws IOException {
+ // Parse TIFF Headers. See JEITA CP-3451C Table 1. page 10.
+ ByteOrderAwarenessDataInputStream dataInputStream =
+ new ByteOrderAwarenessDataInputStream(exifBytes);
+
+ // Read byte align
+ short byteOrder = dataInputStream.readShort();
+ switch (byteOrder) {
+ case BYTE_ALIGN_II:
+ if (DEBUG) {
+ Log.d(TAG, "readExifSegment: Byte Align II");
+ }
+ dataInputStream.setByteOrder(ByteOrder.LITTLE_ENDIAN);
+ break;
+ case BYTE_ALIGN_MM:
+ if (DEBUG) {
+ Log.d(TAG, "readExifSegment: Byte Align MM");
+ }
+ dataInputStream.setByteOrder(ByteOrder.BIG_ENDIAN);
+ break;
+ default:
+ throw new IOException("Invalid byte order: " + Integer.toHexString(byteOrder));
+ }
+
+ int startCode = dataInputStream.readUnsignedShort();
+ if (startCode != 0x2a) {
+ throw new IOException("Invalid exif start: " + Integer.toHexString(startCode));
+ }
+
+ // Read first ifd offset
+ long firstIfdOffset = dataInputStream.readUnsignedInt();
+ if (firstIfdOffset < 8 || firstIfdOffset >= exifBytes.length) {
+ throw new IOException("Invalid first Ifd offset: " + firstIfdOffset);
+ }
+ firstIfdOffset -= 8;
+ if (firstIfdOffset > 0) {
+ if (dataInputStream.skip(firstIfdOffset) != firstIfdOffset)
+ throw new IOException("Couldn't jump to first Ifd: " + firstIfdOffset);
+ }
+
+ // Read primary image TIFF image file directory.
+ readImageFileDirectory(dataInputStream, IFD_TIFF_HINT);
+
+ // Process thumbnail.
+ try {
+ int jpegInterchangeFormat = Integer.parseInt(
+ mAttributes.get(JPEG_INTERCHANGE_FORMAT_TAG.name));
+ int jpegInterchangeFormatLength = Integer.parseInt(
+ mAttributes.get(JPEG_INTERCHANGE_FORMAT_LENGTH_TAG.name));
+ // The following code limits the size of thumbnail size not to overflow EXIF data area.
+ jpegInterchangeFormatLength = Math.min(jpegInterchangeFormat
+ + jpegInterchangeFormatLength, exifOffsetFromBeginning + exifBytes.length)
+ - jpegInterchangeFormat;
+ if (jpegInterchangeFormat > 0 && jpegInterchangeFormatLength > 0) {
+ mHasThumbnail = true;
+ mThumbnailOffset = exifOffsetFromBeginning + jpegInterchangeFormat;
+ mThumbnailLength = jpegInterchangeFormatLength;
+
+ // Do not store a thumbnail in memory if the given input can be re-read.
+ if (mFileDescriptor == null && mFilename == null) {
+ byte[] thumbnailBytes = new byte[jpegInterchangeFormatLength];
+ dataInputStream.seek(jpegInterchangeFormat);
+ dataInputStream.readFully(thumbnailBytes);
+ mThumbnailBytes = thumbnailBytes;
+
+ if (DEBUG) {
+ Bitmap bitmap = BitmapFactory.decodeByteArray(
+ thumbnailBytes, 0, thumbnailBytes.length);
+ Log.d(TAG, "Thumbnail offset: " + mThumbnailOffset + ", length: "
+ + mThumbnailLength + ", width: " + bitmap.getWidth() + ", height: "
+ + bitmap.getHeight());
+ }
+ }
+ }
+ } catch (NumberFormatException e) {
+ // Ignored the corrupted image.
+ }
+
+ // For compatibility, keep data formats as follows.
+ convertToInt(TAG_IMAGE_WIDTH);
+ convertToInt(TAG_IMAGE_LENGTH);
+ convertToInt(TAG_ORIENTATION);
+ convertToInt(TAG_FLASH);
+ convertToRational(TAG_FOCAL_LENGTH);
+ convertToDouble(TAG_DIGITAL_ZOOM_RATIO);
+ convertToDouble(TAG_EXPOSURE_TIME);
+ convertToDouble(TAG_APERTURE);
+ convertToDouble(TAG_SUBJECT_DISTANCE);
+ convertToInt(TAG_ISO);
+ convertToDouble(TAG_EXPOSURE_BIAS_VALUE);
+ convertToInt(TAG_WHITE_BALANCE);
+ convertToInt(TAG_LIGHT_SOURCE);
+ convertToInt(TAG_METERING_MODE);
+ convertToInt(TAG_EXPOSURE_PROGRAM);
+ convertToInt(TAG_EXPOSURE_MODE);
+ convertToRational(TAG_GPS_ALTITUDE);
+ convertToInt(TAG_GPS_ALTITUDE_REF);
+ convertToRational(TAG_GPS_LONGITUDE);
+ convertToRational(TAG_GPS_LATITUDE);
+ convertToTimetamp(TAG_GPS_TIMESTAMP);
+
+ // The value of DATETIME tag has the same value of DATETIME_ORIGINAL tag.
+ String valueOfDateTimeOriginal = mAttributes.get("DateTimeOriginal");
+ if (valueOfDateTimeOriginal != null) {
+ mAttributes.put(TAG_DATETIME, valueOfDateTimeOriginal);
+ }
+
+ // Add the default value.
+ if (!mAttributes.containsKey(TAG_IMAGE_WIDTH)) {
+ mAttributes.put(TAG_IMAGE_WIDTH, "0");
+ }
+ if (!mAttributes.containsKey(TAG_IMAGE_LENGTH)) {
+ mAttributes.put(TAG_IMAGE_LENGTH, "0");
+ }
+ if (!mAttributes.containsKey(TAG_ORIENTATION)) {
+ mAttributes.put(TAG_ORIENTATION, "0");
+ }
+ if (!mAttributes.containsKey(TAG_LIGHT_SOURCE)) {
+ mAttributes.put(TAG_LIGHT_SOURCE, "0");
+ }
+ }
+
+ // Converts the tag value to timestamp; Otherwise deletes the given tag.
+ private void convertToTimetamp(String tagName) {
+ String entryValue = mAttributes.get(tagName);
+ if (entryValue == null) return;
+ int dataFormat = getDataFormatOfExifEntryValue(entryValue);
+ String[] components = entryValue.split(",");
+ if (dataFormat == IFD_FORMAT_SRATIONAL && components.length == 3) {
+ StringBuilder stringBuilder = new StringBuilder();
+ for (String component : components) {
+ if (stringBuilder.length() > 0) {
+ stringBuilder.append(":");
+ }
+ String[] rationalNumber = component.split("/");
+ int numerator = Integer.parseInt(rationalNumber[0]);
+ int denominator = Integer.parseInt(rationalNumber[1]);
+ if (denominator == 0) {
+ numerator = 0;
+ denominator = 1;
+ }
+ int value = numerator / denominator;
+ stringBuilder.append(String.format("%02d", value));
+ }
+ mAttributes.put(tagName, stringBuilder.toString());
+ } else if (dataFormat != IFD_FORMAT_STRING) {
+ mAttributes.remove(tagName);
+ }
+ }
+
+ // Checks the tag value of a given tag formatted in double type; Otherwise try to convert it to
+ // double type or delete it.
+ private void convertToDouble(String tagName) {
+ String entryValue = mAttributes.get(tagName);
+ if (entryValue == null) return;
+ int dataFormat = getDataFormatOfExifEntryValue(entryValue);
+ switch (dataFormat) {
+ case IFD_FORMAT_SRATIONAL: {
+ StringBuilder stringBuilder = new StringBuilder();
+ String[] components = entryValue.split(",");
+ for (String component : components) {
+ if (stringBuilder.length() > 0) {
+ stringBuilder.append(",");
+ }
+ String[] rationalNumber = component.split("/");
+ int numerator = Integer.parseInt(rationalNumber[0]);
+ int denominator = Integer.parseInt(rationalNumber[1]);
+ if (denominator == 0) {
+ numerator = 0;
+ denominator = 1;
+ }
+ stringBuilder.append((double) numerator / denominator);
+ }
+ mAttributes.put(tagName, stringBuilder.toString());
+ break;
+ }
+ case IFD_FORMAT_DOUBLE:
+ // Keep it as is.
+ break;
+ default:
+ mAttributes.remove(tagName);
+ break;
+ }
+ }
+
+ // Checks the tag value of a given tag formatted in int type; Otherwise deletes the tag value.
+ private void convertToRational(String tagName) {
+ String entryValue = mAttributes.get(tagName);
+ if (entryValue == null) return;
+ int dataFormat = getDataFormatOfExifEntryValue(entryValue);
+ switch (dataFormat) {
+ case IFD_FORMAT_SLONG:
+ case IFD_FORMAT_DOUBLE: {
+ StringBuilder stringBuilder = new StringBuilder();
+ String[] components = entryValue.split(",");
+ for (String component : components) {
+ if (stringBuilder.length() > 0) {
+ stringBuilder.append(",");
+ }
+ double doubleValue = Double.parseDouble(component);
+ stringBuilder.append((int) (doubleValue * 10000.0)).append("/").append(10000);
+ }
+ mAttributes.put(tagName, stringBuilder.toString());
+ break;
+ }
+ case IFD_FORMAT_SRATIONAL:
+ // Keep it as is.
+ break;
+ default:
+ mAttributes.remove(tagName);
+ break;
+ }
+ }
+
+ // Checks the tag value of a given tag formatted in int type; Otherwise deletes the tag value.
+ private void convertToInt(String tagName) {
+ String entryValue = mAttributes.get(tagName);
+ if (entryValue == null) return;
+ int dataFormat = getDataFormatOfExifEntryValue(entryValue);
+ if (dataFormat != IFD_FORMAT_SLONG) {
+ mAttributes.remove(tagName);
+ }
+ }
+
+ // Reads image file directory, which is a tag group in EXIF.
+ private void readImageFileDirectory(ByteOrderAwarenessDataInputStream dataInputStream, int hint)
+ throws IOException {
+ // See JEITA CP-3451 Figure 5. page 9.
+ short numberOfDirectoryEntry = dataInputStream.readShort();
+
+ if (DEBUG) {
+ Log.d(TAG, "numberOfDirectoryEntry: " + numberOfDirectoryEntry);
+ }
+
+ for (short i = 0; i < numberOfDirectoryEntry; ++i) {
+ int tagNumber = dataInputStream.readUnsignedShort();
+ int dataFormat = dataInputStream.readUnsignedShort();
+ int numberOfComponents = dataInputStream.readInt();
+ long nextEntryOffset = dataInputStream.peek() + 4; // next four bytes is for data
+ // offset or value.
+
+ if (DEBUG) {
+ Log.d(TAG, String.format("tagNumber: %d, dataFormat: %d, numberOfComponents: %d",
+ tagNumber, dataFormat, numberOfComponents));
+ }
+
+ // Read a value from data field or seek to the value offset which is stored in data
+ // field if the size of the entry value is bigger than 4.
+ int byteCount = numberOfComponents * IFD_FORMAT_BYTES_PER_FORMAT[dataFormat];
+ if (byteCount > 4) {
+ long offset = dataInputStream.readUnsignedInt();
+ if (DEBUG) {
+ Log.d(TAG, "seek to data offset: " + offset);
+ }
+ dataInputStream.seek(offset);
+ }
+
+ // Look up a corresponding tag from tag number
+ String tagName = (String) sExifTagMapsForReading[hint].get(tagNumber);
+ // Skip if the parsed tag number is not defined.
+ if (tagName == null) {
+ dataInputStream.seek(nextEntryOffset);
+ continue;
+ }
+
+ // Recursively parse IFD when a IFD pointer tag appears.
+ int innerIfdHint = getIfdHintFromTagNumber(tagNumber);
+ if (innerIfdHint >= 0) {
+ long offset = -1L;
+ // Get offset from data field
+ switch (dataFormat) {
+ case IFD_FORMAT_USHORT: {
+ offset = dataInputStream.readUnsignedShort();
+ break;
+ }
+ case IFD_FORMAT_SSHORT: {
+ offset = dataInputStream.readShort();
+ break;
+ }
+ case IFD_FORMAT_ULONG: {
+ offset = dataInputStream.readUnsignedInt();
+ break;
+ }
+ case IFD_FORMAT_SLONG: {
+ offset = dataInputStream.readInt();
+ break;
+ }
+ default: {
+ // Nothing to do
+ break;
+ }
+ }
+ if (DEBUG) {
+ Log.d(TAG, String.format("Offset: %d, tagName: %s", offset, tagName));
+ }
+ if (offset > 0L) {
+ dataInputStream.seek(offset);
+ readImageFileDirectory(dataInputStream, innerIfdHint);
+ }
+
+ dataInputStream.seek(nextEntryOffset);
+ continue;
+ }
+
+ if (numberOfComponents == 1 || dataFormat == IFD_FORMAT_STRING
+ || dataFormat == IFD_FORMAT_UNDEFINED) {
+ String entryValue = readExifEntryValue(
+ dataInputStream, dataFormat, numberOfComponents);
+ if (entryValue != null) {
+ mAttributes.put(tagName, entryValue);
+ }
+ } else {
+ StringBuilder entryValueBuilder = new StringBuilder();
+ for (int c = 0; c < numberOfComponents; ++c) {
+ if (entryValueBuilder.length() > 0) {
+ entryValueBuilder.append(",");
+ }
+ entryValueBuilder.append(readExifEntryValue(
+ dataInputStream, dataFormat, numberOfComponents));
+ }
+ mAttributes.put(tagName, entryValueBuilder.toString());
+ }
+
+ if (dataInputStream.peek() != nextEntryOffset) {
+ dataInputStream.seek(nextEntryOffset);
+ }
+ }
+
+ long nextIfdOffset = dataInputStream.readUnsignedInt();
+ if (DEBUG) {
+ Log.d(TAG, String.format("nextIfdOffset: %d", nextIfdOffset));
+ }
+ // The next IFD offset needs to be bigger than 8 since the first IFD offset is at least 8.
+ if (nextIfdOffset > 8) {
+ dataInputStream.seek(nextIfdOffset);
+ readImageFileDirectory(dataInputStream, IFD_THUMBNAIL_HINT);
+ }
+ }
+
+ // Reads a value from where the entry value are stored.
+ private String readExifEntryValue(ByteOrderAwarenessDataInputStream dataInputStream,
+ int dataFormat, int numberOfComponents) throws IOException {
+ // See TIFF 6.0 spec Types. page 15.
+ switch (dataFormat) {
+ case IFD_FORMAT_BYTE: {
+ return String.valueOf(dataInputStream.readByte());
+ }
+ case IFD_FORMAT_SBYTE: {
+ return String.valueOf(dataInputStream.readByte() & 0xff);
+ }
+ case IFD_FORMAT_USHORT: {
+ return String.valueOf(dataInputStream.readUnsignedShort());
+ }
+ case IFD_FORMAT_SSHORT: {
+ return String.valueOf(dataInputStream.readUnsignedInt());
+ }
+ case IFD_FORMAT_ULONG: {
+ return String.valueOf(dataInputStream.readInt());
+ }
+ case IFD_FORMAT_SLONG: {
+ return String.valueOf(dataInputStream.readInt());
+ }
+ case IFD_FORMAT_URATIONAL:
+ case IFD_FORMAT_SRATIONAL: {
+ int numerator = dataInputStream.readInt();
+ int denominator = dataInputStream.readInt();
+ return numerator + "/" + denominator;
+ }
+ case IFD_FORMAT_SINGLE: {
+ return String.valueOf(dataInputStream.readFloat());
+ }
+ case IFD_FORMAT_DOUBLE: {
+ return String.valueOf(dataInputStream.readDouble());
+ }
+ case IFD_FORMAT_UNDEFINED: // Usually UNDEFINED format is ASCII.
+ case IFD_FORMAT_STRING: {
+ byte[] bytes = new byte[numberOfComponents];
+ dataInputStream.readFully(bytes);
+ int index = 0;
+ if (numberOfComponents >= EXIF_ASCII_PREFIX.length) {
+ boolean same = true;
+ for (int i = 0; i < EXIF_ASCII_PREFIX.length; ++i) {
+ if (bytes[i] != EXIF_ASCII_PREFIX[i]) {
+ same = false;
+ break;
+ }
+ }
+ if (same) {
+ index = EXIF_ASCII_PREFIX.length;
+ }
+ }
+
+ StringBuilder stringBuilder = new StringBuilder();
+ while (true) {
+ int ch = bytes[index];
+ if (ch < 0)
+ throw new EOFException();
+ if (ch == 0)
+ break;
+ if (ch >= 32)
+ stringBuilder.append((char) ch);
+ else
+ stringBuilder.append('?');
+ ++index;
+ if (index == numberOfComponents)
+ break;
+ }
+ return stringBuilder.toString();
+ }
+ default: {
+ // Nothing to do
+ return null;
+ }
+ }
+ }
+
+ // Gets the corresponding IFD group index of the given tag number for writing Exif Tags.
+ private static int getIfdHintFromTagNumber(int tagNumber) {
+ for (int i = 0; i < IFD_POINTER_TAG_HINTS.length; ++i) {
+ if (IFD_POINTER_TAGS[i].number == tagNumber)
+ return IFD_POINTER_TAG_HINTS[i];
+ }
+ return -1;
+ }
+
+ // Writes an Exif segment into the given output stream.
+ private int writeExifSegment(ExifDataOutputStream dataOutputStream, int exifOffsetFromBeginning)
+ throws IOException {
+ // The following variables are for calculating each IFD tag group size in bytes.
+ int[] ifdOffsets = new int[EXIF_TAGS.length];
+ int[] ifdDataSizes = new int[EXIF_TAGS.length];
+
+ // Maps to store tags per IFD tag group
+ HashMap[] ifdTags = new HashMap[EXIF_TAGS.length];
+ for (int i = 0; i < EXIF_TAGS.length; ++i) {
+ ifdTags[i] = new HashMap();
+ }
+
+ // Remove IFD pointer tags (we'll re-add it later.)
+ for (ExifTag tag : IFD_POINTER_TAGS) {
+ mAttributes.remove(tag.name);
+ }
+
+ // Assign tags to the corresponding group
+ for (Map.Entry<String, String> entry : mAttributes.entrySet()) {
+ Pair<Integer, Integer> pair = sExifTagMapForWriting.get(entry.getKey());
+ if (pair != null) {
+ int tagNumber = pair.first;
+ int hint = pair.second;
+ ifdTags[hint].put(tagNumber, entry.getValue());
+ }
+ }
+
+ // Add IFD pointer tags. The next offset of primary image TIFF IFD will have thumbnail IFD
+ // offset when there is one or more tags in the thumbnail IFD.
+ if (!ifdTags[IFD_INTEROPERABILITY_HINT].isEmpty()) {
+ ifdTags[IFD_EXIF_HINT].put(IFD_POINTER_TAGS[2].number, "0");
+ }
+ if (!ifdTags[IFD_EXIF_HINT].isEmpty()) {
+ ifdTags[IFD_TIFF_HINT].put(IFD_POINTER_TAGS[0].number, "0");
+ }
+ if (!ifdTags[IFD_GPS_HINT].isEmpty()) {
+ ifdTags[IFD_TIFF_HINT].put(IFD_POINTER_TAGS[1].number, "0");
+ }
+ if (mHasThumbnail) {
+ ifdTags[IFD_TIFF_HINT].put(JPEG_INTERCHANGE_FORMAT_TAG.number, "0");
+ ifdTags[IFD_TIFF_HINT].put(JPEG_INTERCHANGE_FORMAT_LENGTH_TAG.number,
+ String.valueOf(mThumbnailLength));
+ }
+
+ // Calculate IFD group data area sizes. IFD group data area is assigned to save the entry
+ // value which has a bigger size than 4 bytes.
+ for (int i = 0; i < 5; ++i) {
+ int sum = 0;
+ for (Object entry : ifdTags[i].entrySet()) {
+ String entryValue = (String) ((Map.Entry) entry).getValue();
+ int dataFormat = getDataFormatOfExifEntryValue(entryValue);
+ int size = getSizeOfExifEntryValue(dataFormat, entryValue);
+ if (size > 4) {
+ sum += size;
+ }
+ }
+ ifdDataSizes[i] += sum;
+ }
+
+ // Calculate IFD offsets.
+ int position = 8;
+ for (int hint = 0; hint < EXIF_TAGS.length; ++hint) {
+ if (!ifdTags[hint].isEmpty()) {
+ ifdOffsets[hint] = position;
+ position += 2 + ifdTags[hint].size() * 12 + 4 + ifdDataSizes[hint];
+ }
+ }
+ if (mHasThumbnail) {
+ int thumbnailOffset = position;
+ ifdTags[IFD_TIFF_HINT].put(JPEG_INTERCHANGE_FORMAT_TAG.number,
+ String.valueOf(thumbnailOffset));
+ ifdTags[IFD_TIFF_HINT].put(JPEG_INTERCHANGE_FORMAT_LENGTH_TAG.number,
+ String.valueOf(mThumbnailLength));
+ mThumbnailOffset = exifOffsetFromBeginning + thumbnailOffset;
+ position += mThumbnailLength;
+ }
+
+ // Calculate the total size
+ int totalSize = position + 8; // eight bytes is for header part.
+ if (DEBUG) {
+ Log.d(TAG, "totalSize length: " + totalSize);
+ for (int i = 0; i < 5; ++i) {
+ Log.d(TAG, String.format("index: %d, offsets: %d, tag count: %d, data sizes: %d",
+ i, ifdOffsets[i], ifdTags[i].size(), ifdDataSizes[i]));
+ }
+ }
+
+ // Update IFD pointer tags with the calculated offsets.
+ if (!ifdTags[IFD_EXIF_HINT].isEmpty()) {
+ ifdTags[IFD_TIFF_HINT].put(IFD_POINTER_TAGS[0].number,
+ String.valueOf(ifdOffsets[IFD_EXIF_HINT]));
+ }
+ if (!ifdTags[IFD_GPS_HINT].isEmpty()) {
+ ifdTags[IFD_TIFF_HINT].put(IFD_POINTER_TAGS[1].number,
+ String.valueOf(ifdOffsets[IFD_GPS_HINT]));
+ }
+ if (!ifdTags[IFD_INTEROPERABILITY_HINT].isEmpty()) {
+ ifdTags[IFD_EXIF_HINT].put(IFD_POINTER_TAGS[2].number,
+ String.valueOf(ifdOffsets[IFD_INTEROPERABILITY_HINT]));
+ }
+
+ // Write TIFF Headers. See JEITA CP-3451C Table 1. page 10.
+ dataOutputStream.writeUnsignedShort(totalSize);
+ dataOutputStream.write(IDENTIFIER_APP1);
+ dataOutputStream.writeShort(BYTE_ALIGN_MM);
+ dataOutputStream.writeUnsignedShort(0x2a);
+ dataOutputStream.writeUnsignedInt(8);
+
+ // Write IFD groups. See JEITA CP-3451C Figure 7. page 12.
+ for (int hint = 0; hint < EXIF_TAGS.length; ++hint) {
+ if (!ifdTags[hint].isEmpty()) {
+ // See JEITA CP-3451C 4.6.2 IFD structure. page 13.
+ // Write entry count
+ dataOutputStream.writeUnsignedShort(ifdTags[hint].size());
+
+ // Write entry info
+ int dataOffset = ifdOffsets[hint] + 2 + ifdTags[hint].size() * 12 + 4;
+ for (Object obj : ifdTags[hint].entrySet()) {
+ Map.Entry entry = (Map.Entry) obj;
+ int tagNumber = (int) entry.getKey();
+ String entryValue = (String) entry.getValue();
+
+ int dataFormat = getDataFormatOfExifEntryValue(entryValue);
+ int numberOfComponents = getNumberOfComponentsInExifEntryValue(dataFormat,
+ entryValue);
+ int byteCount = getSizeOfExifEntryValue(dataFormat, entryValue);
+
+ dataOutputStream.writeUnsignedShort(tagNumber);
+ dataOutputStream.writeUnsignedShort(dataFormat);
+ dataOutputStream.writeInt(numberOfComponents);
+ if (byteCount > 4) {
+ dataOutputStream.writeUnsignedInt(dataOffset);
+ dataOffset += byteCount;
+ } else {
+ int bytesWritten = writeExifEntryValue(dataOutputStream, entryValue);
+ // Fill zero up to 4 bytes
+ if (bytesWritten < 4) {
+ for (int i = bytesWritten; i < 4; ++i) {
+ dataOutputStream.write(0);
+ }
+ }
+ }
+ }
+
+ // Write the next offset. It writes the offset of thumbnail IFD if there is one or
+ // more tags in the thumbnail IFD when the current IFD is the primary image TIFF
+ // IFD; Otherwise 0.
+ if (hint == 0 && !ifdTags[IFD_THUMBNAIL_HINT].isEmpty()) {
+ dataOutputStream.writeUnsignedInt(ifdOffsets[IFD_THUMBNAIL_HINT]);
+ } else {
+ dataOutputStream.writeUnsignedInt(0);
+ }
+
+ // Write values of data field exceeding 4 bytes after the next offset.
+ for (Object obj : ifdTags[hint].entrySet()) {
+ Map.Entry entry = (Map.Entry) obj;
+ String entryValue = (String) entry.getValue();
+
+ int dataFormat = getDataFormatOfExifEntryValue(entryValue);
+ int byteCount = getSizeOfExifEntryValue(dataFormat, entryValue);
+ if (byteCount > 4) {
+ writeExifEntryValue(dataOutputStream, entryValue);
+ }
+ }
+ }
+ }
+
+ // Write thumbnail
+ if (mHasThumbnail) {
+ dataOutputStream.write(getThumbnail());
+ }
+
+ return totalSize;
+ }
+
+ // Writes EXIF entry value and its entry value type will be automatically determined.
+ private static int writeExifEntryValue(ExifDataOutputStream dataOutputStream, String entryValue)
+ throws IOException {
+ int bytesWritten = 0;
+ int dataFormat = getDataFormatOfExifEntryValue(entryValue);
+
+ // Values can be composed of several components. Each component is separated by char ','.
+ String[] components = entryValue.split(",");
+ for (String component : components) {
+ switch (dataFormat) {
+ case IFD_FORMAT_SLONG:
+ dataOutputStream.writeInt(Integer.parseInt(component));
+ bytesWritten += 4;
+ break;
+ case IFD_FORMAT_DOUBLE:
+ dataOutputStream.writeDouble(Double.parseDouble(component));
+ bytesWritten += 8;
+ break;
+ case IFD_FORMAT_STRING:
+ byte[] asciiArray = (component + '\0').getBytes(Charset.forName("US-ASCII"));
+ dataOutputStream.write(asciiArray);
+ bytesWritten += asciiArray.length;
+ break;
+ case IFD_FORMAT_SRATIONAL:
+ String[] rationalNumber = component.split("/");
+ dataOutputStream.writeInt(Integer.parseInt(rationalNumber[0]));
+ dataOutputStream.writeInt(Integer.parseInt(rationalNumber[1]));
+ bytesWritten += 8;
+ break;
+ default:
+ throw new IllegalArgumentException();
+ }
+ }
+ return bytesWritten;
+ }
+
+ // Determines the data format of EXIF entry value.
+ private static int getDataFormatOfExifEntryValue(String entryValue) {
+ // See TIFF 6.0 spec Types. page 15.
+ // Take the first component if there are more than one component.
+ if (entryValue.contains(",")) {
+ entryValue = entryValue.split(",")[0];
+ }
+
+ if (entryValue.contains("/")) {
+ return IFD_FORMAT_SRATIONAL;
+ }
+ try {
+ Integer.parseInt(entryValue);
+ return IFD_FORMAT_SLONG;
+ } catch (NumberFormatException e) {
+ // Ignored
+ }
+ try {
+ Double.parseDouble(entryValue);
+ return IFD_FORMAT_DOUBLE;
+ } catch (NumberFormatException e) {
+ // Ignored
+ }
+ return IFD_FORMAT_STRING;
+ }
+
+ // Determines the size of EXIF entry value.
+ private static int getSizeOfExifEntryValue(int dataFormat, String entryValue) {
+ // See TIFF 6.0 spec Types page 15.
+ int bytesEstimated = 0;
+ String[] components = entryValue.split(",");
+ for (String component : components) {
+ switch (dataFormat) {
+ case IFD_FORMAT_SLONG:
+ bytesEstimated += 4;
+ break;
+ case IFD_FORMAT_DOUBLE:
+ bytesEstimated += 8;
+ break;
+ case IFD_FORMAT_STRING:
+ bytesEstimated
+ += (component + '\0').getBytes(Charset.forName("US-ASCII")).length;
+ break;
+ case IFD_FORMAT_SRATIONAL:
+ bytesEstimated += 8;
+ break;
+ default:
+ throw new IllegalArgumentException();
+ }
+ }
+ return bytesEstimated;
+ }
+
+ // Determines the number of components of EXIF entry value.
+ private static int getNumberOfComponentsInExifEntryValue(int dataFormat, String entryValue) {
+ if (dataFormat == IFD_FORMAT_STRING) {
+ return (entryValue + '\0').getBytes(Charset.forName("US-ASCII")).length;
+ }
+ int count = 1;
+ for (int i = 0; i < entryValue.length(); ++i) {
+ if (entryValue.charAt(i) == ',') {
+ ++count;
+ }
+ }
+ return count;
+ }
+
+ // An input stream to parse EXIF data area, which can be written in either little or big endian
+ // order.
+ private static class ByteOrderAwarenessDataInputStream extends ByteArrayInputStream {
+ private static final ByteOrder LITTLE_ENDIAN = ByteOrder.LITTLE_ENDIAN;
+ private static final ByteOrder BIG_ENDIAN = ByteOrder.BIG_ENDIAN;
+
+ private ByteOrder mByteOrder = ByteOrder.BIG_ENDIAN;
+ private final long mLength;
+ private long mPosition;
+
+ public ByteOrderAwarenessDataInputStream(byte[] bytes) {
+ super(bytes);
+ mLength = bytes.length;
+ mPosition = 0L;
+ }
+
+ public void setByteOrder(ByteOrder byteOrder) {
+ mByteOrder = byteOrder;
+ }
+
+ public void seek(long byteCount) throws IOException {
+ mPosition = 0L;
+ reset();
+ if (skip(byteCount) != byteCount)
+ throw new IOException("Couldn't seek up to the byteCount");
+ }
+
+ public long peek() {
+ return mPosition;
+ }
+
+ public void readFully(byte[] buffer) throws IOException {
+ mPosition += buffer.length;
+ if (mPosition > mLength)
+ throw new EOFException();
+ if (super.read(buffer, 0, buffer.length) != buffer.length) {
+ throw new IOException("Couldn't read up to the length of buffer");
+ }
+ }
+
+ public byte readByte() throws IOException {
+ ++mPosition;
+ if (mPosition > mLength)
+ throw new EOFException();
+ int ch = super.read();
+ if (ch < 0)
+ throw new EOFException();
+ return (byte) ch;
+ }
+
+ public short readShort() throws IOException {
+ mPosition += 2;
+ if (mPosition > mLength)
+ throw new EOFException();
+ int ch1 = super.read();
+ int ch2 = super.read();
+ if ((ch1 | ch2) < 0)
+ throw new EOFException();
+ if (mByteOrder == LITTLE_ENDIAN) {
+ return (short) ((ch2 << 8) + (ch1));
+ } else if (mByteOrder == BIG_ENDIAN) {
+ return (short) ((ch1 << 8) + (ch2));
+ }
+ throw new IOException("Invalid byte order: " + mByteOrder);
+ }
+
+ public int readInt() throws IOException {
+ mPosition += 4;
+ if (mPosition > mLength)
+ throw new EOFException();
+ int ch1 = super.read();
+ int ch2 = super.read();
+ int ch3 = super.read();
+ int ch4 = super.read();
+ if ((ch1 | ch2 | ch3 | ch4) < 0)
+ throw new EOFException();
+ if (mByteOrder == LITTLE_ENDIAN) {
+ return ((ch4 << 24) + (ch3 << 16) + (ch2 << 8) + ch1);
+ } else if (mByteOrder == BIG_ENDIAN) {
+ return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + ch4);
+ }
+ throw new IOException("Invalid byte order: " + mByteOrder);
+ }
+
+ @Override
+ public long skip(long byteCount) {
+ long skipped = super.skip(Math.min(byteCount, mLength - mPosition));
+ mPosition += skipped;
+ return skipped;
+ }
+
+ public int readUnsignedShort() throws IOException {
+ mPosition += 2;
+ if (mPosition > mLength)
+ throw new EOFException();
+ int ch1 = super.read();
+ int ch2 = super.read();
+ if ((ch1 | ch2) < 0)
+ throw new EOFException();
+ if (mByteOrder == LITTLE_ENDIAN) {
+ return ((ch2 << 8) + (ch1));
+ } else if (mByteOrder == BIG_ENDIAN) {
+ return ((ch1 << 8) + (ch2));
+ }
+ throw new IOException("Invalid byte order: " + mByteOrder);
+ }
+
+ public long readUnsignedInt() throws IOException {
+ return readInt() & 0xffffffffL;
+ }
+
+ public long readLong() throws IOException {
+ mPosition += 8;
+ if (mPosition > mLength)
+ throw new EOFException();
+ int ch1 = super.read();
+ int ch2 = super.read();
+ int ch3 = super.read();
+ int ch4 = super.read();
+ int ch5 = super.read();
+ int ch6 = super.read();
+ int ch7 = super.read();
+ int ch8 = super.read();
+ if ((ch1 | ch2 | ch3 | ch4 | ch5 | ch6 | ch7 | ch8) < 0)
+ throw new EOFException();
+ if (mByteOrder == LITTLE_ENDIAN) {
+ return (((long) ch8 << 56) + ((long) ch7 << 48) + ((long) ch6 << 40)
+ + ((long) ch5 << 32) + ((long) ch4 << 24) + ((long) ch3 << 16)
+ + ((long) ch2 << 8) + (long) ch1);
+ } else if (mByteOrder == BIG_ENDIAN) {
+ return (((long) ch1 << 56) + ((long) ch2 << 48) + ((long) ch3 << 40)
+ + ((long) ch4 << 32) + ((long) ch5 << 24) + ((long) ch6 << 16)
+ + ((long) ch7 << 8) + (long) ch8);
+ }
+ throw new IOException("Invalid byte order: " + mByteOrder);
+ }
+
+ public float readFloat() throws IOException {
+ return Float.intBitsToFloat(readInt());
+ }
+
+ public double readDouble() throws IOException {
+ return Double.longBitsToDouble(readLong());
+ }
+ }
+
+ // An output stream to write EXIF data area, that will be written in big endian byte order.
+ private static class ExifDataOutputStream extends DataOutputStream {
+ public ExifDataOutputStream(OutputStream out) {
+ super(out);
+ }
+
+ public void writeUnsignedShort(int val) throws IOException {
+ writeShort((short) val);
+ }
+
+ public void writeUnsignedInt(long val) throws IOException {
+ writeInt((int) val);
+ }
+ }
// JNI methods for RAW formats.
private static native void initRawNative();
- private static native HashMap getRawAttributesNative(String filename);
+ private static native HashMap getRawAttributesNative(FileDescriptor fileDescriptor);
}
diff --git a/media/java/android/media/ImageReader.java b/media/java/android/media/ImageReader.java
index 397ab15..c08f4bf 100644
--- a/media/java/android/media/ImageReader.java
+++ b/media/java/android/media/ImageReader.java
@@ -153,6 +153,7 @@
mSurface = nativeGetSurface();
+ mIsReaderValid = true;
// Estimate the native buffer allocation size and register it so it gets accounted for
// during GC. Note that this doesn't include the buffers required by the buffer queue
// itself and the buffers requested by the producer.
@@ -326,7 +327,11 @@
*/
private int acquireNextSurfaceImage(SurfaceImage si) {
synchronized (mCloseLock) {
- int status = nativeImageSetup(si);
+ // A null image will eventually be returned if ImageReader is already closed.
+ int status = ACQUIRE_NO_BUFS;
+ if (mIsReaderValid) {
+ status = nativeImageSetup(si);
+ }
switch (status) {
case ACQUIRE_SUCCESS:
@@ -498,6 +503,7 @@
* acquire operations.
*/
synchronized (mCloseLock) {
+ mIsReaderValid = false;
for (Image image : mAcquiredImages) {
image.close();
}
@@ -613,6 +619,7 @@
private final Object mListenerLock = new Object();
private final Object mCloseLock = new Object();
+ private boolean mIsReaderValid = false;
private OnImageAvailableListener mListener;
private ListenerHandler mListenerHandler;
// Keep track of the successfully acquired Images. This need to be thread safe as the images
@@ -638,7 +645,14 @@
synchronized (mListenerLock) {
listener = mListener;
}
- if (listener != null) {
+
+ // It's dangerous to fire onImageAvailable() callback when the ImageReader is being
+ // closed, as application could acquire next image in the onImageAvailable() callback.
+ boolean isReaderValid = false;
+ synchronized (mCloseLock) {
+ isReaderValid = mIsReaderValid;
+ }
+ if (listener != null && isReaderValid) {
listener.onImageAvailable(ImageReader.this);
}
}
diff --git a/media/java/android/media/RingtoneManager.java b/media/java/android/media/RingtoneManager.java
index 06ac11b..feb490d 100644
--- a/media/java/android/media/RingtoneManager.java
+++ b/media/java/android/media/RingtoneManager.java
@@ -663,13 +663,15 @@
// Stream selected ringtone into cache so it's available for playback
// when CE storage is still locked
- final ContentResolver cr = context.getContentResolver();
- final Uri cacheUri = getCacheForType(type);
- try (InputStream in = cr.openInputStream(ringtoneUri);
- OutputStream out = cr.openOutputStream(cacheUri)) {
- Streams.copy(in, out);
- } catch (IOException e) {
- Log.w(TAG, "Failed to cache ringtone: " + e);
+ if (ringtoneUri != null) {
+ final ContentResolver cr = context.getContentResolver();
+ final Uri cacheUri = getCacheForType(type);
+ try (InputStream in = cr.openInputStream(ringtoneUri);
+ OutputStream out = cr.openOutputStream(cacheUri)) {
+ Streams.copy(in, out);
+ } catch (IOException e) {
+ Log.w(TAG, "Failed to cache ringtone: " + e);
+ }
}
}
diff --git a/media/java/android/media/session/ISession.aidl b/media/java/android/media/session/ISession.aidl
index bd0019f..3affee5c0 100644
--- a/media/java/android/media/session/ISession.aidl
+++ b/media/java/android/media/session/ISession.aidl
@@ -50,4 +50,6 @@
void setPlaybackToLocal(in AudioAttributes attributes);
void setPlaybackToRemote(int control, int max);
void setCurrentVolume(int currentVolume);
+
+ String getCallingPackage();
}
diff --git a/media/java/android/media/session/MediaSession.java b/media/java/android/media/session/MediaSession.java
index 3b1b6c8..9073077 100644
--- a/media/java/android/media/session/MediaSession.java
+++ b/media/java/android/media/session/MediaSession.java
@@ -512,6 +512,22 @@
}
}
+ /**
+ * Returns the name of the package that sent the last media button, transport control, or
+ * command from controllers and the system. This is only valid while in a request callback, such
+ * as {@link Callback#onPlay}.
+ *
+ * @hide
+ */
+ public String getCallingPackage() {
+ try {
+ return mBinder.getCallingPackage();
+ } catch (RemoteException e) {
+ Log.wtf(TAG, "Dead object in getCallingPackage.", e);
+ }
+ return null;
+ }
+
private void dispatchPrepare() {
postToCallback(CallbackMessageHandler.MSG_PREPARE);
}
diff --git a/media/java/android/media/soundtrigger/SoundTriggerDetector.java b/media/java/android/media/soundtrigger/SoundTriggerDetector.java
index 8f022db..df0961b 100644
--- a/media/java/android/media/soundtrigger/SoundTriggerDetector.java
+++ b/media/java/android/media/soundtrigger/SoundTriggerDetector.java
@@ -289,8 +289,8 @@
* @hide
*/
@Override
- public void onDetected(SoundTrigger.RecognitionEvent event) {
- Slog.d(TAG, "onDetected()" + event);
+ public void onGenericSoundTriggerDetected(SoundTrigger.GenericRecognitionEvent event) {
+ Slog.d(TAG, "onGenericSoundTriggerDetected()" + event);
Message.obtain(mHandler,
MSG_SOUND_TRIGGER_DETECTED,
new EventPayload(event.triggerInData, event.captureAvailable,
@@ -298,6 +298,11 @@
.sendToTarget();
}
+ @Override
+ public void onKeyphraseDetected(SoundTrigger.KeyphraseRecognitionEvent event) {
+ Slog.e(TAG, "Ignoring onKeyphraseDetected() called for " + event);
+ }
+
/**
* @hide
*/
diff --git a/media/java/android/media/tv/TvContract.java b/media/java/android/media/tv/TvContract.java
index bc7913b..a332195 100644
--- a/media/java/android/media/tv/TvContract.java
+++ b/media/java/android/media/tv/TvContract.java
@@ -26,6 +26,7 @@
import android.net.Uri;
import android.os.IBinder;
import android.provider.BaseColumns;
+import android.text.TextUtils;
import android.util.ArraySet;
import java.util.ArrayList;
@@ -1376,6 +1377,10 @@
* {@link #COLUMN_BROADCAST_GENRE} or {@link #COLUMN_CANONICAL_GENRE} column.
*/
public static String encode(@NonNull String... genres) {
+ if (genres == null) {
+ // MNC and before will throw a NPE.
+ return null;
+ }
StringBuilder sb = new StringBuilder();
String separator = "";
for (String genre : genres) {
@@ -1411,7 +1416,8 @@
* @return genre strings.
*/
public static String[] decode(@NonNull String genres) {
- if (genres.isEmpty()) {
+ if (TextUtils.isEmpty(genres)) {
+ // MNC and before will throw a NPE for {@code null} genres.
return EMPTY_STRING_ARRAY;
}
if (genres.indexOf(COMMA) == -1 && genres.indexOf(DOUBLE_QUOTE) == -1) {
diff --git a/media/java/android/media/tv/TvInputInfo.java b/media/java/android/media/tv/TvInputInfo.java
index f0a9426..ec65ffe 100644
--- a/media/java/android/media/tv/TvInputInfo.java
+++ b/media/java/android/media/tv/TvInputInfo.java
@@ -105,7 +105,8 @@
public static final int TYPE_DISPLAY_PORT = 1008;
/**
- * The ID of the TV input to provide to the setup activity and settings activity.
+ * Used as a String extra field in setup intents created by {@link #createSetupIntent()} to
+ * supply the ID of a specific TV input to set up.
*/
public static final String EXTRA_INPUT_ID = "android.media.tv.extra.INPUT_ID";
@@ -113,14 +114,14 @@
private final String mId;
private final String mParentId;
private final int mType;
- private final int mTunerCount;
- private final boolean mCanRecord;
private final boolean mIsHardwareInput;
private final Bundle mExtras;
// Attributes from XML meta data.
private String mSetupActivity;
private String mSettingsActivity;
+ private boolean mCanRecord;
+ private int mTunerCount;
private HdmiDeviceInfo mHdmiDeviceInfo;
private int mLabelResId;
@@ -250,21 +251,17 @@
* {@code false} otherwise.
* @param isConnectedToHdmiSwitch Whether a CEC device for this TV input is connected to an HDMI
* switch, i.e., the device isn't directly connected to a HDMI port.
- * @param tunerCount The number of tuners this TV input has.
- * @param canRecord Whether this TV input can record TV programs.
*/
private TvInputInfo(ResolveInfo service, String id, String parentId, int type,
- boolean isHardwareInput, boolean isConnectedToHdmiSwitch, int tunerCount,
- boolean canRecord, Bundle extras) {
+ boolean isHardwareInput, boolean isConnectedToHdmiSwitch, Bundle extras) {
mService = service;
mId = id;
mParentId = parentId;
mType = type;
mIsHardwareInput = isHardwareInput;
mIsConnectedToHdmiSwitch = isConnectedToHdmiSwitch;
- mTunerCount = tunerCount;
- mCanRecord = canRecord;
mExtras = extras;
+ mTunerCount = type == TYPE_TUNER ? 1 : 0;
}
/**
@@ -791,19 +788,17 @@
type = TYPE_HDMI;
isHardwareInput = true;
isConnectedToHdmiSwitch = (mHdmiDeviceInfo.getPhysicalAddress() & 0x0FFF) != 0;
- mTunerCount = 0;
} else if (mTvInputHardwareInfo != null) {
id = generateInputId(componentName, mTvInputHardwareInfo);
type = sHardwareTypeToTvInputType.get(mTvInputHardwareInfo.getType(), TYPE_TUNER);
isHardwareInput = true;
- mTunerCount = 0;
} else {
id = generateInputId(componentName);
type = TYPE_TUNER;
}
TvInputInfo info = new TvInputInfo(mResolveInfo, id, mParentId, type, isHardwareInput,
- isConnectedToHdmiSwitch, mTunerCount, mCanRecord, mExtras);
+ isConnectedToHdmiSwitch, mExtras);
return parseServiceMetadata(type, info);
}
@@ -868,6 +863,12 @@
Log.d(TAG, "Settings activity loaded. [" + info.mSettingsActivity + "] for "
+ si.name);
}
+ info.mCanRecord = sa.getBoolean(
+ com.android.internal.R.styleable.TvInputService_canRecord, false);
+ info.mTunerCount = sa.getInt(
+ com.android.internal.R.styleable.TvInputService_tunerCount,
+ info.mTunerCount);
+
sa.recycle();
} catch (NameNotFoundException e) {
throw new XmlPullParserException("Unable to create context for: " + si.packageName);
diff --git a/media/java/android/media/tv/TvInputManager.java b/media/java/android/media/tv/TvInputManager.java
index 51aae90..2703b1a 100644
--- a/media/java/android/media/tv/TvInputManager.java
+++ b/media/java/android/media/tv/TvInputManager.java
@@ -266,6 +266,14 @@
public static final String META_DATA_CONTENT_RATING_SYSTEMS =
"android.media.tv.metadata.CONTENT_RATING_SYSTEMS";
+ /**
+ * Activity action to set up channel sources i.e. TV inputs of type
+ * {@link TvInputInfo#TYPE_TUNER}. When invoked, the system will display an appropriate UI for
+ * the user to initiate the individual setup flow provided by
+ * {@link android.R.attr#setupActivity} of each TV input service.
+ */
+ public static final String ACTION_SETUP_INPUTS = "android.media.tv.action.SETUP_INPUTS";
+
private final ITvInputManager mService;
private final Object mLock = new Object();
@@ -731,9 +739,7 @@
*
* <p>Because the system automatically creates a <code>TvInputInfo</code> object for each TV
* input based on the information collected from the <code>AndroidManifest.xml</code>, this
- * method is only called back when such information has changed dynamically or when the TV
- * input service implementation wants to pass additional information that is not specified
- * by the manifest file, such as ability to record and tuner count.
+ * method is only called back when such information has changed dynamically.
*
* @param inputInfo The <code>TvInputInfo</code> object that contains new information.
*/
diff --git a/media/java/android/media/tv/TvInputService.java b/media/java/android/media/tv/TvInputService.java
index da4a038..db851a3 100644
--- a/media/java/android/media/tv/TvInputService.java
+++ b/media/java/android/media/tv/TvInputService.java
@@ -262,10 +262,8 @@
*
* <p>The system automatically creates a <code>TvInputInfo</code> object for each TV input,
* based on the information collected from the <code>AndroidManifest.xml</code>, thus it is not
- * necessary to call this method unless such information has changed dynamically. This may be
- * also used to pass additional information that is not specified by the manifest file, such as
- * ability to record and tuner count. Use {@link TvInputInfo.Builder} to build a new
- * <code>TvInputInfo</code> object.
+ * necessary to call this method unless such information has changed dynamically.
+ * Use {@link TvInputInfo.Builder} to build a new <code>TvInputInfo</code> object.
*
* <p>Attempting to change information about a TV input that the calling package does not own
* does nothing.
diff --git a/media/jni/Android.mk b/media/jni/Android.mk
index a326f6f..fa9c48c 100644
--- a/media/jni/Android.mk
+++ b/media/jni/Android.mk
@@ -43,14 +43,10 @@
libcamera_client \
libmtp \
libusbhost \
- libjhead \
libexif \
libpiex \
libstagefright_amrnb_common
-LOCAL_REQUIRED_MODULES := \
- libjhead_jni
-
LOCAL_STATIC_LIBRARIES := \
libstagefright_amrnbenc
diff --git a/media/jni/android_media_ExifInterface.cpp b/media/jni/android_media_ExifInterface.cpp
index ba38569..a1fcb07 100644
--- a/media/jni/android_media_ExifInterface.cpp
+++ b/media/jni/android_media_ExifInterface.cpp
@@ -83,19 +83,18 @@
}
static jobject ExifInterface_getRawMetadata(
- JNIEnv* env, jclass /* clazz */, jstring jfilename) {
- const char* filenameChars = env->GetStringUTFChars(jfilename, NULL);
- if (filenameChars == NULL) {
+ JNIEnv* env, jclass /* clazz */, jobject jfileDescriptor) {
+ int fd = jniGetFDFromFileDescriptor(env, jfileDescriptor);
+ if (fd < 0) {
+ ALOGI("Invalid file descriptor");
return NULL;
}
- String8 filename(filenameChars);
- env->ReleaseStringUTFChars(jfilename, filenameChars);
piex::PreviewImageData image_data;
- std::unique_ptr<FileStream> stream(new FileStream(filename));
+ std::unique_ptr<FileStream> stream(new FileStream(fd));
- if (!GetExifFromRawImage(stream.get(), filename, image_data)) {
- ALOGI("Raw image not detected: %s", filename.string());
+ if (!GetExifFromRawImage(stream.get(), String8("[file descriptor]"), image_data)) {
+ ALOGI("Raw image not detected");
return NULL;
}
@@ -263,7 +262,7 @@
static JNINativeMethod gMethods[] = {
{ "initRawNative", "()V", (void *)ExifInterface_initRaw },
- { "getRawAttributesNative", "(Ljava/lang/String;)Ljava/util/HashMap;",
+ { "getRawAttributesNative", "(Ljava/io/FileDescriptor;)Ljava/util/HashMap;",
(void*)ExifInterface_getRawMetadata },
};
diff --git a/media/jni/android_media_Utils.cpp b/media/jni/android_media_Utils.cpp
index c08a5e3..9c4f7c4 100644
--- a/media/jni/android_media_Utils.cpp
+++ b/media/jni/android_media_Utils.cpp
@@ -28,6 +28,19 @@
namespace android {
+FileStream::FileStream(const int fd)
+ : mPosition(0),
+ mSize(0) {
+ mFile = fdopen(fd, "r");
+ if (mFile == NULL) {
+ return;
+ }
+ // Get the size.
+ fseek(mFile, 0l, SEEK_END);
+ mSize = ftell(mFile);
+ fseek(mFile, 0l, SEEK_SET);
+}
+
FileStream::FileStream(const String8 filename)
: mPosition(0),
mSize(0) {
diff --git a/media/jni/android_media_Utils.h b/media/jni/android_media_Utils.h
index 762c904..a30e1be 100644
--- a/media/jni/android_media_Utils.h
+++ b/media/jni/android_media_Utils.h
@@ -35,6 +35,7 @@
size_t mSize;
public:
+ FileStream(const int fd);
FileStream(const String8 filename);
~FileStream();
diff --git a/media/tests/MediaFrameworkTest/res/raw/image_exif_byte_order_ii.jpg b/media/tests/MediaFrameworkTest/res/raw/image_exif_byte_order_ii.jpg
new file mode 100644
index 0000000..477cd3a
--- /dev/null
+++ b/media/tests/MediaFrameworkTest/res/raw/image_exif_byte_order_ii.jpg
Binary files differ
diff --git a/media/tests/MediaFrameworkTest/res/raw/image_exif_byte_order_mm.jpg b/media/tests/MediaFrameworkTest/res/raw/image_exif_byte_order_mm.jpg
new file mode 100644
index 0000000..78ac703
--- /dev/null
+++ b/media/tests/MediaFrameworkTest/res/raw/image_exif_byte_order_mm.jpg
Binary files differ
diff --git a/media/tests/MediaFrameworkTest/res/raw/lg_g4_iso_800.dng b/media/tests/MediaFrameworkTest/res/raw/lg_g4_iso_800.dng
new file mode 100644
index 0000000..5fcc720
--- /dev/null
+++ b/media/tests/MediaFrameworkTest/res/raw/lg_g4_iso_800.dng
Binary files differ
diff --git a/media/tests/MediaFrameworkTest/res/values/exifinterface.xml b/media/tests/MediaFrameworkTest/res/values/exifinterface.xml
new file mode 100644
index 0000000..8fc6adc
--- /dev/null
+++ b/media/tests/MediaFrameworkTest/res/values/exifinterface.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<resources>
+ <array name="exifbyteorderii_jpg">
+ <item>true</item>
+ <item>512</item>
+ <item>288</item>
+ <item>false</item>
+ <item>0.0</item>
+ <item>0.0</item>
+ <item>0.0</item>
+ <item>SAMSUNG</item>
+ <item>SM-N900S</item>
+ <item>2.200</item>
+ <item>2016:01:29 18:32:27</item>
+ <item>0.033</item>
+ <item>0</item>
+ <item>413/100</item>
+ <item />
+ <item />
+ <item />
+ <item />
+ <item />
+ <item />
+ <item />
+ <item />
+ <item />
+ <item>480</item>
+ <item>640</item>
+ <item>50</item>
+ <item>6</item>
+ <item>0</item>
+ </array>
+ <array name="exifbyteordermm_jpg">
+ <item>false</item>
+ <item>0</item>
+ <item>0</item>
+ <item>true</item>
+ <item>0.0</item>
+ <item>0.0</item>
+ <item>0.0</item>
+ <item>LGE</item>
+ <item>Nexus 5</item>
+ <item>2.400</item>
+ <item>2016:01:29 15:44:58</item>
+ <item>0.017</item>
+ <item>0</item>
+ <item>3970/1000</item>
+ <item>0/1000</item>
+ <item>0</item>
+ <item>1970:01:01</item>
+ <item>0/1,0/1,0/10000</item>
+ <item>N</item>
+ <item>0/1,0/1,0/10000</item>
+ <item>E</item>
+ <item>GPS</item>
+ <item>00:00:00</item>
+ <item>176</item>
+ <item>144</item>
+ <item>146</item>
+ <item>0</item>
+ <item>0</item>
+ </array>
+ <array name="lg_g4_iso_800_dng">
+ <item>false</item>
+ <item>0</item>
+ <item>0</item>
+ <item>true</item>
+ <item>53.834507</item>
+ <item>10.69585</item>
+ <item>0.0</item>
+ <item>LGE</item>
+ <item>LG-H815</item>
+ <item>1.800</item>
+ <item>2015:11:12 16:46:18</item>
+ <item>0.0040</item>
+ <item>0.0</item>
+ <item>442/100</item>
+ <item>0/1</item>
+ <item>0</item>
+ <item>1970:01:17</item>
+ <item>53/1,50/1,423/100</item>
+ <item>N</item>
+ <item>10/1,41/1,4506/100</item>
+ <item>E</item>
+ <item />
+ <item>18:08:10</item>
+ <item>337</item>
+ <item>600</item>
+ <item>800</item>
+ <item>1</item>
+ <item />
+ </array>
+</resources>
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaFrameworkUnitTestRunner.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaFrameworkUnitTestRunner.java
index 11d9070..61dede3 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaFrameworkUnitTestRunner.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaFrameworkUnitTestRunner.java
@@ -50,6 +50,7 @@
addMediaScannerUnitTests(suite);
addCameraUnitTests(suite);
addImageReaderTests(suite);
+ addExifInterfaceTests(suite);
return suite;
}
@@ -109,4 +110,8 @@
private void addMediaScannerUnitTests(TestSuite suite) {
suite.addTestSuite(MediaInserterTest.class);
}
+
+ private void addExifInterfaceTests(TestSuite suite) {
+ suite.addTestSuite(ExifInterfaceTest.class);
+ }
}
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/ExifInterfaceTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/ExifInterfaceTest.java
new file mode 100644
index 0000000..1c80746
--- /dev/null
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/ExifInterfaceTest.java
@@ -0,0 +1,418 @@
+/*
+ * 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.mediaframeworktest.unit;
+
+import com.android.mediaframeworktest.R;
+
+import android.content.res.TypedArray;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.media.ExifInterface;
+import android.os.Environment;
+import android.os.ParcelFileDescriptor;
+import android.test.AndroidTestCase;
+import android.util.Log;
+import android.system.ErrnoException;
+import android.system.Os;
+import android.system.OsConstants;
+
+import java.io.File;
+import java.io.FileDescriptor;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.IOException;
+import java.lang.reflect.Type;
+
+import libcore.io.IoUtils;
+import libcore.io.Streams;
+
+public class ExifInterfaceTest extends AndroidTestCase {
+ private static final String TAG = ExifInterface.class.getSimpleName();
+ private static final boolean VERBOSE = false; // lots of logging
+
+ private static final double DIFFERENCE_TOLERANCE = .005;
+ private static final int BUFFER_SIZE = 32768;
+
+ // List of files.
+ private static final String EXIF_BYTE_ORDER_II_JPEG = "ExifByteOrderII.jpg";
+ private static final String EXIF_BYTE_ORDER_MM_JPEG = "ExifByteOrderMM.jpg";
+ private static final String LG_G4_ISO_800_DNG = "lg_g4_iso_800.dng";
+ private static final int[] IMAGE_RESOURCES = new int[] {
+ R.raw.image_exif_byte_order_ii, R.raw.image_exif_byte_order_mm, R.raw.lg_g4_iso_800 };
+ private static final String[] IMAGE_FILENAMES = new String[] {
+ EXIF_BYTE_ORDER_II_JPEG, EXIF_BYTE_ORDER_MM_JPEG, LG_G4_ISO_800_DNG };
+
+ private static final String[] EXIF_TAGS = {
+ ExifInterface.TAG_MAKE,
+ ExifInterface.TAG_MODEL,
+ ExifInterface.TAG_APERTURE,
+ ExifInterface.TAG_DATETIME,
+ ExifInterface.TAG_EXPOSURE_TIME,
+ ExifInterface.TAG_FLASH,
+ ExifInterface.TAG_FOCAL_LENGTH,
+ ExifInterface.TAG_GPS_ALTITUDE,
+ ExifInterface.TAG_GPS_ALTITUDE_REF,
+ ExifInterface.TAG_GPS_DATESTAMP,
+ ExifInterface.TAG_GPS_LATITUDE,
+ ExifInterface.TAG_GPS_LATITUDE_REF,
+ ExifInterface.TAG_GPS_LONGITUDE,
+ ExifInterface.TAG_GPS_LONGITUDE_REF,
+ ExifInterface.TAG_GPS_PROCESSING_METHOD,
+ ExifInterface.TAG_GPS_TIMESTAMP,
+ ExifInterface.TAG_IMAGE_LENGTH,
+ ExifInterface.TAG_IMAGE_WIDTH,
+ ExifInterface.TAG_ISO,
+ ExifInterface.TAG_ORIENTATION,
+ ExifInterface.TAG_WHITE_BALANCE
+ };
+
+ private static class ExpectedValue {
+ // Thumbnail information.
+ public final boolean hasThumbnail;
+ public final int thumbnailWidth;
+ public final int thumbnailHeight;
+
+ // GPS information.
+ public final boolean hasLatLong;
+ public final float latitude;
+ public final float longitude;
+ public final float altitude;
+
+ // Values.
+ public final String make;
+ public final String model;
+ public final float aperture;
+ public final String datetime;
+ public final float exposureTime;
+ public final float flash;
+ public final String focalLength;
+ public final String gpsAltitude;
+ public final String gpsAltitudeRef;
+ public final String gpsDatestamp;
+ public final String gpsLatitude;
+ public final String gpsLatitudeRef;
+ public final String gpsLongitude;
+ public final String gpsLongitudeRef;
+ public final String gpsProcessingMethod;
+ public final String gpsTimestamp;
+ public final String imageLength;
+ public final String imageWidth;
+ public final String iso;
+ public final String whiteBalance;
+ public final String orientation;
+
+ private static String getString(TypedArray typedArray, int index) {
+ String stringValue = typedArray.getString(index);
+ if (stringValue == null || stringValue.equals("")) {
+ return null;
+ }
+ return stringValue.trim();
+ }
+
+ public ExpectedValue(TypedArray typedArray) {
+ // Reads thumbnail information.
+ hasThumbnail = typedArray.getBoolean(0, false);
+ thumbnailWidth = typedArray.getInt(1, 0);
+ thumbnailHeight = typedArray.getInt(2, 0);
+
+ // Reads GPS information.
+ hasLatLong = typedArray.getBoolean(3, false);
+ latitude = typedArray.getFloat(4, 0f);
+ longitude = typedArray.getFloat(5, 0f);
+ altitude = typedArray.getFloat(6, 0f);
+
+ // Read values.
+ make = getString(typedArray, 7);
+ model = getString(typedArray, 8);
+ aperture = typedArray.getFloat(9, 0f);
+ datetime = getString(typedArray, 10);
+ exposureTime = typedArray.getFloat(11, 0f);
+ flash = typedArray.getFloat(12, 0f);
+ focalLength = getString(typedArray, 13);
+ gpsAltitude = getString(typedArray, 14);
+ gpsAltitudeRef = getString(typedArray, 15);
+ gpsDatestamp = getString(typedArray, 16);
+ gpsLatitude = getString(typedArray, 17);
+ gpsLatitudeRef = getString(typedArray, 18);
+ gpsLongitude = getString(typedArray, 19);
+ gpsLongitudeRef = getString(typedArray, 20);
+ gpsProcessingMethod = getString(typedArray, 21);
+ gpsTimestamp = getString(typedArray, 22);
+ imageLength = getString(typedArray, 23);
+ imageWidth = getString(typedArray, 24);
+ iso = getString(typedArray, 25);
+ orientation = getString(typedArray, 26);
+ whiteBalance = getString(typedArray, 27);
+
+ typedArray.recycle();
+ }
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ byte[] buffer = new byte[BUFFER_SIZE];
+
+ for (int i = 0; i < IMAGE_RESOURCES.length; ++i) {
+ String outputPath = new File(Environment.getExternalStorageDirectory(),
+ IMAGE_FILENAMES[i]).getAbsolutePath();
+ try (InputStream inputStream = getContext().getResources().openRawResource(
+ IMAGE_RESOURCES[i])) {
+ try (FileOutputStream outputStream = new FileOutputStream(outputPath)) {
+ Streams.copy(inputStream, outputStream);
+ }
+ }
+ }
+ super.setUp();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ for (int i = 0; i < IMAGE_RESOURCES.length; ++i) {
+ String imageFilePath = new File(Environment.getExternalStorageDirectory(),
+ IMAGE_FILENAMES[i]).getAbsolutePath();
+ File imageFile = new File(imageFilePath);
+ if (imageFile.exists()) {
+ imageFile.delete();
+ }
+ }
+
+ super.tearDown();
+ }
+
+ private void printExifTagsAndValues(String fileName, ExifInterface exifInterface) {
+ // Prints thumbnail information.
+ if (exifInterface.hasThumbnail()) {
+ byte[] thumbnailBytes = exifInterface.getThumbnail();
+ if (thumbnailBytes != null) {
+ Log.v(TAG, fileName + " Thumbnail size = " + thumbnailBytes.length);
+ Bitmap bitmap = BitmapFactory.decodeByteArray(
+ thumbnailBytes, 0, thumbnailBytes.length);
+ if (bitmap == null) {
+ Log.e(TAG, fileName + " Corrupted thumbnail!");
+ } else {
+ Log.v(TAG, fileName + " Thumbnail size: " + bitmap.getWidth() + ", "
+ + bitmap.getHeight());
+ }
+ } else {
+ Log.e(TAG, fileName + " Corrupted image (no thumbnail)");
+ }
+ } else {
+ if (exifInterface.getThumbnail() != null) {
+ Log.e(TAG, fileName + " Corrupted image (a thumbnail exists)");
+ } else {
+ Log.v(TAG, fileName + " No thumbnail");
+ }
+ }
+
+ // Prints GPS information.
+ Log.v(TAG, fileName + " Altitude = " + exifInterface.getAltitude(.0));
+
+ float[] latLong = new float[2];
+ if (exifInterface.getLatLong(latLong)) {
+ Log.v(TAG, fileName + " Latitude = " + latLong[0]);
+ Log.v(TAG, fileName + " Longitude = " + latLong[1]);
+ } else {
+ Log.v(TAG, fileName + "No latlong data");
+ }
+
+ // Prints values.
+ for (String tagKey : EXIF_TAGS) {
+ String tagValue = exifInterface.getAttribute(tagKey);
+ Log.v(TAG, fileName + "Key{" + tagKey + "} = '" + tagValue + "'");
+ }
+ }
+
+ private void compareFloatTag(ExifInterface exifInterface, String tag, float expectedValue) {
+ String stringValue = exifInterface.getAttribute(tag);
+ float floatValue = 0f;
+
+ if (stringValue != null) {
+ floatValue = Float.parseFloat(stringValue);
+ }
+
+ assertEquals(expectedValue, floatValue, DIFFERENCE_TOLERANCE);
+ }
+
+ private void compareStringTag(ExifInterface exifInterface, String tag, String expectedValue) {
+ String stringValue = exifInterface.getAttribute(tag);
+ if (stringValue != null) {
+ stringValue = stringValue.trim();
+ }
+
+ assertEquals(expectedValue, stringValue);
+ }
+
+ private void compareWithExpectedValue(ExifInterface exifInterface,
+ ExpectedValue expectedValue) {
+ // Checks a thumbnail image.
+ assertEquals(expectedValue.hasThumbnail, exifInterface.hasThumbnail());
+ if (expectedValue.hasThumbnail) {
+ byte[] thumbnailBytes = exifInterface.getThumbnail();
+ assertNotNull(thumbnailBytes);
+ Bitmap thumbnailBitmap =
+ BitmapFactory.decodeByteArray(thumbnailBytes, 0, thumbnailBytes.length);
+ assertNotNull(thumbnailBitmap);
+ assertEquals(expectedValue.thumbnailWidth, thumbnailBitmap.getWidth());
+ assertEquals(expectedValue.thumbnailHeight, thumbnailBitmap.getHeight());
+ } else {
+ assertNull(exifInterface.getThumbnail());
+ }
+
+ // Checks GPS information.
+ float[] latLong = new float[2];
+ assertEquals(expectedValue.hasLatLong, exifInterface.getLatLong(latLong));
+ if (expectedValue.hasLatLong) {
+ assertEquals(expectedValue.latitude, latLong[0], DIFFERENCE_TOLERANCE);
+ assertEquals(expectedValue.longitude, latLong[1], DIFFERENCE_TOLERANCE);
+ }
+ assertEquals(expectedValue.altitude, exifInterface.getAltitude(.0), DIFFERENCE_TOLERANCE);
+
+ // Checks values.
+ compareStringTag(exifInterface, ExifInterface.TAG_MAKE, expectedValue.make);
+ compareStringTag(exifInterface, ExifInterface.TAG_MODEL, expectedValue.model);
+ compareFloatTag(exifInterface, ExifInterface.TAG_APERTURE, expectedValue.aperture);
+ compareStringTag(exifInterface, ExifInterface.TAG_DATETIME, expectedValue.datetime);
+ compareFloatTag(exifInterface, ExifInterface.TAG_EXPOSURE_TIME, expectedValue.exposureTime);
+ compareFloatTag(exifInterface, ExifInterface.TAG_FLASH, expectedValue.flash);
+ compareStringTag(exifInterface, ExifInterface.TAG_FOCAL_LENGTH, expectedValue.focalLength);
+ compareStringTag(exifInterface, ExifInterface.TAG_GPS_ALTITUDE, expectedValue.gpsAltitude);
+ compareStringTag(exifInterface, ExifInterface.TAG_GPS_ALTITUDE_REF,
+ expectedValue.gpsAltitudeRef);
+ compareStringTag(exifInterface, ExifInterface.TAG_GPS_DATESTAMP,
+ expectedValue.gpsDatestamp);
+ compareStringTag(exifInterface, ExifInterface.TAG_GPS_LATITUDE, expectedValue.gpsLatitude);
+ compareStringTag(exifInterface, ExifInterface.TAG_GPS_LATITUDE_REF,
+ expectedValue.gpsLatitudeRef);
+ compareStringTag(exifInterface, ExifInterface.TAG_GPS_LONGITUDE,
+ expectedValue.gpsLongitude);
+ compareStringTag(exifInterface, ExifInterface.TAG_GPS_LONGITUDE_REF,
+ expectedValue.gpsLongitudeRef);
+ compareStringTag(exifInterface, ExifInterface.TAG_GPS_PROCESSING_METHOD,
+ expectedValue.gpsProcessingMethod);
+ compareStringTag(exifInterface, ExifInterface.TAG_GPS_TIMESTAMP,
+ expectedValue.gpsTimestamp);
+ compareStringTag(exifInterface, ExifInterface.TAG_IMAGE_LENGTH, expectedValue.imageLength);
+ compareStringTag(exifInterface, ExifInterface.TAG_IMAGE_WIDTH, expectedValue.imageWidth);
+ compareStringTag(exifInterface, ExifInterface.TAG_ISO, expectedValue.iso);
+ compareStringTag(exifInterface, ExifInterface.TAG_ORIENTATION, expectedValue.orientation);
+ compareStringTag(exifInterface, ExifInterface.TAG_WHITE_BALANCE,
+ expectedValue.whiteBalance);
+ }
+
+ private void testExifInterfaceForJpeg(String fileName, int typedArrayResourceId)
+ throws IOException {
+ ExpectedValue expectedValue = new ExpectedValue(
+ getContext().getResources().obtainTypedArray(typedArrayResourceId));
+ File imageFile = new File(Environment.getExternalStorageDirectory(), fileName);
+
+ // Created via path.
+ ExifInterface exifInterface = new ExifInterface(imageFile.getAbsolutePath());
+ if (VERBOSE) {
+ printExifTagsAndValues(fileName, exifInterface);
+ }
+ compareWithExpectedValue(exifInterface, expectedValue);
+
+ // Created via InputStream.
+ FileInputStream in = null;
+ try {
+ in = new FileInputStream(imageFile.getAbsolutePath());
+ exifInterface = new ExifInterface(in);
+ if (VERBOSE) {
+ printExifTagsAndValues(fileName, exifInterface);
+ }
+ compareWithExpectedValue(exifInterface, expectedValue);
+ } finally {
+ IoUtils.closeQuietly(in);
+ }
+
+ // Created via FileDescriptor.
+ try {
+ FileDescriptor fd = Os.open(imageFile.getAbsolutePath(), OsConstants.O_RDONLY, 0600);
+ exifInterface = new ExifInterface(fd);
+ if (VERBOSE) {
+ printExifTagsAndValues(fileName, exifInterface);
+ }
+ compareWithExpectedValue(exifInterface, expectedValue);
+ } catch (ErrnoException e) {
+ e.rethrowAsIOException();
+ }
+
+ // Test for saving attributes.
+ try {
+ FileDescriptor fd = Os.open(imageFile.getAbsolutePath(), OsConstants.O_RDWR, 0600);
+ exifInterface = new ExifInterface(fd);
+ exifInterface.saveAttributes();
+ exifInterface = new ExifInterface(fd);
+ if (VERBOSE) {
+ printExifTagsAndValues(fileName, exifInterface);
+ }
+ compareWithExpectedValue(exifInterface, expectedValue);
+ } catch (ErrnoException e) {
+ e.rethrowAsIOException();
+ }
+
+ // Test for modifying one attribute.
+ exifInterface = new ExifInterface(imageFile.getAbsolutePath());
+ exifInterface.setAttribute(ExifInterface.TAG_MAKE, "abc");
+ exifInterface.saveAttributes();
+ exifInterface = new ExifInterface(imageFile.getAbsolutePath());
+ if (VERBOSE) {
+ printExifTagsAndValues(fileName, exifInterface);
+ }
+ assertEquals("abc", exifInterface.getAttribute(ExifInterface.TAG_MAKE));
+ }
+
+ private void testExifInterfaceForRaw(String fileName, int typedArrayResourceId)
+ throws IOException {
+ ExpectedValue expectedValue = new ExpectedValue(
+ getContext().getResources().obtainTypedArray(typedArrayResourceId));
+ File imageFile = new File(Environment.getExternalStorageDirectory(), fileName);
+
+ // Created via path.
+ ExifInterface exifInterface = new ExifInterface(imageFile.getAbsolutePath());
+ if (VERBOSE) {
+ printExifTagsAndValues(fileName, exifInterface);
+ }
+ compareWithExpectedValue(exifInterface, expectedValue);
+
+ // Created via FileDescriptor.
+ FileInputStream in = null;
+ try {
+ in = new FileInputStream(imageFile);
+ exifInterface = new ExifInterface(in.getFD());
+ if (VERBOSE) {
+ printExifTagsAndValues(fileName, exifInterface);
+ }
+ compareWithExpectedValue(exifInterface, expectedValue);
+ } finally {
+ IoUtils.closeQuietly(in);
+ }
+ }
+
+ public void testReadExifDataFromExifByteOrderIIJpeg() throws Throwable {
+ testExifInterfaceForJpeg(EXIF_BYTE_ORDER_II_JPEG, R.array.exifbyteorderii_jpg);
+ }
+
+ public void testReadExifDataFromExifByteOrderMMJpeg() throws Throwable {
+ testExifInterfaceForJpeg(EXIF_BYTE_ORDER_MM_JPEG, R.array.exifbyteordermm_jpg);
+ }
+
+ public void testReadExifDataFromLgG4Iso800Dng() throws Throwable {
+ testExifInterfaceForRaw(LG_G4_ISO_800_DNG, R.array.lg_g4_iso_800_dng);
+ }
+}
diff --git a/opengl/java/android/opengl/GLES30.java b/opengl/java/android/opengl/GLES30.java
index 342ffa4..9c3b505 100644
--- a/opengl/java/android/opengl/GLES30.java
+++ b/opengl/java/android/opengl/GLES30.java
@@ -1791,4 +1791,16 @@
java.nio.IntBuffer params
);
+ // C function void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLint offset )
+
+ public static native void glReadPixels(
+ int x,
+ int y,
+ int width,
+ int height,
+ int format,
+ int type,
+ int offset
+ );
+
}
diff --git a/packages/DocumentsUI/Android.mk b/packages/DocumentsUI/Android.mk
index 1a4e3eb..e1650e1 100644
--- a/packages/DocumentsUI/Android.mk
+++ b/packages/DocumentsUI/Android.mk
@@ -8,6 +8,7 @@
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4
# The design lib requires that the client package use appcompat themes.
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-appcompat
+LOCAL_STATIC_JAVA_LIBRARIES += android-support-v13
# Supplies material design components, e.g. Snackbar.
LOCAL_STATIC_JAVA_LIBRARIES += android-support-design
LOCAL_STATIC_JAVA_LIBRARIES += android-support-v7-recyclerview
diff --git a/packages/DocumentsUI/res/layout/item_dir_grid.xml b/packages/DocumentsUI/res/layout/item_dir_grid.xml
index d866145..a4f06d1 100644
--- a/packages/DocumentsUI/res/layout/item_dir_grid.xml
+++ b/packages/DocumentsUI/res/layout/item_dir_grid.xml
@@ -62,7 +62,7 @@
android:id="@android:id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:ellipsize="middle"
+ android:ellipsize="end"
android:singleLine="true"
android:textAlignment="viewStart"
android:textAppearance="@android:style/TextAppearance.Material.Subhead"
diff --git a/packages/DocumentsUI/res/layout/item_doc_grid.xml b/packages/DocumentsUI/res/layout/item_doc_grid.xml
index 1890f2f..af1703f 100644
--- a/packages/DocumentsUI/res/layout/item_doc_grid.xml
+++ b/packages/DocumentsUI/res/layout/item_doc_grid.xml
@@ -90,7 +90,7 @@
android:layout_alignParentTop="true"
android:layout_toEndOf="@id/icon_mime_sm"
android:singleLine="true"
- android:ellipsize="middle"
+ android:ellipsize="end"
android:textAlignment="viewStart"
android:textAppearance="@android:style/TextAppearance.Material.Subhead"
android:textColor="@*android:color/primary_text_default_material_light" />
diff --git a/packages/DocumentsUI/res/layout/item_doc_list.xml b/packages/DocumentsUI/res/layout/item_doc_list.xml
index 8d98377..b169ec8 100644
--- a/packages/DocumentsUI/res/layout/item_doc_list.xml
+++ b/packages/DocumentsUI/res/layout/item_doc_list.xml
@@ -80,7 +80,7 @@
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
- android:ellipsize="middle"
+ android:ellipsize="end"
android:singleLine="true"
android:textAlignment="viewStart"
android:textAppearance="@android:style/TextAppearance.Material.Subhead"
diff --git a/packages/DocumentsUI/res/layout/item_subdir.xml b/packages/DocumentsUI/res/layout/item_subdir.xml
index 821432d..b8251d1 100644
--- a/packages/DocumentsUI/res/layout/item_subdir.xml
+++ b/packages/DocumentsUI/res/layout/item_subdir.xml
@@ -40,7 +40,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:singleLine="true"
- android:ellipsize="middle"
+ android:ellipsize="end"
android:textAlignment="viewStart"
android:textAppearance="@android:style/TextAppearance.Material.Subhead"
android:textColor="?android:attr/textColorPrimary" />
diff --git a/packages/DocumentsUI/res/layout/item_subdir_title.xml b/packages/DocumentsUI/res/layout/item_subdir_title.xml
index 4c839d0..de6c523 100644
--- a/packages/DocumentsUI/res/layout/item_subdir_title.xml
+++ b/packages/DocumentsUI/res/layout/item_subdir_title.xml
@@ -26,7 +26,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
- android:ellipsize="middle"
+ android:ellipsize="end"
android:textAlignment="viewStart"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title" />
diff --git a/packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java b/packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java
index 845e32c..95c49ff 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/BaseActivity.java
@@ -33,7 +33,6 @@
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.ProviderInfo;
-import android.database.Cursor;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
@@ -66,9 +65,6 @@
public abstract class BaseActivity extends Activity
implements SearchManagerListener, NavigationView.Environment {
- // See comments where this const is referenced for details.
- private static final int DRAWER_NO_FIDDLE_DELAY = 1500;
-
State mState;
RootsCache mRoots;
SearchViewManager mSearchManager;
@@ -80,10 +76,6 @@
@LayoutRes
private int mLayoutId;
- // Track the time we opened the drawer in response to back being pressed.
- // We use the time gap to figure out whether to close app or reopen the drawer.
- private long mDrawerLastFiddled;
-
private boolean mNavDrawerHasFocus;
public abstract void onDocumentPicked(DocumentInfo doc, Model model);
@@ -368,6 +360,11 @@
invalidateOptionsMenu();
}
+ final void loadRoot(final Uri uri) {
+ new LoadRootTask(this, uri).executeOnExecutor(
+ ProviderExecutor.forAuthority(uri.getAuthority()));
+ }
+
/**
* Called when search results changed.
* Refreshes the content of the directory. It doesn't refresh elements on the action bar.
@@ -543,36 +540,18 @@
return;
}
- int size = mState.stack.size();
-
- // Do some "do what a I want" drawer fiddling, but don't
- // do it if user already hit back recently and we recently
- // did some fiddling.
- if (mDrawer.isPresent()
- && (System.currentTimeMillis() - mDrawerLastFiddled) > DRAWER_NO_FIDDLE_DELAY) {
- // Close drawer if it is open.
- if (mDrawer.isOpen()) {
- mDrawer.setOpen(false);
- mDrawerLastFiddled = System.currentTimeMillis();
- return;
- }
-
- // Open the Close drawer if it is closed and we're at the top of a root.
- if (size == 1) {
- mDrawer.setOpen(true);
- // Remember so we don't just close it again if back is pressed again.
- mDrawerLastFiddled = System.currentTimeMillis();
- return;
- }
- }
-
- if (popDir()) {
+ if (onBeforePopDir() || popDir()) {
return;
}
super.onBackPressed();
}
+ boolean onBeforePopDir() {
+ // Files app overrides this with some fancy logic.
+ return false;
+ }
+
public void onStackPicked(DocumentStack stack) {
try {
// Update the restored stack to ensure we have freshest data
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
index 6ecdc90..ed531a8 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/DocumentsActivity.java
@@ -95,13 +95,27 @@
RootsFragment.show(getFragmentManager(), null);
}
- if (!mState.restored) {
- // In this case, we set the activity title in AsyncTask.onPostExecute(). To prevent
- // talkback from reading aloud the default title, we clear it here.
- setTitle("");
- new RestoreStackTask(this).execute();
- } else {
+ if (mState.restored) {
refreshCurrentRootAndDirectory(ANIM_NONE);
+ } else {
+ // We set the activity title in AsyncTask.onPostExecute().
+ // To prevent talkback from reading aloud the default title, we clear it here.
+ setTitle("");
+
+ // As a matter of policy we don't load the last used stack for the copy
+ // destination picker (user is already in Files app).
+ // Concensus was that the experice was too confusing.
+ // In all other cases, where the user is visiting us from another app
+ // we restore the stack as last used from that app.
+ if (mState.action == ACTION_PICK_COPY_DESTINATION) {
+ if (DEBUG) Log.d(TAG, "Launching directly into Home directory.");
+ Uri homeUri = DocumentsContract.buildHomeUri();
+ new LoadRootTask(this, homeUri).executeOnExecutor(
+ ProviderExecutor.forAuthority(homeUri.getAuthority()));
+ } else {
+ if (DEBUG) Log.d(TAG, "Attempting to load last used stack for calling package.");
+ new LoadLastUsedStackTask(this).execute();
+ }
}
}
@@ -443,16 +457,19 @@
}
/**
- * Restores the stack from Recents for the specified package.
+ * Loads the last used path (stack) from Recents (history).
+ * The path selected is based on the calling package name. So the last
+ * path for an app like Gmail can be different than the last path
+ * for an app like DropBox.
*/
- private static final class RestoreStackTask
+ private static final class LoadLastUsedStackTask
extends PairedTask<DocumentsActivity, Void, Void> {
private volatile boolean mRestoredStack;
private volatile boolean mExternal;
private State mState;
- public RestoreStackTask(DocumentsActivity activity) {
+ public LoadLastUsedStackTask(DocumentsActivity activity) {
super(activity);
mState = activity.mState;
}
diff --git a/packages/DocumentsUI/src/com/android/documentsui/DownloadsActivity.java b/packages/DocumentsUI/src/com/android/documentsui/DownloadsActivity.java
index 9609dee..536feeb 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/DownloadsActivity.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/DownloadsActivity.java
@@ -71,7 +71,7 @@
// talkback from reading aloud the default title, we clear it here.
setTitle("");
final Uri rootUri = getIntent().getData();
- new RestoreRootTask(this, rootUri).executeOnExecutor(getExecutorForCurrentDirectory());
+ new LoadRootTask(this, rootUri).executeOnExecutor(getExecutorForCurrentDirectory());
} else {
refreshCurrentRootAndDirectory(ANIM_NONE);
}
diff --git a/packages/DocumentsUI/src/com/android/documentsui/FilesActivity.java b/packages/DocumentsUI/src/com/android/documentsui/FilesActivity.java
index 8b42ac5..a3378ad 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/FilesActivity.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/FilesActivity.java
@@ -62,6 +62,12 @@
public static final String TAG = "FilesActivity";
+ // See comments where this const is referenced for details.
+ private static final int DRAWER_NO_FIDDLE_DELAY = 1500;
+
+ // Track the time we opened the drawer in response to back being pressed.
+ // We use the time gap to figure out whether to close app or reopen the drawer.
+ private long mDrawerLastFiddled;
private DocumentClipper mClipper;
public FilesActivity() {
@@ -102,14 +108,12 @@
if (DEBUG) Log.d(TAG, "Launching with root URI.");
// If we've got a specific root to display, restore that root using a dedicated
// authority. That way a misbehaving provider won't result in an ANR.
- new RestoreRootTask(this, uri).executeOnExecutor(
- ProviderExecutor.forAuthority(uri.getAuthority()));
+ loadRoot(uri);
} else {
if (DEBUG) Log.d(TAG, "Launching into Home directory.");
// If all else fails, try to load "Home" directory.
final Uri homeUri = DocumentsContract.buildHomeUri();
- new RestoreRootTask(this, homeUri).executeOnExecutor(
- ProviderExecutor.forAuthority(homeUri.getAuthority()));
+ loadRoot(homeUri);
}
final @DialogType int dialogType = intent.getIntExtra(
@@ -340,6 +344,34 @@
}
}
+ // Do some "do what a I want" drawer fiddling, but don't
+ // do it if user already hit back recently and we recently
+ // did some fiddling.
+ @Override
+ boolean onBeforePopDir() {
+ int size = mState.stack.size();
+
+ if (mDrawer.isPresent()
+ && (System.currentTimeMillis() - mDrawerLastFiddled) > DRAWER_NO_FIDDLE_DELAY) {
+ // Close drawer if it is open.
+ if (mDrawer.isOpen()) {
+ mDrawer.setOpen(false);
+ mDrawerLastFiddled = System.currentTimeMillis();
+ return true;
+ }
+
+ // Open the Close drawer if it is closed and we're at the top of a root.
+ if (size == 1) {
+ mDrawer.setOpen(true);
+ // Remember so we don't just close it again if back is pressed again.
+ mDrawerLastFiddled = System.currentTimeMillis();
+ return true;
+ }
+ }
+
+ return false;
+ }
+
// Turns out only DocumentsActivity was ever calling saveStackBlocking.
// There may be a case where we want to contribute entries from
// Behavior here in FilesActivity, but it isn't yet obvious.
diff --git a/packages/DocumentsUI/src/com/android/documentsui/RestoreRootTask.java b/packages/DocumentsUI/src/com/android/documentsui/LoadRootTask.java
similarity index 90%
rename from packages/DocumentsUI/src/com/android/documentsui/RestoreRootTask.java
rename to packages/DocumentsUI/src/com/android/documentsui/LoadRootTask.java
index 9048b9d..c5d359b 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/RestoreRootTask.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/LoadRootTask.java
@@ -22,12 +22,12 @@
import com.android.documentsui.model.RootInfo;
-final class RestoreRootTask extends PairedTask<BaseActivity, Void, RootInfo> {
+final class LoadRootTask extends PairedTask<BaseActivity, Void, RootInfo> {
private static final String TAG = "RestoreRootTask";
private final Uri mRootUri;
- public RestoreRootTask(BaseActivity activity, Uri rootUri) {
+ public LoadRootTask(BaseActivity activity, Uri rootUri) {
super(activity);
mRootUri = rootUri;
}
diff --git a/packages/DocumentsUI/src/com/android/documentsui/RecentsProvider.java b/packages/DocumentsUI/src/com/android/documentsui/RecentsProvider.java
index 92ffb93..e1b1c09 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/RecentsProvider.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/RecentsProvider.java
@@ -95,6 +95,7 @@
public static final String PACKAGE_NAME = "package_name";
public static final String STACK = "stack";
public static final String TIMESTAMP = "timestamp";
+ // Indicates handler was an external app, like photos.
public static final String EXTERNAL = "external";
}
diff --git a/packages/DocumentsUI/src/com/android/documentsui/State.java b/packages/DocumentsUI/src/com/android/documentsui/State.java
index 2ecbdf6..62f9ea7 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/State.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/State.java
@@ -157,11 +157,13 @@
mStackTouched = true;
}
+ // This will return true even when the initial location is set.
+ // To get a read on if the user has changed something, use #hasInitialLocationChanged.
public boolean hasLocationChanged() {
return mStackTouched;
}
- public boolean initialLocationHasChanged() {
+ public boolean hasInitialLocationChanged() {
return mInitialRootChanged || mInitialDocChanged;
}
diff --git a/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java b/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
index 7138c2d..90c2d1b 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
@@ -52,6 +52,7 @@
import android.provider.DocumentsContract.Document;
import android.support.annotation.Nullable;
import android.support.design.widget.Snackbar;
+import android.support.v13.view.DragStartHelper;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.GridLayoutManager.SpanSizeLookup;
import android.support.v7.widget.RecyclerView;
@@ -72,7 +73,6 @@
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
-import android.view.ViewParent;
import android.widget.ImageView;
import android.widget.TextView;
@@ -258,7 +258,8 @@
}
mRecView.setLayoutManager(mLayout);
- mGestureDetector = new ListeningGestureDetector(this.getContext(), new GestureListener());
+ mGestureDetector =
+ new ListeningGestureDetector(this.getContext(), mDragHelper, new GestureListener());
mRecView.addOnItemTouchListener(mGestureDetector);
@@ -1051,7 +1052,7 @@
view.setOnDragListener(mOnDragListener);
}
- view.setOnLongClickListener(mLongClickListener);
+ view.setOnLongClickListener(mDragHelper);
}
private View.OnDragListener mOnDragListener = new View.OnDragListener() {
@@ -1062,11 +1063,15 @@
// TODO: Check if the event contains droppable data.
return true;
- // TODO: Highlight potential drop target directory?
// TODO: Expand drop target directory on hover?
case DragEvent.ACTION_DRAG_ENTERED:
- case DragEvent.ACTION_DRAG_LOCATION:
+ setDropTargetHighlight(v, true);
+ return true;
case DragEvent.ACTION_DRAG_EXITED:
+ setDropTargetHighlight(v, false);
+ return true;
+
+ case DragEvent.ACTION_DRAG_LOCATION:
case DragEvent.ACTION_DRAG_ENDED:
return true;
@@ -1080,10 +1085,24 @@
// TODO: Do not drop into the directory where the documents came from.
}
copyFromClipData(event.getClipData(), dstDir);
+ // Clean up the UI.
+ setDropTargetHighlight(v, false);
+ mSelectionManager.clearSelection();
return true;
}
return false;
}
+
+ private void setDropTargetHighlight(View v, boolean highlight) {
+ // Note: use exact comparison - this code is searching for views which are children of
+ // the RecyclerView instance in the UI.
+ if (v.getParent() == mRecView) {
+ RecyclerView.ViewHolder vh = mRecView.getChildViewHolder(v);
+ if (vh instanceof DocumentHolder) {
+ ((DocumentHolder) vh).setHighlighted(highlight);
+ }
+ }
+ }
};
/**
@@ -1109,21 +1128,14 @@
* a document item view.
*/
private String getModelId(View view) {
- while (true) {
- if (view.getLayoutParams() instanceof RecyclerView.LayoutParams) {
- RecyclerView.ViewHolder vh = mRecView.getChildViewHolder(view);
- if (vh instanceof DocumentHolder) {
- return ((DocumentHolder) vh).modelId;
- } else {
- return null;
- }
+ View itemView = mRecView.findContainingItemView(view);
+ if (itemView != null) {
+ RecyclerView.ViewHolder vh = mRecView.getChildViewHolder(itemView);
+ if (vh instanceof DocumentHolder) {
+ return ((DocumentHolder) vh).modelId;
}
- ViewParent parent = view.getParent();
- if (parent == null || !(parent instanceof View)) {
- return null;
- }
- view = (View) parent;
}
+ return null;
}
private List<DocumentInfo> getDraggableDocuments(View currentItemView) {
@@ -1236,6 +1248,11 @@
return false;
}
+ // Ignore tab key events. Those should be handled by the top-level key handler.
+ if (keyCode == KeyEvent.KEYCODE_TAB) {
+ return false;
+ }
+
if (mFocusManager.handleKey(doc, keyCode, event)) {
// Handle range selection adjustments. Extending the selection will adjust the
// bounds of the in-progress range selection. Each time an unshifted navigation
@@ -1299,10 +1316,10 @@
}
}
- private View.OnLongClickListener mLongClickListener = new View.OnLongClickListener() {
+ private DragStartHelper mDragHelper = new DragStartHelper(null) {
@Override
- public boolean onLongClick(View v) {
- if (mGestureDetector.mouseSpawnedLastEvent()) {
+ protected boolean onDragStart(View v) {
+ if (isSelected(getModelId(v))) {
List<DocumentInfo> docs = getDraggableDocuments(v);
if (docs.isEmpty()) {
return false;
@@ -1328,9 +1345,12 @@
implements OnItemTouchListener {
private int mLastTool = -1;
+ private DragStartHelper mDragHelper;
- public ListeningGestureDetector(Context context, GestureListener listener) {
+ public ListeningGestureDetector(
+ Context context, DragStartHelper dragHelper, GestureListener listener) {
super(context, listener);
+ mDragHelper = dragHelper;
setOnDoubleTapListener(listener);
}
@@ -1345,12 +1365,27 @@
@Override
public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) {
mLastTool = e.getToolType(0);
- onTouchEvent(e); // bounce this forward to our detecty heart
+
+ // Detect drag events. When a drag is detected, intercept the rest of the gesture.
+ View itemView = rv.findChildViewUnder(e.getX(), e.getY());
+ if (itemView != null && mDragHelper.handleTouch(itemView, e)) {
+ return true;
+ }
+ // Forward unhandled events to the GestureDetector.
+ onTouchEvent(e);
+
return false;
}
@Override
- public void onTouchEvent(RecyclerView rv, MotionEvent e) {}
+ public void onTouchEvent(RecyclerView rv, MotionEvent e) {
+ View itemView = rv.findChildViewUnder(e.getX(), e.getY());
+ mDragHelper.handleTouch(itemView, e);
+ // Note: even though this event is being handled as part of a drag gesture, continue
+ // forwarding to the GestureDetector. The detector needs to see the entire cluster of
+ // events in order to properly interpret gestures.
+ onTouchEvent(e);
+ }
@Override
public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) {}
diff --git a/packages/DocumentsUI/src/com/android/documentsui/dirlist/DocumentHolder.java b/packages/DocumentsUI/src/com/android/documentsui/dirlist/DocumentHolder.java
index 1bfc6e9..2967a90 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/dirlist/DocumentHolder.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/dirlist/DocumentHolder.java
@@ -75,11 +75,25 @@
*/
public abstract void bind(Cursor cursor, String modelId, State state);
+ /**
+ * Makes the associated item view appear selected. Note that this merely affects the appearance
+ * of the view, it doesn't actually select the item.
+ *
+ * @param selected
+ */
public void setSelected(boolean selected) {
itemView.setActivated(selected);
itemView.setBackgroundColor(selected ? mSelectedItemColor : mDefaultItemColor);
}
+ /**
+ * Highlights the associated item view.
+ * @param highlighted
+ */
+ public void setHighlighted(boolean highlighted) {
+ itemView.setBackgroundColor(highlighted ? mSelectedItemColor : mDefaultItemColor);
+ }
+
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
// Event listener should always be set.
diff --git a/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java b/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java
index 7f867d5..ac05c05 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java
@@ -18,7 +18,11 @@
import static com.android.documentsui.model.DocumentInfo.getCursorString;
+import android.annotation.Nullable;
import android.content.Context;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.SystemClock;
import android.provider.DocumentsContract.Document;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
@@ -38,6 +42,8 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Timer;
+import java.util.TimerTask;
/**
* A class that handles navigation and focus within the DirectoryFragment.
@@ -113,6 +119,11 @@
* Requests focus on the item that last had focus. Scrolls to that item if necessary.
*/
public void restoreLastFocus() {
+ if (mAdapter.getItemCount() == 0) {
+ // Nothing to focus.
+ return;
+ }
+
if (mLastFocusPosition != RecyclerView.NO_POSITION) {
// The system takes care of situations when a view is no longer on screen, etc,
focusItem(mLastFocusPosition);
@@ -254,10 +265,23 @@
* @param pos
*/
private void focusItem(final int pos) {
+ focusItem(pos, null);
+ }
+
+ /**
+ * Requests focus for the item in the given adapter position, scrolling the RecyclerView if
+ * necessary.
+ *
+ * @param pos
+ * @param callback A callback to call after the given item has been focused.
+ */
+ private void focusItem(final int pos, @Nullable final FocusCallback callback) {
// If the item is already in view, focus it; otherwise, scroll to it and focus it.
RecyclerView.ViewHolder vh = mView.findViewHolderForAdapterPosition(pos);
if (vh != null) {
- vh.itemView.requestFocus();
+ if (vh.itemView.requestFocus() && callback != null) {
+ callback.onFocus(vh.itemView);
+ }
} else {
// Set a one-time listener to request focus when the scroll has completed.
mView.addOnScrollListener(
@@ -269,7 +293,9 @@
RecyclerView.ViewHolder vh =
view.findViewHolderForAdapterPosition(pos);
if (vh != null) {
- vh.itemView.requestFocus();
+ if (vh.itemView.requestFocus() && callback != null) {
+ callback.onFocus(vh.itemView);
+ }
} else {
// This might happen in weird corner cases, e.g. if the user is
// scrolling while a delete operation is in progress. In that
@@ -291,6 +317,10 @@
return mLayout.getSpanCount() > 1;
}
+ private interface FocusCallback {
+ public void onFocus(View view);
+ }
+
/**
* A helper class for handling type-to-focus. Instantiate this class, and pass it KeyEvents via
* the {@link #handleKey(DocumentHolder, int, KeyEvent)} method. The class internally will build
@@ -299,15 +329,24 @@
* highlights instances of the search term found in the view.
*/
private class TitleSearchHelper {
- final private KeyListener mTextListener = new TextKeyListener(Capitalize.NONE, false);
- final private Editable mSearchString = Editable.Factory.getInstance().newEditable("");
- final private Highlighter mHighlighter = new Highlighter();
- final private BackgroundColorSpan mSpan;
+ static private final int SEARCH_TIMEOUT = 500; // ms
+
+ private final KeyListener mTextListener = new TextKeyListener(Capitalize.NONE, false);
+ private final Editable mSearchString = Editable.Factory.getInstance().newEditable("");
+ private final Highlighter mHighlighter = new Highlighter();
+ private final BackgroundColorSpan mSpan;
+
private List<String> mIndex;
private boolean mActive;
+ private Timer mTimer;
+ private KeyEvent mLastEvent;
+ private Handler mUiRunner;
public TitleSearchHelper(Context context) {
mSpan = new BackgroundColorSpan(context.getColor(R.color.accent_dark));
+ // Handler for running things on the main UI thread. Needed for updating the UI from a
+ // timer (see #activate, below).
+ mUiRunner = new Handler(Looper.getMainLooper());
}
/**
@@ -325,7 +364,7 @@
case KeyEvent.KEYCODE_ENTER:
if (mActive) {
// These keys end any active searches.
- deactivate();
+ endSearch();
return true;
} else {
// Don't handle these key events if there is no active search.
@@ -333,7 +372,9 @@
}
case KeyEvent.KEYCODE_SPACE:
// This allows users to search for files with spaces in their names, but ignores
- // spacebar events when a text search is not active.
+ // spacebar events when a text search is not active. Ignoring the spacebar
+ // event is necessary because other handlers (see FocusManager#handleKey) also
+ // listen for and handle it.
if (!mActive) {
return false;
}
@@ -341,7 +382,7 @@
// Navigation keys also end active searches.
if (Events.isNavigationKeyCode(keyCode)) {
- deactivate();
+ endSearch();
// Don't handle the keycode, so navigation still occurs.
return false;
}
@@ -350,20 +391,17 @@
boolean handled = mTextListener.onKeyDown(doc.itemView, mSearchString, keyCode, event);
// Delete is processed by the text listener, but not "handled". Check separately for it.
- if (handled || keyCode == KeyEvent.KEYCODE_DEL) {
- String searchString = mSearchString.toString();
- if (searchString.length() == 0) {
+ if (keyCode == KeyEvent.KEYCODE_DEL) {
+ handled = true;
+ }
+
+ if (handled) {
+ mLastEvent = event;
+ if (mSearchString.length() == 0) {
// Don't perform empty searches.
return false;
}
- activate();
- for (int pos = 0; pos < mIndex.size(); pos++) {
- String title = mIndex.get(pos);
- if (title != null && title.startsWith(searchString)) {
- focusItem(pos);
- break;
- }
- }
+ search();
}
return handled;
@@ -373,10 +411,17 @@
* Activates the search helper, which changes its key handling and updates the search index
* and highlights if necessary. Call this each time the search term is updated.
*/
- private void activate() {
+ private void search() {
if (!mActive) {
- // Install listeners.
+ // The model listener invalidates the search index when the model changes.
mModel.addUpdateListener(mModelListener);
+
+ // Used to keep the current search alive until the timeout expires. If the user
+ // presses another key within that time, that keystroke is added to the current
+ // search. Otherwise, the current search ends, and subsequent keystrokes start a new
+ // search.
+ mTimer = new Timer();
+ mActive = true;
}
// If the search index was invalidated, rebuild it
@@ -384,71 +429,42 @@
buildIndex();
}
- // TODO: Uncomment this to enable search term highlighting in the UI.
-// mHighlighter.activate();
-
- mActive = true;
- }
-
- /**
- * Deactivates the search helper (see {@link #activate()}). Call this when a search ends.
- */
- private void deactivate() {
- if (mActive) {
- // Remove listeners.
- mModel.removeUpdateListener(mModelListener);
- }
-
- // TODO: Uncomment this when search-term highlighting is enabled in the UI.
-// mHighlighter.deactivate();
-
- mIndex = null;
- mSearchString.clear();
- mActive = false;
- }
-
- /**
- * Applies title highlights to the given view. The view must have a title field that is a
- * spannable text field. If this condition is not met, this function does nothing.
- *
- * @param view
- */
- private void applyHighlight(View view) {
- TextView titleView = (TextView) view.findViewById(android.R.id.title);
- if (titleView == null) {
- return;
- }
-
- String searchString = mSearchString.toString();
- CharSequence tmpText = titleView.getText();
- if (tmpText instanceof Spannable) {
- Spannable title = (Spannable) tmpText;
- String titleString = title.toString();
- if (titleString.startsWith(searchString)) {
- title.setSpan(mSpan, 0, searchString.length(),
- Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
- } else {
- title.removeSpan(mSpan);
+ // Search for the current search term.
+ // Perform case-insensitive search.
+ String searchString = mSearchString.toString().toLowerCase();
+ for (int pos = 0; pos < mIndex.size(); pos++) {
+ String title = mIndex.get(pos);
+ if (title != null && title.startsWith(searchString)) {
+ focusItem(pos, new FocusCallback() {
+ @Override
+ public void onFocus(View view) {
+ mHighlighter.applyHighlight(view);
+ // Using a timer repeat period of SEARCH_TIMEOUT/2 means the amount of
+ // time between the last keystroke and a search expiring is actually
+ // between 500 and 750 ms. A smaller timer period results in less
+ // variability but does more polling.
+ mTimer.schedule(new TimeoutTask(), 0, SEARCH_TIMEOUT / 2);
+ }
+ });
+ break;
}
}
}
/**
- * Removes title highlights from the given view. The view must have a title field that is a
- * spannable text field. If this condition is not met, this function does nothing.
- *
- * @param view
+ * Ends the current search (see {@link #search()}.
*/
- private void removeHighlight(View view) {
- TextView titleView = (TextView) view.findViewById(android.R.id.title);
- if (titleView == null) {
- return;
+ private void endSearch() {
+ if (mActive) {
+ mModel.removeUpdateListener(mModelListener);
+ mTimer.cancel();
}
- CharSequence tmpText = titleView.getText();
- if (tmpText instanceof Spannable) {
- ((Spannable) tmpText).removeSpan(mSpan);
- }
+ mHighlighter.removeHighlight();
+
+ mIndex = null;
+ mSearchString.clear();
+ mActive = false;
}
/**
@@ -461,8 +477,10 @@
for (int i = 0; i < itemCount; i++) {
String modelId = mAdapter.getModelId(i);
if (modelId != null) {
- index.add(
- getCursorString(mModel.getItem(modelId), Document.COLUMN_DISPLAY_NAME));
+ String title =
+ getCursorString(mModel.getItem(modelId), Document.COLUMN_DISPLAY_NAME);
+ // Perform case-insensitive search.
+ index.add(title.toLowerCase());
} else {
index.add("");
}
@@ -484,43 +502,58 @@
}
};
- private class Highlighter implements RecyclerView.OnChildAttachStateChangeListener {
- /**
- * Starts highlighting instances of the current search term in the UI.
- */
- public void activate() {
- // Update highlights on all views
- int itemCount = mView.getChildCount();
- for (int i = 0; i < itemCount; i++) {
- applyHighlight(mView.getChildAt(i));
+ private class TimeoutTask extends TimerTask {
+ @Override
+ public void run() {
+ long last = mLastEvent.getEventTime();
+ long now = SystemClock.uptimeMillis();
+ if ((now - last) > SEARCH_TIMEOUT) {
+ // endSearch must run on the main thread because it does UI work
+ mUiRunner.post(new Runnable() {
+ @Override
+ public void run() {
+ endSearch();
+ }
+ });
}
- // Keep highlights up-to-date as items come in and out of view.
- mView.addOnChildAttachStateChangeListener(this);
}
+ };
+
+ private class Highlighter {
+ private Spannable mCurrentHighlight;
/**
- * Stops highlighting instances of the current search term in the UI.
+ * Applies title highlights to the given view. The view must have a title field that is a
+ * spannable text field. If this condition is not met, this function does nothing.
+ *
+ * @param view
*/
- public void deactivate() {
- // Remove highlights on all views
- int itemCount = mView.getChildCount();
- for (int i = 0; i < itemCount; i++) {
- removeHighlight(mView.getChildAt(i));
- }
- // Stop updating highlights.
- mView.removeOnChildAttachStateChangeListener(this);
- }
-
- @Override
- public void onChildViewAttachedToWindow(View view) {
- applyHighlight(view);
- }
-
- @Override
- public void onChildViewDetachedFromWindow(View view) {
+ private void applyHighlight(View view) {
TextView titleView = (TextView) view.findViewById(android.R.id.title);
- if (titleView != null) {
- removeHighlight(titleView);
+ if (titleView == null) {
+ return;
+ }
+
+ CharSequence tmpText = titleView.getText();
+ if (tmpText instanceof Spannable) {
+ if (mCurrentHighlight != null) {
+ mCurrentHighlight.removeSpan(mSpan);
+ }
+ mCurrentHighlight = (Spannable) tmpText;
+ mCurrentHighlight.setSpan(
+ mSpan, 0, mSearchString.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
+ }
+ }
+
+ /**
+ * Removes title highlights from the given view. The view must have a title field that is a
+ * spannable text field. If this condition is not met, this function does nothing.
+ *
+ * @param view
+ */
+ private void removeHighlight() {
+ if (mCurrentHighlight != null) {
+ mCurrentHighlight.removeSpan(mSpan);
}
}
};
diff --git a/packages/DocumentsUI/src/com/android/documentsui/dirlist/FragmentTuner.java b/packages/DocumentsUI/src/com/android/documentsui/dirlist/FragmentTuner.java
index 59efed6..8ef89103 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/dirlist/FragmentTuner.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/dirlist/FragmentTuner.java
@@ -16,7 +16,6 @@
package com.android.documentsui.dirlist;
-import static com.android.documentsui.Shared.DEBUG;
import static com.android.documentsui.State.ACTION_BROWSE;
import static com.android.documentsui.State.ACTION_CREATE;
import static com.android.documentsui.State.ACTION_GET_CONTENT;
@@ -27,12 +26,10 @@
import android.content.Context;
import android.provider.DocumentsContract.Document;
-import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
-import com.android.documentsui.DocumentsActivity;
-import com.android.documentsui.FilesActivity;
+import com.android.documentsui.BaseActivity;
import com.android.documentsui.Menus;
import com.android.documentsui.MimePredicate;
import com.android.documentsui.R;
@@ -155,11 +152,10 @@
@Override
void onModelLoaded(Model model, @ResultType int resultType, boolean isSearch) {
- // When launched into empty recents, show drawer
- if (resultType == DirectoryFragment.TYPE_RECENT_OPEN
- && model.isEmpty()
- && !mState.hasLocationChanged()) {
- ((DocumentsActivity) mContext).setRootsDrawerOpen(true);
+ // When launched into empty root, open drawer.
+ if (model.isEmpty() && !mState.hasInitialLocationChanged() && !isSearch) {
+ // This noops on layouts without drawer, so no need to guard.
+ ((BaseActivity) mContext).setRootsDrawerOpen(true);
}
}
}
@@ -204,8 +200,6 @@
*/
private static final class FilesTuner extends FragmentTuner {
- private static final String TAG = "FilesTuner";
-
public FilesTuner(Context context, State state) {
super(context, state);
}
@@ -234,20 +228,15 @@
@Override
void onModelLoaded(Model model, @ResultType int resultType, boolean isSearch) {
- if (DEBUG) Log.d(TAG, "Handling model loaded. Has Location shcnage: " + mState.initialLocationHasChanged());
// When launched into empty root, open drawer.
- if (model.isEmpty() && !mState.initialLocationHasChanged() && !isSearch) {
- if (DEBUG) Log.d(TAG, "Showing roots drawer cuz stuffs empty.");
-
+ if (model.isEmpty() && !mState.hasInitialLocationChanged() && !isSearch) {
// This noops on layouts without drawer, so no need to guard.
- ((FilesActivity) mContext).setRootsDrawerOpen(true);
+ ((BaseActivity) mContext).setRootsDrawerOpen(true);
}
- if (DEBUG) Log.d(TAG, "Donezo.");
}
}
private static boolean isDirectory(String mimeType) {
return Document.MIME_TYPE_DIR.equals(mimeType);
}
-
}
diff --git a/packages/DocumentsUI/src/com/android/documentsui/dirlist/GridDirectoryHolder.java b/packages/DocumentsUI/src/com/android/documentsui/dirlist/GridDirectoryHolder.java
index e672327..a0ff1b5 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/dirlist/GridDirectoryHolder.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/dirlist/GridDirectoryHolder.java
@@ -63,6 +63,7 @@
this.modelId = modelId;
final String docDisplayName = getCursorString(cursor, Document.COLUMN_DISPLAY_NAME);
- mTitle.setText(docDisplayName);
+ mTitle.setText(docDisplayName, TextView.BufferType.SPANNABLE);
+
}
}
diff --git a/packages/DocumentsUI/src/com/android/documentsui/services/ResourceException.java b/packages/DocumentsUI/src/com/android/documentsui/services/ResourceException.java
index 9c6b51c..7d3d91a 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/services/ResourceException.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/services/ResourceException.java
@@ -24,11 +24,11 @@
}
public ResourceException(String message, Uri uri1, Exception e) {
- super(message.format(uri1.toString()), e);
+ super(String.format(message, uri1.toString()), e);
}
public ResourceException(String message, Uri uri1, Uri uri2, Exception e) {
- super(message.format(uri1.toString(), uri2.toString()), e);
+ super(String.format(message, uri1.toString(), uri2.toString()), e);
}
public ResourceException(String message) {
@@ -36,7 +36,7 @@
}
public ResourceException(String message, Uri uri1) {
- super(message.format(uri1.toString()));
+ super(String.format(message, uri1.toString()));
}
public ResourceException(String message, Uri uri1, Uri uri2) {
diff --git a/packages/DocumentsUI/tests/src/com/android/documentsui/ActivityTest.java b/packages/DocumentsUI/tests/src/com/android/documentsui/ActivityTest.java
index 08d366a..adcfef3 100644
--- a/packages/DocumentsUI/tests/src/com/android/documentsui/ActivityTest.java
+++ b/packages/DocumentsUI/tests/src/com/android/documentsui/ActivityTest.java
@@ -20,6 +20,7 @@
import static com.android.documentsui.StubProvider.ROOT_0_ID;
import static com.android.documentsui.StubProvider.ROOT_1_ID;
+import android.annotation.Nullable;
import android.app.Activity;
import android.content.ContentProviderClient;
import android.content.ContentResolver;
@@ -72,6 +73,17 @@
super(activityClass);
}
+ /*
+ * Returns the root that will be opened within the activity.
+ * By default tests are started with one of the test roots.
+ * Override the method if you want to open different root on start.
+ * @return Root that will be opened. Return null if you want to open activity's default root.
+ */
+ @Nullable
+ protected RootInfo getInitialRoot() {
+ return rootDir0;
+ }
+
@Override
public void setUp() throws Exception {
device = UiDevice.getInstance(getInstrumentation());
@@ -106,6 +118,9 @@
final Intent intent = context.getPackageManager().getLaunchIntentForPackage(
UiBot.TARGET_PKG);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
+ if (getInitialRoot() != null) {
+ intent.setData(getInitialRoot().getUri());
+ }
setActivityIntent(intent);
getActivity(); // Launch the activity.
}
@@ -127,13 +142,11 @@
}
void assertDefaultContentOfTestDir0() throws UiObjectNotFoundException {
- bots.roots.openRoot(ROOT_0_ID);
bots.directory.assertDocumentsCount(4);
bots.directory.assertDocumentsPresent(fileName1, fileName2, dirName1, fileNameNoRename);
}
void assertDefaultContentOfTestDir1() throws UiObjectNotFoundException {
- bots.roots.openRoot(ROOT_1_ID);
bots.directory.assertDocumentsCount(2);
bots.directory.assertDocumentsPresent(fileName3, fileName4);
}
diff --git a/packages/DocumentsUI/tests/src/com/android/documentsui/FilesActivityUiTest.java b/packages/DocumentsUI/tests/src/com/android/documentsui/FilesActivityUiTest.java
index 1ffef05..38e1257 100644
--- a/packages/DocumentsUI/tests/src/com/android/documentsui/FilesActivityUiTest.java
+++ b/packages/DocumentsUI/tests/src/com/android/documentsui/FilesActivityUiTest.java
@@ -23,6 +23,8 @@
import android.test.suitebuilder.annotation.LargeTest;
import android.view.KeyEvent;
+import com.android.documentsui.model.RootInfo;
+
@LargeTest
public class FilesActivityUiTest extends ActivityTest<FilesActivity> {
@@ -31,6 +33,11 @@
}
@Override
+ protected RootInfo getInitialRoot() {
+ return null;
+ }
+
+ @Override
public void initTestFiles() throws RemoteException {
mDocsHelper.createDocument(rootDir0, "text/plain", "file0.log");
mDocsHelper.createDocument(rootDir0, "image/png", "file1.png");
diff --git a/packages/DocumentsUI/tests/src/com/android/documentsui/RenameDocumentUiTest.java b/packages/DocumentsUI/tests/src/com/android/documentsui/RenameDocumentUiTest.java
index b866033..2833418 100644
--- a/packages/DocumentsUI/tests/src/com/android/documentsui/RenameDocumentUiTest.java
+++ b/packages/DocumentsUI/tests/src/com/android/documentsui/RenameDocumentUiTest.java
@@ -33,7 +33,6 @@
public void setUp() throws Exception {
super.setUp();
initTestFiles();
- bots.roots.openRoot(ROOT_0_ID);
}
public void testRenameEnabled_SingleSelection() throws Exception {
diff --git a/packages/DocumentsUI/tests/src/com/android/documentsui/RootsUiTest.java b/packages/DocumentsUI/tests/src/com/android/documentsui/RootsUiTest.java
index dc41a2c4..6141832 100644
--- a/packages/DocumentsUI/tests/src/com/android/documentsui/RootsUiTest.java
+++ b/packages/DocumentsUI/tests/src/com/android/documentsui/RootsUiTest.java
@@ -33,7 +33,6 @@
public void setUp() throws Exception {
super.setUp();
initTestFiles();
- bots.roots.openRoot(ROOT_0_ID);
}
public void testRootTapped_GoToRootFromChildDir() throws Exception {
diff --git a/packages/DocumentsUI/tests/src/com/android/documentsui/SearchViewUiTest.java b/packages/DocumentsUI/tests/src/com/android/documentsui/SearchViewUiTest.java
index 478c70c..8c3fd90 100644
--- a/packages/DocumentsUI/tests/src/com/android/documentsui/SearchViewUiTest.java
+++ b/packages/DocumentsUI/tests/src/com/android/documentsui/SearchViewUiTest.java
@@ -53,7 +53,6 @@
public void testSearch_ResultsFound() throws Exception {
initTestFiles();
- bots.roots.openRoot(ROOT_0_ID);
assertDefaultContentOfTestDir0();
String query = "file1";
@@ -71,7 +70,6 @@
public void testSearchResultsFound_ClearsOnBack() throws Exception {
initTestFiles();
- bots.roots.openRoot(ROOT_0_ID);
assertDefaultContentOfTestDir0();
String query = fileName1;
@@ -86,7 +84,6 @@
public void testSearch_NoResults() throws Exception {
initTestFiles();
- bots.roots.openRoot(ROOT_0_ID);
assertDefaultContentOfTestDir0();
String query = "chocolate";
@@ -106,7 +103,6 @@
public void testSearchNoResults_ClearsOnBack() throws Exception {
initTestFiles();
- bots.roots.openRoot(ROOT_0_ID);
assertDefaultContentOfTestDir0();
String query = "chocolate";
@@ -122,7 +118,6 @@
public void testSearchResultsFound_ClearsOnDirectoryChange() throws Exception {
initTestFiles();
- bots.roots.openRoot(ROOT_0_ID);
assertDefaultContentOfTestDir0();
String query = fileName1;
diff --git a/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java b/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java
index 90b5c09..712dbcb 100644
--- a/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java
+++ b/packages/MtpDocumentsProvider/src/com/android/mtp/DocumentLoader.java
@@ -16,6 +16,8 @@
package com.android.mtp;
+import android.annotation.Nullable;
+import android.annotation.WorkerThread;
import android.content.ContentResolver;
import android.database.Cursor;
import android.mtp.MtpObjectInfo;
@@ -25,6 +27,8 @@
import android.provider.DocumentsContract;
import android.util.Log;
+import com.android.internal.util.Preconditions;
+
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
@@ -38,23 +42,135 @@
* background thread to load the rest documents and caches its result for next requests.
* TODO: Rename this class to ObjectInfoLoader
*/
-class DocumentLoader {
+class DocumentLoader implements AutoCloseable {
static final int NUM_INITIAL_ENTRIES = 10;
static final int NUM_LOADING_ENTRIES = 20;
static final int NOTIFY_PERIOD_MS = 500;
+ private final int mDeviceId;
private final MtpManager mMtpManager;
private final ContentResolver mResolver;
private final MtpDatabase mDatabase;
private final TaskList mTaskList = new TaskList();
- private boolean mHasBackgroundThread = false;
+ private Thread mBackgroundThread;
- DocumentLoader(MtpManager mtpManager, ContentResolver resolver, MtpDatabase database) {
+ DocumentLoader(int deviceId, MtpManager mtpManager, ContentResolver resolver,
+ MtpDatabase database) {
+ mDeviceId = deviceId;
mMtpManager = mtpManager;
mResolver = resolver;
mDatabase = database;
}
+ /**
+ * Queries the child documents of given parent.
+ * It loads the first NUM_INITIAL_ENTRIES of object info, then launches the background thread
+ * to load the rest.
+ */
+ synchronized Cursor queryChildDocuments(String[] columnNames, Identifier parent)
+ throws IOException {
+ Preconditions.checkArgument(parent.mDeviceId == mDeviceId);
+ LoaderTask task = mTaskList.findTask(parent);
+ if (task == null) {
+ if (parent.mDocumentId == null) {
+ throw new FileNotFoundException("Parent not found.");
+ }
+ // TODO: Handle nit race around here.
+ // 1. getObjectHandles.
+ // 2. putNewDocument.
+ // 3. startAddingChildDocuemnts.
+ // 4. stopAddingChildDocuments - It removes the new document added at the step 2,
+ // because it is not updated between start/stopAddingChildDocuments.
+ task = LoaderTask.create(mDatabase, mMtpManager, parent);
+ task.fillDocuments(loadDocuments(
+ mMtpManager,
+ parent.mDeviceId,
+ task.getUnloadedObjectHandles(NUM_INITIAL_ENTRIES)));
+ } else {
+ // Once remove the existing task in order to add it to the head of the list.
+ mTaskList.remove(task);
+ }
+
+ mTaskList.addFirst(task);
+ if (task.getState() == LoaderTask.STATE_LOADING) {
+ resume();
+ }
+ return task.createCursor(mResolver, columnNames);
+ }
+
+ /**
+ * Resumes a background thread.
+ */
+ synchronized void resume() {
+ if (mBackgroundThread == null) {
+ mBackgroundThread = new BackgroundLoaderThread();
+ mBackgroundThread.start();
+ }
+ }
+
+ /**
+ * Obtains next task to be run in background thread, or release the reference to background
+ * thread.
+ *
+ * Worker thread that receives null task needs to exit.
+ */
+ @WorkerThread
+ synchronized @Nullable LoaderTask getNextTaskOrReleaseBackgroundThread() {
+ Preconditions.checkState(mBackgroundThread != null);
+
+ final LoaderTask task = mTaskList.findRunningTask();
+ if (task != null) {
+ return task;
+ }
+
+ final Identifier identifier = mDatabase.getUnmappedDocumentsParent(mDeviceId);
+ if (identifier != null) {
+ final LoaderTask existingTask = mTaskList.findTask(identifier);
+ if (existingTask != null) {
+ Preconditions.checkState(existingTask.getState() != LoaderTask.STATE_LOADING);
+ mTaskList.remove(existingTask);
+ }
+ try {
+ final LoaderTask newTask = LoaderTask.create(mDatabase, mMtpManager, identifier);
+ mTaskList.addFirst(newTask);
+ return newTask;
+ } catch (IOException exception) {
+ Log.e(MtpDocumentsProvider.TAG, "Failed to create a task for mapping", exception);
+ // Continue to release the background thread.
+ }
+ }
+
+ mBackgroundThread = null;
+ return null;
+ }
+
+ /**
+ * Terminates background thread.
+ */
+ @Override
+ public void close() throws InterruptedException {
+ final Thread thread;
+ synchronized (this) {
+ mTaskList.clear();
+ thread = mBackgroundThread;
+ }
+ if (thread != null) {
+ thread.interrupt();
+ thread.join();
+ }
+ }
+
+ synchronized void clearCompletedTasks() {
+ mTaskList.clearCompletedTasks();
+ }
+
+ synchronized void clearTask(Identifier parentIdentifier) {
+ mTaskList.clearTask(parentIdentifier);
+ }
+
+ /**
+ * Helper method to loads multiple object info.
+ */
private static MtpObjectInfo[] loadDocuments(MtpManager manager, int deviceId, int[] handles)
throws IOException {
final ArrayList<MtpObjectInfo> objects = new ArrayList<>();
@@ -70,78 +186,27 @@
return objects.toArray(new MtpObjectInfo[objects.size()]);
}
- synchronized Cursor queryChildDocuments(String[] columnNames, Identifier parent)
- throws IOException {
- LoaderTask task = mTaskList.findTask(parent);
- if (task == null) {
- if (parent.mDocumentId == null) {
- throw new FileNotFoundException("Parent not found.");
- }
-
- int parentHandle = parent.mObjectHandle;
- // Need to pass the special value MtpManager.OBJECT_HANDLE_ROOT_CHILDREN to
- // getObjectHandles if we would like to obtain children under the root.
- if (parent.mDocumentType == MtpDatabaseConstants.DOCUMENT_TYPE_STORAGE) {
- parentHandle = MtpManager.OBJECT_HANDLE_ROOT_CHILDREN;
- }
- // TODO: Handle nit race around here.
- // 1. getObjectHandles.
- // 2. putNewDocument.
- // 3. startAddingChildDocuemnts.
- // 4. stopAddingChildDocuments - It removes the new document added at the step 2,
- // because it is not updated between start/stopAddingChildDocuments.
- task = new LoaderTask(mDatabase, parent, mMtpManager.getObjectHandles(
- parent.mDeviceId, parent.mStorageId, parentHandle));
- task.fillDocuments(loadDocuments(
- mMtpManager,
- parent.mDeviceId,
- task.getUnloadedObjectHandles(NUM_INITIAL_ENTRIES)));
- } else {
- // Once remove the existing task in order to add it to the head of the list.
- mTaskList.remove(task);
- }
-
- mTaskList.addFirst(task);
- if (task.getState() == LoaderTask.STATE_LOADING && !mHasBackgroundThread) {
- mHasBackgroundThread = true;
- new BackgroundLoaderThread().start();
- }
- return task.createCursor(mResolver, columnNames);
- }
-
- synchronized void clearTasks() {
- mTaskList.clear();
- }
-
- synchronized void clearCompletedTasks() {
- mTaskList.clearCompletedTasks();
- }
-
- synchronized void clearTask(Identifier parentIdentifier) {
- mTaskList.clearTask(parentIdentifier);
- }
-
+ /**
+ * Background thread to fetch object info.
+ */
private class BackgroundLoaderThread extends Thread {
+ /**
+ * Finds task that needs to be processed, then loads NUM_LOADING_ENTRIES of object info and
+ * store them to the database. If it does not find a task, exits the thread.
+ */
@Override
public void run() {
Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);
- while (true) {
- LoaderTask task;
- int deviceId;
- int[] handles;
- synchronized (DocumentLoader.this) {
- task = mTaskList.findRunningTask();
- if (task == null) {
- mHasBackgroundThread = false;
- return;
- }
- deviceId = task.mIdentifier.mDeviceId;
- handles = task.getUnloadedObjectHandles(NUM_LOADING_ENTRIES);
+ while (!Thread.interrupted()) {
+ final LoaderTask task = getNextTaskOrReleaseBackgroundThread();
+ if (task == null) {
+ return;
}
-
try {
- final MtpObjectInfo[] objectInfos =
- loadDocuments(mMtpManager, deviceId, handles);
+ final MtpObjectInfo[] objectInfos = loadDocuments(
+ mMtpManager,
+ task.mIdentifier.mDeviceId,
+ task.getUnloadedObjectHandles(NUM_LOADING_ENTRIES));
task.fillDocuments(objectInfos);
final boolean shouldNotify =
task.mLastNotified.getTime() <
@@ -157,6 +222,9 @@
}
}
+ /**
+ * Task list that has helper methods to search/clear tasks.
+ */
private static class TaskList extends LinkedList<LoaderTask> {
LoaderTask findTask(Identifier parent) {
for (int i = 0; i < size(); i++) {
@@ -197,6 +265,10 @@
}
}
+ /**
+ * Loader task.
+ * Each task is responsible for fetching child documents for the given parent document.
+ */
private static class LoaderTask {
static final int STATE_LOADING = 0;
static final int STATE_COMPLETED = 1;
@@ -217,6 +289,11 @@
mLastNotified = new Date();
}
+ /**
+ * Returns a cursor that traverses the child document of the parent document handled by the
+ * task.
+ * The returned task may have a EXTRA_LOADING flag.
+ */
Cursor createCursor(ContentResolver resolver, String[] columnNames) throws IOException {
final Bundle extras = new Bundle();
switch (getState()) {
@@ -235,6 +312,9 @@
return cursor;
}
+ /**
+ * Returns a state of the task.
+ */
int getState() {
if (mError != null) {
return STATE_ERROR;
@@ -245,6 +325,9 @@
}
}
+ /**
+ * Obtains object handles that have not been loaded yet.
+ */
int[] getUnloadedObjectHandles(int count) {
return Arrays.copyOfRange(
mObjectHandles,
@@ -252,11 +335,17 @@
Math.min(mNumLoaded + count, mObjectHandles.length));
}
+ /**
+ * Notifies a change of child list of the document.
+ */
void notify(ContentResolver resolver) {
resolver.notifyChange(createUri(), null, false);
mLastNotified = new Date();
}
+ /**
+ * Stores object information into database.
+ */
void fillDocuments(MtpObjectInfo[] objectInfoList) {
if (objectInfoList.length == 0 || getState() != STATE_LOADING) {
return;
@@ -276,6 +365,9 @@
}
}
+ /**
+ * Marks the loading task as error.
+ */
void setError(Exception error) {
final int lastState = getState();
setErrorInternal(error);
@@ -298,5 +390,20 @@
return DocumentsContract.buildChildDocumentsUri(
MtpDocumentsProvider.AUTHORITY, mIdentifier.mDocumentId);
}
+
+ /**
+ * Creates a LoaderTask that loads children of the given document.
+ */
+ static LoaderTask create(MtpDatabase database, MtpManager manager, Identifier parent)
+ throws IOException {
+ int parentHandle = parent.mObjectHandle;
+ // Need to pass the special value MtpManager.OBJECT_HANDLE_ROOT_CHILDREN to
+ // getObjectHandles if we would like to obtain children under the root.
+ if (parent.mDocumentType == MtpDatabaseConstants.DOCUMENT_TYPE_STORAGE) {
+ parentHandle = MtpManager.OBJECT_HANDLE_ROOT_CHILDREN;
+ }
+ return new LoaderTask(database, parent, manager.getObjectHandles(
+ parent.mDeviceId, parent.mStorageId, parentHandle));
+ }
}
}
diff --git a/packages/MtpDocumentsProvider/src/com/android/mtp/Mapper.java b/packages/MtpDocumentsProvider/src/com/android/mtp/Mapper.java
index 5e3417a..9578e6b 100644
--- a/packages/MtpDocumentsProvider/src/com/android/mtp/Mapper.java
+++ b/packages/MtpDocumentsProvider/src/com/android/mtp/Mapper.java
@@ -162,9 +162,8 @@
/**
* Starts adding new documents.
- * The methods decides mapping mode depends on if all documents under the given parent have MTP
- * identifier or not. If all the documents have MTP identifier, it uses the identifier to find
- * a corresponding existing row. Otherwise it does heuristic.
+ * It changes the direct child documents of the given document from VALID to INVALIDATED.
+ * Note that it keeps DISCONNECTED documents as they are.
*
* @param parentDocumentId Parent document ID or NULL for root documents.
* @throws FileNotFoundException
@@ -286,12 +285,16 @@
}
/**
- * Maps 'pending' document and 'invalidated' document that shares the same column of groupKey.
- * If the database does not find corresponding 'invalidated' document, it just removes
- * 'invalidated' document from the database.
+ * Stops adding documents.
+ * It handles 'invalidated' and 'disconnected' documents which we don't put corresponding
+ * documents so far.
+ * If the type adding document is 'device' or 'storage', the document may appear again
+ * afterward. The method marks such documents as 'disconnected'. If the type of adding document
+ * is 'object', it seems the documents are really removed from the remote MTP device. So the
+ * method deletes the metadata from the database.
*
* @param parentId Parent document ID or null for root documents.
- * @return Whether the methods adds or removed visible rows.
+ * @return Whether the methods changes file metadata in database.
* @throws FileNotFoundException
*/
boolean stopAddingDocuments(@Nullable String parentId) throws FileNotFoundException {
@@ -313,7 +316,9 @@
mInMappingIds.remove(parentId);
boolean changed = false;
- // Delete/disconnect all invalidated rows that cannot be mapped.
+ // Delete/disconnect all invalidated/disconnected rows that cannot be mapped.
+ // If parentIdentifier is null, added documents are devices.
+ // if parentIdentifier is DOCUMENT_TYPE_DEVICE, added documents are storages.
final boolean keepUnmatchedDocument =
parentIdentifier == null ||
parentIdentifier.mDocumentType == DOCUMENT_TYPE_DEVICE;
@@ -325,8 +330,9 @@
}
} else {
if (mDatabase.deleteDocumentsAndRootsRecursively(
- COLUMN_ROW_STATE + " = ? AND " + selection,
- DatabaseUtils.appendSelectionArgs(strings(ROW_STATE_INVALIDATED), args))) {
+ COLUMN_ROW_STATE + " IN (?, ?) AND " + selection,
+ DatabaseUtils.appendSelectionArgs(
+ strings(ROW_STATE_INVALIDATED, ROW_STATE_DISCONNECTED), args))) {
changed = true;
}
}
@@ -404,12 +410,7 @@
return null;
}
try {
- final Identifier identifier = mDatabase.createIdentifier(parentId);
- if (mDatabase.getRowState(parentId) == ROW_STATE_DISCONNECTED) {
- throw new FileNotFoundException(
- "document: " + parentId + " is in disconnected device.");
- }
- return identifier;
+ return mDatabase.createIdentifier(parentId);
} catch (FileNotFoundException error) {
mInMappingIds.remove(parentId);
throw error;
diff --git a/packages/MtpDocumentsProvider/src/com/android/mtp/MtpDatabase.java b/packages/MtpDocumentsProvider/src/com/android/mtp/MtpDatabase.java
index ca5c799..e14109a 100644
--- a/packages/MtpDocumentsProvider/src/com/android/mtp/MtpDatabase.java
+++ b/packages/MtpDocumentsProvider/src/com/android/mtp/MtpDatabase.java
@@ -40,6 +40,7 @@
import com.android.internal.util.Preconditions;
import java.io.FileNotFoundException;
+import java.io.IOException;
import java.util.Objects;
/**
@@ -406,15 +407,15 @@
COLUMN_STORAGE_ID,
COLUMN_OBJECT_HANDLE,
COLUMN_DOCUMENT_TYPE),
- SELECTION_DOCUMENT_ID,
- strings(documentId),
+ SELECTION_DOCUMENT_ID + " AND " + COLUMN_ROW_STATE + " IN (?, ?)",
+ strings(documentId, ROW_STATE_VALID, ROW_STATE_INVALIDATED),
null,
null,
null,
"1");
try {
if (cursor.getCount() == 0) {
- throw new FileNotFoundException("ID is not found.");
+ throw new FileNotFoundException("ID \"" + documentId + "\" is not found.");
} else {
cursor.moveToNext();
return new Identifier(
@@ -598,6 +599,48 @@
}
}
+ /**
+ * Obtains a document that has already mapped but has unmapped children.
+ * @param deviceId Device to find documents.
+ * @return Identifier of found document or null.
+ */
+ public @Nullable Identifier getUnmappedDocumentsParent(int deviceId) {
+ final String fromClosure =
+ TABLE_DOCUMENTS + " AS child INNER JOIN " +
+ TABLE_DOCUMENTS + " AS parent ON " +
+ "child." + COLUMN_PARENT_DOCUMENT_ID + " = " +
+ "parent." + Document.COLUMN_DOCUMENT_ID;
+ final String whereClosure =
+ "parent." + COLUMN_DEVICE_ID + " = ? AND " +
+ "parent." + COLUMN_ROW_STATE + " IN (?, ?) AND " +
+ "child." + COLUMN_ROW_STATE + " = ?";
+ try (final Cursor cursor = mDatabase.query(
+ fromClosure,
+ strings("parent." + COLUMN_DEVICE_ID,
+ "parent." + COLUMN_STORAGE_ID,
+ "parent." + COLUMN_OBJECT_HANDLE,
+ "parent." + Document.COLUMN_DOCUMENT_ID,
+ "parent." + COLUMN_DOCUMENT_TYPE),
+ whereClosure,
+ strings(deviceId, ROW_STATE_VALID, ROW_STATE_INVALIDATED,
+ ROW_STATE_DISCONNECTED),
+ null,
+ null,
+ null,
+ "1")) {
+ if (cursor.getCount() == 0) {
+ return null;
+ }
+ cursor.moveToNext();
+ return new Identifier(
+ cursor.getInt(0),
+ cursor.getInt(1),
+ cursor.getInt(2),
+ cursor.getString(3),
+ cursor.getInt(4));
+ }
+ }
+
private static class OpenHelper extends SQLiteOpenHelper {
public OpenHelper(Context context, int flags) {
super(context,
diff --git a/packages/MtpDocumentsProvider/src/com/android/mtp/MtpDocumentsProvider.java b/packages/MtpDocumentsProvider/src/com/android/mtp/MtpDocumentsProvider.java
index d329e3c..4849978 100644
--- a/packages/MtpDocumentsProvider/src/com/android/mtp/MtpDocumentsProvider.java
+++ b/packages/MtpDocumentsProvider/src/com/android/mtp/MtpDocumentsProvider.java
@@ -324,14 +324,18 @@
Log.d(TAG, "Open device " + deviceId);
}
mMtpManager.openDevice(deviceId);
- mDeviceToolkits.put(
- deviceId, new DeviceToolkit(mMtpManager, mResolver, mDatabase));
+ final DeviceToolkit toolkit =
+ new DeviceToolkit(deviceId, mMtpManager, mResolver, mDatabase);
+ mDeviceToolkits.put(deviceId, toolkit);
mIntentSender.sendUpdateNotificationIntent();
try {
mRootScanner.resume().await();
} catch (InterruptedException error) {
Log.e(TAG, "openDevice", error);
}
+ // Resume document loader to remap disconnected document ID. Must be invoked after the
+ // root scanner resumes.
+ toolkit.mDocumentLoader.resume();
}
}
@@ -425,7 +429,7 @@
if (DEBUG) {
Log.d(TAG, "Close device " + deviceId);
}
- getDeviceToolkit(deviceId).mDocumentLoader.clearTasks();
+ getDeviceToolkit(deviceId).mDocumentLoader.close();
mDeviceToolkits.remove(deviceId);
mMtpManager.closeDevice(deviceId);
if (getOpenedDeviceIds().length == 0) {
@@ -485,9 +489,10 @@
public final PipeManager mPipeManager;
public final DocumentLoader mDocumentLoader;
- public DeviceToolkit(MtpManager manager, ContentResolver resolver, MtpDatabase database) {
+ public DeviceToolkit(
+ int deviceId, MtpManager manager, ContentResolver resolver, MtpDatabase database) {
mPipeManager = new PipeManager(database);
- mDocumentLoader = new DocumentLoader(manager, resolver, database);
+ mDocumentLoader = new DocumentLoader(deviceId, manager, resolver, database);
}
}
diff --git a/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java b/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
index 474da07..b75a9e6 100644
--- a/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
+++ b/packages/MtpDocumentsProvider/tests/src/com/android/mtp/DocumentLoaderTest.java
@@ -44,7 +44,7 @@
mDatabase.getMapper().startAddingDocuments(null);
mDatabase.getMapper().putDeviceDocument(
- new MtpDeviceRecord(1, "Device", null, true, new MtpRoot[0], null, null));
+ new MtpDeviceRecord(0, "Device", null, true, new MtpRoot[0], null, null));
mDatabase.getMapper().stopAddingDocuments(null);
mDatabase.getMapper().startAddingDocuments("1");
@@ -55,11 +55,12 @@
mManager = new BlockableTestMtpManager(getContext());
mResolver = new TestContentResolver();
- mLoader = new DocumentLoader(mManager, mResolver, mDatabase);
+ mLoader = new DocumentLoader(0, mManager, mResolver, mDatabase);
}
@Override
- public void tearDown() {
+ public void tearDown() throws Exception {
+ mLoader.close();
mDatabase.close();
}
diff --git a/packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpDocumentsProviderTest.java b/packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpDocumentsProviderTest.java
index 5eda9b2b8..884d132 100644
--- a/packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpDocumentsProviderTest.java
+++ b/packages/MtpDocumentsProvider/tests/src/com/android/mtp/MtpDocumentsProviderTest.java
@@ -22,6 +22,7 @@
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.os.storage.StorageManager;
+import android.provider.DocumentsContract.Document;
import android.provider.DocumentsContract.Root;
import android.system.Os;
import android.system.OsConstants;
@@ -587,6 +588,79 @@
}
}
+ public void testMappingDisconnectedDocuments() throws Exception {
+ setupProvider(MtpDatabaseConstants.FLAG_DATABASE_IN_MEMORY);
+ mMtpManager.addValidDevice(new MtpDeviceRecord(
+ 0,
+ "Device A",
+ "device key",
+ true /* unopened */,
+ new MtpRoot[] {
+ new MtpRoot(
+ 0 /* deviceId */,
+ 1 /* storageId */,
+ "Storage A" /* volume description */,
+ 1024 /* free space */,
+ 2048 /* total space */,
+ "" /* no volume identifier */)
+ },
+ null,
+ null));
+
+ final String[] names = strings("Directory A", "Directory B", "Directory C");
+ final int objectHandleOffset = 100;
+ for (int i = 0; i < names.length; i++) {
+ final int parentHandle = i == 0 ?
+ MtpManager.OBJECT_HANDLE_ROOT_CHILDREN : objectHandleOffset + i - 1;
+ final int objectHandle = i + objectHandleOffset;
+ mMtpManager.setObjectHandles(0, 1, parentHandle, new int[] { objectHandle });
+ mMtpManager.setObjectInfo(
+ 0,
+ new MtpObjectInfo.Builder()
+ .setName(names[i])
+ .setObjectHandle(objectHandle)
+ .setFormat(MtpConstants.FORMAT_ASSOCIATION)
+ .setStorageId(1)
+ .build());
+ }
+
+ mProvider.resumeRootScanner();
+ mResolver.waitForNotification(ROOTS_URI, 1);
+
+ final int documentIdOffset = 2;
+ for (int i = 0; i < names.length; i++) {
+ try (final Cursor cursor = mProvider.queryChildDocuments(
+ String.valueOf(documentIdOffset + i),
+ strings(Document.COLUMN_DOCUMENT_ID, Document.COLUMN_DISPLAY_NAME),
+ null)) {
+ assertEquals(1, cursor.getCount());
+ cursor.moveToNext();
+ assertEquals(String.valueOf(documentIdOffset + i + 1), cursor.getString(0));
+ assertEquals(names[i], cursor.getString(1));
+ }
+ }
+
+ mProvider.closeDevice(0);
+ mResolver.waitForNotification(ROOTS_URI, 2);
+
+ mProvider.openDevice(0);
+ mResolver.waitForNotification(ROOTS_URI, 3);
+
+ for (int i = 0; i < names.length; i++) {
+ mResolver.waitForNotification(DocumentsContract.buildChildDocumentsUri(
+ MtpDocumentsProvider.AUTHORITY,
+ String.valueOf(documentIdOffset + i)), 1);
+ try (final Cursor cursor = mProvider.queryChildDocuments(
+ String.valueOf(documentIdOffset + i),
+ strings(Document.COLUMN_DOCUMENT_ID),
+ null)) {
+ assertEquals(1, cursor.getCount());
+ cursor.moveToNext();
+ assertEquals(String.valueOf(documentIdOffset + i + 1), cursor.getString(0));
+ }
+ }
+ }
+
private void setupProvider(int flag) {
mDatabase = new MtpDatabase(getContext(), flag);
mProvider = new MtpDocumentsProvider();
diff --git a/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestMtpManager.java b/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestMtpManager.java
index 1b46f3c..3043ce8 100644
--- a/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestMtpManager.java
+++ b/packages/MtpDocumentsProvider/tests/src/com/android/mtp/TestMtpManager.java
@@ -86,7 +86,7 @@
@Override
void openDevice(int deviceId) throws IOException {
final MtpDeviceRecord device = mDevices.get(deviceId);
- if (device == null || device.opened) {
+ if (device == null) {
throw new IOException();
}
mDevices.put(
@@ -99,7 +99,7 @@
@Override
void closeDevice(int deviceId) throws IOException {
final MtpDeviceRecord device = mDevices.get(deviceId);
- if (device == null || !device.opened) {
+ if (device == null) {
throw new IOException();
}
mDevices.put(
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index 676bf5f..72fa939 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -686,8 +686,8 @@
<string name="select_webview_provider_title">WebView implementation</string>
<!-- Developer settings: select WebView provider dialog title [CHAR LIMIT=30] -->
<string name="select_webview_provider_dialog_title">Set WebView implementation</string>
- <!-- Developer settings: confirmation dialog text for the WebView provider selection dialog [CHAR LIMIT=NONE] -->
- <string name="select_webview_provider_confirmation_text">The chosen WebView implementation is disabled, and must be enabled to be used, do you wish to enable it?</string>
+ <!-- Developer settings: text for the WebView provider selection toast shown if an invalid provider was chosen (i.e. the setting list was stale). [CHAR LIMIT=NONE] -->
+ <string name="select_webview_provider_toast_text">The chosen WebView implementation is invalid because the list of implementation choices grew stale. The list should now be updated.</string>
<!-- Developer settings screen, convert userdata to file encryption option name -->
<string name="convert_to_file_encryption">Convert to file encryption</string>
diff --git a/packages/SystemUI/res/drawable-nodpi/icon.xml b/packages/SystemUI/res/drawable-nodpi/icon.xml
index 9c36b5a..5e08fcb 100644
--- a/packages/SystemUI/res/drawable-nodpi/icon.xml
+++ b/packages/SystemUI/res/drawable-nodpi/icon.xml
@@ -1,5 +1,5 @@
<!--
-Copyright (C) 2015 The Android Open Source Project
+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.
@@ -14,30 +14,25 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="48.0dp"
- android:height="48.0dp"
+ android:width="48dp"
+ android:height="48dp"
android:viewportWidth="48.0"
android:viewportHeight="48.0">
<path
- android:pathData="M24.0,2.0C11.8,2.0 2.0,11.8 2.0,24.0c0.0,6.1 2.5,11.6 6.4,15.6L39.6,8.4C35.6,4.5 30.1,2.0 24.0,2.0z"
- android:fillColor="#E91E63"/>
+ android:fillColor="#00796B"
+ android:pathData="M32.0,12.5l0.0,28.0l12.0,-5.0l0.0,-28.0z"/>
<path
- android:pathData="M39.6,8.4L8.4,39.6c4.0,4.0 9.5,6.4 15.6,6.4c12.2,0.0 22.0,-9.8 22.0,-22.0C46.0,17.9 43.5,12.4 39.6,8.4z"
- android:fillColor="#F06292"/>
+ android:fillColor="#00796B"
+ android:pathData="M4.0,40.5l12.0,-5.0l0.0,-11.0l-12.0,-12.0z"/>
<path
- android:pathData="M45.9,25.9L34.0,14.0L14.0,34.0l11.9,11.9C36.5,45.0 45.0,36.5 45.9,25.9z"
- android:fillAlpha="0.33"
- android:fillColor="#E91E63"/>
+ android:fillColor="#40000000"
+ android:pathData="M44.0,35.5l-12.0,-12.0l0.0,-4.0z"/>
<path
- android:pathData="M24.0,24.0c0.0,0.0 0.0,2.2 0.0,5.0s0.0,5.0 0.0,5.0l10.0,-10.0L34.0,14.0L24.0,24.0z"
- android:fillColor="#FFFFFF"/>
+ android:fillColor="#40000000"
+ android:pathData="M4.0,12.5l12.0,12.0l0.0,4.0z"/>
<path
- android:pathData="M24.0,24.0L14.0,14.0l0.0,10.0l10.0,10.0c0.0,0.0 0.0,-2.2 0.0,-5.0S24.0,24.0 24.0,24.0z"
- android:fillColor="#EEEEEE"/>
- <path
- android:pathData="M14.0,34.0l10.0,0.0 -10.0,-10.0z"
- android:fillColor="#DDDDDD"/>
- <path
- android:pathData="M34.0,34.0l0.0,-10.0 -10.0,10.0z"
- android:fillColor="#DDDDDD"/>
+ android:fillColor="#4DB6AC"
+ android:pathData="M32.0,23.5l-16.0,-16.0l-12.0,5.0l0.0,0.0l12.0,12.0l16.0,16.0l12.0,-5.0l0.0,0.0z"/>
</vector>
+
+
diff --git a/packages/SystemUI/res/drawable/ic_fullscreen_white_24dp.xml b/packages/SystemUI/res/drawable/ic_fullscreen_white_24dp.xml
new file mode 100644
index 0000000..7ddb40c
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_fullscreen_white_24dp.xml
@@ -0,0 +1,27 @@
+<!--
+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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:pathData="M0 0h24v24H0z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z" />
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_pause_white_24dp.xml b/packages/SystemUI/res/drawable/ic_pause_white_24dp.xml
new file mode 100644
index 0000000..d9a4f7b
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_pause_white_24dp.xml
@@ -0,0 +1,27 @@
+<!--
+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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M6 19h4V5H6v14zm8-14v14h4V5h-4z" />
+ <path
+ android:pathData="M0 0h24v24H0z" />
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_play_arrow_white_24dp.xml b/packages/SystemUI/res/drawable/ic_play_arrow_white_24dp.xml
new file mode 100644
index 0000000..b8fa99e
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_play_arrow_white_24dp.xml
@@ -0,0 +1,27 @@
+<!--
+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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M8 5v14l11-7z" />
+ <path
+ android:pathData="M0 0h24v24H0z" />
+</vector>
diff --git a/packages/SystemUI/res/layout/docked_stack_divider.xml b/packages/SystemUI/res/layout/docked_stack_divider.xml
index 7ea5027..cfaf018 100644
--- a/packages/SystemUI/res/layout/docked_stack_divider.xml
+++ b/packages/SystemUI/res/layout/docked_stack_divider.xml
@@ -27,6 +27,7 @@
<com.android.systemui.stackdivider.DividerHandleView
style="@style/DockedDividerHandle"
android:id="@+id/docked_divider_handle"
+ android:contentDescription="@string/accessibility_divider"
android:background="@null"/>
</com.android.systemui.stackdivider.DividerView>
diff --git a/packages/SystemUI/res/layout/qs_customize_panel.xml b/packages/SystemUI/res/layout/qs_customize_panel.xml
index 73a92d9..458ce2d 100644
--- a/packages/SystemUI/res/layout/qs_customize_panel.xml
+++ b/packages/SystemUI/res/layout/qs_customize_panel.xml
@@ -22,47 +22,13 @@
android:background="@drawable/qs_customizer_background"
android:gravity="center_horizontal">
- <LinearLayout
+ <Toolbar
+ android:id="@*android:id/action_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingTop="28dp"
- android:paddingEnd="8dp">
-
- <ImageView
- android:id="@+id/close"
- android:layout_width="56dp"
- android:layout_height="56dp"
- android:padding="16dp"
- android:src="@drawable/ic_close_white" />
-
- <Space
- android:layout_width="0dp"
- android:layout_height="0dp"
- android:layout_weight="1" />
-
- <Button
- android:id="@+id/save"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingStart="12dp"
- android:paddingEnd="12dp"
- android:background="?android:attr/selectableItemBackground"
- android:textAppearance="@android:style/TextAppearance.Material.Widget.Button.Inverse"
- android:textColor="?android:attr/colorAccent"
- android:text="@string/save" />
-
- <Button
- android:id="@+id/reset"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingStart="12dp"
- android:paddingEnd="12dp"
- android:background="?android:attr/selectableItemBackground"
- android:textAppearance="@android:style/TextAppearance.Material.Widget.Button.Inverse"
- android:textColor="?android:attr/colorAccent"
- android:text="@*android:string/reset" />
-
- </LinearLayout>
+ android:layout_marginTop="28dp"
+ android:navigationContentDescription="@*android:string/action_bar_up_description"
+ style="?android:attr/toolbarStyle" />
<android.support.v7.widget.RecyclerView
android:id="@android:id/list"
diff --git a/packages/SystemUI/res/layout/qs_panel.xml b/packages/SystemUI/res/layout/qs_panel.xml
index b8f10db..3ee2475 100644
--- a/packages/SystemUI/res/layout/qs_panel.xml
+++ b/packages/SystemUI/res/layout/qs_panel.xml
@@ -18,7 +18,9 @@
android:id="@+id/quick_settings_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:background="@drawable/qs_background_primary">
+ android:background="@drawable/qs_background_primary"
+ android:clipToPadding="false"
+ android:clipChildren="false">
<com.android.systemui.qs.QSPanel
android:id="@+id/quick_settings_panel"
diff --git a/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml b/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
index 8df2c280..0a9baa0 100644
--- a/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
+++ b/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
@@ -108,7 +108,7 @@
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
- android:layout_marginTop="4dp"
+ android:layout_marginTop="8dp"
android:layout_marginStart="16dp"
android:gravity="start"
android:orientation="vertical">
diff --git a/packages/SystemUI/res/layout/recents_on_tv.xml b/packages/SystemUI/res/layout/recents_on_tv.xml
index b4543bd..94b099e 100644
--- a/packages/SystemUI/res/layout/recents_on_tv.xml
+++ b/packages/SystemUI/res/layout/recents_on_tv.xml
@@ -28,10 +28,26 @@
android:clipChildren="false"
android:clipToPadding="false"
android:descendantFocusability="beforeDescendants"
+ android:layout_gravity="center"
android:gravity="center"
android:paddingStart="@dimen/recents_tv_grid_row_padding"
android:paddingEnd="@dimen/recents_tv_grid_row_padding"
- android:focusable="true"/>
+ android:focusable="true" />
+ <View
+ android:id="@+id/pip_shade"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="invisible"
+ android:background="#76000000"/>
+
+ <!-- Placeholder view to handle key events for PIP when it's focused.
+ Size and positions will be adjusted to comply with
+ config_pictureInPictureBoundsInRecents -->
+ <View
+ android:id="@+id/pip"
+ android:layout_width="0dp"
+ android:layout_height="0dp"
+ android:visibility="invisible"
+ android:focusable="true" />
</com.android.systemui.recents.tv.views.RecentsTvView>
-
diff --git a/packages/SystemUI/res/layout/recents_task_view_header.xml b/packages/SystemUI/res/layout/recents_task_view_header.xml
index deb8e91..2e41561 100644
--- a/packages/SystemUI/res/layout/recents_task_view_header.xml
+++ b/packages/SystemUI/res/layout/recents_task_view_header.xml
@@ -26,13 +26,16 @@
android:layout_width="@dimen/recents_task_view_header_icon_width"
android:layout_height="@dimen/recents_task_view_header_icon_height"
android:layout_gravity="center_vertical|start"
- android:padding="9dp" />
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:paddingStart="12dp"
+ android:paddingEnd="16dp" />
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|start"
- android:layout_marginStart="64dp"
+ android:layout_marginStart="56dp"
android:layout_marginEnd="112dp"
android:textSize="16sp"
android:textColor="#ffffffff"
@@ -48,7 +51,7 @@
android:layout_height="@dimen/recents_task_view_header_button_height"
android:layout_marginEnd="@dimen/recents_task_view_header_button_width"
android:layout_gravity="center_vertical|end"
- android:padding="15dp"
+ android:padding="13dp"
android:src="@drawable/star"
android:background="?android:selectableItemBackground"
android:alpha="0"
@@ -58,7 +61,7 @@
android:layout_width="@dimen/recents_task_view_header_button_width"
android:layout_height="@dimen/recents_task_view_header_button_height"
android:layout_gravity="center_vertical|end"
- android:padding="15dp"
+ android:padding="13dp"
android:src="@drawable/recents_dismiss_light"
android:background="?android:selectableItemBackground"
android:alpha="0"
diff --git a/packages/SystemUI/res/layout/recents_task_view_header_overlay.xml b/packages/SystemUI/res/layout/recents_task_view_header_overlay.xml
index 10659a3..1becdab 100644
--- a/packages/SystemUI/res/layout/recents_task_view_header_overlay.xml
+++ b/packages/SystemUI/res/layout/recents_task_view_header_overlay.xml
@@ -23,13 +23,16 @@
android:layout_width="@dimen/recents_task_view_header_icon_width"
android:layout_height="@dimen/recents_task_view_header_icon_height"
android:layout_gravity="center_vertical|start"
- android:padding="9dp" />
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:paddingStart="12dp"
+ android:paddingEnd="16dp" />
<TextView
android:id="@+id/app_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|start"
- android:layout_marginStart="64dp"
+ android:layout_marginStart="56dp"
android:layout_marginEnd="112dp"
android:textSize="16sp"
android:textColor="#ffffffff"
@@ -44,7 +47,7 @@
android:layout_width="@dimen/recents_task_view_header_button_width"
android:layout_height="@dimen/recents_task_bar_height"
android:layout_gravity="center_vertical|end"
- android:padding="15dp"
+ android:padding="13dp"
android:background="?android:selectableItemBackground"
android:src="@drawable/recents_info_light" />
</FrameLayout>
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/remote_input.xml b/packages/SystemUI/res/layout/remote_input.xml
index cce07bd..818df3b 100644
--- a/packages/SystemUI/res/layout/remote_input.xml
+++ b/packages/SystemUI/res/layout/remote_input.xml
@@ -42,6 +42,7 @@
android:background="@null"
android:singleLine="true"
android:ellipsize="start"
+ android:inputType="textShortMessage|textAutoCorrect|textCapSentences"
android:imeOptions="actionSend" />
<FrameLayout
diff --git a/packages/SystemUI/res/layout/tv_pip_overlay.xml b/packages/SystemUI/res/layout/tv_pip_overlay.xml
index 6d9c48d..ebd362c 100644
--- a/packages/SystemUI/res/layout/tv_pip_overlay.xml
+++ b/packages/SystemUI/res/layout/tv_pip_overlay.xml
@@ -17,13 +17,38 @@
*/
-->
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/guide_overlay"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom"
- android:padding="3dp"
- android:textSize="13sp"
- android:textColor="#111111"
- android:background="#99EEEEEE"
- android:text="@string/pip_hold_home" />
+ android:layout_height="match_parent">
+
+ <TextView
+ android:id="@+id/guide_overlay"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:padding="3dp"
+ android:textSize="13sp"
+ android:textColor="#111111"
+ android:background="#99EEEEEE"
+ android:text="@string/pip_hold_home" />
+ <LinearLayout
+ android:id="@+id/guide_buttons"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentBottom="true"
+ android:layout_centerHorizontal="true"
+ android:orientation="horizontal">
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/ic_fullscreen_white_24dp" />
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/ic_pause_white_24dp" />
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:src="@drawable/ic_close_white" />
+ </LinearLayout>
+</RelativeLayout>
diff --git a/packages/SystemUI/res/values-af/strings.xml b/packages/SystemUI/res/values-af/strings.xml
index 64ae93a..5b8ebf4 100644
--- a/packages/SystemUI/res/values-af/strings.xml
+++ b/packages/SystemUI/res/values-af/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Verskyn vlugtig op die skerm en maak \'n geluid"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Meer instellings"</string>
<string name="notification_done" msgid="5279426047273930175">"Klaar"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Kleur en voorkoms"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Nagmodus"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Kalibreer skerm"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Aan"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Af"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Skakel outomaties aan"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Skakel oor na Nagmodus soos gepas vir ligging en tyd van die dag"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Wanneer Nagmodus aan is"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Gebruik donkertema vir Android-bedryfstelsel"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Verstel tint"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Verstel helderheid"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Die donkertema word toegepas op kernareas van Android-bedryfstelsel wat gewoonlik in \'n ligtema gewys word, soos instellings en kennisgewings."</string>
<string name="color_apply" msgid="9212602012641034283">"Pas toe"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Bevestig instellings"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Sommige kleurinstellings kan hierdie toestel onbruikbaar maak. Klik OK om hierdie kleurinstellings te bevestig; andersins sal hierdie instellings ná 10 sekondes teruggestel word."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Tuis"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Onlangs"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Terug"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Wys saam met volumekontroles"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Moenie steur nie"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Volumeknoppieskortpad"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Verlaat \'moenie steur nie\' met volume op"</string>
<string name="battery" msgid="7498329822413202973">"Battery"</string>
<string name="clock" msgid="7416090374234785905">"Horlosie"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Databespaarder is aan"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Databespaarder is af"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Aan"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Af"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigasiebalk"</string>
<string name="start" msgid="6873794757232879664">"Begin"</string>
<string name="center" msgid="4327473927066010960">"Middel"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Voorskou"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Sleep om teëls by te voeg"</string>
<string name="qs_edit" msgid="2232596095725105230">"Wysig"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Tyd"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Wys ure, minute en sekondes"</item>
+ <item msgid="1427801730816895300">"Wys ure en minute (verstek)"</item>
+ <item msgid="3830170141562534721">"Moenie hierdie ikoon wys nie"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Wys altyd persentasie"</item>
+ <item msgid="2139628951880142927">"Wys persentasie wanneer gelaai word (verstek)"</item>
+ <item msgid="3327323682209964956">"Moenie hierdie ikoon wys nie"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-am/strings.xml b/packages/SystemUI/res/values-am/strings.xml
index 0e0d145..f33d270 100644
--- a/packages/SystemUI/res/values-am/strings.xml
+++ b/packages/SystemUI/res/values-am/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"ወደ ገጸ ማያው ይመልከቱና ድምፅ ይቅረጹ"</string>
<string name="notification_more_settings" msgid="816306283396553571">"ተጨማሪ ቅንብሮች"</string>
<string name="notification_done" msgid="5279426047273930175">"ተከናውኗል"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"ቀለም እና መልክ"</string>
+ <string name="night_mode" msgid="3540405868248625488">"የሌሊት ሁነታ"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"ማሳያን ይለኩ"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"በርቷል"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"ጠፍቷል"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"በራስ-ሰር አብራ"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"ለአካባቢው እና ለሰዓቱ ተገቢ በሆነ መልኩ ወደ የማታ ሁነታ ለውጥ"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"የማታ ሁነታ ሲበራ"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"ለAndroid ስርዓተ ክወና ጨለማ ገጽታን ተጠቀም"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"ቅልም አስተካክል"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"ብሩህነት አስተካክል"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"ጨለማ ገጽታው እንደ ቅንብሮች እና ማሳወቂያዎች ያሉ በመደበኛነት በብርሃን ገጽታ በሚታዩ የAndroid ስርዓተ ክወና ዋና ክፍሎች ላይ ይተገበራል።"</string>
<string name="color_apply" msgid="9212602012641034283">"ተግብር"</string>
<string name="color_revert_title" msgid="4746666545480534663">"ቅንብሮችን ያረጋግጡ"</string>
<string name="color_revert_message" msgid="9116001069397996691">"አንዳንድ የቀለም ቅንብሮች ይህን መሣሪያ የማይጠቅም ሊያደርጉት ይችላሉ። እነዚህን የቀለም ቅንብሮች ለማረጋገጥ እሺ የሚለውን ጠቅ ያድርጉ፣ አለበለዚያ እነዚህ ቅንብሮች ከ10 ሰከንዶች በኋላ ዳግም ይጀምራሉ።"</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"መነሻ"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"የቅርብ ጊዜዎቹ"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"ተመለስ"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"ከድምፅ መቆጣጠሪያዎች ጋር አሳይ"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"አትረብሽ"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"የድምፅ አዝራሮች አቋራጭ"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"ድምጽ ሲጨመር አትረብሽን ትተህ ውጣ"</string>
<string name="battery" msgid="7498329822413202973">"ባትሪ"</string>
<string name="clock" msgid="7416090374234785905">"ሰዓት"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"ውሂብ ቆጣቢ በርቷል"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"ውሂብ ቆጣቢ ጠፍቷል"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"በርቷል"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"ጠፍቷል"</string>
<string name="nav_bar" msgid="1993221402773877607">"የአሰሳ አሞሌ"</string>
<string name="start" msgid="6873794757232879664">"ጀምር"</string>
<string name="center" msgid="4327473927066010960">"መሃል"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"ቅድመ-እይታ"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"ሰቆችን ለማከል ይጎትቱ"</string>
<string name="qs_edit" msgid="2232596095725105230">"አርትዕ"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"ሰዓት"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"ሰዓቶችን፣ ደቂቃዎችን፣ ሴኮንዶችን አሳይ"</item>
+ <item msgid="1427801730816895300">"ሰዓቶችን እና ደቂቃዎችን አሳይ (ነባሪ)"</item>
+ <item msgid="3830170141562534721">"ይህን አዶ አታሳይ"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"ሁልጊዜ መቶኛ አሳይ"</item>
+ <item msgid="2139628951880142927">"የባትሪ ኃይል በሚሞላበት ጊዜ መቶኛ አሳይ (ነባሪ)"</item>
+ <item msgid="3327323682209964956">"ይህን አዶ አታሳይ"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-az-rAZ/strings.xml b/packages/SystemUI/res/values-az-rAZ/strings.xml
index 13e01e6..45aba36 100644
--- a/packages/SystemUI/res/values-az-rAZ/strings.xml
+++ b/packages/SystemUI/res/values-az-rAZ/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Ekranda nəzər salın və səsli edin"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Daha çox ayar"</string>
<string name="notification_done" msgid="5279426047273930175">"Hazırdır"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Rəng və görünüş"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Gecə rejimi"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Ekranı kalibrləyin"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Aktiv"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Deaktiv"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Avtomatik aktivləşdirin"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Məkana və günün vaxtına uyğun olaraq Gecə Rejiminə keçin"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Gecə Rejimi aktiv olduqda"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Android OS üçün tünd tema istifadə edin"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Çaları nizamlayın"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Parlaqlığı nizamlayın"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Tünd tema Android OS sisteminin adətən işıqlı tema göstərilən Ayarlar və bildirişlər kimi əsas sahələri üçün tətbiq edilir."</string>
<string name="color_apply" msgid="9212602012641034283">"Tətbiq edin"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Ayarları təsdiq edin"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Bəzi renk ayarları bu cihazı yararsız edə bilər. Bu rənk ayarlarını təsdiq etmək üçün OK basın, əks halda bu ayarlar 10 saniyə sonra sıfırlanacaq."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Əsas səhifə"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Sonuncular"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Geri"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Həcm nəzarəti ilə göstərin"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Narahat etməyin"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Səs düymələri qısayolu"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Yuxarı səsdə \"narahat etməyin\" rejimini daxil edin"</string>
<string name="battery" msgid="7498329822413202973">"Batareya"</string>
<string name="clock" msgid="7416090374234785905">"Saat"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Data Qənaəti aktivdir"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Data Qənaəti deaktivdir"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Aktiv"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Deaktiv"</string>
<string name="nav_bar" msgid="1993221402773877607">"Naviqasiya paneli"</string>
<string name="start" msgid="6873794757232879664">"Başladın"</string>
<string name="center" msgid="4327473927066010960">"Mərkəz"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Önizləmə"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Xanalar əlavə etmək üçün sürüşdürün"</string>
<string name="qs_edit" msgid="2232596095725105230">"Redaktə edin"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Vaxt"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Saat, dəqiqə və saniyəni göstərin"</item>
+ <item msgid="1427801730816895300">"Saat və dəqiqəni göstərin (defolt)"</item>
+ <item msgid="3830170141562534721">"Bu piktoqramı göstərməyin"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Faizi həmişə göstərin"</item>
+ <item msgid="2139628951880142927">"Enerji dolan zaman faizi göstərin (defolt)"</item>
+ <item msgid="3327323682209964956">"Bu piktoqramı göstərməyin"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-b+sr+Latn/strings.xml b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
index 90a8d4e..5494892 100644
--- a/packages/SystemUI/res/values-b+sr+Latn/strings.xml
+++ b/packages/SystemUI/res/values-b+sr+Latn/strings.xml
@@ -466,30 +466,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Nakratko se prikazuju na ekranu i emituje se zvuk"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Još podešavanja"</string>
<string name="notification_done" msgid="5279426047273930175">"Gotovo"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Boja i izgled"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Noćni režim"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Kalibrišite ekran"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Uključeno"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Isključeno"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Automatski uključi"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Pređite na noćni režim u zavisnosti od lokacije i doba dana"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Kada je noćni režim uključen"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Koristi tamnu temu za Android OS"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Prilagodi senku"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Prilagodi osvetljenost"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Tamna tema se primenjuje na ključne oblasti Android OS-a koje se obično prikazuju u svetloj temi, kao što su podešavanja i obaveštenja."</string>
<string name="color_apply" msgid="9212602012641034283">"Primeni"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Potvrdite podešavanja"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Neka podešavanja boja mogu da učine uređaj neupotrebljivim. Kliknite na Potvrdi da biste potvrdili ova podešavanja boja, pošto će se u suprotnom ova podešavanja resetovati nakon 10 sekundi."</string>
@@ -501,12 +489,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Početni"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Nedavni sadržaj"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Nazad"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Prikaži sa kontrolama jačine zvuka"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Ne uznemiravaj"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Prečica za dugmad za jačinu zvuka"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Izađi iz režima Ne uznemiravaj kada je zvuk pojačan"</string>
<string name="battery" msgid="7498329822413202973">"Baterija"</string>
<string name="clock" msgid="7416090374234785905">"Sat"</string>
@@ -517,8 +502,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Ušteda podataka je uključena"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Ušteda podataka je isključena"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Uključeno"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Isključeno"</string>
<string name="nav_bar" msgid="1993221402773877607">"Traka za navigaciju"</string>
<string name="start" msgid="6873794757232879664">"Pokreni"</string>
<string name="center" msgid="4327473927066010960">"Centar"</string>
@@ -541,12 +525,15 @@
<string name="preview" msgid="9077832302472282938">"Pregled"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Prevucite da biste dodali pločice"</string>
<string name="qs_edit" msgid="2232596095725105230">"Izmeni"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Vreme"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Prikaži sate, minute i sekunde"</item>
+ <item msgid="1427801730816895300">"Prikaži sate i minute (podrazumevano)"</item>
+ <item msgid="3830170141562534721">"Ne prikazuj ovu ikonu"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Uvek prikazuj procenat"</item>
+ <item msgid="2139628951880142927">"Prikaži procenat tokom punjenja (podrazumevano)"</item>
+ <item msgid="3327323682209964956">"Ne prikazuj ovu ikonu"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-bs-rBA/strings.xml b/packages/SystemUI/res/values-bs-rBA/strings.xml
index d2a556d..25e350d 100644
--- a/packages/SystemUI/res/values-bs-rBA/strings.xml
+++ b/packages/SystemUI/res/values-bs-rBA/strings.xml
@@ -466,30 +466,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Kratki prikaz na ekranu uz zvuk"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Više postavki"</string>
<string name="notification_done" msgid="5279426047273930175">"Gotovo"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Boja i izgled"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Noćni način rada"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Kalibracija zaslona"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Uključeno"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Isključeno"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Automatsko uključivanje"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Prebaciti u Noćni način rada u skladu sa lokacijom i dobom dana"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Kada je Noćni režim rada uključen"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Koristiti tamne teme za OS Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Prilagođavanje nijanse"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Podešavanje osvijetljenosti"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Tamna tema se primjenjuje na ključna područja OS Android koja se obično prikazuju uz svijetlu temu, kao što su Postavke i Obavještenja."</string>
<string name="color_apply" msgid="9212602012641034283">"Prihvati"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Potvrdi postavke"</string>
<string name="color_revert_message" msgid="9116001069397996691">"S nekim postavkama boja ovaj uređaj može biti neupotrebljiv. Kliknite U redu da biste potvrdili ove postavke boja ili sačekajte 10 sekundi da se postavke vrate na početnu vrijednost."</string>
@@ -501,12 +489,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Početak"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Nedavni ekrani"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Nazad"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Prikazati sa kontrolama jačine zvuka"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Ne ometaj"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Prečica za dugmad za Jačinu zvuka"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Deaktiviraj režim Ne ometaj kada se zvuk pojača"</string>
<string name="battery" msgid="7498329822413202973">"Baterija"</string>
<string name="clock" msgid="7416090374234785905">"Sat"</string>
@@ -517,8 +502,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Ušteda podataka je uključena"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Ušteda podataka je isključena"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Uključeno"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Isključi"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigaciona traka"</string>
<string name="start" msgid="6873794757232879664">"Početak"</string>
<string name="center" msgid="4327473927066010960">"Sredina"</string>
@@ -541,12 +525,15 @@
<string name="preview" msgid="9077832302472282938">"Pregledaj"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Povucite da biste dodali polja"</string>
<string name="qs_edit" msgid="2232596095725105230">"Uredi"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Vrijeme"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Prikaži sate, minute i sekunde"</item>
+ <item msgid="1427801730816895300">"Prikaži sate i minute (zadano)"</item>
+ <item msgid="3830170141562534721">"Ne prikazuj ovu ikonu"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Uvijek prikaži postotak"</item>
+ <item msgid="2139628951880142927">"Pokaži postotak u toku punjenja (zadano)"</item>
+ <item msgid="3327323682209964956">"Ne prikazuj ovu ikonu"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index 54b4ff4..f5124a1 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Mostra a la pantalla i emet un so"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Més opcions"</string>
<string name="notification_done" msgid="5279426047273930175">"Fet"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Color i aparença"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Mode nocturn"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Calibra la pantalla"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Activat"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Desactivat"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Activa automàticament"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Canvia al mode nocturn d\'acord amb la ubicació i l\'hora del dia"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Quan el mode nocturn estigui activat"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Fes servir un tema fosc per a Android OS"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Ajusta el color"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Ajusta la brillantor"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"El mode nocturn s\'aplica a les àrees clau d\'Android OS que normalment es mostren amb un tema clar, com ara la configuració i les notificacions."</string>
<string name="color_apply" msgid="9212602012641034283">"Aplica"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Confirma la configuració"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Algunes opcions de configuració de color poden deixar el dispositiu inservible. Fes clic a D\'acord per confirmar la configuració de color; en cas contrari, la configuració es restablirà al cap de 10 segons."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Inici"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Recents"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Enrere"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Mostra amb els controls de volum"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"No molesteu"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Drecera per als botons de volum"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Desactiva el mode No molesteu apujant el volum"</string>
<string name="battery" msgid="7498329822413202973">"Bateria"</string>
<string name="clock" msgid="7416090374234785905">"Rellotge"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"L\'extensió Economitzador de dades està activada"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"L\'extensió Economitzador de dades està desactivada"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Activat"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Desactivat"</string>
<string name="nav_bar" msgid="1993221402773877607">"Barra de navegació"</string>
<string name="start" msgid="6873794757232879664">"Inici"</string>
<string name="center" msgid="4327473927066010960">"Centre"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Previsualització"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Arrossega per afegir camps"</string>
<string name="qs_edit" msgid="2232596095725105230">"Edita"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Hora"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Mostra les hores, els minuts i els segons"</item>
+ <item msgid="1427801730816895300">"Mostra les hores i els minuts (opció predeterminada)"</item>
+ <item msgid="3830170141562534721">"No mostris aquesta icona"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Mostra sempre el percentatge"</item>
+ <item msgid="2139628951880142927">"Mostra el percentatge quan es carregui (opció predeterminada)"</item>
+ <item msgid="3327323682209964956">"No mostris aquesta icona"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index fae2818..6d5f717 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -467,30 +467,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Tato oznámení zobrazovat přímo na obrazovce a upozornit na ně zvukem"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Další nastavení"</string>
<string name="notification_done" msgid="5279426047273930175">"Hotovo"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Barva a vzhled"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Noční režim"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Kalibrovat displej"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Zapnuto"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Vypnuto"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Zapnout automaticky"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Přejít do nočního režimu automaticky na základě místa a denní doby"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Když je noční režim zapnutý"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Použít v systému Android tmavý motiv"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Upravit tónování"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Upravit jas"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"V hlavních oblastech systému Android, které jsou běžně zobrazovány ve světlém motivu (například Nastavení nebo oznámení), se použije tmavý motiv."</string>
<string name="color_apply" msgid="9212602012641034283">"Použít"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Ověření nastavení"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Některá nastavení barev mohou způsobit, že zařízení nebude použitelné. Kliknutím na OK toto nastavení barev potvrdíte, v opačném případě se nastavení po 10 sekundách resetuje."</string>
@@ -502,12 +490,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Plocha"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Poslední"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Zpět"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Zobrazit včetně ovládacích prvků hlasitosti"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Nerušit"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Zkratka tlačítek hlasitosti"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Při zvýšení hlasitosti ukončit režim Nerušit"</string>
<string name="battery" msgid="7498329822413202973">"Baterie"</string>
<string name="clock" msgid="7416090374234785905">"Hodiny"</string>
@@ -518,8 +503,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Spořič dat je zapnutý"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Spořič dat je vypnutý"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Zapnuto"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Vypnuto"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigační panel"</string>
<string name="start" msgid="6873794757232879664">"Začátek"</string>
<string name="center" msgid="4327473927066010960">"Střed"</string>
@@ -542,12 +526,15 @@
<string name="preview" msgid="9077832302472282938">"Náhled"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Dlaždice přidáte přetažením"</string>
<string name="qs_edit" msgid="2232596095725105230">"Upravit"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Čas"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Zobrazovat hodiny, minuty a sekundy"</item>
+ <item msgid="1427801730816895300">"Zobrazovat hodiny a minuty (výchozí nastavení)"</item>
+ <item msgid="3830170141562534721">"Tuto ikonu nezobrazovat"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Vždy zobrazovat procento"</item>
+ <item msgid="2139628951880142927">"Zobrazovat procento při nabíjení (výchozí nastavení)"</item>
+ <item msgid="3327323682209964956">"Tuto ikonu nezobrazovat"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index 8c7c8a7..04893c7 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -445,7 +445,7 @@
<string name="clock_seconds_desc" msgid="6282693067130470675">"Vis sekunder i statuslinjen. Dette kan påvirke batteriets levetid."</string>
<string name="qs_rearrange" msgid="8060918697551068765">"Omarranger Hurtige indstillinger"</string>
<string name="show_brightness" msgid="6613930842805942519">"Vis lysstyrke i Hurtige indstillinger"</string>
- <string name="overview_nav_bar_gesture" msgid="8579814204727917764">"Aktivér bevægelsen stryg opad for at dele skærmen"</string>
+ <string name="overview_nav_bar_gesture" msgid="8579814204727917764">"Aktivér bevægelsen Stryg opad for at dele skærmen"</string>
<string name="overview_nav_bar_gesture_desc" msgid="6329167382305102615">"Aktivér bevægelse for at dele skærmen ved at stryge opad fra knappen Oversigt"</string>
<string name="experimental" msgid="6198182315536726162">"Eksperimentel"</string>
<string name="enable_bluetooth_title" msgid="5027037706500635269">"Vil du slå Bluetooth til?"</string>
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Vis på skærmen, og giv lyd"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Flere indstillinger"</string>
<string name="notification_done" msgid="5279426047273930175">"Færdig"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Farve og udseende"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Nattilstand"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Kalibrer skærmen"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Til"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Fra"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Slå automatisk til"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Skift til natfunktion alt efter stedet og tidspunktet"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Når natfunktion er slået til"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Brug mørkt tema til Android OS"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Juster farvetonen"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Juster lysstyrken"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Det mørke tema anvendes på centrale områder i Android OS, der normalt vises med lyst tema, f.eks. Indstilinger og underretninger."</string>
<string name="color_apply" msgid="9212602012641034283">"Anvend"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Bekræft indstillingerne"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Nogle farveindstillinger kan medføre, at du ikke kan bruge enheden. Klik på OK for at bekræfte disse farveindstillinger. Ellers nulstilles disse indstillinger efter ti sekunder."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Start"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Seneste"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Tilbage"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Vis med lydstyrkeregulering"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Forstyr ikke"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Genvej til lydstyrkeknapper"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Afslut Forstyr ikke med Lydstyrke op"</string>
<string name="battery" msgid="7498329822413202973">"Batteri"</string>
<string name="clock" msgid="7416090374234785905">"Ur"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Datasparefunktionen er slået til"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Datasparefunktionen er slået fra"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Til"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Fra"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigationslinje"</string>
<string name="start" msgid="6873794757232879664">"Start"</string>
<string name="center" msgid="4327473927066010960">"I midten"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Eksempelvisning"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Træk for at tilføje felter"</string>
<string name="qs_edit" msgid="2232596095725105230">"Rediger"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Tid"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Vis timer, minutter og sekunder"</item>
+ <item msgid="1427801730816895300">"Vis timer og minutter (standard)"</item>
+ <item msgid="3830170141562534721">"Vis ikke dette ikon"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Vis altid procent"</item>
+ <item msgid="2139628951880142927">"Vis procent ved opladning (standard)"</item>
+ <item msgid="3327323682209964956">"Vis ikke dette ikon"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 31be8b4..c1619bf 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Mit Ton auf dem Display einblenden"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Weitere Einstellungen"</string>
<string name="notification_done" msgid="5279426047273930175">"Fertig"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Farbe und Darstellung"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Nachtmodus"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Bildschirm kalibrieren"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"An"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Aus"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Automatisch aktivieren"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Abhängig von Standort und Tageszeit in den Nachtmodus wechseln"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Bei aktiviertem Nachtmodus"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Dunkles Design unter Android OS verwenden"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Farbton anpassen"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Helligkeit anpassen"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Das dunkle Design wird unter Android OS in allen Hauptbereichen übernommen, die normalerweise hell dargestellt werden, wie beispielsweise Einstellungen und Benachrichtigungen."</string>
<string name="color_apply" msgid="9212602012641034283">"Übernehmen"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Einstellungen bestätigen"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Einige Farbeinstellungen können dazu führen, dass das Gerät nicht mehr genutzt werden kann. Klicke auf \"OK\", um diese Farbeinstellungen zu bestätigen. Anderenfalls werden diese Einstellungen in 10 Sekunden zurückgesetzt."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Startseite"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Letzte"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Zurück"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Einschließlich Lautstärkeregler anzeigen"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Bitte nicht stören"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Tastenkombination für Lautstärketasten"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"\"Bitte nicht stören\" bei \"Lauter\" deaktivieren"</string>
<string name="battery" msgid="7498329822413202973">"Akku"</string>
<string name="clock" msgid="7416090374234785905">"Uhr"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Datenkomprimierung aktiviert"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Datenkomprimierung deaktiviert"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"An"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Aus"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigationsleiste"</string>
<string name="start" msgid="6873794757232879664">"Beim Start"</string>
<string name="center" msgid="4327473927066010960">"Mitte"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Vorschau"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Zum Hinzufügen von Kacheln ziehen"</string>
<string name="qs_edit" msgid="2232596095725105230">"Bearbeiten"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Uhrzeit"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Stunden, Minuten und Sekunden anzeigen"</item>
+ <item msgid="1427801730816895300">"Stunden und Minuten anzeigen (Standardeinstellung)"</item>
+ <item msgid="3830170141562534721">"Dieses Symbol nicht anzeigen"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Prozentwert immer anzeigen"</item>
+ <item msgid="2139628951880142927">"Prozentwert beim Laden anzeigen (Standardeinstellung)"</item>
+ <item msgid="3327323682209964956">"Dieses Symbol nicht anzeigen"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index efbbabe..f6ed4bc 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Να προβάλλονται στην οθόνη και να συνοδεύονται από κάποιον ήχο"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Περισσότερες ρυθμίσεις"</string>
<string name="notification_done" msgid="5279426047273930175">"Τέλος"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Χρώμα και εμφάνιση"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Νυχτερινή λειτουργία"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Βαθμονόμηση οθόνης"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Ενεργή"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Ανενεργή"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Αυτόματη ενεργοποίηση"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Αλλαγή σε νυχτερινή λειτουργία όπως απαιτείται βάσει τοποθεσίας και ώρας της ημέρας"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Όταν είναι ενεργή η νυχτερινή λειτουργία"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Χρήση σκοτεινού θέματος για Android OS"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Ρύθμιση απόχρωσης"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Ρύθμιση φωτεινότητας"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Το σκούρο θέμα εφαρμόζεται σε βασικές περιοχές του λειτουργικού συστήματος Android οι οποίες συνήθως εμφανίζονται με φωτεινό θέμα, όπως οι Ρυθμίσεις και οι ειδοποιήσεις."</string>
<string name="color_apply" msgid="9212602012641034283">"Εφαρμογή"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Επιβεβαίωση ρυθμίσεων"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Ορισμένες ρυθμίσεις χρωμάτων μπορεί να μην επιτρέπουν τη χρήση αυτής της συσκευής. Κάντε κλικ στην επιλογή OK για να επιβεβαιώσετε αυτές τις ρυθμίσεις χρωμάτων, διαφορετικά θα γίνει επαναφορά αυτών των ρυθμίσεων μετά από 10 δευτερόλεπτα."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Αρχική οθόνη"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Πρόσφατα"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Πίσω"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Εμφάνιση με στοιχεία ελέγχου έντασης ήχου"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Μην ενοχλείτε"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Συντόμευση κουμπιών έντασης ήχου"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Απενεργοποίηση λειτουργίας \"Μην ενοχλείτε\" κατά την αύξηση της έντασης ήχου"</string>
<string name="battery" msgid="7498329822413202973">"Μπαταρία"</string>
<string name="clock" msgid="7416090374234785905">"Ρολόι"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Η Εξοικονόμηση δεδομένων είναι ενεργοποιημένη"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Η Εξοικονόμηση δεδομένων είναι απενεργοποιημένη"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Ενεργή"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Απενεργοποίηση"</string>
<string name="nav_bar" msgid="1993221402773877607">"Γραμμή πλοήγησης"</string>
<string name="start" msgid="6873794757232879664">"Έναρξη"</string>
<string name="center" msgid="4327473927066010960">"Κέντρο"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Προεπισκόπηση"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Σύρετε για να προσθέσετε πλακίδια"</string>
<string name="qs_edit" msgid="2232596095725105230">"Επεξεργασία"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Ώρα"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Να εμφανίζονται ώρες, λεπτά και δευτερόλεπτα"</item>
+ <item msgid="1427801730816895300">"Να εμφανίζονται ώρες και λεπτά (προεπιλογή)"</item>
+ <item msgid="3830170141562534721">"Να μην εμφανίζεται αυτό το εικονίδιο"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Να εμφανίζεται πάντα ποσοστό"</item>
+ <item msgid="2139628951880142927">"Να εμφανίζεται ποσοστό κατά τη φόρτιση (προεπιλογή)"</item>
+ <item msgid="3327323682209964956">"Να μην εμφανίζεται αυτό το εικονίδιο"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index 448f808..53386ed2 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Mostrar en la pantalla y emitir sonido"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Más opciones de configuración"</string>
<string name="notification_done" msgid="5279426047273930175">"Listo"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Color y apariencia"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Modo nocturno"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Calibrar pantalla"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Activado"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Desactivado"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Activar automáticamente"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Cambiar a modo nocturno según corresponda en relación con la ubicación y hora del día"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Cuando el modo nocturno está activado"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Usar tema oscuro para el SO Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Ajustar tinte"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Ajustar brillo"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"El tema oscuro se aplica en las áreas principales del sistema operativo Android que suelen mostrarse con un tema claro, como la Configuración y las notificaciones."</string>
<string name="color_apply" msgid="9212602012641034283">"Aplicar"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Confirmar la configuración"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Algunas opciones de configuración de color pueden provocar que el dispositivo quede inutilizable. Haz clic en Aceptar para confirmar estos parámetros de color. De lo contrario, la configuración se restablecerá en diez segundos."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Pantalla principal"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Recientes"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Atrás"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Mostrar con controles de volumen"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"No interrumpir"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Combinación de teclas de botones de volumen"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Desactivar el modo No interrumpir al subir el volumen"</string>
<string name="battery" msgid="7498329822413202973">"Batería"</string>
<string name="clock" msgid="7416090374234785905">"Reloj"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Reducir datos está activada"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Reducir datos está desactivada"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Activado"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Desactivar"</string>
<string name="nav_bar" msgid="1993221402773877607">"Barra de navegación"</string>
<string name="start" msgid="6873794757232879664">"Iniciar"</string>
<string name="center" msgid="4327473927066010960">"Centro"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Vista previa"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Arrastra los mosaicos para agregarlos"</string>
<string name="qs_edit" msgid="2232596095725105230">"Editar"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Hora"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Mostrar horas, minutos y segundos"</item>
+ <item msgid="1427801730816895300">"Mostrar horas y minutos (predeterminado)"</item>
+ <item msgid="3830170141562534721">"No mostrar este ícono"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Siempre mostrar el porcentaje"</item>
+ <item msgid="2139628951880142927">"Mostrar el porcentaje durante la carga (predeterminado)"</item>
+ <item msgid="3327323682209964956">"No mostrar este ícono"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 26900b6..37689ce 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -466,30 +466,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Mostrar en la pantalla y emitir sonido"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Más ajustes"</string>
<string name="notification_done" msgid="5279426047273930175">"Listo"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Color y aspecto"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Modo nocturno"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Calibrar pantalla"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Sí"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"No"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Activar automáticamente"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Cambiar al modo nocturno cuando proceda según la ubicación y la hora del día"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Cuando el modo nocturno esté activado"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Tema oscuro para sistema operativo Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Ajustar tono"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Ajustar brillo"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"El tema oscuro se aplica a las áreas principales del sistema operativo Android que normalmente se muestran con un tema claro, como la aplicación Ajustes y las notificaciones."</string>
<string name="color_apply" msgid="9212602012641034283">"Aplicar"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Confirmar configuración"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Algunas opciones de configuración de color pueden hacer que el dispositivo no se pueda utilizar. Haz clic en Aceptar para confirmar esta configuración. Si no lo haces, se restablecerá esta configuración cuando transcurran 10 segundos."</string>
@@ -501,12 +489,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Inicio"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Recientes"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Atrás"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Mostrar con controles de volumen"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"No molestar"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Combinación de teclas para los botones de volumen"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Salir de No molestar al subir el volumen"</string>
<string name="battery" msgid="7498329822413202973">"Batería"</string>
<string name="clock" msgid="7416090374234785905">"Reloj"</string>
@@ -517,8 +502,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Economizador de datos activado"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Economizador de datos desactivado"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Sí"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"No"</string>
<string name="nav_bar" msgid="1993221402773877607">"Barra de navegación"</string>
<string name="start" msgid="6873794757232879664">"Inicio"</string>
<string name="center" msgid="4327473927066010960">"Centro"</string>
@@ -541,12 +525,15 @@
<string name="preview" msgid="9077832302472282938">"Vista previa"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Arrastrar para añadir mosaicos"</string>
<string name="qs_edit" msgid="2232596095725105230">"Cambiar"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Hora"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Mostrar horas, minutos y segundos"</item>
+ <item msgid="1427801730816895300">"Mostrar horas y minutos (predeterminado)"</item>
+ <item msgid="3830170141562534721">"No mostrar este icono"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Mostrar porcentaje siempre"</item>
+ <item msgid="2139628951880142927">"Mostrar porcentaje durante la carga (predeterminado)"</item>
+ <item msgid="3327323682209964956">"No mostrar este icono"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-et-rEE/strings.xml b/packages/SystemUI/res/values-et-rEE/strings.xml
index d4c8aca..6ca0fcf 100644
--- a/packages/SystemUI/res/values-et-rEE/strings.xml
+++ b/packages/SystemUI/res/values-et-rEE/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Kuva ekraani servas koos heliga"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Rohkem seadeid"</string>
<string name="notification_done" msgid="5279426047273930175">"Valmis"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Värv ja ilme"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Öörežiim"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Ekraani kalibreerimine"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Sees"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Väljas"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Lülita automaatselt sisse"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Lülita öörežiimile, kui see on asukoha ja kellaaja suhtes sobilik"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Kui öörežiim on sees"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Kasuta Android OS-is tumedat teemat"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Reguleeri tooni"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Reguleeri heledust"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Tume teema rakendatakse Android OS-i põhialadele, mis kuvatakse tavaliselt heleda teemaga (nt seaded ja märguanded)."</string>
<string name="color_apply" msgid="9212602012641034283">"Rakenda"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Seadete kinnitamine"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Mõni värviseade ei saa seadet võib-olla kasutada. Nende värviseadete kinnitamiseks klõpsake OK, muidu lähtestatakse need seaded 10 sekundi pärast."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Avaekraan"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Hiljutised"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Tagasi"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Kuva koos helitugevuse juhtnuppudega"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Mitte segada"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Helitugevuse nuppude otsetee"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Lülita helitugevuse suurendamisel välja funkt. Mitte segada"</string>
<string name="battery" msgid="7498329822413202973">"Aku"</string>
<string name="clock" msgid="7416090374234785905">"Kell"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Andmemahu säästja on sisse lülitatud"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Andmemahu säästja on välja lülitatud"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Sees"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Väljas"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigeerimisriba"</string>
<string name="start" msgid="6873794757232879664">"Algus"</string>
<string name="center" msgid="4327473927066010960">"Keskkoht"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Eelvaade"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Lohistage paanide lisamiseks"</string>
<string name="qs_edit" msgid="2232596095725105230">"Muuda"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Kellaaeg"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Kuva tunnid, minutid ja sekundid"</item>
+ <item msgid="1427801730816895300">"Kuva tunnid ja minutid (vaikimisi)"</item>
+ <item msgid="3830170141562534721">"Ära kuva seda ikooni"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Kuva alati protsent"</item>
+ <item msgid="2139628951880142927">"Kuva protsent laadimisel (vaikimisi)"</item>
+ <item msgid="3327323682209964956">"Ära kuva seda ikooni"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-eu-rES/strings.xml b/packages/SystemUI/res/values-eu-rES/strings.xml
index eb2d16e..88ce866 100644
--- a/packages/SystemUI/res/values-eu-rES/strings.xml
+++ b/packages/SystemUI/res/values-eu-rES/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Agerrarazi jakinarazpen hauek pantailan eta egin soinua"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Ezarpen gehiago"</string>
<string name="notification_done" msgid="5279426047273930175">"Eginda"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Kolorea eta itxura"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Gau modua"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Kalibratu pantaila"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Aktibatuta"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Desaktibatuta"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Aktibatu automatikoki"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Aldatu Gau modura, kokapena eta ordua kontuan izanda"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Gau modua aktibatuta dagoenean"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Erabili gai iluna Android sistema eragilean"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Doitu kolorea"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Doitu distira"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Gai iluna Android sistema eragileko eremu nagusietan aplikatzen da. Normalean gai argian bistaratzen dira eremu horiek, adibidez, Ezarpenak atala eta jakinarazpenak."</string>
<string name="color_apply" msgid="9212602012641034283">"Aplikatu"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Berretsi ezarpenak"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Baliteke gailua kolore-ezarpen batzuekin ezin erabili izatea. Kolore-ezarpenak berresteko, sakatu Ados. Bestela, hamar segundoren buruan berrezarriko dira ezarpenak."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Hasierako pantaila"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Azkenak"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Atzera"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Erakutsi bolumena kontrolatzeko aukerekin"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Ez molestatu"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Bolumen-botoietarako lasterbidea"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Irten \"Ez molestatu\" egoeratik bolumena igotzean"</string>
<string name="battery" msgid="7498329822413202973">"Bateria"</string>
<string name="clock" msgid="7416090374234785905">"Erlojua"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Aktibatuta dago datu-aurrezlea"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Desaktibatuta dago datu-aurrezlea"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Aktibatuta"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Desaktibatuta"</string>
<string name="nav_bar" msgid="1993221402773877607">"Nabigazio-barra"</string>
<string name="start" msgid="6873794757232879664">"Hasi"</string>
<string name="center" msgid="4327473927066010960">"Erdiratu"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Aurrebista"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Arrastatu lauzak hemen gehitzeko"</string>
<string name="qs_edit" msgid="2232596095725105230">"Editatu"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Ordua"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Erakutsi orduak, minutuak eta segundoak"</item>
+ <item msgid="1427801730816895300">"Erakutsi orduak eta minutuak (balio lehenetsia)"</item>
+ <item msgid="3830170141562534721">"Ez erakutsi ikonoa"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Erakutsi beti ehunekoa"</item>
+ <item msgid="2139628951880142927">"Erakutsi ehunekoa kargatu bitartean (balio lehenetsia)"</item>
+ <item msgid="3327323682209964956">"Ez erakutsi ikonoa"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 723c4c0..1a8d603 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Näytä ilmoitus näytöllä ja toista äänimerkki"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Lisäasetukset"</string>
<string name="notification_done" msgid="5279426047273930175">"Valmis"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Väri ja ulkoasu"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Yötila"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Kalibroi näyttö"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Käytössä"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Pois käytöstä"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Ota käyttöön automaattisesti"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Ota yötila käyttöön sijainnin ja kellonajan perusteella."</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Kun yötila on käytössä"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Käytä tummaa teemaa käyttöjärjestelmässä"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Säädä sävytystä"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Säädä kirkkautta"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Tummaa teemaa käytetään Android-käyttöjärjestelmän ydinosissa, kuten Asetuksissa ja ilmoituksissa, joissa käytetään tavallisesti vaaleaa teemaa."</string>
<string name="color_apply" msgid="9212602012641034283">"Käytä"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Vahvista asetukset"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Jotkin väriasetukset voivat häiritä laitteen käyttöä. Vahvista uudet väriasetukset valitsemalla OK. Muussa tapauksessa aiemmat asetukset palautetaan 10 sekunnin kuluttua."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Aloitusnäyttö"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Viimeaikaiset"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Takaisin"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Näytä äänenvoimakkuuden säätimien yhteydessä"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Älä häiritse"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Äänenvoimakkuuspainikkeiden pikanäppäin"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Poistu Älä häiritse -tilasta, kun äänenvoimakkuus nousee"</string>
<string name="battery" msgid="7498329822413202973">"Akku"</string>
<string name="clock" msgid="7416090374234785905">"Kello"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Data Saver on käytössä."</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Data Saver on pois käytöstä."</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Käytössä"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Pois käytöstä"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigointipalkki"</string>
<string name="start" msgid="6873794757232879664">"Alussa"</string>
<string name="center" msgid="4327473927066010960">"Keskellä"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Esikatselu"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Lisää osioita vetämällä."</string>
<string name="qs_edit" msgid="2232596095725105230">"Muokkaa"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Aika"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Näytä tunnit, minuutit ja sekunnit"</item>
+ <item msgid="1427801730816895300">"Näytä tunnit ja minuutit (oletus)"</item>
+ <item msgid="3830170141562534721">"Älä näytä tätä kuvaketta"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Näytä prosenttiluku aina"</item>
+ <item msgid="2139628951880142927">"Näytä prosenttiluku latauksen aikana (oletus)"</item>
+ <item msgid="3327323682209964956">"Älä näytä tätä kuvaketta"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-fr-rCA/strings.xml b/packages/SystemUI/res/values-fr-rCA/strings.xml
index 86032a7..5a907a4 100644
--- a/packages/SystemUI/res/values-fr-rCA/strings.xml
+++ b/packages/SystemUI/res/values-fr-rCA/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Afficher sur l\'écran et émettre un son"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Plus de paramètres"</string>
<string name="notification_done" msgid="5279426047273930175">"Terminé"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Couleur et apparence"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Mode Nuit"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Calibrer l\'affichage"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Activé"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Désactivé"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Activer automatiquement"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Passer en mode Nuit en fonction de la position et de l\'heure de la journée"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Lorsque le mode Nuit est activé"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Utiliser thème foncé pour Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Ajuster la coloration"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Régler la luminosité"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Le thème foncé est appliqué à des zones essentielles de la plateforme Android qui sont habituellement affichées dans un thème clair, comme les paramètres et les notifications."</string>
<string name="color_apply" msgid="9212602012641034283">"Appliquer"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Confirmer les paramètres"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Certains paramètres de couleurs peuvent rendre cet appareil inutilisable. Cliquez sur « OK » pour valider ces paramètres, sinon ils seront réinitialisés après 10 secondes."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Accueil"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Récents"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Précédent"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Afficher avec les commandes de volume"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Ne pas déranger"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Raccourci des boutons de volume"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Désactiver fonctionnalité Ne pas déranger avec bouton Volume +"</string>
<string name="battery" msgid="7498329822413202973">"Pile"</string>
<string name="clock" msgid="7416090374234785905">"Horloge"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"La fonction Économiseur de données est activée"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"La fonction Économiseur de données est désactivée"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Activé"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Désactivé"</string>
<string name="nav_bar" msgid="1993221402773877607">"Barre de navigation"</string>
<string name="start" msgid="6873794757232879664">"Démarrer"</string>
<string name="center" msgid="4327473927066010960">"Centrer"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Aperçu"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Faites glisser des tuiles ici pour les ajouter"</string>
<string name="qs_edit" msgid="2232596095725105230">"Modifier"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Heure"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Afficher les heures, les minutes et les secondes"</item>
+ <item msgid="1427801730816895300">"Afficher les heures et les minutes (par défaut)"</item>
+ <item msgid="3830170141562534721">"Ne pas afficher cette icône"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Toujours afficher le pourcentage"</item>
+ <item msgid="2139628951880142927">"Montrer le pourcentage durant la charge (par défaut)"</item>
+ <item msgid="3327323682209964956">"Ne pas afficher cette icône"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index 65bb86d..0da6f14 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Afficher sur l\'écran et émettre un son"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Plus de paramètres"</string>
<string name="notification_done" msgid="5279426047273930175">"Terminé"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Couleur et apparence"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Mode Nuit"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Calibrer l\'affichage"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Activé"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Désactivé"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Activer automatiquement"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Passer en mode Nuit en fonction de la position et de l\'heure de la journée"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Lorsque le mode Nuit est activé"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Utiliser thème foncé pour plate-forme Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Ajuster la coloration"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Régler la luminosité"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Le thème foncé est appliqué à des zones essentielles de la plate-forme Android qui sont habituellement affichées dans un thème clair, telles que les paramètres et les notifications."</string>
<string name="color_apply" msgid="9212602012641034283">"Appliquer"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Vérifier les paramètres"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Certains paramètres de couleurs peuvent rendre cet appareil inutilisable. Cliquez sur \"OK\" pour valider ces paramètres, sans quoi ils seront réinitialisés après 10 secondes."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Accueil"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Récents"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Précédent"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Afficher avec les commandes de volume"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Ne pas déranger"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Raccourci des boutons de volume"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Désactiver fonctionnalité Ne pas déranger via bouton Volume +"</string>
<string name="battery" msgid="7498329822413202973">"Batterie"</string>
<string name="clock" msgid="7416090374234785905">"Horloge"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"L\'économiseur de données est activé."</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"L\'économiseur de données est désactivé."</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Activé"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Désactivé"</string>
<string name="nav_bar" msgid="1993221402773877607">"Barre de navigation"</string>
<string name="start" msgid="6873794757232879664">"Début"</string>
<string name="center" msgid="4327473927066010960">"Centre"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Aperçu"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Faites glisser des tuiles ici pour les ajouter"</string>
<string name="qs_edit" msgid="2232596095725105230">"Modifier"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Heure"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Afficher les heures, les minutes et les secondes"</item>
+ <item msgid="1427801730816895300">"Afficher les heures et les minutes (option par défaut)"</item>
+ <item msgid="3830170141562534721">"Ne plus afficher cette icône"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Toujours afficher le pourcentage"</item>
+ <item msgid="2139628951880142927">"Afficher le pourcentage lorsque l\'appareil est en charge (option par défaut)"</item>
+ <item msgid="3327323682209964956">"Ne plus afficher cette icône"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-gl-rES/strings.xml b/packages/SystemUI/res/values-gl-rES/strings.xml
index dd8d15b..1ff6b263 100644
--- a/packages/SystemUI/res/values-gl-rES/strings.xml
+++ b/packages/SystemUI/res/values-gl-rES/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Mostrar na pantalla e emitir son"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Máis opcións"</string>
<string name="notification_done" msgid="5279426047273930175">"Feito"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Cor e aspecto"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Modo nocturno"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Calibrar pantalla"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Activado"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Desactivado"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Activar automaticamente"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Cambia ao modo nocturno segundo proceda para a localización e a hora do día"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Cando o modo nocturno está activado"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Usar tema escuro para Android SO"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Axustar matiz"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Axustar brillo"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"O tema escuro aplícase ás áreas principais de Android SO que se mostran normalmente nun tema claro, como a configuración e as notificacións."</string>
<string name="color_apply" msgid="9212602012641034283">"Aplicar"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Confirmar configuración"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Algunhas opcións de configuración de cor poden facer que este dispositivo sexa inutilizable. Fai clic en Aceptar para confirmar esta configuración de cor; en caso contrario, a configuración restablecerase tras 10 segundos."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Inicio"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Recentes"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Volver"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Mostrar cos controis de volume"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Non molestar"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Atallo dos botóns de volume"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Desactivar o modo Non molestar ao subir o volume"</string>
<string name="battery" msgid="7498329822413202973">"Batería"</string>
<string name="clock" msgid="7416090374234785905">"Reloxo"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"O economizador de datos está activado"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"O economizador de datos está desactivado"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Activar"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Desactivar"</string>
<string name="nav_bar" msgid="1993221402773877607">"Barra de navegación"</string>
<string name="start" msgid="6873794757232879664">"Inicio"</string>
<string name="center" msgid="4327473927066010960">"Centro"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Vista previa"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Arrastrar para engadir mosaicos"</string>
<string name="qs_edit" msgid="2232596095725105230">"Editar"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Hora"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Mostrar horas, minutos e segundos"</item>
+ <item msgid="1427801730816895300">"Mostrar horas e minutos (predeterminado)"</item>
+ <item msgid="3830170141562534721">"Non mostrar esta icona"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Mostrar sempre porcentaxe"</item>
+ <item msgid="2139628951880142927">"Mostrar porcentaxe durante a carga (predeterminado)"</item>
+ <item msgid="3327323682209964956">"Non mostrar esta icona"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-gu-rIN/strings.xml b/packages/SystemUI/res/values-gu-rIN/strings.xml
index 0e19df3..3891d7b 100644
--- a/packages/SystemUI/res/values-gu-rIN/strings.xml
+++ b/packages/SystemUI/res/values-gu-rIN/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"સ્ક્રીન પર ત્વરિત દ્રષ્ટિ કરો અને અવાજ કરો"</string>
<string name="notification_more_settings" msgid="816306283396553571">"વધુ સેટિંગ્સ"</string>
<string name="notification_done" msgid="5279426047273930175">"થઈ ગયું"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"રંગ અને દેખાવ"</string>
+ <string name="night_mode" msgid="3540405868248625488">"રાત્રિ મોડ"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"પ્રદર્શન કૅલિબ્રેટ કરો"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"ચાલુ"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"બંધ"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"આપમેળે ચાલુ કરો"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"સ્થાન અને દિવસના સમય માટે યોગ્ય હોય તે રાત્રિ મોડ પર સ્વિચ કરો"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"જ્યારે રાત્રિ મોડ ચાલુ હોય"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Android OS માટે ઘાટી થીમનો ઉપયોગ કરો"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"ટિંટ સમાયોજિત કરો"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"તેજ સમાયોજિત કરો"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"ઘાટી થીમને Android OS ના મુખ્ય ક્ષેત્રો પર લાગુ કરે છે જે સામાન્ય રીતે સેટિંગ્સ અને સૂચનાઓ જેવી લાઇટ થીમમાં પ્રદર્શિત કરવામાં આવે છે."</string>
<string name="color_apply" msgid="9212602012641034283">"લાગુ કરો"</string>
<string name="color_revert_title" msgid="4746666545480534663">"સેટિંગ્સની પુષ્ટિ કરો"</string>
<string name="color_revert_message" msgid="9116001069397996691">"કેટલીક રંગ સેટિંગ્સ આ ઉપકરણને બિનઉપયોગી બનાવી શકે છે. આ રંગ સેટિંગ્સની પુષ્ટિ કરવા માટે ઑકે ક્લિક કરો, અન્યથા 10 સેકંડ પછી આ સેટિંગ્સ ફરીથી સેટ થશે."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"હોમ"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"તાજેતરના"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"પાછળ"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"વૉલ્યૂમ નિયંત્રણ સાથે બતાવો"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"ખલેલ પાડશો નહીં"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"વૉલ્યૂમ બટન્સ શૉર્ટકટ"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"વૉલ્યૂમ વધારવા પર ખલેલ પાડશો નહીંમાંથી બહાર નિકળો"</string>
<string name="battery" msgid="7498329822413202973">"બૅટરી"</string>
<string name="clock" msgid="7416090374234785905">"ઘડિયાળ"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"ડેટા સેવર ચાલુ છે"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"ડેટા સેવર બંધ છે"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"ચાલુ"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"બંધ"</string>
<string name="nav_bar" msgid="1993221402773877607">"નેવિગેશન બાર"</string>
<string name="start" msgid="6873794757232879664">"પ્રારંભ કરો"</string>
<string name="center" msgid="4327473927066010960">"મધ્ય"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"પૂર્વાવલોકન કરો"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"ટાઇલ્સ ઉમેરવા માટે ખેંચો"</string>
<string name="qs_edit" msgid="2232596095725105230">"સંપાદિત કરો"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"સમય"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"કલાક, મિનિટ અને સેકંડ બતાવો"</item>
+ <item msgid="1427801730816895300">"કલાક અને મિનિટ બતાવો (ડિફોલ્ટ)"</item>
+ <item msgid="3830170141562534721">"આ આઇકન બતાવશો નહીં"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"હંમેશાં ટકાવારી બતાવો"</item>
+ <item msgid="2139628951880142927">"ચાર્જ થાય ત્યારે ટકાવારી બતાવો (ડિફોલ્ટ)"</item>
+ <item msgid="3327323682209964956">"આ આઇકન બતાવશો નહીં"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 083a46e..440c3f2 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Az értesítések felugranak a képernyőn hangjelzéssel"</string>
<string name="notification_more_settings" msgid="816306283396553571">"További beállítások"</string>
<string name="notification_done" msgid="5279426047273930175">"Kész"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Szín és megjelenés"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Éjszakai mód"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Kijelző kalibrálása"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Bekapcsolva"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Kikapcsolva"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Automatikus bekapcsolás"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Váltás az Éjszakai módra a helynek és napszaknak megfelelően"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Amikor be van kapcsolva az Éjszakai mód"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Sötét téma használata az Android operációs rendszernél"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Színárnyalat módosítása"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Fényerő módosítása"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Sötét téma látható az Android operációs rendszer olyan alapterületeinél, amelyek normál állapotban világosan jelennek meg (például a Beállítások és az értesítések)."</string>
<string name="color_apply" msgid="9212602012641034283">"Alkalmaz"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Beállítások megerősítése"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Bizonyos színbeállítások használhatatlanná tehetik ezt az eszközt. A színbeállítás megerősítéséhez kattintson az OK lehetőségre, máskülönben a rendszer 10 másodpercen belül visszaáll a korábbira."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Otthon"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Legutóbbiak"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Vissza"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Megjelenítés hangerőszabályzóval"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Ne zavarjanak"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"A hangerőgombok gyorsbillentyűk"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"„Ne zavarjanak” deaktiválása hangerőnöveléskor"</string>
<string name="battery" msgid="7498329822413202973">"Akkumulátor"</string>
<string name="clock" msgid="7416090374234785905">"Óra"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Az adatforgalom-csökkentő be van kapcsolva"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Az Adatforgalom-csökkentő ki van kapcsolva"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Be"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Ki"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigációs sáv"</string>
<string name="start" msgid="6873794757232879664">"Kezdés"</string>
<string name="center" msgid="4327473927066010960">"Igazítás középre"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Előnézet"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Húzza csempe hozzáadásához"</string>
<string name="qs_edit" msgid="2232596095725105230">"Szerkesztés"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Idő"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Óra, perc és másodperc megjelenítése"</item>
+ <item msgid="1427801730816895300">"Óra és perc megjelenítése (alapértelmezett)"</item>
+ <item msgid="3830170141562534721">"Ne jelenjen meg ez az ikon"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Százalékos érték mindig látható"</item>
+ <item msgid="2139628951880142927">"Százalékos érték töltés közben látható (alapértelmezett)"</item>
+ <item msgid="3327323682209964956">"Ne jelenjen meg ez az ikon"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-hy-rAM/strings.xml b/packages/SystemUI/res/values-hy-rAM/strings.xml
index 64058e4..ef7c8e3 100644
--- a/packages/SystemUI/res/values-hy-rAM/strings.xml
+++ b/packages/SystemUI/res/values-hy-rAM/strings.xml
@@ -301,7 +301,7 @@
<string name="recents_lock_to_app_button_label" msgid="6942899049072506044">"էկրանի ամրակցում"</string>
<string name="recents_search_bar_label" msgid="8074997400187836677">"որոնել"</string>
<string name="recents_launch_error_message" msgid="2969287838120550506">"Հնարավոր չէ գործարկել <xliff:g id="APP">%s</xliff:g>-ը:"</string>
- <string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> հավելվածը անվտանգ ռեժիմում կասեցված է:"</string>
+ <string name="recents_launch_disabled_message" msgid="1624523193008871793">"<xliff:g id="APP">%s</xliff:g> հավելվածը անվտանգ ռեժիմում անջատված է:"</string>
<string name="recents_history_button_label" msgid="5153358867807604821">"Պատմություն"</string>
<string name="recents_history_clear_all_button_label" msgid="5905258334958006953">"Մաքրել"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Հորիզոնական տրոհում"</string>
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Ցուցադրել էկրանին և հնչեցնել ձայնային ազդանշան"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Այլ կարգավորումներ"</string>
<string name="notification_done" msgid="5279426047273930175">"Պատրաստ է"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Գույնը և արտաքին տեսքը"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Գիշերային ռեժիմ"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Չափաբերել էկրանը"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Միացված է"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Անջատված է"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Միացնել ավտոմատ կերպով"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Անցեք Գիշերային ռեժիմի, եթե դա պահանջում է տեղը և օրվա ժամանակը"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Երբ Գիշերային ռեժիմը միացված է"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Օգտագործել մուգ թեման Android OS-ի համար"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Կարգավորել երանգը"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Կարգավորել պայծառությունը"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Մուգ թեման կիրառվում է Android OS-ի հիմնական հատվածների նկատմամբ, որոնք սովորաբար ցուցադրվում են բաց թենայում (օրինակ՝ Կարգավորումներ և ծանուցումներ):"</string>
<string name="color_apply" msgid="9212602012641034283">"Կիրառել"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Հաստատել կարգավորումները"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Գունային որոշ կարգավորումները կարող են այս սարքը օգտագործման համար ոչ պիտանի դարձնել: Սեղմեք Լավ կոճակը՝ գունային այս կարգավորումները հաստատելու համար: Հակառակ դեպքում այս կարգավորումները կվերակայվեն 10 վայրկյան հետո:"</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Գլխավոր էջ"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Վերջինները"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Հետ"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Ցույց տալ ձայնի ուժգնության կառավարման տարրերի հետ"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Չընդհատել"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Ձայնի կոճակների դյուրանցում"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Ելնել Չխանգարել գործառույթից ձայնի ավելացման կոճակը սեղմելիս"</string>
<string name="battery" msgid="7498329822413202973">"Մարտկոց"</string>
<string name="clock" msgid="7416090374234785905">"Ժամացույց"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Տվյալների խնայումը միացված է"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Տվյալների խնայումն անջատված է"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Միացնել"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Անջատել"</string>
<string name="nav_bar" msgid="1993221402773877607">"Նավարկման գոտի"</string>
<string name="start" msgid="6873794757232879664">"Սկսել"</string>
<string name="center" msgid="4327473927066010960">"Կենտրոն"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Նախադիտում"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Քաշեք՝ սալիկներ ավելացնելու համար"</string>
<string name="qs_edit" msgid="2232596095725105230">"Փոփոխել"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Ժամ"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Ցույց տալ ժամերը, րոպեները և վայրկյանները"</item>
+ <item msgid="1427801730816895300">"Ցույց տալ ժամերը և րոպեները (կանխադրված է)"</item>
+ <item msgid="3830170141562534721">"Ցույց չտալ այս պատկերակը"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Միշտ ցույց տալ տոկոսը"</item>
+ <item msgid="2139628951880142927">"Ցույց տալ տոկոսը լիցքավորելու ժամանակ (կանխադրված է)"</item>
+ <item msgid="3327323682209964956">"Ցույց չտալ այս պատկերակը"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-is-rIS/strings.xml b/packages/SystemUI/res/values-is-rIS/strings.xml
index 25e5da8..608ec51 100644
--- a/packages/SystemUI/res/values-is-rIS/strings.xml
+++ b/packages/SystemUI/res/values-is-rIS/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Birta á skjánum og spila hljóð"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Fleiri stillingar"</string>
<string name="notification_done" msgid="5279426047273930175">"Lokið"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Litur og útlit"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Næturstilling"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Kvarða skjáinn"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Kveikt"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Slökkt"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Kveikja sjálfkrafa"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Skipta í næturstillingu í samræmi við staðsetningu og tíma dags"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Þegar kveikt er á næturstillingu"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Nota dökkt þema fyrir Android OS"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Stilla litblæ"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Stilla birtustig"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Dökka þemað er notað á þeim aðalsvæðum Android OS sem venjulega eru ljós, s.s. stillingum og tilkynningum."</string>
<string name="color_apply" msgid="9212602012641034283">"Nota"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Staðfesta stillingar"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Sumar litastillingar kunna að bitna á notagildi tækisins. Veldu „Í lagi“ til að staðfesta þessar litastillingar, að öðrum kosti verða litirnir endurstilltir eftir tíu sekúndur."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Heim"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Nýlegt"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Til baka"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Sýna með hljóðstyrksstillingum"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Ónáðið ekki"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Flýtihnappar fyrir hljóðstyrk"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Slökkva á „Ónáðið ekki“ með því að hækka"</string>
<string name="battery" msgid="7498329822413202973">"Rafhlaða"</string>
<string name="clock" msgid="7416090374234785905">"Klukka"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Kveikt er á gagnasparnaði"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Slökkt er á gagnasparnaði"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Kveikt"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Slökkt"</string>
<string name="nav_bar" msgid="1993221402773877607">"Yfirlitsstika"</string>
<string name="start" msgid="6873794757232879664">"Byrja"</string>
<string name="center" msgid="4327473927066010960">"Miðja"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Forskoðun"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Dragðu til að bæta við reitum"</string>
<string name="qs_edit" msgid="2232596095725105230">"Breyta"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Tími"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Sýna klukkustundir, mínútur og sekúndur"</item>
+ <item msgid="1427801730816895300">"Sýna klukkustundir og mínútur (sjálfgefið)"</item>
+ <item msgid="3830170141562534721">"Ekki sýna þetta tákn"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Sýna alltaf hlutfall"</item>
+ <item msgid="2139628951880142927">"Sýna hlutfall meðan á hleðslu stendur (sjálfgefið)"</item>
+ <item msgid="3327323682209964956">"Ekki sýna þetta tákn"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 4457e1b..ee6c3ee 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Apri sullo schermo e riproduci suono"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Altre impostazioni"</string>
<string name="notification_done" msgid="5279426047273930175">"Fine"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Colore e aspetto"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Modalità notturna"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Calibra display"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Attiva"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Disattivata"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Attiva automaticamente"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Attiva la modalità notturna in base alla località e all\'ora del giorno"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Quando la modalità notturna è attiva"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Utilizza tema scuro per sistema Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Regola tinta"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Regola luminosità"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Il tema scuro viene applicato agli elementi fondamentali del sistema operativo Android che vengono generalmente visualizzati con un tema chiaro, ad esempio impostazioni e notifiche."</string>
<string name="color_apply" msgid="9212602012641034283">"Applica"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Conferma le impostazioni"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Alcune impostazioni relative ai colori potrebbero rendere inutilizzabile il dispositivo. Fai clic su OK per confermare queste impostazioni; in caso contrario, le impostazioni verranno reimpostate dopo 10 secondi."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Home"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Recenti"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Indietro"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Mostra con controlli volume"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Non disturbare"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Pulsanti del volume come scorciatoia"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Disattiva Non disturbare all\'aumento del volume"</string>
<string name="battery" msgid="7498329822413202973">"Batteria"</string>
<string name="clock" msgid="7416090374234785905">"Orologio"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Risparmio dati attivo"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Risparmio dati disattivato"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Attiva"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Off"</string>
<string name="nav_bar" msgid="1993221402773877607">"Barra di navigazione"</string>
<string name="start" msgid="6873794757232879664">"All\'inizio"</string>
<string name="center" msgid="4327473927066010960">"Al centro"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Anteprima"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Trascina per aggiungere i riquadri"</string>
<string name="qs_edit" msgid="2232596095725105230">"Modifica"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Ora"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Mostra ore, minuti e secondi"</item>
+ <item msgid="1427801730816895300">"Mostra ore e minuti (opzione predefinita)"</item>
+ <item msgid="3830170141562534721">"Non mostrare questa icona"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Mostra sempre la percentuale"</item>
+ <item msgid="2139628951880142927">"Mostra la percentuale quando in carica (opzione predefinita)"</item>
+ <item msgid="3327323682209964956">"Non mostrare questa icona"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index 65d73ec..76fdb73 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"画面に数秒間表示し、音声でも知らせる"</string>
<string name="notification_more_settings" msgid="816306283396553571">"詳細設定"</string>
<string name="notification_done" msgid="5279426047273930175">"完了"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"色と表示"</string>
+ <string name="night_mode" msgid="3540405868248625488">"夜間モード"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"表示の調整"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"ON"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"OFF"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"自動的に ON"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"場所や時間に応じて夜間モードに切り替えます"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"夜間モードが ON のとき"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Android OS でダークテーマを使用"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"ティントを調整"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"明るさを調整"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"通常ライトテーマで表示される Android OS の主要領域(設定や通知など)にダークテーマが適用されます。"</string>
<string name="color_apply" msgid="9212602012641034283">"適用"</string>
<string name="color_revert_title" msgid="4746666545480534663">"設定の確認"</string>
<string name="color_revert_message" msgid="9116001069397996691">"一部の色設定を適用すると、この端末を使用できなくなることがあります。この色設定を確認するには、[OK] をクリックしてください。確認しない場合、10 秒後に設定はリセットされます。"</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"ホーム"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"最近"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"戻る"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"音量調節を表示"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"通知の非表示"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"音量ボタンのショートカット"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"音量上げボタンで [通知を非表示] を OFF にする"</string>
<string name="battery" msgid="7498329822413202973">"電池"</string>
<string name="clock" msgid="7416090374234785905">"時計"</string>
@@ -519,8 +504,7 @@
<!-- no translation found for accessibility_data_saver_off (8841582529453005337) -->
<skip />
<string name="switch_bar_on" msgid="1142437840752794229">"ON"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"OFF"</string>
<string name="nav_bar" msgid="1993221402773877607">"ナビゲーション バー"</string>
<string name="start" msgid="6873794757232879664">"最初"</string>
<string name="center" msgid="4327473927066010960">"中央"</string>
@@ -543,12 +527,15 @@
<string name="preview" msgid="9077832302472282938">"プレビュー"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"タイルを追加するにはドラッグしてください"</string>
<string name="qs_edit" msgid="2232596095725105230">"編集"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"時間"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"時間、分、秒を表示"</item>
+ <item msgid="1427801730816895300">"時間、分を表示(デフォルト)"</item>
+ <item msgid="3830170141562534721">"このアイコンを表示しない"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"常に割合を表示"</item>
+ <item msgid="2139628951880142927">"変更時に割合を表示(デフォルト)"</item>
+ <item msgid="3327323682209964956">"このアイコンを表示しない"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-ka-rGE/strings.xml b/packages/SystemUI/res/values-ka-rGE/strings.xml
index abe4e64..6963770 100644
--- a/packages/SystemUI/res/values-ka-rGE/strings.xml
+++ b/packages/SystemUI/res/values-ka-rGE/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"ამ შეტყობინებების პირდაპირ ეკრანზე, ხმოვან სიგნალთან ერთად ჩვენება"</string>
<string name="notification_more_settings" msgid="816306283396553571">"დამატებითი პარამეტრები"</string>
<string name="notification_done" msgid="5279426047273930175">"მზადაა"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"ფერი და იერსახე"</string>
+ <string name="night_mode" msgid="3540405868248625488">"ღამის რეჟიმი"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"ეკრანის კალიბრაცია"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"ჩართული"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"გამორთული"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"ავტომატურად ჩართვა"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"ღამის რეჟიმზე გადართვა მდებარეობისა და დღე-ღამის მონაკვეთის შესაბამისად."</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"ღამის რეჟიმის ჩართვისას"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Android OS-ისთვის მუქი თემის გამოყენება"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"ელფერის გასწორება"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"სიკაშკაშის გასწორება"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"მუქი თემა მიესადაგება Android OS-ის ძირითად არეებს, რომლებიც, ჩვეულებრივ, ღია თემის მეშვეობით არის ნაჩვენები. მაგალითად, პარამეტრებს და შეტყობინებებს."</string>
<string name="color_apply" msgid="9212602012641034283">"გამოყენება"</string>
<string name="color_revert_title" msgid="4746666545480534663">"პარამეტრების დადასტურება"</string>
<string name="color_revert_message" msgid="9116001069397996691">"ფერთა ზოგიერთ პარამეტრს ამ მოწყობილობასთან მუშაობის გართულება შეუძლია. ფერთა ამჟამინდელი პარამეტრების დასადასტურებლად, დააწკაპუნეთ „კარგი“-ზე. წინააღმდეგ შემთხვევაში, პარამეტრები 10 წამის შემდეგ ჩამოიყრება."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"მთავარი"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"ბოლოს გამოყენებული"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"უკან"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"ხმის მართვის საშუალებების ჩვენება"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"არ შემაწუხოთ"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"ხმის ღილაკების მალსახმობი"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"ხმის აწევისას „არ შემაწუხოთ“ რეჟიმიდან გამოსვლა"</string>
<string name="battery" msgid="7498329822413202973">"ბატარეა"</string>
<string name="clock" msgid="7416090374234785905">"საათი"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"მონაცემთა დამზოგველი ჩართულია"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"მონაცემთა დამზოგველი გამორთულია"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"ჩართული"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"გამორთვა"</string>
<string name="nav_bar" msgid="1993221402773877607">"ნავიგაციის ზოლი"</string>
<string name="start" msgid="6873794757232879664">"თავში"</string>
<string name="center" msgid="4327473927066010960">"ცენტრში"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"გადახედვა"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"ფილების დასამატებლად, გადაიტანეთ ჩავლებით"</string>
<string name="qs_edit" msgid="2232596095725105230">"რედაქტირება"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"დრო"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"საათების, წუთებისა და წამების ჩვენება"</item>
+ <item msgid="1427801730816895300">"საათებისა და წუთების ჩვენება (ნაგულისხმევი)"</item>
+ <item msgid="3830170141562534721">"აღარ მაჩვენო ეს ხატულა"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"პროცენტულობის ყოველთვის ჩვენება"</item>
+ <item msgid="2139628951880142927">"პროცენტულობის დატენვისას ჩვენება (ნაგულისხმევი)"</item>
+ <item msgid="3327323682209964956">"აღარ მაჩვენო ეს ხატულა"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-kk-rKZ/strings.xml b/packages/SystemUI/res/values-kk-rKZ/strings.xml
index a9d6d18..60ab9f8 100644
--- a/packages/SystemUI/res/values-kk-rKZ/strings.xml
+++ b/packages/SystemUI/res/values-kk-rKZ/strings.xml
@@ -446,7 +446,7 @@
<string name="clock_seconds_desc" msgid="6282693067130470675">"Күйін көрсету жолағында сағат секундтарын көрсету. Батареяның қызмет көрсету мерзіміне әсер етуі мүмкін."</string>
<string name="qs_rearrange" msgid="8060918697551068765">"Жылдам параметрлерді қайта реттеу"</string>
<string name="show_brightness" msgid="6613930842805942519">"Жылдам параметрлерде жарықтықты көрсету"</string>
- <string name="overview_nav_bar_gesture" msgid="8579814204727917764">"Бөлінген экранда жоғары қарай жанау қимылын қосу"</string>
+ <string name="overview_nav_bar_gesture" msgid="8579814204727917764">"Бөлінген экранда жоғары қарай сырғыту қимылын қосу"</string>
<string name="overview_nav_bar_gesture_desc" msgid="6329167382305102615">"\"Шолу\" түймесінен жоғары қарай жанау арқылы бөлінген экранға кіру қимылын қосу"</string>
<string name="experimental" msgid="6198182315536726162">"Эксперименттік"</string>
<string name="enable_bluetooth_title" msgid="5027037706500635269">"Bluetooth функциясын қосу керек пе?"</string>
diff --git a/packages/SystemUI/res/values-km-rKH/strings.xml b/packages/SystemUI/res/values-km-rKH/strings.xml
index 5f52272..32cdbcc 100644
--- a/packages/SystemUI/res/values-km-rKH/strings.xml
+++ b/packages/SystemUI/res/values-km-rKH/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"លោតបង្ហាញនៅលើអេក្រង់ និងបន្លឺសំឡេង"</string>
<string name="notification_more_settings" msgid="816306283396553571">"ការកំណត់ច្រើនទៀត"</string>
<string name="notification_done" msgid="5279426047273930175">"រួចរាល់"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"ពណ៌ និងរូបរាង"</string>
+ <string name="night_mode" msgid="3540405868248625488">"របៀបពេលយប់"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"ការបង្ហាញក្រិត"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"បើក"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"បិទ"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"បើកដោយស្វ័យប្រវត្តិ"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"ប្តូរទៅជារបៀបពេលយប់ដែលសមស្របទៅតាមទីកន្លែង និងពេលវេលា"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"នៅពេលបើករបៀបពេលយប់"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"ប្រើធីមងងឹតសម្រាប់ប្រព័ន្ធប្រតិបត្តិការ Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"កែសម្រួលពណ៌ព្រឿងៗ"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"កែសម្រួលពន្លឺ"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"ធីមងងឹតត្រូវបានប្រើសម្រាប់ចំណុចស្នូលនៃប្រព័ន្ធប្រតិបត្តិការ Android ដែលជាទូទៅត្រូវបានបង្ហាញជាធីមដែលភ្លឺ ដូចជាការកំណត់ និងការជូនដំណឹង។"</string>
<string name="color_apply" msgid="9212602012641034283">"អនុវត្ត"</string>
<string name="color_revert_title" msgid="4746666545480534663">"បញ្ជាក់ការកំណត់"</string>
<string name="color_revert_message" msgid="9116001069397996691">"ការកំណត់ពណ៌មួយចំនួនអាចធ្វើឲ្យឧបករណ៍នេះមិនអាចប្រើបាន។ សូមចុច យល់ព្រម ដើម្បីបញ្ជាក់ការកំណត់ពណ៌ទាំងនេះ បើមិនដូច្នេះទេការកំណត់ទាំងនេះនឹងកំណត់ឡើងវិញក្នុងរយៈពេល 10 វិនាទីបន្ទាប់។"</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"ដើម"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"ថ្មីៗ"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"ថយក្រោយ"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"បង្ហាញជាមួយការគ្រប់គ្រងកម្រិតសំឡេង"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"កុំរំខាន"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"ផ្លូវកាត់ប៊ូតុងកម្រិតសំឡេង"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"ចាកចេញពីមុខងារកុំរំខាននៅពេលបង្កើនសំឡេង"</string>
<string name="battery" msgid="7498329822413202973">"ថ្ម"</string>
<string name="clock" msgid="7416090374234785905">"នាឡិកា"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"កម្មវិធីសន្សំសំចៃទិន្នន័យបានបើក"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"កម្មវិធីសន្សំសំចៃទិន្នន័យបានបិទ"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"បើក"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"បិទ"</string>
<string name="nav_bar" msgid="1993221402773877607">"របាររុករក"</string>
<string name="start" msgid="6873794757232879664">"ចាប់ផ្ដើម"</string>
<string name="center" msgid="4327473927066010960">"កណ្តាល"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"មើលជាមុន"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"អូសដើម្បីបន្ថែមចំណងជើង"</string>
<string name="qs_edit" msgid="2232596095725105230">"កែសម្រួល"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"ម៉ោង"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"បង្ហាញម៉ោង នាទី និងវិនាទី"</item>
+ <item msgid="1427801730816895300">"បង្ហាញម៉ោង នាទី (លំនាំដើម)"</item>
+ <item msgid="3830170141562534721">"កុំបង្ហាញរូបតំណាងនេះ"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"បង្ហាញភាគរយជានិច្ច"</item>
+ <item msgid="2139628951880142927">"បង្ហាញភាគរយនៅពេលសាកថ្ម (លំនាំដើម)"</item>
+ <item msgid="3327323682209964956">"កុំបង្ហាញរូបតំណាងនេះ"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-kn-rIN/strings.xml b/packages/SystemUI/res/values-kn-rIN/strings.xml
index 44262ab..f97c842 100644
--- a/packages/SystemUI/res/values-kn-rIN/strings.xml
+++ b/packages/SystemUI/res/values-kn-rIN/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"ಪರದೆಯನ್ನು ವೀಕ್ಷಿಸಿ ಮತ್ತು ಧ್ವನಿ ಮಾಡು"</string>
<string name="notification_more_settings" msgid="816306283396553571">"ಹೆಚ್ಚಿನ ಸೆಟ್ಟಿಂಗ್ಗಳು"</string>
<string name="notification_done" msgid="5279426047273930175">"ಮುಗಿದಿದೆ"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"ಬಣ್ಣ ಮತ್ತು ಗೋಚರತೆ"</string>
+ <string name="night_mode" msgid="3540405868248625488">"ರಾತ್ರಿ ಮೋಡ್"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"ಅಣಿಗೊಳಿಸುವ ಪ್ರದರ್ಶನ"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"ಆನ್"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"ಆಫ್"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಆನ್ ಮಾಡು"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"ಸ್ಥಳ ಮತ್ತು ದಿನದ ಸಮಯಕ್ಕೆ ಸೂಕ್ತವಾಗುವಂತೆ ರಾತ್ರಿ ಮೋಡ್ ಅನ್ನು ಬದಲಾಯಿಸಿ"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"ರಾತ್ರಿ ಮೋಡ್ ಆನ್ ಆಗಿರುವಾಗ"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Android OS ಗೆ ಕಪ್ಪು ಥೀಮ್ ಬಳಸಿ"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"ಟಿಂಟ್ ಸರಿಹೊಂದಿಸು"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"ಪ್ರಖರತೆಯನ್ನು ಸರಿಹೊಂದಿಸು"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"ಕಪ್ಪು ಥೀಮ್ ಅನ್ನು Android OS ನ ಕೋರ್ ಪ್ರದೇಶಗಳಿಗೆ ಅನ್ವಯಿಸಲಾಗಿರುತ್ತದೆ. ಇದನ್ನು ಸೆಟ್ಟಿಂಗ್ಗಳು ಮತ್ತು ಅಧಿಸೂಚನೆಗಳಂತಹ ತಿಳಿಯಾದ ಥೀಮ್ನಲ್ಲಿ ಸಾಮಾನ್ಯವಾಗಿ ಪ್ರದರ್ಶಿಸಲಾಗುತ್ತದೆ."</string>
<string name="color_apply" msgid="9212602012641034283">"ಅನ್ವಯಿಸು"</string>
<string name="color_revert_title" msgid="4746666545480534663">"ಸೆಟ್ಟಿಂಗ್ಗಳನ್ನು ಖಚಿತಪಡಿಸಿ"</string>
<string name="color_revert_message" msgid="9116001069397996691">"ಕೆಲವು ಬಣ್ಣ ಸೆಟ್ಟಿಂಗ್ಗಳು ಈ ಸಾಧನವನ್ನು ಅನುಪಯುಕ್ತಗೊಳಿಸಬಹುದು. ಈ ಬಣ್ಣ ಸೆಟ್ಟಿಂಗ್ಗಳನ್ನು ಖಚಿತಪಡಿಸಲು ಸರಿ ಕ್ಲಿಕ್ ಮಾಡಿ, ಇಲ್ಲವಾದರೆ ಈ ಸೆಟ್ಟಿಂಗ್ಗಳನ್ನು 10 ಸೆಕೆಂಡುಗಳ ನಂತರ ಮರುಹೊಂದಿಸಿ."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"ಮುಖಪುಟ"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"ಇತ್ತೀಚಿನವುಗಳು"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"ಹಿಂದೆ"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"ವಾಲ್ಯೂಮ್ ನಿಯಂತ್ರಣಗಳ ಜೊತೆಗೆ ತೋರಿಸು"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"ಅಡಚಣೆ ಮಾಡಬೇಡಿ"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"ವಾಲ್ಯೂಮ್ ಬಟನ್ಗಳ ಶಾರ್ಟ್ಕಟ್"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"ವಾಲ್ಯೂಮ್ ಹೆಚ್ಚಳದಲ್ಲಿ \"ಅಡಚಣೆ ಮಾಡಬೇಡಿ\"ಯನ್ನು ತೊರೆಯಿರಿ"</string>
<string name="battery" msgid="7498329822413202973">"ಬ್ಯಾಟರಿ"</string>
<string name="clock" msgid="7416090374234785905">"ಗಡಿಯಾರ"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"ಡೇಟಾ ಉಳಿಸುವಿಕೆ ಆನ್ ಆಗಿದೆ"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"ಡೇಟಾ ಉಳಿಸುವಿಕೆ ಆಫ್ ಆಗಿದೆ"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"ಆನ್"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"ಆಫ್"</string>
<string name="nav_bar" msgid="1993221402773877607">"ನ್ಯಾವಿಗೇಷನ್ ಬಾರ್"</string>
<string name="start" msgid="6873794757232879664">"ಪ್ರಾರಂಭ"</string>
<string name="center" msgid="4327473927066010960">"ಮಧ್ಯ"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"ಪೂರ್ವವೀಕ್ಷಣೆ"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"ಟೈಲ್ಗಳನ್ನು ಸೇರಿಸಲು ಡ್ರ್ಯಾಗ್ ಮಾಡಿ"</string>
<string name="qs_edit" msgid="2232596095725105230">"ಸಂಪಾದಿಸು"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"ಸಮಯ"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"ಗಂಟೆಗಳು, ನಿಮಿಷಗಳು, ಸೆಕೆಂಡುಗಳನ್ನು ತೋರಿಸು"</item>
+ <item msgid="1427801730816895300">"ಗಂಟೆಗಳು ಮತ್ತು ನಿಮಿಷಗಳನ್ನು ತೋರಿಸು (ಡಿಫಾಲ್ಟ್)"</item>
+ <item msgid="3830170141562534721">"ಈ ಐಕಾನ್ ತೋರಿಸಬೇಡ"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"ಯಾವಾಗಲೂ ಪ್ರತಿಶತವನ್ನು ತೋರಿಸು"</item>
+ <item msgid="2139628951880142927">"ಚಾರ್ಜ್ ಮಾಡುವಾಗ ಪ್ರತಿಶತವನ್ನು ತೋರಿಸು (ಡಿಫಾಲ್ಟ್)"</item>
+ <item msgid="3327323682209964956">"ಈ ಐಕಾನ್ ತೋರಿಸಬೇಡ"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index cf18daf..64e0e27 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"화면에 표시하고 소리로 알림"</string>
<string name="notification_more_settings" msgid="816306283396553571">"설정 더보기"</string>
<string name="notification_done" msgid="5279426047273930175">"완료"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"색상 및 모양"</string>
+ <string name="night_mode" msgid="3540405868248625488">"야간 모드"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"디스플레이 보정"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"사용"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"사용 안함"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"자동으로 사용 설정"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"위치 및 시간대에 맞게 야간 모드로 전환"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"야간 모드 사용 중일 때"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Android OS용 어두운 테마 사용"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"농담 효과 조정"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"밝기 조정"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"설정 및 알림 등 밝은 테마에서 일반적으로 표시되는 Android OS의 핵심 영역에 어두운 테마가 적용됩니다."</string>
<string name="color_apply" msgid="9212602012641034283">"적용"</string>
<string name="color_revert_title" msgid="4746666545480534663">"설정 확인"</string>
<string name="color_revert_message" msgid="9116001069397996691">"일부 색상 설정으로 인해 이 기기를 사용하지 못할 수 있습니다. 확인을 클릭하여 이러한 색상 설정을 확인하지 않으면 10초 후에 설정이 초기화됩니다."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"홈"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"최근"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"뒤로"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"볼륨 컨트롤과 함께 표시"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"알림 일시중지"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"볼륨 버튼 단축키"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"볼륨 크게 시 알림 일시중지 종료"</string>
<string name="battery" msgid="7498329822413202973">"배터리"</string>
<string name="clock" msgid="7416090374234785905">"시계"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"데이터 세이버 사용"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"데이터 세이버 사용 안함"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"사용"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"사용 안함"</string>
<string name="nav_bar" msgid="1993221402773877607">"탐색 메뉴"</string>
<string name="start" msgid="6873794757232879664">"시작"</string>
<string name="center" msgid="4327473927066010960">"중앙"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"미리보기"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"드래그하여 타일 추가"</string>
<string name="qs_edit" msgid="2232596095725105230">"수정"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"시간"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"시간, 분, 초 표시"</item>
+ <item msgid="1427801730816895300">"시간, 분 표시(기본값)"</item>
+ <item msgid="3830170141562534721">"이 아이콘 표시 안함"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"항상 퍼센트 표시"</item>
+ <item msgid="2139628951880142927">"충전할 때 퍼센트 표시(기본값)"</item>
+ <item msgid="3327323682209964956">"이 아이콘 표시 안함"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-ky-rKG/strings.xml b/packages/SystemUI/res/values-ky-rKG/strings.xml
index bb16ab7..e8d32a9 100644
--- a/packages/SystemUI/res/values-ky-rKG/strings.xml
+++ b/packages/SystemUI/res/values-ky-rKG/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Үн менен коштолуп, экранга чыгарылсын"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Дагы жөндөөлөр"</string>
<string name="notification_done" msgid="5279426047273930175">"Аткарылды"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Түсү жана көрүнүшү"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Түнкү режим"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Дисплейди калибрлөө"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Күйүк"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Өчүк"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Автоматтык түрдө күйгүзүү"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Жайгашкан жерге жана убакытка жараша түнкү режимге которулуңуз"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Түнкү режим күйүп турганда"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Android OS үчүн караңгы тема колдонуу"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Кошумча түсүн тууралоо"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Жарыктыгын тууралоо"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Адатта жарык темада көрсөтүлгөн Android OS\'тин, Жөндөөлөр жана эскертмелер сыяктуу негизги аймактарына караңгы тема колдонулат."</string>
<string name="color_apply" msgid="9212602012641034283">"Колдонуу"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Жөндөөлөрдү ырастоо"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Айрым түс жөндөөлөрү бул түзмөктү колдонулгус кылып коюшу мүмкүн. Бул түс жөндөөлөрүн ырастоо үчүн OK баскычын чыкылдатыңыз, болбосо бул жөндөөлөр 10 секунддан кийин баштапкы абалына келтирилет."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Башкы бет"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Акыркылар"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Артка"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Үн көзөмөлдөгүчтөрү менен көрсөтүлсүн"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Тынчымды алба"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Үндү көзөмөлдөөчү баскычтардын кыска жолдору"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Үн катуулатылганда \"Тынчымды алба\" режиминен чыгуу"</string>
<string name="battery" msgid="7498329822413202973">"Батарея"</string>
<string name="clock" msgid="7416090374234785905">"Саат"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Дайындарды үнөмдөгүч күйүк"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Дайындарды үнөмдөгүч өчүрүлгөн"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Күйүк"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Өчүк"</string>
<string name="nav_bar" msgid="1993221402773877607">"Чабыттоо тилкеси"</string>
<string name="start" msgid="6873794757232879664">"Баштоо"</string>
<string name="center" msgid="4327473927066010960">"Экрандын ортосунда"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Алдын ала көрүү"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Керектүү нерселерди сүйрөп кошуңуз"</string>
<string name="qs_edit" msgid="2232596095725105230">"Түзөтүү"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Убакыт"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Сааттар, мүнөттөр жана секунддар көрсөтүлсүн"</item>
+ <item msgid="1427801730816895300">"Сааттар жана мүнөттөр көрсөтүлсүн (демейки)"</item>
+ <item msgid="3830170141562534721">"Бул сөлөкөт көрсөтүлбөсүн"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Ар дайым пайызы көрсөтүлсүн"</item>
+ <item msgid="2139628951880142927">"Кубаттоо учурунда пайызы көрсөтүлсүн (демейки)"</item>
+ <item msgid="3327323682209964956">"Бул сөлөкөт көрсөтүлбөсүн"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index 8eec622..ba98690 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -303,7 +303,7 @@
<string name="recents_lock_to_app_button_label" msgid="6942899049072506044">"ekrano prisegimas"</string>
<string name="recents_search_bar_label" msgid="8074997400187836677">"paieška"</string>
<string name="recents_launch_error_message" msgid="2969287838120550506">"Nepavyko paleisti <xliff:g id="APP">%s</xliff:g>."</string>
- <string name="recents_launch_disabled_message" msgid="1624523193008871793">"Programa „<xliff:g id="APP">%s</xliff:g>“ išjungta saugos režimus."</string>
+ <string name="recents_launch_disabled_message" msgid="1624523193008871793">"Programa „<xliff:g id="APP">%s</xliff:g>“ išjungta saugos režimu."</string>
<string name="recents_history_button_label" msgid="5153358867807604821">"Istorija"</string>
<string name="recents_history_clear_all_button_label" msgid="5905258334958006953">"Išvalyti"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"Horizontalus skaidymas"</string>
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index abfc303..0dab947 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -466,30 +466,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Rādīt ekrānā ar skaņas signālu"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Citi iestatījumi"</string>
<string name="notification_done" msgid="5279426047273930175">"Gatavs"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Krāsas un izskats"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Nakts režīms"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Ekrāna kalibrēšana"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Ieslēgts"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Izslēgts"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Ieslēgt automātiski"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Pārslēgt uz nakts režīmu atbilstoši atrašanās vietai un diennakts laikam"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Ja ir ieslēgts nakts režīms"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Izmantot tumšo motīvu operētājsistēmai Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Regulēt toni"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Regulēt spilgtumu"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Tumšais motīvs tiek lietots galvenajos operētājsistēmas Android elementos, kas parasti tiek rādīti ar gaišu motīvu, piemēram, lietotnē Iestatījumi un paziņojumos."</string>
<string name="color_apply" msgid="9212602012641034283">"Lietot"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Iestatījumu apstiprināšana"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Noteiktu krāsu iestatījumu dēļ šī ierīce var kļūt nelietojama. Lai apstiprinātu šos krāsu iestatījumus, noklikšķiniet uz Labi. Ja to neizdarīsiet, pēc 10 sekundēm šie iestatījumi tiks atiestatīti."</string>
@@ -501,12 +489,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Sākums"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Pēdējie"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Atpakaļ"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Rādīt ar skaļuma vadīklām"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Netraucēt"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Skaļuma pogu saīsne"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Izslēgt režīmu “Netraucēt”, palielinot skaļumu"</string>
<string name="battery" msgid="7498329822413202973">"Akumulators"</string>
<string name="clock" msgid="7416090374234785905">"Pulkstenis"</string>
@@ -517,8 +502,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Datu lietojuma samazinātājs ieslēgts"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Datu lietojuma samazinātājs ir izslēgts."</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Ieslēgts"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Izslēgts"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigācijas josla"</string>
<string name="start" msgid="6873794757232879664">"Sākums"</string>
<string name="center" msgid="4327473927066010960">"Centrs"</string>
@@ -541,12 +525,15 @@
<string name="preview" msgid="9077832302472282938">"Priekšskatījums"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Velciet elementus, lai tos pievienotu"</string>
<string name="qs_edit" msgid="2232596095725105230">"Rediģēt"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Laiks"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Rādīt stundas, minūtes un sekundes"</item>
+ <item msgid="1427801730816895300">"Rādīt stundas un minūtes (noklusējums)"</item>
+ <item msgid="3830170141562534721">"Nerādīt šo ikonu"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Vienmēr rādīt procentuālo vērtību"</item>
+ <item msgid="2139628951880142927">"Rādīt procentuālo vērtību uzlādes laikā (noklusējums)"</item>
+ <item msgid="3327323682209964956">"Nerādīt šo ikonu"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-mk-rMK/strings.xml b/packages/SystemUI/res/values-mk-rMK/strings.xml
index 71214cc..2ce778f 100644
--- a/packages/SystemUI/res/values-mk-rMK/strings.xml
+++ b/packages/SystemUI/res/values-mk-rMK/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Појави се на екранот и дај звучен сигнал"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Повеќе поставки"</string>
<string name="notification_done" msgid="5279426047273930175">"Готово"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Боја и изглед"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Ноќен режим"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Калибрирај го екранот"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Вклучено"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Исклучено"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Вклучи автоматски"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Префрли во Ноќен режим како што е соодветно за локацијата и времето во денот"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Кога Ноќниот режим е вклучен"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Користете ја темната тема за ОС Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Приспособи ја бојата"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Приспособи ја осветленоста"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Темната тема се применува на основните области на ОС Android што обично се прикажуваат во светла тема, како Поставки и известувања."</string>
<string name="color_apply" msgid="9212602012641034283">"Примени"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Потврдете ги поставките"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Некои поставки на боите може да го направат уредот неупотреблив. Кликнете на Во ред за да ги потврдите овие поставки на боите, инаку тие поставки ќе се ресетираат по 10 секунди."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Почетна страница"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Неодамнешни"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Назад"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Прикажи со контроли за јачина на звук"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Не вознемирувај"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Кратенка за копчињата за јачина на звук"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Излези од „Не вознемирувај“ при зголемена јачина на звукот"</string>
<string name="battery" msgid="7498329822413202973">"Батерија"</string>
<string name="clock" msgid="7416090374234785905">"Часовник"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Штедачот на интернет е вклучен"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Штедачот на интернет е исклучен"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Вклучено"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Исклучено"</string>
<string name="nav_bar" msgid="1993221402773877607">"Лента за навигација"</string>
<string name="start" msgid="6873794757232879664">"Почеток"</string>
<string name="center" msgid="4327473927066010960">"Центар"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Преглед"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Повлечете за додавање плочки"</string>
<string name="qs_edit" msgid="2232596095725105230">"Уреди"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Време"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Прикажи часови, минути и секунди"</item>
+ <item msgid="1427801730816895300">"Прикажи часови и минути (стандардно)"</item>
+ <item msgid="3830170141562534721">"Не прикажувај ја иконава"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Секогаш прикажувај процент"</item>
+ <item msgid="2139628951880142927">"Прикажи процент кога се полни (стандардно)"</item>
+ <item msgid="3327323682209964956">"Не прикажувај ја иконава"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-mn-rMN/strings.xml b/packages/SystemUI/res/values-mn-rMN/strings.xml
index efef939..37d1ba7 100644
--- a/packages/SystemUI/res/values-mn-rMN/strings.xml
+++ b/packages/SystemUI/res/values-mn-rMN/strings.xml
@@ -463,30 +463,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Дэлгэцэнд яаралтайгаар дуутай гаргах"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Бусад тохиргоо"</string>
<string name="notification_done" msgid="5279426047273930175">"Дууссан"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Өнгө, харагдах байдал"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Шөнийн горим"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Дэлгэцийг тохируулах"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Идэвхтэй"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Идэвхгүй"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Автоматаар асаах"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Тухайн өдрийн байршил, цагийн тохиромжтой үед Шөнийн горимд шилжүүлэх"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Шөнийн горим идэвхтэй үед"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Android-н үйлдлийн системд бараан загварыг ашиглах"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Өнгөний нягтаршилыг тохируулах"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Гэрэлтүүлгийг тохируулах"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Тохиргоо, мэдэгдэл зэрэг тогтмол цайвар загварт харуулдаг Android үйлдлийн системийн гол хэсгийг бараан загварт харуулна."</string>
<string name="color_apply" msgid="9212602012641034283">"Хэрэгжүүлэх"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Тохиргоог баталгаажуулах"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Зарим өнгөний тохиргоо энэ төхөөрөмжийг ашиглах боломжгүй болгож болзошгүй. OK товчлуурыг дарж эдгээр өнгөний тохиргоог зөвшөөрөхгүй бол энэ тохиргоо нь 10 секундын дараа шинэчлэгдэх болно."</string>
@@ -498,12 +486,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Нүүр хуудас"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Саяхны"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Буцах"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Түвшний хяналттай харуулах"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Бүү саад бол"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Түвшний товчлуурын товчлол"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Бүү саад бол тохиргооноос гарахын тулд дууны түвшинг нэмэх"</string>
<string name="battery" msgid="7498329822413202973">"Зай"</string>
<string name="clock" msgid="7416090374234785905">"Цаг"</string>
@@ -514,8 +499,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Өгөгдөл хамгаалагчийг асаасан байна"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Өгөгдөл хамгаалагчийг унтраасан байна"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Идэвхтэй"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Идэвхгүй"</string>
<string name="nav_bar" msgid="1993221402773877607">"Навигацийн самбар"</string>
<string name="start" msgid="6873794757232879664">"Эхлэх"</string>
<string name="center" msgid="4327473927066010960">"Гол хэсэг"</string>
@@ -538,12 +522,15 @@
<string name="preview" msgid="9077832302472282938">"Урьдчилж харах"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Дөрвөлж нэмэхийн тулд чирнэ үү"</string>
<string name="qs_edit" msgid="2232596095725105230">"Засах"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Цаг"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Цаг, минут, секундийг харуулах"</item>
+ <item msgid="1427801730816895300">"Цаг, минутыг харуулах (өгөгдмөл)"</item>
+ <item msgid="3830170141562534721">"Энэ дүрс тэмдгийг бүү үзүүл"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Хувийг тогтмол харуулах"</item>
+ <item msgid="2139628951880142927">"Цэнэглэх үед хувийг тогтмол харуулах (өгөгдмөл)"</item>
+ <item msgid="3327323682209964956">"Энэ дүрс тэмдгийг бүү үзүүл"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-mr-rIN/strings.xml b/packages/SystemUI/res/values-mr-rIN/strings.xml
index 647fcf7..3156b5c 100644
--- a/packages/SystemUI/res/values-mr-rIN/strings.xml
+++ b/packages/SystemUI/res/values-mr-rIN/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"स्क्रीनवर डोकावून पहा आणि ध्वनी चालू करा"</string>
<string name="notification_more_settings" msgid="816306283396553571">"अधिक सेटिंग्ज"</string>
<string name="notification_done" msgid="5279426047273930175">"पूर्ण झाले"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"रंग आणि स्वरूप"</string>
+ <string name="night_mode" msgid="3540405868248625488">"रात्र मोड"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"प्रदर्शनाचे मापन करा"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"चालू"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"बंद"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"स्वयंचलितपणे चालू करा"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"स्थान आणि दिवसाच्या वेळेसाठी योग्य असल्यानुसार रात्र मोड मध्ये स्विच करा"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"रात्र मोड चालू असताना"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Android OS साठी गडद थीमचा वापर करा"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"रंगाची छटा समायोजित करा"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"चकाकी समायोजित करा"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"सामान्यपणे सेटिंग्ज आणि सूचना यासारख्या प्रकाश थीममध्ये दर्शविल्या जाणार्या Android OS च्या मुख्य क्षेत्रांवर गडद थीम लागू केली जाते."</string>
<string name="color_apply" msgid="9212602012641034283">"लागू करा"</string>
<string name="color_revert_title" msgid="4746666545480534663">"सेटिंग्जची पुष्टी करा"</string>
<string name="color_revert_message" msgid="9116001069397996691">"काही रंग सेटिंग्ज या डिव्हाइसला निरुपयोगी करू शकतात. या रंग सेटिंग्जची पुष्टी करण्यासाठी ठीक आहे दाबा अन्यथा या सेटिंग्ज 10 सेकंदांनंतर रीसेट होतील."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"मुख्यपृष्ठ"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"अलीकडील"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"परत"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"आवाज नियंत्रणांसह दर्शवा"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"व्यत्यय आणू नका"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"आवाजाच्या बटणांचा शार्टकट"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"आवाज वाढविल्यावर व्यत्यय आणू नका मधून बाहेर पडा"</string>
<string name="battery" msgid="7498329822413202973">"बॅटरी"</string>
<string name="clock" msgid="7416090374234785905">"घड्याळ"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"डेटा बचतकर्ता चालू आहे"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"डेटा बचतकर्ता बंद आहे"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"चालू"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"बंद"</string>
<string name="nav_bar" msgid="1993221402773877607">"नॅव्हिगेशन बार"</string>
<string name="start" msgid="6873794757232879664">"प्रारंभ"</string>
<string name="center" msgid="4327473927066010960">"मध्यवर्ती"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"पूर्वावलोकन"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"टाइल जोडण्यासाठी ड्रॅग करा"</string>
<string name="qs_edit" msgid="2232596095725105230">"संपादित करा"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"वेळ"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"तास, मिनिटे आणि सेकंद दर्शवा"</item>
+ <item msgid="1427801730816895300">"तास आणि मिनिटे दर्शवा (डीफॉल्ट)"</item>
+ <item msgid="3830170141562534721">"हे चिन्ह दर्शवू नका"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"नेहमी टक्केवारी दर्शवा"</item>
+ <item msgid="2139628951880142927">"चार्ज करताना टक्केवारी दर्शवा (डीफॉल्ट)"</item>
+ <item msgid="3327323682209964956">"हे चिन्ह दर्शवू नका"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-ms-rMY/strings.xml b/packages/SystemUI/res/values-ms-rMY/strings.xml
index c7e0a80..2191228 100644
--- a/packages/SystemUI/res/values-ms-rMY/strings.xml
+++ b/packages/SystemUI/res/values-ms-rMY/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Intai pada skrin dan bunyikan"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Lagi tetapan"</string>
<string name="notification_done" msgid="5279426047273930175">"Selesai"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Warna dan penampilan"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Mod malam"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Tentukur paparan"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Hidup"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Mati"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Hidupkan secara automatik"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Beralih ke Mod Malam sebagaimana sesuai untuk lokasi dan masa"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Apabila Mod Malam dihidupkan"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Gunakan tema gelap untuk OS Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Laraskan seri warna"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Laraskan kecerahan"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Tema gelap digunakan pada kawasan teras OS Android yang biasanya dipaparkan dalam tema cerah, seperti Tetapan dan pemberitahuan."</string>
<string name="color_apply" msgid="9212602012641034283">"Gunakan"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Sahkan tetapan"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Sesetengah tetapan warna boleh menjadikan peranti ini tidak dapat digunakan. Klik OK untuk mengesahkan tetapan warna ini, jika tidak, tetapan ini akan ditetapkan semula selepas 10 saat."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Skrin Utama"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Terbaharu"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Kembali"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Tunjukkan dengan kawalan kelantangan"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Jangan ganggu"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Pintasan butang kelantangan"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Keluar drp mod jangan ganggu apabila kelantangan ditinggikan"</string>
<string name="battery" msgid="7498329822413202973">"Bateri"</string>
<string name="clock" msgid="7416090374234785905">"Jam"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Penjimat Data dihidupkan"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Penjimat Data dimatikan"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Hidup"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Mati"</string>
<string name="nav_bar" msgid="1993221402773877607">"Bar navigasi"</string>
<string name="start" msgid="6873794757232879664">"Mula"</string>
<string name="center" msgid="4327473927066010960">"Tengah"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Pratonton"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Seret untuk menambahkan jubin"</string>
<string name="qs_edit" msgid="2232596095725105230">"Edit"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Masa"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Tunjukkan jam, minit dan saat"</item>
+ <item msgid="1427801730816895300">"Tunjukkan jam dan minit (lalai)"</item>
+ <item msgid="3830170141562534721">"Jangan tunjukkan ikon ini"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Sentiasa tunjukkan peratusan"</item>
+ <item msgid="2139628951880142927">"Tunjukkan peratusan semasa mengecas (lalai)"</item>
+ <item msgid="3327323682209964956">"Jangan tunjukkan ikon ini"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index bdac9f8..3a603c2 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Vis fort på skjermen med lyd"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Flere innstillinger"</string>
<string name="notification_done" msgid="5279426047273930175">"Ferdig"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Farge og utseende"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Nattmodus"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Kalibrer skjermen"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"På"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Av"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Slå på automatisk"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Bytt til nattmodus avhengig av tid og sted"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Når nattmodus er på"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Bruk et mørkt tema for Android OS"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Juster fargen"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Juster lysstyrken"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Det mørke temaet brukes på kjerneområdene i Android OS som vanligvis vises i et lyst tema, for eksempel Innstillinger og varsler."</string>
<string name="color_apply" msgid="9212602012641034283">"Bruk"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Bekreft innstillingene"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Noen fargeinnstillinger kan gjøre denne enheten ubrukelig. Klikk på OK for å bekrefte disse fargeinnstillingene, ellers blir de tilbakestilt etter ti sekunder."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Startside"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Nylige"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Tilbake"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Vis med volumkontrollene"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Ikke forstyrr"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Hurtigtast for volumknappene"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Lukk «Ikke forstyrr» med volum opp-knappen"</string>
<string name="battery" msgid="7498329822413202973">"Batteri"</string>
<string name="clock" msgid="7416090374234785905">"Klokke"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Datasparing er på"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Datasparing er av"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"På"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Av"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigasjonsrad"</string>
<string name="start" msgid="6873794757232879664">"Start"</string>
<string name="center" msgid="4327473927066010960">"Midtstilt"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Forhåndsvisning"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Dra for å legge til fliser"</string>
<string name="qs_edit" msgid="2232596095725105230">"Endre"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Tid"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Vis timer, minutter og sekunder"</item>
+ <item msgid="1427801730816895300">"Vis timer og minutter (standard)"</item>
+ <item msgid="3830170141562534721">"Ikke vis dette ikonet"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Vis alltid prosentandel"</item>
+ <item msgid="2139628951880142927">"Vis prosentandel under lading (standard)"</item>
+ <item msgid="3327323682209964956">"Ikke vis dette ikonet"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index 4e23d4f..cf6c5bf 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Op het scherm weergeven en geluid laten horen"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Meer instellingen"</string>
<string name="notification_done" msgid="5279426047273930175">"Gereed"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Kleur en uiterlijk"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Nachtmodus"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Display kalibreren"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Aan"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Uit"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Automatisch inschakelen"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Overschakelen naar nachtmodus indien van toepassing voor locatie en tijd van de dag"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Als nachtmodus is ingeschakeld"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Donker thema gebruiken voor Android OS"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Tint aanpassen"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Helderheid aanpassen"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Het donkere thema wordt toegepast op kerngedeelten van Android OS die normaal gesproken worden weergegeven met een licht thema, zoals Instellingen en meldingen."</string>
<string name="color_apply" msgid="9212602012641034283">"Toepassen"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Instellingen bevestigen"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Bij sommige kleurinstellingen kan het apparaat onbruikbaar worden. Klik op OK om deze kleurinstellingen te bevestigen, anders worden deze instellingen na tien seconden gereset."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Startpagina"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Recent"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Terug"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Weergeven met volumeknoppen"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Niet storen"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Volumeknoppen als sneltoets"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"\'Niet storen\' afsluiten bij volume omhoog"</string>
<string name="battery" msgid="7498329822413202973">"Accu"</string>
<string name="clock" msgid="7416090374234785905">"Klok"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Databesparing is ingeschakeld"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Databesparing is uitgeschakeld"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Aan"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Uit"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigatiebalk"</string>
<string name="start" msgid="6873794757232879664">"Begin"</string>
<string name="center" msgid="4327473927066010960">"Midden"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Voorbeeld"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Sleep om tegels toe te voegen"</string>
<string name="qs_edit" msgid="2232596095725105230">"Bewerken"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Tijd"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Uren, minuten en seconden weergeven"</item>
+ <item msgid="1427801730816895300">"Uren en minuten weergeven (standaard)"</item>
+ <item msgid="3830170141562534721">"Dit pictogram niet weergeven"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Percentage altijd weergeven"</item>
+ <item msgid="2139628951880142927">"Percentage weergeven tijdens opladen (standaard)"</item>
+ <item msgid="3327323682209964956">"Dit pictogram niet weergeven"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 07af3d5..e3082476 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -467,30 +467,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Wyświetlaj na ekranie i odtwarzaj dźwięk"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Więcej ustawień"</string>
<string name="notification_done" msgid="5279426047273930175">"Gotowe"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Kolor i wygląd"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Tryb nocny"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Kalibracja wyświetlacza"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Wł."</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Wył."</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Włącz automatycznie"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Przełączaj na tryb nocny odpowiednio do lokalizacji i pory dnia"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Gdy jest włączony tryb nocny"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Użyj motywu ciemnego dla Androida"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Dostosuj odcień"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Dostosuj jasność"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Motyw ciemny zostanie zastosowany do głównych obszarów Androida, które normalnie są jasne, takich jak Ustawienia czy powiadomienia."</string>
<string name="color_apply" msgid="9212602012641034283">"Zastosuj"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Potwierdź ustawienia"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Niektóre ustawienia kolorów mogą utrudniać korzystanie z urządzenia. Kliknij OK, by potwierdzić te ustawienia kolorów. Jeśli tego nie zrobisz, zostaną one zresetowane po 10 sekundach."</string>
@@ -502,12 +490,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Ekran główny"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Ostatnie"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Wstecz"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Pokazuj z regulacją głośności"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Nie przeszkadzać"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Wł./wył. przyciskami głośności"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Wyłącz tryb Nie przeszkadzać przy zwiększaniu głośności"</string>
<string name="battery" msgid="7498329822413202973">"Bateria"</string>
<string name="clock" msgid="7416090374234785905">"Zegar"</string>
@@ -518,8 +503,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Oszczędzanie danych jest włączone"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Oszczędzanie danych jest wyłączone"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Wł."</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Wył."</string>
<string name="nav_bar" msgid="1993221402773877607">"Pasek nawigacji"</string>
<string name="start" msgid="6873794757232879664">"Na początku"</string>
<string name="center" msgid="4327473927066010960">"Na środku"</string>
@@ -542,12 +526,15 @@
<string name="preview" msgid="9077832302472282938">"Podgląd"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Przeciągnij, aby dodać kafelki"</string>
<string name="qs_edit" msgid="2232596095725105230">"Edytuj"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Godzina"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Pokazuj godziny, minuty i sekundy"</item>
+ <item msgid="1427801730816895300">"Pokazuj godziny i minuty (domyślnie)"</item>
+ <item msgid="3830170141562534721">"Nie pokazuj tej ikony"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Zawsze pokazuj procent"</item>
+ <item msgid="2139628951880142927">"Pokazuj procent podczas ładowania (domyślnie)"</item>
+ <item msgid="3327323682209964956">"Nie pokazuj tej ikony"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-pt-rBR/strings.xml b/packages/SystemUI/res/values-pt-rBR/strings.xml
index ab4b8b8..efcd7dc 100644
--- a/packages/SystemUI/res/values-pt-rBR/strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/strings.xml
@@ -466,30 +466,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Mostrar parcialmente na tela e emitir som"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Mais configurações"</string>
<string name="notification_done" msgid="5279426047273930175">"Concluído"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Cor e aparência"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Modo noturno"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Calibrar tela"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Ativado"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Desativado"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Ativar automaticamente"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Alternar para o modo noturno conforme apropriado para o local e hora do dia"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Quando o modo noturno está ativado"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Usar o tema escuro para o SO Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Ajustar tonalidade"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Ajustar brilho"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"O tema escuro é aplicado a áreas centrais do sistema operacional Android que normalmente são exibidas em um tema claro, como configurações e notificações."</string>
<string name="color_apply" msgid="9212602012641034283">"Aplicar"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Confirmar configurações"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Algumas configurações de cor podem tornar o dispositivo inutilizável. Clique em \"OK\" para confirmar essas configurações de cor; caso contrário, essas configurações serão redefinidas após 10 segundos."</string>
@@ -501,12 +489,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Início"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Recentes"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Voltar"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Mostrar com controles de volume"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Não perturbe"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Atalho de botões de volume"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Saia do modo \"Não perturbe\" aumentando o volume"</string>
<string name="battery" msgid="7498329822413202973">"Bateria"</string>
<string name="clock" msgid="7416090374234785905">"Relógio"</string>
@@ -517,8 +502,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Economia de dados ativada"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"A Economia de dados está desativada"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Ativado"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Desativado"</string>
<string name="nav_bar" msgid="1993221402773877607">"Barra de navegação"</string>
<string name="start" msgid="6873794757232879664">"Iniciar"</string>
<string name="center" msgid="4327473927066010960">"Centralizar"</string>
@@ -541,12 +525,15 @@
<string name="preview" msgid="9077832302472282938">"Visualização"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Arraste para adicionar blocos"</string>
<string name="qs_edit" msgid="2232596095725105230">"Editar"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Horas"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Mostrar horas, minutos e segundos"</item>
+ <item msgid="1427801730816895300">"Mostrar horas e minutos (padrão)"</item>
+ <item msgid="3830170141562534721">"Não mostrar este ícone"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Sempre mostrar porcentagem"</item>
+ <item msgid="2139628951880142927">"Mostrar porcentagem durante o carregamento (padrão)"</item>
+ <item msgid="3327323682209964956">"Não mostrar este ícone"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index e8c9115..4cceb07 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Mostrar no ecrã e emitir som"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Mais definições"</string>
<string name="notification_done" msgid="5279426047273930175">"Concluído"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Cor e aspeto"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Modo noturno"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Calibrar ecrã"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Ativado"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Desativado"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Ligar automaticamente"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Alternar para o Modo noturno consoante a localização e a hora do dia"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Quando o Modo noturno está ativado"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Utilizar o tema escuro para o SO Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Ajustar tonalidade"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Ajustar brilho"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"O tema escuro é aplicado a áreas essenciais do SO Android que são normalmente apresentadas num tema claro, como as Definições e as notificações."</string>
<string name="color_apply" msgid="9212602012641034283">"Aplicar"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Confirmar as definições"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Algumas definições de cor podem tornar este dispositivo instável. Clique em OK para confirmar estas definições de cor. Caso contrário, estas definições serão repostas após 10 segundos."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Página inicial"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Recentes"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Anterior"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Mostrar com controlos de volume"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Não incomodar"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Atalho dos botões de volume"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Desativar Não incomodar ao aumentar o volume"</string>
<string name="battery" msgid="7498329822413202973">"Bateria"</string>
<string name="clock" msgid="7416090374234785905">"Relógio"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Poupança de dados ativada"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Poupança de dados desativada"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Ativado"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Desativado"</string>
<string name="nav_bar" msgid="1993221402773877607">"Barra de navegação"</string>
<string name="start" msgid="6873794757232879664">"Início"</string>
<string name="center" msgid="4327473927066010960">"Centro"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Pré-visualizar"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Arraste para adicionar mosaicos"</string>
<string name="qs_edit" msgid="2232596095725105230">"Editar"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Hora"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Mostrar horas, minutos e segundos"</item>
+ <item msgid="1427801730816895300">"Mostrar horas e minutos (predefinição)"</item>
+ <item msgid="3830170141562534721">"Não mostrar este ícone"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Mostrar sempre a percentagem"</item>
+ <item msgid="2139628951880142927">"Mostrar a percentagem durante o carregamento (predefinição)"</item>
+ <item msgid="3327323682209964956">"Não mostrar este ícone"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index ab4b8b8..efcd7dc 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -466,30 +466,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Mostrar parcialmente na tela e emitir som"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Mais configurações"</string>
<string name="notification_done" msgid="5279426047273930175">"Concluído"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Cor e aparência"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Modo noturno"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Calibrar tela"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Ativado"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Desativado"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Ativar automaticamente"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Alternar para o modo noturno conforme apropriado para o local e hora do dia"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Quando o modo noturno está ativado"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Usar o tema escuro para o SO Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Ajustar tonalidade"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Ajustar brilho"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"O tema escuro é aplicado a áreas centrais do sistema operacional Android que normalmente são exibidas em um tema claro, como configurações e notificações."</string>
<string name="color_apply" msgid="9212602012641034283">"Aplicar"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Confirmar configurações"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Algumas configurações de cor podem tornar o dispositivo inutilizável. Clique em \"OK\" para confirmar essas configurações de cor; caso contrário, essas configurações serão redefinidas após 10 segundos."</string>
@@ -501,12 +489,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Início"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Recentes"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Voltar"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Mostrar com controles de volume"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Não perturbe"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Atalho de botões de volume"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Saia do modo \"Não perturbe\" aumentando o volume"</string>
<string name="battery" msgid="7498329822413202973">"Bateria"</string>
<string name="clock" msgid="7416090374234785905">"Relógio"</string>
@@ -517,8 +502,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Economia de dados ativada"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"A Economia de dados está desativada"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Ativado"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Desativado"</string>
<string name="nav_bar" msgid="1993221402773877607">"Barra de navegação"</string>
<string name="start" msgid="6873794757232879664">"Iniciar"</string>
<string name="center" msgid="4327473927066010960">"Centralizar"</string>
@@ -541,12 +525,15 @@
<string name="preview" msgid="9077832302472282938">"Visualização"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Arraste para adicionar blocos"</string>
<string name="qs_edit" msgid="2232596095725105230">"Editar"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Horas"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Mostrar horas, minutos e segundos"</item>
+ <item msgid="1427801730816895300">"Mostrar horas e minutos (padrão)"</item>
+ <item msgid="3830170141562534721">"Não mostrar este ícone"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Sempre mostrar porcentagem"</item>
+ <item msgid="2139628951880142927">"Mostrar porcentagem durante o carregamento (padrão)"</item>
+ <item msgid="3327323682209964956">"Não mostrar este ícone"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index 9f4e755..47cf729 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -466,30 +466,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Se afișează pentru o scurtă durată pe ecran și se emite un sunet"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Mai multe setări"</string>
<string name="notification_done" msgid="5279426047273930175">"Terminat"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Culoare și aspect"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Modul Noapte"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Calibrați afișarea"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Activat"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Dezactivat"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Activați automat"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Comutați la modul Noapte în funcție de locație și de momentul zilei"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Când modul Noapte este activat"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Folosiți tema întunecată pentru SO Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Ajustați culoarea"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Ajustați luminozitatea"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Tema întunecată se aplică zonelor principale ale sistemului de operare Android care sunt de obicei afișate cu o temă deschisă la culoare, cum ar fi Setările și notificările."</string>
<string name="color_apply" msgid="9212602012641034283">"Aplicați"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Confirmați setările"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Unele setări pentru culori pot face dispozitivul să nu mai funcționeze. Dați clic pe OK pentru a confirma aceste setări pentru culori. În caz contrar, acestea se vor reseta după 10 secunde."</string>
@@ -501,12 +489,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Ecran de pornire"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Recente"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Înapoi"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Afișează cu comenzile de volum"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Nu deranja"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Comandă rapidă din butoanele de volum"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Ieșiți din Nu deranjați la creșterea volumului"</string>
<string name="battery" msgid="7498329822413202973">"Baterie"</string>
<string name="clock" msgid="7416090374234785905">"Ceas"</string>
@@ -517,8 +502,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Economizorul de date este activat"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Economizorul de date este dezactivat"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Activați"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Dezactivați"</string>
<string name="nav_bar" msgid="1993221402773877607">"Bară de navigare"</string>
<string name="start" msgid="6873794757232879664">"La început"</string>
<string name="center" msgid="4327473927066010960">"În centru"</string>
@@ -541,12 +525,15 @@
<string name="preview" msgid="9077832302472282938">"Previzualizare"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Trageți pentru a adăuga sectoare"</string>
<string name="qs_edit" msgid="2232596095725105230">"Editați"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Oră"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Afișează orele, minutele și secundele"</item>
+ <item msgid="1427801730816895300">"Afișează orele și minutele (prestabilit)"</item>
+ <item msgid="3830170141562534721">"Nu afișa această pictogramă"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Afișează întotdeauna procentajul"</item>
+ <item msgid="2139628951880142927">"Afișează procentajul când se încarcă (prestabilit)"</item>
+ <item msgid="3327323682209964956">"Nu afișa această pictogramă"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index 544069b..425d527 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -467,30 +467,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Показывать со звуком поверх всех окон."</string>
<string name="notification_more_settings" msgid="816306283396553571">"Другие настройки"</string>
<string name="notification_done" msgid="5279426047273930175">"Готово"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Цвета и стиль"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Ночной режим"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Настройка дисплея"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Включен"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Отключен"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Включать автоматически"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Включать ночной режим в определенное время суток и в определенном месте"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"В ночном режиме"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Использовать темное оформление для Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Выбрать оттенок"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Яркость"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Темное оформление применяется к основным областям экрана Android (такие как настройки и уведомления), которые обычно показываются в светлом."</string>
<string name="color_apply" msgid="9212602012641034283">"Применить"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Подтвердите настройки"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Некоторые цветовые настройки могут затруднить работу с устройством. Чтобы применить выбранные параметры, нажмите \"ОК\". В противном случае они будут сброшены через 10 секунд."</string>
@@ -502,12 +490,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Главный экран"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Недавние"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Назад"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Показывать панель с кнопками регулировки громкости"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Не беспокоить"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Кнопки регулировки громкости"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Отключать режим \"Не беспокоить\" при увеличении громкости"</string>
<string name="battery" msgid="7498329822413202973">"Батарея"</string>
<string name="clock" msgid="7416090374234785905">"Часы"</string>
@@ -518,8 +503,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Режим экономии трафика включен"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Режим экономии трафика отключен"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Включено"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Отключено"</string>
<string name="nav_bar" msgid="1993221402773877607">"Панель навигации"</string>
<string name="start" msgid="6873794757232879664">"Вверху"</string>
<string name="center" msgid="4327473927066010960">"В центре"</string>
@@ -542,12 +526,15 @@
<string name="preview" msgid="9077832302472282938">"Просмотр"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Перетащите нужные элементы"</string>
<string name="qs_edit" msgid="2232596095725105230">"Изменить"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Время"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Часы, минуты и секунды"</item>
+ <item msgid="1427801730816895300">"Часы и минуты (по умолчанию)"</item>
+ <item msgid="3830170141562534721">"Не показывать этот значок"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Всегда показывать процент заряда"</item>
+ <item msgid="2139628951880142927">"Показывать процент во время зарядки (по умолчанию)"</item>
+ <item msgid="3327323682209964956">"Не показывать этот значок"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index f46ca79..8930038 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -467,30 +467,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Zobrazovať cez obrazovku so zvukovým signálom"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Ďalšie nastavenia"</string>
<string name="notification_done" msgid="5279426047273930175">"Hotovo"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Farba a vzhľad"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Nočný režim"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Kalibrovať obrazovku"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Zapnutý"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Vypnutý"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Zapínať automaticky"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Prepnúť do Nočného režimu podľa miesta a času dňa"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Keď je zapnutý Nočný režim"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Použiť tmavý motív pre systém Android OS"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Upraviť tónovanie"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Upraviť jas"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"V hlavných oblastiach systému Android OS (ako sú Nastavenia a upozornenia), ktoré sú obyčajne zobrazené v svetlom motíve, je použitý tmavý motív."</string>
<string name="color_apply" msgid="9212602012641034283">"Použiť"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Potvrdenie nastavení"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Niektoré nastavenia farieb môžu toto zariadenie znefunkčniť. Tieto nastavenia farieb potvrdíte kliknutím na tlačidlo OK, ináč sa tieto nastavenia o 10 sekúnd obnovia."</string>
@@ -502,12 +490,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Domovská stránka"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Nedávne"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Späť"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Zobrazovať s ovládacími prvkami hlasitosti"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Nerušiť"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Skratka tlačidiel hlasitosti"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Pri zvýšení hlasitosti ukončiť režim Nerušiť"</string>
<string name="battery" msgid="7498329822413202973">"Batéria"</string>
<string name="clock" msgid="7416090374234785905">"Hodiny"</string>
@@ -518,8 +503,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Šetrič dát je zapnutý"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Šetrič dát je vypnutý"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Zapnuté"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Vypnuté"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigačný panel"</string>
<string name="start" msgid="6873794757232879664">"Začiatok"</string>
<string name="center" msgid="4327473927066010960">"Stred"</string>
@@ -542,12 +526,15 @@
<string name="preview" msgid="9077832302472282938">"Ukážka"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Dlaždice pridáte presunutím"</string>
<string name="qs_edit" msgid="2232596095725105230">"Upraviť"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Čas"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Zobrazovať hodiny, minúty a sekundy"</item>
+ <item msgid="1427801730816895300">"Zobrazovať hodiny a minúty (predvolené)"</item>
+ <item msgid="3830170141562534721">"Nezobrazovať túto ikonu"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Vždy zobrazovať percentá"</item>
+ <item msgid="2139628951880142927">"Zobrazovať percentá počas nabíjania (predvolené)"</item>
+ <item msgid="3327323682209964956">"Nezobrazovať túto ikonu"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index 611fba6..089cd4f 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -467,30 +467,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Za hip pokaži predogled na zaslonu in predvajaj zvok"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Več nastavitev"</string>
<string name="notification_done" msgid="5279426047273930175">"Dokončano"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Barva in videz"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Nočni način"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Umerjanje zaslona"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Vklopljeno"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Izklopljeno"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Samodejni vklop"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Preklop v nočni način, kot je ustrezno glede na lokacijo in uro v dnevu"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Ko je vklopljen nočni način"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Uporaba temne teme za sistem Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Prilagodi odtenek"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Prilagodi svetlost"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Za osrednja področja sistema Android, ki so običajno prikazana v svetli temi, na primer nastavitve in obvestila, je uporabljena temna tema."</string>
<string name="color_apply" msgid="9212602012641034283">"Uporabi"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Potrditev nastavitev"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Zaradi nekaterih barvnih nastavitev lahko postane ta naprava neuporabna. Kliknite »V redu«, če želite potrditi te barvne nastavitve. V nasprotnem primeru se bodo čez 10 sekund ponastavile na prvotno vrednost."</string>
@@ -502,12 +490,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Začetni zaslon"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Nedavni"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Nazaj"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Prikaži s kontrolniki glasnosti"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"ne moti"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Bližnjica z gumboma za glasnost"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Zapustitev načina »ne moti« pri povečanju glasnosti"</string>
<string name="battery" msgid="7498329822413202973">"Akumulator"</string>
<string name="clock" msgid="7416090374234785905">"Ura"</string>
@@ -518,8 +503,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Varčevanje s podatki je vklopljeno"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Varčevanje s podatki je izklopljeno"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Vklopljeno"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Izklop"</string>
<string name="nav_bar" msgid="1993221402773877607">"Vrstica za krmarjenje"</string>
<string name="start" msgid="6873794757232879664">"Začetek"</string>
<string name="center" msgid="4327473927066010960">"Sredina"</string>
@@ -542,12 +526,15 @@
<string name="preview" msgid="9077832302472282938">"Predogled"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Povlecite, če želite dodati ploščice"</string>
<string name="qs_edit" msgid="2232596095725105230">"Uredi"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Ura"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Prikaži ure, minute in sekunde"</item>
+ <item msgid="1427801730816895300">"Prikaži ure in minute (privzeto)"</item>
+ <item msgid="3830170141562534721">"Ne prikaži te ikone"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Vedno prikaži odstotek"</item>
+ <item msgid="2139628951880142927">"Prikaži odstotek med polnjenjem (privzeto)"</item>
+ <item msgid="3327323682209964956">"Ne prikaži te ikone"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-sq-rAL/strings.xml b/packages/SystemUI/res/values-sq-rAL/strings.xml
index d911aae..3e1df4d 100644
--- a/packages/SystemUI/res/values-sq-rAL/strings.xml
+++ b/packages/SystemUI/res/values-sq-rAL/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Shfaq një vështrim të shpejtë në ekran dhe lësho tingull"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Cilësime të tjera"</string>
<string name="notification_done" msgid="5279426047273930175">"U krye"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Ngjyra dhe pamja"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Modaliteti i natës"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Kalibro ekranin"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Aktiv"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Joaktiv"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Aktivizoje automatikisht"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Kalo në \"Modalitetin e natës\" sipas përshtatshmërisë për vendin dhe kohën e ditës"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Kur \"Modaliteti i natës\" është aktiv"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Përdor temën e errët për Android OS"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Rregullo nuancën"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Rregullo ndriçimin"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Tema e errët është aplikuar në fushat kryesore të Android OS që shfaqen zakonisht në një temë të çelur, siç janë \"Cilësimet\" dhe njoftimet."</string>
<string name="color_apply" msgid="9212602012641034283">"Zbato"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Konfirmo cilësimet"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Disa cilësime ngjyrash mund ta bëjnë këtë pajisje të papërdorshme. Kliko OK për të konfirmuar këto cilësime ngjyrash, përndryshe këto cilësime do të rivendosen pas 10 sekondash."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Kreu"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Të fundit"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Prapa"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Shfaq me kontrollet e volumit"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Mos shqetëso"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Shkurtorja e butonave të volumit"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Dil nga \"Mos shqetëso\" me volumin lart"</string>
<string name="battery" msgid="7498329822413202973">"Bateria"</string>
<string name="clock" msgid="7416090374234785905">"Ora"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Kursyesi i të dhënave është aktiv"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Kursyesi i të dhënave është joaktiv"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Aktiv"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Joaktiv"</string>
<string name="nav_bar" msgid="1993221402773877607">"Shiriti i navigimit"</string>
<string name="start" msgid="6873794757232879664">"Nis"</string>
<string name="center" msgid="4327473927066010960">"Qendror"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Pamja paraprake"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Zvarrit për të shtuar pllakëzat"</string>
<string name="qs_edit" msgid="2232596095725105230">"Redakto"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Ora"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Shfaq orët, minutat dhe sekondat"</item>
+ <item msgid="1427801730816895300">"Shfaq orët dhe minutat (e parazgjedhur)"</item>
+ <item msgid="3830170141562534721">"Mos e shfaq këtë ikonë"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Shfaq gjithmonë përqindjen"</item>
+ <item msgid="2139628951880142927">"Shfaq përqindjen gjatë ngarkimit (e parazgjedhur)"</item>
+ <item msgid="3327323682209964956">"Mos e shfaq këtë ikonë"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index 0d997f9..f603a50 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -466,30 +466,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Накратко се приказују на екрану и емитује се звук"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Још подешавања"</string>
<string name="notification_done" msgid="5279426047273930175">"Готово"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Боја и изглед"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Ноћни режим"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Калибришите екран"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Укључено"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Искључено"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Аутоматски укључи"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Пређите на ноћни режим у зависности од локације и доба дана"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Када је ноћни режим укључен"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Користи тамну тему за Android ОС"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Прилагоди сенку"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Прилагоди осветљеност"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Тамна тема се примењује на кључне области Android ОС-а које се обично приказују у светлој теми, као што су подешавања и обавештења."</string>
<string name="color_apply" msgid="9212602012641034283">"Примени"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Потврдите подешавања"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Нека подешавања боја могу да учине уређај неупотребљивим. Кликните на Потврди да бисте потврдили ова подешавања боја, пошто ће се у супротном ова подешавања ресетовати након 10 секунди."</string>
@@ -501,12 +489,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Почетни"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Недавни садржај"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Назад"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Прикажи са контролама јачине звука"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Не узнемиравај"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Пречица за дугмад за јачину звука"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Изађи из режима Не узнемиравај када је звук појачан"</string>
<string name="battery" msgid="7498329822413202973">"Батерија"</string>
<string name="clock" msgid="7416090374234785905">"Сат"</string>
@@ -517,8 +502,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Уштеда података је укључена"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Уштеда података је искључена"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Укључено"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Искључено"</string>
<string name="nav_bar" msgid="1993221402773877607">"Трака за навигацију"</string>
<string name="start" msgid="6873794757232879664">"Покрени"</string>
<string name="center" msgid="4327473927066010960">"Центар"</string>
@@ -541,12 +525,15 @@
<string name="preview" msgid="9077832302472282938">"Преглед"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Превуците да бисте додали плочице"</string>
<string name="qs_edit" msgid="2232596095725105230">"Измени"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Време"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Прикажи сате, минуте и секунде"</item>
+ <item msgid="1427801730816895300">"Прикажи сате и минуте (подразумевано)"</item>
+ <item msgid="3830170141562534721">"Не приказуј ову икону"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Увек приказуј проценат"</item>
+ <item msgid="2139628951880142927">"Прикажи проценат током пуњења (подразумевано)"</item>
+ <item msgid="3327323682209964956">"Не приказуј ову икону"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index f29c7d9..f35024d 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Visa på skärmen, med ljud"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Fler inställningar"</string>
<string name="notification_done" msgid="5279426047273930175">"Klar"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Färg och utseende"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Nattläge"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Kalibrera skärmen"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Aktiverat"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Inaktiverat"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Aktivera automatiskt"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Byt till Nattläge vid passande platser och tider på dygnet"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"När Nattläget är aktiverat"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Använd mörkt tema för Android OS"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Justera ton"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Justera ljusstyrka"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Det mörka temat används på viktiga områden i Android OS som brukar visas med ett ljust tema, t.ex. Inställningar och aviseringar."</string>
<string name="color_apply" msgid="9212602012641034283">"Verkställ"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Bekräfta inställningarna"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Vissa färginställningar kan göra den här enheten oanvändbar. Klicka på OK om du vill bekräfta färginställningarna, annars återställs inställningarna efter 10 sekunder."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Startsida"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Senaste"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Tillbaka"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Visa med volymkontroller"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Stör ej"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Genväg till volymknappar"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Inaktivera Stör ej när volymen höjs"</string>
<string name="battery" msgid="7498329822413202973">"Batteri"</string>
<string name="clock" msgid="7416090374234785905">"Klocka"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Databesparing är aktiverat"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Databesparing är inaktiverat"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"På"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Inaktiverat"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigeringsfält"</string>
<string name="start" msgid="6873794757232879664">"Början"</string>
<string name="center" msgid="4327473927066010960">"Centrera"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Förhandsgranskning"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Lägg till rutor genom att dra"</string>
<string name="qs_edit" msgid="2232596095725105230">"Redigera"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Tid"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Visa timmar, minuter och sekunder"</item>
+ <item msgid="1427801730816895300">"Visa timmar och minuter (standard)"</item>
+ <item msgid="3830170141562534721">"Visa inte den här ikonen"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Visa alltid procent"</item>
+ <item msgid="2139628951880142927">"Visa procent under laddning (standard)"</item>
+ <item msgid="3327323682209964956">"Visa inte den här ikonen"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-sw/strings.xml b/packages/SystemUI/res/values-sw/strings.xml
index 9b94da8..e5da9e2 100644
--- a/packages/SystemUI/res/values-sw/strings.xml
+++ b/packages/SystemUI/res/values-sw/strings.xml
@@ -445,7 +445,7 @@
<string name="clock_seconds_desc" msgid="6282693067130470675">"Onyesha sekunde za saa katika sehemu ya arifa. Inaweza kuathiri muda wa matumizi ya betri."</string>
<string name="qs_rearrange" msgid="8060918697551068765">"Panga Upya Mipangilio ya Haraka"</string>
<string name="show_brightness" msgid="6613930842805942519">"Onyesha unga\'avu katika Mipangilio ya Haraka"</string>
- <string name="overview_nav_bar_gesture" msgid="8579814204727917764">"Ruhusu ishara ya kugawanya skrini kwa kutelezesha kidole juu"</string>
+ <string name="overview_nav_bar_gesture" msgid="8579814204727917764">"Ruhusu kugawanya skrini kwa ishara ya kutelezesha kidole juu"</string>
<string name="overview_nav_bar_gesture_desc" msgid="6329167382305102615">"Washa kipengele cha ishara ili utumie skrini iliyogawanywa kwa kutelezesha kidole juu kutoka kitufe cha Muhtasari"</string>
<string name="experimental" msgid="6198182315536726162">"Ya majaribio"</string>
<string name="enable_bluetooth_title" msgid="5027037706500635269">"Je, ungependa kuwasha Bluetooth?"</string>
diff --git a/packages/SystemUI/res/values-ta-rIN/strings.xml b/packages/SystemUI/res/values-ta-rIN/strings.xml
index ed3b476f..05f3ce5 100644
--- a/packages/SystemUI/res/values-ta-rIN/strings.xml
+++ b/packages/SystemUI/res/values-ta-rIN/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"ஒலியுடன் திரையில் காட்டு"</string>
<string name="notification_more_settings" msgid="816306283396553571">"மேலும் அமைப்புகள்"</string>
<string name="notification_done" msgid="5279426047273930175">"முடிந்தது"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"வண்ணமும் தோற்றமும்"</string>
+ <string name="night_mode" msgid="3540405868248625488">"இரவுப் பயன்முறை"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"திரையை அளவீடு செய்"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"இயக்கத்தில்"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"முடக்கத்தில்"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"தானாகவே இயக்கு"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"இருப்பிடம் மற்றும் நேரத்தின்படி இரவுப் பயன்முறைக்கு மாற்று"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"இரவுப் பயன்முறை இயக்கப்பட்டிருக்கும் போது"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Android OSக்காக அடர் தீமினைப் பயன்படுத்து"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"டிண்ட்டைச் சரிசெய்"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"ஒளிர்வைச் சரிசெய்"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"வழக்கமாக வெளிர் தீமில் காட்டப்படுகிற Android OS இன் முக்கிய பகுதிகளில் (எ.கா., அமைப்புகள், அறிவிப்புகள் போன்றவை) அடர் தீம் பயன்படுத்தப்படுகிறது."</string>
<string name="color_apply" msgid="9212602012641034283">"பயன்படுத்து"</string>
<string name="color_revert_title" msgid="4746666545480534663">"அமைப்புகளை உறுதிப்படுத்து"</string>
<string name="color_revert_message" msgid="9116001069397996691">"சில வண்ண அமைப்புகள் இந்தச் சாதனத்தைப் பயன்படுத்த முடியாதபடி செய்யலாம். இந்த வண்ண அமைப்புகளை உறுதிப்படுத்த, சரி என்பதைக் கிளிக் செய்யவும், இல்லையெனில் இந்த அமைப்புகள் 10 வினாடிகளுக்குப் பின் மீட்டமைக்கப்படும்."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"முகப்பு"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"சமீபத்தியவை"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"முந்தையது"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"ஒலிக் கட்டுப்பாடுகளுடன் காட்டு"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"தொந்தரவு செய்ய வேண்டாம்"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"ஒலியளவுப் பொத்தான்களுக்கான குறுக்குவழி"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"ஒலியைக் கூட்டும் போது தொந்தரவு செய்ய வேண்டாம் என்பதை முடக்கு"</string>
<string name="battery" msgid="7498329822413202973">"பேட்டரி"</string>
<string name="clock" msgid="7416090374234785905">"கடிகாரம்"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"தரவு சேமிப்பான் இயக்கப்பட்டது"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"தரவு சேமிப்பான் முடக்கப்பட்டது"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"இயக்கு"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"முடக்கு"</string>
<string name="nav_bar" msgid="1993221402773877607">"வழிசெலுத்தல் பட்டி"</string>
<string name="start" msgid="6873794757232879664">"தொடங்கு"</string>
<string name="center" msgid="4327473927066010960">"மையம்"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"மாதிரிக்காட்சி"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"கட்டங்களைச் சேர்க்க, இழுக்கவும்"</string>
<string name="qs_edit" msgid="2232596095725105230">"மாற்று"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"நேரம்"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"மணிநேரம், நிமிடங்கள், வினாடிகளைக் காட்டு"</item>
+ <item msgid="1427801730816895300">"மணிநேரம், நிமிடங்களைக் காட்டு (இயல்பு)"</item>
+ <item msgid="3830170141562534721">"இந்த ஐகானைக் காட்டாதே"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"எப்போதும் சதவீதத்தைக் காட்டு"</item>
+ <item msgid="2139628951880142927">"சார்ஜ் செய்யும் போது சதவீதத்தைக் காட்டு (இயல்பு)"</item>
+ <item msgid="3327323682209964956">"இந்த ஐகானைக் காட்டாதே"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index 3a8789d..0164ad7 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"แสดงบนหน้าจอในช่วงเวลาสั้นๆ และส่งเสียง"</string>
<string name="notification_more_settings" msgid="816306283396553571">"การตั้งค่าเพิ่มเติม"</string>
<string name="notification_done" msgid="5279426047273930175">"เสร็จสิ้น"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"สีและลักษณะที่ปรากฏ"</string>
+ <string name="night_mode" msgid="3540405868248625488">"โหมดกลางคืน"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"ปรับเทียบการแสดงผล"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"เปิด"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"ปิด"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"เปิดอัตโนมัติ"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"เปลี่ยนเป็นโหมดกลางคืนตามความเหมาะสมกับสถานที่และเวลาของวัน"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"เมื่อเปิดโหมดกลางคืน"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"ใช้ธีมสีเข้มสำหรับ Android OS"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"ปรับการแต้มสี"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"ปรับความสว่าง"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"ใช้ธีมสีเข้มในบริเวณสำคัญของ Android OS ซึ่งปกติแล้วจะแสดงในธีมสีอ่อน เช่น การตั้งค่า และการแจ้งเตือน"</string>
<string name="color_apply" msgid="9212602012641034283">"ใช้"</string>
<string name="color_revert_title" msgid="4746666545480534663">"ยืนยันการตั้งค่า"</string>
<string name="color_revert_message" msgid="9116001069397996691">"การตั้งค่าสีบางอย่างอาจทำให้อุปกรณ์นี้ใช้งานไม่ได้ คลิกตกลงเพื่อยืนยันการตั้งค่าสีเหล่านี้ มิฉะนั้นระบบจะรีเซ็ตการตั้งค่าหลังจาก 10 วินาที"</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"หน้าแรก"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"ล่าสุด"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"กลับ"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"แสดงพร้อมการควบคุมระดับเสียง"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"ห้ามรบกวน"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"ทางลัดปุ่มปรับระดับเสียง"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"ออกจากโหมดห้ามรบกวนเมื่อเพิ่มระดับเสียง"</string>
<string name="battery" msgid="7498329822413202973">"แบตเตอรี่"</string>
<string name="clock" msgid="7416090374234785905">"นาฬิกา"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"โปรแกรมประหยัดอินเทอร์เน็ตเปิดอยู่"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"โปรแกรมประหยัดอินเทอร์เน็ตปิดอยู่"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"เปิด"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"ปิด"</string>
<string name="nav_bar" msgid="1993221402773877607">"แถบนำทาง"</string>
<string name="start" msgid="6873794757232879664">"บนสุด"</string>
<string name="center" msgid="4327473927066010960">"กึ่งกลาง"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"ดูตัวอย่าง"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"ลากเพื่อเพิ่มชิ้นส่วน"</string>
<string name="qs_edit" msgid="2232596095725105230">"แก้ไข"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"เวลา"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"แสดงชั่วโมง นาที และวินาที"</item>
+ <item msgid="1427801730816895300">"แสดงชั่วโมงและนาที (ค่าเริ่มต้น)"</item>
+ <item msgid="3830170141562534721">"อย่าแสดงไอคอนนี้"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"แสดงเปอร์เซ็นต์เสมอ"</item>
+ <item msgid="2139628951880142927">"แสดงเปอร์เซ็นต์เมื่อชาร์จ (ค่าเริ่มต้น)"</item>
+ <item msgid="3327323682209964956">"อย่าแสดงไอคอนนี้"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index ba4e067..ccd1e37 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Ipasilip sa screen at mag-play ng tunog"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Higit pang mga setting"</string>
<string name="notification_done" msgid="5279426047273930175">"Tapos Na"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Kulay at hitsura"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Night mode"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"I-calibrate ang display"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Naka-on"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Naka-off"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Awtomatikong i-on"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Lumipat sa Night Mode kapag naaangkop sa lokasyon at oras"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Kapag naka-on ang Night Mode"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Gumamit ng madilim na tema para sa Android OS"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Isaayos ang tint"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Isaayos ang liwanag"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Ilalapat ang madilim na tema sa mahahalagang bahagi ng Android OS na karaniwang ipinapakita nang may maliwanag na tema, gaya ng Mga Setting at mga notification."</string>
<string name="color_apply" msgid="9212602012641034283">"Ilapat"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Kumpirmahin ang mga setting"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Maaaring hindi magamit ang device na ito dahil sa ilang setting ng kulay. I-click ang OK upang kumpirmahin ang mga setting ng kulay na ito, kung hindi ay mare-reset ang mga setting na ito pagkatapos ng 10 segundo."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Home"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Mga Kamakailang Ginamit"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Bumalik"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Ipakita nang may mga kontrol ng volume"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Huwag istorbohin"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Shortcut ng mga button ng volume"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Umalis sa huwag istorbohin nang malakas ang volume"</string>
<string name="battery" msgid="7498329822413202973">"Baterya"</string>
<string name="clock" msgid="7416090374234785905">"Orasan"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Naka-on ang Data Saver"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Naka-off ang Data Saver"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"I-on"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"I-off"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigation bar"</string>
<string name="start" msgid="6873794757232879664">"Simula"</string>
<string name="center" msgid="4327473927066010960">"Gitna"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"I-preview"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Mag-drag upang magdagdag ng mga tile"</string>
<string name="qs_edit" msgid="2232596095725105230">"I-edit"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Oras"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Ipakita ang oras, minuto at segundo"</item>
+ <item msgid="1427801730816895300">"Ipakita ang oras at minuto (default)"</item>
+ <item msgid="3830170141562534721">"Huwag ipakita ang icon na ito"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Palaging ipakita ang porsyento"</item>
+ <item msgid="2139628951880142927">"Ipakita ang porsyento kapag nagcha-charge (default)"</item>
+ <item msgid="3327323682209964956">"Huwag ipakita ang icon na ito"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index e57c956..b343d08 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Ekrana getir ve ses çıkar"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Diğer ayarlar"</string>
<string name="notification_done" msgid="5279426047273930175">"Bitti"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Renk ve görünüm"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Gece modu"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Ekranı kalibre et"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Açık"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Kapalı"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Otomatik olarak aç"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Konuma ve günün saatine uygun şekilde Gece Modu\'na geç"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Gece Modu açık olduğunda"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Android OS için koyu renk tema kullan"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Tonu ayarla"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Parlaklığı ayarla"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Koyu renk tema, Android OS\'nin normalde Ayarlar ve bildirimler gibi açık renk bir temayla görüntülenen temel alanlarına uygulanır."</string>
<string name="color_apply" msgid="9212602012641034283">"Uygula"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Ayarları onaylayın"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Bazı renkler bu cihazı kullanılmaz yapabilir. Bu renkleri onaylamak için Tamam\'ı tıklayın. Tıklamazsanız bu ayarlar 10 saniye sonra sıfırlanacaktır."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Ana ekran"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Son çağrılar"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Geri"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Ses seviyesi kontrolleriyle göster"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Rahatsız etmeyin"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Ses düğmeleri kısayolu"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Ses açıldığında rahatsız etmeyin modundan çık"</string>
<string name="battery" msgid="7498329822413202973">"Pil"</string>
<string name="clock" msgid="7416090374234785905">"Saat"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Veri Tasarrufu açık"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Veri Tasarrufu kapalı"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Açık"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Kapalı"</string>
<string name="nav_bar" msgid="1993221402773877607">"Gezinme çubuğu"</string>
<string name="start" msgid="6873794757232879664">"Başlangıç"</string>
<string name="center" msgid="4327473927066010960">"Merkez"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Önizle"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Blok eklemek için sürükleyin"</string>
<string name="qs_edit" msgid="2232596095725105230">"Düzenle"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Saat"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Saati, dakikayı ve saniyeyi göster"</item>
+ <item msgid="1427801730816895300">"Saati ve dakikayı göster (varsayılan)"</item>
+ <item msgid="3830170141562534721">"Bu simgeyi gösterme"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Her zaman yüzdeyi göster"</item>
+ <item msgid="2139628951880142927">"Şarj olurken yüzdeyi göster (varsayılan)"</item>
+ <item msgid="3327323682209964956">"Bu simgeyi gösterme"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index 99d3feb..6a47d84 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -467,30 +467,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Показувати сповіщення на екрані зі звуковим сигналом"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Більше налаштувань"</string>
<string name="notification_done" msgid="5279426047273930175">"Готово"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Колір і вигляд"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Нічний режим"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Калібрувати дисплей"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Увімкнено"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"Вимкнено"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Вмикати автоматично"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Переходити на нічний режим відповідно до місцезнаходження та часу доби"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Коли нічний режим увімкнено"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Використати нічну тему для ОС Android"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Налаштувати відтінок"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Регулювати яскравість"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"Нічна тема застосовується в основних областях ОС Android, які зазвичай відображаються у світлій темі, як-от у Налаштуваннях і сповіщеннях."</string>
<string name="color_apply" msgid="9212602012641034283">"Застосувати"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Підтвердити налаштування"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Деякі налаштування кольорів можуть зробити цей пристрій непридатним для використання. Натисніть OK, щоб підтвердити налаштування, інакше їх буде скинуто через 10 секунд."</string>
@@ -502,12 +490,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Головний екран"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"Останні"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Назад"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Показувати регулятори гучності"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Не турбувати"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Кнопки гучності на корпусі"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Вимикати режим \"Не турбувати\" під час збільшення гучності"</string>
<string name="battery" msgid="7498329822413202973">"Акумулятор"</string>
<string name="clock" msgid="7416090374234785905">"Годинник"</string>
@@ -518,8 +503,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Заощадження трафіку ввімкнено"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Заощадження трафіку вимкнено"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Увімкнено"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"Вимкнути"</string>
<string name="nav_bar" msgid="1993221402773877607">"Панель навігації"</string>
<string name="start" msgid="6873794757232879664">"На початку"</string>
<string name="center" msgid="4327473927066010960">"У центрі"</string>
@@ -542,12 +526,15 @@
<string name="preview" msgid="9077832302472282938">"Переглянути"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Перетягуйте фрагменти, щоб додавати їх"</string>
<string name="qs_edit" msgid="2232596095725105230">"Редагувати"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Час"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Показувати години, хвилини та секунди"</item>
+ <item msgid="1427801730816895300">"Показувати години та хвилини (за умовчанням)"</item>
+ <item msgid="3830170141562534721">"Не показувати цей значок"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Завжди показувати відсотки"</item>
+ <item msgid="2139628951880142927">"Показувати відсотки під час заряджання (за умовчанням)"</item>
+ <item msgid="3327323682209964956">"Не показувати цей значок"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-ur-rPK/strings.xml b/packages/SystemUI/res/values-ur-rPK/strings.xml
index 77a2bce..afb5db8 100644
--- a/packages/SystemUI/res/values-ur-rPK/strings.xml
+++ b/packages/SystemUI/res/values-ur-rPK/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"اسکرین پر دکھائیں اور آواز چلائیں"</string>
<string name="notification_more_settings" msgid="816306283396553571">"مزید ترتیبات"</string>
<string name="notification_done" msgid="5279426047273930175">"ہوگیا"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"رنگ اور ظہور"</string>
+ <string name="night_mode" msgid="3540405868248625488">"رات موڈ"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"نشان زد ڈسپلے"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"آن"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"آف"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"خودکار طور پر آن کریں"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"مقام اور دن کے وقت کی مناسبت سے نائٹ موڈ میں سوئچ کریں"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"جب نائٹ موڈ آن ہو"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Android OS کیلئے ڈارک تھیم استعمال کریں"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"ٹنٹ ایڈجسٹ کریں"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"چمک کو ایڈجسٹ کریں"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"ڈارک تھیم Android OS کی بنیادی جگہوں پر لاگو کی جاتی ہے جو عام طور لائٹ تھیم میں ڈسپلے ہوتے ہیں، جیسے ترتیبات اور اطلاعات۔"</string>
<string name="color_apply" msgid="9212602012641034283">"لاگو کریں"</string>
<string name="color_revert_title" msgid="4746666545480534663">"ترتیبات کی توثیق کریں"</string>
<string name="color_revert_message" msgid="9116001069397996691">"رنگوں کی کچھ ترتیبات اس آلے کو ناقابل استعمال بنا سکتی ہیں۔ رنگوں کی ان ترتیبات کی توثیق کرنے کیلئے ٹھیک ہے پر کلک کریں، بصورت دیگر 10 سیکنڈ بعد یہ ترتیبات ری سیٹ ہو جائیں گی۔"</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"ہوم"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"حالیہ"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"پیچھے"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"والیوم کنٹرولز کے ساتھ دکھائیں"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"ڈسٹرب نہ کریں"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"والیوم بٹنز کے شارٹ کٹ"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"زیادہ والیوم پر \'ڈسٹرب نہ کریں\' سے خارج ہوں"</string>
<string name="battery" msgid="7498329822413202973">"بیٹری"</string>
<string name="clock" msgid="7416090374234785905">"گھڑی"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"ڈیٹا سیور آن ہے"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"ڈیٹا سیور آف ہے"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"آن"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"آف"</string>
<string name="nav_bar" msgid="1993221402773877607">"نیویگیشن بار"</string>
<string name="start" msgid="6873794757232879664">"شروع کریں"</string>
<string name="center" msgid="4327473927066010960">"مرکز"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"پیش منظر"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"ٹائٹلز شامل کرنے کیلئے گھسیٹیں"</string>
<string name="qs_edit" msgid="2232596095725105230">"ترمیم کریں"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"وقت"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"گھنٹے، منٹ اور سیکنڈ دکھائیں"</item>
+ <item msgid="1427801730816895300">"گھنٹے اور منٹ دکھائیں (ڈیفالٹ)"</item>
+ <item msgid="3830170141562534721">"یہ آئیکن نہ دکھائیں"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"ہمیشہ شرح فیصد دکھائیں"</item>
+ <item msgid="2139628951880142927">"چارج ہوتے وقت فیصد دکھائیں (ڈیفالٹ)"</item>
+ <item msgid="3327323682209964956">"یہ آئیکن نہ دکھائیں"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-uz-rUZ/strings.xml b/packages/SystemUI/res/values-uz-rUZ/strings.xml
index 8616fa6..eafe80c 100644
--- a/packages/SystemUI/res/values-uz-rUZ/strings.xml
+++ b/packages/SystemUI/res/values-uz-rUZ/strings.xml
@@ -445,7 +445,7 @@
<string name="clock_seconds_desc" msgid="6282693067130470675">"Holat panelida soat soniyalari ko‘rsatilsin. Bu batareya resursiga ta’sir qilishi mumkin."</string>
<string name="qs_rearrange" msgid="8060918697551068765">"Tezkor sozlamalarni qayta tartiblash"</string>
<string name="show_brightness" msgid="6613930842805942519">"Tezkor sozlamalarda yorqinlikni ko‘rsatish"</string>
- <string name="overview_nav_bar_gesture" msgid="8579814204727917764">"Tepaga surib, ekranni bo‘lish ishorasini yoqish"</string>
+ <string name="overview_nav_bar_gesture" msgid="8579814204727917764">"Tepaga surish orqali ekranni ikkiga bo‘lish"</string>
<string name="overview_nav_bar_gesture_desc" msgid="6329167382305102615">"Umumiy ma’lumot tugmasini tepaga surish orqali ekranni bo‘lish ishorasini yoqish"</string>
<string name="experimental" msgid="6198182315536726162">"Tajribaviy"</string>
<string name="enable_bluetooth_title" msgid="5027037706500635269">"Bluetooth yoqilsinmi?"</string>
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"Barcha oynalar ustida signal ovozi bilan ko‘rsatilsin"</string>
<string name="notification_more_settings" msgid="816306283396553571">"Boshqa sozlamalar"</string>
<string name="notification_done" msgid="5279426047273930175">"Tayyor"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"Rang va ko‘rinishi"</string>
+ <string name="night_mode" msgid="3540405868248625488">"Tungi rejim"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"Ekranni kalibrlash"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"Yoniq"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"O‘chiq"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"Avtomatik yoqish"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"Joylashuv va vaqtga mos ravishda tungi rejimga o‘tish"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"Agar tungi rejim yoniq bo‘lsa"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Android OS uchun to‘q rangli mavzudan foyd-sh"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"Rangni o‘zgartirish"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"Yorqinlikni o‘zgartirish"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"To‘q rangli mavzu Android OS’ning o‘zak sahifalariga ham qo‘llaniladi va bu Sozlamalar va bildirishnomalar kabi och rangli mavzularda odatdagiday ko‘rsatiladi."</string>
<string name="color_apply" msgid="9212602012641034283">"Qo‘llash"</string>
<string name="color_revert_title" msgid="4746666545480534663">"Sozlamalarni tasdiqlang"</string>
<string name="color_revert_message" msgid="9116001069397996691">"Ba’zi rang sozlamalari qurilmadan foydalanishni qiyinlashtirish mumkin. Tanlgan parametrlarni tasdiqlash uchun “OK” tugmasini bosing. Aks holda, ular 10 soniyadan so‘ng qayta tiklanadi."</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"Bosh ekran"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"So‘nggi ishlatilganlar"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"Orqaga"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"Ovoz balandligini boshqarish tugmalari bilan ko‘rsatilsin"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"Bezovta qilinmasin"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"Ovoz balandligini boshqarish tezkor tugmalari"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"Ovozni ko‘targanda “Bezovta qilinmasin” rejimini o‘chirish"</string>
<string name="battery" msgid="7498329822413202973">"Batareya"</string>
<string name="clock" msgid="7416090374234785905">"Soat"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Trafik tejash yoniq"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Trafik tejash o‘chiq"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"Yoniq"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"O‘chiq"</string>
<string name="nav_bar" msgid="1993221402773877607">"Navigatsiya paneli"</string>
<string name="start" msgid="6873794757232879664">"Boshlash"</string>
<string name="center" msgid="4327473927066010960">"Markazda"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"Oldindan ko‘rish"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"Fragmentlar qo‘shish uchun torting"</string>
<string name="qs_edit" msgid="2232596095725105230">"Tahrirlash"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"Vaqt"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"Soat, daqiqa va soniyalar ko‘rsatilsin"</item>
+ <item msgid="1427801730816895300">"Soat va daqiqalar ko‘rsatilsin (birlamchi)"</item>
+ <item msgid="3830170141562534721">"Bu ikonka boshqa ko‘rsatilmasin"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"Har doim foizda ko‘rsatilsin"</item>
+ <item msgid="2139628951880142927">"Quvvat olayotganda foizda ko‘rsatilsin (birlamchi)"</item>
+ <item msgid="3327323682209964956">"Bu ikonka boshqa ko‘rsatilmasin"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 3888de5..1c8c71e 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -445,7 +445,7 @@
<string name="clock_seconds_desc" msgid="6282693067130470675">"在状态栏中显示时钟的秒数。这可能会影响电池的续航时间。"</string>
<string name="qs_rearrange" msgid="8060918697551068765">"重新排列快捷设置"</string>
<string name="show_brightness" msgid="6613930842805942519">"在快捷设置中显示亮度栏"</string>
- <string name="overview_nav_bar_gesture" msgid="8579814204727917764">"启用分屏向上滑动手势"</string>
+ <string name="overview_nav_bar_gesture" msgid="8579814204727917764">"启用分屏上滑手势"</string>
<string name="overview_nav_bar_gesture_desc" msgid="6329167382305102615">"启用通过从“概览”按钮向上滑动的手势进入分屏模式"</string>
<string name="experimental" msgid="6198182315536726162">"实验性"</string>
<string name="enable_bluetooth_title" msgid="5027037706500635269">"要开启蓝牙吗?"</string>
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"在屏幕上持续显示,并发出提示音"</string>
<string name="notification_more_settings" msgid="816306283396553571">"更多设置"</string>
<string name="notification_done" msgid="5279426047273930175">"完成"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"颜色和外观"</string>
+ <string name="night_mode" msgid="3540405868248625488">"夜间模式"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"校准显示画面"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"开启"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"关闭"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"自动开启"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"根据地点和时间适时切换到夜间模式"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"夜间模式开启时"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"对 Android 操作系统使用深色主题背景"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"调整色调"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"调整亮度"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"系统会将深色主题背景应用于 Android 操作系统的核心区域(通常以浅色主题背景显示),例如设置和通知。"</string>
<string name="color_apply" msgid="9212602012641034283">"应用"</string>
<string name="color_revert_title" msgid="4746666545480534663">"确认设置"</string>
<string name="color_revert_message" msgid="9116001069397996691">"部分颜色设置可能会导致此设备无法使用。请点击“确定”确认这些颜色设置,否则,系统将在 10 秒后重置这些设置。"</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"主屏幕"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"最近"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"返回"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"与音量控件一起显示"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"请勿打扰"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"音量按钮快捷键"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"按音量调高键时退出“请勿打扰”模式"</string>
<string name="battery" msgid="7498329822413202973">"电池"</string>
<string name="clock" msgid="7416090374234785905">"时钟"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"流量节省程序已开启"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"流量节省程序已关闭"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"开启"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"关闭"</string>
<string name="nav_bar" msgid="1993221402773877607">"导航栏"</string>
<string name="start" msgid="6873794757232879664">"顶部"</string>
<string name="center" msgid="4327473927066010960">"中心位置"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"预览"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"拖动即可添加图块"</string>
<string name="qs_edit" msgid="2232596095725105230">"修改"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"时间"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"显示小时、分钟和秒"</item>
+ <item msgid="1427801730816895300">"显示小时和分钟(默认)"</item>
+ <item msgid="3830170141562534721">"不显示此图标"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"一律显示百分比"</item>
+ <item msgid="2139628951880142927">"充电时显示百分比(默认)"</item>
+ <item msgid="3327323682209964956">"不显示此图标"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rHK/strings.xml b/packages/SystemUI/res/values-zh-rHK/strings.xml
index 45955bd..f4ac5b4 100644
--- a/packages/SystemUI/res/values-zh-rHK/strings.xml
+++ b/packages/SystemUI/res/values-zh-rHK/strings.xml
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"不時於螢幕出現並發出音效"</string>
<string name="notification_more_settings" msgid="816306283396553571">"更多設定"</string>
<string name="notification_done" msgid="5279426047273930175">"完成"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"顏色和外觀"</string>
+ <string name="night_mode" msgid="3540405868248625488">"夜間模式"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"校準螢幕"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"已開啟"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"已關閉"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"自動開啟"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"在適當的位置和時間切換至「夜間模式」"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"「夜間模式」開啟時"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"在 Android OS 中使用深色主題背景"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"調整色調"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"調整亮度"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"系統會將深色主題背景套用到 Android OS 核心區域 (一般以淺色主題背景顯示),例如「設定」和通知。"</string>
<string name="color_apply" msgid="9212602012641034283">"套用"</string>
<string name="color_revert_title" msgid="4746666545480534663">"確認設定"</string>
<string name="color_revert_message" msgid="9116001069397996691">"部分顏色設定會令此裝置無法使用。請按一下 [確定] 加以確認,否則這些顏色設定將於 10 秒後重設。"</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"主畫面"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"最近的活動"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"返回"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"與音量控制一起顯示"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"請勿騷擾"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"音量按鈕快速鍵"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"調高音量時停用「請勿騷擾」模式"</string>
<string name="battery" msgid="7498329822413202973">"電池"</string>
<string name="clock" msgid="7416090374234785905">"時鐘"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"數據節省程式已開啟"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"數據節省程式已關閉"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"開啟"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"關閉"</string>
<string name="nav_bar" msgid="1993221402773877607">"導覽列"</string>
<string name="start" msgid="6873794757232879664">"畫面頂部"</string>
<string name="center" msgid="4327473927066010960">"畫面中央"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"預覽"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"拖曳即可新增圖塊"</string>
<string name="qs_edit" msgid="2232596095725105230">"編輯"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"時間"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"顯示小時、分鐘和秒"</item>
+ <item msgid="1427801730816895300">"顯示小時和分鐘 (預設)"</item>
+ <item msgid="3830170141562534721">"不顯示這個圖示"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"永遠顯示百分比"</item>
+ <item msgid="2139628951880142927">"充電時顯示百分比 (預設)"</item>
+ <item msgid="3327323682209964956">"不顯示這個圖示"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 918b42d..2690eb6 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -301,7 +301,7 @@
<string name="recents_lock_to_app_button_label" msgid="6942899049072506044">"螢幕固定"</string>
<string name="recents_search_bar_label" msgid="8074997400187836677">"搜尋"</string>
<string name="recents_launch_error_message" msgid="2969287838120550506">"無法啟動「<xliff:g id="APP">%s</xliff:g>」。"</string>
- <string name="recents_launch_disabled_message" msgid="1624523193008871793">"「<xliff:g id="APP">%s</xliff:g>」在安全模式中處於停用狀態。"</string>
+ <string name="recents_launch_disabled_message" msgid="1624523193008871793">"「<xliff:g id="APP">%s</xliff:g>」在安全模式中為停用狀態。"</string>
<string name="recents_history_button_label" msgid="5153358867807604821">"紀錄"</string>
<string name="recents_history_clear_all_button_label" msgid="5905258334958006953">"清除"</string>
<string name="recents_multistack_add_stack_dialog_split_horizontal" msgid="8848514474543427332">"水平分割"</string>
@@ -465,30 +465,18 @@
<string name="notification_importance_max" msgid="5236987171904756134">"短暫顯示在螢幕上並發出音效"</string>
<string name="notification_more_settings" msgid="816306283396553571">"更多設定"</string>
<string name="notification_done" msgid="5279426047273930175">"完成"</string>
- <!-- no translation found for color_and_appearance (1254323855964993144) -->
- <skip />
- <!-- no translation found for night_mode (3540405868248625488) -->
- <skip />
- <!-- no translation found for calibrate_display (5974642573432039217) -->
- <skip />
- <!-- no translation found for night_mode_on (5597545513026541108) -->
- <skip />
- <!-- no translation found for night_mode_off (8035605276956057508) -->
- <skip />
- <!-- no translation found for turn_on_automatically (4167565356762016083) -->
- <skip />
- <!-- no translation found for turn_on_auto_summary (2190994512406701520) -->
- <skip />
- <!-- no translation found for when_night_mode_on (2969436026899172821) -->
- <skip />
- <!-- no translation found for use_dark_theme (2900938704964299312) -->
- <skip />
- <!-- no translation found for adjust_tint (3398569573231409878) -->
- <skip />
- <!-- no translation found for adjust_brightness (980039329808178246) -->
- <skip />
- <!-- no translation found for night_mode_disclaimer (3297928749219711334) -->
- <skip />
+ <string name="color_and_appearance" msgid="1254323855964993144">"顏色和外觀"</string>
+ <string name="night_mode" msgid="3540405868248625488">"夜間模式"</string>
+ <string name="calibrate_display" msgid="5974642573432039217">"校正顯示畫面"</string>
+ <string name="night_mode_on" msgid="5597545513026541108">"開啟"</string>
+ <string name="night_mode_off" msgid="8035605276956057508">"關閉"</string>
+ <string name="turn_on_automatically" msgid="4167565356762016083">"自動開啟"</string>
+ <string name="turn_on_auto_summary" msgid="2190994512406701520">"根據地點和時段適時切換到「夜間模式」"</string>
+ <string name="when_night_mode_on" msgid="2969436026899172821">"「夜間模式」開啟時"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"針對 Android 作業系統使用深色主題"</string>
+ <string name="adjust_tint" msgid="3398569573231409878">"調整色調"</string>
+ <string name="adjust_brightness" msgid="980039329808178246">"調整亮度"</string>
+ <string name="night_mode_disclaimer" msgid="3297928749219711334">"深色主題會套用到 Android 作業系統的核心區塊 (一般是以淺色主題顯示),例如設定和通知。"</string>
<string name="color_apply" msgid="9212602012641034283">"套用"</string>
<string name="color_revert_title" msgid="4746666545480534663">"確認設定"</string>
<string name="color_revert_message" msgid="9116001069397996691">"部分顏色設定可能會造成這部裝置無法使用。請按一下 [確定] 來確認您要使用這類顏色設定,否則系統將在 10 秒後重設這些設定。"</string>
@@ -500,12 +488,9 @@
<string name="keyboard_shortcut_group_system_home" msgid="3054369431319891965">"主畫面"</string>
<string name="keyboard_shortcut_group_system_recents" msgid="3154851905021926744">"近期活動"</string>
<string name="keyboard_shortcut_group_system_back" msgid="2207004531216446378">"返回"</string>
- <!-- no translation found for tuner_full_zen_title (4540823317772234308) -->
- <skip />
- <!-- no translation found for volume_and_do_not_disturb (3373784330208603030) -->
- <skip />
- <!-- no translation found for volume_dnd_silent (4363882330723050727) -->
- <skip />
+ <string name="tuner_full_zen_title" msgid="4540823317772234308">"與音量控制項一起顯示"</string>
+ <string name="volume_and_do_not_disturb" msgid="3373784330208603030">"零打擾"</string>
+ <string name="volume_dnd_silent" msgid="4363882330723050727">"音量按鈕快速鍵"</string>
<string name="volume_up_silent" msgid="7141255269783588286">"按下調高音量鍵時停用「零打擾」模式"</string>
<string name="battery" msgid="7498329822413202973">"電池"</string>
<string name="clock" msgid="7416090374234785905">"時鐘"</string>
@@ -516,8 +501,7 @@
<string name="accessibility_data_saver_on" msgid="8454111686783887148">"Data Saver 已開啟"</string>
<string name="accessibility_data_saver_off" msgid="8841582529453005337">"Data Saver 已關閉"</string>
<string name="switch_bar_on" msgid="1142437840752794229">"開啟"</string>
- <!-- no translation found for switch_bar_off (8803270596930432874) -->
- <skip />
+ <string name="switch_bar_off" msgid="8803270596930432874">"關閉"</string>
<string name="nav_bar" msgid="1993221402773877607">"導覽列"</string>
<string name="start" msgid="6873794757232879664">"畫面頂端"</string>
<string name="center" msgid="4327473927066010960">"畫面中央"</string>
@@ -540,12 +524,15 @@
<string name="preview" msgid="9077832302472282938">"預覽"</string>
<string name="drag_to_add_tiles" msgid="7058945779098711293">"拖曳即可新增圖塊"</string>
<string name="qs_edit" msgid="2232596095725105230">"編輯"</string>
- <!-- no translation found for tuner_time (6572217313285536011) -->
- <skip />
- <!-- no translation found for clock_options:0 (5965318737560463480) -->
- <!-- no translation found for clock_options:1 (1427801730816895300) -->
- <!-- no translation found for clock_options:2 (3830170141562534721) -->
- <!-- no translation found for battery_options:0 (3160236755818672034) -->
- <!-- no translation found for battery_options:1 (2139628951880142927) -->
- <!-- no translation found for battery_options:2 (3327323682209964956) -->
+ <string name="tuner_time" msgid="6572217313285536011">"時間"</string>
+ <string-array name="clock_options">
+ <item msgid="5965318737560463480">"顯示小時、分鐘和秒"</item>
+ <item msgid="1427801730816895300">"顯示小時和分鐘 (預設)"</item>
+ <item msgid="3830170141562534721">"不顯示這個圖示"</item>
+ </string-array>
+ <string-array name="battery_options">
+ <item msgid="3160236755818672034">"一律顯示百分比"</item>
+ <item msgid="2139628951880142927">"充電時顯示百分比 (預設)"</item>
+ <item msgid="3327323682209964956">"不顯示這個圖示"</item>
+ </string-array>
</resources>
diff --git a/packages/SystemUI/res/values-zu/strings.xml b/packages/SystemUI/res/values-zu/strings.xml
index 068587c..33f0e9a 100644
--- a/packages/SystemUI/res/values-zu/strings.xml
+++ b/packages/SystemUI/res/values-zu/strings.xml
@@ -473,7 +473,7 @@
<string name="turn_on_automatically" msgid="4167565356762016083">"Vula ngokuzenzakalela"</string>
<string name="turn_on_auto_summary" msgid="2190994512406701520">"Shintshela kwimodi yasebusuku njengokuqondile ngendawo nesikhathi sosuku"</string>
<string name="when_night_mode_on" msgid="2969436026899172821">"Uma imodi yasebusuku ivulekile"</string>
- <string name="use_dark_theme" msgid="2900938704964299312">"Sebenzisa ingqukithi emnyama ku-Android OS"</string>
+ <string name="use_dark_theme" msgid="2900938704964299312">"Sebenzisa ingqikithi emnyama ku-Android OS"</string>
<string name="adjust_tint" msgid="3398569573231409878">"Lungisa i-tint"</string>
<string name="adjust_brightness" msgid="980039329808178246">"Lungisa ukukhanya"</string>
<string name="night_mode_disclaimer" msgid="3297928749219711334">"Ingqikithi emnyama isetshenziswa ezindaweni eziqinile ze-Android OS ezivame ukuboniswa ngengqikithi ekhanyayo, njengamasethingi nezaziso."</string>
diff --git a/packages/SystemUI/res/values/attrs.xml b/packages/SystemUI/res/values/attrs.xml
index 19bc755..189eb3b 100644
--- a/packages/SystemUI/res/values/attrs.xml
+++ b/packages/SystemUI/res/values/attrs.xml
@@ -91,6 +91,7 @@
<declare-styleable name="TunerSwitch">
<attr name="defValue" format="boolean" />
+ <attr name="metricsAction" format="integer" />
</declare-styleable>
</resources>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 09d830f..fbe0207 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -174,8 +174,8 @@
<dimen name="qs_tile_margin">16dp</dimen>
<dimen name="qs_quick_tile_size">48dp</dimen>
<dimen name="qs_quick_tile_padding">12dp</dimen>
- <dimen name="qs_date_anim_translation">36dp</dimen>
- <dimen name="qs_date_alarm_anim_translation">26dp</dimen>
+ <dimen name="qs_date_anim_translation">32dp</dimen>
+ <dimen name="qs_date_alarm_anim_translation">22dp</dimen>
<dimen name="qs_date_collapsed_text_size">14sp</dimen>
<dimen name="qs_date_text_size">16sp</dimen>
<dimen name="qs_header_gear_translation">150dp</dimen>
@@ -203,6 +203,7 @@
<dimen name="qs_data_usage_text_size">14sp</dimen>
<dimen name="qs_data_usage_usage_text_size">36sp</dimen>
<dimen name="qs_expand_margin">0dp</dimen>
+ <dimen name="qs_battery_padding">2dp</dimen>
<dimen name="segmented_button_spacing">0dp</dimen>
<dimen name="borderless_button_radius">2dp</dimen>
@@ -234,7 +235,7 @@
<dimen name="glowpadview_inner_radius">15dip</dimen>
<!-- The size of the icon in the recents task view header. -->
- <dimen name="recents_task_view_header_icon_width">64dp</dimen>
+ <dimen name="recents_task_view_header_icon_width">56dp</dimen>
<dimen name="recents_task_view_header_icon_height">@dimen/recents_task_bar_height</dimen>
<!-- The size of a button in the recents task view header. -->
@@ -262,7 +263,7 @@
<dimen name="recents_task_view_affiliate_group_enter_offset">32dp</dimen>
<!-- The height of a task view bar. -->
- <dimen name="recents_task_bar_height">56dp</dimen>
+ <dimen name="recents_task_bar_height">50dp</dimen>
<!-- The height of the search bar space. -->
<dimen name="recents_search_bar_space_height">64dp</dimen>
diff --git a/packages/SystemUI/res/values/ids.xml b/packages/SystemUI/res/values/ids.xml
index 87aedab..54d271a 100644
--- a/packages/SystemUI/res/values/ids.xml
+++ b/packages/SystemUI/res/values/ids.xml
@@ -56,5 +56,11 @@
<item type="id" name="image_icon_tag" />
<item type="id" name="contains_transformed_view" />
<item type="id" name="is_clicked_heads_up_tag" />
+
+ <!-- Accessibility actions for the docked stack divider -->
+ <item type="id" name="action_move_left" />
+ <item type="id" name="action_move_right" />
+ <item type="id" name="action_move_up" />
+ <item type="id" name="action_move_down" />
</resources>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 0bd7c4e..30c0be8 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -186,7 +186,9 @@
<!-- Notification title displayed when we fail to take a screenshot. [CHAR LIMIT=50] -->
<string name="screenshot_failed_title">Couldn\'t capture screenshot.</string>
<!-- Notification text displayed when we fail to take a screenshot. [CHAR LIMIT=100] -->
- <string name="screenshot_failed_text">Can\'t take screenshot due to limited storage space, or it isn\'t allowed by the app or your organization.</string>
+ <string name="screenshot_failed_to_save_text">Can\'t save screenshot due to limited storage space.</string>
+ <!-- Notification text displayed when we fail to take a screenshot. [CHAR LIMIT=100] -->
+ <string name="screenshot_failed_to_capture_text">Taking screenshots is not allowed by the app or your organization.</string>
<!-- Title for the USB function chooser in UsbPreferenceActivity. [CHAR LIMIT=30] -->
<string name="usb_preference_title">USB file transfer options</string>
@@ -1270,7 +1272,7 @@
<!-- SysUI Tuner: Disclaimer about using dark theme with night mode [CHAR LIMIT=NONE] -->
<string name="night_mode_disclaimer">The dark theme is applied to
core areas of Android OS that are normally displayed in a light theme,
- such as Settings and notifications.</string>
+ such as Settings.</string>
<!-- Button to apply settings [CHAR LIMIT=30] -->
<string name="color_apply">Apply</string>
@@ -1428,4 +1430,18 @@
<item>Don\'t show this icon</item>
</string-array>
+ <!-- Accessibility label for the divider that separates the windows in split-screen mode [CHAR LIMIT=NONE] -->
+ <string name="accessibility_divider">Split-screen divider</string>
+
+ <!-- Accessibility action for moving down the docked stack divider [CHAR LIMIT=NONE] -->
+ <string name="accessibility_action_divider_move_down">Move down</string>
+
+ <!-- Accessibility action for moving down the docked stack divider [CHAR LIMIT=NONE] -->
+ <string name="accessibility_action_divider_move_up">Move up</string>
+
+ <!-- Accessibility action for moving down the docked stack divider [CHAR LIMIT=NONE] -->
+ <string name="accessibility_action_divider_move_left">Move left</string>
+
+ <!-- Accessibility action for moving down the docked stack divider [CHAR LIMIT=NONE] -->
+ <string name="accessibility_action_divider_move_right">Move right</string>
</resources>
diff --git a/packages/SystemUI/res/xml/tuner_prefs.xml b/packages/SystemUI/res/xml/tuner_prefs.xml
index 023a3f0..f4a0cc9 100644
--- a/packages/SystemUI/res/xml/tuner_prefs.xml
+++ b/packages/SystemUI/res/xml/tuner_prefs.xml
@@ -109,21 +109,29 @@
android:key="volume_and_do_not_disturb"
android:title="@string/volume_and_do_not_disturb">
+ <!-- Action for this is
+ MetricsConstants.ACTION_TUNER_DO_NOT_DISTURB_VOLUME_PANEL -->
<com.android.systemui.tuner.TunerSwitch
android:key="sysui_show_full_zen"
- android:title="@string/tuner_full_zen_title" />
+ android:title="@string/tuner_full_zen_title"
+ sysui:metricsAction="314" />
+ <!-- Action for this is
+ MetricsConstants.ACTION_TUNER_DO_NOT_DISTURB_VOLUME_SHORTCUT -->
<com.android.systemui.tuner.TunerSwitch
android:key="sysui_volume_down_silent,sysui_volume_up_silent"
android:title="@string/volume_dnd_silent"
- sysui:defValue="true" />
+ sysui:defValue="true"
+ sysui:metricsAction="315" />
</PreferenceScreen>
+ <!--
<Preference
android:key="nav_bar"
android:title="@string/nav_bar"
android:fragment="com.android.systemui.tuner.NavBarTuner" />
+ -->
<PreferenceScreen
android:key="overview"
diff --git a/packages/SystemUI/src/com/android/systemui/classifier/FalsingManager.java b/packages/SystemUI/src/com/android/systemui/classifier/FalsingManager.java
index 735a7c4..c09376b 100644
--- a/packages/SystemUI/src/com/android/systemui/classifier/FalsingManager.java
+++ b/packages/SystemUI/src/com/android/systemui/classifier/FalsingManager.java
@@ -23,6 +23,7 @@
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Handler;
+import android.os.PowerManager;
import android.os.UserHandle;
import android.provider.Settings;
import android.view.MotionEvent;
@@ -64,6 +65,7 @@
private boolean mBouncerOn = false;
private boolean mSessionActive = false;
private int mState = StatusBarState.SHADE;
+ private boolean mScreenOn;
protected final ContentObserver mSettingsObserver = new ContentObserver(mHandler) {
@Override
@@ -77,6 +79,7 @@
mSensorManager = (SensorManager) mContext.getSystemService(Context.SENSOR_SERVICE);
mDataCollector = DataCollector.getInstance(mContext);
mHumanInteractionClassifier = HumanInteractionClassifier.getInstance(mContext);
+ mScreenOn = context.getSystemService(PowerManager.class).isInteractive();
mContext.getContentResolver().registerContentObserver(
Settings.Secure.getUriFor(ENFORCE_BOUNCER), false,
@@ -98,17 +101,21 @@
ENFORCE_BOUNCER, 0);
}
+ private boolean shouldSessionBeActive() {
+ return isEnabled() && mScreenOn &&
+ (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED);
+ }
+
private boolean sessionEntrypoint() {
- if (!mSessionActive && isEnabled() &&
- (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED)) {
+ if (!mSessionActive && shouldSessionBeActive()) {
onSessionStart();
return true;
}
return false;
}
- private void sessionExitpoint() {
- if (mSessionActive) {
+ private void sessionExitpoint(boolean force) {
+ if (mSessionActive && (force || !shouldSessionBeActive())) {
mSessionActive = false;
mSensorManager.unregisterListener(this);
}
@@ -167,15 +174,22 @@
public void setStatusBarState(int state) {
mState = state;
+ if (shouldSessionBeActive()) {
+ sessionEntrypoint();
+ } else {
+ sessionExitpoint(false /* force */);
+ }
}
public void onScreenTurningOn() {
+ mScreenOn = true;
if (sessionEntrypoint()) {
mDataCollector.onScreenTurningOn();
}
}
public void onScreenOnFromTouch() {
+ mScreenOn = true;
if (sessionEntrypoint()) {
mDataCollector.onScreenOnFromTouch();
}
@@ -183,12 +197,13 @@
public void onScreenOff() {
mDataCollector.onScreenOff();
- sessionExitpoint();
+ mScreenOn = false;
+ sessionExitpoint(false /* force */);
}
public void onSucccessfulUnlock() {
mDataCollector.onSucccessfulUnlock();
- sessionExitpoint();
+ sessionExitpoint(true /* force */);
}
public void onBouncerShown() {
diff --git a/packages/SystemUI/src/com/android/systemui/classifier/HumanInteractionClassifier.java b/packages/SystemUI/src/com/android/systemui/classifier/HumanInteractionClassifier.java
index 7ddbdf0..45eb9ad 100644
--- a/packages/SystemUI/src/com/android/systemui/classifier/HumanInteractionClassifier.java
+++ b/packages/SystemUI/src/com/android/systemui/classifier/HumanInteractionClassifier.java
@@ -119,7 +119,7 @@
return;
}
- // If the user is dragging down the notification, he might want to drag it down
+ // If the user is dragging down the notification, they might want to drag it down
// enough to see the content, read it for a while and then lift the finger to open
// the notification. This kind of motion scores very bad in the Classifier so the
// MotionEvents which are close to the current position of the finger are not
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
index 4cfa042..dc64591 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSAnimator.java
@@ -39,6 +39,7 @@
public static final float EXPANDED_TILE_DELAY = .7f;
private final ArrayList<View> mAllViews = new ArrayList<>();
+ private final ArrayList<View> mTopFiveQs = new ArrayList<>();
private final QuickQSPanel mQuickQsPanel;
private final QSPanel mQsPanel;
private final QSContainer mQsContainer;
@@ -86,7 +87,10 @@
firstPageDelayedBuilder.setStartDelay(EXPANDED_TILE_DELAY);
firstPageBuilder.setListener(this);
translationYBuilder.setInterpolator(TRANSLATION_Y_INTERPOLATOR);
+ // Fade in the tiles/labels as we reach the final position.
+ firstPageDelayedBuilder.addFloat(mQsPanel.getTileLayout(), "alpha", 0, 1);
mAllViews.clear();
+ mTopFiveQs.clear();
for (QSTile<?> tile : tiles) {
QSTileBaseView tileView = mQsPanel.getTileView(tile);
final TextView label = ((QSTileView) tileView).getLabel();
@@ -104,21 +108,17 @@
translationYBuilder.addFloat(quickTileView, "translationY", 0, yDiff);
// Counteract the parent translation on the tile. So we have a static base to
- // animate off from.
+ // animate the label position off from.
firstPageBuilder.addFloat(tileView, "translationY", mQsPanel.getHeight(), 0);
- // Move the real tile's icon and label from the quick tile position to its final
+ // Move the real tile's label from the quick tile position to its final
// location.
- firstPageBuilder.addFloat(tileIcon, "translationX", -xDiff, 0);
- translationYBuilder.addFloat(tileIcon, "translationY", -yDiff, 0);
firstPageBuilder.addFloat(label, "translationX", -xDiff, 0);
translationYBuilder.addFloat(label, "translationY", -yDiff, 0);
- // Fade in the label as we reach the final position.
- firstPageDelayedBuilder.addFloat(label, "alpha", 0, 1);
+ mTopFiveQs.add(tileIcon);
+ mAllViews.add(tileIcon);
mAllViews.add(quickTileView);
- } else {
- firstPageDelayedBuilder.addFloat(tileView, "alpha", 0, 1);
}
mAllViews.add(tileView);
mAllViews.add(label);
@@ -159,17 +159,26 @@
@Override
public void onAnimationAtStart() {
-
}
@Override
public void onAnimationAtEnd() {
mQuickQsPanel.setVisibility(View.INVISIBLE);
+ final int N = mTopFiveQs.size();
+ for (int i = 0; i < N; i++) {
+ mTopFiveQs.get(i).setVisibility(View.VISIBLE);
+ }
}
@Override
public void onAnimationStarted() {
mQuickQsPanel.setVisibility(View.VISIBLE);
+ if (mOnFirstPage) {
+ final int N = mTopFiveQs.size();
+ for (int i = 0; i < N; i++) {
+ mTopFiveQs.get(i).setVisibility(View.INVISIBLE);
+ }
+ }
}
private void clearAnimationState() {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSIconView.java b/packages/SystemUI/src/com/android/systemui/qs/QSIconView.java
index 1df372b..267ed16 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSIconView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSIconView.java
@@ -70,11 +70,13 @@
protected void setIcon(ImageView iv, QSTile.State state) {
if (!Objects.equals(state.icon, iv.getTag(R.id.qs_icon_tag))) {
Drawable d = state.icon != null ? state.icon.getDrawable(mContext) : null;
+ int padding = state.icon != null ? state.icon.getPadding() : null;
if (d != null && state.autoMirrorDrawable) {
d.setAutoMirrored(true);
}
iv.setImageDrawable(d);
iv.setTag(R.id.qs_icon_tag, state.icon);
+ iv.setPadding(0, padding, 0, padding);
if (d instanceof Animatable) {
Animatable a = (Animatable) d;
a.start();
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
index f02424b..df622b8 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
@@ -420,6 +420,10 @@
public int hashCode() {
return Icon.class.hashCode();
}
+
+ public int getPadding() {
+ return 0;
+ }
}
public static class DrawableIcon extends Icon {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/TouchAnimator.java b/packages/SystemUI/src/com/android/systemui/qs/TouchAnimator.java
index b33d31d..94d8524 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/TouchAnimator.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/TouchAnimator.java
@@ -14,8 +14,6 @@
package com.android.systemui.qs;
-import android.animation.Keyframe;
-import android.util.Log;
import android.util.MathUtils;
import android.util.Property;
import android.view.View;
@@ -34,7 +32,6 @@
public class TouchAnimator {
private final Object[] mTargets;
- private final Property[] mProperties;
private final KeyframeSet[] mKeyframeSets;
private final float mStartDelay;
private final float mEndDelay;
@@ -43,10 +40,9 @@
private final Listener mListener;
private float mLastT;
- private TouchAnimator(Object[] targets, Property[] properties, KeyframeSet[] keyframeSets,
+ private TouchAnimator(Object[] targets, KeyframeSet[] keyframeSets,
float startDelay, float endDelay, Interpolator interpolator, Listener listener) {
mTargets = targets;
- mProperties = properties;
mKeyframeSets = keyframeSets;
mStartDelay = startDelay;
mEndDelay = endDelay;
@@ -73,8 +69,7 @@
mLastT = t;
}
for (int i = 0; i < mTargets.length; i++) {
- Object value = mKeyframeSets[i].getValue(t);
- mProperties[i].set(mTargets[i], value);
+ mKeyframeSets[i].setValue(t, mTargets[i]);
}
}
@@ -111,7 +106,6 @@
public static class Builder {
private List<Object> mTargets = new ArrayList<>();
- private List<Property> mProperties = new ArrayList<>();
private List<KeyframeSet> mValues = new ArrayList<>();
private float mStartDelay;
@@ -120,18 +114,17 @@
private Listener mListener;
public Builder addFloat(Object target, String property, float... values) {
- add(target, property, KeyframeSet.ofFloat(values));
+ add(target, KeyframeSet.ofFloat(getProperty(target, property), values));
return this;
}
public Builder addInt(Object target, String property, int... values) {
- add(target, property, KeyframeSet.ofInt(values));
+ add(target, KeyframeSet.ofInt(getProperty(target, property), values));
return this;
}
- private void add(Object target, String property, KeyframeSet keyframeSet) {
+ private void add(Object target, KeyframeSet keyframeSet) {
mTargets.add(target);
- mProperties.add(getProperty(target, property));
mValues.add(keyframeSet);
}
@@ -183,7 +176,6 @@
public TouchAnimator build() {
return new TouchAnimator(mTargets.toArray(new Object[mTargets.size()]),
- mProperties.toArray(new Property[mProperties.size()]),
mValues.toArray(new KeyframeSet[mValues.size()]),
mStartDelay, mEndDelay, mInterpolator, mListener);
}
@@ -199,54 +191,57 @@
mFrameWidth = 1 / (float) (size - 1);
}
- Object getValue(float fraction) {
+ void setValue(float fraction, Object target) {
int i;
for (i = 1; i < mSize - 1 && fraction > mFrameWidth; i++);
float amount = fraction / mFrameWidth;
- return interpolate(i, amount);
+ interpolate(i, amount, target);
}
- protected abstract Object interpolate(int index, float amount);
+ protected abstract void interpolate(int index, float amount, Object target);
- public static KeyframeSet ofInt(int... values) {
- return new IntKeyframeSet(values);
+ public static KeyframeSet ofInt(Property property, int... values) {
+ return new IntKeyframeSet((Property<?, Integer>) property, values);
}
- public static KeyframeSet ofFloat(float... values) {
- return new FloatKeyframeSet(values);
+ public static KeyframeSet ofFloat(Property property, float... values) {
+ return new FloatKeyframeSet((Property<?, Float>) property, values);
}
}
- private static class FloatKeyframeSet extends KeyframeSet {
+ private static class FloatKeyframeSet<T> extends KeyframeSet {
private final float[] mValues;
+ private final Property<T, Float> mProperty;
- public FloatKeyframeSet(float[] values) {
+ public FloatKeyframeSet(Property<T, Float> property, float[] values) {
super(values.length);
+ mProperty = property;
mValues = values;
}
@Override
- protected Object interpolate(int index, float amount) {
+ protected void interpolate(int index, float amount, Object target) {
float firstFloat = mValues[index - 1];
float secondFloat = mValues[index];
- return firstFloat + (secondFloat - firstFloat) * amount;
+ mProperty.set((T) target, firstFloat + (secondFloat - firstFloat) * amount);
}
}
- private static class IntKeyframeSet extends KeyframeSet {
-
+ private static class IntKeyframeSet<T> extends KeyframeSet {
private final int[] mValues;
+ private final Property<T, Integer> mProperty;
- public IntKeyframeSet(int[] values) {
+ public IntKeyframeSet(Property<T, Integer> property, int[] values) {
super(values.length);
+ mProperty = property;
mValues = values;
}
@Override
- protected Object interpolate(int index, float amount) {
+ protected void interpolate(int index, float amount, Object target) {
int firstFloat = mValues[index - 1];
int secondFloat = mValues[index];
- return (int) (firstFloat + (secondFloat - firstFloat) * amount);
+ mProperty.set((T) target, (int) (firstFloat + (secondFloat - firstFloat) * amount));
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
index d3536a4..67fe8e5e 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
@@ -22,12 +22,15 @@
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
-import android.support.v7.widget.helper.ItemTouchHelper;
import android.util.AttributeSet;
+import android.util.TypedValue;
import android.view.ContextThemeWrapper;
+import android.view.Menu;
+import android.view.MenuItem;
import android.view.View;
-import android.view.View.OnClickListener;
import android.widget.LinearLayout;
+import android.widget.Toolbar;
+import android.widget.Toolbar.OnMenuItemClickListener;
import com.android.systemui.R;
import com.android.systemui.qs.QSDetailClipper;
import com.android.systemui.qs.QSTile;
@@ -43,7 +46,9 @@
* This adds itself to the status bar window, so it can appear on top of quick settings and
* *someday* do fancy animations to get into/out of it.
*/
-public class QSCustomizer extends LinearLayout implements OnClickListener {
+public class QSCustomizer extends LinearLayout implements OnMenuItemClickListener {
+
+ private static final int MENU_RESET = Menu.FIRST;
private final QSDetailClipper mClipper;
@@ -53,9 +58,7 @@
private QSTileHost mHost;
private RecyclerView mRecyclerView;
private TileAdapter mTileAdapter;
- private View mClose;
- private View mSave;
- private View mReset;
+ private Toolbar mToolbar;
public QSCustomizer(Context context, AttributeSet attrs) {
super(new ContextThemeWrapper(context, android.R.style.Theme_Material), attrs);
@@ -70,17 +73,26 @@
@Override
protected void onFinishInflate() {
super.onFinishInflate();
- mClose = findViewById(R.id.close);
- mSave = findViewById(R.id.save);
- mReset = findViewById(R.id.reset);
- mClose.setOnClickListener(this);
- mSave.setOnClickListener(this);
- mReset.setOnClickListener(this);
+ mToolbar = (Toolbar) findViewById(com.android.internal.R.id.action_bar);
+ TypedValue value = new TypedValue();
+ mContext.getTheme().resolveAttribute(android.R.attr.homeAsUpIndicator, value, true);
+ mToolbar.setNavigationIcon(
+ getResources().getDrawable(R.drawable.ic_close_white, mContext.getTheme()));
+ mToolbar.setNavigationOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ save();
+ hide((int) v.getX() + v.getWidth() / 2, (int) v.getY() + v.getHeight() / 2);
+ }
+ });
+ mToolbar.setOnMenuItemClickListener(this);
+ mToolbar.getMenu().add(Menu.NONE, MENU_RESET, 0,
+ mContext.getString(com.android.internal.R.string.reset));
mRecyclerView = (RecyclerView) findViewById(android.R.id.list);
mTileAdapter = new TileAdapter(getContext());
mRecyclerView.setAdapter(mTileAdapter);
- new ItemTouchHelper(mTileAdapter.getCallback()).attachToRecyclerView(mRecyclerView);
+ mTileAdapter.getItemTouchHelper().attachToRecyclerView(mRecyclerView);
GridLayoutManager layout = new GridLayoutManager(getContext(), 3);
layout.setSpanSizeLookup(mTileAdapter.getSizeLookup());
mRecyclerView.setLayoutManager(layout);
@@ -111,6 +123,16 @@
return isShown;
}
+ @Override
+ public boolean onMenuItemClick(MenuItem item) {
+ switch (item.getItemId()) {
+ case MENU_RESET:
+ reset();
+ break;
+ }
+ return false;
+ }
+
private void reset() {
ArrayList<String> tiles = new ArrayList<>();
String defTiles = mContext.getString(R.string.quick_settings_tiles_default);
@@ -130,19 +152,6 @@
private void save() {
mTileAdapter.saveSpecs(mHost);
- hide((int) mSave.getX() + mSave.getWidth() / 2, (int) mSave.getY() + mSave.getHeight() / 2);
- }
-
- @Override
- public void onClick(View v) {
- if (v == mClose) {
- hide((int) mClose.getX() + mClose.getWidth() / 2,
- (int) mClose.getY() + mClose.getHeight() / 2);
- } else if (v == mSave) {
- save();
- } else if (v == mReset) {
- reset();
- }
}
private final AnimatorListener mCollapseAnimationListener = new AnimatorListenerAdapter() {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
index fb3818c..876f417 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileAdapter.java
@@ -24,9 +24,10 @@
import android.support.v7.widget.RecyclerView.State;
import android.support.v7.widget.RecyclerView.ViewHolder;
import android.support.v7.widget.helper.ItemTouchHelper;
-import android.support.v7.widget.helper.ItemTouchHelper.Callback;
import android.view.LayoutInflater;
+import android.view.MotionEvent;
import android.view.View;
+import android.view.View.OnTouchListener;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.android.systemui.R;
@@ -52,6 +53,7 @@
private final Context mContext;
private final List<TileInfo> mTiles = new ArrayList<>();
+ private final ItemTouchHelper mItemTouchHelper;
private int mDividerIndex;
private List<String> mCurrentSpecs;
private List<TileInfo> mOtherTiles;
@@ -61,6 +63,7 @@
public TileAdapter(Context context) {
mContext = context;
+ mItemTouchHelper = new ItemTouchHelper(mCallbacks);
setHasStableIds(true);
}
@@ -69,8 +72,8 @@
return mTiles.get(position) != null ? mAllTiles.indexOf(mTiles.get(position)) : -1;
}
- public Callback getCallback() {
- return mCallbacks;
+ public ItemTouchHelper getItemTouchHelper() {
+ return mItemTouchHelper;
}
public ItemDecoration getItemDecoration() {
@@ -148,11 +151,18 @@
}
@Override
- public void onBindViewHolder(Holder holder, int position) {
+ public void onBindViewHolder(final Holder holder, int position) {
if (holder.getItemViewType() == TYPE_EDIT) return;
TileInfo info = mTiles.get(position);
holder.mTileView.onStateChanged(info.state);
+ holder.mTileView.setOnTouchListener(new OnTouchListener() {
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ mItemTouchHelper.startDrag(holder);
+ return true;
+ }
+ });
}
public SpanSizeLookup getSizeLookup() {
@@ -266,9 +276,7 @@
int from = viewHolder.getAdapterPosition();
int to = target.getAdapterPosition();
if (to > mDividerIndex) {
- if (from < mDividerIndex) {
- to = mDividerIndex;
- } else {
+ if (from >= mDividerIndex) {
return false;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
index 45f2d75..c3610d9 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/TileQueryHelper.java
@@ -16,6 +16,7 @@
package com.android.systemui.qs.customize;
+import android.Manifest.permission;
import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Context;
@@ -132,6 +133,9 @@
ComponentName componentName = new ComponentName(packageName, info.serviceInfo.name);
String spec = CustomTile.toSpec(componentName);
Drawable icon = info.serviceInfo.loadIcon(pm);
+ if (!permission.BIND_QUICK_SETTINGS_TILE.equals(info.serviceInfo.permission)) {
+ continue;
+ }
if (icon != null) {
icon.mutate();
icon.setTint(mContext.getColor(android.R.color.white));
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BatteryTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BatteryTile.java
index 6c1345e..39d1447 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BatteryTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BatteryTile.java
@@ -115,6 +115,12 @@
public Drawable getDrawable(Context context) {
return mDrawable;
}
+
+ @Override
+ public int getPadding() {
+ return mHost.getContext().getResources().getDimensionPixelSize(
+ R.dimen.qs_battery_padding);
+ }
};
state.label = percentage;
}
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 8b4474f..4b29c29 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
@@ -998,20 +998,4 @@
e.printStackTrace();
}
}
-
- public void focusPinnedStack() {
- try {
- mIam.setFocusedStack(PINNED_STACK_ID);
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- }
-
- public void focusHomeStack() {
- try {
- mIam.setFocusedStack(HOME_STACK_ID);
- } catch (RemoteException e) {
- e.printStackTrace();
- }
- }
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java b/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java
index e86b92d..72b1cab 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/misc/Utilities.java
@@ -196,7 +196,7 @@
* are not called.
*/
public static void cancelAnimationWithoutCallbacks(Animator animator) {
- if (animator != null) {
+ if (animator != null && animator.isStarted()) {
removeAnimationListenersRecursive(animator);
animator.cancel();
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvActivity.java b/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvActivity.java
index f3201d0..9450287 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/tv/RecentsTvActivity.java
@@ -18,6 +18,7 @@
import android.app.Activity;
import android.app.ActivityOptions;
import android.content.Intent;
+import android.graphics.Rect;
import android.os.Bundle;
import android.os.UserHandle;
import android.util.Log;
@@ -25,6 +26,7 @@
import android.view.View;
import android.view.ViewTreeObserver.OnPreDrawListener;
import android.view.WindowManager;
+import android.widget.FrameLayout.LayoutParams;
import com.android.systemui.R;
import com.android.systemui.recents.Recents;
@@ -58,6 +60,7 @@
import com.android.systemui.tv.pip.PipManager;
import java.util.ArrayList;
+
/**
* The main TV recents activity started by the RecentsImpl.
*/
@@ -73,9 +76,28 @@
private boolean mIgnoreAltTabRelease;
private RecentsTvView mRecentsView;
+ private View mPipView;
+ private View mPipShadeView;
private TaskStackHorizontalViewAdapter mTaskStackViewAdapter;
private FinishRecentsRunnable mFinishLaunchHomeRunnable;
+ private PipManager mPipManager;
+ private PipManager.Listener mPipListener = new PipManager.Listener() {
+ @Override
+ public void onPipActivityClosed() {
+ mPipView.setVisibility(View.GONE);
+ mPipShadeView.setVisibility(View.GONE);
+ }
+
+ @Override
+ public void onShowPipMenu() { }
+
+ @Override
+ public void onMoveToFullscreen() { }
+
+ @Override
+ public void onPipResizeAboutToStart() { }
+ };
/**
* A common Runnable to finish Recents by launching Home with an animation depending on the
@@ -212,6 +234,7 @@
finish();
return;
}
+ mPipManager = PipManager.getInstance();
// Register this activity with the event bus
EventBus.getDefault().register(this, EVENT_BUS_PRIORITY);
@@ -226,7 +249,8 @@
mRecentsView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
-
+ mPipView = findViewById(R.id.pip);
+ mPipShadeView = findViewById(R.id.pip_shade);
getWindow().getAttributes().privateFlags |=
WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY;
@@ -265,6 +289,38 @@
// Notify that recents is now visible
SystemServicesProxy ssp = Recents.getSystemServices();
EventBus.getDefault().send(new RecentsVisibilityChangedEvent(this, ssp, true));
+
+ if (mPipManager.isPipShown()) {
+ // Place mPipView at the PIP bounds for fine tuned focus handling.
+ Rect pipBounds = mPipManager.getPipBounds();
+ LayoutParams lp = (LayoutParams) mPipView.getLayoutParams();
+ lp.width = pipBounds.width();
+ lp.height = pipBounds.height();
+ lp.leftMargin = pipBounds.left;
+ lp.topMargin = pipBounds.top;
+ mPipView.setLayoutParams(lp);
+
+ mPipView.setVisibility(View.VISIBLE);
+ mPipView.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ mPipManager.resizePinnedStack(PipManager.STATE_PIP_MENU);
+ }
+ });
+ mPipView.setOnFocusChangeListener(new View.OnFocusChangeListener() {
+ @Override
+ public void onFocusChange(View v, boolean hasFocus) {
+ mPipManager.onPipViewFocusChangedInRecents(hasFocus);
+ mPipShadeView.setVisibility(hasFocus ? View.VISIBLE : View.INVISIBLE);
+ }
+ });
+ mPipManager.addListener(mPipListener);
+ } else {
+ mPipView.setVisibility(View.GONE);
+ }
+ mPipManager.onRecentsStarted();
+ // Give focus to the recents row whenever its visible to an user.
+ mRecentsView.requestFocus();
}
@Override
@@ -277,6 +333,8 @@
protected void onStop() {
super.onStop();
+ mPipManager.onRecentsStopped();
+ mPipManager.removeListener(mPipListener);
mIgnoreAltTabRelease = false;
// Notify that recents is now hidden
SystemServicesProxy ssp = Recents.getSystemServices();
@@ -316,18 +374,6 @@
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
switch (keyCode) {
- case KeyEvent.KEYCODE_DPAD_UP: {
- SystemServicesProxy ssp = Recents.getSystemServices();
- PipManager.getInstance().resizePinnedStack(PipManager.STATE_PIP_MENU);
- ssp.focusPinnedStack();
- return true;
- }
- case KeyEvent.KEYCODE_DPAD_DOWN: {
- SystemServicesProxy ssp = Recents.getSystemServices();
- PipManager.getInstance().resizePinnedStack(PipManager.STATE_PIP_OVERLAY);
- ssp.focusHomeStack();
- return true;
- }
case KeyEvent.KEYCODE_DEL:
case KeyEvent.KEYCODE_FORWARD_DEL: {
EventBus.getDefault().send(new DismissFocusedTaskViewEvent());
diff --git a/packages/SystemUI/src/com/android/systemui/recents/tv/views/RecentsTvView.java b/packages/SystemUI/src/com/android/systemui/recents/tv/views/RecentsTvView.java
index b175855..8e768a2 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/tv/views/RecentsTvView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/tv/views/RecentsTvView.java
@@ -200,19 +200,6 @@
EventBus.getDefault().unregister(this);
}
- /**
- * This is called with the full size of the window since we are handling our own insets.
- */
- @Override
- protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
- if (mTaskStackHorizontalView != null && mTaskStackHorizontalView.getVisibility() != GONE) {
- mTaskStackHorizontalView.layout(left, top, left + getMeasuredWidth(), top + getMeasuredHeight());
- }
-
- // Layout the empty view
- mEmptyView.layout(left, top, right, bottom);
- }
-
@Override
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
mSystemInsets.set(insets.getSystemWindowInsets());
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
index 88bebdb..261b6f6 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
@@ -16,20 +16,15 @@
package com.android.systemui.recents.views;
-import android.animation.Animator;
-import android.animation.AnimatorListenerAdapter;
-import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Path;
import android.graphics.Rect;
-import android.util.ArrayMap;
import android.util.ArraySet;
-import android.util.FloatProperty;
-import android.util.Property;
+import android.util.SparseArray;
+import android.util.SparseIntArray;
import android.view.ViewDebug;
-import com.android.systemui.Interpolators;
import com.android.systemui.R;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.RecentsActivityLaunchState;
@@ -105,41 +100,20 @@
*/
public class TaskStackLayoutAlgorithm {
- // The scale factor to apply to the user movement in the stack to unfocus it
- private static final float UNFOCUS_MULTIPLIER = 0.8f;
-
// The distribution of view bounds alpha
// XXX: This is a hack because you can currently set the max alpha to be > 1f
public static final float OUTLINE_ALPHA_MIN_VALUE = 0f;
public static final float OUTLINE_ALPHA_MAX_VALUE = 2f;
- // The distribution of dim to apply to tasks in the stack
- private static final float DIM_MAX_VALUE = 0.35f;
- private static final Path UNFOCUSED_DIM_PATH = new Path();
- private static final Path FOCUSED_DIM_PATH = new Path();
- static {
- // The unfocused dim interpolator peaks to 1 at 0.5 (the focused task), then slowly drops
- // back to 0.5 at the front of the stack
- UNFOCUSED_DIM_PATH.moveTo(0f, 0f);
- UNFOCUSED_DIM_PATH.cubicTo(0f, 0.1f, 0.4f, 0.8f, 0.5f, 1f);
- UNFOCUSED_DIM_PATH.cubicTo(0.6f, 1f, 0.9f, 0.6f, 1f, 0.5f);
- // The focused dim interpolator peaks to 1 at 0.5 (the focused task), then drops back to 0
- // at the front of the stack
- FOCUSED_DIM_PATH.moveTo(0f, 0f);
- FOCUSED_DIM_PATH.cubicTo(0.1f, 0f, 0.4f, 1f, 0.5f, 1f);
- FOCUSED_DIM_PATH.cubicTo(0.6f, 1f, 0.9f, 0f, 1f, 0f);
- }
- private static final FreePathInterpolator UNFOCUSED_DIM_INTERPOLATOR =
- new FreePathInterpolator(UNFOCUSED_DIM_PATH);
- private static final FreePathInterpolator FOCUSED_DIM_INTERPOLATOR =
- new FreePathInterpolator(FOCUSED_DIM_PATH);
+ // The maximum dim on the tasks
+ private static final float MAX_DIM = 0.25f;
// The various focus states
- public static final float STATE_FOCUSED = 1f;
- public static final float STATE_UNFOCUSED = 0f;
+ public static final int STATE_FOCUSED = 1;
+ public static final int STATE_UNFOCUSED = 0;
public interface TaskStackLayoutAlgorithmCallbacks {
- void onFocusStateChanged(float prevFocusState, float curFocusState);
+ void onFocusStateChanged(int prevFocusState, int curFocusState);
}
/**
@@ -209,24 +183,6 @@
}
}
- /**
- * A Property wrapper around the <code>focusState</code> functionality handled by the
- * {@link TaskStackLayoutAlgorithm#setFocusState(float)} and
- * {@link TaskStackLayoutAlgorithm#getFocusState()} methods.
- */
- private static final Property<TaskStackLayoutAlgorithm, Float> FOCUS_STATE =
- new FloatProperty<TaskStackLayoutAlgorithm>("focusState") {
- @Override
- public void setValue(TaskStackLayoutAlgorithm object, float value) {
- object.setFocusState(value);
- }
-
- @Override
- public Float get(TaskStackLayoutAlgorithm object) {
- return object.getFocusState();
- }
- };
-
// A report of the visibility state of the stack
public class VisibilityReport {
public int numVisibleTasks;
@@ -286,13 +242,17 @@
private FreePathInterpolator mUnfocusedCurveInterpolator;
private FreePathInterpolator mFocusedCurveInterpolator;
+ // The paths defining the distribution of the dim to apply to tasks in the stack when focused
+ // and unfocused
+ private Path mUnfocusedDimCurve;
+ private Path mFocusedDimCurve;
+ private FreePathInterpolator mUnfocusedDimCurveInterpolator;
+ private FreePathInterpolator mFocusedDimCurveInterpolator;
+
// The state of the stack focus (0..1), which controls the transition of the stack from the
// focused to non-focused state
@ViewDebug.ExportedProperty(category="recents")
- private float mFocusState;
-
- // The animator used to reset the focused state
- private ObjectAnimator mFocusStateAnimator;
+ private int mFocusState;
// The smallest scroll progress, at this value, the back most task will be visible
@ViewDebug.ExportedProperty(category="recents")
@@ -321,7 +281,8 @@
int mMaxTranslationZ;
// Optimization, allows for quick lookup of task -> index
- private ArrayMap<Task.TaskKey, Integer> mTaskIndexMap = new ArrayMap<>();
+ private SparseIntArray mTaskIndexMap = new SparseIntArray();
+ private SparseArray<Float> mTaskIndexOverrideMap = new SparseArray<>();
// The freeform workspace layout
FreeformWorkspaceLayoutAlgorithm mFreeformLayoutAlgorithm;
@@ -354,6 +315,7 @@
* Resets this layout when the stack view is reset.
*/
public void reset() {
+ mTaskIndexOverrideMap.clear();
setFocusState(getDefaultFocusState());
}
@@ -367,8 +329,8 @@
/**
* Sets the focused state.
*/
- public void setFocusState(float focusState) {
- float prevFocusState = mFocusState;
+ public void setFocusState(int focusState) {
+ int prevFocusState = mFocusState;
mFocusState = focusState;
updateFrontBackTransforms();
if (mCb != null) {
@@ -379,7 +341,7 @@
/**
* Gets the focused state.
*/
- public float getFocusState() {
+ public int getFocusState() {
return mFocusState;
}
@@ -424,6 +386,11 @@
mUnfocusedCurveInterpolator = new FreePathInterpolator(mUnfocusedCurve);
mFocusedCurve = constructFocusedCurve();
mFocusedCurveInterpolator = new FreePathInterpolator(mFocusedCurve);
+ mUnfocusedDimCurve = constructUnfocusedDimCurve();
+ mUnfocusedDimCurveInterpolator = new FreePathInterpolator(mUnfocusedDimCurve);
+ mFocusedDimCurve = constructFocusedDimCurve();
+ mFocusedDimCurveInterpolator = new FreePathInterpolator(mFocusedDimCurve);
+
updateFrontBackTransforms();
}
@@ -469,7 +436,7 @@
int taskCount = stackTasks.size();
for (int i = 0; i < taskCount; i++) {
Task task = stackTasks.get(i);
- mTaskIndexMap.put(task.key, i);
+ mTaskIndexMap.put(task.key.id, i);
}
// Calculate the min/max scroll
@@ -516,35 +483,56 @@
}
/**
- * Updates this stack when a scroll happens.
+ * Adds and override task progress for the given task when transitioning from focused to
+ * unfocused state.
*/
- public void updateFocusStateOnScroll(int yMovement) {
- Utilities.cancelAnimationWithoutCallbacks(mFocusStateAnimator);
- if (mFocusState > STATE_UNFOCUSED) {
- float delta = (float) yMovement / (UNFOCUS_MULTIPLIER * mStackRect.height());
- setFocusState(mFocusState - Math.min(mFocusState, Math.abs(delta)));
+ public void addUnfocusedTaskOverride(Task task, float stackScroll) {
+ if (mFocusState != STATE_UNFOCUSED) {
+ mFocusedRange.offset(stackScroll);
+ mUnfocusedRange.offset(stackScroll);
+ float focusedRangeX = mFocusedRange.getNormalizedX(mTaskIndexMap.get(task.key.id));
+ float focusedY = mFocusedCurveInterpolator.getInterpolation(focusedRangeX);
+ float unfocusedRangeX = mUnfocusedCurveInterpolator.getX(focusedY);
+ float unfocusedTaskProgress = stackScroll + mUnfocusedRange.getAbsoluteX(unfocusedRangeX);
+ if (Float.compare(focusedRangeX, unfocusedRangeX) != 0) {
+ mTaskIndexOverrideMap.put(task.key.id, unfocusedTaskProgress);
+ }
}
}
/**
- * Aniamtes the focused state back to its orginal state.
+ * Updates this stack when a scroll happens.
*/
- public void animateFocusState(float newState) {
- Utilities.cancelAnimationWithoutCallbacks(mFocusStateAnimator);
- if (Float.compare(newState, getFocusState()) != 0) {
- mFocusStateAnimator = ObjectAnimator.ofFloat(this, FOCUS_STATE, getFocusState(),
- newState);
- mFocusStateAnimator.setDuration(mContext.getResources().getInteger(
- R.integer.recents_animate_task_stack_scroll_duration));
- mFocusStateAnimator.setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN);
- mFocusStateAnimator.start();
+ public void updateFocusStateOnScroll(float stackScroll, float deltaScroll) {
+ for (int i = mTaskIndexOverrideMap.size() - 1; i >= 0; i--) {
+ int taskId = mTaskIndexOverrideMap.keyAt(i);
+ float x = mTaskIndexMap.get(taskId);
+ float overrideX = mTaskIndexOverrideMap.get(taskId, 0f);
+ float newOverrideX = overrideX + deltaScroll;
+ mUnfocusedRange.offset(stackScroll);
+ boolean outOfBounds = mUnfocusedRange.getNormalizedX(newOverrideX) < 0f ||
+ mUnfocusedRange.getNormalizedX(newOverrideX) > 1f;
+ if (outOfBounds || (overrideX >= x && x >= newOverrideX) ||
+ (overrideX <= x && x <= newOverrideX)) {
+ // Remove the override once we reach the original task index
+ mTaskIndexOverrideMap.removeAt(i);
+ } else if ((overrideX >= x && deltaScroll <= 0f) ||
+ (overrideX <= x && deltaScroll >= 0f)) {
+ // Scrolling from override x towards x, then lock the task in place
+ mTaskIndexOverrideMap.put(taskId, newOverrideX);
+ } else {
+ // Scrolling override x away from x, we should still move the scroll towards x
+ float deltaX = overrideX - x;
+ newOverrideX = Math.signum(deltaX) * (Math.abs(deltaX) - deltaScroll);
+ mTaskIndexOverrideMap.put(taskId, x + newOverrideX);
+ }
}
}
/**
* Returns the default focus state.
*/
- public float getDefaultFocusState() {
+ public int getDefaultFocusState() {
return STATE_FOCUSED;
}
@@ -650,18 +638,19 @@
false /* forceUpdate */);
}
- public TaskViewTransform getStackTransform(Task task, float stackScroll, float focusState,
+ public TaskViewTransform getStackTransform(Task task, float stackScroll, int focusState,
TaskViewTransform transformOut, TaskViewTransform frontTransform, boolean forceUpdate) {
if (mFreeformLayoutAlgorithm.isTransformAvailable(task, this)) {
mFreeformLayoutAlgorithm.getTransform(task, transformOut, this);
return transformOut;
} else {
// Return early if we have an invalid index
- if (task == null || !mTaskIndexMap.containsKey(task.key)) {
+ if (task == null || mTaskIndexMap.get(task.key.id, -1) == -1) {
transformOut.reset();
return transformOut;
}
- getStackTransform(mTaskIndexMap.get(task.key), stackScroll, focusState, transformOut,
+ float taskProgress = getStackScrollForTask(task);
+ getStackTransform(taskProgress, stackScroll, focusState, transformOut,
frontTransform, false /* ignoreSingleTaskCase */, forceUpdate);
return transformOut;
}
@@ -687,7 +676,7 @@
* internally to ensure that we can calculate the transform for any
* position in the stack.
*/
- public void getStackTransform(float taskProgress, float stackScroll, float focusState,
+ public void getStackTransform(float taskProgress, float stackScroll, int focusState,
TaskViewTransform transformOut, TaskViewTransform frontTransform,
boolean ignoreSingleTaskCase, boolean forceUpdate) {
SystemServicesProxy ssp = Recents.getSystemServices();
@@ -734,16 +723,16 @@
unfocusedRangeX)) * mStackRect.height());
int focusedY = (int) ((1f - mFocusedCurveInterpolator.getInterpolation(
focusedRangeX)) * mStackRect.height());
- float unfocusedDim = 1f - UNFOCUSED_DIM_INTERPOLATOR.getInterpolation(
+ float unfocusedDim = mUnfocusedDimCurveInterpolator.getInterpolation(
boundedScrollUnfocusedRangeX);
- float focusedDim = 1f - FOCUSED_DIM_INTERPOLATOR.getInterpolation(
+ float focusedDim = mFocusedDimCurveInterpolator.getInterpolation(
boundedScrollFocusedRangeX);
y = (mStackRect.top - mTaskRect.top) +
(int) Utilities.mapRange(focusState, unfocusedY, focusedY);
z = Utilities.mapRange(Utilities.clamp01(boundedScrollUnfocusedRangeX),
mMinTranslationZ, mMaxTranslationZ);
- dimAlpha = DIM_MAX_VALUE * Utilities.mapRange(focusState, unfocusedDim, focusedDim);
+ dimAlpha = Utilities.mapRange(focusState, unfocusedDim, focusedDim);
viewOutlineAlpha = Utilities.mapRange(Utilities.clamp01(boundedScrollUnfocusedRangeX),
OUTLINE_ALPHA_MIN_VALUE, OUTLINE_ALPHA_MAX_VALUE);
}
@@ -773,8 +762,7 @@
* stack.
*/
float getStackScrollForTask(Task t) {
- if (!mTaskIndexMap.containsKey(t.key)) return 0f;
- return mTaskIndexMap.get(t.key);
+ return mTaskIndexOverrideMap.get(t.key.id, (float) mTaskIndexMap.get(t.key.id, 0));
}
/**
@@ -842,6 +830,34 @@
}
/**
+ * Creates a new path for the focused dim curve.
+ */
+ private Path constructFocusedDimCurve() {
+ Path p = new Path();
+ // The focused dim interpolator starts at max dim, reduces to zero at 0.5 (the focused
+ // task), then goes back to max dim at the next task
+ p.moveTo(0f, MAX_DIM);
+ p.lineTo(0.5f, 0f);
+ p.lineTo(0.5f + (0.5f / mFocusedRange.relativeMax), MAX_DIM);
+ p.lineTo(1f, MAX_DIM);
+ return p;
+ }
+
+ /**
+ * Creates a new path for the unfocused dim curve.
+ */
+ private Path constructUnfocusedDimCurve() {
+ Path p = new Path();
+ // The unfocused dim interpolator starts at max dim, reduces to zero at 0.5 (the focused
+ // task), then goes back to max dim towards the front of the stack
+ p.moveTo(0f, MAX_DIM);
+ p.cubicTo(0f, 0.1f, 0.4f, 0f, 0.5f, 0f);
+ p.cubicTo(0.6f, 0f, 0.9f, MAX_DIM - 0.1f, 1f, MAX_DIM / 2f);
+ return p;
+ }
+
+
+ /**
* Updates the current transforms that would put a TaskView at the front and back of the stack.
*/
private void updateFrontBackTransforms() {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
index 1707c4f..d71d70f 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -35,6 +35,7 @@
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.MutableBoolean;
+import android.util.SparseBooleanArray;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
@@ -163,12 +164,11 @@
@ViewDebug.ExportedProperty(category="recents")
private Rect mStackBounds = new Rect();
- @ViewDebug.ExportedProperty(category="recents")
- private int[] mTmpVisibleRange = new int[2];
private Rect mTmpRect = new Rect();
private ArrayMap<Task.TaskKey, TaskView> mTmpTaskViewMap = new ArrayMap<>();
private List<TaskView> mTmpTaskViews = new ArrayList<>();
private TaskViewTransform mTmpTransform = new TaskViewTransform();
+ private int[] mTmpIntPair = new int[2];
// A convenience update listener to request updating clipping of tasks
private ValueAnimator.AnimatorUpdateListener mRequestUpdateClippingListener =
@@ -405,15 +405,17 @@
* target stack scrolls will be returned.
* @param ignoreTasksSet The set of tasks to skip for purposes of calculaing the visible range.
* Transforms will still be calculated for the ignore tasks.
+ * @return the front and back most visible task indices (there may be non visible tasks in
+ * between this range)
*/
- boolean computeVisibleTaskTransforms(ArrayList<TaskViewTransform> taskTransforms,
+ int[] computeVisibleTaskTransforms(ArrayList<TaskViewTransform> taskTransforms,
ArrayList<Task> tasks, float curStackScroll, float targetStackScroll,
- int[] visibleRangeOut, ArraySet<Task.TaskKey> ignoreTasksSet) {
+ ArraySet<Task.TaskKey> ignoreTasksSet) {
int taskCount = tasks.size();
- int frontMostVisibleIndex = -1;
- int backMostVisibleIndex = -1;
+ int[] visibleTaskRange = mTmpIntPair;
+ visibleTaskRange[0] = -1;
+ visibleTaskRange[1] = -1;
boolean useTargetStackScroll = Float.compare(curStackScroll, targetStackScroll) != 0;
- boolean targetScrollIsInFront = targetStackScroll > curStackScroll;
// We can reuse the task transforms where possible to reduce object allocation
Utilities.matchTaskListSize(tasks, taskTransforms);
@@ -452,31 +454,16 @@
continue;
}
- if (transform.visible) {
- if (frontMostVisibleIndex < 0) {
- frontMostVisibleIndex = i;
- }
- backMostVisibleIndex = i;
- } else if (!targetScrollIsInFront) {
- if (backMostVisibleIndex != -1) {
- // We've reached the end of the visible range, so going down the rest of the
- // stack, we can just reset the transforms accordingly
- while (i >= 0) {
- taskTransforms.get(i).reset();
- i--;
- }
- break;
- }
- }
-
frontTransform = transform;
frontTransformAtTarget = transformAtTarget;
+ if (transform.visible) {
+ if (visibleTaskRange[0] < 0) {
+ visibleTaskRange[0] = i;
+ }
+ visibleTaskRange[1] = i;
+ }
}
- if (visibleRangeOut != null) {
- visibleRangeOut[0] = frontMostVisibleIndex;
- visibleRangeOut[1] = backMostVisibleIndex;
- }
- return frontMostVisibleIndex != -1 && backMostVisibleIndex != -1;
+ return visibleTaskRange;
}
/**
@@ -502,13 +489,10 @@
* {@link TaskView}s
*/
void bindVisibleTaskViews(float targetStackScroll, ArraySet<Task.TaskKey> ignoreTasksSet) {
- final int[] visibleStackRange = mTmpVisibleRange;
-
// Get all the task transforms
- final ArrayList<Task> tasks = mStack.getStackTasks();
- final boolean isValidVisibleRange = computeVisibleTaskTransforms(mCurrentTaskTransforms,
- tasks, mStackScroller.getStackScroll(), targetStackScroll, visibleStackRange,
- ignoreTasksSet);
+ ArrayList<Task> tasks = mStack.getStackTasks();
+ int[] visibleTaskRange = computeVisibleTaskTransforms(mCurrentTaskTransforms, tasks,
+ mStackScroller.getStackScroll(), targetStackScroll, ignoreTasksSet);
// Return all the invisible children to the pool
mTmpTaskViewMap.clear();
@@ -519,14 +503,14 @@
TaskView tv = taskViews.get(i);
Task task = tv.getTask();
int taskIndex = mStack.indexOfStackTask(task);
+ TaskViewTransform transform = mCurrentTaskTransforms.get(taskIndex);
// Skip ignored tasks
if (ignoreTasksSet.contains(task.key)) {
continue;
}
- if (task.isFreeformTask() ||
- visibleStackRange[1] <= taskIndex && taskIndex <= visibleStackRange[0]) {
+ if (task.isFreeformTask() || transform.visible) {
mTmpTaskViewMap.put(task.key, tv);
} else {
if (mTouchExplorationEnabled) {
@@ -538,8 +522,7 @@
}
// Pick up all the newly visible children
- int lastVisStackIndex = isValidVisibleRange ? visibleStackRange[1] : 0;
- for (int i = tasks.size() - 1; i >= lastVisStackIndex; i--) {
+ for (int i = tasks.size() - 1; i >= 0; i--) {
Task task = tasks.get(i);
TaskViewTransform transform = mCurrentTaskTransforms.get(i);
@@ -584,11 +567,11 @@
// Update the focus if the previous focused task was returned to the view pool
if (lastFocusedTaskIndex != -1) {
- if (lastFocusedTaskIndex < visibleStackRange[1]) {
- setFocusedTask(visibleStackRange[1], false /* scrollToTask */,
+ if (lastFocusedTaskIndex < visibleTaskRange[1]) {
+ setFocusedTask(visibleTaskRange[1], false /* scrollToTask */,
true /* requestViewFocus */);
} else {
- setFocusedTask(visibleStackRange[0], false /* scrollToTask */,
+ setFocusedTask(visibleTaskRange[0], false /* scrollToTask */,
true /* requestViewFocus */);
}
}
@@ -665,7 +648,7 @@
public void getCurrentTaskTransforms(ArrayList<Task> tasks,
ArrayList<TaskViewTransform> transformsOut) {
Utilities.matchTaskListSize(tasks, transformsOut);
- float focusState = mLayoutAlgorithm.getFocusState();
+ int focusState = mLayoutAlgorithm.getFocusState();
for (int i = tasks.size() - 1; i >= 0; i--) {
Task task = tasks.get(i);
TaskViewTransform transform = transformsOut.get(i);
@@ -684,7 +667,7 @@
* Returns the task transforms for all the tasks in the stack if the stack was at the given
* {@param stackScroll} and {@param focusState}.
*/
- public void getLayoutTaskTransforms(float stackScroll, float focusState, ArrayList<Task> tasks,
+ public void getLayoutTaskTransforms(float stackScroll, int focusState, ArrayList<Task> tasks,
ArrayList<TaskViewTransform> transformsOut) {
Utilities.matchTaskListSize(tasks, transformsOut);
for (int i = tasks.size() - 1; i >= 0; i--) {
@@ -1055,7 +1038,7 @@
protected Parcelable onSaveInstanceState() {
Bundle savedState = new Bundle();
savedState.putParcelable(KEY_SAVED_STATE_SUPER, super.onSaveInstanceState());
- savedState.putFloat(KEY_SAVED_STATE_LAYOUT_FOCUSED_STATE, mLayoutAlgorithm.getFocusState());
+ savedState.putInt(KEY_SAVED_STATE_LAYOUT_FOCUSED_STATE, mLayoutAlgorithm.getFocusState());
savedState.putFloat(KEY_SAVED_STATE_LAYOUT_STACK_SCROLL, mStackScroller.getStackScroll());
return super.onSaveInstanceState();
}
@@ -1065,7 +1048,7 @@
Bundle savedState = (Bundle) state;
super.onRestoreInstanceState(savedState.getParcelable(KEY_SAVED_STATE_SUPER));
- mLayoutAlgorithm.setFocusState(savedState.getFloat(KEY_SAVED_STATE_LAYOUT_FOCUSED_STATE));
+ mLayoutAlgorithm.setFocusState(savedState.getInt(KEY_SAVED_STATE_LAYOUT_FOCUSED_STATE));
mStackScroller.setStackScroll(savedState.getFloat(KEY_SAVED_STATE_LAYOUT_STACK_SCROLL));
}
@@ -1517,7 +1500,7 @@
/**** TaskStackLayoutAlgorithm.TaskStackLayoutAlgorithmCallbacks ****/
@Override
- public void onFocusStateChanged(float prevFocusState, float curFocusState) {
+ public void onFocusStateChanged(int prevFocusState, int curFocusState) {
if (mDeferredTaskViewLayoutAnimation == null) {
mUIDozeTrigger.poke();
relayoutTaskViewsOnNextFrame(AnimationProps.IMMEDIATE);
@@ -1532,6 +1515,7 @@
if (animation != null) {
relayoutTaskViewsOnNextFrame(animation);
}
+ mLayoutAlgorithm.updateFocusStateOnScroll(curScroll, curScroll - prevScroll);
if (mEnterAnimationComplete) {
if (shouldShowHistoryButton() &&
@@ -1636,11 +1620,19 @@
}
public final void onBusEvent(FocusNextTaskViewEvent event) {
+ // Stop any scrolling
+ mStackScroller.stopScroller();
+ mStackScroller.stopBoundScrollAnimation();
+
setRelativeFocusedTask(true, false /* stackTasksOnly */, true /* animated */, false,
event.timerIndicatorDuration);
}
public final void onBusEvent(FocusPreviousTaskViewEvent event) {
+ // Stop any scrolling
+ mStackScroller.stopScroller();
+ mStackScroller.stopBoundScrollAnimation();
+
setRelativeFocusedTask(false, false /* stackTasksOnly */, true /* animated */);
}
@@ -1771,10 +1763,6 @@
removeIgnoreTask(event.task);
}
- public final void onBusEvent(StackViewScrolledEvent event) {
- mLayoutAlgorithm.updateFocusStateOnScroll(event.yMovement.value);
- }
-
public final void onBusEvent(IterateRecentsEvent event) {
if (!mEnterAnimationComplete) {
// Cancel the previous task's window transition before animating the focused state
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
index 3f0630d..20933ee 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
@@ -223,6 +223,13 @@
int xDiff = Math.abs(x - mDownX);
if (Math.abs(y - mDownY) > mScrollTouchSlop && yDiff > xDiff) {
mIsScrolling = true;
+ float stackScroll = mScroller.getStackScroll();
+ List<TaskView> taskViews = mSv.getTaskViews();
+ for (int i = taskViews.size() - 1; i >= 0; i--) {
+ layoutAlgorithm.addUnfocusedTaskOverride(taskViews.get(i).getTask(),
+ stackScroll);
+ }
+ layoutAlgorithm.setFocusState(TaskStackLayoutAlgorithm.STATE_UNFOCUSED);
// Disallow parents from intercepting touch events
final ViewParent parent = mSv.getParent();
@@ -429,8 +436,7 @@
// Otherwise, offset the scroll by the movement of the anchor task
float anchorTaskScroll = layoutAlgorithm.getStackScrollForTask(anchorTask);
float stackScrollOffset = (anchorTaskScroll - prevAnchorTaskScroll);
- if (layoutAlgorithm.getFocusState() !=
- TaskStackLayoutAlgorithm.STATE_FOCUSED) {
+ if (layoutAlgorithm.getFocusState() != TaskStackLayoutAlgorithm.STATE_FOCUSED) {
// If we are focused, we don't want the front task to move, but otherwise, we
// allow the back task to move up, and the front task to move back
stackScrollOffset /= 2;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
index bb56a52..0543dd5 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
@@ -63,7 +63,7 @@
public class TaskViewHeader extends FrameLayout
implements View.OnClickListener, View.OnLongClickListener {
- private static final float HIGHLIGHT_LIGHTNESS_INCREMENT = 0.125f;
+ private static final float HIGHLIGHT_LIGHTNESS_INCREMENT = 0.075f;
private static final float OVERLAY_LIGHTNESS_INCREMENT = -0.0625f;
private static final int OVERLAY_REVEAL_DURATION = 250;
private static final long FOCUS_INDICATOR_INTERVAL_MS = 30;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java
index 0fec9c3..e46708e 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java
@@ -183,9 +183,9 @@
mat[0] = scale;
mat[6] = scale;
mat[12] = scale;
- mat[4] = mDimAlpha;
- mat[9] = mDimAlpha;
- mat[14] = mDimAlpha;
+ mat[4] = mDimAlpha * 255f;
+ mat[9] = mDimAlpha * 255f;
+ mat[14] = mDimAlpha * 255f;
TMP_FILTER_COLOR_MATRIX.preConcat(TMP_BRIGHTNESS_COLOR_MATRIX);
ColorMatrixColorFilter filter = new ColorMatrixColorFilter(TMP_FILTER_COLOR_MATRIX);
mDrawPaint.setColorFilter(filter);
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
index e6a291c..a06700d 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
@@ -75,9 +75,9 @@
Uri imageUri;
Runnable finisher;
int iconSize;
- int result;
int previewWidth;
int previewheight;
+ int errorMsgResId;
void clearImage() {
image = null;
@@ -94,13 +94,11 @@
*/
class SaveImageInBackgroundTask extends AsyncTask<SaveImageInBackgroundData, Void,
SaveImageInBackgroundData> {
- private static final String TAG = "SaveImageInBackgroundTask";
private static final String SCREENSHOTS_DIR_NAME = "Screenshots";
private static final String SCREENSHOT_FILE_NAME_TEMPLATE = "Screenshot_%s.png";
private static final String SCREENSHOT_SHARE_SUBJECT_TEMPLATE = "Screenshot (%s)";
- private final int mNotificationId;
private final NotificationManager mNotificationManager;
private final Notification.Builder mNotificationBuilder, mPublicNotificationBuilder;
private final File mScreenshotDir;
@@ -119,7 +117,7 @@
private static boolean mTickerAddSpace;
SaveImageInBackgroundTask(Context context, SaveImageInBackgroundData data,
- NotificationManager nManager, int nId) {
+ NotificationManager nManager) {
Resources r = context.getResources();
// Prepare all the output metadata
@@ -166,25 +164,14 @@
// Show the intermediate notification
mTickerAddSpace = !mTickerAddSpace;
- mNotificationId = nId;
mNotificationManager = nManager;
final long now = System.currentTimeMillis();
- mNotificationBuilder = new Notification.Builder(context)
- .setTicker(r.getString(R.string.screenshot_saving_ticker)
- + (mTickerAddSpace ? " " : ""))
- .setContentTitle(r.getString(R.string.screenshot_saving_title))
- .setContentText(r.getString(R.string.screenshot_saving_text))
- .setSmallIcon(R.drawable.stat_notify_image)
- .setWhen(now)
- .setColor(r.getColor(com.android.internal.R.color.system_notification_accent_color));
-
+ // Setup the notification
mNotificationStyle = new Notification.BigPictureStyle()
- .bigPicture(picture.createAshmemBitmap());
- mNotificationBuilder.setStyle(mNotificationStyle);
+ .bigPicture(picture.createAshmemBitmap());
- // For "public" situations we want to show all the same info but
- // omit the actual screenshot image.
+ // The public notification will show similar info but with the actual screenshot omitted
mPublicNotificationBuilder = new Notification.Builder(context)
.setContentTitle(r.getString(R.string.screenshot_saving_title))
.setContentText(r.getString(R.string.screenshot_saving_text))
@@ -194,11 +181,24 @@
.setColor(r.getColor(
com.android.internal.R.color.system_notification_accent_color));
- mNotificationBuilder.setPublicVersion(mPublicNotificationBuilder.build());
+ mNotificationBuilder = new Notification.Builder(context)
+ .setTicker(r.getString(R.string.screenshot_saving_ticker)
+ + (mTickerAddSpace ? " " : ""))
+ .setContentTitle(r.getString(R.string.screenshot_saving_title))
+ .setContentText(r.getString(R.string.screenshot_saving_text))
+ .setSmallIcon(R.drawable.stat_notify_image)
+ .setWhen(now)
+ .setColor(r.getColor(com.android.internal.R.color.system_notification_accent_color))
+ .setStyle(mNotificationStyle)
+ .setPublicVersion(mPublicNotificationBuilder.build());
+ mNotificationBuilder.setFlag(Notification.FLAG_NO_CLEAR, true);
- Notification n = mNotificationBuilder.build();
- n.flags |= Notification.FLAG_NO_CLEAR;
- mNotificationManager.notify(nId, n);
+ mNotificationManager.notify(R.id.notification_screenshot, mNotificationBuilder.build());
+
+ /**
+ * NOTE: The following code prepares the notification builder for updating the notification
+ * after the screenshot has been written to disk.
+ */
// On the tablet, the large icon makes the notification appear as if it is clickable (and
// on small devices, the large icon is not shown) so defer showing the large icon until
@@ -210,11 +210,8 @@
@Override
protected SaveImageInBackgroundData doInBackground(SaveImageInBackgroundData... params) {
- if (params.length != 1) return null;
if (isCancelled()) {
- params[0].clearImage();
- params[0].clearContext();
- return null;
+ return params[0];
}
// By default, AsyncTask sets the worker thread to have background thread priority, so bump
@@ -263,36 +260,37 @@
sharingIntent.putExtra(Intent.EXTRA_SUBJECT, subject);
// Create a share action for the notification
- final PendingIntent callback = PendingIntent.getBroadcast(context, 0,
- new Intent(context, GlobalScreenshot.TargetChosenReceiver.class)
- .putExtra(GlobalScreenshot.CANCEL_ID, mNotificationId),
+ PendingIntent chooseAction = PendingIntent.getBroadcast(context, 0,
+ new Intent(context, GlobalScreenshot.TargetChosenReceiver.class),
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_ONE_SHOT);
Intent chooserIntent = Intent.createChooser(sharingIntent, null,
- callback.getIntentSender());
- chooserIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK
- | Intent.FLAG_ACTIVITY_NEW_TASK);
- mNotificationBuilder.addAction(R.drawable.ic_screenshot_share,
- r.getString(com.android.internal.R.string.share),
- PendingIntent.getActivity(context, 0, chooserIntent,
- PendingIntent.FLAG_CANCEL_CURRENT));
+ chooseAction.getIntentSender())
+ .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
+ PendingIntent shareAction = PendingIntent.getActivity(context, 0, chooserIntent,
+ PendingIntent.FLAG_CANCEL_CURRENT);
+ Notification.Action.Builder shareActionBuilder = new Notification.Action.Builder(
+ R.drawable.ic_screenshot_share,
+ r.getString(com.android.internal.R.string.share), shareAction);
+ mNotificationBuilder.addAction(shareActionBuilder.build());
// Create a delete action for the notification
- final PendingIntent deleteAction = PendingIntent.getBroadcast(context, 0,
+ PendingIntent deleteAction = PendingIntent.getBroadcast(context, 0,
new Intent(context, GlobalScreenshot.DeleteScreenshotReceiver.class)
- .putExtra(GlobalScreenshot.CANCEL_ID, mNotificationId)
.putExtra(GlobalScreenshot.SCREENSHOT_URI_ID, uri.toString()),
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_ONE_SHOT);
- mNotificationBuilder.addAction(R.drawable.ic_screenshot_delete,
+ Notification.Action.Builder deleteActionBuilder = new Notification.Action.Builder(
+ R.drawable.ic_screenshot_delete,
r.getString(com.android.internal.R.string.delete), deleteAction);
+ mNotificationBuilder.addAction(deleteActionBuilder.build());
params[0].imageUri = uri;
params[0].image = null;
- params[0].result = 0;
+ params[0].errorMsgResId = 0;
} catch (Exception e) {
// IOException/UnsupportedOperationException may be thrown if external storage is not
// mounted
params[0].clearImage();
- params[0].result = 1;
+ params[0].errorMsgResId = R.string.screenshot_failed_to_save_text;
}
// Recycle the bitmap data
@@ -305,19 +303,14 @@
@Override
protected void onPostExecute(SaveImageInBackgroundData params) {
- if (isCancelled()) {
- params.finisher.run();
- params.clearImage();
- params.clearContext();
- return;
- }
-
- if (params.result > 0) {
+ if (params.errorMsgResId != 0) {
// Show a message that we've failed to save the image to disk
- GlobalScreenshot.notifyScreenshotError(params.context, mNotificationManager);
+ GlobalScreenshot.notifyScreenshotError(params.context, mNotificationManager,
+ params.errorMsgResId);
} else {
// Show the final notification to indicate screenshot saved
- Resources r = params.context.getResources();
+ Context context = params.context;
+ Resources r = context.getResources();
// Create the intent to show the screenshot in gallery
Intent launchIntent = new Intent(Intent.ACTION_VIEW);
@@ -326,34 +319,41 @@
final long now = System.currentTimeMillis();
+ // Update the text and the icon for the existing notification
+ mPublicNotificationBuilder
+ .setContentTitle(r.getString(R.string.screenshot_saved_title))
+ .setContentText(r.getString(R.string.screenshot_saved_text))
+ .setContentIntent(PendingIntent.getActivity(params.context, 0, launchIntent, 0))
+ .setWhen(now)
+ .setAutoCancel(true)
+ .setColor(context.getColor(
+ com.android.internal.R.color.system_notification_accent_color));
mNotificationBuilder
.setContentTitle(r.getString(R.string.screenshot_saved_title))
.setContentText(r.getString(R.string.screenshot_saved_text))
.setContentIntent(PendingIntent.getActivity(params.context, 0, launchIntent, 0))
.setWhen(now)
.setAutoCancel(true)
- .setColor(r.getColor(
- com.android.internal.R.color.system_notification_accent_color));;
+ .setColor(context.getColor(
+ com.android.internal.R.color.system_notification_accent_color))
+ .setPublicVersion(mPublicNotificationBuilder.build())
+ .setFlag(Notification.FLAG_NO_CLEAR, false);
- // Update the text in the public version as well
- mPublicNotificationBuilder
- .setContentTitle(r.getString(R.string.screenshot_saved_title))
- .setContentText(r.getString(R.string.screenshot_saved_text))
- .setContentIntent(PendingIntent.getActivity(params.context, 0, launchIntent, 0))
- .setWhen(now)
- .setAutoCancel(true)
- .setColor(r.getColor(
- com.android.internal.R.color.system_notification_accent_color));
-
- mNotificationBuilder.setPublicVersion(mPublicNotificationBuilder.build());
-
- Notification n = mNotificationBuilder.build();
- n.flags &= ~Notification.FLAG_NO_CLEAR;
- mNotificationManager.notify(mNotificationId, n);
+ mNotificationManager.notify(R.id.notification_screenshot, mNotificationBuilder.build());
}
params.finisher.run();
params.clearContext();
}
+
+ @Override
+ protected void onCancelled(SaveImageInBackgroundData params) {
+ params.finisher.run();
+ params.clearImage();
+ params.clearContext();
+
+ // Cancel the posted notification
+ mNotificationManager.cancel(R.id.notification_screenshot);
+ }
}
/**
@@ -379,16 +379,7 @@
}
}
-/**
- * TODO:
- * - Performance when over gl surfaces? Ie. Gallery
- * - what do we say in the Toast? Which icon do we get if the user uses another
- * type of gallery?
- */
class GlobalScreenshot {
- private static final String TAG = "GlobalScreenshot";
-
- static final String CANCEL_ID = "android:cancel_id";
static final String SCREENSHOT_URI_ID = "android:screenshot_uri_id";
private static final int SCREENSHOT_FLASH_TO_PEAK_DURATION = 130;
@@ -512,8 +503,8 @@
if (mSaveInBgTask != null) {
mSaveInBgTask.cancel(false);
}
- mSaveInBgTask = new SaveImageInBackgroundTask(mContext, data, mNotificationManager,
- R.id.notification_screenshot).execute(data);
+ mSaveInBgTask = new SaveImageInBackgroundTask(mContext, data, mNotificationManager)
+ .execute(data);
}
/**
@@ -553,7 +544,8 @@
// Take the screenshot
mScreenBitmap = SurfaceControl.screenshot((int) dims[0], (int) dims[1]);
if (mScreenBitmap == null) {
- notifyScreenshotError(mContext, mNotificationManager);
+ notifyScreenshotError(mContext, mNotificationManager,
+ R.string.screenshot_failed_to_capture_text);
finisher.run();
return;
}
@@ -763,14 +755,15 @@
return anim;
}
- static void notifyScreenshotError(Context context, NotificationManager nManager) {
+ static void notifyScreenshotError(Context context, NotificationManager nManager, int msgResId) {
Resources r = context.getResources();
+ String errorMsg = r.getString(msgResId);
- // Clear all existing notification, compose the new notification and show it
+ // Repurpose the existing notification to notify the user of the error
Notification.Builder b = new Notification.Builder(context)
.setTicker(r.getString(R.string.screenshot_failed_title))
.setContentTitle(r.getString(R.string.screenshot_failed_title))
- .setContentText(r.getString(R.string.screenshot_failed_text))
+ .setContentText(errorMsg)
.setSmallIcon(R.drawable.stat_notify_image_error)
.setWhen(System.currentTimeMillis())
.setVisibility(Notification.VISIBILITY_PUBLIC) // ok to show outside lockscreen
@@ -778,9 +771,9 @@
.setAutoCancel(true)
.setColor(context.getColor(
com.android.internal.R.color.system_notification_accent_color));
- Notification n =
- new Notification.BigTextStyle(b)
- .bigText(r.getString(R.string.screenshot_failed_text))
+
+ Notification n = new Notification.BigTextStyle(b)
+ .bigText(errorMsg)
.build();
nManager.notify(R.id.notification_screenshot, n);
}
@@ -791,15 +784,10 @@
public static class TargetChosenReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
- if (!intent.hasExtra(CANCEL_ID)) {
- return;
- }
-
// Clear the notification
final NotificationManager nm =
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
- final int id = intent.getIntExtra(CANCEL_ID, 0);
- nm.cancel(id);
+ nm.cancel(R.id.notification_screenshot);
}
}
@@ -809,16 +797,15 @@
public static class DeleteScreenshotReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
- if (!intent.hasExtra(CANCEL_ID) || !intent.hasExtra(SCREENSHOT_URI_ID)) {
+ if (!intent.hasExtra(SCREENSHOT_URI_ID)) {
return;
}
// Clear the notification
final NotificationManager nm =
(NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
- final int id = intent.getIntExtra(CANCEL_ID, 0);
final Uri uri = Uri.parse(intent.getStringExtra(SCREENSHOT_URI_ID));
- nm.cancel(id);
+ nm.cancel(R.id.notification_screenshot);
// And delete the image from the media store
new DeleteImageInBackgroundTask(context).execute(uri);
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerHandleView.java b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerHandleView.java
index 9118e9c..d5f7b39 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerHandleView.java
+++ b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerHandleView.java
@@ -26,7 +26,7 @@
import android.graphics.Paint;
import android.util.AttributeSet;
import android.util.Property;
-import android.widget.ImageButton;
+import android.view.View;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
@@ -34,7 +34,7 @@
/**
* View for the handle in the docked stack divider.
*/
-public class DividerHandleView extends ImageButton {
+public class DividerHandleView extends View {
private final static Property<DividerHandleView, Integer> WIDTH_PROPERTY
= new Property<DividerHandleView, Integer>(Integer.class, "width") {
diff --git a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
index 65a2f8f..da5cbe7 100644
--- a/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
+++ b/packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java
@@ -27,6 +27,7 @@
import android.graphics.Rect;
import android.graphics.Region.Op;
import android.hardware.display.DisplayManager;
+import android.os.Bundle;
import android.util.AttributeSet;
import android.view.Display;
import android.view.DisplayInfo;
@@ -40,6 +41,8 @@
import android.view.ViewTreeObserver.OnComputeInternalInsetsListener;
import android.view.WindowInsets;
import android.view.WindowManager;
+import android.view.accessibility.AccessibilityNodeInfo;
+import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction;
import android.view.animation.Interpolator;
import android.view.animation.PathInterpolator;
import android.widget.FrameLayout;
@@ -132,6 +135,42 @@
private boolean mGrowRecents;
private Animator mCurrentAnimator;
+ private final AccessibilityDelegate mHandleDelegate = new AccessibilityDelegate() {
+ @Override
+ public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
+ super.onInitializeAccessibilityNodeInfo(host, info);
+ if (isHorizontalDivision()) {
+ info.addAction(new AccessibilityAction(R.id.action_move_up,
+ mContext.getString(R.string.accessibility_action_divider_move_up)));
+ info.addAction(new AccessibilityAction(R.id.action_move_down,
+ mContext.getString(R.string.accessibility_action_divider_move_down)));
+ } else {
+ info.addAction(new AccessibilityAction(R.id.action_move_left,
+ mContext.getString(R.string.accessibility_action_divider_move_left)));
+ info.addAction(new AccessibilityAction(R.id.action_move_right,
+ mContext.getString(R.string.accessibility_action_divider_move_right)));
+ }
+ }
+
+ @Override
+ public boolean performAccessibilityAction(View host, int action, Bundle args) {
+ if (action == R.id.action_move_up || action == R.id.action_move_down
+ || action == R.id.action_move_left || action == R.id.action_move_right) {
+ int position = getCurrentPosition();
+ SnapTarget currentTarget = mSnapAlgorithm.calculateSnapTarget(
+ position, 0 /* velocity */);
+ SnapTarget nextTarget =
+ action == R.id.action_move_up || action == R.id.action_move_left
+ ? mSnapAlgorithm.getPreviousTarget(currentTarget)
+ : mSnapAlgorithm.getNextTarget(currentTarget);
+ startDragging(true /* animate */, false /* touching */);
+ stopDragging(getCurrentPosition(), nextTarget, 250, Interpolators.FAST_OUT_SLOW_IN);
+ return true;
+ }
+ return super.performAccessibilityAction(host, action, args);
+ }
+ };
+
public DividerView(Context context) {
super(context);
}
@@ -171,6 +210,7 @@
mHandle.setPointerIcon(PointerIcon.getSystemIcon(getContext(),
landscape ? STYLE_HORIZONTAL_DOUBLE_ARROW : STYLE_VERTICAL_DOUBLE_ARROW));
getViewTreeObserver().addOnComputeInternalInsetsListener(this);
+ mHandle.setAccessibilityDelegate(mHandleDelegate);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
index a0c63be..afee846 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
@@ -1872,7 +1872,7 @@
return entry;
}
- protected StatusBarIconView createIcon(StatusBarNotification sbn) {
+ public StatusBarIconView createIcon(StatusBarNotification sbn) {
// Construct the icon.
Notification n = sbn.getNotification();
final StatusBarIconView iconView = new StatusBarIconView(mContext,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java
index 8c7c71f..04095e7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ExpandableIndicator.java
@@ -45,6 +45,7 @@
final AnimatedVectorDrawable avd = (AnimatedVectorDrawable) getContext()
.getDrawable(res).getConstantState().newDrawable();
setImageDrawable(avd);
+ avd.forceAnimationOnUI();
avd.start();
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenWallpaper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenWallpaper.java
index 4f3c61e..5b4a3f0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenWallpaper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/LockscreenWallpaper.java
@@ -28,10 +28,13 @@
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.os.UserHandle;
import android.util.Log;
import libcore.io.IoUtils;
+import java.util.Objects;
+
/**
* Manages the lockscreen wallpaper.
*/
@@ -42,11 +45,15 @@
private final Context mContext;
private final PhoneStatusBar mBar;
private final IWallpaperManager mService;
+ private final WallpaperManager mWallpaperManager;
private final Handler mH;
private boolean mCached;
private Bitmap mCache;
- private int mUserId;
+ private int mCurrentUserId;
+ // The user selected in the UI, or null if no user is selected or UI doesn't support selecting
+ // users.
+ private UserHandle mSelectedUser;
public LockscreenWallpaper(Context ctx, PhoneStatusBar bar, Handler h) {
mContext = ctx;
@@ -54,7 +61,8 @@
mH = h;
mService = IWallpaperManager.Stub.asInterface(
ServiceManager.getService(Context.WALLPAPER_SERVICE));
- mUserId = ActivityManager.getCurrentUser();
+ mWallpaperManager = (WallpaperManager) ctx.getSystemService(Context.WALLPAPER_SERVICE);
+ mCurrentUserId = ActivityManager.getCurrentUser();
try {
mService.setLockWallpaperCallback(this);
@@ -73,8 +81,12 @@
mCache = null;
return null;
}
+ // Prefer the selected user (when specified) over the current user for the FLAG_SET_LOCK
+ // wallpaper.
+ final int lockWallpaperUserId =
+ mSelectedUser != null ? mSelectedUser.getIdentifier() : mCurrentUserId;
ParcelFileDescriptor fd = mService.getWallpaper(null, WallpaperManager.FLAG_SET_LOCK,
- new Bundle(), mUserId);
+ new Bundle(), lockWallpaperUserId);
if (fd != null) {
try {
BitmapFactory.Options options = new BitmapFactory.Options();
@@ -90,8 +102,17 @@
}
} else {
mCached = true;
- mCache = null;
- return null;
+ if (mSelectedUser != null && mSelectedUser.getIdentifier() != mCurrentUserId) {
+ // When selected user is different from the current user, show the selected
+ // user's static wallpaper.
+ mWallpaperManager.forgetLoadedWallpaper();
+ mCache = mWallpaperManager.getBitmapAsUser(mSelectedUser.getIdentifier());
+ } else {
+ // When there is no selected user, or it's same as the current user, show the
+ // system (possibly dynamic) wallpaper for the selected user.
+ mCache = null;
+ }
+ return mCache;
}
} catch (RemoteException e) {
Log.e(TAG, "System dead?" + e);
@@ -99,13 +120,23 @@
}
}
- public void setUser(int user) {
- if (user != mUserId) {
+ public void setCurrentUser(int user) {
+ if (user != mCurrentUserId) {
mCached = false;
- mUserId = user;
+ mCurrentUserId = user;
}
}
+ public void setSelectedUser(UserHandle selectedUser) {
+ if (Objects.equals(selectedUser, mSelectedUser)) {
+ return;
+ }
+ mSelectedUser = selectedUser;
+
+ mH.removeCallbacks(this);
+ mH.post(this);
+ }
+
@Override
public void onWallpaperChanged() {
// Called on Binder thread.
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index e344df2..d25e99b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -27,7 +27,6 @@
import android.app.Notification;
import android.app.PendingIntent;
import android.app.StatusBarManager;
-import android.app.WallpaperManager;
import android.content.BroadcastReceiver;
import android.content.ComponentCallbacks2;
import android.content.ComponentName;
@@ -69,7 +68,6 @@
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
-import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.Vibrator;
@@ -296,7 +294,7 @@
AccessibilityController mAccessibilityController;
FingerprintUnlockController mFingerprintUnlockController;
LightStatusBarController mLightStatusBarController;
- private LockscreenWallpaper mLockscreenWallpaper;
+ protected LockscreenWallpaper mLockscreenWallpaper;
int mNaturalBarHeight = -1;
@@ -3171,7 +3169,7 @@
resetUserSetupObserver();
setControllerUsers();
clearCurrentMediaNotification();
- mLockscreenWallpaper.setUser(newUserId);
+ mLockscreenWallpaper.setCurrentUser(newUserId);
updateMediaMetaData(true, false);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
index ab8067d..cf5531f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
@@ -21,7 +21,6 @@
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
-import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.RippleDrawable;
import android.util.AttributeSet;
@@ -129,14 +128,6 @@
((RippleDrawable) getBackground()).setForceSoftware(true);
((RippleDrawable) mSettingsButton.getBackground()).setForceSoftware(true);
- addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
- @Override
- public void onLayoutChange(View v, int left, int top, int right,
- int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
- setClipBounds(new Rect(getPaddingLeft(), 0, getWidth() - getPaddingRight(),
- getHeight()));
- }
- });
updateResources();
}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/ColorAndAppearanceFragment.java b/packages/SystemUI/src/com/android/systemui/tuner/ColorAndAppearanceFragment.java
index 9f11325..af95cf9 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/ColorAndAppearanceFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/ColorAndAppearanceFragment.java
@@ -28,6 +28,8 @@
import android.view.View;
import android.widget.SeekBar;
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.MetricsProto.MetricsEvent;
import com.android.systemui.R;
import com.android.systemui.statusbar.policy.NightModeController;
@@ -54,6 +56,7 @@
@Override
public void onResume() {
super.onResume();
+ MetricsLogger.visibility(getContext(), MetricsEvent.TUNER_COLOR_AND_APPEARANCE, true);
// TODO: Figure out better title model for Tuner, to avoid any more of this.
getActivity().setTitle(R.string.color_and_appearance);
@@ -63,6 +66,12 @@
}
@Override
+ public void onPause() {
+ super.onPause();
+ MetricsLogger.visibility(getContext(), MetricsEvent.TUNER_COLOR_AND_APPEARANCE, false);
+ }
+
+ @Override
public void onDisplayPreferenceDialog(Preference preference) {
if (preference instanceof CalibratePreference) {
CalibrateDialog.show(this);
@@ -76,6 +85,7 @@
}
private void onApply() {
+ MetricsLogger.action(getContext(), MetricsEvent.ACTION_TUNER_CALIBRATE_DISPLAY_CHANGED);
mNightModeController.setCustomValues(Settings.Secure.getString(
getContext().getContentResolver(), Secure.ACCESSIBILITY_DISPLAY_COLOR_MATRIX));
getView().removeCallbacks(mResetColorMatrix);
@@ -125,6 +135,7 @@
bindView(v.findViewById(R.id.r_group), 0);
bindView(v.findViewById(R.id.g_group), 5);
bindView(v.findViewById(R.id.b_group), 10);
+ MetricsLogger.visible(getContext(), MetricsEvent.TUNER_CALIBRATE_DISPLAY);
return new AlertDialog.Builder(getContext())
.setTitle(R.string.calibrate_display)
.setView(v)
@@ -133,6 +144,12 @@
.create();
}
+ @Override
+ public void onDismiss(DialogInterface dialog) {
+ super.onDismiss(dialog);
+ MetricsLogger.hidden(getContext(), MetricsEvent.TUNER_CALIBRATE_DISPLAY);
+ }
+
private void bindView(View view, final int index) {
SeekBar seekBar = (SeekBar) view.findViewById(com.android.internal.R.id.seekbar);
seekBar.setMax(1000);
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/NightModeFragment.java b/packages/SystemUI/src/com/android/systemui/tuner/NightModeFragment.java
index e9650ea..8c945f9 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/NightModeFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/NightModeFragment.java
@@ -17,23 +17,20 @@
import android.annotation.Nullable;
import android.app.UiModeManager;
-import android.content.ContentResolver;
import android.content.Context;
import android.os.Bundle;
-import android.provider.Settings;
import android.provider.Settings.Secure;
import android.support.v14.preference.PreferenceFragment;
import android.support.v14.preference.SwitchPreference;
-import android.support.v7.preference.DropDownPreference;
import android.support.v7.preference.Preference;
import android.support.v7.preference.Preference.OnPreferenceChangeListener;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Switch;
-
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.MetricsProto.MetricsEvent;
import com.android.systemui.R;
-import com.android.systemui.statusbar.phone.QSTileHost;
import com.android.systemui.statusbar.policy.NightModeController;
import com.android.systemui.statusbar.policy.NightModeController.Listener;
import com.android.systemui.tuner.TunerService.Tunable;
@@ -100,6 +97,7 @@
@Override
public void onClick(View v) {
boolean newState = !mNightModeController.isEnabled();
+ MetricsLogger.action(getContext(), MetricsEvent.ACTION_TUNER_NIGHT_MODE, newState);
mNightModeController.setNightMode(newState);
mSwitch.setChecked(newState);
}
@@ -109,6 +107,7 @@
@Override
public void onResume() {
super.onResume();
+ MetricsLogger.visibility(getContext(), MetricsEvent.TUNER_NIGHT_MODE, true);
mNightModeController.addListener(this);
TunerService.get(getContext()).addTunable(this, Secure.BRIGHTNESS_USE_TWILIGHT,
NightModeController.NIGHT_MODE_ADJUST_TINT);
@@ -119,24 +118,33 @@
@Override
public void onPause() {
super.onPause();
+ MetricsLogger.visibility(getContext(), MetricsEvent.TUNER_NIGHT_MODE, false);
mNightModeController.removeListener(this);
TunerService.get(getContext()).removeTunable(this);
}
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
+ final Boolean value = (Boolean) newValue;
if (mAutoSwitch == preference) {
- mNightModeController.setAuto((Boolean) newValue);
+ MetricsLogger.action(getContext(), MetricsEvent.ACTION_TUNER_NIGHT_MODE_AUTO, value);
+ mNightModeController.setAuto(value);
} else if (mDarkTheme == preference) {
- mUiModeManager.setNightMode(((Boolean) newValue) ? UiModeManager.MODE_NIGHT_AUTO
+ MetricsLogger.action(getContext(),
+ MetricsEvent.ACTION_TUNER_NIGHT_MODE_ADJUST_DARK_THEME, value);
+ mUiModeManager.setNightMode(value ? UiModeManager.MODE_NIGHT_AUTO
: UiModeManager.MODE_NIGHT_NO);
postCalculateDisabled();
} else if (mAdjustTint == preference) {
- mNightModeController.setAdjustTint((Boolean) newValue);
+ MetricsLogger.action(getContext(),
+ MetricsEvent.ACTION_TUNER_NIGHT_MODE_ADJUST_TINT, value);
+ mNightModeController.setAdjustTint(value);
postCalculateDisabled();
} else if (mAdjustBrightness == preference) {
+ MetricsLogger.action(getContext(),
+ MetricsEvent.ACTION_TUNER_NIGHT_MODE_ADJUST_BRIGHTNESS, value);
TunerService.get(getContext()).setValue(Secure.BRIGHTNESS_USE_TWILIGHT,
- ((Boolean) newValue) ? 1 : 0);
+ value ? 1 : 0);
postCalculateDisabled();
} else {
return false;
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
index def597d..748ee97 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
@@ -45,6 +45,13 @@
}
@Override
+ public void onBackPressed() {
+ if (!getFragmentManager().popBackStackImmediate()) {
+ super.onBackPressed();
+ }
+ }
+
+ @Override
public boolean onPreferenceStartFragment(PreferenceFragment caller, Preference pref) {
try {
Class<?> cls = Class.forName(pref.getFragment());
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java
index b738136..5b9ebd7 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerSwitch.java
@@ -6,18 +6,21 @@
import android.support.v14.preference.SwitchPreference;
import android.util.AttributeSet;
+import com.android.internal.logging.MetricsLogger;
import com.android.systemui.R;
import com.android.systemui.tuner.TunerService.Tunable;
public class TunerSwitch extends SwitchPreference implements Tunable {
private final boolean mDefault;
+ private final int mAction;
public TunerSwitch(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TunerSwitch);
mDefault = a.getBoolean(R.styleable.TunerSwitch_defValue, false);
+ mAction = a.getInt(R.styleable.TunerSwitch_metricsAction, -1);
}
@Override
@@ -38,6 +41,14 @@
}
@Override
+ protected void onClick() {
+ super.onClick();
+ if (mAction != -1) {
+ MetricsLogger.action(getContext(), mAction, isChecked());
+ }
+ }
+
+ @Override
protected boolean persistBoolean(boolean value) {
for (String key : getKey().split(",")) {
Settings.Secure.putString(getContext().getContentResolver(), key, value ? "1" : "0");
diff --git a/packages/SystemUI/src/com/android/systemui/tv/pip/PipManager.java b/packages/SystemUI/src/com/android/systemui/tv/pip/PipManager.java
index 0089fa9..ec49256 100644
--- a/packages/SystemUI/src/com/android/systemui/tv/pip/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/tv/pip/PipManager.java
@@ -65,17 +65,25 @@
public static final int SUSPEND_PIP_RESIZE_REASON_WAITING_FOR_OVERLAY_ACTIVITY_FINISH = 0x2;
private int mSuspendPipResizingReason;
+ private static final float SCALE_FACTOR = 1.1f;
+
private Context mContext;
private IActivityManager mActivityManager;
private int mState = STATE_NO_PIP;
private final Handler mHandler = new Handler();
private List<Listener> mListeners = new ArrayList<>();
- private Rect mPipBound;
- private Rect mMenuModePipBound;
+ private Rect mCurrentPipBounds;
+ private Rect mPipBounds;
+ private Rect mMenuModePipBounds;
+ private Rect mRecentsPipBounds;
+ private Rect mRecentsFocusedPipBounds;
private boolean mInitialized;
private int mPipTaskId = TASK_ID_NO_PIP;
private boolean mOnboardingShown;
+ private boolean mIsRecentsShown;
+ private boolean mIsPipFocusedInRecent;
+
private final Runnable mOnActivityPinnedRunnable = new Runnable() {
@Override
public void run() {
@@ -83,7 +91,7 @@
try {
stackInfo = mActivityManager.getStackInfo(PINNED_STACK_ID);
if (stackInfo == null) {
- Log.w(TAG, "There is no pinned stack");
+ Log.w(TAG, "Cannot find pinned stack");
return;
}
} catch (RemoteException e) {
@@ -94,6 +102,7 @@
mPipTaskId = stackInfo.taskIds[stackInfo.taskIds.length - 1];
// Set state to overlay so we show it when the pinned stack animation ends.
mState = STATE_PIP_OVERLAY;
+ mCurrentPipBounds = mPipBounds;
launchPipOnboardingActivityIfNeeded();
}
};
@@ -133,10 +142,13 @@
private final Runnable mOnPinnedStackAnimationEnded = new Runnable() {
@Override
public void run() {
- if (mState == STATE_PIP_OVERLAY) {
- showPipOverlay();
- } else if (mState == STATE_PIP_MENU) {
- showPipMenu();
+ switch (mState) {
+ case STATE_PIP_OVERLAY:
+ showPipOverlay();
+ break;
+ case STATE_PIP_MENU:
+ showPipMenu();
+ break;
}
}
};
@@ -177,10 +189,18 @@
mInitialized = true;
mContext = context;
Resources res = context.getResources();
- mPipBound = Rect.unflattenFromString(res.getString(
+ mPipBounds = Rect.unflattenFromString(res.getString(
com.android.internal.R.string.config_defaultPictureInPictureBounds));
- mMenuModePipBound = Rect.unflattenFromString(res.getString(
+ mMenuModePipBounds = Rect.unflattenFromString(res.getString(
com.android.internal.R.string.config_centeredPictureInPictureBounds));
+ mRecentsPipBounds = Rect.unflattenFromString(res.getString(
+ com.android.internal.R.string.config_pictureInPictureBoundsInRecents));
+ float scaleBy = (SCALE_FACTOR - 1.0f) / 2;
+ mRecentsFocusedPipBounds = new Rect(
+ (int) (mRecentsPipBounds.left - scaleBy * mRecentsPipBounds.width()),
+ (int) (mRecentsPipBounds.top - scaleBy * mRecentsPipBounds.height()),
+ (int) (mRecentsPipBounds.right + scaleBy * mRecentsPipBounds.width()),
+ (int) (mRecentsPipBounds.bottom + scaleBy * mRecentsPipBounds.height()));
mActivityManager = ActivityManagerNative.getDefault();
TaskStackListener taskStackListener = new TaskStackListener();
@@ -203,7 +223,7 @@
*/
public void requestTvPictureInPicture() {
if (DEBUG) Log.d(TAG, "requestTvPictureInPicture()");
- if (!hasPipTasks()) {
+ if (!isPipShown()) {
startPip();
} else if (mState == STATE_PIP_OVERLAY) {
resizePinnedStack(STATE_PIP_MENU);
@@ -212,7 +232,7 @@
private void startPip() {
try {
- mActivityManager.moveTopActivityToPinnedStack(FULLSCREEN_WORKSPACE_STACK_ID, mPipBound);
+ mActivityManager.moveTopActivityToPinnedStack(FULLSCREEN_WORKSPACE_STACK_ID, mPipBounds);
} catch (RemoteException|IllegalArgumentException e) {
Log.e(TAG, "moveTopActivityToPinnedStack failed", e);
}
@@ -235,6 +255,9 @@
Log.e(TAG, "removeStack failed", e);
}
}
+ for (int i = mListeners.size() - 1; i >= 0; --i) {
+ mListeners.get(i).onPipActivityClosed();
+ }
}
/**
@@ -295,37 +318,100 @@
public void resizePinnedStack(int state) {
if (DEBUG) Log.d(TAG, "resizePinnedStack() state=" + state);
mState = state;
- Rect bounds;
for (int i = mListeners.size() - 1; i >= 0; --i) {
mListeners.get(i).onPipResizeAboutToStart();
}
- switch (mState) {
- case STATE_PIP_MENU:
- bounds = mMenuModePipBound;
- break;
- case STATE_NO_PIP:
- bounds = null;
- break;
- default:
- bounds = mPipBound;
- break;
- }
-
if (mSuspendPipResizingReason != 0) {
if (DEBUG) Log.d(TAG,
"resizePinnedStack() deferring mSuspendPipResizingReason=" +
mSuspendPipResizingReason);
return;
}
-
+ switch (mState) {
+ case STATE_NO_PIP:
+ mCurrentPipBounds = null;
+ break;
+ case STATE_PIP_MENU:
+ mCurrentPipBounds = mMenuModePipBounds;
+ break;
+ case STATE_PIP_OVERLAY:
+ if (mIsRecentsShown) {
+ if (mIsPipFocusedInRecent) {
+ mCurrentPipBounds = mRecentsFocusedPipBounds;
+ } else {
+ mCurrentPipBounds = mRecentsPipBounds;
+ }
+ } else {
+ mCurrentPipBounds = mPipBounds;
+ }
+ break;
+ default:
+ mCurrentPipBounds = mPipBounds;
+ break;
+ }
try {
- mActivityManager.resizeStack(PINNED_STACK_ID, bounds, true, true, true);
+ mActivityManager.resizeStack(PINNED_STACK_ID, mCurrentPipBounds, true, true, true);
} catch (RemoteException e) {
Log.e(TAG, "showPipMenu failed", e);
}
}
/**
+ * Returns the current PIP bound for activities to sync their UI with PIP.
+ */
+ public Rect getPipBounds() {
+ return mCurrentPipBounds;
+ }
+
+ /**
+ * Called when Recents is started.
+ * PIPed activity will be resized accordingly and overlay will show available buttons.
+ */
+ public void onRecentsStarted() {
+ mIsRecentsShown = true;
+ mIsPipFocusedInRecent = false;
+ if (mState == STATE_NO_PIP) {
+ return;
+ }
+ resizePinnedStack(STATE_PIP_OVERLAY);
+ }
+
+ /**
+ * Called when Recents is stopped.
+ * PIPed activity will be resized accordingly and overlay will hide available buttons.
+ */
+ public void onRecentsStopped() {
+ mIsRecentsShown = false;
+ mIsPipFocusedInRecent = false;
+ if (mState == STATE_NO_PIP) {
+ return;
+ }
+ resizePinnedStack(STATE_PIP_OVERLAY);
+ }
+
+ /**
+ * Returns {@code true} if recents is shown.
+ */
+ boolean isRecentsShown() {
+ return mIsRecentsShown;
+ }
+
+ /**
+ * Called when the PIP view in {@link com.android.systemui.recents.tv.RecentsTvActivity}
+ * is focused.
+ * This only resizes pinned stack so it looks like it's in Recents.
+ * This should be called only by {@link com.android.systemui.recents.tv.RecentsTvActivity}.
+ */
+ public void onPipViewFocusChangedInRecents(boolean hasFocus) {
+ mIsPipFocusedInRecent = hasFocus;
+ if (mState != STATE_PIP_OVERLAY) {
+ Log.w(TAG, "There is no pinned stack to handle focus change.");
+ return;
+ }
+ resizePinnedStack(STATE_PIP_OVERLAY);
+ }
+
+ /**
* Shows PIP menu UI by launching {@link PipMenuActivity}. It also locates the pinned
* stack to the centered PIP bound {@link com.android.internal.R.string
* .config_centeredPictureInPictureBounds}.
@@ -362,6 +448,13 @@
}
}
+ /**
+ * Returns {@code true} if PIP is shown.
+ */
+ public boolean isPipShown() {
+ return hasPipTasks();
+ }
+
private boolean hasPipTasks() {
try {
StackInfo stackInfo = mActivityManager.getStackInfo(PINNED_STACK_ID);
diff --git a/packages/SystemUI/src/com/android/systemui/tv/pip/PipOverlayActivity.java b/packages/SystemUI/src/com/android/systemui/tv/pip/PipOverlayActivity.java
index 56a604d..6f24691 100644
--- a/packages/SystemUI/src/com/android/systemui/tv/pip/PipOverlayActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/tv/pip/PipOverlayActivity.java
@@ -35,10 +35,10 @@
private final PipManager mPipManager = PipManager.getInstance();
private final Handler mHandler = new Handler();
private View mGuideOverlayView;
+ private View mGuideButtonsView;
private final Runnable mHideGuideOverlayRunnable = new Runnable() {
public void run() {
- // TODO: Uncomment this after the b/27224884 is fixed.
- //mGuideOverlayView.setVisibility(View.INVISIBLE);
+ mGuideOverlayView.setVisibility(View.INVISIBLE);
}
};
@@ -47,13 +47,21 @@
super.onCreate(bundle);
setContentView(R.layout.tv_pip_overlay);
mGuideOverlayView = findViewById(R.id.guide_overlay);
+ mGuideButtonsView = findViewById(R.id.guide_buttons);
mPipManager.addListener(this);
}
@Override
protected void onResume() {
super.onResume();
- mGuideOverlayView.setVisibility(View.VISIBLE);
+ // TODO: Implement animation for this
+ if (!mPipManager.isRecentsShown()) {
+ mGuideOverlayView.setVisibility(View.VISIBLE);
+ mGuideButtonsView.setVisibility(View.INVISIBLE);
+ } else {
+ mGuideOverlayView.setVisibility(View.INVISIBLE);
+ mGuideButtonsView.setVisibility(View.VISIBLE);
+ }
mHandler.removeCallbacks(mHideGuideOverlayRunnable);
mHandler.postDelayed(mHideGuideOverlayRunnable, SHOW_GUIDE_OVERLAY_VIEW_DURATION_MS);
}
diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto
index cd31b17..49972d6 100644
--- a/proto/src/metrics_constants.proto
+++ b/proto/src/metrics_constants.proto
@@ -408,5 +408,44 @@
// Changes made on bug report details screen were canceled by user.
ACTION_BUGREPORT_DETAILS_CANCELED = 304;
+
+ // Tuner: Open/close calibrate dialog.
+ TUNER_CALIBRATE_DISPLAY = 305;
+
+ // Tuner: Open/close color and appearance.
+ TUNER_COLOR_AND_APPEARANCE = 306;
+
+ // Tuner: Apply calibrate dialog.
+ ACTION_TUNER_CALIBRATE_DISPLAY_CHANGED = 307;
+
+ // Tuner: Open/close night mode.
+ TUNER_NIGHT_MODE = 308;
+
+ // Tuner: Change night mode.
+ ACTION_TUNER_NIGHT_MODE = 309;
+
+ // Tuner: Change night mode auto.
+ ACTION_TUNER_NIGHT_MODE_AUTO = 310;
+
+ // Tuner: Change night mode adjust dark theme.
+ ACTION_TUNER_NIGHT_MODE_ADJUST_DARK_THEME = 311;
+
+ // Tuner: Change night mode adjust tint.
+ ACTION_TUNER_NIGHT_MODE_ADJUST_TINT = 312;
+
+ // Tuner: Change night mode adjust brightness.
+ ACTION_TUNER_NIGHT_MODE_ADJUST_BRIGHTNESS = 313;
+
+ // Tuner: Change do not disturb in volume panel.
+ ACTION_TUNER_DO_NOT_DISTURB_VOLUME_PANEL = 314;
+
+ // Tuner: Change do not disturb volume buttons shortcut.
+ ACTION_TUNER_DO_NOT_DISTURB_VOLUME_SHORTCUT = 315;
+
+ // Logs the action the user takes when an app crashed.
+ ACTION_APP_CRASH = 316;
+
+ // Logs the action the user takes when an app ANR'd.
+ ACTION_APP_ANR = 317;
}
}
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java
index 6d0d9e9..8cfeb74 100644
--- a/services/core/java/com/android/server/BluetoothManagerService.java
+++ b/services/core/java/com/android/server/BluetoothManagerService.java
@@ -1671,16 +1671,23 @@
}
@Override
- public void dump(FileDescriptor fd, PrintWriter writer, String args[]) {
- mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);
- if (mBluetoothBinder == null) {
- writer.println("Bluetooth Service not connected");
- } else {
- try {
- mBluetoothBinder.dump(fd, args);
- } catch (RemoteException re) {
- writer.println("RemoteException while calling Bluetooth Service");
+ public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
+ mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);
+ String errorMsg = null;
+ if (mBluetoothBinder == null) {
+ errorMsg = "Bluetooth Service not connected";
+ } else {
+ try {
+ mBluetoothBinder.dump(fd, args);
+ } catch (RemoteException re) {
+ errorMsg = "RemoteException while calling Bluetooth Service";
+ }
}
- }
+ if (errorMsg != null) {
+ // Silently return if we are extracting metrics in Protobuf format
+ if ((args.length > 0) && args[0].startsWith("--proto"))
+ return;
+ writer.println(errorMsg);
+ }
}
}
diff --git a/services/core/java/com/android/server/InputMethodManagerService.java b/services/core/java/com/android/server/InputMethodManagerService.java
index 5ba8bd5..63c9822 100644
--- a/services/core/java/com/android/server/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/InputMethodManagerService.java
@@ -95,6 +95,7 @@
import android.util.ArraySet;
import android.util.AtomicFile;
import android.util.EventLog;
+import android.util.LocaleList;
import android.util.LruCache;
import android.util.Pair;
import android.util.PrintWriterPrinter;
@@ -135,7 +136,6 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
-import java.util.Locale;
/**
* This class provides a system service that manages input methods.
@@ -446,7 +446,7 @@
private View mSwitchingDialogTitleView;
private InputMethodInfo[] mIms;
private int[] mSubtypeIds;
- private Locale mLastSystemLocale;
+ private LocaleList mLastSystemLocales;
private boolean mShowImeWithHardKeyboard;
private boolean mAccessibilityRequestingNoSoftKeyboard;
private final MyPackageMonitor mMyPackageMonitor = new MyPackageMonitor();
@@ -949,15 +949,15 @@
// not system ready
return;
}
- final Locale newLocale = mRes.getConfiguration().locale;
+ final LocaleList newLocales = mRes.getConfiguration().getLocales();
if (!updateOnlyWhenLocaleChanged
- || (newLocale != null && !newLocale.equals(mLastSystemLocale))) {
+ || (newLocales != null && !newLocales.equals(mLastSystemLocales))) {
if (!updateOnlyWhenLocaleChanged) {
hideCurrentInputLocked(0, null);
resetCurrentMethodAndClient(InputMethodClient.UNBIND_REASON_RESET_IME);
}
if (DEBUG) {
- Slog.i(TAG, "Locale has been changed to " + newLocale);
+ Slog.i(TAG, "LocaleList has been changed to " + newLocales);
}
buildInputMethodListLocked(resetDefaultEnabledIme);
if (!updateOnlyWhenLocaleChanged) {
@@ -972,7 +972,7 @@
resetDefaultImeLocked(mContext);
}
updateFromSettingsLocked(true);
- mLastSystemLocale = newLocale;
+ mLastSystemLocales = newLocales;
if (!updateOnlyWhenLocaleChanged) {
try {
startInputInnerLocked();
@@ -1079,7 +1079,7 @@
mSettings.getEnabledInputMethodListLocked(),
mSettings.getCurrentUserId(), mContext.getBasePackageName());
}
- mLastSystemLocale = mRes.getConfiguration().locale;
+ mLastSystemLocales = mRes.getConfiguration().getLocales();
try {
startInputInnerLocked();
} catch (RuntimeException e) {
diff --git a/services/core/java/com/android/server/PersistentDataBlockService.java b/services/core/java/com/android/server/PersistentDataBlockService.java
index a291cc7..2085f32 100644
--- a/services/core/java/com/android/server/PersistentDataBlockService.java
+++ b/services/core/java/com/android/server/PersistentDataBlockService.java
@@ -27,6 +27,7 @@
import android.os.UserHandle;
import android.os.UserManager;
import android.service.persistentdata.IPersistentDataBlockService;
+import android.service.persistentdata.PersistentDataBlockManager;
import android.util.Slog;
import com.android.internal.R;
@@ -72,6 +73,9 @@
private static final int MAX_DATA_BLOCK_SIZE = 1024 * 100;
public static final int DIGEST_SIZE_BYTES = 32;
private static final String OEM_UNLOCK_PROP = "sys.oem_unlock_allowed";
+ private static final String FLASH_LOCK_PROP = "ro.boot.flash.locked";
+ private static final String FLASH_LOCK_LOCKED = "1";
+ private static final String FLASH_LOCK_UNLOCKED = "0";
private final Context mContext;
private final String mDataBlockFile;
@@ -454,6 +458,20 @@
}
@Override
+ public int getFlashLockState() {
+ enforceOemUnlockPermission();
+ String locked = SystemProperties.get(FLASH_LOCK_PROP);
+ switch (locked) {
+ case FLASH_LOCK_LOCKED:
+ return PersistentDataBlockManager.FLASH_LOCK_LOCKED;
+ case FLASH_LOCK_UNLOCKED:
+ return PersistentDataBlockManager.FLASH_LOCK_UNLOCKED;
+ default:
+ return PersistentDataBlockManager.FLASH_LOCK_UNKNOWN;
+ }
+ }
+
+ @Override
public int getDataBlockSize() {
enforcePersistentDataBlockAccess();
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index ec0e075..e3a0b5c 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -12291,10 +12291,11 @@
+ " from " + proc.initialIdlePss + ")", true);
}
}
- } else if (proc.setProcState < ActivityManager.PROCESS_STATE_HOME) {
+ } else if (proc.setProcState < ActivityManager.PROCESS_STATE_HOME
+ && proc.setProcState > ActivityManager.PROCESS_STATE_NONEXISTENT) {
proc.notCachedSinceIdle = true;
proc.initialIdlePss = 0;
- proc.nextPssTime = ProcessList.computeNextPssTime(proc.curProcState, true,
+ proc.nextPssTime = ProcessList.computeNextPssTime(proc.setProcState, true,
mTestPssMode, isSleeping(), now);
}
}
diff --git a/services/core/java/com/android/server/am/ActivityRecord.java b/services/core/java/com/android/server/am/ActivityRecord.java
index 90a7da9..32ca5bf 100755
--- a/services/core/java/com/android/server/am/ActivityRecord.java
+++ b/services/core/java/com/android/server/am/ActivityRecord.java
@@ -321,6 +321,7 @@
pw.print(" visible="); pw.print(visible);
pw.print(" sleeping="); pw.print(sleeping);
pw.print(" idle="); pw.println(idle);
+ pw.print(" mStartingWindowShown="); pw.println(mStartingWindowShown);
pw.print(prefix); pw.print("fullscreen="); pw.print(fullscreen);
pw.print(" noDisplay="); pw.print(noDisplay);
pw.print(" immersive="); pw.print(immersive);
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index acde10f..ec37667 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -2263,6 +2263,7 @@
mService.compatibilityInfoForPackageLocked(next.info.applicationInfo),
next.nonLocalizedLabel, next.labelRes, next.icon, next.logo,
next.windowFlags, null, true);
+ next.mStartingWindowShown = true;
}
mStackSupervisor.startSpecificActivityLocked(next, true, false);
if (DEBUG_STACK) mStackSupervisor.validateTopActivitiesLocked();
@@ -2295,6 +2296,7 @@
next.nonLocalizedLabel,
next.labelRes, next.icon, next.logo, next.windowFlags,
null, true);
+ next.mStartingWindowShown = true;
}
if (DEBUG_SWITCH) Slog.v(TAG_SWITCH, "Restarting: " + next);
}
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 2394842..af5f6b3 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -119,6 +119,7 @@
import static android.content.Intent.FLAG_ACTIVITY_MULTIPLE_TASK;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.content.pm.ActivityInfo.FLAG_SHOW_FOR_ALL_USERS;
+import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZEABLE;
import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.os.Trace.TRACE_TAG_ACTIVITY_MANAGER;
@@ -2226,6 +2227,11 @@
return;
}
+ if (stackId == FREEFORM_WORKSPACE_STACK_ID && !mService.mSupportsFreeformWindowManagement) {
+ throw new IllegalArgumentException("moveTaskToStack:"
+ + "Attempt to move task " + taskId + " to unsupported freeform stack");
+ }
+
final ActivityRecord topActivity = task.getTopActivity();
final int sourceStackId = task.stack != null ? task.stack.mStackId : INVALID_STACK_ID;
final boolean mightReplaceWindow =
@@ -2260,10 +2266,13 @@
// 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);
- } else if (stackId == FREEFORM_WORKSPACE_STACK_ID
- && task.mBounds == null && task.mLastNonFullscreenBounds != null) {
- kept = resizeTaskLocked(task, task.mLastNonFullscreenBounds,
- RESIZE_MODE_SYSTEM, !mightReplaceWindow);
+ } 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);
} else if (stackId == DOCKED_STACK_ID || stackId == PINNED_STACK_ID) {
kept = resizeTaskLocked(task, stack.mBounds, RESIZE_MODE_SYSTEM, !mightReplaceWindow);
}
@@ -3244,9 +3253,9 @@
return;
}
- if (!task.canGoInDockedStack() || task.inCropWindowsResizeMode()) {
+ if (!task.canGoInDockedStack() || task.mResizeMode == RESIZE_MODE_FORCE_RESIZEABLE) {
// Display warning toast if we tried to put a non-dockable task in the docked stack or
- // the task is running in cropped window mode.
+ // the task was forced to be resizable by the system.
mWindowManager.scheduleShowNonResizeableDockToast(task.taskId);
}
}
diff --git a/services/core/java/com/android/server/am/AppErrorDialog.java b/services/core/java/com/android/server/am/AppErrorDialog.java
index b746a4b..86cdbcc 100644
--- a/services/core/java/com/android/server/am/AppErrorDialog.java
+++ b/services/core/java/com/android/server/am/AppErrorDialog.java
@@ -37,6 +37,7 @@
import static com.android.server.am.ActivityManagerService.IS_USER_BUILD;
final class AppErrorDialog extends BaseErrorDialog implements View.OnClickListener {
+
private final ActivityManagerService mService;
private final AppErrorResult mResult;
private final ProcessRecord mProc;
@@ -44,12 +45,17 @@
private CharSequence mName;
+ static int CANT_SHOW = -1;
+ static int BACKGROUND_USER = -2;
+ static int ALREADY_SHOWING = -3;
+
// Event 'what' codes
static final int FORCE_QUIT = 1;
static final int FORCE_QUIT_AND_REPORT = 2;
static final int RESTART = 3;
static final int RESET = 4;
static final int MUTE = 5;
+ static final int TIMEOUT = 6;
// 5-minute timeout, then we automatically dismiss the crash dialog
static final long DISMISS_TIMEOUT = 1000 * 60 * 5;
@@ -89,7 +95,7 @@
// After the timeout, pretend the user clicked the quit button
mHandler.sendMessageDelayed(
- mHandler.obtainMessage(FORCE_QUIT),
+ mHandler.obtainMessage(TIMEOUT),
DISMISS_TIMEOUT);
}
@@ -132,7 +138,7 @@
mResult.set(result);
// Make sure we don't have time timeout still hanging around.
- removeMessages(FORCE_QUIT);
+ removeMessages(TIMEOUT);
dismiss();
}
diff --git a/services/core/java/com/android/server/am/AppErrors.java b/services/core/java/com/android/server/am/AppErrors.java
index 190e9e1..055935d 100644
--- a/services/core/java/com/android/server/am/AppErrors.java
+++ b/services/core/java/com/android/server/am/AppErrors.java
@@ -17,6 +17,8 @@
package com.android.server.am;
import com.android.internal.app.ProcessMap;
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.MetricsProto;
import com.android.internal.os.ProcessCpuTracker;
import com.android.server.Watchdog;
@@ -403,6 +405,10 @@
Intent appErrorIntent = null;
final long ident = Binder.clearCallingIdentity();
try {
+ MetricsLogger.action(mContext, MetricsProto.MetricsEvent.ACTION_APP_CRASH, res);
+ if (res == AppErrorDialog.TIMEOUT) {
+ res = AppErrorDialog.FORCE_QUIT;
+ }
if (res == AppErrorDialog.RESET) {
String[] packageList = r.getPackageList();
if (packageList != null) {
@@ -697,7 +703,7 @@
if (proc != null && proc.crashDialog != null) {
Slog.e(TAG, "App already has crash dialog: " + proc);
if (res != null) {
- res.set(0);
+ res.set(AppErrorDialog.ALREADY_SHOWING);
}
return;
}
@@ -710,7 +716,7 @@
if (isBackground && !showBackground) {
Slog.w(TAG, "Skipping crash dialog of " + proc + ": background");
if (res != null) {
- res.set(0);
+ res.set(AppErrorDialog.BACKGROUND_USER);
}
return;
}
@@ -724,7 +730,7 @@
// The device is asleep, so just pretend that the user
// saw a crash dialog and hit "force quit".
if (res != null) {
- res.set(0);
+ res.set(AppErrorDialog.CANT_SHOW);
}
}
}
@@ -920,6 +926,8 @@
ProcessRecord proc = (ProcessRecord)data.get("app");
if (proc != null && proc.anrDialog != null) {
Slog.e(TAG, "App already has anr dialog: " + proc);
+ MetricsLogger.action(mContext, MetricsProto.MetricsEvent.ACTION_APP_ANR,
+ AppNotRespondingDialog.ALREADY_SHOWING);
return;
}
@@ -939,6 +947,8 @@
d.show();
proc.anrDialog = d;
} else {
+ MetricsLogger.action(mContext, MetricsProto.MetricsEvent.ACTION_APP_ANR,
+ AppNotRespondingDialog.CANT_SHOW);
// Just kill the app if there is no dialog to be shown.
mService.killAppAtUsersRequest(proc, null);
}
diff --git a/services/core/java/com/android/server/am/AppNotRespondingDialog.java b/services/core/java/com/android/server/am/AppNotRespondingDialog.java
index 9875887..6d1d9f3 100644
--- a/services/core/java/com/android/server/am/AppNotRespondingDialog.java
+++ b/services/core/java/com/android/server/am/AppNotRespondingDialog.java
@@ -16,6 +16,9 @@
package com.android.server.am;
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.MetricsProto;
+
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
@@ -41,6 +44,9 @@
static final int WAIT = 2;
static final int WAIT_AND_REPORT = 3;
+ public static final int CANT_SHOW = -1;
+ public static final int ALREADY_SHOWING = -2;
+
private final ActivityManagerService mService;
private final ProcessRecord mProc;
@@ -132,6 +138,10 @@
private final Handler mHandler = new Handler() {
public void handleMessage(Message msg) {
Intent appErrorIntent = null;
+
+ MetricsLogger.action(getContext(), MetricsProto.MetricsEvent.ACTION_APP_ANR,
+ msg.what);
+
switch (msg.what) {
case FORCE_CLOSE:
// Kill the application.
diff --git a/services/core/java/com/android/server/audio/RecordingActivityMonitor.java b/services/core/java/com/android/server/audio/RecordingActivityMonitor.java
index a6325a4..4b0a142 100644
--- a/services/core/java/com/android/server/audio/RecordingActivityMonitor.java
+++ b/services/core/java/com/android/server/audio/RecordingActivityMonitor.java
@@ -16,6 +16,7 @@
package com.android.server.audio;
+import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioRecordConfiguration;
import android.media.AudioSystem;
@@ -48,11 +49,12 @@
/**
* Implementation of android.media.AudioSystem.AudioRecordingCallback
*/
- public void onRecordingConfigurationChanged(int event, int session, int source) {
+ public void onRecordingConfigurationChanged(int event, int session, int source,
+ int[] recordingFormat) {
if (MediaRecorder.isSystemOnlyAudioSource(source)) {
return;
}
- if (updateSnapshot(event, session, source)) {
+ if (updateSnapshot(event, session, source, recordingFormat)) {
final Iterator<RecMonitorClient> clientIterator = mClients.iterator();
synchronized(mClients) {
while (clientIterator.hasNext()) {
@@ -110,15 +112,30 @@
* @param event
* @param session
* @param source
+ * @param recordingFormat see
+ * {@link AudioSystem.AudioRecordingCallback#onRecordingConfigurationChanged(int, int, int, int[])}
+ * for the definition of the contents of the array
* @return true if the list of active recording sessions has been modified, false otherwise.
*/
- private boolean updateSnapshot(int event, int session, int source) {
+ private boolean updateSnapshot(int event, int session, int source, int[] recordingFormat) {
synchronized(mRecordConfigs) {
switch (event) {
case AudioManager.RECORD_CONFIG_EVENT_STOP:
// return failure if an unknown recording session stopped
return (mRecordConfigs.remove(new Integer(session)) != null);
case AudioManager.RECORD_CONFIG_EVENT_START:
+ final AudioFormat clientFormat = new AudioFormat.Builder()
+ .setEncoding(recordingFormat[0])
+ // FIXME this doesn't support index-based masks
+ .setChannelMask(recordingFormat[1])
+ .setSampleRate(recordingFormat[2])
+ .build();
+ final AudioFormat deviceFormat = new AudioFormat.Builder()
+ .setEncoding(recordingFormat[3])
+ // FIXME this doesn't support index-based masks
+ .setChannelMask(recordingFormat[4])
+ .setSampleRate(recordingFormat[5])
+ .build();
if (mRecordConfigs.containsKey(new Integer(session))) {
// start of session that's already tracked, not worth an update
// TO DO in the future when tracking record format: there might be a record
@@ -126,7 +143,8 @@
return false;
} else {
mRecordConfigs.put(new Integer(session),
- new AudioRecordConfiguration(session, source));
+ new AudioRecordConfiguration(session, source,
+ clientFormat, deviceFormat));
return true;
}
default:
diff --git a/services/core/java/com/android/server/content/SyncManager.java b/services/core/java/com/android/server/content/SyncManager.java
index f7db1f7..95a9875 100644
--- a/services/core/java/com/android/server/content/SyncManager.java
+++ b/services/core/java/com/android/server/content/SyncManager.java
@@ -1319,7 +1319,7 @@
}
getJobScheduler().scheduleAsPackage(b.build(), syncOperation.owningPackage,
- syncOperation.target.userId);
+ syncOperation.target.userId, "sync");
}
/**
diff --git a/services/core/java/com/android/server/content/SyncOperation.java b/services/core/java/com/android/server/content/SyncOperation.java
index 957b087..804be4e 100644
--- a/services/core/java/com/android/server/content/SyncOperation.java
+++ b/services/core/java/com/android/server/content/SyncOperation.java
@@ -17,6 +17,7 @@
package com.android.server.content;
import android.accounts.Account;
+import android.app.job.JobInfo;
import android.content.pm.PackageManager;
import android.content.ContentResolver;
import android.os.Bundle;
@@ -320,11 +321,11 @@
int findPriority() {
if (isInitialization()) {
- return 2;
+ return JobInfo.PRIORITY_SYNC_INITIALIZATION;
} else if (isExpedited()) {
- return 1;
+ return JobInfo.PRIORITY_SYNC_EXPEDITED;
}
- return 0;
+ return JobInfo.PRIORITY_DEFAULT;
}
private String toKey() {
diff --git a/services/core/java/com/android/server/job/JobSchedulerService.java b/services/core/java/com/android/server/job/JobSchedulerService.java
index 42ecc06..536c75e 100644
--- a/services/core/java/com/android/server/job/JobSchedulerService.java
+++ b/services/core/java/com/android/server/job/JobSchedulerService.java
@@ -19,6 +19,7 @@
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
@@ -52,7 +53,9 @@
import android.util.Slog;
import android.util.SparseArray;
+import android.util.SparseBooleanArray;
import com.android.internal.app.IBatteryStats;
+import com.android.internal.util.ArrayUtils;
import com.android.server.DeviceIdleController;
import com.android.server.LocalServices;
import com.android.server.job.JobStore.JobStatusFunctor;
@@ -65,6 +68,8 @@
import com.android.server.job.controllers.StateController;
import com.android.server.job.controllers.TimeController;
+import libcore.util.EmptyArray;
+
/**
* Responsible for taking jobs representing work to be performed by a client app, and determining
* based on the criteria specified when that job should be run against the client application's
@@ -85,6 +90,8 @@
/** The number of concurrent jobs we run at one time. */
private static final int MAX_JOB_CONTEXTS_COUNT
= ActivityManager.isLowRamDeviceStatic() ? 3 : 6;
+ /** Enforce a per-app limit on scheduled jobs? */
+ private static final boolean ENFORCE_MAX_JOBS = false;
/** The maximum number of jobs that we allow an unprivileged app to schedule */
private static final int MAX_JOBS_PER_APP = 100;
@@ -139,7 +146,7 @@
*/
final ArrayList<JobStatus> mPendingJobs = new ArrayList<>();
- final ArrayList<Integer> mStartedUsers = new ArrayList<>();
+ int[] mStartedUsers = EmptyArray.INT;
final JobHandler mHandler;
final JobSchedulerStub mJobSchedulerStub;
@@ -159,11 +166,16 @@
boolean mDeviceIdleMode;
/**
- * What we last reported to DeviceIdleController about wheter we are active.
+ * What we last reported to DeviceIdleController about whether we are active.
*/
boolean mReportedActive;
/**
+ * Which uids are currently in the foreground.
+ */
+ final SparseBooleanArray mForegroundUids = new SparseBooleanArray();
+
+ /**
* Cleans up outstanding jobs when a package is removed. Even if it's being replaced later we
* still clean up. On reinstall the package will have a new uid.
*/
@@ -199,9 +211,11 @@
final private IUidObserver mUidObserver = new IUidObserver.Stub() {
@Override public void onUidStateChanged(int uid, int procState) throws RemoteException {
+ updateUidState(uid, procState);
}
@Override public void onUidGone(int uid) throws RemoteException {
+ updateUidState(uid, ActivityManager.PROCESS_STATE_CACHED_EMPTY);
}
@Override public void onUidActive(int uid) throws RemoteException {
@@ -218,14 +232,20 @@
@Override
public void onStartUser(int userHandle) {
- mStartedUsers.add(userHandle);
+ mStartedUsers = ArrayUtils.appendInt(mStartedUsers, userHandle);
+ // Let's kick any outstanding jobs for this user.
+ mHandler.obtainMessage(MSG_CHECK_JOB).sendToTarget();
+ }
+
+ @Override
+ public void onUnlockUser(int userHandle) {
// Let's kick any outstanding jobs for this user.
mHandler.obtainMessage(MSG_CHECK_JOB).sendToTarget();
}
@Override
public void onStopUser(int userHandle) {
- mStartedUsers.remove(Integer.valueOf(userHandle));
+ mStartedUsers = ArrayUtils.removeInt(mStartedUsers, userHandle);
}
/**
@@ -236,11 +256,12 @@
* @return Result of this operation. See <code>JobScheduler#RESULT_*</code> return codes.
*/
public int schedule(JobInfo job, int uId) {
- return scheduleAsPackage(job, uId, null, -1);
+ return scheduleAsPackage(job, uId, null, -1, null);
}
- public int scheduleAsPackage(JobInfo job, int uId, String packageName, int userId) {
- JobStatus jobStatus = JobStatus.createFromJobInfo(job, uId, packageName, userId);
+ public int scheduleAsPackage(JobInfo job, int uId, String packageName, int userId,
+ String tag) {
+ JobStatus jobStatus = JobStatus.createFromJobInfo(job, uId, packageName, userId, tag);
try {
if (ActivityManagerNative.getDefault().getAppStartMode(uId,
job.getService().getPackageName()) == ActivityManager.APP_START_MODE_DISABLED) {
@@ -254,7 +275,7 @@
JobStatus toCancel;
synchronized (mLock) {
// Jobs on behalf of others don't apply to the per-app job cap
- if (packageName == null) {
+ if (ENFORCE_MAX_JOBS && packageName == null) {
if (mJobs.countJobsForUid(uId) > MAX_JOBS_PER_APP) {
Slog.w(TAG, "Too many jobs for uid " + uId);
throw new IllegalStateException("Apps may not schedule more than "
@@ -353,6 +374,25 @@
}
}
+ void updateUidState(int uid, int procState) {
+ synchronized (mLock) {
+ boolean foreground = procState <= ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE;
+ boolean changed = false;
+ if (foreground) {
+ if (!mForegroundUids.get(uid)) {
+ changed = true;
+ mForegroundUids.put(uid, true);
+ }
+ } else {
+ int index = mForegroundUids.indexOfKey(uid);
+ if (index >= 0) {
+ mForegroundUids.removeAt(index);
+ changed = true;
+ }
+ }
+ }
+ }
+
void updateIdleMode(boolean enabled) {
boolean changed = false;
boolean rocking;
@@ -462,7 +502,8 @@
mPowerManager = (PowerManager)getContext().getSystemService(Context.POWER_SERVICE);
try {
ActivityManagerNative.getDefault().registerUidObserver(mUidObserver,
- ActivityManager.UID_OBSERVER_IDLE);
+ ActivityManager.UID_OBSERVER_PROCSTATE | ActivityManager.UID_OBSERVER_GONE
+ | ActivityManager.UID_OBSERVER_IDLE);
} catch (RemoteException e) {
// ignored; both services live in system_server
}
@@ -905,18 +946,31 @@
* - It's not pending.
* - It's not already running on a JSC.
* - The user that requested the job is running.
+ * - The component is enabled and runnable.
*/
private boolean isReadyToBeExecutedLocked(JobStatus job) {
final boolean jobReady = job.isReady();
final boolean jobPending = mPendingJobs.contains(job);
final boolean jobActive = isCurrentlyActiveLocked(job);
- final boolean userRunning = mStartedUsers.contains(job.getUserId());
+
+ final int userId = job.getUserId();
+ final boolean userStarted = ArrayUtils.contains(mStartedUsers, userId);
+ final boolean componentPresent;
+ try {
+ componentPresent = (AppGlobals.getPackageManager().getServiceInfo(
+ job.getServiceComponent(), PackageManager.MATCH_DEBUG_TRIAGED_MISSING,
+ userId) != null);
+ } catch (RemoteException e) {
+ throw e.rethrowAsRuntimeException();
+ }
+
if (DEBUG) {
Slog.v(TAG, "isReadyToBeExecutedLocked: " + job.toShortString()
+ " ready=" + jobReady + " pending=" + jobPending
- + " active=" + jobActive + " userRunning=" + userRunning);
+ + " active=" + jobActive + " userStarted=" + userStarted
+ + " componentPresent=" + componentPresent);
}
- return userRunning && jobReady && !jobPending && !jobActive;
+ return userStarted && componentPresent && jobReady && !jobPending && !jobActive;
}
/**
@@ -948,6 +1002,17 @@
}
}
+ private int evaluateJobPriorityLocked(JobStatus job) {
+ int priority = job.getPriority();
+ if (priority >= JobInfo.PRIORITY_FOREGROUND_APP) {
+ return priority;
+ }
+ if (mForegroundUids.get(job.getSourceUid())) {
+ return JobInfo.PRIORITY_FOREGROUND_APP;
+ }
+ return priority;
+ }
+
/**
* Takes jobs from pending queue and runs them on available contexts.
* If no contexts are available, preempts lower priority jobs to
@@ -984,6 +1049,8 @@
continue;
}
+ nextPending.lastEvaluatedPriority = evaluateJobPriorityLocked(nextPending);
+
// Find a context for nextPending. The context should be available OR
// it should have lowest priority among all running jobs
// (sharing the same Uid as nextPending)
@@ -1005,11 +1072,11 @@
if (job.getUid() != nextPending.getUid()) {
continue;
}
- if (job.getPriority() >= nextPending.getPriority()) {
+ if (evaluateJobPriorityLocked(job) >= nextPending.lastEvaluatedPriority) {
continue;
}
- if (minPriority > nextPending.getPriority()) {
- minPriority = nextPending.getPriority();
+ if (minPriority > nextPending.lastEvaluatedPriority) {
+ minPriority = nextPending.lastEvaluatedPriority;
minPriorityContextId = i;
}
}
@@ -1033,18 +1100,18 @@
mActiveServices.get(i).preemptExecutingJob();
preservePreferredUid = true;
} else {
+ final JobStatus pendingJob = contextIdToJobMap[i];
if (DEBUG) {
Slog.d(TAG, "About to run job on context "
- + String.valueOf(i) + ", job: " + contextIdToJobMap[i]);
+ + String.valueOf(i) + ", job: " + pendingJob);
}
for (int ic=0; ic<mControllers.size(); ic++) {
- StateController controller = mControllers.get(ic);
- controller.prepareForExecutionLocked(contextIdToJobMap[i]);
+ mControllers.get(ic).prepareForExecutionLocked(pendingJob);
}
- if (!mActiveServices.get(i).executeRunnableJob(contextIdToJobMap[i])) {
- Slog.d(TAG, "Error executing " + contextIdToJobMap[i]);
+ if (!mActiveServices.get(i).executeRunnableJob(pendingJob)) {
+ Slog.d(TAG, "Error executing " + pendingJob);
}
- mPendingJobs.remove(contextIdToJobMap[i]);
+ mPendingJobs.remove(pendingJob);
}
}
if (!preservePreferredUid) {
@@ -1143,7 +1210,7 @@
}
@Override
- public int scheduleAsPackage(JobInfo job, String packageName, int userId)
+ public int scheduleAsPackage(JobInfo job, String packageName, int userId, String tag)
throws RemoteException {
final int callerUid = Binder.getCallingUid();
if (DEBUG) {
@@ -1165,7 +1232,7 @@
long ident = Binder.clearCallingIdentity();
try {
return JobSchedulerService.this.scheduleAsPackage(job, callerUid,
- packageName, userId);
+ packageName, userId, tag);
} finally {
Binder.restoreCallingIdentity(ident);
}
@@ -1251,11 +1318,7 @@
void dumpInternal(final PrintWriter pw) {
final long now = SystemClock.elapsedRealtime();
synchronized (mLock) {
- pw.print("Started users: ");
- for (int i=0; i<mStartedUsers.size(); i++) {
- pw.print("u" + mStartedUsers.get(i) + " ");
- }
- pw.println();
+ pw.println("Started users: " + Arrays.toString(mStartedUsers));
pw.println("Registered jobs:");
if (mJobs.size() > 0) {
mJobs.forEachJob(new JobStatusFunctor() {
@@ -1275,7 +1338,7 @@
pw.print(" active=");
pw.print(isCurrentlyActiveLocked(job));
pw.print(" user=");
- pw.print(mStartedUsers.contains(job.getUserId()));
+ pw.print(ArrayUtils.contains(mStartedUsers, job.getUserId()));
pw.println(")");
}
});
@@ -1287,7 +1350,22 @@
mControllers.get(i).dumpControllerStateLocked(pw);
}
pw.println();
- pw.println(printPendingQueue());
+ pw.println("Foreground uids:");
+ for (int i=0; i<mForegroundUids.size(); i++) {
+ pw.print(" "); pw.println(UserHandle.formatUid(mForegroundUids.keyAt(i)));
+ }
+ pw.println();
+ pw.println("Pending queue:");
+ for (int i=0; i<mPendingJobs.size(); i++) {
+ JobStatus job = mPendingJobs.get(i);
+ pw.print(" Pending #"); pw.print(i); pw.print(": ");
+ pw.println(job.toShortString());
+ int priority = evaluateJobPriorityLocked(job);
+ if (priority != JobInfo.PRIORITY_DEFAULT) {
+ pw.print(" Evaluated priority: "); pw.println(priority);
+ }
+ pw.print(" Tag: "); pw.println(job.getTag());
+ }
pw.println();
pw.println("Active jobs:");
for (int i=0; i<mActiveServices.size(); i++) {
@@ -1303,6 +1381,10 @@
pw.print(" fromnow=");
pw.println(timeout-now);
jsc.getRunningJob().dump(pw, " ");
+ int priority = evaluateJobPriorityLocked(jsc.getRunningJob());
+ if (priority != JobInfo.PRIORITY_DEFAULT) {
+ pw.print(" Evaluated priority: "); pw.println(priority);
+ }
}
}
pw.println();
diff --git a/services/core/java/com/android/server/job/JobServiceContext.java b/services/core/java/com/android/server/job/JobServiceContext.java
index 48549ce..4239248 100644
--- a/services/core/java/com/android/server/job/JobServiceContext.java
+++ b/services/core/java/com/android/server/job/JobServiceContext.java
@@ -204,7 +204,7 @@
return false;
}
try {
- mBatteryStats.noteJobStart(job.getName(), job.getSourceUid());
+ mBatteryStats.noteJobStart(job.getBatteryName(), job.getSourceUid());
} catch (RemoteException e) {
// Whatever.
}
@@ -369,6 +369,13 @@
}
break;
case MSG_CANCEL:
+ if (mVerb == VERB_FINISHED) {
+ if (DEBUG) {
+ Slog.d(TAG,
+ "Trying to process cancel for torn-down context, ignoring.");
+ }
+ return;
+ }
mParams.setStopReason(message.arg1);
if (message.arg1 == JobParameters.REASON_PREEMPT) {
mPreferredUid = mRunningJob != null ? mRunningJob.getUid() :
@@ -478,12 +485,6 @@
* _ENDING -> No point in doing anything here, so we ignore.
*/
private void handleCancelH() {
- if (mRunningJob == null) {
- if (DEBUG) {
- Slog.d(TAG, "Trying to process cancel for torn-down context, ignoring.");
- }
- return;
- }
if (JobSchedulerService.DEBUG) {
Slog.d(TAG, "Handling cancel for: " + mRunningJob.getJobId() + " "
+ VERB_STRINGS[mVerb]);
@@ -511,7 +512,6 @@
/** Process MSG_TIMEOUT here. */
private void handleOpTimeoutH() {
- mParams.setStopReason(JobParameters.REASON_TIMEOUT);
switch (mVerb) {
case VERB_BINDING:
Slog.e(TAG, "Time-out while trying to bind " + mRunningJob.toShortString() +
@@ -536,6 +536,7 @@
// Not an error - client ran out of time.
Slog.i(TAG, "Client timed out while executing (no jobFinished received)." +
" sending onStop. " + mRunningJob.toShortString());
+ mParams.setStopReason(JobParameters.REASON_TIMEOUT);
sendStopMessageH();
break;
default:
@@ -580,7 +581,8 @@
}
completedJob = mRunningJob;
try {
- mBatteryStats.noteJobFinish(mRunningJob.getName(), mRunningJob.getSourceUid());
+ mBatteryStats.noteJobFinish(mRunningJob.getBatteryName(),
+ mRunningJob.getSourceUid());
} catch (RemoteException e) {
// Whatever.
}
diff --git a/services/core/java/com/android/server/job/JobStore.java b/services/core/java/com/android/server/job/JobStore.java
index f8753d6..4268dab 100644
--- a/services/core/java/com/android/server/job/JobStore.java
+++ b/services/core/java/com/android/server/job/JobStore.java
@@ -323,6 +323,9 @@
if (jobStatus.getSourcePackageName() != null) {
out.attribute(null, "sourcePackageName", jobStatus.getSourcePackageName());
}
+ if (jobStatus.getSourceTag() != null) {
+ out.attribute(null, "sourceTag", jobStatus.getSourceTag());
+ }
out.attribute(null, "sourceUserId", String.valueOf(jobStatus.getSourceUserId()));
out.attribute(null, "uid", Integer.toString(jobStatus.getUid()));
out.attribute(null, "priority", String.valueOf(jobStatus.getPriority()));
@@ -542,6 +545,8 @@
final String sourcePackageName = parser.getAttributeValue(null, "sourcePackageName");
+ final String sourceTag = parser.getAttributeValue(null, "sourceTag");
+
int eventType;
// Read out constraints tag.
do {
@@ -656,7 +661,7 @@
parser.nextTag(); // Consume </extras>
JobStatus js = new JobStatus(
- jobBuilder.build(), uid, sourcePackageName, sourceUserId,
+ jobBuilder.build(), uid, sourcePackageName, sourceUserId, sourceTag,
elapsedRuntimes.first, elapsedRuntimes.second);
return js;
}
diff --git a/services/core/java/com/android/server/job/controllers/JobStatus.java b/services/core/java/com/android/server/job/controllers/JobStatus.java
index f835069..e6fbc39 100644
--- a/services/core/java/com/android/server/job/controllers/JobStatus.java
+++ b/services/core/java/com/android/server/job/controllers/JobStatus.java
@@ -58,12 +58,14 @@
final JobInfo job;
/** Uid of the package requesting this job. */
final int callingUid;
- final String name;
- final String tag;
+ final String batteryName;
final String sourcePackageName;
final int sourceUserId;
final int sourceUid;
+ final String sourceTag;
+
+ final String tag;
/**
* Earliest point in the future at which this job will be eligible to run. A value of 0
@@ -87,6 +89,8 @@
public ArraySet<Uri> changedUris;
public ArraySet<String> changedAuthorities;
+ public int lastEvaluatedPriority;
+
/**
* For use only by ContentObserverController: state it is maintaining about content URIs
* being observed.
@@ -99,12 +103,10 @@
}
private JobStatus(JobInfo job, int callingUid, String sourcePackageName,
- int sourceUserId, int numFailures, long earliestRunTimeElapsedMillis,
+ int sourceUserId, String tag, int numFailures, long earliestRunTimeElapsedMillis,
long latestRunTimeElapsedMillis) {
this.job = job;
this.callingUid = callingUid;
- this.name = job.getService().flattenToShortString();
- this.tag = "*job*/" + this.name;
int tempSourceUid = -1;
if (sourceUserId != -1 && sourcePackageName != null) {
@@ -119,12 +121,25 @@
this.sourceUid = callingUid;
this.sourceUserId = UserHandle.getUserId(callingUid);
this.sourcePackageName = job.getService().getPackageName();
+ this.sourceTag = null;
} else {
this.sourceUid = tempSourceUid;
this.sourceUserId = sourceUserId;
this.sourcePackageName = sourcePackageName;
+ this.sourceTag = tag;
}
+ if (this.sourceTag != null) {
+ StringBuilder sb = new StringBuilder();
+ sb.append(job.getService().getPackageName());
+ sb.append('/');
+ sb.append(this.sourceTag);
+ this.batteryName = sb.toString();
+ } else {
+ this.batteryName = job.getService().flattenToShortString();
+ }
+ this.tag = "*job*/" + this.batteryName;
+
this.earliestRunTimeElapsedMillis = earliestRunTimeElapsedMillis;
this.latestRunTimeElapsedMillis = latestRunTimeElapsedMillis;
this.numFailures = numFailures;
@@ -158,8 +173,8 @@
public JobStatus(JobStatus jobStatus) {
this(jobStatus.getJob(), jobStatus.getUid(),
jobStatus.getSourcePackageName(), jobStatus.getSourceUserId(),
- jobStatus.getNumFailures(), jobStatus.getEarliestRunTime(),
- jobStatus.getLatestRunTimeElapsed());
+ jobStatus.getSourceTag(), jobStatus.getNumFailures(),
+ jobStatus.getEarliestRunTime(), jobStatus.getLatestRunTimeElapsed());
}
/**
@@ -169,18 +184,18 @@
* wallclock runtime rather than resetting it on every boot.
* We consider a freshly loaded job to no longer be in back-off.
*/
- public JobStatus(JobInfo job, int callingUid, String sourcePackageName,
- int sourceUserId, long earliestRunTimeElapsedMillis, long latestRunTimeElapsedMillis) {
- this(job, callingUid, sourcePackageName, sourceUserId, 0, earliestRunTimeElapsedMillis,
- latestRunTimeElapsedMillis);
+ public JobStatus(JobInfo job, int callingUid, String sourcePackageName, int sourceUserId,
+ String sourceTag, long earliestRunTimeElapsedMillis, long latestRunTimeElapsedMillis) {
+ this(job, callingUid, sourcePackageName, sourceUserId, sourceTag, 0,
+ earliestRunTimeElapsedMillis, latestRunTimeElapsedMillis);
}
/** Create a new job to be rescheduled with the provided parameters. */
public JobStatus(JobStatus rescheduling, long newEarliestRuntimeElapsedMillis,
long newLatestRuntimeElapsedMillis, int backoffAttempt) {
this(rescheduling.job, rescheduling.getUid(),
- rescheduling.getSourcePackageName(),
- rescheduling.getSourceUserId(), backoffAttempt, newEarliestRuntimeElapsedMillis,
+ rescheduling.getSourcePackageName(), rescheduling.getSourceUserId(),
+ rescheduling.getSourceTag(), backoffAttempt, newEarliestRuntimeElapsedMillis,
newLatestRuntimeElapsedMillis);
}
@@ -192,7 +207,7 @@
* @param sourceUserId User id for whom this job is scheduled. -1 indicates this is same as the
*/
public static JobStatus createFromJobInfo(JobInfo job, int callingUid, String sourcePackageName,
- int sourceUserId) {
+ int sourceUserId, String tag) {
final long elapsedNow = SystemClock.elapsedRealtime();
final long earliestRunTimeElapsedMillis, latestRunTimeElapsedMillis;
if (job.isPeriodic()) {
@@ -204,7 +219,7 @@
latestRunTimeElapsedMillis = job.hasLateConstraint() ?
elapsedNow + job.getMaxExecutionDelayMillis() : NO_LATEST_RUNTIME;
}
- return new JobStatus(job, callingUid, sourcePackageName, sourceUserId, 0,
+ return new JobStatus(job, callingUid, sourcePackageName, sourceUserId, tag, 0,
earliestRunTimeElapsedMillis, latestRunTimeElapsedMillis);
}
@@ -240,12 +255,16 @@
return UserHandle.getUserId(callingUid);
}
+ public String getSourceTag() {
+ return sourceTag;
+ }
+
public int getUid() {
return callingUid;
}
- public String getName() {
- return name;
+ public String getBatteryName() {
+ return batteryName;
}
public String getTag() {
diff --git a/services/core/java/com/android/server/media/MediaSessionRecord.java b/services/core/java/com/android/server/media/MediaSessionRecord.java
index 862c061..29c54e9 100644
--- a/services/core/java/com/android/server/media/MediaSessionRecord.java
+++ b/services/core/java/com/android/server/media/MediaSessionRecord.java
@@ -77,6 +77,8 @@
*/
private static final int OPTIMISTIC_VOLUME_TIMEOUT = 1000;
+ private static final int UID_NOT_SET = -1;
+
private final MessageHandler mHandler;
private final int mOwnerPid;
@@ -122,6 +124,9 @@
private boolean mIsActive = false;
private boolean mDestroyed = false;
+ private int mCallingUid = UID_NOT_SET;
+ private String mCallingPackage;
+
public MediaSessionRecord(int ownerPid, int ownerUid, int userId, String ownerPackageName,
ISessionCallback cb, String tag, MediaSessionService service, Handler handler) {
mOwnerPid = ownerPid;
@@ -419,7 +424,9 @@
return mSessionCb.mCb;
}
- public void sendMediaButton(KeyEvent ke, int sequenceId, ResultReceiver cb) {
+ public void sendMediaButton(KeyEvent ke, int sequenceId,
+ ResultReceiver cb, int uid, String packageName) {
+ updateCallingPackage(uid, packageName);
mSessionCb.sendMediaButton(ke, sequenceId, cb);
}
@@ -680,6 +687,33 @@
return -1;
}
+ private void updateCallingPackage() {
+ updateCallingPackage(UID_NOT_SET, null);
+ }
+
+ private void updateCallingPackage(int uid, String packageName) {
+ if (uid == UID_NOT_SET) {
+ uid = Binder.getCallingUid();
+ }
+ synchronized (mLock) {
+ if (mCallingUid == UID_NOT_SET || mCallingUid != uid) {
+ mCallingUid = uid;
+ mCallingPackage = packageName;
+ if (mCallingPackage != null) {
+ return;
+ }
+ Context context = mService.getContext();
+ if (context == null) {
+ return;
+ }
+ String[] packages = context.getPackageManager().getPackagesForUid(uid);
+ if (packages != null && packages.length > 0) {
+ mCallingPackage = packages[0];
+ }
+ }
+ }
+ }
+
private final Runnable mClearOptimisticVolumeRunnable = new Runnable() {
@Override
public void run() {
@@ -831,6 +865,11 @@
mHandler.post(MessageHandler.MSG_UPDATE_VOLUME);
}
}
+
+ @Override
+ public String getCallingPackage() {
+ return mCallingPackage;
+ }
}
class SessionCb {
@@ -1025,11 +1064,13 @@
@Override
public void sendCommand(String command, Bundle args, ResultReceiver cb)
throws RemoteException {
+ updateCallingPackage();
mSessionCb.sendCommand(command, args, cb);
}
@Override
public boolean sendMediaButton(KeyEvent mediaButtonIntent) {
+ updateCallingPackage();
return mSessionCb.sendMediaButton(mediaButtonIntent, 0, null);
}
@@ -1111,6 +1152,7 @@
@Override
public void adjustVolume(int direction, int flags, String packageName) {
+ updateCallingPackage();
int uid = Binder.getCallingUid();
final long token = Binder.clearCallingIdentity();
try {
@@ -1122,6 +1164,7 @@
@Override
public void setVolumeTo(int value, int flags, String packageName) {
+ updateCallingPackage();
int uid = Binder.getCallingUid();
final long token = Binder.clearCallingIdentity();
try {
@@ -1133,94 +1176,111 @@
@Override
public void prepare() throws RemoteException {
+ updateCallingPackage();
mSessionCb.prepare();
}
@Override
public void prepareFromMediaId(String mediaId, Bundle extras)
throws RemoteException {
+ updateCallingPackage();
mSessionCb.prepareFromMediaId(mediaId, extras);
}
@Override
public void prepareFromSearch(String query, Bundle extras) throws RemoteException {
+ updateCallingPackage();
mSessionCb.prepareFromSearch(query, extras);
}
@Override
public void prepareFromUri(Uri uri, Bundle extras) throws RemoteException {
+ updateCallingPackage();
mSessionCb.prepareFromUri(uri, extras);
}
@Override
public void play() throws RemoteException {
+ updateCallingPackage();
mSessionCb.play();
}
@Override
public void playFromMediaId(String mediaId, Bundle extras) throws RemoteException {
+ updateCallingPackage();
mSessionCb.playFromMediaId(mediaId, extras);
}
@Override
public void playFromSearch(String query, Bundle extras) throws RemoteException {
+ updateCallingPackage();
mSessionCb.playFromSearch(query, extras);
}
@Override
public void playFromUri(Uri uri, Bundle extras) throws RemoteException {
+ updateCallingPackage();
mSessionCb.playFromUri(uri, extras);
}
@Override
public void skipToQueueItem(long id) {
+ updateCallingPackage();
mSessionCb.skipToTrack(id);
}
-
@Override
public void pause() throws RemoteException {
+ updateCallingPackage();
mSessionCb.pause();
}
@Override
public void stop() throws RemoteException {
+ updateCallingPackage();
mSessionCb.stop();
}
@Override
public void next() throws RemoteException {
+ updateCallingPackage();
mSessionCb.next();
}
@Override
public void previous() throws RemoteException {
+ updateCallingPackage();
mSessionCb.previous();
}
@Override
public void fastForward() throws RemoteException {
+ updateCallingPackage();
mSessionCb.fastForward();
}
@Override
public void rewind() throws RemoteException {
+ updateCallingPackage();
mSessionCb.rewind();
}
@Override
public void seekTo(long pos) throws RemoteException {
+ updateCallingPackage();
mSessionCb.seekTo(pos);
}
@Override
public void rate(Rating rating) throws RemoteException {
+ updateCallingPackage();
mSessionCb.rate(rating);
}
@Override
public void sendCustomAction(String action, Bundle args)
throws RemoteException {
+ updateCallingPackage();
mSessionCb.sendCustomAction(action, args);
}
diff --git a/services/core/java/com/android/server/media/MediaSessionService.java b/services/core/java/com/android/server/media/MediaSessionService.java
index 745f476..e3c540a5 100644
--- a/services/core/java/com/android/server/media/MediaSessionService.java
+++ b/services/core/java/com/android/server/media/MediaSessionService.java
@@ -946,7 +946,8 @@
// won't release it later
session.sendMediaButton(keyEvent,
needWakeLock ? mKeyEventReceiver.mLastTimeoutId : -1,
- mKeyEventReceiver);
+ mKeyEventReceiver, getContext().getApplicationInfo().uid,
+ getContext().getPackageName());
} else {
// Launch the last PendingIntent we had with priority
UserRecord user = mUserRecords.get(mCurrentUserId);
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 95198a3..c337c573 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -2307,7 +2307,7 @@
synchronized (mNotificationList) {
final StatusBarNotification n = r.sbn;
- Slog.d(TAG, "EnqueueNotificationRunnable.run for: " + n.getKey());
+ if (DBG) Slog.d(TAG, "EnqueueNotificationRunnable.run for: " + n.getKey());
NotificationRecord old = mNotificationsByKey.get(n.getKey());
if (old != null) {
// Retain ranking information from previous record
@@ -2328,7 +2328,7 @@
handleGroupedNotificationLocked(r, old, callingUid, callingPid);
boolean ignoreNotification =
removeUnusedGroupedNotificationLocked(r, old, callingUid, callingPid);
- Slog.d(TAG, "ignoreNotification is " + ignoreNotification);
+ if (DBG) Slog.d(TAG, "ignoreNotification is " + ignoreNotification);
// This conditional is a dirty hack to limit the logging done on
// behalf of the download manager without affecting other apps.
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java
index 25d17f6..6c5685d 100644
--- a/services/core/java/com/android/server/notification/NotificationRecord.java
+++ b/services/core/java/com/android/server/notification/NotificationRecord.java
@@ -227,12 +227,14 @@
final int N = notification.actions.length;
for (int i=0; i<N; i++) {
final Notification.Action action = notification.actions[i];
- pw.println(String.format("%s [%d] \"%s\" -> %s",
- prefix,
- i,
- action.title,
- action.actionIntent.toString()
- ));
+ if (action != null) {
+ pw.println(String.format("%s [%d] \"%s\" -> %s",
+ prefix,
+ i,
+ action.title,
+ action.actionIntent == null ? "null" : action.actionIntent.toString()
+ ));
+ }
}
pw.println(prefix + " }");
}
diff --git a/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java b/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
index e7c2f6f..9a5a183 100644
--- a/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
+++ b/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java
@@ -35,6 +35,7 @@
import android.provider.ContactsContract;
import android.provider.MediaStore;
import android.provider.Telephony.Sms.Intents;
+import android.telephony.TelephonyManager;
import android.security.Credentials;
import android.util.ArraySet;
import android.util.Log;
@@ -584,6 +585,16 @@
grantRuntimePermissionsLPw(printSpoolerPackage, LOCATION_PERMISSIONS, true, userId);
}
+ // EmergencyInfo
+ Intent emergencyInfoIntent = new Intent(TelephonyManager.ACTION_EMERGENCY_ASSISTANCE);
+ PackageParser.Package emergencyInfoPckg = getDefaultSystemHandlerActivityPackageLPr(
+ emergencyInfoIntent, userId);
+ if (emergencyInfoPckg != null
+ && doesPackageSupportRuntimePermissions(emergencyInfoPckg)) {
+ grantRuntimePermissionsLPw(emergencyInfoPckg, CONTACTS_PERMISSIONS, true, userId);
+ grantRuntimePermissionsLPw(emergencyInfoPckg, PHONE_PERMISSIONS, true, userId);
+ }
+
mService.mSettings.onDefaultRuntimePermissionsGrantedLPr(userId);
}
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 41077d0..3f06c78 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -5001,8 +5001,9 @@
// cross-profile app linking works only towards the parent.
final UserInfo parent = getProfileParent(sourceUserId);
synchronized(mPackages) {
+ int flags = updateFlagsForResolve(0, parent.id, intent);
CrossProfileDomainInfo xpDomainInfo = getCrossProfileDomainPreferredLpr(
- intent, resolvedType, 0, sourceUserId, parent.id);
+ intent, resolvedType, flags, sourceUserId, parent.id);
return xpDomainInfo != null;
}
}
@@ -10667,14 +10668,14 @@
pkgSetting.setInstalled(true, userId);
pkgSetting.setHidden(false, userId);
mSettings.writePackageRestrictionsLPr(userId);
- if (pkgSetting.pkg != null) {
- prepareAppDataAfterInstall(pkgSetting.pkg);
- }
installed = true;
}
}
if (installed) {
+ if (pkgSetting.pkg != null) {
+ prepareAppDataAfterInstall(pkgSetting.pkg);
+ }
sendPackageAddedForUser(packageName, pkgSetting, userId);
}
} finally {
@@ -10725,7 +10726,7 @@
}
appId = pkgSetting.appId;
if (pkgSetting.getSuspended(userId) != suspended) {
- if (!canSuspendPackageForUser(packageName, userId)) {
+ if (!canSuspendPackageForUserLocked(packageName, userId)) {
unactionedPackages.add(packageName);
continue;
}
@@ -10764,7 +10765,7 @@
}
// TODO: investigate and add more restrictions for suspending crucial packages.
- private boolean canSuspendPackageForUser(String packageName, int userId) {
+ private boolean canSuspendPackageForUserLocked(String packageName, int userId) {
if (isPackageDeviceAdmin(packageName, userId)) {
Slog.w(TAG, "Not suspending/un-suspending package \"" + packageName
+ "\": has active device admin");
@@ -10778,6 +10779,13 @@
return false;
}
+ final PackageParser.Package pkg = mPackages.get(packageName);
+ if (pkg != null && isPrivilegedApp(pkg)) {
+ Slog.w(TAG, "Not suspending/un-suspending package \"" + packageName
+ + "\" because it is a privileged app");
+ return false;
+ }
+
return true;
}
@@ -11566,20 +11574,41 @@
boolean onSd = (installFlags & PackageManager.INSTALL_EXTERNAL) != 0;
// reader
synchronized (mPackages) {
- PackageParser.Package pkg = mPackages.get(packageName);
- if (pkg != null) {
- if ((installFlags & PackageManager.INSTALL_REPLACE_EXISTING) != 0) {
- // Check for downgrading.
- if ((installFlags & PackageManager.INSTALL_ALLOW_DOWNGRADE) == 0) {
- try {
- checkDowngrade(pkg, pkgLite);
- } catch (PackageManagerException e) {
- Slog.w(TAG, "Downgrade detected: " + e.getMessage());
- return PackageHelper.RECOMMEND_FAILED_VERSION_DOWNGRADE;
- }
+ // Currently installed package which the new package is attempting to replace or
+ // null if no such package is installed.
+ PackageParser.Package installedPkg = mPackages.get(packageName);
+ // Package which currently owns the data which the new package will own if installed.
+ // If an app is unstalled while keeping data (e.g., adb uninstall -k), installedPkg
+ // will be null whereas dataOwnerPkg will contain information about the package
+ // which was uninstalled while keeping its data.
+ PackageParser.Package dataOwnerPkg = installedPkg;
+ if (dataOwnerPkg == null) {
+ PackageSetting ps = mSettings.mPackages.get(packageName);
+ if (ps != null) {
+ dataOwnerPkg = ps.pkg;
+ }
+ }
+
+ if (dataOwnerPkg != null) {
+ // If installed, the package will get access to data left on the device by its
+ // predecessor. As a security measure, this is permited only if this is not a
+ // version downgrade or if the predecessor package is marked as debuggable and
+ // a downgrade is explicitly requested.
+ if (((dataOwnerPkg.applicationInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) == 0)
+ || ((installFlags & PackageManager.INSTALL_ALLOW_DOWNGRADE) == 0)) {
+ try {
+ checkDowngrade(dataOwnerPkg, pkgLite);
+ } catch (PackageManagerException e) {
+ Slog.w(TAG, "Downgrade detected: " + e.getMessage());
+ return PackageHelper.RECOMMEND_FAILED_VERSION_DOWNGRADE;
}
+ }
+ }
+
+ if (installedPkg != null) {
+ if ((installFlags & PackageManager.INSTALL_REPLACE_EXISTING) != 0) {
// Check for updated system application.
- if ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
+ if ((installedPkg.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
if (onSd) {
Slog.w(TAG, "Cannot install update to system app on sdcard");
return PackageHelper.RECOMMEND_FAILED_INVALID_LOCATION;
@@ -11598,7 +11627,7 @@
// App explictly prefers external. Let policy decide
} else {
// Prefer previous location
- if (isExternal(pkg)) {
+ if (isExternal(installedPkg)) {
return PackageHelper.RECOMMEND_INSTALL_EXTERNAL;
}
return PackageHelper.RECOMMEND_INSTALL_INTERNAL;
@@ -18018,6 +18047,8 @@
* correct for all installed apps. If there is an ownership mismatch, it
* will try recovering system apps by wiping data; third-party app data is
* left intact.
+ * <p>
+ * <em>Note: To avoid a deadlock, do not call this method with {@code mPackages} lock held</em>
*/
private void prepareAppDataAfterInstall(PackageParser.Package pkg) {
prepareAppDataAfterInstallInternal(pkg);
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 26a1941..e1a0299 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -576,6 +576,7 @@
boolean mConsumeSearchKeyUp;
boolean mAssistKeyLongPressed;
boolean mPendingMetaAction;
+ boolean mForceShowSystemBars;
// support for activating the lock screen while the screen is on
boolean mAllowLockscreenWhenOn;
@@ -3608,7 +3609,7 @@
}
@Override
- public void getInsetHintLw(WindowManager.LayoutParams attrs, int displayRotation,
+ public boolean getInsetHintLw(WindowManager.LayoutParams attrs, int displayRotation,
Rect outContentInsets, Rect outStableInsets, Rect outOutsets) {
final int fl = PolicyControl.getWindowFlags(null, attrs);
final int sysuiVis = PolicyControl.getSystemUiVisibility(null, attrs);
@@ -3663,10 +3664,11 @@
outStableInsets.set(mStableLeft, mStableTop,
availRight - mStableRight, availBottom - mStableBottom);
- return;
+ return mForceShowSystemBars;
}
outContentInsets.setEmpty();
outStableInsets.setEmpty();
+ return mForceShowSystemBars;
}
private boolean shouldUseOutsets(WindowManager.LayoutParams attrs, int fl) {
@@ -6103,6 +6105,12 @@
}
@Override
+ public boolean isNavBarForcedShownLw(WindowState windowState) {
+ return mForceShowSystemBars
+ && !windowState.getFrameLw().equals(windowState.getDisplayFrameLw());
+ }
+
+ @Override
public boolean isDockSideAllowed(int dockSide) {
// We do not allow all dock sides at which the navigation bar touches the docked stack.
@@ -6994,8 +7002,8 @@
// We need to force system bars when the docked stack is visible, when the freeform stack
// is visible but also when we are resizing for the transitions when docked stack
// visibility changes.
- final boolean forceShowSystemBars = dockedStackVisible || freeformStackVisible || resizing;
- final boolean forceOpaqueSystemBars = forceShowSystemBars && !mForceStatusBarFromKeyguard;
+ mForceShowSystemBars = dockedStackVisible || freeformStackVisible || resizing;
+ final boolean forceOpaqueSystemBars = mForceShowSystemBars && !mForceStatusBarFromKeyguard;
// apply translucent bar vis flags
WindowState transWin = isStatusBarKeyguard() && !mHideLockScreen
@@ -7043,11 +7051,11 @@
(vis & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0;
final boolean transientStatusBarAllowed = mStatusBar != null
- && (statusBarHasFocus || (!forceShowSystemBars
+ && (statusBarHasFocus || (!mForceShowSystemBars
&& (hideStatusBarWM || (hideStatusBarSysui && immersiveSticky))));
final boolean transientNavBarAllowed = mNavigationBar != null
- && !forceShowSystemBars && hideNavBarSysui && immersiveSticky;
+ && !mForceShowSystemBars && hideNavBarSysui && immersiveSticky;
final long now = SystemClock.uptimeMillis();
final boolean pendingPanic = mPendingPanicGestureUptime != 0
@@ -7064,7 +7072,7 @@
&& !transientStatusBarAllowed && hideStatusBarSysui;
final boolean denyTransientNav = mNavigationBarController.isTransientShowRequested()
&& !transientNavBarAllowed;
- if (denyTransientStatus || denyTransientNav || forceShowSystemBars) {
+ if (denyTransientStatus || denyTransientNav || mForceShowSystemBars) {
// clear the clearable flags instead
clearClearableFlagsLw();
vis &= ~View.SYSTEM_UI_CLEARABLE_FLAGS;
diff --git a/services/core/java/com/android/server/twilight/TwilightService.java b/services/core/java/com/android/server/twilight/TwilightService.java
index ac1ab64..6158c92 100644
--- a/services/core/java/com/android/server/twilight/TwilightService.java
+++ b/services/core/java/com/android/server/twilight/TwilightService.java
@@ -115,14 +115,14 @@
getContext().registerReceiver(mReceiver, filter);
publishLocalService(TwilightManager.class, mService);
- getContext().getContentResolver().registerContentObserver(
- Secure.getUriFor(Secure.TWILIGHT_MODE), false, mContentObserver, mCurrentUser);
- mContentObserver.onChange(true);
}
@Override
public void onBootPhase(int phase) {
if (phase == PHASE_BOOT_COMPLETED) {
+ getContext().getContentResolver().registerContentObserver(
+ Secure.getUriFor(Secure.TWILIGHT_MODE), false, mContentObserver, mCurrentUser);
+ mContentObserver.onChange(true);
mBootCompleted = true;
sendBroadcast();
}
diff --git a/services/core/java/com/android/server/webkit/WebViewUpdateService.java b/services/core/java/com/android/server/webkit/WebViewUpdateService.java
index 5d0c22e..9c770e1 100644
--- a/services/core/java/com/android/server/webkit/WebViewUpdateService.java
+++ b/services/core/java/com/android/server/webkit/WebViewUpdateService.java
@@ -23,13 +23,18 @@
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.ApplicationInfo;
+import android.content.pm.IPackageDeleteObserver;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
+import android.content.pm.UserInfo;
import android.os.Binder;
+import android.os.PatternMatcher;
import android.os.Process;
import android.os.RemoteException;
+import android.os.ResultReceiver;
import android.os.UserHandle;
+import android.os.UserManager;
import android.provider.Settings;
import android.provider.Settings.Global;
import android.util.AndroidRuntimeException;
@@ -41,6 +46,7 @@
import com.android.server.SystemService;
+import java.io.FileDescriptor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
@@ -102,12 +108,29 @@
return;
}
+ // Ensure that we only heed PACKAGE_CHANGED intents if they change an entire
+ // package, not just a component
+ if (intent.getAction().equals(Intent.ACTION_PACKAGE_CHANGED)) {
+ if (!WebViewFactory.entirePackageChanged(intent)) {
+ return;
+ }
+ }
+
+ if (intent.getAction().equals(Intent.ACTION_USER_ADDED)) {
+ int userId =
+ intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL);
+ handleNewUser(userId);
+ return;
+ }
+
+ updateFallbackState(context, intent);
+
for (WebViewProviderInfo provider : WebViewFactory.getWebViewPackages()) {
String webviewPackage = "package:" + provider.packageName;
if (webviewPackage.equals(intent.getDataString())) {
boolean updateWebView = false;
- boolean removedOldPackage = false;
+ boolean removedOrChangedOldPackage = false;
String oldProviderName = null;
PackageInfo newPackage = null;
synchronized(WebViewUpdateService.this) {
@@ -125,7 +148,7 @@
|| mCurrentWebViewPackage == null;
// We removed the old package if we received an intent to remove
// or replace the old package.
- removedOldPackage =
+ removedOrChangedOldPackage =
provider.packageName.equals(oldProviderName);
if (updateWebView) {
onWebViewProviderChanged(newPackage);
@@ -135,7 +158,8 @@
"relro with " + e);
}
}
- if(updateWebView && !removedOldPackage && oldProviderName != null) {
+ if(updateWebView && !removedOrChangedOldPackage
+ && oldProviderName != null) {
// If the provider change is the result of adding or replacing a
// package that was not the previous provider then we must kill
// packages dependent on the old package ourselves. The framework
@@ -154,12 +178,167 @@
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_PACKAGE_ADDED);
filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
+ filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
filter.addDataScheme("package");
+ // Make sure we only receive intents for WebView packages from our config file.
+ for (WebViewProviderInfo provider : WebViewFactory.getWebViewPackages()) {
+ filter.addDataSchemeSpecificPart(provider.packageName, PatternMatcher.PATTERN_LITERAL);
+ }
getContext().registerReceiver(mWebViewUpdatedReceiver, filter);
+ IntentFilter userAddedFilter = new IntentFilter();
+ userAddedFilter.addAction(Intent.ACTION_USER_ADDED);
+ getContext().registerReceiver(mWebViewUpdatedReceiver, userAddedFilter);
+
publishBinderService("webviewupdate", new BinderService());
}
+ private static boolean existsValidNonFallbackProvider(WebViewProviderInfo[] providers) {
+ for (WebViewProviderInfo provider : providers) {
+ if (provider.isAvailableByDefault() && provider.isEnabled()
+ && provider.isValidProvider() && !provider.isFallbackPackage()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static void enablePackageForUser(String packageName, boolean enable, int userId) {
+ try {
+ AppGlobals.getPackageManager().setApplicationEnabledSetting(
+ packageName,
+ enable ? PackageManager.COMPONENT_ENABLED_STATE_DEFAULT :
+ PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER, 0,
+ userId, null);
+ } catch (RemoteException e) {
+ Slog.w(TAG, "Tried to disable " + packageName + " for user " + userId + ": " + e);
+ }
+ }
+
+ /**
+ * Called when a new user has been added to update the state of its fallback package.
+ */
+ void handleNewUser(int userId) {
+ if (!isFallbackLogicEnabled()) return;
+
+ WebViewProviderInfo[] webviewProviders = WebViewFactory.getWebViewPackages();
+ WebViewProviderInfo fallbackProvider = getFallbackProvider(webviewProviders);
+ if (fallbackProvider == null) return;
+ boolean existsValidNonFallbackProvider =
+ existsValidNonFallbackProvider(webviewProviders);
+
+ enablePackageForUser(fallbackProvider.packageName, !existsValidNonFallbackProvider,
+ userId);
+ }
+
+ /**
+ * Handle the enabled-state of our fallback package, i.e. if there exists some non-fallback
+ * package that is valid (and available by default) then disable the fallback package,
+ * otherwise, enable the fallback package.
+ */
+ void updateFallbackState(final Context context, final Intent intent) {
+ if (!isFallbackLogicEnabled()) return;
+
+ WebViewProviderInfo[] webviewProviders = WebViewFactory.getWebViewPackages();
+
+ if (intent != null && (intent.getAction().equals(Intent.ACTION_PACKAGE_ADDED)
+ || intent.getAction().equals(Intent.ACTION_PACKAGE_CHANGED))) {
+ // A package was changed / updated / downgraded, early out if it is not one of the
+ // webview packages that are available by default.
+ String changedPackage = null;
+ for (WebViewProviderInfo provider : webviewProviders) {
+ String webviewPackage = "package:" + provider.packageName;
+ if (webviewPackage.equals(intent.getDataString())) {
+ if (provider.isAvailableByDefault()) {
+ changedPackage = provider.packageName;
+ }
+ break;
+ }
+ }
+ if (changedPackage == null) return;
+ }
+
+ // If there exists a valid and enabled non-fallback package - disable the fallback
+ // package, otherwise, enable it.
+ WebViewProviderInfo fallbackProvider = getFallbackProvider(webviewProviders);
+ if (fallbackProvider == null) return;
+ boolean existsValidNonFallbackProvider = existsValidNonFallbackProvider(webviewProviders);
+
+ if (existsValidNonFallbackProvider
+ // During an OTA the primary user's WebView state might differ from other users', so
+ // ignore the state of that user during boot.
+ && (fallbackProvider.isEnabled() || intent == null)) {
+ // Uninstall and disable fallback package for all users.
+ context.getPackageManager().deletePackage(fallbackProvider.packageName,
+ new IPackageDeleteObserver.Stub() {
+ public void packageDeleted(String packageName, int returnCode) {
+ // Ignore returnCode since the deletion could fail, e.g. we might be trying
+ // to delete a non-updated system-package (and we should still disable the
+ // package)
+ UserManager userManager =
+ (UserManager)context.getSystemService(Context.USER_SERVICE);
+ // Disable the fallback package for all users.
+ for(UserInfo userInfo : userManager.getUsers()) {
+ enablePackageForUser(packageName, false, userInfo.id);
+ }
+ }
+ }, PackageManager.DELETE_SYSTEM_APP | PackageManager.DELETE_ALL_USERS);
+ } else if (!existsValidNonFallbackProvider
+ // During an OTA the primary user's WebView state might differ from other users', so
+ // ignore the state of that user during boot.
+ && (!fallbackProvider.isEnabled() || intent==null)) {
+ // Enable the fallback package for all users.
+ UserManager userManager =
+ (UserManager)context.getSystemService(Context.USER_SERVICE);
+ for(UserInfo userInfo : userManager.getUsers()) {
+ enablePackageForUser(fallbackProvider.packageName, true, userInfo.id);
+ }
+ }
+ }
+
+ private static boolean isFallbackLogicEnabled() {
+ // Note that this is enabled by default (i.e. if the setting hasn't been set).
+ return Settings.Global.getInt(AppGlobals.getInitialApplication().getContentResolver(),
+ Settings.Global.WEBVIEW_FALLBACK_LOGIC_ENABLED, 1) == 1;
+ }
+
+ private static void enableFallbackLogic(boolean enable) {
+ Settings.Global.putInt(AppGlobals.getInitialApplication().getContentResolver(),
+ Settings.Global.WEBVIEW_FALLBACK_LOGIC_ENABLED, enable ? 1 : 0);
+ }
+
+ /**
+ * Returns the only fallback provider, or null if there is none.
+ */
+ private static WebViewProviderInfo getFallbackProvider(WebViewProviderInfo[] webviewPackages) {
+ for (WebViewProviderInfo provider : webviewPackages) {
+ if (provider.isFallbackPackage()) {
+ return provider;
+ }
+ }
+ return null;
+ }
+
+ private static boolean containsAvailableNonFallbackProvider(
+ WebViewProviderInfo[] webviewPackages) {
+ for (WebViewProviderInfo provider : webviewPackages) {
+ if (provider.isAvailableByDefault() && provider.isEnabled()
+ && provider.isValidProvider() && !provider.isFallbackPackage()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static boolean isFallbackPackage(String packageName) {
+ if (packageName == null || !isFallbackLogicEnabled()) return false;
+
+ WebViewProviderInfo[] webviewPackages = WebViewFactory.getWebViewPackages();
+ WebViewProviderInfo fallbackProvider = getFallbackProvider(webviewPackages);
+ return (fallbackProvider != null
+ && packageName.equals(fallbackProvider.packageName));
+ }
+
/**
* Perform any WebView loading preparations that must happen at boot from the system server,
* after the package manager has started or after an update to the webview is installed.
@@ -167,6 +346,7 @@
* Currently, this means spawning the child processes which will create the relro files.
*/
public void prepareWebViewInSystemServer() {
+ updateFallbackState(getContext(), null);
try {
synchronized(this) {
updateValidWebViewPackages();
@@ -182,8 +362,10 @@
/**
* Change WebView provider and provider setting and kill packages using the old provider.
+ * Return the new provider (in case we are in the middle of creating relro files this new
+ * provider will not be in use directly, but will when the relros are done).
*/
- private void changeProviderAndSetting(String newProviderName) {
+ private String changeProviderAndSetting(String newProviderName) {
PackageInfo oldPackage = null;
PackageInfo newPackage = null;
synchronized(this) {
@@ -195,14 +377,14 @@
if (oldPackage != null && newPackage.packageName.equals(oldPackage.packageName)) {
// If we don't perform the user change, revert the settings change.
updateUserSetting(newPackage.packageName);
- return;
+ return newPackage.packageName;
}
} catch (WebViewFactory.MissingWebViewPackageException e) {
Slog.e(TAG, "Tried to change WebView provider but failed to fetch WebView package "
+ e);
// If we don't perform the user change but don't have an installed WebView package,
// we will have changed the setting and it will be used when a package is available.
- return;
+ return newProviderName;
}
onWebViewProviderChanged(newPackage);
}
@@ -214,7 +396,7 @@
}
} catch (RemoteException e) {
}
- return;
+ return newPackage.packageName;
}
/**
@@ -349,6 +531,14 @@
private class BinderService extends IWebViewUpdateService.Stub {
+ @Override
+ public void onShellCommand(FileDescriptor in, FileDescriptor out,
+ FileDescriptor err, String[] args, ResultReceiver resultReceiver) {
+ (new WebViewUpdateServiceShellCommand(this)).exec(
+ this, in, out, err, args, resultReceiver);
+ }
+
+
/**
* The shared relro process calls this to notify us that it's done trying to create a relro
* file. This method gets called even if the relro creation has failed or the process
@@ -428,7 +618,7 @@
* This is called from DeveloperSettings when the user changes WebView provider.
*/
@Override // Binder call
- public void changeProviderAndSetting(String newProvider) {
+ public String changeProviderAndSetting(String newProvider) {
if (getContext().checkCallingPermission(
android.Manifest.permission.WRITE_SECURE_SETTINGS)
!= PackageManager.PERMISSION_GRANTED) {
@@ -440,7 +630,7 @@
throw new SecurityException(msg);
}
- WebViewUpdateService.this.changeProviderAndSetting(newProvider);
+ return WebViewUpdateService.this.changeProviderAndSetting(newProvider);
}
@Override // Binder call
@@ -458,5 +648,26 @@
return WebViewUpdateService.this.mCurrentWebViewPackage.packageName;
}
}
+
+ @Override // Binder call
+ public boolean isFallbackPackage(String packageName) {
+ return WebViewUpdateService.isFallbackPackage(packageName);
+ }
+
+ @Override // Binder call
+ public void enableFallbackLogic(boolean enable) {
+ if (getContext().checkCallingPermission(
+ android.Manifest.permission.WRITE_SECURE_SETTINGS)
+ != PackageManager.PERMISSION_GRANTED) {
+ String msg = "Permission Denial: enableFallbackLogic() from pid="
+ + Binder.getCallingPid()
+ + ", uid=" + Binder.getCallingUid()
+ + " requires " + android.Manifest.permission.WRITE_SECURE_SETTINGS;
+ Slog.w(TAG, msg);
+ throw new SecurityException(msg);
+ }
+
+ WebViewUpdateService.enableFallbackLogic(enable);
+ }
}
}
diff --git a/services/core/java/com/android/server/webkit/WebViewUpdateServiceShellCommand.java b/services/core/java/com/android/server/webkit/WebViewUpdateServiceShellCommand.java
new file mode 100644
index 0000000..a9461e8
--- /dev/null
+++ b/services/core/java/com/android/server/webkit/WebViewUpdateServiceShellCommand.java
@@ -0,0 +1,77 @@
+/*
+ * 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.webkit;
+
+import android.os.RemoteException;
+import android.os.ShellCommand;
+import android.webkit.IWebViewUpdateService;
+
+import java.io.PrintWriter;
+
+class WebViewUpdateServiceShellCommand extends ShellCommand {
+ final IWebViewUpdateService mInterface;
+
+ WebViewUpdateServiceShellCommand(IWebViewUpdateService service) {
+ mInterface = service;
+ }
+
+ @Override
+ public int onCommand(String cmd) {
+ if (cmd == null) {
+ return handleDefaultCommands(cmd);
+ }
+
+ final PrintWriter pw = getOutPrintWriter();
+ try {
+ // TODO(gsennton) add command for changing WebView provider
+ switch(cmd) {
+ case "enable-redundant-packages":
+ return enableFallbackLogic(false);
+ case "disable-redundant-packages":
+ return enableFallbackLogic(true);
+ default:
+ return handleDefaultCommands(cmd);
+ }
+ } catch (RemoteException e) {
+ pw.println("Remote exception: " + e);
+ }
+ return -1;
+ }
+
+ private int enableFallbackLogic(boolean enable) throws RemoteException {
+ final PrintWriter pw = getOutPrintWriter();
+ mInterface.enableFallbackLogic(enable);
+ pw.println("Success");
+ return 0;
+ }
+
+ @Override
+ public void onHelp() {
+ PrintWriter pw = getOutPrintWriter();
+ pw.println("WebView updater commands:");
+ pw.println(" help");
+ pw.println(" Print this help text.");
+ pw.println("");
+ pw.println(" enable-redundant-packages");
+ pw.println(" Allow a fallback package to be installed and enabled even when a");
+ pw.println(" more-preferred package is available. This command is useful when testing");
+ pw.println(" fallback packages.");
+ pw.println(" disable-redundant-packages");
+ pw.println(" Disallow installing and enabling fallback packages when a more-preferred");
+ pw.println(" package is available.");
+ pw.println();
+ }
+}
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java
index 12c62bd..f9e258d 100644
--- a/services/core/java/com/android/server/wm/AppWindowToken.java
+++ b/services/core/java/com/android/server/wm/AppWindowToken.java
@@ -21,6 +21,7 @@
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_STARTING_WINDOW;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_VISIBILITY;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_WINDOW_MOVEMENT;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
@@ -159,6 +160,25 @@
}
}
+ void onFirstWindowDrawn(WindowState win, WindowStateAnimator winAnimator) {
+ firstWindowDrawn = true;
+
+ // We now have a good window to show, remove dead placeholders
+ removeAllDeadWindows();
+
+ if (startingData != null) {
+ if (DEBUG_STARTING_WINDOW || DEBUG_ANIM) Slog.v(TAG, "Finish starting "
+ + win.mToken + ": first real window is shown, no animation");
+ // If this initial window is animating, stop it -- we will do an animation to reveal
+ // 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);
+ }
+ updateReportedVisibilityLocked();
+ }
+
void updateReportedVisibilityLocked() {
if (appToken == null) {
return;
@@ -357,6 +377,9 @@
void notifyAppStopped() {
mAppStopped = true;
destroySurfaces();
+
+ // Remove any starting window that was added for this app if they are still around.
+ mTask.mService.scheduleRemoveStartingWindowLocked(this);
}
/**
@@ -594,6 +617,9 @@
if (paused) {
pw.print(prefix); pw.print("paused="); pw.println(paused);
}
+ if (mAppStopped) {
+ pw.print(prefix); pw.print("mAppStopped="); pw.println(mAppStopped);
+ }
if (numInterestingWindows != 0 || numDrawnWindows != 0
|| allDrawn || mAppAnimator.allDrawn) {
pw.print(prefix); pw.print("numInterestingWindows=");
@@ -619,7 +645,7 @@
pw.print(prefix); pw.print("startingWindow="); pw.print(startingWindow);
pw.print(" startingView="); pw.print(startingView);
pw.print(" startingDisplayed="); pw.print(startingDisplayed);
- pw.print(" startingMoved"); pw.println(startingMoved);
+ pw.print(" startingMoved="); pw.println(startingMoved);
}
if (!mFrozenBounds.isEmpty()) {
pw.print(prefix); pw.print("mFrozenBounds="); pw.print(mFrozenBounds);
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 00690c4..c7b5599 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -20,6 +20,7 @@
import static android.app.ActivityManager.StackId.FREEFORM_WORKSPACE_STACK_ID;
import static android.app.ActivityManager.StackId.FULLSCREEN_WORKSPACE_STACK_ID;
import static android.app.ActivityManager.StackId.HOME_STACK_ID;
+import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZEABLE;
import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE;
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
import static android.app.ActivityManager.RESIZE_MODE_SYSTEM_SCREEN_ROTATION;
@@ -134,12 +135,6 @@
mShowNonResizeableDockToast = false;
- if (isResizeable()) {
- Slog.wtf(TAG,
- "Trying to show non-resizeable toast when task is resizeable task=" + this);
- return;
- }
-
if (mResizeMode == RESIZE_MODE_UNRESIZEABLE) {
final String text =
mService.mContext.getString(R.string.dock_non_resizeble_failed_to_dock_text);
@@ -148,7 +143,7 @@
}
final int dockSide = mStack.getDockSide();
- if (!inCropWindowsResizeMode() || dockSide == DOCKED_INVALID) {
+ if (mResizeMode != RESIZE_MODE_FORCE_RESIZEABLE || dockSide == DOCKED_INVALID) {
return;
}
@@ -176,7 +171,7 @@
yOffset = mTmpRect2.bottom - mTmpRect.bottom;
}
final String text =
- mService.mContext.getString(R.string.dock_cropped_windows_text);
+ mService.mContext.getString(R.string.dock_forced_resizable);
mService.mH.obtainMessage(SHOW_NON_RESIZEABLE_DOCK_TOAST,
xOffset, yOffset, text).sendToTarget();
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index f36585e..daeecfc 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -1998,8 +1998,10 @@
prepareWindowReplacementTransition(atoken);
if (displayContent.isDefaultDisplay) {
- mPolicy.getInsetHintLw(win.mAttrs, mRotation, outContentInsets, outStableInsets,
- outOutsets);
+ if (mPolicy.getInsetHintLw(win.mAttrs, mRotation, outContentInsets, outStableInsets,
+ outOutsets)) {
+ res |= WindowManagerGlobal.ADD_FLAG_ALWAYS_CONSUME_NAV_BAR;
+ }
} else {
outContentInsets.setEmpty();
outStableInsets.setEmpty();
@@ -2760,6 +2762,9 @@
winAnimator.mReportSurfaceResized = false;
result |= WindowManagerGlobal.RELAYOUT_RES_SURFACE_RESIZED;
}
+ if (mPolicy.isNavBarForcedShownLw(win)) {
+ result |= WindowManagerGlobal.RELAYOUT_RES_CONSUME_ALWAYS_NAV_BAR;
+ }
if (!win.isGoneForLayoutLw()) {
win.mResizedWhileGone = false;
}
@@ -3741,7 +3746,8 @@
}
for (final WindowState win : mWindowMap.values()) {
final Task task = win.getTask();
- if (task != null && mTmpTaskIds.get(task.mTaskId, -1) != -1) {
+ if (task != null && mTmpTaskIds.get(task.mTaskId, -1) != -1
+ && task.inFreeformWorkspace()) {
final AppWindowToken appToken = win.mAppToken;
if (appToken != null && appToken.mAppAnimator != null) {
appToken.mAppAnimator.startProlongAnimation(scaleUp ?
@@ -8183,7 +8189,7 @@
break;
case SHOW_NON_RESIZEABLE_DOCK_TOAST: {
final Toast toast = Toast.makeText(
- mContext, (String) msg.obj, Toast.LENGTH_LONG);
+ mContext, (String) msg.obj, Toast.LENGTH_SHORT);
final int gravity = toast.getGravity();
final int xOffset = toast.getXOffset() + msg.arg1;
final int yOffset = toast.getYOffset() + msg.arg2;
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 9dcb404..40b6b50 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -2155,7 +2155,7 @@
Configuration newConfig) throws RemoteException {
mClient.resized(frame, overscanInsets, contentInsets, visibleInsets, stableInsets, outsets,
reportDraw, newConfig, getBackdropFrame(frame),
- isDragResizeChanged() /* forceRelayout */);
+ isDragResizeChanged() /* forceRelayout */, mPolicy.isNavBarForcedShownLw(this));
mDragResizingChangeReported = true;
}
@@ -2347,7 +2347,8 @@
pw.print(prefix); pw.print("mHasSurface="); pw.print(mHasSurface);
pw.print(" mShownPosition="); mShownPosition.printShortString(pw);
pw.print(" isReadyForDisplay()="); pw.print(isReadyForDisplay());
- pw.print(" hasSavedSurface()="); pw.println(hasSavedSurface());
+ pw.print(" hasSavedSurface()="); pw.print(hasSavedSurface());
+ pw.print(" mWindowRemovalAllowed="); pw.println(mWindowRemovalAllowed);
if (dumpAll) {
pw.print(prefix); pw.print("mFrame="); mFrame.printShortString(pw);
pw.print(" last="); mLastFrame.printShortString(pw);
diff --git a/services/core/java/com/android/server/wm/WindowStateAnimator.java b/services/core/java/com/android/server/wm/WindowStateAnimator.java
index 2d8a4c9..c623047 100644
--- a/services/core/java/com/android/server/wm/WindowStateAnimator.java
+++ b/services/core/java/com/android/server/wm/WindowStateAnimator.java
@@ -1522,23 +1522,7 @@
}
if (mWin.mAttrs.type != TYPE_APPLICATION_STARTING && mWin.mAppToken != null) {
- mWin.mAppToken.firstWindowDrawn = true;
-
- // We now have a good window to show, remove dead placeholders
- mWin.mAppToken.removeAllDeadWindows();
-
- if (mWin.mAppToken.startingData != null) {
- if (DEBUG_STARTING_WINDOW || DEBUG_ANIM) Slog.v(TAG, "Finish starting "
- + mWin.mToken + ": first real window is shown, no animation");
- // If this initial window is animating, stop it -- we
- // will do an animation to reveal it from behind the
- // starting window, so there is no need for it to also
- // be doing its own stuff.
- clearAnimation();
- mService.mFinishedStarting.add(mWin.mAppToken);
- mService.mH.sendEmptyMessage(H.FINISHED_STARTING);
- }
- mWin.mAppToken.updateReportedVisibilityLocked();
+ mWin.mAppToken.onFirstWindowDrawn(mWin, this);
}
return true;
diff --git a/services/core/java/com/android/server/wm/WindowSurfaceController.java b/services/core/java/com/android/server/wm/WindowSurfaceController.java
index 0db6f3a..2972a24 100644
--- a/services/core/java/com/android/server/wm/WindowSurfaceController.java
+++ b/services/core/java/com/android/server/wm/WindowSurfaceController.java
@@ -62,7 +62,9 @@
// However, we need to somehow handle the situation where the cropping would completely hide
// the window. We achieve this by explicitly hiding the surface and not letting it be shown.
private boolean mHiddenForCrop = false;
- private boolean mHiddenForOtherReasons = false;
+
+ // Initially a surface is hidden after just being created.
+ private boolean mHiddenForOtherReasons = true;
private final String title;
public WindowSurfaceController(SurfaceSession s,
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 050f6ba..60c3a35 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -2053,31 +2053,31 @@
return null;
}
enforceFullCrossUsersPermission(userHandle);
- Intent resolveIntent = new Intent();
- resolveIntent.setComponent(adminName);
- List<ResolveInfo> infos = mContext.getPackageManager().queryBroadcastReceiversAsUser(
- resolveIntent,
- PackageManager.GET_META_DATA | PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS |
- PackageManager.MATCH_ENCRYPTION_AWARE_AND_UNAWARE,
- userHandle);
- if (infos == null || infos.size() <= 0) {
+ ActivityInfo ai = null;
+ try {
+ ai = mIPackageManager.getReceiverInfo(adminName,
+ PackageManager.GET_META_DATA |
+ PackageManager.GET_DISABLED_UNTIL_USED_COMPONENTS |
+ PackageManager.MATCH_ENCRYPTION_AWARE_AND_UNAWARE, userHandle);
+ } catch (RemoteException e) {
+ // shouldn't happen.
+ }
+ if (ai == null) {
throw new IllegalArgumentException("Unknown admin: " + adminName);
}
- final ResolveInfo ri = infos.get(0);
-
- if (!permission.BIND_DEVICE_ADMIN.equals(ri.activityInfo.permission)) {
+ if (!permission.BIND_DEVICE_ADMIN.equals(ai.permission)) {
final String message = "DeviceAdminReceiver " + adminName + " must be protected with "
+ permission.BIND_DEVICE_ADMIN;
Slog.w(LOG_TAG, message);
if (throwForMissiongPermission &&
- ri.activityInfo.applicationInfo.targetSdkVersion > Build.VERSION_CODES.M) {
+ ai.applicationInfo.targetSdkVersion > Build.VERSION_CODES.M) {
throw new IllegalArgumentException(message);
}
}
try {
- return new DeviceAdminInfo(mContext, ri);
+ return new DeviceAdminInfo(mContext, ai);
} catch (XmlPullParserException | IOException e) {
Slog.w(LOG_TAG, "Bad device admin requested for user=" + userHandle + ": " + adminName,
e);
@@ -4090,16 +4090,24 @@
}
@Override
- public boolean installKeyPair(ComponentName who, byte[] privKey, byte[] cert, String alias) {
+ public boolean installKeyPair(ComponentName who, byte[] privKey, byte[] cert, String alias,
+ boolean requestAccess) {
enforceCanManageInstalledKeys(who);
- final UserHandle userHandle = new UserHandle(UserHandle.getCallingUserId());
+ final int callingUid = mInjector.binderGetCallingUid();
final long id = mInjector.binderClearCallingIdentity();
try {
- final KeyChainConnection keyChainConnection = KeyChain.bindAsUser(mContext, userHandle);
+ final KeyChainConnection keyChainConnection =
+ KeyChain.bindAsUser(mContext, UserHandle.getUserHandleForUid(callingUid));
try {
IKeyChainService keyChain = keyChainConnection.getService();
- return keyChain.installKeyPair(privKey, cert, alias);
+ if (!keyChain.installKeyPair(privKey, cert, alias)) {
+ return false;
+ }
+ if (requestAccess) {
+ keyChain.setGrant(callingUid, alias, true);
+ }
+ return true;
} catch (RemoteException e) {
Log.e(LOG_TAG, "Installing certificate", e);
} finally {
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index d08f68a..0ece6aa 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -1279,10 +1279,12 @@
}
Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
- Slog.i(TAG, "WebViewFactory preparation");
- Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "WebViewFactoryPreparation");
- mWebViewUpdateService.prepareWebViewInSystemServer();
- Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
+ if (!mOnlyCore) {
+ Slog.i(TAG, "WebViewFactory preparation");
+ Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "WebViewFactoryPreparation");
+ mWebViewUpdateService.prepareWebViewInSystemServer();
+ Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
+ }
Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "StartSystemUI");
try {
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java
index ca43644..c80ca6c 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/DpmTestBase.java
@@ -154,8 +154,10 @@
aci.packageName = admin.getPackageName();
aci.name = admin.getClassName();
- doReturn(realResolveInfo).when(mMockContext.packageManager).queryBroadcastReceiversAsUser(
- MockUtils.checkIntentComponent(admin),
+ // Note we don't set up queryBroadcastReceivers. We don't use it in DPMS.
+
+ doReturn(aci).when(mMockContext.ipackageManager).getReceiverInfo(
+ eq(admin),
anyInt(),
eq(UserHandle.getUserId(packageUid)));
diff --git a/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java b/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
index e64481e..edbff83 100644
--- a/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
+++ b/services/tests/servicestests/src/com/android/server/job/JobStoreTest.java
@@ -59,7 +59,7 @@
.setMinimumLatency(runFromMillis)
.setPersisted(true)
.build();
- final JobStatus ts = JobStatus.createFromJobInfo(task, SOME_UID, null, -1);
+ final JobStatus ts = JobStatus.createFromJobInfo(task, SOME_UID, null, -1, null);
mTaskStoreUnderTest.add(ts);
Thread.sleep(IO_WAIT);
// Manually load tasks from xml file.
@@ -92,8 +92,8 @@
.setRequiredNetworkType(JobInfo.NETWORK_TYPE_UNMETERED)
.setPersisted(true)
.build();
- final JobStatus taskStatus1 = JobStatus.createFromJobInfo(task1, SOME_UID, null, -1);
- final JobStatus taskStatus2 = JobStatus.createFromJobInfo(task2, SOME_UID, null, -1);
+ final JobStatus taskStatus1 = JobStatus.createFromJobInfo(task1, SOME_UID, null, -1, null);
+ final JobStatus taskStatus2 = JobStatus.createFromJobInfo(task2, SOME_UID, null, -1, null);
mTaskStoreUnderTest.add(taskStatus1);
mTaskStoreUnderTest.add(taskStatus2);
Thread.sleep(IO_WAIT);
@@ -141,7 +141,7 @@
extras.putInt("into", 3);
b.setExtras(extras);
final JobInfo task = b.build();
- JobStatus taskStatus = JobStatus.createFromJobInfo(task, SOME_UID, null, -1);
+ JobStatus taskStatus = JobStatus.createFromJobInfo(task, SOME_UID, null, -1, null);
mTaskStoreUnderTest.add(taskStatus);
Thread.sleep(IO_WAIT);
@@ -159,7 +159,7 @@
.setRequiresCharging(true)
.setPersisted(true);
JobStatus taskStatus = JobStatus.createFromJobInfo(b.build(), SOME_UID,
- "com.google.android.gms", 0);
+ "com.google.android.gms", 0, null);
mTaskStoreUnderTest.add(taskStatus);
Thread.sleep(IO_WAIT);
@@ -180,7 +180,7 @@
.setPeriodic(5*60*60*1000, 1*60*60*1000)
.setRequiresCharging(true)
.setPersisted(true);
- JobStatus taskStatus = JobStatus.createFromJobInfo(b.build(), SOME_UID, null, -1);
+ JobStatus taskStatus = JobStatus.createFromJobInfo(b.build(), SOME_UID, null, -1, null);
mTaskStoreUnderTest.add(taskStatus);
Thread.sleep(IO_WAIT);
@@ -206,7 +206,7 @@
final long invalidEarlyRuntimeElapsedMillis =
invalidLateRuntimeElapsedMillis - TWO_HOURS; // Early is (late - period).
final JobStatus js = new JobStatus(b.build(), SOME_UID, "somePackage",
- 0 /* sourceUserId */,
+ 0 /* sourceUserId */, "someTag",
invalidEarlyRuntimeElapsedMillis, invalidLateRuntimeElapsedMillis);
mTaskStoreUnderTest.add(js);
@@ -232,7 +232,7 @@
.setOverrideDeadline(5000)
.setPriority(42)
.setPersisted(true);
- final JobStatus js = JobStatus.createFromJobInfo(b.build(), SOME_UID, null, -1);
+ final JobStatus js = JobStatus.createFromJobInfo(b.build(), SOME_UID, null, -1, null);
mTaskStoreUnderTest.add(js);
Thread.sleep(IO_WAIT);
final JobSet jobStatusSet = new JobSet();
@@ -248,12 +248,12 @@
JobInfo.Builder b = new Builder(42, mComponent)
.setOverrideDeadline(10000)
.setPersisted(false);
- JobStatus jsNonPersisted = JobStatus.createFromJobInfo(b.build(), SOME_UID, null, -1);
+ JobStatus jsNonPersisted = JobStatus.createFromJobInfo(b.build(), SOME_UID, null, -1, null);
mTaskStoreUnderTest.add(jsNonPersisted);
b = new Builder(43, mComponent)
.setOverrideDeadline(10000)
.setPersisted(true);
- JobStatus jsPersisted = JobStatus.createFromJobInfo(b.build(), SOME_UID, null, -1);
+ JobStatus jsPersisted = JobStatus.createFromJobInfo(b.build(), SOME_UID, null, -1, null);
mTaskStoreUnderTest.add(jsPersisted);
Thread.sleep(IO_WAIT);
final JobSet jobStatusSet = new JobSet();
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java
index 8e891bf..8b250f4 100644
--- a/services/usage/java/com/android/server/usage/UsageStatsService.java
+++ b/services/usage/java/com/android/server/usage/UsageStatsService.java
@@ -151,6 +151,8 @@
private ArrayList<UsageStatsManagerInternal.AppIdleStateChangeListener>
mPackageAccessListeners = new ArrayList<>();
+ private List<String> mCarrierPrivilegedApps;
+
public UsageStatsService(Context context) {
super(context);
}
@@ -170,10 +172,18 @@
+ mUsageStatsDir.getAbsolutePath());
}
- IntentFilter userActions = new IntentFilter(Intent.ACTION_USER_REMOVED);
- userActions.addAction(Intent.ACTION_USER_STARTED);
- getContext().registerReceiverAsUser(new UserActionsReceiver(), UserHandle.ALL, userActions,
- null, null);
+ IntentFilter filter = new IntentFilter(Intent.ACTION_USER_REMOVED);
+ filter.addAction(Intent.ACTION_USER_STARTED);
+ getContext().registerReceiverAsUser(new UserActionsReceiver(), UserHandle.ALL, filter,
+ null, mHandler);
+
+ IntentFilter packageFilter = new IntentFilter();
+ packageFilter.addAction(Intent.ACTION_PACKAGE_ADDED);
+ packageFilter.addAction(Intent.ACTION_PACKAGE_CHANGED);
+ packageFilter.addDataScheme("package");
+
+ getContext().registerReceiverAsUser(new PackageReceiver(), UserHandle.ALL, packageFilter,
+ null, mHandler);
mAppIdleEnabled = getContext().getResources().getBoolean(
com.android.internal.R.bool.config_enableAutoPowerModes);
@@ -232,15 +242,15 @@
}
private class UserActionsReceiver extends BroadcastReceiver {
-
@Override
public void onReceive(Context context, Intent intent) {
final int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
- if (Intent.ACTION_USER_REMOVED.equals(intent.getAction())) {
+ final String action = intent.getAction();
+ if (Intent.ACTION_USER_REMOVED.equals(action)) {
if (userId >= 0) {
mHandler.obtainMessage(MSG_REMOVE_USER, userId, 0).sendToTarget();
}
- } else if (Intent.ACTION_USER_STARTED.equals(intent.getAction())) {
+ } else if (Intent.ACTION_USER_STARTED.equals(action)) {
if (userId >=0) {
postCheckIdleStates(userId);
}
@@ -248,6 +258,17 @@
}
}
+ private class PackageReceiver extends BroadcastReceiver {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ final String action = intent.getAction();
+ if (Intent.ACTION_PACKAGE_ADDED.equals(action)
+ || Intent.ACTION_PACKAGE_CHANGED.equals(action)) {
+ clearCarrierPrivilegedApps();
+ }
+ }
+ }
+
private class DeviceStateReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
@@ -890,9 +911,30 @@
}
private boolean isCarrierApp(String packageName) {
- TelephonyManager telephonyManager = getContext().getSystemService(TelephonyManager.class);
- return telephonyManager.checkCarrierPrivilegesForPackageAnyPhone(packageName)
- == TelephonyManager.CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;
+ synchronized (mLock) {
+ if (mCarrierPrivilegedApps == null) {
+ fetchCarrierPrivilegedAppsLocked();
+ }
+ }
+ return mCarrierPrivilegedApps.contains(packageName);
+ }
+
+ void clearCarrierPrivilegedApps() {
+ if (DEBUG) {
+ Slog.i(TAG, "Clearing carrier privileged apps list");
+ }
+ synchronized (mLock) {
+ mCarrierPrivilegedApps = null; // Need to be refetched.
+ }
+ }
+
+ private void fetchCarrierPrivilegedAppsLocked() {
+ TelephonyManager telephonyManager =
+ getContext().getSystemService(TelephonyManager.class);
+ mCarrierPrivilegedApps = telephonyManager.getPackagesWithCarrierPrivileges();
+ if (DEBUG) {
+ Slog.d(TAG, "apps with carrier privilege " + mCarrierPrivilegedApps);
+ }
}
private boolean isActiveNetworkScorer(String packageName) {
@@ -963,6 +1005,9 @@
}
pw.println();
+ pw.println("Carrier privileged apps: " + mCarrierPrivilegedApps);
+
+ pw.println();
pw.println("Settings:");
pw.print(" mAppIdleDurationMillis=");
@@ -1257,6 +1302,17 @@
}
@Override
+ public void onCarrierPrivilegedAppsChanged() {
+ if (DEBUG) {
+ Slog.i(TAG, "Carrier privileged apps changed");
+ }
+ getContext().enforceCallingOrSelfPermission(
+ android.Manifest.permission.BIND_CARRIER_SERVICES,
+ "onCarrierPrivilegedAppsChanged can only be called by privileged apps.");
+ UsageStatsService.this.clearCarrierPrivilegedApps();
+ }
+
+ @Override
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
if (getContext().checkCallingOrSelfPermission(android.Manifest.permission.DUMP)
!= PackageManager.PERMISSION_GRANTED) {
diff --git a/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java b/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java
index 7ee7423..e05f00d 100644
--- a/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java
+++ b/services/voiceinteraction/java/com/android/server/soundtrigger/SoundTriggerHelper.java
@@ -573,7 +573,7 @@
}
private boolean isKeyphraseRecognitionEvent(RecognitionEvent event) {
- return mCurrentKeyphraseModelHandle == event.soundModelHandle;
+ return event instanceof KeyphraseRecognitionEvent;
}
private void onGenericRecognitionSuccessLocked(GenericRecognitionEvent event) {
@@ -595,9 +595,9 @@
}
try {
- callback.onDetected((GenericRecognitionEvent) event);
+ callback.onGenericSoundTriggerDetected((GenericRecognitionEvent) event);
} catch (RemoteException e) {
- Slog.w(TAG, "RemoteException in onDetected", e);
+ Slog.w(TAG, "RemoteException in onGenericSoundTriggerDetected", e);
}
model.setStopped();
@@ -715,10 +715,10 @@
try {
if (mKeyphraseListener != null) {
- mKeyphraseListener.onDetected((KeyphraseRecognitionEvent) event);
+ mKeyphraseListener.onKeyphraseDetected((KeyphraseRecognitionEvent) event);
}
} catch (RemoteException e) {
- Slog.w(TAG, "RemoteException in onDetected", e);
+ Slog.w(TAG, "RemoteException in onKeyphraseDetected", e);
}
mKeyphraseStarted = false;
@@ -767,7 +767,7 @@
int status = mModule.startRecognition(mCurrentKeyphraseModelHandle,
mRecognitionConfig);
if (status != SoundTrigger.STATUS_OK) {
- Slog.w(TAG, "startRecognition failed with " + status);
+ Slog.w(TAG, "startKeyphraseRecognition failed with " + status);
// Notify of error if needed.
if (notify) {
try {
@@ -967,7 +967,7 @@
int status = mModule.startRecognition(handle, config);
if (status != SoundTrigger.STATUS_OK) {
- Slog.w(TAG, "startRecognition failed with " + status);
+ Slog.w(TAG, "startGenericRecognition failed with " + status);
// Notify of error if needed.
if (notify) {
try {
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 56d9491..5b62e03 100644
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -1053,6 +1053,16 @@
}
/**
+ * Returns all the active {@code Conference}s for which this {@code ConnectionService}
+ * has taken responsibility.
+ *
+ * @return A collection of {@code Conference}s created by this {@code ConnectionService}.
+ */
+ public final Collection<Conference> getAllConferences() {
+ return mConferenceById.values();
+ }
+
+ /**
* Create a {@code Connection} given an incoming request. This is used to attach to existing
* incoming calls.
*
diff --git a/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java b/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java
index a790914..6a8c1cb 100644
--- a/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java
+++ b/telecomm/java/android/telecom/ConnectionServiceAdapterServant.java
@@ -240,8 +240,8 @@
} finally {
args.recycle();
}
+ break;
}
-
case MSG_ON_CONNECTION_EVENT: {
SomeArgs args = (SomeArgs) msg.obj;
try {
@@ -249,6 +249,7 @@
} finally {
args.recycle();
}
+ break;
}
}
}
diff --git a/telecomm/java/android/telecom/DisconnectCause.java b/telecomm/java/android/telecom/DisconnectCause.java
index 3a7faf6..2eef7ee 100644
--- a/telecomm/java/android/telecom/DisconnectCause.java
+++ b/telecomm/java/android/telecom/DisconnectCause.java
@@ -92,8 +92,8 @@
/**
* Creates a new DisconnectCause.
*
- * @param label The localized label to show to the user to explain the disconnect.
* @param code The code for the disconnect cause.
+ * @param label The localized label to show to the user to explain the disconnect.
* @param description The localized description to show to the user to explain the disconnect.
* @param reason The reason for the disconnect.
*/
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 3ad7d34..1278c07 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -733,9 +733,28 @@
* @param subId the subscription ID, normally obtained from {@link SubscriptionManager}.
* @return A {@link PersistableBundle} containing the config for the given subId, or default
* values for an invalid subId.
+ *
+ * @deprecated use getConfig.
*/
@Nullable
public PersistableBundle getConfigForSubId(int subId) {
+ return getConfig(subId);
+ }
+
+ /**
+ * Gets the configuration values for a particular subscription, which is associated with a
+ * specific SIM card. If an invalid subId is used, the returned config will contain default
+ * values.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
+ *
+ * @param subId the subscription ID, normally obtained from {@link SubscriptionManager}.
+ * @return A {@link PersistableBundle} containing the config for the given subId, or default
+ * values for an invalid subId.
+ */
+ @Nullable
+ public PersistableBundle getConfig(int subId) {
try {
ICarrierConfigLoader loader = getICarrierConfigLoader();
if (loader == null) {
@@ -757,11 +776,32 @@
* <p>Requires Permission:
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
*
- * @see #getConfigForSubId
+ * @return A {@link PersistableBundle} containing the config for the default subscription.
*/
@Nullable
public PersistableBundle getConfig() {
- return getConfigForSubId(SubscriptionManager.getDefaultSubscriptionId());
+ return getConfig(SubscriptionManager.getDefaultSubscriptionId());
+ }
+
+ /**
+ * Calling this method triggers telephony services to fetch the current carrier configuration.
+ * <p>
+ * Normally this does not need to be called because the platform reloads config on its own.
+ * This should be called by a carrier service app if it wants to update config at an arbitrary
+ * moment.
+ * </p>
+ * <p>Requires that the calling app has carrier privileges.
+ * @see #hasCarrierPrivileges
+ * <p>
+ * This method returns before the reload has completed, and
+ * {@link android.service.carrier.CarrierService#onLoadConfig} will be called from an
+ * arbitrary thread.
+ * </p>
+ *
+ * @deprecated use notifyConfigChanged.
+ */
+ public void notifyConfigChangedForSubId(int subId) {
+ notifyConfigChanged(subId);
}
/**
@@ -779,7 +819,7 @@
* arbitrary thread.
* </p>
*/
- public void notifyConfigChangedForSubId(int subId) {
+ public void notifyConfigChanged(int subId) {
try {
ICarrierConfigLoader loader = getICarrierConfigLoader();
if (loader == null) {
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index fcb42a4..e90be91 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -47,6 +47,7 @@
import java.io.FileInputStream;
import java.io.IOException;
+import java.util.Collections;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -2931,10 +2932,27 @@
* @return an IccOpenLogicalChannelResponse object.
*/
public IccOpenLogicalChannelResponse iccOpenLogicalChannel(String AID) {
+ return iccOpenLogicalChannel(getDefaultSubscription(), AID);
+ }
+
+ /**
+ * Opens a logical channel to the ICC card.
+ *
+ * Input parameters equivalent to TS 27.007 AT+CCHO command.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+ * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ *
+ * @param subId The subscription to use.
+ * @param AID Application id. See ETSI 102.221 and 101.220.
+ * @return an IccOpenLogicalChannelResponse object.
+ */
+ public IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId, String AID) {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
- return telephony.iccOpenLogicalChannel(AID);
+ return telephony.iccOpenLogicalChannel(subId, AID);
} catch (RemoteException ex) {
} catch (NullPointerException ex) {
}
@@ -2955,10 +2973,28 @@
* @return true if the channel was closed successfully.
*/
public boolean iccCloseLogicalChannel(int channel) {
+ return iccCloseLogicalChannel(getDefaultSubscription(), channel);
+ }
+
+ /**
+ * Closes a previously opened logical channel to the ICC card.
+ *
+ * Input parameters equivalent to TS 27.007 AT+CCHC command.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+ * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ *
+ * @param subId The subscription to use.
+ * @param channel is the channel id to be closed as retruned by a successful
+ * iccOpenLogicalChannel.
+ * @return true if the channel was closed successfully.
+ */
+ public boolean iccCloseLogicalChannel(int subId, int channel) {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
- return telephony.iccCloseLogicalChannel(channel);
+ return telephony.iccCloseLogicalChannel(subId, channel);
} catch (RemoteException ex) {
} catch (NullPointerException ex) {
}
@@ -2988,10 +3024,38 @@
*/
public String iccTransmitApduLogicalChannel(int channel, int cla,
int instruction, int p1, int p2, int p3, String data) {
+ return iccTransmitApduLogicalChannel(getDefaultSubscription(), channel, cla,
+ instruction, p1, p2, p3, data);
+ }
+
+ /**
+ * Transmit an APDU to the ICC card over a logical channel.
+ *
+ * Input parameters equivalent to TS 27.007 AT+CGLA command.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+ * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ *
+ * @param subId The subscription to use.
+ * @param channel is the channel id to be closed as returned by a successful
+ * iccOpenLogicalChannel.
+ * @param cla Class of the APDU command.
+ * @param instruction Instruction of the APDU command.
+ * @param p1 P1 value of the APDU command.
+ * @param p2 P2 value of the APDU command.
+ * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
+ * is sent to the SIM.
+ * @param data Data to be sent with the APDU.
+ * @return The APDU response from the ICC card with the status appended at
+ * the end.
+ */
+ public String iccTransmitApduLogicalChannel(int subId, int channel, int cla,
+ int instruction, int p1, int p2, int p3, String data) {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
- return telephony.iccTransmitApduLogicalChannel(channel, cla,
+ return telephony.iccTransmitApduLogicalChannel(subId, channel, cla,
instruction, p1, p2, p3, data);
} catch (RemoteException ex) {
} catch (NullPointerException ex) {
@@ -3020,10 +3084,36 @@
*/
public String iccTransmitApduBasicChannel(int cla,
int instruction, int p1, int p2, int p3, String data) {
+ return iccTransmitApduBasicChannel(getDefaultSubscription(), cla,
+ instruction, p1, p2, p3, data);
+ }
+
+ /**
+ * Transmit an APDU to the ICC card over the basic channel.
+ *
+ * Input parameters equivalent to TS 27.007 AT+CSIM command.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+ * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ *
+ * @param subId The subscription to use.
+ * @param cla Class of the APDU command.
+ * @param instruction Instruction of the APDU command.
+ * @param p1 P1 value of the APDU command.
+ * @param p2 P2 value of the APDU command.
+ * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
+ * is sent to the SIM.
+ * @param data Data to be sent with the APDU.
+ * @return The APDU response from the ICC card with the status appended at
+ * the end.
+ */
+ public String iccTransmitApduBasicChannel(int subId, int cla,
+ int instruction, int p1, int p2, int p3, String data) {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
- return telephony.iccTransmitApduBasicChannel(cla,
+ return telephony.iccTransmitApduBasicChannel(subId, cla,
instruction, p1, p2, p3, data);
} catch (RemoteException ex) {
} catch (NullPointerException ex) {
@@ -3048,10 +3138,31 @@
*/
public byte[] iccExchangeSimIO(int fileID, int command, int p1, int p2, int p3,
String filePath) {
+ return iccExchangeSimIO(getDefaultSubscription(), fileID, command, p1, p2, p3, filePath);
+ }
+
+ /**
+ * Returns the response APDU for a command APDU sent through SIM_IO.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+ * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ *
+ * @param subId The subscription to use.
+ * @param fileID
+ * @param command
+ * @param p1 P1 value of the APDU command.
+ * @param p2 P2 value of the APDU command.
+ * @param p3 P3 value of the APDU command.
+ * @param filePath
+ * @return The APDU response.
+ */
+ public byte[] iccExchangeSimIO(int subId, int fileID, int command, int p1, int p2,
+ int p3, String filePath) {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
- return telephony.iccExchangeSimIO(fileID, command, p1, p2, p3, filePath);
+ return telephony.iccExchangeSimIO(subId, fileID, command, p1, p2, p3, filePath);
} catch (RemoteException ex) {
} catch (NullPointerException ex) {
}
@@ -3073,10 +3184,29 @@
* returns an empty string.
*/
public String sendEnvelopeWithStatus(String content) {
+ return sendEnvelopeWithStatus(getDefaultSubscription(), content);
+ }
+
+ /**
+ * Send ENVELOPE to the SIM and return the response.
+ *
+ * <p>Requires Permission:
+ * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
+ * Or the calling app has carrier privileges. @see #hasCarrierPrivileges
+ *
+ * @param subId The subscription to use.
+ * @param content String containing SAT/USAT response in hexadecimal
+ * format starting with command tag. See TS 102 223 for
+ * details.
+ * @return The APDU response from the ICC card in hexadecimal format
+ * with the last 4 bytes being the status word. If the command fails,
+ * returns an empty string.
+ */
+ public String sendEnvelopeWithStatus(int subId, String content) {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
- return telephony.sendEnvelopeWithStatus(content);
+ return telephony.sendEnvelopeWithStatus(subId, content);
} catch (RemoteException ex) {
} catch (NullPointerException ex) {
}
@@ -3637,8 +3767,20 @@
* @return true on success; false on any failure.
*/
public boolean setPreferredNetworkTypeToGlobal() {
- return setPreferredNetworkType(getDefaultSubscription(),
- RILConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA);
+ return setPreferredNetworkTypeToGlobal(getDefaultSubscription());
+ }
+
+ /**
+ * Set the preferred network type to global mode which includes LTE, CDMA, EvDo and GSM/WCDMA.
+ *
+ * <p>
+ * Requires that the calling app has carrier privileges.
+ * @see #hasCarrierPrivileges
+ *
+ * @return true on success; false on any failure.
+ */
+ public boolean setPreferredNetworkTypeToGlobal(int subId) {
+ return setPreferredNetworkType(subId, RILConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA);
}
/**
@@ -3685,10 +3827,26 @@
* @return true if the app has carrier privileges.
*/
public boolean hasCarrierPrivileges() {
+ return hasCarrierPrivileges(getDefaultSubscription());
+ }
+
+ /**
+ * Has the calling application been granted carrier privileges by the carrier.
+ *
+ * If any of the packages in the calling UID has carrier privileges, the
+ * call will return true. This access is granted by the owner of the UICC
+ * card and does not depend on the registered carrier.
+ *
+ * @param subId The subscription to use.
+ * @return true if the app has carrier privileges.
+ */
+ public boolean hasCarrierPrivileges(int subId) {
try {
ITelephony telephony = getITelephony();
- if (telephony != null)
- return telephony.getCarrierPrivilegeStatus() == CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;
+ if (telephony != null) {
+ return telephony.getCarrierPrivilegeStatus(subId) ==
+ CARRIER_PRIVILEGE_STATUS_HAS_ACCESS;
+ }
} catch (RemoteException ex) {
Rlog.e(TAG, "hasCarrierPrivileges RemoteException", ex);
} catch (NullPointerException ex) {
@@ -3712,10 +3870,29 @@
* @return true if the operation was executed correctly.
*/
public boolean setOperatorBrandOverride(String brand) {
+ return setOperatorBrandOverride(getDefaultSubscription(), brand);
+ }
+
+ /**
+ * Override the branding for the current ICCID.
+ *
+ * Once set, whenever the SIM is present in the device, the service
+ * provider name (SPN) and the operator name will both be replaced by the
+ * brand value input. To unset the value, the same function should be
+ * called with a null brand value.
+ *
+ * <p>Requires that the calling app has carrier privileges.
+ * @see #hasCarrierPrivileges
+ *
+ * @param subId The subscription to use.
+ * @param brand The brand name to display/set.
+ * @return true if the operation was executed correctly.
+ */
+ public boolean setOperatorBrandOverride(int subId, String brand) {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
- return telephony.setOperatorBrandOverride(brand);
+ return telephony.setOperatorBrandOverride(subId, brand);
} catch (RemoteException ex) {
Rlog.e(TAG, "setOperatorBrandOverride RemoteException", ex);
} catch (NullPointerException ex) {
@@ -3746,10 +3923,37 @@
public boolean setRoamingOverride(List<String> gsmRoamingList,
List<String> gsmNonRoamingList, List<String> cdmaRoamingList,
List<String> cdmaNonRoamingList) {
+ return setRoamingOverride(getDefaultSubscription(), gsmRoamingList, gsmNonRoamingList,
+ cdmaRoamingList, cdmaNonRoamingList);
+ }
+
+ /**
+ * Override the roaming preference for the current ICCID.
+ *
+ * Using this call, the carrier app (see #hasCarrierPrivileges) can override
+ * the platform's notion of a network operator being considered roaming or not.
+ * The change only affects the ICCID that was active when this call was made.
+ *
+ * If null is passed as any of the input, the corresponding value is deleted.
+ *
+ * <p>Requires that the caller have carrier privilege. See #hasCarrierPrivileges.
+ *
+ * @param subId for which the roaming overrides apply.
+ * @param gsmRoamingList - List of MCCMNCs to be considered roaming for 3GPP RATs.
+ * @param gsmNonRoamingList - List of MCCMNCs to be considered not roaming for 3GPP RATs.
+ * @param cdmaRoamingList - List of SIDs to be considered roaming for 3GPP2 RATs.
+ * @param cdmaNonRoamingList - List of SIDs to be considered not roaming for 3GPP2 RATs.
+ * @return true if the operation was executed correctly.
+ *
+ * @hide
+ */
+ public boolean setRoamingOverride(int subId, List<String> gsmRoamingList,
+ List<String> gsmNonRoamingList, List<String> cdmaRoamingList,
+ List<String> cdmaNonRoamingList) {
try {
ITelephony telephony = getITelephony();
if (telephony != null)
- return telephony.setRoamingOverride(gsmRoamingList, gsmNonRoamingList,
+ return telephony.setRoamingOverride(subId, gsmRoamingList, gsmNonRoamingList,
cdmaRoamingList, cdmaNonRoamingList);
} catch (RemoteException ex) {
Rlog.e(TAG, "setRoamingOverride RemoteException", ex);
@@ -3857,6 +4061,21 @@
}
/** @hide */
+ public List<String> getPackagesWithCarrierPrivileges() {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.getPackagesWithCarrierPrivileges();
+ }
+ } catch (RemoteException ex) {
+ Rlog.e(TAG, "getPackagesWithCarrierPrivileges RemoteException", ex);
+ } catch (NullPointerException ex) {
+ Rlog.e(TAG, "getPackagesWithCarrierPrivileges NPE", ex);
+ }
+ return Collections.EMPTY_LIST;
+ }
+
+ /** @hide */
@SystemApi
public void dial(String number) {
try {
diff --git a/telephony/java/com/android/ims/ImsReasonInfo.java b/telephony/java/com/android/ims/ImsReasonInfo.java
index c909c6d..4aa5b98 100644
--- a/telephony/java/com/android/ims/ImsReasonInfo.java
+++ b/telephony/java/com/android/ims/ImsReasonInfo.java
@@ -249,12 +249,33 @@
public static final int CODE_SUPP_SVC_REINVITE_COLLISION = 1203;
/**
+ * DPD Procedure received no response or send failed
+ */
+ public static final int CODE_IWLAN_DPD_FAILURE = 1300;
+
+ /**
+ * Establishment of the ePDG Tunnel Failed
+ */
+ public static final int CODE_EPDG_TUNNEL_ESTABLISH_FAILURE = 1400;
+
+ /**
+ * Re-keying of the ePDG Tunnel Failed; may not always result in teardown
+ */
+ public static final int CODE_EPDG_TUNNEL_REKEY_FAILURE = 1401;
+
+ /**
+ * Connection to the packet gateway is lost
+ */
+ public static final int CODE_EPDG_TUNNEL_LOST_CONNECTION = 1402;
+
+ /**
* Network string error messages.
* mExtraMessage may have these values.
*/
public static final String EXTRA_MSG_SERVICE_NOT_AUTHORIZED
= "Forbidden. Not Authorized for Service";
+
// For main reason code
public int mCode;
// For the extra code value; it depends on the code value.
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index 62f294c..2727319 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -538,27 +538,30 @@
*
* Input parameters equivalent to TS 27.007 AT+CCHO command.
*
+ * @param subId The subscription to use.
* @param AID Application id. See ETSI 102.221 and 101.220.
* @return an IccOpenLogicalChannelResponse object.
*/
- IccOpenLogicalChannelResponse iccOpenLogicalChannel(String AID);
+ IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId, String AID);
/**
* Closes a previously opened logical channel to the ICC card.
*
* Input parameters equivalent to TS 27.007 AT+CCHC command.
*
+ * @param subId The subscription to use.
* @param channel is the channel id to be closed as retruned by a
* successful iccOpenLogicalChannel.
* @return true if the channel was closed successfully.
*/
- boolean iccCloseLogicalChannel(int channel);
+ boolean iccCloseLogicalChannel(int subId, int channel);
/**
* Transmit an APDU to the ICC card over a logical channel.
*
* Input parameters equivalent to TS 27.007 AT+CGLA command.
*
+ * @param subId The subscription to use.
* @param channel is the channel id to be closed as retruned by a
* successful iccOpenLogicalChannel.
* @param cla Class of the APDU command.
@@ -571,7 +574,7 @@
* @return The APDU response from the ICC card with the status appended at
* the end.
*/
- String iccTransmitApduLogicalChannel(int channel, int cla, int instruction,
+ String iccTransmitApduLogicalChannel(int subId, int channel, int cla, int instruction,
int p1, int p2, int p3, String data);
/**
@@ -579,6 +582,7 @@
*
* Input parameters equivalent to TS 27.007 AT+CSIM command.
*
+ * @param subId The subscription to use.
* @param cla Class of the APDU command.
* @param instruction Instruction of the APDU command.
* @param p1 P1 value of the APDU command.
@@ -589,12 +593,13 @@
* @return The APDU response from the ICC card with the status appended at
* the end.
*/
- String iccTransmitApduBasicChannel(int cla, int instruction,
+ String iccTransmitApduBasicChannel(int subId, int cla, int instruction,
int p1, int p2, int p3, String data);
/**
* Returns the response APDU for a command APDU sent through SIM_IO.
*
+ * @param subId The subscription to use.
* @param fileID
* @param command
* @param p1 P1 value of the APDU command.
@@ -603,12 +608,13 @@
* @param filePath
* @return The APDU response.
*/
- byte[] iccExchangeSimIO(int fileID, int command, int p1, int p2, int p3,
+ byte[] iccExchangeSimIO(int subId, int fileID, int command, int p1, int p2, int p3,
String filePath);
/**
* Send ENVELOPE to the SIM and returns the response.
*
+ * @param subId The subscription to use.
* @param contents String containing SAT/USAT response in hexadecimal
* format starting with command tag. See TS 102 223 for
* details.
@@ -616,7 +622,7 @@
* being the status word. If the command fails, returns an empty
* string.
*/
- String sendEnvelopeWithStatus(String content);
+ String sendEnvelopeWithStatus(int subId, String content);
/**
* Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
@@ -768,9 +774,10 @@
*
* TODO: Add a link to documentation.
*
+ * @param subId The subscription to use.
* @return carrier privilege status defined in TelephonyManager.
*/
- int getCarrierPrivilegeStatus();
+ int getCarrierPrivilegeStatus(int subId);
/**
* Similar to above, but check for the package whose name is pkgName.
@@ -842,10 +849,11 @@
* {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
* or has to be carrier app - see #hasCarrierPrivileges.
*
+ * @param subId The subscription to use.
* @param brand The brand name to display/set.
* @return true if the operation was executed correctly.
*/
- boolean setOperatorBrandOverride(String brand);
+ boolean setOperatorBrandOverride(int subId, String brand);
/**
* Override the roaming indicator for the current ICCID.
@@ -858,13 +866,14 @@
*
* <p>Requires that the caller have carrier privilege. See #hasCarrierPrivileges.
*
+ * @param subId for which the roaming overrides apply.
* @param gsmRoamingList - List of MCCMNCs to be considered roaming for 3GPP RATs.
* @param gsmNonRoamingList - List of MCCMNCs to be considered not roaming for 3GPP RATs.
* @param cdmaRoamingList - List of SIDs to be considered roaming for 3GPP2 RATs.
* @param cdmaNonRoamingList - List of SIDs to be considered not roaming for 3GPP2 RATs.
* @return true if the operation was executed correctly.
*/
- boolean setRoamingOverride(in List<String> gsmRoamingList,
+ boolean setRoamingOverride(int subId, in List<String> gsmRoamingList,
in List<String> gsmNonRoamingList, in List<String> cdmaRoamingList,
in List<String> cdmaNonRoamingList);
@@ -1028,4 +1037,9 @@
* @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
*/
boolean isVoicemailVibrationEnabled(in PhoneAccountHandle accountHandle);
+
+ /**
+ * Returns a list of packages that have carrier privileges.
+ */
+ List<String> getPackagesWithCarrierPrivileges();
}
diff --git a/tests/NetworkSecurityConfigTest/src/android/security/net/config/NetworkSecurityConfigTests.java b/tests/NetworkSecurityConfigTest/src/android/security/net/config/NetworkSecurityConfigTests.java
index 9f48d56..eda3f5e 100644
--- a/tests/NetworkSecurityConfigTest/src/android/security/net/config/NetworkSecurityConfigTests.java
+++ b/tests/NetworkSecurityConfigTest/src/android/security/net/config/NetworkSecurityConfigTests.java
@@ -17,19 +17,28 @@
package android.security.net.config;
import android.app.Activity;
+import android.os.Build;
import android.test.ActivityUnitTestCase;
import android.util.ArraySet;
import android.util.Pair;
+import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.Socket;
import java.net.URL;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLHandshakeException;
import javax.net.ssl.TrustManager;
+import com.android.org.conscrypt.TrustedCertificateStore;
+
public class NetworkSecurityConfigTests extends ActivityUnitTestCase<Activity> {
public NetworkSecurityConfigTests() {
@@ -40,6 +49,51 @@
private static final byte[] G2_SPKI_SHA256
= hexToBytes("ec722969cb64200ab6638f68ac538e40abab5b19a6485661042a1061c4612776");
+ private static final byte[] TEST_CA_BYTES
+ = hexToBytes(
+ "3082036130820249a003020102020900bd54597d6750ea62300d06092a86"
+ + "4886f70d01010b05003047310b3009060355040613025553310b30090603"
+ + "5504080c0243413110300e060355040a0c07416e64726f69643119301706"
+ + "035504030c104e53436f6e6669672054657374204341301e170d31363032"
+ + "32343030313130325a170d3136303332353030313130325a3047310b3009"
+ + "060355040613025553310b300906035504080c0243413110300e06035504"
+ + "0a0c07416e64726f69643119301706035504030c104e53436f6e66696720"
+ + "5465737420434130820122300d06092a864886f70d01010105000382010f"
+ + "003082010a0282010100e15ce8fd5794029841e760d68d6e0159c9c67630"
+ + "089775bc728d83dae7e29e23fe5f6e113b789f4c5b22f052300ec6d5faa5"
+ + "724432e7bac96682792ef6e9617c939c4329dce8788cbdf3a11b621fac9e"
+ + "2edbec2d7e5e07296bbb544b89263137a6a31573a2362e05ca8ff9c886bf"
+ + "52df4ff93c45475145a40a83f2670e23669220a5a4bf2c6860edb78d3022"
+ + "192fb5dc5e8c118f70870f89da292dfe522751462f020ed556653c8b07f8"
+ + "89712a6e8196c457a637439e3073d7d917ab55aa51a146826367f7b5922a"
+ + "64fb2f95099de21eb98341fa76faa79ffbda123fe5b8adc614b16174e8b0"
+ + "dfdac2bbc4d526d2487ad2b009d53996ec23ffbd732112efa66b02030100"
+ + "01a350304e301d0603551d0e04160414f66e1a95486c879edd60a5756bc2"
+ + "f1f4677e128e301f0603551d23041830168014f66e1a95486c879edd60a5"
+ + "756bc2f1f4677e128e300c0603551d13040530030101ff300d06092a8648"
+ + "86f70d01010b05000382010100d2856130dccae24e5f8901900d94bc642f"
+ + "85466ab7cfa1066399077a168cd4b56603a9e2af9d2e58aec13101e338a4"
+ + "8e95e9c7a84d7991f0d381d4965eaada1b80fbbd8277445f449babe64f53"
+ + "ba625387460b592a1a97b14b8251115e6610350021a6e716ae22b905f8d4"
+ + "eae24e668e71b12ab51fd2f2bb600e074487dec720c3db14dbca504844b6"
+ + "933bb0248283ea95464747689c37d706d4839c7d0e9bd86abf98ddce5d36"
+ + "8b38bfe5062353e28d5be378827fade1caa6bba3df9cd9ebf83d839eae52"
+ + "780181f31973f15f982686ba6d899f7b644fd1f26c8ebb99f4c986faaf4c"
+ + "1b9e3d9d391943ce3fb9fa2e631bd66b8ef3d47fd85acf09ea3a30f15f");
+
+ private static final X509Certificate TEST_CA_CERT;
+
+ static {
+ try {
+ CertificateFactory factory = CertificateFactory.getInstance("X.509");
+ Certificate cert = factory.generateCertificate(new ByteArrayInputStream(TEST_CA_BYTES));
+ TEST_CA_CERT = (X509Certificate) cert;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+
private static byte[] hexToBytes(String s) {
int len = s.length();
byte[] data = new byte[len / 2];
@@ -51,7 +105,6 @@
}
-
/**
* Return a NetworkSecurityConfig that has an empty TrustAnchor set. This should always cause a
* SSLHandshakeException when used for a connection.
@@ -174,7 +227,7 @@
public void testConfigBuilderUsesParents() throws Exception {
// Check that a builder with a parent uses the parent's values when non is set.
NetworkSecurityConfig config = new NetworkSecurityConfig.Builder()
- .setParent(NetworkSecurityConfig.getDefaultBuilder())
+ .setParent(NetworkSecurityConfig.getDefaultBuilder(Build.VERSION_CODES.N))
.build();
assert(!config.getTrustAnchors().isEmpty());
}
@@ -208,4 +261,38 @@
TestUtils.assertUrlConnectionSucceeds(context, "developer.android.com", 443);
TestUtils.assertUrlConnectionFails(context, "google.com", 443);
}
+
+ public void testUserAddedCaOptIn() throws Exception {
+ TrustedCertificateStore store = new TrustedCertificateStore();
+ try {
+ // Install the test CA.
+ store.installCertificate(TEST_CA_CERT);
+ NetworkSecurityConfig preNConfig =
+ NetworkSecurityConfig.getDefaultBuilder(Build.VERSION_CODES.M).build();
+ NetworkSecurityConfig nConfig =
+ NetworkSecurityConfig.getDefaultBuilder(Build.VERSION_CODES.N).build();
+ Set<TrustAnchor> preNAnchors = preNConfig.getTrustAnchors();
+ Set<TrustAnchor> nAnchors = nConfig.getTrustAnchors();
+ Set<X509Certificate> preNCerts = new HashSet<X509Certificate>();
+ for (TrustAnchor anchor : preNAnchors) {
+ preNCerts.add(anchor.certificate);
+ }
+ Set<X509Certificate> nCerts = new HashSet<X509Certificate>();
+ for (TrustAnchor anchor : nAnchors) {
+ nCerts.add(anchor.certificate);
+ }
+ assertTrue(preNCerts.contains(TEST_CA_CERT));
+ assertFalse(nCerts.contains(TEST_CA_CERT));
+ } finally {
+ // Delete the user added CA. We don't know the alias so just delete them all.
+ for (String alias : store.aliases()) {
+ if (store.isUser(alias)) {
+ try {
+ store.deleteCertificateEntry(alias);
+ } catch (Exception ignored) {
+ }
+ }
+ }
+ }
+ }
}
diff --git a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java
index 95e2dcf..4770c05 100644
--- a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java
+++ b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java
@@ -204,7 +204,10 @@
UUID modelUuid = getSelectedUuid();
SoundTriggerDetector detector = getDetector();
if (detector == null) {
- Log.i(TAG, "Created an instance of the SoundTriggerDetector.");
+ Log.i(TAG, "Created an instance of the SoundTriggerDetector for model #" +
+ mSelectedModelId);
+ postMessage("Created an instance of the SoundTriggerDetector for model #" +
+ mSelectedModelId);
detector = mSoundTriggerUtil.createSoundTriggerDetector(modelUuid,
new DetectorCallback());
setDetector(detector);
@@ -213,6 +216,7 @@
if (!detector.startRecognition(
SoundTriggerDetector.RECOGNITION_FLAG_ALLOW_MULTIPLE_TRIGGERS)) {
Log.e(TAG, "Fast failure attempting to start recognition.");
+ postMessage("Fast failure attempting to start recognition:" + mSelectedModelId);
}
}
@@ -220,11 +224,13 @@
SoundTriggerDetector detector = getDetector();
if (detector == null) {
Log.e(TAG, "Stop called on null detector.");
+ postMessage("Error: Stop called on null detector.");
return;
}
postMessage("Triggering stop recognition for model: " + mSelectedModelId);
if (!detector.stopRecognition()) {
Log.e(TAG, "Fast failure attempting to stop recognition.");
+ postMessage("Fast failure attempting to stop recognition: " + mSelectedModelId);
}
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java
index 2000fbc..533a10a 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindow.java
@@ -50,7 +50,8 @@
@Override
public void resized(Rect rect, Rect rect2, Rect rect3, Rect rect4, Rect rect5, Rect rect6,
- boolean b, Configuration configuration, Rect rect7, boolean b2) throws RemoteException {
+ boolean b, Configuration configuration, Rect rect7, boolean b2, boolean b3)
+ throws RemoteException {
// pass for now.
}
diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java
index ed12bdf..a46aaec 100644
--- a/wifi/java/android/net/wifi/ScanResult.java
+++ b/wifi/java/android/net/wifi/ScanResult.java
@@ -160,21 +160,6 @@
}
}
- /** @hide */
- public static final int ENABLED = 0;
- /** @hide */
- public static final int AUTO_ROAM_DISABLED = 16;
- /** @hide */
- public static final int AUTO_JOIN_DISABLED = 32;
- /** @hide */
- public static final int AUTHENTICATION_ERROR = 128;
-
- /**
- * Status: indicating join status
- * @hide
- */
- public int autoJoinStatus;
-
/**
* num IP configuration failures
* @hide
@@ -187,17 +172,6 @@
*/
public long blackListTimestamp;
- /** @hide **/
- public void setAutoJoinStatus(int status) {
- if (status < 0) status = 0;
- if (status == 0) {
- blackListTimestamp = 0;
- } else if (status > autoJoinStatus) {
- blackListTimestamp = System.currentTimeMillis();
- }
- autoJoinStatus = status;
- }
-
/**
* Status: indicating the scan result is not a result
* that is part of user's saved configurations
@@ -462,7 +436,6 @@
distanceCm = source.distanceCm;
distanceSdCm = source.distanceSdCm;
seen = source.seen;
- autoJoinStatus = source.autoJoinStatus;
untrusted = source.untrusted;
numConnection = source.numConnection;
numUsage = source.numUsage;
@@ -506,9 +479,6 @@
sb.append(", passpoint: ");
sb.append(((flags & FLAG_PASSPOINT_NETWORK) != 0) ? "yes" : "no");
- if (autoJoinStatus != 0) {
- sb.append(", status: ").append(autoJoinStatus);
- }
sb.append(", ChannelBandwidth: ").append(channelWidth);
sb.append(", centerFreq0: ").append(centerFreq0);
sb.append(", centerFreq1: ").append(centerFreq1);
@@ -544,7 +514,6 @@
dest.writeInt(centerFreq0);
dest.writeInt(centerFreq1);
dest.writeLong(seen);
- dest.writeInt(autoJoinStatus);
dest.writeInt(untrusted ? 1 : 0);
dest.writeInt(numConnection);
dest.writeInt(numUsage);
@@ -615,7 +584,6 @@
);
sr.seen = in.readLong();
- sr.autoJoinStatus = in.readInt();
sr.untrusted = in.readInt() != 0;
sr.numConnection = in.readInt();
sr.numUsage = in.readInt();