summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/app/AppOpsManager.java5
-rw-r--r--core/java/android/content/pm/PackageParser.java3
-rw-r--r--core/java/android/content/pm/ThemeUtils.java20
-rw-r--r--core/java/android/preference/RingtonePreference.java30
-rw-r--r--core/java/android/provider/Settings.java75
-rw-r--r--core/java/com/android/internal/app/LocalePicker.java21
-rw-r--r--core/java/com/android/internal/logging/MetricsConstants.java1
-rw-r--r--core/java/com/android/internal/util/cm/palette/ColorCutQuantizer.java391
-rw-r--r--core/java/com/android/internal/util/cm/palette/ColorHistogram.java127
-rw-r--r--core/java/com/android/internal/util/cm/palette/ColorUtils.java155
-rw-r--r--core/java/com/android/internal/util/cm/palette/DefaultGenerator.java244
-rw-r--r--core/java/com/android/internal/util/cm/palette/Palette.java788
-rw-r--r--core/res/res/layout/permission_confirmation_dialog.xml4
-rw-r--r--core/res/res/values-ar/cm_strings.xml120
-rw-r--r--core/res/res/values-bn-rBD/cm_strings.xml10
-rw-r--r--core/res/res/values-de/cm_strings.xml6
-rw-r--r--core/res/res/values-en-rIN/cm_strings.xml25
-rw-r--r--core/res/res/values-es/cm_strings.xml87
-rw-r--r--core/res/res/values-fi/cm_strings.xml16
-rw-r--r--core/res/res/values-fr/cm_strings.xml16
-rw-r--r--core/res/res/values-hr/cm_strings.xml65
-rw-r--r--core/res/res/values-hu/cm_strings.xml16
-rw-r--r--core/res/res/values-nb/cm_strings.xml16
-rw-r--r--core/res/res/values-nl/cm_strings.xml17
-rw-r--r--core/res/res/values-pl/cm_strings.xml16
-rw-r--r--core/res/res/values-pt-rBR/cm_strings.xml16
-rw-r--r--core/res/res/values-pt-rPT/cm_strings.xml4
-rw-r--r--core/res/res/values-ro/cm_strings.xml2
-rw-r--r--core/res/res/values-ru/cm_strings.xml16
-rw-r--r--core/res/res/values-sl/cm_strings.xml16
-rw-r--r--core/res/res/values-th/cm_strings.xml130
-rw-r--r--core/res/res/values-tr/cm_strings.xml10
-rw-r--r--core/res/res/values-vi/cm_strings.xml141
-rw-r--r--core/res/res/values-zh-rCN/cm_strings.xml2
-rw-r--r--core/res/res/values/cm_integers.xml22
-rw-r--r--core/res/res/values/cm_symbols.xml6
-rw-r--r--core/res/res/values/config.xml1
-rw-r--r--core/res/res/values/customize.xml6
-rw-r--r--core/res/res/values/symbols.xml2
-rw-r--r--graphics/java/android/graphics/drawable/VectorDrawable.java12
-rw-r--r--media/java/android/media/MediaRecorder.java2
-rw-r--r--media/java/android/media/Ringtone.java16
-rw-r--r--media/java/android/media/RingtoneManager.java107
-rw-r--r--packages/Keyguard/res/values-ar/cm_strings.xml20
-rw-r--r--packages/Keyguard/res/values-bn-rBD/cm_strings.xml20
-rw-r--r--packages/Keyguard/res/values-en-rIN/cm_strings.xml5
-rw-r--r--packages/Keyguard/res/values-es/cm_strings.xml1
-rw-r--r--packages/Keyguard/res/values-hr/cm_strings.xml21
-rw-r--r--packages/Keyguard/res/values-hu/cm_strings.xml5
-rw-r--r--packages/Keyguard/res/values-ko/cm_strings.xml4
-rw-r--r--packages/Keyguard/res/values-nb/cm_strings.xml5
-rw-r--r--packages/Keyguard/res/values-nl/cm_strings.xml5
-rw-r--r--packages/Keyguard/res/values-pt-rBR/cm_strings.xml5
-rw-r--r--packages/Keyguard/res/values-sl/cm_strings.xml7
-rw-r--r--packages/Keyguard/res/values-th/cm_strings.xml24
-rw-r--r--packages/Keyguard/res/values-vi/cm_strings.xml20
-rw-r--r--packages/Keyguard/res/values-zh-rCN/cm_strings.xml2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java2
-rw-r--r--packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java21
-rw-r--r--packages/SettingsLib/res/values-de/cm_strings.xml27
-rw-r--r--packages/SettingsLib/res/values-el/cm_strings.xml27
-rw-r--r--packages/SettingsLib/res/values-fr/cm_strings.xml27
-rw-r--r--packages/SettingsLib/res/values-it/cm_strings.xml27
-rw-r--r--packages/SettingsLib/res/values-ko/cm_strings.xml27
-rw-r--r--packages/SettingsLib/res/values-zh-rCN/cm_strings.xml27
-rw-r--r--packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java7
-rw-r--r--packages/SettingsProvider/res/mipmap-hdpi/ic_launcher_settings.pngbin8822 -> 5946 bytes
-rw-r--r--packages/SettingsProvider/res/mipmap-mdpi/ic_launcher_settings.pngbin5362 -> 3589 bytes
-rw-r--r--packages/SettingsProvider/res/mipmap-xhdpi/ic_launcher_settings.pngbin12096 -> 8605 bytes
-rw-r--r--packages/SettingsProvider/res/mipmap-xxhdpi/ic_launcher_settings.pngbin20300 -> 14731 bytes
-rw-r--r--packages/SettingsProvider/res/mipmap-xxxhdpi/ic_launcher_settings.pngbin27997 -> 21728 bytes
-rw-r--r--packages/SettingsProvider/res/values/customize.xml63
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java59
-rw-r--r--packages/SystemUI/AndroidManifest_cm.xml8
-rw-r--r--packages/SystemUI/res/drawable/ic_qs_tile_category_other.xml23
-rw-r--r--packages/SystemUI/res/drawable/ic_qs_tile_category_system.xml25
-rw-r--r--packages/SystemUI/res/drawable/ic_qs_tile_contract.xml24
-rw-r--r--packages/SystemUI/res/drawable/ic_qs_tile_expand.xml24
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_data_roaming.xml22
-rw-r--r--packages/SystemUI/res/layout/mobile_signal_group.xml51
-rw-r--r--packages/SystemUI/res/layout/qs_tile_category_row.xml55
-rw-r--r--packages/SystemUI/res/layout/qs_tile_child_row.xml42
-rw-r--r--packages/SystemUI/res/layout/super_status_bar.xml27
-rw-r--r--packages/SystemUI/res/values-ar/cm_arrays.xml29
-rw-r--r--packages/SystemUI/res/values-ar/cm_strings.xml25
-rw-r--r--packages/SystemUI/res/values-de/cm_strings.xml5
-rw-r--r--packages/SystemUI/res/values-el/cm_strings.xml2
-rw-r--r--packages/SystemUI/res/values-en-rIN/cm_strings.xml71
-rw-r--r--packages/SystemUI/res/values-es/cm_strings.xml55
-rw-r--r--packages/SystemUI/res/values-fr/cm_strings.xml17
-rw-r--r--packages/SystemUI/res/values-gl-rES/cm_strings.xml17
-rw-r--r--packages/SystemUI/res/values-hr/cm_strings.xml96
-rw-r--r--packages/SystemUI/res/values-hu/cm_strings.xml17
-rw-r--r--packages/SystemUI/res/values-it/cm_strings.xml2
-rw-r--r--packages/SystemUI/res/values-iw/cm_strings.xml5
-rw-r--r--packages/SystemUI/res/values-ja/cm_strings.xml2
-rw-r--r--packages/SystemUI/res/values-nb/cm_strings.xml16
-rw-r--r--packages/SystemUI/res/values-nl/cm_strings.xml17
-rw-r--r--packages/SystemUI/res/values-pl/cm_strings.xml10
-rw-r--r--packages/SystemUI/res/values-pt-rBR/cm_strings.xml17
-rw-r--r--packages/SystemUI/res/values-pt-rPT/cm_strings.xml2
-rw-r--r--packages/SystemUI/res/values-ro/cm_strings.xml10
-rw-r--r--packages/SystemUI/res/values-ru/cm_strings.xml6
-rw-r--r--packages/SystemUI/res/values-sl/cm_strings.xml17
-rw-r--r--packages/SystemUI/res/values-sv/cm_strings.xml3
-rw-r--r--packages/SystemUI/res/values-th/cm_arrays.xml29
-rw-r--r--packages/SystemUI/res/values-th/cm_strings.xml107
-rw-r--r--packages/SystemUI/res/values-tr/cm_strings.xml6
-rw-r--r--packages/SystemUI/res/values-vi/cm_arrays.xml29
-rw-r--r--packages/SystemUI/res/values-vi/cm_strings.xml33
-rw-r--r--packages/SystemUI/res/values-zh-rCN/cm_strings.xml4
-rw-r--r--packages/SystemUI/res/values/cm_colors.xml6
-rw-r--r--packages/SystemUI/res/values/cm_strings.xml4
-rw-r--r--packages/SystemUI/res/xml/tuner_prefs.xml55
-rw-r--r--packages/SystemUI/res/xml/tuner_statusbar_icons.xml60
-rwxr-xr-xpackages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java70
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java711
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSPanelTopView.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSSettings.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSTileView.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSViewPager.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/AdbOverNetworkTile.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/AmbientDisplayTile.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/CompassTile.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/CustomQSTile.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/EditTile.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/LiveDisplayTile.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/LockscreenToggleTile.java89
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/PerfProfileTile.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/ProfilesTile.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/ScreenTimeoutTile.java6
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/SyncTile.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/UsbTetherTile.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/tiles/VolumeTile.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/VisualizerView.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NavBarInsetLayout.java217
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java96
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java159
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java37
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java28
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java104
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/CallbackHandler.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java15
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java15
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/SignalCallbackAdapter.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/SignalController.java1
-rw-r--r--packages/SystemUI/src/com/android/systemui/tuner/StatusBarIconBlacklistFragment.java71
-rw-r--r--packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java41
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CallbackHandlerTest.java7
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java2
-rw-r--r--services/core/java/com/android/server/LockSettingsStrongAuth.java12
-rw-r--r--services/core/java/com/android/server/ThemeService.java8
-rw-r--r--services/core/java/com/android/server/WiredAccessoryManager.java17
-rwxr-xr-xservices/core/java/com/android/server/am/ActivityManagerService.java2
-rw-r--r--services/core/java/com/android/server/display/AutomaticBrightnessController.java31
-rw-r--r--services/core/java/com/android/server/display/DisplayPowerController.java8
-rw-r--r--services/core/java/com/android/server/location/GpsLocationProvider.java32
-rwxr-xr-xservices/core/java/com/android/server/notification/NotificationManagerService.java3
-rw-r--r--services/core/java/com/android/server/pm/PackageManagerService.java47
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java2
-rw-r--r--tools/aapt/StringPool.cpp31
-rw-r--r--tools/aapt/StringPool.h3
171 files changed, 4917 insertions, 1386 deletions
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index c590fac..11a5ee8 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -1382,11 +1382,6 @@ public class AppOpsManager {
private final int mIgnoredCount;
public OpEntry(int op, int mode, long time, long rejectTime, int duration,
- int proxyUid, String proxyPackage) {
- this(op, mode, time, rejectTime, duration, proxyUid, proxyPackage, 0, 0);
- }
-
- public OpEntry(int op, int mode, long time, long rejectTime, int duration,
int proxyUid, String proxyPackage, int allowedCount, int ignoredCount) {
mOp = op;
mMode = mode;
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index dba6d56..6a07b31 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -1133,6 +1133,7 @@ public class PackageParser {
*/
public void collectManifestDigest(Package pkg) throws PackageParserException {
pkg.manifestDigest = null;
+ pkg.manifestHashCode = 0;
// TODO: extend to gather digest for split APKs
try {
@@ -1141,7 +1142,7 @@ public class PackageParser {
final ZipEntry je = jarFile.findEntry(ANDROID_MANIFEST_FILENAME);
if (je != null) {
pkg.manifestDigest = ManifestDigest.fromInputStream(jarFile.getInputStream(je));
- pkg.manifestHashCode = ThemeUtils.getPackageHashCode(pkg);
+ pkg.manifestHashCode = ThemeUtils.getPackageHashCode(pkg, jarFile);
}
} finally {
jarFile.close();
diff --git a/core/java/android/content/pm/ThemeUtils.java b/core/java/android/content/pm/ThemeUtils.java
index 357b372..e41523c 100644
--- a/core/java/android/content/pm/ThemeUtils.java
+++ b/core/java/android/content/pm/ThemeUtils.java
@@ -50,6 +50,7 @@ import java.io.OutputStream;
import java.io.InputStreamReader;
import java.nio.ByteBuffer;
import java.util.ArrayList;
+import java.util.jar.StrictJarFile;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -120,6 +121,7 @@ public class ThemeUtils {
private static final String SETTINGS_DB =
"/data/data/com.android.providers.settings/databases/settings.db";
private static final String SETTINGS_SECURE_TABLE = "secure";
+ private static final String MANIFEST_NAME = "META-INF/MANIFEST.MF";
/**
* IDMAP hash version code used to alter the resulting hash and force recreating
@@ -727,8 +729,24 @@ public class ThemeUtils {
* @param pkg
* @return
*/
- public static int getPackageHashCode(PackageParser.Package pkg) {
+ public static int getPackageHashCode(PackageParser.Package pkg, StrictJarFile jarFile) {
int hash = pkg.manifestDigest != null ? pkg.manifestDigest.hashCode() : 0;
+ final ZipEntry je = jarFile.findEntry(MANIFEST_NAME);
+ if (je != null) {
+ try {
+ try {
+ ManifestDigest digest = ManifestDigest.fromInputStream(
+ jarFile.getInputStream(je));
+ if (digest != null) {
+ hash += digest.hashCode();
+ }
+ } finally {
+ jarFile.close();
+ }
+ } catch (IOException | RuntimeException e) {
+ // Failed to generate digest from manifest.mf
+ }
+ }
hash = 31 * hash + IDMAP_HASH_VERSION;
return hash;
}
diff --git a/core/java/android/preference/RingtonePreference.java b/core/java/android/preference/RingtonePreference.java
index 81c0595..dd260e0 100644
--- a/core/java/android/preference/RingtonePreference.java
+++ b/core/java/android/preference/RingtonePreference.java
@@ -51,6 +51,7 @@ public class RingtonePreference extends Preference implements
private int mDialogStyle;
private int mRequestCode;
+ private int mSubscriptionID = 0; /* Sub-1 by default */
public RingtonePreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
@@ -101,6 +102,28 @@ public class RingtonePreference extends Preference implements
}
/**
+ * Returns the subscription ID.
+ *
+ * @return The current subscription ID.
+ * @see #setSubId(int)
+ * @hide
+ */
+ public int getSubId() {
+ return mSubscriptionID;
+ }
+
+ /**
+ * Sets the subscription ID.
+ *
+ * @param subId subscription ID.
+ * @see #getSubId(int)
+ * @hide
+ */
+ public void setSubId(int subId) {
+ mSubscriptionID = subId;
+ }
+
+ /**
* Returns whether to a show an item for the default sound/ringtone.
*
* @return Whether to show an item for the default sound/ringtone.
@@ -187,8 +210,13 @@ public class RingtonePreference extends Preference implements
ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_DEFAULT, mShowDefault);
if (mShowDefault) {
- ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI,
+ if (getRingtoneType() == RingtoneManager.TYPE_RINGTONE) {
+ ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI,
+ RingtoneManager.getDefaultRingtoneUriBySubId(getSubId()));
+ } else {
+ ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI,
RingtoneManager.getDefaultUri(getRingtoneType()));
+ }
}
if (mDialogStyle != 0) {
ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_DIALOG_THEME,
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index bf0806e..a738b83 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -660,6 +660,19 @@ public final class Settings {
/**
* @hide
+ * Activity Action: Show the "app ops" details screen.
+ * <p>
+ * Input: The Intent's data URI specifies the application package name
+ * to be shown, with the "package" scheme. That is "package:com.my.app".
+ * <p>
+ * Output: Nothing.
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_APP_OPS_DETAILS_SETTINGS =
+ "android.settings.APP_OPS_DETAILS_SETTINGS";
+
+ /**
+ * @hide
* Activity Action: Show the "app ops" settings screen.
* <p>
* Input: Nothing.
@@ -1695,9 +1708,8 @@ public final class Settings {
}
if (MOVED_TO_GLOBAL.contains(name) || MOVED_TO_SECURE_THEN_GLOBAL.contains(name)) {
Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
- + " to android.provider.Settings.Global.");
-
- return Global.putStringForUser(resolver, name, value, userHandle);
+ + " to android.provider.Settings.Global, value is unchanged.");
+ return false;
}
return sNameValueCache.putStringForUser(resolver, name, value, userHandle);
}
@@ -2768,6 +2780,30 @@ public final class Settings {
private static final Validator RINGTONE_VALIDATOR = sUriValidator;
/**
+ * Persistent store for the SIM-2 ringtone URI.
+ * <p>
+ * If you need to play SIM-2 ringtone at any given time, it is recommended
+ * you give {@link #DEFAULT_RINGTONE_URI_2} to the media player. It will resolve
+ * to the set default ringtone at the time of playing.
+ *
+ * @see #DEFAULT_RINGTONE_URI_2
+ * @hide
+ */
+ public static final String RINGTONE_2 = "ringtone_2";
+
+ /**
+ * Persistent store for the SIM-3 ringtone URI.
+ * <p>
+ * If you need to play SIM-3 ringtone at any given time, it is recommended
+ * you give {@link #DEFAULT_RINGTONE_URI_3} to the media player. It will resolve
+ * to the set default ringtone at the time of playing.
+ *
+ * @see #DEFAULT_RINGTONE_URI_3
+ * @hide
+ */
+ public static final String RINGTONE_3 = "ringtone_3";
+
+ /**
* A {@link Uri} that will point to the current default ringtone at any
* given time.
* <p>
@@ -2778,6 +2814,39 @@ public final class Settings {
public static final Uri DEFAULT_RINGTONE_URI = getUriFor(RINGTONE);
/**
+ * A {@link Uri} that will point to the current SIM-2 ringtone at any
+ * given time.
+ * <p>
+ * If the current default ringtone is in the DRM provider and the caller
+ * does not have permission, the exception will be a
+ * FileNotFoundException.
+ *
+ * @hide
+ */
+ public static final Uri DEFAULT_RINGTONE_URI_2 = getUriFor(RINGTONE_2);
+
+ /**
+ * A {@link Uri} that will point to the current SIM-3 ringtone at any
+ * given time.
+ * <p>
+ * If the current default ringtone is in the DRM provider and the caller
+ * does not have permission, the exception will be a
+ * FileNotFoundException.
+ *
+ * @hide
+ */
+ public static final Uri DEFAULT_RINGTONE_URI_3 = getUriFor(RINGTONE_3);
+
+ /**
+ * Maximum number of ringtones supported.
+ * <p>
+ * Maximum number of ringtones supported by settings. Increment this
+ * if a new URI needs to be added for ringtone.
+ * @hide
+ */
+ public static final int MAX_NUM_RINGTONES = 3;
+
+ /**
* Persistent store for the system-wide default notification sound.
*
* @see #RINGTONE
diff --git a/core/java/com/android/internal/app/LocalePicker.java b/core/java/com/android/internal/app/LocalePicker.java
index 4efefa9..83160cd 100644
--- a/core/java/com/android/internal/app/LocalePicker.java
+++ b/core/java/com/android/internal/app/LocalePicker.java
@@ -1,4 +1,7 @@
/*
+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+ *
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -41,6 +44,7 @@ import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.ArrayList;
+import java.util.Arrays;
public class LocalePicker extends ListFragment {
private static final String TAG = "LocalePicker";
@@ -83,12 +87,23 @@ public class LocalePicker extends ListFragment {
}
}
+ public static ArrayList<String> getLocaleArray(String[] locales, Resources resources) {
+ String locale_codes = resources.getString(R.string.locale_codes);
+ String[] localeCodesArray = null;
+ if (locale_codes != null && !"".equals(locale_codes.trim())) {
+ localeCodesArray = locale_codes.split(",");
+ }
+ ArrayList<String> localeList = new ArrayList<String>(
+ Arrays.asList((localeCodesArray == null || localeCodesArray.length == 0) ? locales
+ : localeCodesArray));
+ return localeList;
+ }
+
public static List<LocaleInfo> getAllAssetLocales(Context context, boolean isInDeveloperMode) {
final Resources resources = context.getResources();
- final String[] locales = Resources.getSystem().getAssets().getLocales();
- List<String> localeList = new ArrayList<String>(locales.length);
- Collections.addAll(localeList, locales);
+ String[] locales = Resources.getSystem().getAssets().getLocales();
+ ArrayList<String> localeList = getLocaleArray(locales, resources);
// Don't show the pseudolocales unless we're in developer mode. http://b/17190407.
if (!isInDeveloperMode) {
diff --git a/core/java/com/android/internal/logging/MetricsConstants.java b/core/java/com/android/internal/logging/MetricsConstants.java
index 0e0d0bb..b90cb36 100644
--- a/core/java/com/android/internal/logging/MetricsConstants.java
+++ b/core/java/com/android/internal/logging/MetricsConstants.java
@@ -21,7 +21,6 @@ package com.android.internal.logging;
* @hide
*/
public interface MetricsConstants {
- public static final int DONT_TRACK_ME_BRO = -Integer.MAX_VALUE + 1;
// These constants must match those in the analytic pipeline, do not edit.
// Add temporary values to the top of MetricsLogger instead.
public static final int VIEW_UNKNOWN = 0;
diff --git a/core/java/com/android/internal/util/cm/palette/ColorCutQuantizer.java b/core/java/com/android/internal/util/cm/palette/ColorCutQuantizer.java
index ab5aef7..a24dff8 100644
--- a/core/java/com/android/internal/util/cm/palette/ColorCutQuantizer.java
+++ b/core/java/com/android/internal/util/cm/palette/ColorCutQuantizer.java
@@ -16,11 +16,9 @@
package com.android.internal.util.cm.palette;
-import android.graphics.Bitmap;
import android.graphics.Color;
-import android.util.SparseIntArray;
-
import com.android.internal.util.cm.palette.Palette.Swatch;
+import android.util.TimingLogger;
import java.util.ArrayList;
import java.util.Arrays;
@@ -46,74 +44,97 @@ import java.util.PriorityQueue;
*/
final class ColorCutQuantizer {
- private static final String LOG_TAG = ColorCutQuantizer.class.getSimpleName();
-
- private final float[] mTempHsl = new float[3];
-
- private static final float BLACK_MAX_LIGHTNESS = 0.05f;
- private static final float WHITE_MIN_LIGHTNESS = 0.95f;
+ private static final String LOG_TAG = "ColorCutQuantizer";
+ private static final boolean LOG_TIMINGS = false;
private static final int COMPONENT_RED = -3;
private static final int COMPONENT_GREEN = -2;
private static final int COMPONENT_BLUE = -1;
- private final int[] mColors;
- private final SparseIntArray mColorPopulations;
+ private static final int QUANTIZE_WORD_WIDTH = 5;
+ private static final int QUANTIZE_WORD_MASK = (1 << QUANTIZE_WORD_WIDTH) - 1;
- private final List<Swatch> mQuantizedColors;
+ final int[] mColors;
+ final int[] mHistogram;
+ final List<Swatch> mQuantizedColors;
+ final TimingLogger mTimingLogger;
+ final Palette.Filter[] mFilters;
+
+ private final float[] mTempHsl = new float[3];
/**
- * Factory-method to generate a {@link ColorCutQuantizer} from a {@link Bitmap} object.
+ * Constructor.
*
- * @param bitmap Bitmap to extract the pixel data from
+ * @param pixels histogram representing an image's pixel data
* @param maxColors The maximum number of colors that should be in the result palette.
+ * @param filters Set of filters to use in the quantization stage
*/
- static ColorCutQuantizer fromBitmap(Bitmap bitmap, int maxColors) {
- final int width = bitmap.getWidth();
- final int height = bitmap.getHeight();
+ ColorCutQuantizer(final int[] pixels, final int maxColors, final Palette.Filter[] filters) {
+ mTimingLogger = LOG_TIMINGS ? new TimingLogger(LOG_TAG, "Creation") : null;
+ mFilters = filters;
+
+ final int[] hist = mHistogram = new int[1 << (QUANTIZE_WORD_WIDTH * 3)];
+ for (int i = 0; i < pixels.length; i++) {
+ final int quantizedColor = quantizeFromRgb888(pixels[i]);
+ // Now update the pixel value to the quantized value
+ pixels[i] = quantizedColor;
+ // And update the histogram
+ hist[quantizedColor]++;
+ }
- final int[] pixels = new int[width * height];
- bitmap.getPixels(pixels, 0, width, 0, 0, width, height);
+ if (LOG_TIMINGS) {
+ mTimingLogger.addSplit("Histogram created");
+ }
- return new ColorCutQuantizer(new com.android.internal.util.cm.palette.ColorHistogram(pixels), maxColors);
- }
+ // Now let's count the number of distinct colors
+ int distinctColorCount = 0;
+ for (int color = 0; color < hist.length; color++) {
+ if (hist[color] > 0 && shouldIgnoreColor(color)) {
+ // If we should ignore the color, set the population to 0
+ hist[color] = 0;
+ }
+ if (hist[color] > 0) {
+ // If the color has population, increase the distinct color count
+ distinctColorCount++;
+ }
+ }
- /**
- * Private constructor.
- *
- * @param colorHistogram histogram representing an image's pixel data
- * @param maxColors The maximum number of colors that should be in the result palette.
- */
- private ColorCutQuantizer(com.android.internal.util.cm.palette.ColorHistogram colorHistogram, int maxColors) {
- final int rawColorCount = colorHistogram.getNumberOfColors();
- final int[] rawColors = colorHistogram.getColors();
- final int[] rawColorCounts = colorHistogram.getColorCounts();
-
- // First, lets pack the populations into a SparseIntArray so that they can be easily
- // retrieved without knowing a color's index
- mColorPopulations = new SparseIntArray(rawColorCount);
- for (int i = 0; i < rawColors.length; i++) {
- mColorPopulations.append(rawColors[i], rawColorCounts[i]);
+ if (LOG_TIMINGS) {
+ mTimingLogger.addSplit("Filtered colors and distinct colors counted");
}
- // Now go through all of the colors and keep those which we do not want to ignore
- mColors = new int[rawColorCount];
- int validColorCount = 0;
- for (int color : rawColors) {
- if (!shouldIgnoreColor(color)) {
- mColors[validColorCount++] = color;
+ // Now lets go through create an array consisting of only distinct colors
+ final int[] colors = mColors = new int[distinctColorCount];
+ int distinctColorIndex = 0;
+ for (int color = 0; color < hist.length; color++) {
+ if (hist[color] > 0) {
+ colors[distinctColorIndex++] = color;
}
}
- if (validColorCount <= maxColors) {
+ if (LOG_TIMINGS) {
+ mTimingLogger.addSplit("Distinct colors copied into array");
+ }
+
+ if (distinctColorCount <= maxColors) {
// The image has fewer colors than the maximum requested, so just return the colors
- mQuantizedColors = new ArrayList<Swatch>();
- for (final int color : mColors) {
- mQuantizedColors.add(new Swatch(color, mColorPopulations.get(color)));
+ mQuantizedColors = new ArrayList<>();
+ for (int color : colors) {
+ mQuantizedColors.add(new Swatch(approximateToRgb888(color), hist[color]));
+ }
+
+ if (LOG_TIMINGS) {
+ mTimingLogger.addSplit("Too few colors present. Copied to Swatches");
+ mTimingLogger.dumpToLog();
}
} else {
// We need use quantization to reduce the number of colors
- mQuantizedColors = quantizePixels(validColorCount - 1, maxColors);
+ mQuantizedColors = quantizePixels(maxColors);
+
+ if (LOG_TIMINGS) {
+ mTimingLogger.addSplit("Quantized colors computed");
+ mTimingLogger.dumpToLog();
+ }
}
}
@@ -124,13 +145,13 @@ final class ColorCutQuantizer {
return mQuantizedColors;
}
- private List<Swatch> quantizePixels(int maxColorIndex, int maxColors) {
+ private List<Swatch> quantizePixels(int maxColors) {
// Create the priority queue which is sorted by volume descending. This means we always
// split the largest box in the queue
- final PriorityQueue<Vbox> pq = new PriorityQueue<Vbox>(maxColors, VBOX_COMPARATOR_VOLUME);
+ final PriorityQueue<Vbox> pq = new PriorityQueue<>(maxColors, VBOX_COMPARATOR_VOLUME);
// To start, offer a box which contains all of the colors
- pq.offer(new Vbox(0, maxColorIndex));
+ pq.offer(new Vbox(0, mColors.length - 1));
// Now go through the boxes, splitting them until we have reached maxColors or there are no
// more boxes to split
@@ -146,7 +167,7 @@ final class ColorCutQuantizer {
* and splitting them. Once split, the new box and the remaining box are offered back to the
* queue.
*
- * @param queue {@link PriorityQueue} to poll for boxes
+ * @param queue {@link java.util.PriorityQueue} to poll for boxes
* @param maxSize Maximum amount of boxes to split
*/
private void splitBoxes(final PriorityQueue<Vbox> queue, final int maxSize) {
@@ -156,9 +177,16 @@ final class ColorCutQuantizer {
if (vbox != null && vbox.canSplit()) {
// First split the box, and offer the result
queue.offer(vbox.splitBox());
+
+ if (LOG_TIMINGS) {
+ mTimingLogger.addSplit("Box split");
+ }
// Then offer the box back
queue.offer(vbox);
} else {
+ if (LOG_TIMINGS) {
+ mTimingLogger.addSplit("All boxes split");
+ }
// If we get here then there are no more boxes to split, so return
return;
}
@@ -166,13 +194,13 @@ final class ColorCutQuantizer {
}
private List<Swatch> generateAverageColors(Collection<Vbox> vboxes) {
- ArrayList<Swatch> colors = new ArrayList<Swatch>(vboxes.size());
+ ArrayList<Swatch> colors = new ArrayList<>(vboxes.size());
for (Vbox vbox : vboxes) {
- Swatch color = vbox.getAverageColor();
- if (!shouldIgnoreColor(color)) {
+ Swatch swatch = vbox.getAverageColor();
+ if (!shouldIgnoreColor(swatch)) {
// As we're averaging a color box, we can still get colors which we do not want, so
// we check again here
- colors.add(color);
+ colors.add(swatch);
}
}
return colors;
@@ -185,6 +213,8 @@ final class ColorCutQuantizer {
// lower and upper index are inclusive
private int mLowerIndex;
private int mUpperIndex;
+ // Population of colors within this box
+ private int mPopulation;
private int mMinRed, mMaxRed;
private int mMinGreen, mMaxGreen;
@@ -196,51 +226,67 @@ final class ColorCutQuantizer {
fitBox();
}
- int getVolume() {
+ final int getVolume() {
return (mMaxRed - mMinRed + 1) * (mMaxGreen - mMinGreen + 1) *
(mMaxBlue - mMinBlue + 1);
}
- boolean canSplit() {
+ final boolean canSplit() {
return getColorCount() > 1;
}
- int getColorCount() {
- return mUpperIndex - mLowerIndex + 1;
+ final int getColorCount() {
+ return 1 + mUpperIndex - mLowerIndex;
}
/**
* Recomputes the boundaries of this box to tightly fit the colors within the box.
*/
- void fitBox() {
+ final void fitBox() {
+ final int[] colors = mColors;
+ final int[] hist = mHistogram;
+
// Reset the min and max to opposite values
- mMinRed = mMinGreen = mMinBlue = 0xFF;
- mMaxRed = mMaxGreen = mMaxBlue = 0x0;
+ int minRed, minGreen, minBlue;
+ minRed = minGreen = minBlue = Integer.MAX_VALUE;
+ int maxRed, maxGreen, maxBlue;
+ maxRed = maxGreen = maxBlue = Integer.MIN_VALUE;
+ int count = 0;
for (int i = mLowerIndex; i <= mUpperIndex; i++) {
- final int color = mColors[i];
- final int r = Color.red(color);
- final int g = Color.green(color);
- final int b = Color.blue(color);
- if (r > mMaxRed) {
- mMaxRed = r;
+ final int color = colors[i];
+ count += hist[color];
+
+ final int r = quantizedRed(color);
+ final int g = quantizedGreen(color);
+ final int b = quantizedBlue(color);
+ if (r > maxRed) {
+ maxRed = r;
}
- if (r < mMinRed) {
- mMinRed = r;
+ if (r < minRed) {
+ minRed = r;
}
- if (g > mMaxGreen) {
- mMaxGreen = g;
+ if (g > maxGreen) {
+ maxGreen = g;
}
- if (g < mMinGreen) {
- mMinGreen = g;
+ if (g < minGreen) {
+ minGreen = g;
}
- if (b > mMaxBlue) {
- mMaxBlue = b;
+ if (b > maxBlue) {
+ maxBlue = b;
}
- if (b < mMinBlue) {
- mMinBlue = b;
+ if (b < minBlue) {
+ minBlue = b;
}
}
+
+ mMinRed = minRed;
+ mMaxRed = maxRed;
+ mMinGreen = minGreen;
+ mMaxGreen = maxGreen;
+ mMinBlue = minBlue;
+ mMaxBlue = maxBlue;
+ mPopulation = count;
}
/**
@@ -248,7 +294,7 @@ final class ColorCutQuantizer {
*
* @return the new ColorBox
*/
- Vbox splitBox() {
+ final Vbox splitBox() {
if (!canSplit()) {
throw new IllegalStateException("Can not split a box with only 1 color");
}
@@ -268,7 +314,7 @@ final class ColorCutQuantizer {
/**
* @return the dimension which this box is largest in
*/
- int getLongestColorDimension() {
+ final int getLongestColorDimension() {
final int redLength = mMaxRed - mMinRed;
final int greenLength = mMaxGreen - mMinGreen;
final int blueLength = mMaxBlue - mMinBlue;
@@ -291,41 +337,27 @@ final class ColorCutQuantizer {
*
* @return the index of the colors array to split from
*/
- int findSplitPoint() {
+ final int findSplitPoint() {
final int longestDimension = getLongestColorDimension();
+ final int[] colors = mColors;
+ final int[] hist = mHistogram;
// We need to sort the colors in this box based on the longest color dimension.
// As we can't use a Comparator to define the sort logic, we modify each color so that
// it's most significant is the desired dimension
- modifySignificantOctet(longestDimension, mLowerIndex, mUpperIndex);
+ modifySignificantOctet(colors, longestDimension, mLowerIndex, mUpperIndex);
// Now sort... Arrays.sort uses a exclusive toIndex so we need to add 1
- Arrays.sort(mColors, mLowerIndex, mUpperIndex + 1);
+ Arrays.sort(colors, mLowerIndex, mUpperIndex + 1);
// Now revert all of the colors so that they are packed as RGB again
- modifySignificantOctet(longestDimension, mLowerIndex, mUpperIndex);
-
- final int dimensionMidPoint = midPoint(longestDimension);
-
- for (int i = mLowerIndex; i <= mUpperIndex; i++) {
- final int color = mColors[i];
-
- switch (longestDimension) {
- case COMPONENT_RED:
- if (Color.red(color) >= dimensionMidPoint) {
- return i;
- }
- break;
- case COMPONENT_GREEN:
- if (Color.green(color) >= dimensionMidPoint) {
- return i;
- }
- break;
- case COMPONENT_BLUE:
- if (Color.blue(color) > dimensionMidPoint) {
- return i;
- }
- break;
+ modifySignificantOctet(colors, longestDimension, mLowerIndex, mUpperIndex);
+
+ final int midPoint = mPopulation / 2;
+ for (int i = mLowerIndex, count = 0; i <= mUpperIndex; i++) {
+ count += hist[colors[i]];
+ if (count >= midPoint) {
+ return i;
}
}
@@ -335,115 +367,150 @@ final class ColorCutQuantizer {
/**
* @return the average color of this box.
*/
- Swatch getAverageColor() {
+ final Swatch getAverageColor() {
+ final int[] colors = mColors;
+ final int[] hist = mHistogram;
int redSum = 0;
int greenSum = 0;
int blueSum = 0;
int totalPopulation = 0;
for (int i = mLowerIndex; i <= mUpperIndex; i++) {
- final int color = mColors[i];
- final int colorPopulation = mColorPopulations.get(color);
+ final int color = colors[i];
+ final int colorPopulation = hist[color];
totalPopulation += colorPopulation;
- redSum += colorPopulation * Color.red(color);
- greenSum += colorPopulation * Color.green(color);
- blueSum += colorPopulation * Color.blue(color);
+ redSum += colorPopulation * quantizedRed(color);
+ greenSum += colorPopulation * quantizedGreen(color);
+ blueSum += colorPopulation * quantizedBlue(color);
}
- final int redAverage = Math.round(redSum / (float) totalPopulation);
- final int greenAverage = Math.round(greenSum / (float) totalPopulation);
- final int blueAverage = Math.round(blueSum / (float) totalPopulation);
+ final int redMean = Math.round(redSum / (float) totalPopulation);
+ final int greenMean = Math.round(greenSum / (float) totalPopulation);
+ final int blueMean = Math.round(blueSum / (float) totalPopulation);
- return new Swatch(redAverage, greenAverage, blueAverage, totalPopulation);
- }
-
- /**
- * @return the midpoint of this box in the given {@code dimension}
- */
- int midPoint(int dimension) {
- switch (dimension) {
- case COMPONENT_RED:
- default:
- return (mMinRed + mMaxRed) / 2;
- case COMPONENT_GREEN:
- return (mMinGreen + mMaxGreen) / 2;
- case COMPONENT_BLUE:
- return (mMinBlue + mMaxBlue) / 2;
- }
+ return new Swatch(approximateToRgb888(redMean, greenMean, blueMean), totalPopulation);
}
}
/**
* Modify the significant octet in a packed color int. Allows sorting based on the value of a
- * single color component.
+ * single color component. This relies on all components being the same word size.
*
* @see Vbox#findSplitPoint()
*/
- private void modifySignificantOctet(final int dimension, int lowerIndex, int upperIndex) {
+ private static void modifySignificantOctet(final int[] a, final int dimension,
+ final int lower, final int upper) {
switch (dimension) {
case COMPONENT_RED:
// Already in RGB, no need to do anything
break;
case COMPONENT_GREEN:
// We need to do a RGB to GRB swap, or vice-versa
- for (int i = lowerIndex; i <= upperIndex; i++) {
- final int color = mColors[i];
- mColors[i] = Color.rgb((color >> 8) & 0xFF, (color >> 16) & 0xFF, color & 0xFF);
+ for (int i = lower; i <= upper; i++) {
+ final int color = a[i];
+ a[i] = quantizedGreen(color) << (QUANTIZE_WORD_WIDTH + QUANTIZE_WORD_WIDTH)
+ | quantizedRed(color) << QUANTIZE_WORD_WIDTH
+ | quantizedBlue(color);
}
break;
case COMPONENT_BLUE:
// We need to do a RGB to BGR swap, or vice-versa
- for (int i = lowerIndex; i <= upperIndex; i++) {
- final int color = mColors[i];
- mColors[i] = Color.rgb(color & 0xFF, (color >> 8) & 0xFF, (color >> 16) & 0xFF);
+ for (int i = lower; i <= upper; i++) {
+ final int color = a[i];
+ a[i] = quantizedBlue(color) << (QUANTIZE_WORD_WIDTH + QUANTIZE_WORD_WIDTH)
+ | quantizedGreen(color) << QUANTIZE_WORD_WIDTH
+ | quantizedRed(color);
}
break;
}
}
- private boolean shouldIgnoreColor(int color) {
- com.android.internal.util.cm.palette.ColorUtils.RGBtoHSL(Color.red(color), Color.green(color), Color.blue(color), mTempHsl);
- return shouldIgnoreColor(mTempHsl);
+ private boolean shouldIgnoreColor(int color565) {
+ final int rgb = approximateToRgb888(color565);
+ ColorUtils.colorToHSL(rgb, mTempHsl);
+ return shouldIgnoreColor(rgb, mTempHsl);
}
- private static boolean shouldIgnoreColor(Swatch color) {
- return shouldIgnoreColor(color.getHsl());
+ private boolean shouldIgnoreColor(Swatch color) {
+ return shouldIgnoreColor(color.getRgb(), color.getHsl());
}
- private static boolean shouldIgnoreColor(float[] hslColor) {
- return isWhite(hslColor) || isBlack(hslColor) || isNearRedILine(hslColor);
+ private boolean shouldIgnoreColor(int rgb, float[] hsl) {
+ if (mFilters != null && mFilters.length > 0) {
+ for (int i = 0, count = mFilters.length; i < count; i++) {
+ if (!mFilters[i].isAllowed(rgb, hsl)) {
+ return true;
+ }
+ }
+ }
+ return false;
}
/**
- * @return true if the color represents a color which is close to black.
+ * Comparator which sorts {@link Vbox} instances based on their volume, in descending order
+ */
+ private static final Comparator<Vbox> VBOX_COMPARATOR_VOLUME = new Comparator<Vbox>() {
+ @Override
+ public int compare(Vbox lhs, Vbox rhs) {
+ return rhs.getVolume() - lhs.getVolume();
+ }
+ };
+
+ /**
+ * Quantized a RGB888 value to have a word width of {@value #QUANTIZE_WORD_WIDTH}.
*/
- private static boolean isBlack(float[] hslColor) {
- return hslColor[2] <= BLACK_MAX_LIGHTNESS;
+ private static int quantizeFromRgb888(int color) {
+ int r = modifyWordWidth(Color.red(color), 8, QUANTIZE_WORD_WIDTH);
+ int g = modifyWordWidth(Color.green(color), 8, QUANTIZE_WORD_WIDTH);
+ int b = modifyWordWidth(Color.blue(color), 8, QUANTIZE_WORD_WIDTH);
+ return r << (QUANTIZE_WORD_WIDTH + QUANTIZE_WORD_WIDTH) | g << QUANTIZE_WORD_WIDTH | b;
}
/**
- * @return true if the color represents a color which is close to white.
+ * Quantized RGB888 values to have a word width of {@value #QUANTIZE_WORD_WIDTH}.
*/
- private static boolean isWhite(float[] hslColor) {
- return hslColor[2] >= WHITE_MIN_LIGHTNESS;
+ private static int approximateToRgb888(int r, int g, int b) {
+ return Color.rgb(modifyWordWidth(r, QUANTIZE_WORD_WIDTH, 8),
+ modifyWordWidth(g, QUANTIZE_WORD_WIDTH, 8),
+ modifyWordWidth(b, QUANTIZE_WORD_WIDTH, 8));
+ }
+
+ private static int approximateToRgb888(int color) {
+ return approximateToRgb888(quantizedRed(color), quantizedGreen(color), quantizedBlue(color));
}
/**
- * @return true if the color lies close to the red side of the I line.
+ * @return red component of the quantized color
*/
- private static boolean isNearRedILine(float[] hslColor) {
- return hslColor[0] >= 10f && hslColor[0] <= 37f && hslColor[1] <= 0.82f;
+ private static int quantizedRed(int color) {
+ return (color >> (QUANTIZE_WORD_WIDTH + QUANTIZE_WORD_WIDTH)) & QUANTIZE_WORD_MASK;
}
/**
- * Comparator which sorts {@link Vbox} instances based on their volume, in descending order
+ * @return green component of a quantized color
*/
- private static final Comparator<Vbox> VBOX_COMPARATOR_VOLUME = new Comparator<Vbox>() {
- @Override
- public int compare(Vbox lhs, Vbox rhs) {
- return rhs.getVolume() - lhs.getVolume();
+ private static int quantizedGreen(int color) {
+ return (color >> QUANTIZE_WORD_WIDTH) & QUANTIZE_WORD_MASK;
+ }
+
+ /**
+ * @return blue component of a quantized color
+ */
+ private static int quantizedBlue(int color) {
+ return color & QUANTIZE_WORD_MASK;
+ }
+
+ private static int modifyWordWidth(int value, int currentWidth, int targetWidth) {
+ final int newValue;
+ if (targetWidth > currentWidth) {
+ // If we're approximating up in word width, we'll shift up
+ newValue = value << (targetWidth - currentWidth);
+ } else {
+ // Else, we will just shift and keep the MSB
+ newValue = value >> (currentWidth - targetWidth);
}
- };
+ return newValue & ((1 << targetWidth) - 1);
+ }
}
diff --git a/core/java/com/android/internal/util/cm/palette/ColorHistogram.java b/core/java/com/android/internal/util/cm/palette/ColorHistogram.java
deleted file mode 100644
index 741982d..0000000
--- a/core/java/com/android/internal/util/cm/palette/ColorHistogram.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright 2014 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.util.cm.palette;
-
-import java.util.Arrays;
-
-/**
- * Class which provides a histogram for RGB values.
- *
- * @hide
- */
-final class ColorHistogram {
-
- private final int[] mColors;
- private final int[] mColorCounts;
- private final int mNumberColors;
-
- /**
- * A new {@link ColorHistogram} instance.
- *
- * @param pixels array of image contents
- */
- ColorHistogram(final int[] pixels) {
- // Sort the pixels to enable counting below
- Arrays.sort(pixels);
-
- // Count number of distinct colors
- mNumberColors = countDistinctColors(pixels);
-
- // Create arrays
- mColors = new int[mNumberColors];
- mColorCounts = new int[mNumberColors];
-
- // Finally count the frequency of each color
- countFrequencies(pixels);
- }
-
- /**
- * @return number of distinct colors in the image.
- */
- int getNumberOfColors() {
- return mNumberColors;
- }
-
- /**
- * @return an array containing all of the distinct colors in the image.
- */
- int[] getColors() {
- return mColors;
- }
-
- /**
- * @return an array containing the frequency of a distinct colors within the image.
- */
- int[] getColorCounts() {
- return mColorCounts;
- }
-
- private static int countDistinctColors(final int[] pixels) {
- if (pixels.length < 2) {
- // If we have less than 2 pixels we can stop here
- return pixels.length;
- }
-
- // If we have at least 2 pixels, we have a minimum of 1 color...
- int colorCount = 1;
- int currentColor = pixels[0];
-
- // Now iterate from the second pixel to the end, counting distinct colors
- for (int i = 1; i < pixels.length; i++) {
- // If we encounter a new color, increase the population
- if (pixels[i] != currentColor) {
- currentColor = pixels[i];
- colorCount++;
- }
- }
-
- return colorCount;
- }
-
- private void countFrequencies(final int[] pixels) {
- if (pixels.length == 0) {
- return;
- }
-
- int currentColorIndex = 0;
- int currentColor = pixels[0];
-
- mColors[currentColorIndex] = currentColor;
- mColorCounts[currentColorIndex] = 1;
-
- if (pixels.length == 1) {
- // If we only have one pixel, we can stop here
- return;
- }
-
- // Now iterate from the second pixel to the end, population distinct colors
- for (int i = 1; i < pixels.length; i++) {
- if (pixels[i] == currentColor) {
- // We've hit the same color as before, increase population
- mColorCounts[currentColorIndex]++;
- } else {
- // We've hit a new color, increase index
- currentColor = pixels[i];
-
- currentColorIndex++;
- mColors[currentColorIndex] = currentColor;
- mColorCounts[currentColorIndex] = 1;
- }
- }
- }
-
-}
diff --git a/core/java/com/android/internal/util/cm/palette/ColorUtils.java b/core/java/com/android/internal/util/cm/palette/ColorUtils.java
index c081cf6..8dcf750 100644
--- a/core/java/com/android/internal/util/cm/palette/ColorUtils.java
+++ b/core/java/com/android/internal/util/cm/palette/ColorUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014 The Android Open Source Project
+ * Copyright 2015 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.
@@ -18,8 +18,12 @@ package com.android.internal.util.cm.palette;
import android.graphics.Color;
-/** @hide */
-final class ColorUtils {
+/**
+ * A set of color-related utility methods, building upon those available in {@code Color}.
+ *
+ * @hide
+ */
+public class ColorUtils {
private static final int MIN_ALPHA_SEARCH_MAX_ITERATIONS = 10;
private static final int MIN_ALPHA_SEARCH_PRECISION = 10;
@@ -29,16 +33,28 @@ final class ColorUtils {
/**
* Composite two potentially translucent colors over each other and returns the result.
*/
- private static int compositeColors(int fg, int bg) {
- final float alpha1 = Color.alpha(fg) / 255f;
- final float alpha2 = Color.alpha(bg) / 255f;
+ public static int compositeColors(int foreground, int background) {
+ int bgAlpha = Color.alpha(background);
+ int fgAlpha = Color.alpha(foreground);
+ int a = compositeAlpha(fgAlpha, bgAlpha);
+
+ int r = compositeComponent(Color.red(foreground), fgAlpha,
+ Color.red(background), bgAlpha, a);
+ int g = compositeComponent(Color.green(foreground), fgAlpha,
+ Color.green(background), bgAlpha, a);
+ int b = compositeComponent(Color.blue(foreground), fgAlpha,
+ Color.blue(background), bgAlpha, a);
+
+ return Color.argb(a, r, g, b);
+ }
- float a = (alpha1 + alpha2) * (1f - alpha1);
- float r = (Color.red(fg) * alpha1) + (Color.red(bg) * alpha2 * (1f - alpha1));
- float g = (Color.green(fg) * alpha1) + (Color.green(bg) * alpha2 * (1f - alpha1));
- float b = (Color.blue(fg) * alpha1) + (Color.blue(bg) * alpha2 * (1f - alpha1));
+ private static int compositeAlpha(int foregroundAlpha, int backgroundAlpha) {
+ return 0xFF - (((0xFF - backgroundAlpha) * (0xFF - foregroundAlpha)) / 0xFF);
+ }
- return Color.argb((int) a, (int) r, (int) g, (int) b);
+ private static int compositeComponent(int fgC, int fgA, int bgC, int bgA, int a) {
+ if (a == 0) return 0;
+ return ((0xFF * fgC * fgA) + (bgC * bgA * (0xFF - fgA))) / (a * 0xFF);
}
/**
@@ -46,7 +62,7 @@ final class ColorUtils {
*
* Formula defined here: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
*/
- private static double calculateLuminance(int color) {
+ public static double calculateLuminance(int color) {
double red = Color.red(color) / 255d;
red = red < 0.03928 ? red / 12.92 : Math.pow((red + 0.055) / 1.055, 2.4);
@@ -60,11 +76,13 @@ final class ColorUtils {
}
/**
- * Returns the contrast ratio between two colors.
- *
- * Formula defined here: http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef
+ * Returns the contrast ratio between {@code foreground} and {@code background}.
+ * {@code background} must be opaque.
+ * <p>
+ * Formula defined
+ * <a href="http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef">here</a>.
*/
- private static double calculateContrast(int foreground, int background) {
+ public static double calculateContrast(int foreground, int background) {
if (Color.alpha(background) != 255) {
throw new IllegalArgumentException("background can not be translucent");
}
@@ -81,18 +99,23 @@ final class ColorUtils {
}
/**
- * Finds the minimum alpha value which can be applied to {@code foreground} so that is has a
- * contrast value of at least {@code minContrastRatio} when compared to background.
+ * Calculates the minimum alpha value which can be applied to {@code foreground} so that would
+ * have a contrast value of at least {@code minContrastRatio} when compared to
+ * {@code background}.
*
- * @return the alpha value in the range 0-255.
+ * @param foreground the foreground color.
+ * @param background the background color. Should be opaque.
+ * @param minContrastRatio the minimum contrast ratio.
+ * @return the alpha value in the range 0-255, or -1 if no value could be calculated.
*/
- private static int findMinimumAlpha(int foreground, int background, double minContrastRatio) {
+ public static int calculateMinimumAlpha(int foreground, int background,
+ float minContrastRatio) {
if (Color.alpha(background) != 255) {
throw new IllegalArgumentException("background can not be translucent");
}
// First lets check that a fully opaque foreground has sufficient contrast
- int testForeground = modifyAlpha(foreground, 255);
+ int testForeground = setAlphaComponent(foreground, 255);
double testRatio = calculateContrast(testForeground, background);
if (testRatio < minContrastRatio) {
// Fully opaque foreground does not have sufficient contrast, return error
@@ -108,7 +131,7 @@ final class ColorUtils {
(maxAlpha - minAlpha) > MIN_ALPHA_SEARCH_PRECISION) {
final int testAlpha = (minAlpha + maxAlpha) / 2;
- testForeground = modifyAlpha(foreground, testAlpha);
+ testForeground = setAlphaComponent(foreground, testAlpha);
testRatio = calculateContrast(testForeground, background);
if (testRatio < minContrastRatio) {
@@ -124,19 +147,20 @@ final class ColorUtils {
return maxAlpha;
}
- static int getTextColorForBackground(int backgroundColor, int textColor, float minContrastRatio) {
- final int minAlpha = ColorUtils
- .findMinimumAlpha(textColor, backgroundColor, minContrastRatio);
-
- if (minAlpha >= 0) {
- return ColorUtils.modifyAlpha(textColor, minAlpha);
- }
-
- // Didn't find an opacity which provided enough contrast
- return -1;
- }
-
- static void RGBtoHSL(int r, int g, int b, float[] hsl) {
+ /**
+ * Convert RGB components to HSL (hue-saturation-lightness).
+ * <ul>
+ * <li>hsl[0] is Hue [0 .. 360)</li>
+ * <li>hsl[1] is Saturation [0...1]</li>
+ * <li>hsl[2] is Lightness [0...1]</li>
+ * </ul>
+ *
+ * @param r red component value [0..255]
+ * @param g green component value [0..255]
+ * @param b blue component value [0..255]
+ * @param hsl 3 element array which holds the resulting HSL components.
+ */
+ public static void RGBToHSL(int r, int g, int b, float[] hsl) {
final float rf = r / 255f;
final float gf = g / 255f;
final float bf = b / 255f;
@@ -160,15 +184,47 @@ final class ColorUtils {
h = ((rf - gf) / deltaMaxMin) + 4f;
}
- s = deltaMaxMin / (1f - Math.abs(2f * l - 1f));
+ s = deltaMaxMin / (1f - Math.abs(2f * l - 1f));
+ }
+
+ h = (h * 60f) % 360f;
+ if (h < 0) {
+ h += 360f;
}
- hsl[0] = (h * 60f) % 360f;
- hsl[1] = s;
- hsl[2] = l;
+ hsl[0] = constrain(h, 0f, 360f);
+ hsl[1] = constrain(s, 0f, 1f);
+ hsl[2] = constrain(l, 0f, 1f);
}
- static int HSLtoRGB (float[] hsl) {
+ /**
+ * Convert the ARGB color to its HSL (hue-saturation-lightness) components.
+ * <ul>
+ * <li>hsl[0] is Hue [0 .. 360)</li>
+ * <li>hsl[1] is Saturation [0...1]</li>
+ * <li>hsl[2] is Lightness [0...1]</li>
+ * </ul>
+ *
+ * @param color the ARGB color to convert. The alpha component is ignored.
+ * @param hsl 3 element array which holds the resulting HSL components.
+ */
+ public static void colorToHSL(int color, float[] hsl) {
+ RGBToHSL(Color.red(color), Color.green(color), Color.blue(color), hsl);
+ }
+
+ /**
+ * Convert HSL (hue-saturation-lightness) components to a RGB color.
+ * <ul>
+ * <li>hsl[0] is Hue [0 .. 360)</li>
+ * <li>hsl[1] is Saturation [0...1]</li>
+ * <li>hsl[2] is Lightness [0...1]</li>
+ * </ul>
+ * If hsv values are out of range, they are pinned.
+ *
+ * @param hsl 3 element array which holds the input HSL components.
+ * @return the resulting RGB color
+ */
+ public static int HSLToColor(float[] hsl) {
final float h = hsl[0];
final float s = hsl[1];
final float l = hsl[2];
@@ -215,9 +271,9 @@ final class ColorUtils {
break;
}
- r = Math.max(0, Math.min(255, r));
- g = Math.max(0, Math.min(255, g));
- b = Math.max(0, Math.min(255, b));
+ r = constrain(r, 0, 255);
+ g = constrain(g, 0, 255);
+ b = constrain(b, 0, 255);
return Color.rgb(r, g, b);
}
@@ -225,8 +281,19 @@ final class ColorUtils {
/**
* Set the alpha component of {@code color} to be {@code alpha}.
*/
- static int modifyAlpha(int color, int alpha) {
+ public static int setAlphaComponent(int color, int alpha) {
+ if (alpha < 0 || alpha > 255) {
+ throw new IllegalArgumentException("alpha must be between 0 and 255.");
+ }
return (color & 0x00ffffff) | (alpha << 24);
}
+ private static float constrain(float amount, float low, float high) {
+ return amount < low ? low : (amount > high ? high : amount);
+ }
+
+ private static int constrain(int amount, int low, int high) {
+ return amount < low ? low : (amount > high ? high : amount);
+ }
+
}
diff --git a/core/java/com/android/internal/util/cm/palette/DefaultGenerator.java b/core/java/com/android/internal/util/cm/palette/DefaultGenerator.java
new file mode 100644
index 0000000..407f01d
--- /dev/null
+++ b/core/java/com/android/internal/util/cm/palette/DefaultGenerator.java
@@ -0,0 +1,244 @@
+/*
+ * Copyright 2015 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.util.cm.palette;
+
+import com.android.internal.util.cm.palette.Palette.Swatch;
+
+import java.util.List;
+
+/**
+ * @hide
+ */
+class DefaultGenerator extends Palette.Generator {
+
+ private static final float TARGET_DARK_LUMA = 0.26f;
+ private static final float MAX_DARK_LUMA = 0.45f;
+
+ private static final float MIN_LIGHT_LUMA = 0.55f;
+ private static final float TARGET_LIGHT_LUMA = 0.74f;
+
+ private static final float MIN_NORMAL_LUMA = 0.3f;
+ private static final float TARGET_NORMAL_LUMA = 0.5f;
+ private static final float MAX_NORMAL_LUMA = 0.7f;
+
+ private static final float TARGET_MUTED_SATURATION = 0.3f;
+ private static final float MAX_MUTED_SATURATION = 0.4f;
+
+ private static final float TARGET_VIBRANT_SATURATION = 1f;
+ private static final float MIN_VIBRANT_SATURATION = 0.35f;
+
+ private static final float WEIGHT_SATURATION = 3f;
+ private static final float WEIGHT_LUMA = 6f;
+ private static final float WEIGHT_POPULATION = 1f;
+
+ private List<Swatch> mSwatches;
+
+ private int mHighestPopulation;
+
+ private Swatch mVibrantSwatch;
+ private Swatch mMutedSwatch;
+ private Swatch mDarkVibrantSwatch;
+ private Swatch mDarkMutedSwatch;
+ private Swatch mLightVibrantSwatch;
+ private Swatch mLightMutedSwatch;
+
+ @Override
+ public void generate(final List<Swatch> swatches) {
+ mSwatches = swatches;
+
+ mHighestPopulation = findMaxPopulation();
+
+ generateVariationColors();
+
+ // Now try and generate any missing colors
+ generateEmptySwatches();
+ }
+
+ @Override
+ public Swatch getVibrantSwatch() {
+ return mVibrantSwatch;
+ }
+
+ @Override
+ public Swatch getLightVibrantSwatch() {
+ return mLightVibrantSwatch;
+ }
+
+ @Override
+ public Swatch getDarkVibrantSwatch() {
+ return mDarkVibrantSwatch;
+ }
+
+ @Override
+ public Swatch getMutedSwatch() {
+ return mMutedSwatch;
+ }
+
+ @Override
+ public Swatch getLightMutedSwatch() {
+ return mLightMutedSwatch;
+ }
+
+ @Override
+ public Swatch getDarkMutedSwatch() {
+ return mDarkMutedSwatch;
+ }
+
+ private void generateVariationColors() {
+ mVibrantSwatch = findColorVariation(TARGET_NORMAL_LUMA, MIN_NORMAL_LUMA, MAX_NORMAL_LUMA,
+ TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f);
+
+ mLightVibrantSwatch = findColorVariation(TARGET_LIGHT_LUMA, MIN_LIGHT_LUMA, 1f,
+ TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f);
+
+ mDarkVibrantSwatch = findColorVariation(TARGET_DARK_LUMA, 0f, MAX_DARK_LUMA,
+ TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f);
+
+ mMutedSwatch = findColorVariation(TARGET_NORMAL_LUMA, MIN_NORMAL_LUMA, MAX_NORMAL_LUMA,
+ TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION);
+
+ mLightMutedSwatch = findColorVariation(TARGET_LIGHT_LUMA, MIN_LIGHT_LUMA, 1f,
+ TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION);
+
+ mDarkMutedSwatch = findColorVariation(TARGET_DARK_LUMA, 0f, MAX_DARK_LUMA,
+ TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION);
+ }
+
+ /**
+ * Try and generate any missing swatches from the swatches we did find.
+ */
+ private void generateEmptySwatches() {
+ if (mVibrantSwatch == null) {
+ // If we do not have a vibrant color...
+ if (mDarkVibrantSwatch != null) {
+ // ...but we do have a dark vibrant, generate the value by modifying the luma
+ final float[] newHsl = copyHslValues(mDarkVibrantSwatch);
+ newHsl[2] = TARGET_NORMAL_LUMA;
+ mVibrantSwatch = new Swatch(ColorUtils.HSLToColor(newHsl), 0);
+ }
+ }
+
+ if (mDarkVibrantSwatch == null) {
+ // If we do not have a dark vibrant color...
+ if (mVibrantSwatch != null) {
+ // ...but we do have a vibrant, generate the value by modifying the luma
+ final float[] newHsl = copyHslValues(mVibrantSwatch);
+ newHsl[2] = TARGET_DARK_LUMA;
+ mDarkVibrantSwatch = new Swatch(ColorUtils.HSLToColor(newHsl), 0);
+ }
+ }
+ }
+
+ /**
+ * Find the {@link Palette.Swatch} with the highest population value and return the population.
+ */
+ private int findMaxPopulation() {
+ int population = 0;
+ for (Swatch swatch : mSwatches) {
+ population = Math.max(population, swatch.getPopulation());
+ }
+ return population;
+ }
+
+ private Swatch findColorVariation(float targetLuma, float minLuma, float maxLuma,
+ float targetSaturation, float minSaturation, float maxSaturation) {
+ Swatch max = null;
+ float maxValue = 0f;
+
+ for (Swatch swatch : mSwatches) {
+ final float sat = swatch.getHsl()[1];
+ final float luma = swatch.getHsl()[2];
+
+ if (sat >= minSaturation && sat <= maxSaturation &&
+ luma >= minLuma && luma <= maxLuma &&
+ !isAlreadySelected(swatch)) {
+ float value = createComparisonValue(sat, targetSaturation, luma, targetLuma,
+ swatch.getPopulation(), mHighestPopulation);
+ if (max == null || value > maxValue) {
+ max = swatch;
+ maxValue = value;
+ }
+ }
+ }
+
+ return max;
+ }
+
+ /**
+ * @return true if we have already selected {@code swatch}
+ */
+ private boolean isAlreadySelected(Swatch swatch) {
+ return mVibrantSwatch == swatch || mDarkVibrantSwatch == swatch ||
+ mLightVibrantSwatch == swatch || mMutedSwatch == swatch ||
+ mDarkMutedSwatch == swatch || mLightMutedSwatch == swatch;
+ }
+
+ private static float createComparisonValue(float saturation, float targetSaturation,
+ float luma, float targetLuma,
+ int population, int maxPopulation) {
+ return createComparisonValue(saturation, targetSaturation, WEIGHT_SATURATION,
+ luma, targetLuma, WEIGHT_LUMA,
+ population, maxPopulation, WEIGHT_POPULATION);
+ }
+
+ private static float createComparisonValue(
+ float saturation, float targetSaturation, float saturationWeight,
+ float luma, float targetLuma, float lumaWeight,
+ int population, int maxPopulation, float populationWeight) {
+ return weightedMean(
+ invertDiff(saturation, targetSaturation), saturationWeight,
+ invertDiff(luma, targetLuma), lumaWeight,
+ population / (float) maxPopulation, populationWeight
+ );
+ }
+
+ /**
+ * Copy a {@link Swatch}'s HSL values into a new float[].
+ */
+ private static float[] copyHslValues(Swatch color) {
+ final float[] newHsl = new float[3];
+ System.arraycopy(color.getHsl(), 0, newHsl, 0, 3);
+ return newHsl;
+ }
+
+ /**
+ * Returns a value in the range 0-1. 1 is returned when {@code value} equals the
+ * {@code targetValue} and then decreases as the absolute difference between {@code value} and
+ * {@code targetValue} increases.
+ *
+ * @param value the item's value
+ * @param targetValue the value which we desire
+ */
+ private static float invertDiff(float value, float targetValue) {
+ return 1f - Math.abs(value - targetValue);
+ }
+
+ private static float weightedMean(float... values) {
+ float sum = 0f;
+ float sumWeight = 0f;
+
+ for (int i = 0; i < values.length; i += 2) {
+ float value = values[i];
+ float weight = values[i + 1];
+
+ sum += (value * weight);
+ sumWeight += weight;
+ }
+
+ return sum / sumWeight;
+ }
+}
diff --git a/core/java/com/android/internal/util/cm/palette/Palette.java b/core/java/com/android/internal/util/cm/palette/Palette.java
index d0a62f0..2cbd2b8 100644
--- a/core/java/com/android/internal/util/cm/palette/Palette.java
+++ b/core/java/com/android/internal/util/cm/palette/Palette.java
@@ -19,7 +19,11 @@ package com.android.internal.util.cm.palette;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.AsyncTask;
+import android.annotation.ColorInt;
+import android.annotation.Nullable;
+import android.util.TimingLogger;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -39,18 +43,21 @@ import java.util.List;
* These can be retrieved from the appropriate getter method.
*
* <p>
- * Instances can be created with the synchronous factory methods {@link #generate(Bitmap)} and
- * {@link #generate(Bitmap, int)}.
+ * Instances are created with a {@link Builder} which supports several options to tweak the
+ * generated Palette. See that class' documentation for more information.
* <p>
- * These should be called on a background thread, ideally the one in
- * which you load your images on. Sometimes that is not possible, so asynchronous factory methods
- * have also been provided: {@link #generateAsync(Bitmap, PaletteAsyncListener)} and
- * {@link #generateAsync(Bitmap, int, PaletteAsyncListener)}. These can be used as so:
+ * Generation should always be completed on a background thread, ideally the one in
+ * which you load your image on. {@link Builder} supports both synchronous and asynchronous
+ * generation:
*
* <pre>
- * Palette.generateAsync(bitmap, new Palette.PaletteAsyncListener() {
- * public void onGenerated(Palette palette) {
- * // Do something with colors...
+ * // Synchronous
+ * Palette p = Palette.from(bitmap).generate();
+ *
+ * // Asynchronous
+ * Palette.from(bitmap).generate(new PaletteAsyncListener() {
+ * public void onGenerated(Palette p) {
+ * // Use generated instance
* }
* });
* </pre>
@@ -71,160 +78,71 @@ public final class Palette {
void onGenerated(Palette palette);
}
- private static final int CALCULATE_BITMAP_MIN_DIMENSION = 100;
+ private static final int DEFAULT_RESIZE_BITMAP_MAX_DIMENSION = 192;
private static final int DEFAULT_CALCULATE_NUMBER_COLORS = 16;
- private static final float TARGET_DARK_LUMA = 0.26f;
- private static final float MAX_DARK_LUMA = 0.45f;
-
- private static final float MIN_LIGHT_LUMA = 0.55f;
- private static final float TARGET_LIGHT_LUMA = 0.74f;
-
- private static final float MIN_NORMAL_LUMA = 0.3f;
- private static final float TARGET_NORMAL_LUMA = 0.5f;
- private static final float MAX_NORMAL_LUMA = 0.7f;
-
- private static final float TARGET_MUTED_SATURATION = 0.3f;
- private static final float MAX_MUTED_SATURATION = 0.4f;
-
- private static final float TARGET_VIBRANT_SATURATION = 1f;
- private static final float MIN_VIBRANT_SATURATION = 0.35f;
-
- private static final float WEIGHT_SATURATION = 3f;
- private static final float WEIGHT_LUMA = 6f;
- private static final float WEIGHT_POPULATION = 1f;
-
private static final float MIN_CONTRAST_TITLE_TEXT = 3.0f;
private static final float MIN_CONTRAST_BODY_TEXT = 4.5f;
- private final List<Swatch> mSwatches;
- private final int mHighestPopulation;
-
- private Swatch mVibrantSwatch;
- private Swatch mMutedSwatch;
+ private static final String LOG_TAG = "Palette";
+ private static final boolean LOG_TIMINGS = false;
- private Swatch mDarkVibrantSwatch;
- private Swatch mDarkMutedSwatch;
+ /**
+ * Start generating a {@link Palette} with the returned {@link Builder} instance.
+ */
+ public static Builder from(Bitmap bitmap) {
+ return new Builder(bitmap);
+ }
- private Swatch mLightVibrantSwatch;
- private Swatch mLightMutedColor;
+ /**
+ * Generate a {@link Palette} from the pre-generated list of {@link Palette.Swatch} swatches.
+ * This is useful for testing, or if you want to resurrect a {@link Palette} instance from a
+ * list of swatches. Will return null if the {@code swatches} is null.
+ */
+ public static Palette from(List<Swatch> swatches) {
+ return new Builder(swatches).generate();
+ }
/**
- * Generate a {@link Palette} from a {@link Bitmap} using the default number of colors.
+ * @deprecated Use {@link Builder} to generate the Palette.
*/
+ @Deprecated
public static Palette generate(Bitmap bitmap) {
- return generate(bitmap, DEFAULT_CALCULATE_NUMBER_COLORS);
+ return from(bitmap).generate();
}
/**
- * Generate a {@link Palette} from a {@link Bitmap} using the specified {@code numColors}.
- * Good values for {@code numColors} depend on the source image type.
- * For landscapes, a good values are in the range 12-16. For images which are largely made up
- * of people's faces then this value should be increased to 24-32.
- *
- * @param numColors The maximum number of colors in the generated palette. Increasing this
- * number will increase the time needed to compute the values.
+ * @deprecated Use {@link Builder} to generate the Palette.
*/
+ @Deprecated
public static Palette generate(Bitmap bitmap, int numColors) {
- checkBitmapParam(bitmap);
- checkNumberColorsParam(numColors);
-
- // First we'll scale down the bitmap so it's shortest dimension is 100px
- final Bitmap scaledBitmap = scaleBitmapDown(bitmap);
-
- // Now generate a quantizer from the Bitmap
- ColorCutQuantizer quantizer = ColorCutQuantizer.fromBitmap(scaledBitmap, numColors);
-
- // If created a new bitmap, recycle it
- if (scaledBitmap != bitmap) {
- scaledBitmap.recycle();
- }
-
- // Now return a ColorExtractor instance
- return new Palette(quantizer.getQuantizedColors());
+ return from(bitmap).maximumColorCount(numColors).generate();
}
/**
- * Generate a {@link Palette} asynchronously. {@link PaletteAsyncListener#onGenerated(Palette)}
- * will be called with the created instance. The resulting {@link Palette} is the same as
- * what would be created by calling {@link #generate(Bitmap)}.
- *
- * @param listener Listener to be invoked when the {@link Palette} has been generated.
- *
- * @return the {@link AsyncTask} used to asynchronously generate the instance.
+ * @deprecated Use {@link Builder} to generate the Palette.
*/
+ @Deprecated
public static AsyncTask<Bitmap, Void, Palette> generateAsync(
Bitmap bitmap, PaletteAsyncListener listener) {
- return generateAsync(bitmap, DEFAULT_CALCULATE_NUMBER_COLORS, listener);
+ return from(bitmap).generate(listener);
}
/**
- * Generate a {@link Palette} asynchronously. {@link PaletteAsyncListener#onGenerated(Palette)}
- * will be called with the created instance. The resulting {@link Palette} is the same as what
- * would be created by calling {@link #generate(Bitmap, int)}.
- *
- * @param listener Listener to be invoked when the {@link Palette} has been generated.
- *
- * @return the {@link AsyncTask} used to asynchronously generate the instance.
+ * @deprecated Use {@link Builder} to generate the Palette.
*/
+ @Deprecated
public static AsyncTask<Bitmap, Void, Palette> generateAsync(
final Bitmap bitmap, final int numColors, final PaletteAsyncListener listener) {
- checkBitmapParam(bitmap);
- checkNumberColorsParam(numColors);
- checkAsyncListenerParam(listener);
-
- AsyncTask<Bitmap, Void, Palette> task = new AsyncTask<Bitmap, Void, Palette>() {
- @Override
- protected Palette doInBackground(Bitmap... params) {
- return generate(params[0], numColors);
- }
-
- @Override
- protected void onPostExecute(Palette colorExtractor) {
- listener.onGenerated(colorExtractor);
- }
- };
- task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, bitmap);
-
- return task;
+ return from(bitmap).maximumColorCount(numColors).generate(listener);
}
- /**
- * Generate a {@link Palette} from the pre-generated list of {@link Palette.Swatch} swatches.
- * This is useful for testing, or if you want to resurrect a {@link Palette} instance from a
- * list of swatches. Will return null if the {@code swatches} is null.
- */
- public static Palette from(List<Swatch> swatches) {
- if (swatches == null) {
- return null;
- }
- return new Palette(swatches);
- }
+ private final List<Swatch> mSwatches;
+ private final Generator mGenerator;
- private Palette(List<Swatch> swatches) {
+ private Palette(List<Swatch> swatches, Generator generator) {
mSwatches = swatches;
- mHighestPopulation = findMaxPopulation();
-
- mVibrantSwatch = findColor(TARGET_NORMAL_LUMA, MIN_NORMAL_LUMA, MAX_NORMAL_LUMA,
- TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f);
-
- mLightVibrantSwatch = findColor(TARGET_LIGHT_LUMA, MIN_LIGHT_LUMA, 1f,
- TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f);
-
- mDarkVibrantSwatch = findColor(TARGET_DARK_LUMA, 0f, MAX_DARK_LUMA,
- TARGET_VIBRANT_SATURATION, MIN_VIBRANT_SATURATION, 1f);
-
- mMutedSwatch = findColor(TARGET_NORMAL_LUMA, MIN_NORMAL_LUMA, MAX_NORMAL_LUMA,
- TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION);
-
- mLightMutedColor = findColor(TARGET_LIGHT_LUMA, MIN_LIGHT_LUMA, 1f,
- TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION);
-
- mDarkMutedSwatch = findColor(TARGET_DARK_LUMA, 0f, MAX_DARK_LUMA,
- TARGET_MUTED_SATURATION, 0f, MAX_MUTED_SATURATION);
-
- // Now try and generate any missing colors
- generateEmptySwatches();
+ mGenerator = generator;
}
/**
@@ -237,43 +155,49 @@ public final class Palette {
/**
* Returns the most vibrant swatch in the palette. Might be null.
*/
+ @Nullable
public Swatch getVibrantSwatch() {
- return mVibrantSwatch;
+ return mGenerator.getVibrantSwatch();
}
/**
* Returns a light and vibrant swatch from the palette. Might be null.
*/
+ @Nullable
public Swatch getLightVibrantSwatch() {
- return mLightVibrantSwatch;
+ return mGenerator.getLightVibrantSwatch();
}
/**
* Returns a dark and vibrant swatch from the palette. Might be null.
*/
+ @Nullable
public Swatch getDarkVibrantSwatch() {
- return mDarkVibrantSwatch;
+ return mGenerator.getDarkVibrantSwatch();
}
/**
* Returns a muted swatch from the palette. Might be null.
*/
+ @Nullable
public Swatch getMutedSwatch() {
- return mMutedSwatch;
+ return mGenerator.getMutedSwatch();
}
/**
* Returns a muted and light swatch from the palette. Might be null.
*/
+ @Nullable
public Swatch getLightMutedSwatch() {
- return mLightMutedColor;
+ return mGenerator.getLightMutedSwatch();
}
/**
* Returns a muted and dark swatch from the palette. Might be null.
*/
+ @Nullable
public Swatch getDarkMutedSwatch() {
- return mDarkMutedSwatch;
+ return mGenerator.getDarkMutedSwatch();
}
/**
@@ -281,8 +205,10 @@ public final class Palette {
*
* @param defaultColor value to return if the swatch isn't available
*/
- public int getVibrantColor(int defaultColor) {
- return mVibrantSwatch != null ? mVibrantSwatch.getRgb() : defaultColor;
+ @ColorInt
+ public int getVibrantColor(@ColorInt int defaultColor) {
+ Swatch swatch = getVibrantSwatch();
+ return swatch != null ? swatch.getRgb() : defaultColor;
}
/**
@@ -290,8 +216,10 @@ public final class Palette {
*
* @param defaultColor value to return if the swatch isn't available
*/
- public int getLightVibrantColor(int defaultColor) {
- return mLightVibrantSwatch != null ? mLightVibrantSwatch.getRgb() : defaultColor;
+ @ColorInt
+ public int getLightVibrantColor(@ColorInt int defaultColor) {
+ Swatch swatch = getLightVibrantSwatch();
+ return swatch != null ? swatch.getRgb() : defaultColor;
}
/**
@@ -299,8 +227,10 @@ public final class Palette {
*
* @param defaultColor value to return if the swatch isn't available
*/
- public int getDarkVibrantColor(int defaultColor) {
- return mDarkVibrantSwatch != null ? mDarkVibrantSwatch.getRgb() : defaultColor;
+ @ColorInt
+ public int getDarkVibrantColor(@ColorInt int defaultColor) {
+ Swatch swatch = getDarkVibrantSwatch();
+ return swatch != null ? swatch.getRgb() : defaultColor;
}
/**
@@ -308,8 +238,10 @@ public final class Palette {
*
* @param defaultColor value to return if the swatch isn't available
*/
- public int getMutedColor(int defaultColor) {
- return mMutedSwatch != null ? mMutedSwatch.getRgb() : defaultColor;
+ @ColorInt
+ public int getMutedColor(@ColorInt int defaultColor) {
+ Swatch swatch = getMutedSwatch();
+ return swatch != null ? swatch.getRgb() : defaultColor;
}
/**
@@ -317,8 +249,10 @@ public final class Palette {
*
* @param defaultColor value to return if the swatch isn't available
*/
- public int getLightMutedColor(int defaultColor) {
- return mLightMutedColor != null ? mLightMutedColor.getRgb() : defaultColor;
+ @ColorInt
+ public int getLightMutedColor(@ColorInt int defaultColor) {
+ Swatch swatch = getLightMutedSwatch();
+ return swatch != null ? swatch.getRgb() : defaultColor;
}
/**
@@ -326,220 +260,31 @@ public final class Palette {
*
* @param defaultColor value to return if the swatch isn't available
*/
- public int getDarkMutedColor(int defaultColor) {
- return mDarkMutedSwatch != null ? mDarkMutedSwatch.getRgb() : defaultColor;
+ @ColorInt
+ public int getDarkMutedColor(@ColorInt int defaultColor) {
+ Swatch swatch = getDarkMutedSwatch();
+ return swatch != null ? swatch.getRgb() : defaultColor;
}
/**
- * @return true if we have already selected {@code swatch}
+ * Scale the bitmap down so that it's largest dimension is {@code targetMaxDimension}.
+ * If {@code bitmap} is smaller than this, then it is returned.
*/
- private boolean isAlreadySelected(Swatch swatch) {
- return mVibrantSwatch == swatch || mDarkVibrantSwatch == swatch ||
- mLightVibrantSwatch == swatch || mMutedSwatch == swatch ||
- mDarkMutedSwatch == swatch || mLightMutedColor == swatch;
- }
-
- private Swatch findColor(float targetLuma, float minLuma, float maxLuma,
- float targetSaturation, float minSaturation, float maxSaturation) {
- Swatch max = null;
- float maxValue = 0f;
-
- for (Swatch swatch : mSwatches) {
- final float sat = swatch.getHsl()[1];
- final float luma = swatch.getHsl()[2];
-
- if (sat >= minSaturation && sat <= maxSaturation &&
- luma >= minLuma && luma <= maxLuma &&
- !isAlreadySelected(swatch)) {
- float thisValue = createComparisonValue(sat, targetSaturation, luma, targetLuma,
- swatch.getPopulation(), mHighestPopulation);
- if (max == null || thisValue > maxValue) {
- max = swatch;
- maxValue = thisValue;
- }
- }
- }
+ private static Bitmap scaleBitmapDown(Bitmap bitmap, final int targetMaxDimension) {
+ final int maxDimension = Math.max(bitmap.getWidth(), bitmap.getHeight());
- return max;
- }
-
- /**
- * Try and generate any missing swatches from the swatches we did find.
- */
- private void generateEmptySwatches() {
- if (mVibrantSwatch == null) {
- // If we do not have a vibrant color...
- if (mDarkVibrantSwatch != null) {
- // ...but we do have a dark vibrant, generate the value by modifying the luma
- final float[] newHsl = copyHslValues(mDarkVibrantSwatch);
- newHsl[2] = TARGET_NORMAL_LUMA;
- mVibrantSwatch = new Swatch(ColorUtils.HSLtoRGB(newHsl), 0);
- }
- }
-
- if (mDarkVibrantSwatch == null) {
- // If we do not have a dark vibrant color...
- if (mVibrantSwatch != null) {
- // ...but we do have a vibrant, generate the value by modifying the luma
- final float[] newHsl = copyHslValues(mVibrantSwatch);
- newHsl[2] = TARGET_DARK_LUMA;
- mDarkVibrantSwatch = new Swatch(ColorUtils.HSLtoRGB(newHsl), 0);
- }
- }
- }
-
- /**
- * Find the {@link Swatch} with the highest population value and return the population.
- */
- private int findMaxPopulation() {
- int population = 0;
- for (Swatch swatch : mSwatches) {
- population = Math.max(population, swatch.getPopulation());
- }
- return population;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- Palette palette = (Palette) o;
-
- if (mSwatches != null ? !mSwatches.equals(palette.mSwatches) : palette.mSwatches != null) {
- return false;
- }
- if (mDarkMutedSwatch != null ? !mDarkMutedSwatch.equals(palette.mDarkMutedSwatch)
- : palette.mDarkMutedSwatch != null) {
- return false;
- }
- if (mDarkVibrantSwatch != null ? !mDarkVibrantSwatch.equals(palette.mDarkVibrantSwatch)
- : palette.mDarkVibrantSwatch != null) {
- return false;
- }
- if (mLightMutedColor != null ? !mLightMutedColor.equals(palette.mLightMutedColor)
- : palette.mLightMutedColor != null) {
- return false;
- }
- if (mLightVibrantSwatch != null ? !mLightVibrantSwatch.equals(palette.mLightVibrantSwatch)
- : palette.mLightVibrantSwatch != null) {
- return false;
- }
- if (mMutedSwatch != null ? !mMutedSwatch.equals(palette.mMutedSwatch)
- : palette.mMutedSwatch != null) {
- return false;
- }
- if (mVibrantSwatch != null ? !mVibrantSwatch.equals(palette.mVibrantSwatch)
- : palette.mVibrantSwatch != null) {
- return false;
- }
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = mSwatches != null ? mSwatches.hashCode() : 0;
- result = 31 * result + (mVibrantSwatch != null ? mVibrantSwatch.hashCode() : 0);
- result = 31 * result + (mMutedSwatch != null ? mMutedSwatch.hashCode() : 0);
- result = 31 * result + (mDarkVibrantSwatch != null ? mDarkVibrantSwatch.hashCode() : 0);
- result = 31 * result + (mDarkMutedSwatch != null ? mDarkMutedSwatch.hashCode() : 0);
- result = 31 * result + (mLightVibrantSwatch != null ? mLightVibrantSwatch.hashCode() : 0);
- result = 31 * result + (mLightMutedColor != null ? mLightMutedColor.hashCode() : 0);
- return result;
- }
-
- /**
- * Scale the bitmap down so that it's smallest dimension is
- * {@value #CALCULATE_BITMAP_MIN_DIMENSION}px. If {@code bitmap} is smaller than this, than it
- * is returned.
- */
- private static Bitmap scaleBitmapDown(Bitmap bitmap) {
- final int minDimension = Math.min(bitmap.getWidth(), bitmap.getHeight());
-
- if (minDimension <= CALCULATE_BITMAP_MIN_DIMENSION) {
+ if (maxDimension <= targetMaxDimension) {
// If the bitmap is small enough already, just return it
return bitmap;
}
- final float scaleRatio = CALCULATE_BITMAP_MIN_DIMENSION / (float) minDimension;
+ final float scaleRatio = targetMaxDimension / (float) maxDimension;
return Bitmap.createScaledBitmap(bitmap,
Math.round(bitmap.getWidth() * scaleRatio),
Math.round(bitmap.getHeight() * scaleRatio),
false);
}
- private static float createComparisonValue(float saturation, float targetSaturation,
- float luma, float targetLuma,
- int population, int highestPopulation) {
- return weightedMean(
- invertDiff(saturation, targetSaturation), WEIGHT_SATURATION,
- invertDiff(luma, targetLuma), WEIGHT_LUMA,
- population / (float) highestPopulation, WEIGHT_POPULATION
- );
- }
-
- /**
- * Copy a {@link Swatch}'s HSL values into a new float[].
- */
- private static float[] copyHslValues(Swatch color) {
- final float[] newHsl = new float[3];
- System.arraycopy(color.getHsl(), 0, newHsl, 0, 3);
- return newHsl;
- }
-
- /**
- * Returns a value in the range 0-1. 1 is returned when {@code value} equals the
- * {@code targetValue} and then decreases as the absolute difference between {@code value} and
- * {@code targetValue} increases.
- *
- * @param value the item's value
- * @param targetValue the value which we desire
- */
- private static float invertDiff(float value, float targetValue) {
- return 1f - Math.abs(value - targetValue);
- }
-
- private static float weightedMean(float... values) {
- float sum = 0f;
- float sumWeight = 0f;
-
- for (int i = 0; i < values.length; i += 2) {
- float value = values[i];
- float weight = values[i + 1];
-
- sum += (value * weight);
- sumWeight += weight;
- }
-
- return sum / sumWeight;
- }
-
- private static void checkBitmapParam(Bitmap bitmap) {
- if (bitmap == null) {
- throw new IllegalArgumentException("bitmap can not be null");
- }
- if (bitmap.isRecycled()) {
- throw new IllegalArgumentException("bitmap can not be recycled");
- }
- }
-
- private static void checkNumberColorsParam(int numColors) {
- if (numColors < 1) {
- throw new IllegalArgumentException("numColors must be 1 of greater");
- }
- }
-
- private static void checkAsyncListenerParam(PaletteAsyncListener listener) {
- if (listener == null) {
- throw new IllegalArgumentException("listener can not be null");
- }
- }
-
/**
* Represents a color swatch generated from an image's palette. The RGB color can be retrieved
* by calling {@link #getRgb()}.
@@ -555,7 +300,7 @@ public final class Palette {
private float[] mHsl;
- public Swatch(int color, int population) {
+ public Swatch(@ColorInt int color, int population) {
mRed = Color.red(color);
mGreen = Color.green(color);
mBlue = Color.blue(color);
@@ -574,6 +319,7 @@ public final class Palette {
/**
* @return this swatch's RGB color value
*/
+ @ColorInt
public int getRgb() {
return mRgb;
}
@@ -586,9 +332,8 @@ public final class Palette {
*/
public float[] getHsl() {
if (mHsl == null) {
- // Lazily generate HSL values from RGB
mHsl = new float[3];
- ColorUtils.RGBtoHSL(mRed, mGreen, mBlue, mHsl);
+ ColorUtils.RGBToHSL(mRed, mGreen, mBlue, mHsl);
}
return mHsl;
}
@@ -604,6 +349,7 @@ public final class Palette {
* Returns an appropriate color to use for any 'title' text which is displayed over this
* {@link Swatch}'s color. This color is guaranteed to have sufficient contrast.
*/
+ @ColorInt
public int getTitleTextColor() {
ensureTextColorsGenerated();
return mTitleTextColor;
@@ -613,6 +359,7 @@ public final class Palette {
* Returns an appropriate color to use for any 'body' text which is displayed over this
* {@link Swatch}'s color. This color is guaranteed to have sufficient contrast.
*/
+ @ColorInt
public int getBodyTextColor() {
ensureTextColorsGenerated();
return mBodyTextColor;
@@ -621,36 +368,40 @@ public final class Palette {
private void ensureTextColorsGenerated() {
if (!mGeneratedTextColors) {
// First check white, as most colors will be dark
- final int lightBody = ColorUtils.getTextColorForBackground(
- mRgb, Color.WHITE, MIN_CONTRAST_BODY_TEXT);
- final int lightTitle = ColorUtils.getTextColorForBackground(
- mRgb, Color.WHITE, MIN_CONTRAST_TITLE_TEXT);
+ final int lightBodyAlpha = ColorUtils.calculateMinimumAlpha(
+ Color.WHITE, mRgb, MIN_CONTRAST_BODY_TEXT);
+ final int lightTitleAlpha = ColorUtils.calculateMinimumAlpha(
+ Color.WHITE, mRgb, MIN_CONTRAST_TITLE_TEXT);
- if (lightBody != -1 && lightTitle != -1) {
+ if (lightBodyAlpha != -1 && lightTitleAlpha != -1) {
// If we found valid light values, use them and return
- mBodyTextColor = lightBody;
- mTitleTextColor = lightTitle;
+ mBodyTextColor = ColorUtils.setAlphaComponent(Color.WHITE, lightBodyAlpha);
+ mTitleTextColor = ColorUtils.setAlphaComponent(Color.WHITE, lightTitleAlpha);
mGeneratedTextColors = true;
return;
}
- final int darkBody = ColorUtils.getTextColorForBackground(
- mRgb, Color.BLACK, MIN_CONTRAST_BODY_TEXT);
- final int darkTitle = ColorUtils.getTextColorForBackground(
- mRgb, Color.BLACK, MIN_CONTRAST_TITLE_TEXT);
+ final int darkBodyAlpha = ColorUtils.calculateMinimumAlpha(
+ Color.BLACK, mRgb, MIN_CONTRAST_BODY_TEXT);
+ final int darkTitleAlpha = ColorUtils.calculateMinimumAlpha(
+ Color.BLACK, mRgb, MIN_CONTRAST_TITLE_TEXT);
- if (darkBody != -1 && darkBody != -1) {
+ if (darkBodyAlpha != -1 && darkBodyAlpha != -1) {
// If we found valid dark values, use them and return
- mBodyTextColor = darkBody;
- mTitleTextColor = darkTitle;
+ mBodyTextColor = ColorUtils.setAlphaComponent(Color.BLACK, darkBodyAlpha);
+ mTitleTextColor = ColorUtils.setAlphaComponent(Color.BLACK, darkTitleAlpha);
mGeneratedTextColors = true;
return;
}
// If we reach here then we can not find title and body values which use the same
// lightness, we need to use mismatched values
- mBodyTextColor = lightBody != -1 ? lightBody : darkBody;
- mTitleTextColor = lightTitle != -1 ? lightTitle : darkTitle;
+ mBodyTextColor = lightBodyAlpha != -1
+ ? ColorUtils.setAlphaComponent(Color.WHITE, lightBodyAlpha)
+ : ColorUtils.setAlphaComponent(Color.BLACK, darkBodyAlpha);
+ mTitleTextColor = lightTitleAlpha != -1
+ ? ColorUtils.setAlphaComponent(Color.WHITE, lightTitleAlpha)
+ : ColorUtils.setAlphaComponent(Color.BLACK, darkTitleAlpha);
mGeneratedTextColors = true;
}
}
@@ -661,9 +412,10 @@ public final class Palette {
.append(" [RGB: #").append(Integer.toHexString(getRgb())).append(']')
.append(" [HSL: ").append(Arrays.toString(getHsl())).append(']')
.append(" [Population: ").append(mPopulation).append(']')
- .append(" [Title Text: #").append(Integer.toHexString(mTitleTextColor)).append(']')
- .append(" [Body Text: #").append(Integer.toHexString(mBodyTextColor)).append(']')
- .toString();
+ .append(" [Title Text: #").append(Integer.toHexString(getTitleTextColor()))
+ .append(']')
+ .append(" [Body Text: #").append(Integer.toHexString(getBodyTextColor()))
+ .append(']').toString();
}
@Override
@@ -685,4 +437,304 @@ public final class Palette {
}
}
+ /**
+ * Builder class for generating {@link Palette} instances.
+ */
+ public static final class Builder {
+ private List<Swatch> mSwatches;
+ private Bitmap mBitmap;
+ private int mMaxColors = DEFAULT_CALCULATE_NUMBER_COLORS;
+ private int mResizeMaxDimension = DEFAULT_RESIZE_BITMAP_MAX_DIMENSION;
+ private final List<Filter> mFilters = new ArrayList<>();
+
+ private Generator mGenerator;
+
+ /**
+ * Construct a new {@link Builder} using a source {@link Bitmap}
+ */
+ public Builder(Bitmap bitmap) {
+ this();
+ if (bitmap == null || bitmap.isRecycled()) {
+ throw new IllegalArgumentException("Bitmap is not valid");
+ }
+ mBitmap = bitmap;
+ }
+
+ /**
+ * Construct a new {@link Builder} using a list of {@link Swatch} instances.
+ * Typically only used for testing.
+ */
+ public Builder(List<Swatch> swatches) {
+ this();
+ if (swatches == null || swatches.isEmpty()) {
+ throw new IllegalArgumentException("List of Swatches is not valid");
+ }
+ mSwatches = swatches;
+ }
+
+ private Builder() {
+ mFilters.add(DEFAULT_FILTER);
+ }
+
+ /**
+ * Set the {@link Generator} to use when generating the {@link Palette}. If this is called
+ * with {@code null} then the default generator will be used.
+ */
+ Builder generator(Generator generator) {
+ mGenerator = generator;
+ return this;
+ }
+
+ /**
+ * Set the maximum number of colors to use in the quantization step when using a
+ * {@link android.graphics.Bitmap} as the source.
+ * <p>
+ * Good values for depend on the source image type. For landscapes, good values are in
+ * the range 10-16. For images which are largely made up of people's faces then this
+ * value should be increased to ~24.
+ */
+ public Builder maximumColorCount(int colors) {
+ mMaxColors = colors;
+ return this;
+ }
+
+ /**
+ * Set the resize value when using a {@link android.graphics.Bitmap} as the source.
+ * If the bitmap's largest dimension is greater than the value specified, then the bitmap
+ * will be resized so that it's largest dimension matches {@code maxDimension}. If the
+ * bitmap is smaller or equal, the original is used as-is.
+ * <p>
+ * This value has a large effect on the processing time. The larger the resized image is,
+ * the greater time it will take to generate the palette. The smaller the image is, the
+ * more detail is lost in the resulting image and thus less precision for color selection.
+ */
+ public Builder resizeBitmapSize(int maxDimension) {
+ mResizeMaxDimension = maxDimension;
+ return this;
+ }
+
+ /**
+ * Clear all added filters. This includes any default filters added automatically by
+ * {@link Palette}.
+ */
+ public Builder clearFilters() {
+ mFilters.clear();
+ return this;
+ }
+
+ /**
+ * Add a filter to be able to have fine grained controlled over the colors which are
+ * allowed in the resulting palette.
+ *
+ * @param filter filter to add.
+ */
+ public Builder addFilter(Filter filter) {
+ if (filter != null) {
+ mFilters.add(filter);
+ }
+ return this;
+ }
+
+ /**
+ * Generate and return the {@link Palette} synchronously.
+ */
+ public Palette generate() {
+ final TimingLogger logger = LOG_TIMINGS
+ ? new TimingLogger(LOG_TAG, "Generation")
+ : null;
+
+ List<Swatch> swatches;
+
+ if (mBitmap != null) {
+ // We have a Bitmap so we need to quantization to reduce the number of colors
+
+ if (mResizeMaxDimension <= 0) {
+ throw new IllegalArgumentException(
+ "Minimum dimension size for resizing should should be >= 1");
+ }
+
+ // First we'll scale down the bitmap so it's largest dimension is as specified
+ final Bitmap scaledBitmap = scaleBitmapDown(mBitmap, mResizeMaxDimension);
+
+ if (logger != null) {
+ logger.addSplit("Processed Bitmap");
+ }
+
+ // Now generate a quantizer from the Bitmap
+ final int width = scaledBitmap.getWidth();
+ final int height = scaledBitmap.getHeight();
+ final int[] pixels = new int[width * height];
+ scaledBitmap.getPixels(pixels, 0, width, 0, 0, width, height);
+
+ final ColorCutQuantizer quantizer = new ColorCutQuantizer(pixels, mMaxColors,
+ mFilters.isEmpty() ? null : mFilters.toArray(new Filter[mFilters.size()]));
+
+ // If created a new bitmap, recycle it
+ if (scaledBitmap != mBitmap) {
+ scaledBitmap.recycle();
+ }
+ swatches = quantizer.getQuantizedColors();
+
+ if (logger != null) {
+ logger.addSplit("Color quantization completed");
+ }
+ } else {
+ // Else we're using the provided swatches
+ swatches = mSwatches;
+ }
+
+ // If we haven't been provided with a generator, use the default
+ if (mGenerator == null) {
+ mGenerator = new DefaultGenerator();
+ }
+
+ // Now call let the Generator do it's thing
+ mGenerator.generate(swatches);
+
+ if (logger != null) {
+ logger.addSplit("Generator.generate() completed");
+ }
+
+ // Now create a Palette instance
+ Palette p = new Palette(swatches, mGenerator);
+
+ if (logger != null) {
+ logger.addSplit("Created Palette");
+ logger.dumpToLog();
+ }
+
+ return p;
+ }
+
+ /**
+ * Generate the {@link Palette} asynchronously. The provided listener's
+ * {@link PaletteAsyncListener#onGenerated} method will be called with the palette when
+ * generated.
+ */
+ public AsyncTask<Bitmap, Void, Palette> generate(final PaletteAsyncListener listener) {
+ if (listener == null) {
+ throw new IllegalArgumentException("listener can not be null");
+ }
+
+ AsyncTask<Bitmap, Void, Palette> task = new AsyncTask<Bitmap, Void, Palette>() {
+ @Override
+ protected Palette doInBackground(Bitmap... params) {
+ return generate();
+ }
+
+ @Override
+ protected void onPostExecute(Palette colorExtractor) {
+ listener.onGenerated(colorExtractor);
+ }
+ };
+ task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, mBitmap);
+ return task;
+ }
+ }
+
+ static abstract class Generator {
+
+ /**
+ * This method will be called with the {@link Palette.Swatch} that represent an image.
+ * You should process this list so that you have appropriate values when the other methods in
+ * class are called.
+ * <p>
+ * This method will probably be called on a background thread.
+ */
+ public abstract void generate(List<Palette.Swatch> swatches);
+
+ /**
+ * Return the most vibrant {@link Palette.Swatch}
+ */
+ public Palette.Swatch getVibrantSwatch() {
+ return null;
+ }
+
+ /**
+ * Return a light and vibrant {@link Palette.Swatch}
+ */
+ public Palette.Swatch getLightVibrantSwatch() {
+ return null;
+ }
+
+ /**
+ * Return a dark and vibrant {@link Palette.Swatch}
+ */
+ public Palette.Swatch getDarkVibrantSwatch() {
+ return null;
+ }
+
+ /**
+ * Return a muted {@link Palette.Swatch}
+ */
+ public Palette.Swatch getMutedSwatch() {
+ return null;
+ }
+
+ /**
+ * Return a muted and light {@link Palette.Swatch}
+ */
+ public Palette.Swatch getLightMutedSwatch() {
+ return null;
+ }
+
+ /**
+ * Return a muted and dark {@link Palette.Swatch}
+ */
+ public Palette.Swatch getDarkMutedSwatch() {
+ return null;
+ }
+ }
+
+ /**
+ * A Filter provides a mechanism for exercising fine-grained control over which colors
+ * are valid within a resulting {@link Palette}.
+ */
+ public interface Filter {
+ /**
+ * Hook to allow clients to be able filter colors from resulting palette.
+ *
+ * @param rgb the color in RGB888.
+ * @param hsl HSL representation of the color.
+ *
+ * @return true if the color is allowed, false if not.
+ *
+ * @see Builder#addFilter(Filter)
+ */
+ boolean isAllowed(int rgb, float[] hsl);
+ }
+
+ /**
+ * The default filter.
+ */
+ private static final Filter DEFAULT_FILTER = new Filter() {
+ private static final float BLACK_MAX_LIGHTNESS = 0.05f;
+ private static final float WHITE_MIN_LIGHTNESS = 0.95f;
+
+ @Override
+ public boolean isAllowed(int rgb, float[] hsl) {
+ return !isWhite(hsl) && !isBlack(hsl) && !isNearRedILine(hsl);
+ }
+
+ /**
+ * @return true if the color represents a color which is close to black.
+ */
+ private boolean isBlack(float[] hslColor) {
+ return hslColor[2] <= BLACK_MAX_LIGHTNESS;
+ }
+
+ /**
+ * @return true if the color represents a color which is close to white.
+ */
+ private boolean isWhite(float[] hslColor) {
+ return hslColor[2] >= WHITE_MIN_LIGHTNESS;
+ }
+
+ /**
+ * @return true if the color lies close to the red side of the I line.
+ */
+ private boolean isNearRedILine(float[] hslColor) {
+ return hslColor[0] >= 10f && hslColor[0] <= 37f && hslColor[1] <= 0.82f;
+ }
+ };
}
diff --git a/core/res/res/layout/permission_confirmation_dialog.xml b/core/res/res/layout/permission_confirmation_dialog.xml
index ab5b9fa..1727286 100644
--- a/core/res/res/layout/permission_confirmation_dialog.xml
+++ b/core/res/res/layout/permission_confirmation_dialog.xml
@@ -42,6 +42,7 @@
android:shrinkColumns="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:gravity="center_vertical"
android:paddingLeft="16dip"
android:paddingRight="16dip">
@@ -50,17 +51,14 @@
android:layout_height="wrap_content" >
<RelativeLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingTop="12dip"
android:paddingLeft="8dip" >
<CheckBox android:id="@+id/permission_remember_choice_checkbox"
- android:paddingTop="11dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
<TextView android:id="@+id/permission_remember_choice_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingTop="18dip"
android:text="@string/permission_remember_choice" />
</TableRow>
diff --git a/core/res/res/values-ar/cm_strings.xml b/core/res/res/values-ar/cm_strings.xml
index 982d077..44e37e0 100644
--- a/core/res/res/values-ar/cm_strings.xml
+++ b/core/res/res/values-ar/cm_strings.xml
@@ -17,6 +17,126 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="global_action_screenshot">لقطة شاشة</string>
+ <string name="permlab_receiveProtectedSms">استلام رسالة نصية قصيرة محمية</string>
+ <string name="permdesc_receiveProtectedSms">يسمح للتطبيق باستلام رسالة نصية قصيرة محمية واردة.</string>
+ <string name="permlab_modifyProtectedSmsList">تعديل قائمة الرسائل النصية القصيرة المحمية</string>
+ <string name="permdesc_modifyProtectedSmsList">السماح للتطبيق بتعديل قائمة عناوين الرسائل النصية القصيرة المحمية.</string>
+ <string name="permgrouplab_security">الأمان</string>
+ <string name="permgroupdesc_security">أذونات متعلقة بمعلومات حماية الجهاز.</string>
+ <string name="permlab_readPhoneBlacklist">قراءة القائمة السوداء للهاتف</string>
+ <string name="permdesc_readPhoneBlacklist">السماح للتطبيق بقراءة المعلومات الخاصة بأرقام الهاتف المحظورة بالنبسة للمكالمات أو الرسائل الواردة.</string>
+ <string name="permlab_changePhoneBlacklist">تغيير القائمة السوداء للهاتف</string>
+ <string name="permdesc_changePhoneBlacklist">السماح للتطبيق بتغيير أرقام الهاتف التي يتم حظر للمكالمات الواردة أو الرسائل.</string>
+ <string name="global_action_choose_profile">ملف تعريف</string>
+ <string name="permlab_setKeyguardWallpaper">تعيين خلفية شاشة الحارس الرئيسي</string>
+ <string name="permdesc_setKeyguardWallpaper">السماج للتطبيق بتغيير خلفية شاشة التأمين.</string>
+ <string name="global_action_reboot">إعادة تمهيد</string>
+ <string name="global_action_current_user">الحالي</string>
+ <string name="reboot_reboot">إعادة التمهيد</string>
+ <string name="reboot_recovery">استرداد</string>
+ <string name="reboot_bootloader">محمل التمهيد</string>
+ <string name="reboot_download">التنزيل</string>
+ <string name="reboot_soft">إعادة تمهيد سريعة</string>
+ <string name="reboot_title">إعادة التمهيد</string>
+ <string name="reboot_confirm" product="tablet">ستتم إعادة تمهيد جهازك اللوحي.</string>
+ <string name="reboot_confirm" product="default">ستتم إعادة تمهيد هاتفك.</string>
+ <string name="reboot_progress">إعادة التمهيد\u2026</string>
+ <string name="app_killed_message">تم إنهاء التطبيق</string>
+ <string name="adb_net_active_notification_title">تمكين ADB عبر الشبكة</string>
+ <string name="adb_both_active_notification_title">ADB عبر USB &amp; تمكين الشبكة</string>
+ <string name="adb_active_generic_notification_message">انقر لتعطيل تصحيح الأخطاء.</string>
+ <string name="adb_active_custom_tile">ADB - <xliff:g id="adb_type" example="USB">%1$s</xliff:g></string>
+ <string name="adb_active_custom_tile_both">USB &amp; الشبكة</string>
+ <string name="adb_active_custom_tile_usb">USB</string>
+ <string name="adb_active_custom_tile_net">الشبكة</string>
+ <string name="permlab_accessThemeService">الوصول إلى خدمة السمة</string>
+ <string name="permlab_interceptPackageLaunch">مقاطعة تشغيل التطبيق</string>
+ <string name="permdesc_accessThemeService">يسمح للتطبيق بالوصول إلى خدمة السمة. ينبغي أن لا تكون ضرورية ابدأ للتطبيقات العادية.</string>
+ <string name="permlab_readThemes">قراءة معلومات السمة لديك</string>
+ <string name="permdesc_readThemesDesc">يسمح للتطبيق بقراءة السمات الخاصة بك وتحديد السمة التي قمت بتطبيقها.</string>
+ <string name="permlab_writeThemes">تعديل السمات الخاصة بك</string>
+ <string name="permdesc_writeThemesDesc">السماح للتطبيق بإدخال سمات جديدة
+وتعديل السمة التي قمت بتطبيقها.</string>
+ <string name="theme_install_error_title">فشل تثبيت السمة</string>
+ <string name="theme_install_error_message">فشل تثبيت %s</string>
+ <string name="stylus_app_not_installed">%s لم يتم تثبيته</string>
+ <string name="theme_reset_notification_title">إعادة تعيين السمة</string>
+ <string name="theme_reset_notification_body">تم استرداد سمة النظام بسبب عمليات تعطيل متعددة للتطبيق.</string>
+ <string name="silent_mode_priority">الأولوية</string>
+ <string name="silent_mode_none">بلا</string>
+ <string name="subscription_change_disabled_wifi_ap">ايقاف بث تقنية واي فاي بسبب تغيير اشتراك SIM</string>
+ <string name="notify_turn_wifi_off_title">إيقاف Wi-Fi</string>
+ <string name="permlab_changePrivacyGuardState">تمكين أو تعطيل حارس الخصوصية</string>
+ <string name="permdesc_changePrivacyGuardState">يسمح للتطبيق بتغيير ما إذا كان تطبيق آخر يعمل مع \"حارس الخصوصية\". عندما يتم تشغيل تطبيق مع \"حارس الخصوصية\"، فلن يُسمح بالوصول إلى البيانات الشخصية كجهات الاتصال أو سجلات المكالمات أو الرسائل.</string>
+ <string name="privacy_guard_notification">حارس الخصوصية نشط</string>
+ <string name="privacy_guard_notification_detail"><xliff:g id="app">%1$s</xliff:g> لن تكون قادراً على الوصول إلى البيانات الشخصية</string>
+ <string name="privacy_guard_dialog_title">حارس الخصوصية</string>
+ <string name="privacy_guard_dialog_summary"><xliff:g id="app">%1$s</xliff:g> يرغب في <xliff:g id="op">%2$s</xliff:g>.</string>
+ <string name="permission_remember_choice">تذكر خياري</string>
+ <string name="app_ops_access_camera">الوصول إلى الكاميرا</string>
+ <string name="app_ops_access_location">الوصول إلى موقعك</string>
<string name="app_ops_access_notifications">قراءة إشعاراتك</string>
+ <string name="app_ops_activate_vpn">تفعيل شبكة افتراضية خاصة (VPN)</string>
+ <string name="app_ops_auto_start">البدء عند تشغيل الجهاز</string>
+ <string name="app_ops_delete_call_log">حذف سجل مكالماتك</string>
+ <string name="app_ops_delete_contacts">حذف جهات الاتصال الخاصة بك</string>
+ <string name="app_ops_delete_mms">حذف رسائل MMS</string>
+ <string name="app_ops_delete_sms">حذف الرسائل النصية القصيرة (SMS)</string>
+ <string name="app_ops_draw_on_top">رسم نوافذ فوق الجزء العلوي</string>
+ <string name="app_ops_get_usage_stats">الحصول على إحصائيات باستخدام التطبيقات</string>
+ <string name="app_ops_keep_device_awake">إبقاء الجهاز في حالة تنبيه</string>
+ <string name="app_ops_make_phone_call">إجراء اتصال هاتفي</string>
+ <string name="app_ops_modify_calendar">تحديث تقويمك</string>
+ <string name="app_ops_modify_call_log">تحديث سجل المكالمات</string>
+ <string name="app_ops_modify_clipboard">تعديل الحافظة</string>
+ <string name="app_ops_modify_contacts">تحديث جهات الاتصال الخاصة بك</string>
+ <string name="app_ops_modify_settings">تحديث إعدادات النظام</string>
+ <string name="app_ops_mute_unmute_microphone">كتم/إلغاء كتم الميكروفون</string>
+ <string name="app_ops_play_audio">تشغيل الصوت</string>
+ <string name="app_ops_post_notification">آخر إشعار</string>
+ <string name="app_ops_project_media">وسائط المشروع</string>
+ <string name="app_ops_read_calendar">قراءة التقويم الخاص بك</string>
+ <string name="app_ops_read_call_log">قراءة سجل المكالمات</string>
+ <string name="app_ops_read_clipboard">قراءة الحافظة</string>
+ <string name="app_ops_read_contacts">قراءة جهات الاتصال الخاصة بك</string>
+ <string name="app_ops_read_mms">قراءة رسائل MMS الخاصة بك</string>
+ <string name="app_ops_read_sms">قراءة الرسائل النصية القصيرة الخاصة بك</string>
+ <string name="app_ops_receive_sms">استلام رسالة نصية قصيرة</string>
+ <string name="app_ops_record_audio">تسجيل الصوت</string>
+ <string name="app_ops_send_mms">إرسال رسالة نصية قصيرة</string>
+ <string name="app_ops_send_sms">إرسال رسالة نصية قصيرة</string>
+ <string name="app_ops_start_at_bootup">البدء في التشغيل</string>
+ <string name="app_ops_toast_window">عرض الإعلامات المنبثقة</string>
+ <string name="app_ops_toggle_bluetooth">تبديل بلوتوث</string>
+ <string name="app_ops_toggle_mobile_data">تبديل البيانات المتنقلة</string>
+ <string name="app_ops_toggle_nfc">تبديل NFC</string>
+ <string name="app_ops_use_alarm_volume">التحكم في مستوى صوت الإنذار</string>
+ <string name="app_ops_use_audio_focus">التحكم في تركيز الصوت</string>
+ <string name="app_ops_use_bluetooth_volume">التحكم في مستوى صوت بلوتوث</string>
+ <string name="app_ops_use_master_volume">التحكم في مستوى الصوت الرئيسي</string>
+ <string name="app_ops_use_media_buttons">استخدم أزرار الوسائط</string>
+ <string name="app_ops_use_media_volume">التحكم في مستوى صوت الوسائط</string>
+ <string name="app_ops_use_notification_volume">التحكم في مستوى صوت الإشعار</string>
+ <string name="app_ops_use_ring_volume">التحكم في مستوى صوت نغمة الرنين</string>
+ <string name="app_ops_use_vibrate">إستخدام نتائج اللمس</string>
+ <string name="app_ops_use_voice_volume">التحكم في مستوى صوت المكالمة الصوتية</string>
+ <string name="app_ops_write_mms">كتابة رسالة MMS</string>
+ <string name="app_ops_write_sms">كتابة رسالة نصية قصيرة</string>
<string name="app_ops_su">الحصول على صلاحيات الجذر</string>
+ <string name="lock_to_app_toast_no_navbar">لإلغاء تثبيت هذه الشاشة، المس واستمر في ضغط زر الرجوع.</string>
+ <string name="live_display_auto">تلقائي</string>
+ <string name="live_display_auto_summary">ضبط درجة حرارة لون للشاشة تلقائياً بعد غروب الشمس وشروق الشمس</string>
+ <string name="live_display_off">إيقاف</string>
+ <string name="live_display_off_summary">تعطيل جميع التعديلات</string>
+ <string name="live_display_day">النهار</string>
+ <string name="live_display_day_summary">استخدام إعدادات النهار فقط</string>
+ <string name="live_display_night">الليل</string>
+ <string name="live_display_night_summary">استخدام إعدادات الليل فقط</string>
+ <string name="live_display_outdoor">خارج المنزل ( شمس ساطعة)</string>
+ <string name="live_display_outdoor_summary">استخدم إعدادات خارج المنزل فقط</string>
+ <string name="live_display_hint">ميزة LiveDisplay يمكن أن تساعد في تقليل إجهاد العين والمساعدة على النوم في الليل. انقر هنا لتجربته!</string>
+ <string name="tethered_notification_no_device_message">لا يوجد جهاز متصل</string>
+ <string name="tethered_notification_one_device_message"><xliff:g id="count">%1$s </xliff:g> جهاز متصل</string>
+ <string name="tethered_notification_multi_device_message"><xliff:g id="count">%1$s</xliff:g> أجهزة متصلة</string>
</resources>
diff --git a/core/res/res/values-bn-rBD/cm_strings.xml b/core/res/res/values-bn-rBD/cm_strings.xml
index 217f486..36c1420 100644
--- a/core/res/res/values-bn-rBD/cm_strings.xml
+++ b/core/res/res/values-bn-rBD/cm_strings.xml
@@ -50,6 +50,8 @@
<string name="permdesc_writeThemesDesc">অ্যাপটিকে নতুন থীমের সন্নিবেশ করার এবং আপনি যে থীমটি প্রয়োগ করেছেন তার কিছুটা রূপান্তর করার অনুমতি প্রদান করুন।</string>
<string name="theme_install_error_title">থিম ইনস্টল করতে ব্যর্থ হয়েছে</string>
<string name="theme_install_error_message">%s ইনস্টল করতে ব্যর্থ হয়েছে</string>
+ <string name="silent_mode_priority">অগ্রাধিকার</string>
+ <string name="notify_turn_wifi_off_title">ওয়াইফাই বন্ধ করুন</string>
<string name="permlab_changePrivacyGuardState">গোপনীয়তা রক্ষাকারী সক্রিয় বা নিস্ক্রিয় করুন</string>
<string name="permdesc_changePrivacyGuardState">অ্যাপটি কে অন্য অ্যাপ পরিবর্তন করার অনুমতি দিন যা গোপনীয়তা রক্ষাকারী সঙ্গে চলমান। যখন একটি অ্যাপ গোপনীয়তা রক্ষাকারী সঙ্গে চলমান থাকে তখন এটি ব্যক্তিগত তথ্য ব্যাবহার করতে পারবে না, যেমন যোগাযোগ, কল লগ, বা বার্তা।</string>
<string name="privacy_guard_notification">গোপনীয়তা রক্ষাকারী সক্রিয়</string>
@@ -59,6 +61,7 @@
<string name="app_ops_access_camera">ক্যামেরায় প্রবেশাধিকার</string>
<string name="app_ops_access_location">আপনার অবস্থানে প্রবেশাধিকার</string>
<string name="app_ops_access_notifications">আপনার নোটিফিকেশানস প্রবেশাধিকার</string>
+ <string name="app_ops_get_usage_stats">অ্যাপের সংস্থান তথ্যাদি পান</string>
<string name="app_ops_keep_device_awake">আপনার ডিভাইস জাগ্রত রাখা</string>
<string name="app_ops_make_phone_call">একটি ফোন কল করুন</string>
<string name="app_ops_modify_calendar">আপনার পঞ্জিকা হালনাগাদ করুন</string>
@@ -94,4 +97,11 @@
<string name="app_ops_use_voice_volume">ভয়েস কলের ভলিউম নিয়ন্ত্রণ</string>
<string name="app_ops_write_mms">এমএমএস বার্তা লিখুন</string>
<string name="app_ops_write_sms">এসএমএস বার্তা লিখুন</string>
+ <string name="live_display_auto">স্বয়ংক্রিয়</string>
+ <string name="live_display_off">বন্ধ</string>
+ <string name="live_display_off_summary">সব সামঞ্জস্যগুলি অক্ষম করুন</string>
+ <string name="live_display_day_summary">শুধু দিবা রূপান্তর নির্ধারণ ব্যবহার করুন</string>
+ <string name="live_display_night_summary">কেবল রাতের রূপান্তর নির্ধারণ ব্যবহার করুন</string>
+ <string name="live_display_outdoor">বহিরঙ্গন (উজ্জ্বল সূর্যালোক)</string>
+ <string name="live_display_outdoor_summary">শুধুমাত্র বহিরঙ্গন রূপান্তর নির্ধারণ ব্যবহার করুন</string>
</resources>
diff --git a/core/res/res/values-de/cm_strings.xml b/core/res/res/values-de/cm_strings.xml
index 6711954..e300d57 100644
--- a/core/res/res/values-de/cm_strings.xml
+++ b/core/res/res/values-de/cm_strings.xml
@@ -123,13 +123,19 @@
<string name="app_ops_use_voice_volume">die Sprachlautstärke zu ändern</string>
<string name="app_ops_write_mms">MMS zu schreiben</string>
<string name="app_ops_write_sms">SMS zu schreiben</string>
+ <string name="app_ops_use_fingerprint">den Fingerabdruck zu nutzen</string>
<string name="app_ops_add_voicemail">eine Sprachnachricht hinzuzufügen</string>
<string name="app_ops_read_phone_state">auf Telefon-Status zuzugreifen</string>
<string name="app_ops_scan_wifi">WLAN-Netzwerke zu scannen</string>
<string name="app_ops_change_wallpaper">Hintergrundbild zu ändern</string>
+ <string name="app_ops_assist_structure">Unterstützungsstruktur zu verwenden</string>
<string name="app_ops_assist_screenshot">Bildschirmfoto zu erstellen</string>
+ <string name="app_ops_use_body_sensors">Körpersensoren zu verwenden</string>
<string name="app_ops_read_cell_broadcasts">Cell-Broadcasts zu lesen</string>
<string name="app_ops_mock_location">Ihren Standort zu simulieren</string>
+ <string name="app_ops_read_external_storage">externen Speicher zu lesen</string>
+ <string name="app_ops_write_external_storage">externen Speicher zu beschreiben</string>
+ <string name="app_ops_turn_on_screen">das Display einzuschalten</string>
<string name="app_ops_get_accounts">Geräte-Konten abzurufen</string>
<string name="app_ops_wifi_change">WLAN-Status zu ändern</string>
<string name="app_ops_su">Root-Zugriff zu erhalten</string>
diff --git a/core/res/res/values-en-rIN/cm_strings.xml b/core/res/res/values-en-rIN/cm_strings.xml
index 8b72a0f..3aed025 100644
--- a/core/res/res/values-en-rIN/cm_strings.xml
+++ b/core/res/res/values-en-rIN/cm_strings.xml
@@ -46,6 +46,10 @@
<string name="adb_net_active_notification_title">ADB over network enabled</string>
<string name="adb_both_active_notification_title">ADB over USB &amp; network enabled</string>
<string name="adb_active_generic_notification_message">Touch to disable debugging.</string>
+ <string name="adb_active_custom_tile">ADB - <xliff:g id="adb_type" example="USB">%1$s</xliff:g></string>
+ <string name="adb_active_custom_tile_both">USB &amp; network</string>
+ <string name="adb_active_custom_tile_usb">USB</string>
+ <string name="adb_active_custom_tile_net">Network</string>
<string name="permlab_accessThemeService">access theme service</string>
<string name="permlab_interceptPackageLaunch">intercept app launch</string>
<string name="permdesc_accessThemeService">Allows an app to access the theme service. Should never be needed for normal apps.</string>
@@ -60,6 +64,10 @@
<string name="stylus_app_not_installed">%s is not installed</string>
<string name="theme_reset_notification_title">Theme reset</string>
<string name="theme_reset_notification_body">System theme restored due to multiple app crashes.</string>
+ <string name="silent_mode_priority">Priority</string>
+ <string name="silent_mode_none">None</string>
+ <string name="subscription_change_disabled_wifi_ap">Disabled Wi-Fi hotspot due to SIM subscription change</string>
+ <string name="notify_turn_wifi_off_title">Turn Wi-Fi off</string>
<string name="permlab_changePrivacyGuardState">enable or disable Privacy Guard</string>
<string name="permdesc_changePrivacyGuardState">Allows the app to change whether another app runs with Privacy Guard. When an app is running with Privacy Guard, it will not have access to personal data such as contacts, call logs, or messages.</string>
<string name="privacy_guard_notification">Privacy Guard active</string>
@@ -104,6 +112,7 @@
<string name="app_ops_toggle_bluetooth">toggle Bluetooth</string>
<string name="app_ops_toggle_mobile_data">toggle mobile data</string>
<string name="app_ops_toggle_nfc">toggle NFC</string>
+ <string name="app_ops_toggle_wifi">toggle Wi-Fi</string>
<string name="app_ops_use_alarm_volume">control alarm volume</string>
<string name="app_ops_use_audio_focus">control the audio focus</string>
<string name="app_ops_use_bluetooth_volume">control the Bluetooth volume</string>
@@ -116,7 +125,23 @@
<string name="app_ops_use_voice_volume">control the voice call volume</string>
<string name="app_ops_write_mms">write an MMS message</string>
<string name="app_ops_write_sms">write an SMS message</string>
+ <string name="app_ops_use_fingerprint">use fingerprint</string>
+ <string name="app_ops_add_voicemail">add a voicemail</string>
+ <string name="app_ops_read_phone_state">access phone state</string>
+ <string name="app_ops_scan_wifi">scan Wi-Fi networks</string>
+ <string name="app_ops_change_wallpaper">change the wallpaper</string>
+ <string name="app_ops_assist_structure">use assist structure</string>
+ <string name="app_ops_assist_screenshot">take a screenshot</string>
+ <string name="app_ops_use_body_sensors">use body sensors</string>
+ <string name="app_ops_read_cell_broadcasts">read cell broadcasts</string>
+ <string name="app_ops_mock_location">mock your location</string>
+ <string name="app_ops_read_external_storage">read external storage</string>
+ <string name="app_ops_write_external_storage">write external storage</string>
+ <string name="app_ops_turn_on_screen">turn the screen on</string>
+ <string name="app_ops_get_accounts">get device accounts</string>
+ <string name="app_ops_wifi_change">change Wi-Fi state</string>
<string name="app_ops_su">get root access</string>
+ <string name="lock_to_app_toast_no_navbar">To unpin this screen, touch and hold the Back button.</string>
<string name="live_display_auto">Automatic</string>
<string name="live_display_auto_summary">Automatically adjust color temperature of screen after sunset and sunrise</string>
<string name="live_display_off">Off</string>
diff --git a/core/res/res/values-es/cm_strings.xml b/core/res/res/values-es/cm_strings.xml
index 8ccdb44..2af62d1 100644
--- a/core/res/res/values-es/cm_strings.xml
+++ b/core/res/res/values-es/cm_strings.xml
@@ -34,7 +34,9 @@
<string name="global_action_reboot">Reiniciar</string>
<string name="global_action_current_user">Actual</string>
<string name="reboot_reboot">Reiniciar</string>
+ <string name="reboot_recovery">Recovery</string>
<string name="reboot_bootloader">Modo Bootloader</string>
+ <string name="reboot_download">Descargar</string>
<string name="reboot_soft">Reinicio rápido</string>
<string name="reboot_title">Reiniciar</string>
<string name="reboot_confirm" product="tablet">El tablet se reiniciará.</string>
@@ -43,8 +45,10 @@
<string name="app_killed_message">Aplicación finalizada</string>
<string name="adb_net_active_notification_title">ADB sobre red activado</string>
<string name="adb_both_active_notification_title">ADB sobre USB y red activado</string>
+ <string name="adb_active_generic_notification_message">Toca para desactivar la depuración.</string>
<string name="adb_active_custom_tile">ADB - <xliff:g id="adb_type" example="USB">%1$s</xliff:g></string>
<string name="adb_active_custom_tile_both">USB y red</string>
+ <string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">Red</string>
<string name="permlab_accessThemeService">acceso al servicio de temas</string>
<string name="permlab_interceptPackageLaunch">interceptar la ejecución de aplicaciones</string>
@@ -53,18 +57,101 @@
<string name="permdesc_readThemesDesc">Permite que la aplicación lea los temas instalados y determine cual es el que has aplicado.</string>
<string name="permlab_writeThemes">modificar los temas</string>
<string name="permdesc_writeThemesDesc">Permite que la aplicación añada nuevos temas y modifique el tema aplicado actualmente.</string>
+ <string name="theme_install_error_title">Error al instalar el tema</string>
+ <string name="theme_install_error_message">Error al instalar %s</string>
<string name="stylus_app_not_installed">%s no está instalada</string>
+ <string name="theme_reset_notification_title">Tema restablecido</string>
+ <string name="theme_reset_notification_body">Tema del sistema restablecido debido a múltiples cierres de la aplicación.</string>
+ <string name="silent_mode_priority">Prioridad</string>
+ <string name="silent_mode_none">Ninguno</string>
+ <string name="subscription_change_disabled_wifi_ap">Zona Wi-Fi desactivada debido a un cambio de suscripción en la SIM</string>
+ <string name="notify_turn_wifi_off_title">Desactivar Wi-Fi</string>
<string name="permlab_changePrivacyGuardState">activar o desactivar el protector de privacidad</string>
<string name="permdesc_changePrivacyGuardState">Permite que la aplicación cambie el estado de privacidad de otra. Cuando una aplicación se ejecuta con la privacidad activada, no podrá acceder a los datos personales, tales como contactos, mensajes o registros de llamadas.</string>
<string name="privacy_guard_notification">Privacidad activada</string>
<string name="privacy_guard_notification_detail"><xliff:g id="app">%1$s</xliff:g> no podrá acceder a los datos personales</string>
<string name="privacy_guard_dialog_title">Privacidad</string>
<string name="privacy_guard_dialog_summary"><xliff:g id="app">%1$s</xliff:g> quiere <xliff:g id="op">%2$s</xliff:g>.</string>
+ <string name="permission_remember_choice">Recordar mi elección</string>
<string name="app_ops_access_camera">acceder a la cámara</string>
+ <string name="app_ops_access_location">acceder a tu ubicación</string>
+ <string name="app_ops_access_notifications">leer tus notificaciones</string>
<string name="app_ops_activate_vpn">activar VPN</string>
+ <string name="app_ops_auto_start">ejecutar al inicio</string>
<string name="app_ops_delete_call_log">borrar el registro de llamadas</string>
<string name="app_ops_delete_contacts">borrar tus contactos</string>
+ <string name="app_ops_delete_mms">eliminar tus mensajes MMS</string>
+ <string name="app_ops_delete_sms">eliminar tus mensajes MMS</string>
+ <string name="app_ops_draw_on_top">dibujar ventanas encima</string>
+ <string name="app_ops_get_usage_stats">obtener estadísticas de uso de la aplicación</string>
+ <string name="app_ops_keep_device_awake">mantener tu dispositivo encendido</string>
+ <string name="app_ops_make_phone_call">realizar una llamada</string>
<string name="app_ops_modify_calendar">actualizar tu calendario</string>
+ <string name="app_ops_modify_call_log">actualizar el registro de llamadas</string>
+ <string name="app_ops_modify_clipboard">modificar el portapapeles</string>
+ <string name="app_ops_modify_contacts">actualizar tus contactos</string>
+ <string name="app_ops_modify_settings">actualizar los ajustes del sistema</string>
+ <string name="app_ops_mute_unmute_microphone">activar/desactivar el micrófono</string>
+ <string name="app_ops_play_audio">reproducir sonido</string>
+ <string name="app_ops_post_notification">publicar una notificación</string>
+ <string name="app_ops_project_media">proyectar medios</string>
+ <string name="app_ops_read_calendar">leer tu calendario</string>
+ <string name="app_ops_read_call_log">leer el registro de llamadas</string>
+ <string name="app_ops_read_clipboard">leer el portapapeles</string>
+ <string name="app_ops_read_contacts">leer tus contactos</string>
+ <string name="app_ops_read_mms">leer tus mensajes MMS</string>
+ <string name="app_ops_read_sms">leer tus mensajes SMS</string>
+ <string name="app_ops_receive_sms">recibir un mensaje SMS</string>
+ <string name="app_ops_record_audio">grabar sonido</string>
+ <string name="app_ops_send_mms">enviar un mensaje MMS</string>
+ <string name="app_ops_send_sms">enviar un mensaje SMS</string>
+ <string name="app_ops_start_at_bootup">ejecutar al inicio</string>
+ <string name="app_ops_toast_window">mostrar notificaciones emergentes</string>
+ <string name="app_ops_toggle_bluetooth">alternar Bluetooth</string>
+ <string name="app_ops_toggle_mobile_data">alternar datos móviles</string>
+ <string name="app_ops_toggle_nfc">alternar NFC</string>
+ <string name="app_ops_toggle_wifi">alternar Wi-Fi</string>
+ <string name="app_ops_use_alarm_volume">controlar el volumen de la alarma</string>
+ <string name="app_ops_use_audio_focus">controlar volumen del sonido</string>
+ <string name="app_ops_use_bluetooth_volume">controlar el volumen de Bluetooth</string>
+ <string name="app_ops_use_master_volume">controlar el volumen</string>
+ <string name="app_ops_use_media_buttons">usar los botones multimedia</string>
+ <string name="app_ops_use_media_volume">controlar el volumen multimedia</string>
+ <string name="app_ops_use_notification_volume">controlar el volumen de notificaciones</string>
+ <string name="app_ops_use_ring_volume">controlar el volumen del tono de llamada</string>
+ <string name="app_ops_use_vibrate">usar la respuesta háptica</string>
+ <string name="app_ops_use_voice_volume">controlar el volumen del teléfono</string>
+ <string name="app_ops_write_mms">escribir un mensaje MMS</string>
+ <string name="app_ops_write_sms">escribir un mensaje SMS</string>
+ <string name="app_ops_use_fingerprint">usar huella digital</string>
+ <string name="app_ops_add_voicemail">añadir un mensaje de voz</string>
+ <string name="app_ops_read_phone_state">acceder al estado del móvil</string>
+ <string name="app_ops_scan_wifi">escanear redes Wi-Fi</string>
<string name="app_ops_change_wallpaper">cambiar el fondo de pantalla</string>
+ <string name="app_ops_assist_structure">utilizar estructura de asistencia</string>
+ <string name="app_ops_assist_screenshot">tomar una captura de pantalla</string>
+ <string name="app_ops_use_body_sensors">utilizar sensores corporales</string>
+ <string name="app_ops_read_cell_broadcasts">leer transmisiones celulares</string>
+ <string name="app_ops_mock_location">simular tu ubicación</string>
+ <string name="app_ops_read_external_storage">leer almacenamiento externo</string>
+ <string name="app_ops_write_external_storage">escribir el almacenamiento externo</string>
+ <string name="app_ops_turn_on_screen">encender la pantalla</string>
+ <string name="app_ops_get_accounts">obtener cuentas de dispositivo</string>
+ <string name="app_ops_wifi_change">cambiar estado de Wi-Fi</string>
<string name="app_ops_su">obtener acceso administrativo</string>
+ <string name="lock_to_app_toast_no_navbar">Para liberar esta pantalla, mantén pulsado el botón Atrás.</string>
+ <string name="live_display_auto">Automático</string>
+ <string name="live_display_auto_summary">Ajustar automáticamente la temperatura del color de pantalla con el amanecer y el anochecer</string>
+ <string name="live_display_off">Desactivado</string>
+ <string name="live_display_off_summary">Desactivar todos los ajustes</string>
+ <string name="live_display_day">Día</string>
+ <string name="live_display_day_summary">Utilizar solo los ajustes de día</string>
+ <string name="live_display_night">Noche</string>
+ <string name="live_display_night_summary">Utilizar solo los ajustes de noche</string>
+ <string name="live_display_outdoor">Al aire libre (luz del sol)</string>
+ <string name="live_display_outdoor_summary">Utilizar solo los ajustes al aire libre</string>
+ <string name="live_display_hint">LiveDisplay puede reducir la fatiga visual y ayudar a dormir por la noche. ¡Toca aquí para probarlo!</string>
+ <string name="tethered_notification_no_device_message">Ningún dispositivo conectado</string>
+ <string name="tethered_notification_one_device_message"><xliff:g id="count">%1$s</xliff:g> dispositivo conectado</string>
+ <string name="tethered_notification_multi_device_message"><xliff:g id="count">%1$s</xliff:g> dispositivos conectados</string>
</resources>
diff --git a/core/res/res/values-fi/cm_strings.xml b/core/res/res/values-fi/cm_strings.xml
index 9f08ca9..939effb 100644
--- a/core/res/res/values-fi/cm_strings.xml
+++ b/core/res/res/values-fi/cm_strings.xml
@@ -110,6 +110,7 @@
<string name="app_ops_toggle_bluetooth">ottaa Bluetoothin käyttöön</string>
<string name="app_ops_toggle_mobile_data">ottaa mobiilidatan käyttöön</string>
<string name="app_ops_toggle_nfc">ota NFC käyttöön</string>
+ <string name="app_ops_toggle_wifi">vaihtaa Wi-Fi-verkkoja</string>
<string name="app_ops_use_alarm_volume">säätää hälytyksen äänenvoimakkuutta</string>
<string name="app_ops_use_audio_focus">säätää äänen kohdistusta</string>
<string name="app_ops_use_bluetooth_volume">säätää Bluetoothin äänenvoimakkuutta</string>
@@ -122,6 +123,21 @@
<string name="app_ops_use_voice_volume">säätää puhelun äänenvoimakkuutta</string>
<string name="app_ops_write_mms">kirjoittaa multimediaviestin</string>
<string name="app_ops_write_sms">kirjoittaa tekstiviestin</string>
+ <string name="app_ops_use_fingerprint">käyttää sormenjälkeä</string>
+ <string name="app_ops_add_voicemail">lisätä vastaajaviestin</string>
+ <string name="app_ops_read_phone_state">lukea puhelimen tilan</string>
+ <string name="app_ops_scan_wifi">hakea Wi-Fi-verkkoja</string>
+ <string name="app_ops_change_wallpaper">vaihtaa taustakuvan</string>
+ <string name="app_ops_assist_structure">käyttää apurakennetta</string>
+ <string name="app_ops_assist_screenshot">ottaa kuvankaappauksen</string>
+ <string name="app_ops_use_body_sensors">käyttää kehon antureita</string>
+ <string name="app_ops_read_cell_broadcasts">lukea hätätilalähetyksiä</string>
+ <string name="app_ops_mock_location">väärentää sijaintisi</string>
+ <string name="app_ops_read_external_storage">lukea ulkoista tallennustilaa</string>
+ <string name="app_ops_write_external_storage">kirjoittaa ulkoiseen tallennustilaan</string>
+ <string name="app_ops_turn_on_screen">kytkeä näytön päälle</string>
+ <string name="app_ops_get_accounts">lukea laitteen tilejä</string>
+ <string name="app_ops_wifi_change">vaihtaa Wi-Fi:n tilaa</string>
<string name="app_ops_su">pääkäyttäjän oikeudet</string>
<string name="lock_to_app_toast_no_navbar">Irrottaaksesi tämän näytön, paina ja pidä Takasin-näppäintä pohjassa.</string>
<string name="live_display_auto">Automaattinen</string>
diff --git a/core/res/res/values-fr/cm_strings.xml b/core/res/res/values-fr/cm_strings.xml
index 5130005..96ca1c2 100644
--- a/core/res/res/values-fr/cm_strings.xml
+++ b/core/res/res/values-fr/cm_strings.xml
@@ -110,6 +110,7 @@
<string name="app_ops_toggle_bluetooth">activer/désactiver le Bluetooth</string>
<string name="app_ops_toggle_mobile_data">activer/désactiver les données mobiles</string>
<string name="app_ops_toggle_nfc">activer/désactiver le NFC</string>
+ <string name="app_ops_toggle_wifi">activer le Wi-Fi</string>
<string name="app_ops_use_alarm_volume">contrôler le volume des alarmes</string>
<string name="app_ops_use_audio_focus">contrôler le focus audio</string>
<string name="app_ops_use_bluetooth_volume">contrôler le volume du Bluetooth</string>
@@ -122,6 +123,21 @@
<string name="app_ops_use_voice_volume">contrôler le volume d\'appels</string>
<string name="app_ops_write_mms">écrire un MMS</string>
<string name="app_ops_write_sms">écrire un SMS</string>
+ <string name="app_ops_use_fingerprint">utiliser les empreintes digitales</string>
+ <string name="app_ops_add_voicemail">ajouter un message vocal</string>
+ <string name="app_ops_read_phone_state">accéder à l\'état du téléphone</string>
+ <string name="app_ops_scan_wifi">scanner les réseaux Wi-Fi</string>
+ <string name="app_ops_change_wallpaper">changer le fond d\'écran</string>
+ <string name="app_ops_assist_structure">utiliser l\'aide à la structure</string>
+ <string name="app_ops_assist_screenshot">prendre une capture d\'écran</string>
+ <string name="app_ops_use_body_sensors">utiliser les capteurs corporels</string>
+ <string name="app_ops_read_cell_broadcasts">lire les diffusions cellulaires</string>
+ <string name="app_ops_mock_location">simuler votre localisation</string>
+ <string name="app_ops_read_external_storage">lire le stockage externe</string>
+ <string name="app_ops_write_external_storage">écrire sur le stockage externe</string>
+ <string name="app_ops_turn_on_screen">allumer l\'écran</string>
+ <string name="app_ops_get_accounts">obtenir les comptes de l\'appareil</string>
+ <string name="app_ops_wifi_change">changer l\'état du Wi-Fi</string>
<string name="app_ops_su">obtenir l\'accès root</string>
<string name="lock_to_app_toast_no_navbar">Pour déverrouiller l\'écran, appuyez et maintenez le bouton Retour.</string>
<string name="live_display_auto">Automatique</string>
diff --git a/core/res/res/values-hr/cm_strings.xml b/core/res/res/values-hr/cm_strings.xml
index 0508957..c576414 100644
--- a/core/res/res/values-hr/cm_strings.xml
+++ b/core/res/res/values-hr/cm_strings.xml
@@ -18,6 +18,10 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="global_action_screenshot">Snimak zaslona</string>
+ <string name="permlab_receiveProtectedSms">Primanje zaštićenih SMS poruka</string>
+ <string name="permdesc_receiveProtectedSms">Dopušta aplikaciji primanje dolaznih zaštićenih SMS poruka.</string>
+ <string name="permlab_modifyProtectedSmsList">Izmjena popisa zaštićenih SMS poruka</string>
+ <string name="permdesc_modifyProtectedSmsList">Dozvoljava aplikaciji izmjenu popisa adresa zaštićenih SMS poruka.</string>
<string name="permgrouplab_security">Sigurnost</string>
<string name="permgroupdesc_security">Dopuštenja vezana za sigurnosne informacije uređaja.</string>
<string name="permlab_readPhoneBlacklist">čitati listu blokiranih poziva</string>
@@ -28,31 +32,58 @@
<string name="permlab_setKeyguardWallpaper">postaviti pozadinu zaslona zaključavanja</string>
<string name="permdesc_setKeyguardWallpaper">Dozvoljava aplikaciji promjenu pozadine zaslona zaključavanja.</string>
<string name="global_action_reboot">Ponovno pokreni</string>
+ <string name="global_action_current_user">Trenutna</string>
<string name="reboot_reboot">Ponovno pokreni</string>
<string name="reboot_recovery">Način oporavka</string>
<string name="reboot_bootloader">Bootloader</string>
<string name="reboot_download">Download</string>
+ <string name="reboot_soft">Brzo ponovno pokretanje</string>
+ <string name="reboot_title">Ponovno pokretanje</string>
<string name="reboot_confirm" product="tablet">Tablet će ponovno biti pokrenut.</string>
<string name="reboot_confirm" product="default">Telefon će ponovno biti pokrenut.</string>
<string name="reboot_progress">Ponovno pokretanje\u2026</string>
+ <string name="app_killed_message">Aplikacija prisilno zaustavljena</string>
<string name="adb_net_active_notification_title">Mrežni ADB omogućen</string>
<string name="adb_both_active_notification_title">ADB preko USB &amp; mreže omogućen</string>
<string name="adb_active_generic_notification_message">Dodirnite za onemogućavanje ispravljanja pogrešaka.</string>
+ <string name="adb_active_custom_tile">ADB - <xliff:g id="adb_type" example="USB">%1$s </xliff:g></string>
+ <string name="adb_active_custom_tile_both">USB i mrežni</string>
+ <string name="adb_active_custom_tile_usb">USB</string>
+ <string name="adb_active_custom_tile_net">Mreža</string>
<string name="permlab_accessThemeService">pristupiti servisu tema</string>
+ <string name="permlab_interceptPackageLaunch">Presresti pokretanje aplikacija</string>
<string name="permdesc_accessThemeService">Dopušta aplikaciji pristup servisu tema. Za obične aplikacije nikada ne bi trebao biti potreban.</string>
<string name="permlab_readThemes">pročitati informacije vaše teme</string>
<string name="permdesc_readThemesDesc">Dopušta aplikaciji čitanje vaših tema i određivanje teme koju koristite.</string>
<string name="permlab_writeThemes">urediti vaše teme</string>
<string name="permdesc_writeThemesDesc">Dopušta aplikaciji dodavati nove teme i urediti temu koju ste primjenili.</string>
+ <string name="theme_install_error_title">Instalacija teme nije uspjela</string>
+ <string name="theme_install_error_message">%s Instalacija nije uspjela</string>
+ <string name="stylus_app_not_installed">%s nije instalirano</string>
+ <string name="theme_reset_notification_title">Vraćanje početne teme</string>
+ <string name="theme_reset_notification_body">Tema sustava je vraćana na početnu zbog višestrukih rušenja aplikacija.</string>
+ <string name="silent_mode_priority">Prioritet</string>
+ <string name="silent_mode_none">Ništa</string>
+ <string name="subscription_change_disabled_wifi_ap">Wi- Fi Hotspot onemogućen zbog SIM promjene</string>
+ <string name="notify_turn_wifi_off_title">Isključite Wi-Fi</string>
<string name="permlab_changePrivacyGuardState">omogućiti ili onemogućiti Zaštitu privatnosti</string>
<string name="permdesc_changePrivacyGuardState">Dopušta aplikaciji odrediti hoće li druga aplikacija biti pokrenuta pod Nadzorom Privatnosti. Kada ja aplikacija pod Nadzorom Privatnosti, neće imati pristup osobnim podacima kao što su kontakti, zapisi poziva ili poruke.</string>
<string name="privacy_guard_notification">Nadzor privatnosti aktivan</string>
<string name="privacy_guard_notification_detail"><xliff:g id="app">%1$s</xliff:g> neće moći pristupiti osobnim podacima</string>
<string name="privacy_guard_dialog_title">Nadzor privatnosti</string>
<string name="privacy_guard_dialog_summary"><xliff:g id="app">%1$s</xliff:g> želi <xliff:g id="op">%2$s</xliff:g>.</string>
+ <string name="permission_remember_choice">Zapamti moj odabir</string>
<string name="app_ops_access_camera">pristupiti kameri</string>
<string name="app_ops_access_location">pristupiti vašoj lokaciji</string>
<string name="app_ops_access_notifications">čitati vaše obavijesti</string>
+ <string name="app_ops_activate_vpn">Aktiviraj VPN</string>
+ <string name="app_ops_auto_start">Pokrenuti pri podizanju sustava</string>
+ <string name="app_ops_delete_call_log">Obriši popis poziva</string>
+ <string name="app_ops_delete_contacts">Obriši kontakte</string>
+ <string name="app_ops_delete_mms">Obriši MMS poruke</string>
+ <string name="app_ops_delete_sms">Obriši SMS poruke</string>
+ <string name="app_ops_draw_on_top">Iscrtaj prozore na vrhu</string>
+ <string name="app_ops_get_usage_stats">Statistika korištenja aplikacija</string>
<string name="app_ops_keep_device_awake">održavati uređaj budnim</string>
<string name="app_ops_make_phone_call">uspostaviti poziv</string>
<string name="app_ops_modify_calendar">ažurirati kalendar</string>
@@ -60,8 +91,10 @@
<string name="app_ops_modify_clipboard">urediti clipboard</string>
<string name="app_ops_modify_contacts">ažurirati kontakte</string>
<string name="app_ops_modify_settings">ažurirati postavke sistema</string>
+ <string name="app_ops_mute_unmute_microphone">Isključiti/uključiti mikrofon</string>
<string name="app_ops_play_audio">producirati zvuk</string>
<string name="app_ops_post_notification">obavijestiti</string>
+ <string name="app_ops_project_media">Pokrenuti multimediju</string>
<string name="app_ops_read_calendar">čitati vaš kalendar</string>
<string name="app_ops_read_call_log">čitati zapisnik poziva</string>
<string name="app_ops_read_clipboard">čitati Clipboard</string>
@@ -73,8 +106,11 @@
<string name="app_ops_send_mms">poslati MMS poruku</string>
<string name="app_ops_send_sms">poslati SMS poruku</string>
<string name="app_ops_start_at_bootup">se pokrenuti pri pokretanju sistema</string>
+ <string name="app_ops_toast_window">Prikazivati toast poruke</string>
<string name="app_ops_toggle_bluetooth">upravljati Bluetooth-om</string>
<string name="app_ops_toggle_mobile_data">upravljati mobilnim podacima</string>
+ <string name="app_ops_toggle_nfc">Uključi/isključi NFC</string>
+ <string name="app_ops_toggle_wifi">upravljati WiFi-em</string>
<string name="app_ops_use_alarm_volume">kontrolirati glasnoću alarma</string>
<string name="app_ops_use_audio_focus">kontrolirati fokus zvuka</string>
<string name="app_ops_use_bluetooth_volume">kontrolirati glasnoću Bluetooth-a</string>
@@ -87,4 +123,33 @@
<string name="app_ops_use_voice_volume">kontrolirati glasnoću glasovnog poziva</string>
<string name="app_ops_write_mms">napisati MMS poruku</string>
<string name="app_ops_write_sms">napisati SMS poruku</string>
+ <string name="app_ops_use_fingerprint">koristite otisak prsta</string>
+ <string name="app_ops_add_voicemail">dodajte glasovnu poruku</string>
+ <string name="app_ops_read_phone_state">pristup stanju telefona</string>
+ <string name="app_ops_scan_wifi">skeniraj Wi-Fi mreže</string>
+ <string name="app_ops_change_wallpaper">promjeni pozadinsku sliku</string>
+ <string name="app_ops_assist_structure">koristi pomoćne strukture</string>
+ <string name="app_ops_assist_screenshot">snimak zaslona</string>
+ <string name="app_ops_use_body_sensors">koristi senzore</string>
+ <string name="app_ops_read_external_storage">čitaj vanjsku pohranu</string>
+ <string name="app_ops_write_external_storage">piši na vanjsku pohranu</string>
+ <string name="app_ops_turn_on_screen">uključite zaslon</string>
+ <string name="app_ops_get_accounts">dobavi račune uređaja</string>
+ <string name="app_ops_wifi_change">promjeni Wi-Fi stanje</string>
+ <string name="app_ops_su">Zatraži root pristup</string>
+ <string name="lock_to_app_toast_no_navbar">Za otkvačiti ovaj zaslon dodirnite i držite tipku za natrag</string>
+ <string name="live_display_auto">Automatski</string>
+ <string name="live_display_auto_summary">Automatski prilagodi temperaturu boje zaslona nakon zalaska i izlaska sunca</string>
+ <string name="live_display_off">Isključeno</string>
+ <string name="live_display_off_summary">Onemogući sva prilagođavanja</string>
+ <string name="live_display_day">Dan</string>
+ <string name="live_display_day_summary">Koristi samo postavke za dan</string>
+ <string name="live_display_night">Noć</string>
+ <string name="live_display_night_summary">Koristi samo postavke za noć</string>
+ <string name="live_display_outdoor">Vani (jako sunce)</string>
+ <string name="live_display_outdoor_summary">Koristi samo postavke za van</string>
+ <string name="live_display_hint">LiveDisplay može smanjiti naprezanje očiju i poboljšati san. Dodirnite ovdje ako ga želite isprobati!</string>
+ <string name="tethered_notification_no_device_message">Uređaj nije spojen</string>
+ <string name="tethered_notification_one_device_message"><xliff:g id="count">%1$s</xliff:g> povezan uređaj</string>
+ <string name="tethered_notification_multi_device_message"><xliff:g id="count">%1$s</xliff:g> povezanih uređaja</string>
</resources>
diff --git a/core/res/res/values-hu/cm_strings.xml b/core/res/res/values-hu/cm_strings.xml
index 4d34993..9529bd5 100644
--- a/core/res/res/values-hu/cm_strings.xml
+++ b/core/res/res/values-hu/cm_strings.xml
@@ -110,6 +110,7 @@
<string name="app_ops_toggle_bluetooth">Bluetooth kapcsolása</string>
<string name="app_ops_toggle_mobile_data">mobilinternet kapcsolása</string>
<string name="app_ops_toggle_nfc">NFC kapcsolása</string>
+ <string name="app_ops_toggle_wifi">Wi-Fi kapcsolása</string>
<string name="app_ops_use_alarm_volume">ébresztőhang vezérlése</string>
<string name="app_ops_use_audio_focus">hang fókusz vezérlése</string>
<string name="app_ops_use_bluetooth_volume">Bluetooth hangerő vezérlése</string>
@@ -122,6 +123,21 @@
<string name="app_ops_use_voice_volume">hívás közbeni hang vezérlése</string>
<string name="app_ops_write_mms">MMS írása</string>
<string name="app_ops_write_sms">SMS írása</string>
+ <string name="app_ops_use_fingerprint">ujjlenyomat használata</string>
+ <string name="app_ops_add_voicemail">hangposta hozzáadása</string>
+ <string name="app_ops_read_phone_state">hozzáférés telefon állapotához</string>
+ <string name="app_ops_scan_wifi">Wi-Fi hálózatok keresése</string>
+ <string name="app_ops_change_wallpaper">háttérkép módosítása</string>
+ <string name="app_ops_assist_structure">támogatási szerkezet használata</string>
+ <string name="app_ops_assist_screenshot">képernyőmentés készítése</string>
+ <string name="app_ops_use_body_sensors">testszenzorok használata</string>
+ <string name="app_ops_read_cell_broadcasts">hálózati üzenetek olvasása</string>
+ <string name="app_ops_mock_location">helyutánzatok engedélyezése</string>
+ <string name="app_ops_read_external_storage">külső tároló olvasása</string>
+ <string name="app_ops_write_external_storage">külső tároló írása</string>
+ <string name="app_ops_turn_on_screen">képernyő bekapcsolása</string>
+ <string name="app_ops_get_accounts">eszköz fiókok lekérése</string>
+ <string name="app_ops_wifi_change">Wi-Fi állapot módosítása</string>
<string name="app_ops_su">rendszergazdai jogosultság szerzése</string>
<string name="lock_to_app_toast_no_navbar">Képernyő rögzítésének feloldásához érintse meg és tartsa nyomva a Vissza gombot.</string>
<string name="live_display_auto">Automatikus</string>
diff --git a/core/res/res/values-nb/cm_strings.xml b/core/res/res/values-nb/cm_strings.xml
index 1432f0a..4a166f9 100644
--- a/core/res/res/values-nb/cm_strings.xml
+++ b/core/res/res/values-nb/cm_strings.xml
@@ -110,6 +110,7 @@
<string name="app_ops_toggle_bluetooth">aktivere/deaktivere bluetooth</string>
<string name="app_ops_toggle_mobile_data">aktivere/deaktivere mobildata</string>
<string name="app_ops_toggle_nfc">NFC av/på</string>
+ <string name="app_ops_toggle_wifi">veksle Wi-Fi</string>
<string name="app_ops_use_alarm_volume">styre alarmvolum</string>
<string name="app_ops_use_audio_focus">styre lydfokus</string>
<string name="app_ops_use_bluetooth_volume">styre bluetooth volum</string>
@@ -122,6 +123,21 @@
<string name="app_ops_use_voice_volume">styre stemmesamtalevolum</string>
<string name="app_ops_write_mms">skrive en MMS-melding</string>
<string name="app_ops_write_sms">skrive en tekstmelding</string>
+ <string name="app_ops_use_fingerprint">bruk fingeravtrykk</string>
+ <string name="app_ops_add_voicemail">legge til en telefonsvarer</string>
+ <string name="app_ops_read_phone_state">hente telefontilstand</string>
+ <string name="app_ops_scan_wifi">skann trådløse nettverk</string>
+ <string name="app_ops_change_wallpaper">endre bakgrunnsbilde</string>
+ <string name="app_ops_assist_structure">bruke hjelpestruktur</string>
+ <string name="app_ops_assist_screenshot">ta et skjermbilde</string>
+ <string name="app_ops_use_body_sensors">bruke enhetssensorer</string>
+ <string name="app_ops_read_cell_broadcasts">lese cellekringkastinger</string>
+ <string name="app_ops_mock_location">simulere posisjon</string>
+ <string name="app_ops_read_external_storage">lese fra ekstern lagring</string>
+ <string name="app_ops_write_external_storage">skrive til ekstern lagring</string>
+ <string name="app_ops_turn_on_screen">slå skjermen på</string>
+ <string name="app_ops_get_accounts">hente enhetskontoer</string>
+ <string name="app_ops_wifi_change">endre Wi-Fi-tilstand</string>
<string name="app_ops_su">få root-tilgang</string>
<string name="lock_to_app_toast_no_navbar">For å unpin denne skjermen, trykk og hold tilbake-knappen.</string>
<string name="live_display_auto">Automatisk</string>
diff --git a/core/res/res/values-nl/cm_strings.xml b/core/res/res/values-nl/cm_strings.xml
index 37b9498..553b580 100644
--- a/core/res/res/values-nl/cm_strings.xml
+++ b/core/res/res/values-nl/cm_strings.xml
@@ -110,6 +110,7 @@
<string name="app_ops_toggle_bluetooth">Bluetooth aan-/uitzetten</string>
<string name="app_ops_toggle_mobile_data">mobiele gegevens aan-/uitzetten</string>
<string name="app_ops_toggle_nfc">NFC aan-/uitzetten</string>
+ <string name="app_ops_toggle_wifi">wifi aan-/uitzetten</string>
<string name="app_ops_use_alarm_volume">alarmvolume beheren</string>
<string name="app_ops_use_audio_focus">audiofocus beheren</string>
<string name="app_ops_use_bluetooth_volume">Bluetooth-volume beheren</string>
@@ -122,6 +123,20 @@
<string name="app_ops_use_voice_volume">stemvolume beheren</string>
<string name="app_ops_write_mms">mms-bericht schrijven</string>
<string name="app_ops_write_sms">sms-bericht schrijven</string>
+ <string name="app_ops_use_fingerprint">vingerafdruk gebruiken</string>
+ <string name="app_ops_add_voicemail">voicemail toevoegen</string>
+ <string name="app_ops_read_phone_state">toegang tot telefoonstatus</string>
+ <string name="app_ops_scan_wifi">wifi-netwerken scannen</string>
+ <string name="app_ops_change_wallpaper">achtergrond aanpassen</string>
+ <string name="app_ops_assist_screenshot">screenshot maken</string>
+ <string name="app_ops_use_body_sensors">lichaamssensoren gebruiken</string>
+ <string name="app_ops_read_cell_broadcasts">nooduitzendingen lezen</string>
+ <string name="app_ops_mock_location">neplocatie gebruiken</string>
+ <string name="app_ops_read_external_storage">externe opslag lezen</string>
+ <string name="app_ops_write_external_storage">naar externe opslag schrijven</string>
+ <string name="app_ops_turn_on_screen">scherm aanzetten</string>
+ <string name="app_ops_get_accounts">apparaataccounts opvragen</string>
+ <string name="app_ops_wifi_change">wifi-status aanpassen</string>
<string name="app_ops_su">root-toegang krijgen</string>
<string name="lock_to_app_toast_no_navbar">Blijf de Terug-knop aanraken om dit scherm los te maken.</string>
<string name="live_display_auto">Automatisch</string>
@@ -132,7 +147,7 @@
<string name="live_display_day_summary">Alleen instellingen voor overdag gebruiken</string>
<string name="live_display_night">\'s Nachts</string>
<string name="live_display_night_summary">Alleen instellingen voor \'s nachts gebruiken</string>
- <string name="live_display_outdoor">Buitenshuis (heldere zon)</string>
+ <string name="live_display_outdoor">Buitenshuis (felle zon)</string>
<string name="live_display_outdoor_summary">Alleen instellingen voor buitenshuis gebruiken</string>
<string name="live_display_hint">LiveDisplay kan oogvermoeidheid verminderen en helpt u om \'s nachts te slapen. Tik hier om het uit te proberen</string>
<string name="tethered_notification_no_device_message">Geen aangesloten apparaat</string>
diff --git a/core/res/res/values-pl/cm_strings.xml b/core/res/res/values-pl/cm_strings.xml
index f25ca5b..7b0cb59 100644
--- a/core/res/res/values-pl/cm_strings.xml
+++ b/core/res/res/values-pl/cm_strings.xml
@@ -110,6 +110,7 @@
<string name="app_ops_toggle_bluetooth">przełączanie Bluetooth</string>
<string name="app_ops_toggle_mobile_data">przełączanie przesyłu danych</string>
<string name="app_ops_toggle_nfc">Przełączanie NFC</string>
+ <string name="app_ops_toggle_wifi">przełączanie Wi-Fi</string>
<string name="app_ops_use_alarm_volume">kontrolowanie głośności alarmu</string>
<string name="app_ops_use_audio_focus">kontrolowanie priorytetów audio</string>
<string name="app_ops_use_bluetooth_volume">kontrolowanie głośności urządzenia Bluetooth</string>
@@ -122,6 +123,21 @@
<string name="app_ops_use_voice_volume">kontrolowanie głośności rozmów</string>
<string name="app_ops_write_mms">pisanie MMS-ów</string>
<string name="app_ops_write_sms">pisanie SMS-ów</string>
+ <string name="app_ops_use_fingerprint">odczyt linii papilarnych</string>
+ <string name="app_ops_add_voicemail">dodawanie wiadomości głosowej</string>
+ <string name="app_ops_read_phone_state">dostęp do stanu telefonu</string>
+ <string name="app_ops_scan_wifi">skanowanie sieci Wi-Fi</string>
+ <string name="app_ops_change_wallpaper">zmiana tapety</string>
+ <string name="app_ops_assist_structure">wykorzystanie asystenta</string>
+ <string name="app_ops_assist_screenshot">tworzenie zrzutów ekranu</string>
+ <string name="app_ops_use_body_sensors">odczyt czujników ciała</string>
+ <string name="app_ops_read_cell_broadcasts">odczyt transmisji komórkowych</string>
+ <string name="app_ops_mock_location">pozorowanie twojej lokalizacji</string>
+ <string name="app_ops_read_external_storage">odczyt pamięci zewnętrznej</string>
+ <string name="app_ops_write_external_storage">zapis pamięci zewnętrznej</string>
+ <string name="app_ops_turn_on_screen">włączanie ekranu</string>
+ <string name="app_ops_get_accounts">dostęp do kont urządzenia</string>
+ <string name="app_ops_wifi_change">zmiana stanu Wi-Fi</string>
<string name="app_ops_su">dostęp do roota</string>
<string name="lock_to_app_toast_no_navbar">Aby odpiąć ekran, dotknij i przytrzymaj przycisk Wstecz.</string>
<string name="live_display_auto">Automatycznie</string>
diff --git a/core/res/res/values-pt-rBR/cm_strings.xml b/core/res/res/values-pt-rBR/cm_strings.xml
index b1ac906..ca6bd7a 100644
--- a/core/res/res/values-pt-rBR/cm_strings.xml
+++ b/core/res/res/values-pt-rBR/cm_strings.xml
@@ -110,6 +110,7 @@
<string name="app_ops_toggle_bluetooth">alternar Bluetooth</string>
<string name="app_ops_toggle_mobile_data">alternar dados móveis</string>
<string name="app_ops_toggle_nfc">alternar NFC</string>
+ <string name="app_ops_toggle_wifi">alternar Wi-Fi</string>
<string name="app_ops_use_alarm_volume">controlar volume do alarme</string>
<string name="app_ops_use_audio_focus">controlar o foco do áudio</string>
<string name="app_ops_use_bluetooth_volume">controlar o volume de Bluetooth</string>
@@ -122,6 +123,21 @@
<string name="app_ops_use_voice_volume">controlar o volume de chamadas de voz</string>
<string name="app_ops_write_mms">escrever uma mensagem MMS</string>
<string name="app_ops_write_sms">escrever uma mensagem SMS</string>
+ <string name="app_ops_use_fingerprint">usar a impressão digital</string>
+ <string name="app_ops_add_voicemail">adicionar uma mensagem de voz</string>
+ <string name="app_ops_read_phone_state">acessar estado do telefone</string>
+ <string name="app_ops_scan_wifi">procurar rede Wi-Fi</string>
+ <string name="app_ops_change_wallpaper">mudar o papel de parede</string>
+ <string name="app_ops_assist_structure">usar estrutura de assistência</string>
+ <string name="app_ops_assist_screenshot">capturar a tela</string>
+ <string name="app_ops_use_body_sensors">usar sensores corporais</string>
+ <string name="app_ops_read_cell_broadcasts">ler transmissões da rede de celular</string>
+ <string name="app_ops_mock_location">simular a sua localização</string>
+ <string name="app_ops_read_external_storage">ler o armazenamento externo</string>
+ <string name="app_ops_write_external_storage">escrever no armazenamento externo</string>
+ <string name="app_ops_turn_on_screen">ligar a tela</string>
+ <string name="app_ops_get_accounts">obter as contas do dispositivo</string>
+ <string name="app_ops_wifi_change">alterar o estado do Wi-Fi</string>
<string name="app_ops_su">obter acesso super usuário</string>
<string name="lock_to_app_toast_no_navbar">Para desafixar esta tela, toque e segure o botão Voltar.</string>
<string name="live_display_auto">Automático</string>
diff --git a/core/res/res/values-pt-rPT/cm_strings.xml b/core/res/res/values-pt-rPT/cm_strings.xml
index 4c84ede..c2e3c72 100644
--- a/core/res/res/values-pt-rPT/cm_strings.xml
+++ b/core/res/res/values-pt-rPT/cm_strings.xml
@@ -107,13 +107,13 @@
<string name="app_ops_send_sms">Enviar uma mensagem SMS</string>
<string name="app_ops_start_at_bootup">iniciar no arranque</string>
<string name="app_ops_toast_window">exibir avisos no ecrã</string>
- <string name="app_ops_toggle_bluetooth">alternar Bluetooth</string>
+ <string name="app_ops_toggle_bluetooth">alternar bluetooth</string>
<string name="app_ops_toggle_mobile_data">alternar dados móveis</string>
<string name="app_ops_toggle_nfc">alternar NFC</string>
<string name="app_ops_toggle_wifi">alternar Wi-Fi</string>
<string name="app_ops_use_alarm_volume">controlar volume do alarme</string>
<string name="app_ops_use_audio_focus">controlar o foco de áudio</string>
- <string name="app_ops_use_bluetooth_volume">controlar o volume de Bluetooth</string>
+ <string name="app_ops_use_bluetooth_volume">controlar o volume do bluetooth</string>
<string name="app_ops_use_master_volume">controlar o volume principal</string>
<string name="app_ops_use_media_buttons">usar os botões multimédia</string>
<string name="app_ops_use_media_volume">controlar o volume multimédia</string>
diff --git a/core/res/res/values-ro/cm_strings.xml b/core/res/res/values-ro/cm_strings.xml
index 52ad53d..aca6ebd 100644
--- a/core/res/res/values-ro/cm_strings.xml
+++ b/core/res/res/values-ro/cm_strings.xml
@@ -120,7 +120,7 @@
<string name="app_ops_use_voice_volume">controlează volumul apelului de voce</string>
<string name="app_ops_write_mms">scrie un mesaj MMS</string>
<string name="app_ops_write_sms">scrie un mesaj SMS</string>
- <string name="app_ops_su">obține acces root</string>
+ <string name="app_ops_su">obțină acces root</string>
<string name="lock_to_app_toast_no_navbar">Pentru a anula fixarea acestui ecran, atingeți și țineți apăsat butonul Înapoi.</string>
<string name="live_display_auto">Automat</string>
<string name="live_display_auto_summary">Reglează automat temperatura de culoare de pe ecran după apus și răsărit</string>
diff --git a/core/res/res/values-ru/cm_strings.xml b/core/res/res/values-ru/cm_strings.xml
index a2a3986..f8ff9d0 100644
--- a/core/res/res/values-ru/cm_strings.xml
+++ b/core/res/res/values-ru/cm_strings.xml
@@ -110,6 +110,7 @@
<string name="app_ops_toggle_bluetooth">переключить состояние Bluetooth</string>
<string name="app_ops_toggle_mobile_data">переключить состояние Мобильного интернета</string>
<string name="app_ops_toggle_nfc">переключить состояние модуля NFC</string>
+ <string name="app_ops_toggle_wifi">включить или выключить Wi-Fi</string>
<string name="app_ops_use_alarm_volume">получить управление громкостью будильника</string>
<string name="app_ops_use_audio_focus">получить управление аудиофокусом</string>
<string name="app_ops_use_bluetooth_volume">получить управление громкостью Bluetooth-устройств</string>
@@ -122,6 +123,21 @@
<string name="app_ops_use_voice_volume">получить управление громкостью при разговоре</string>
<string name="app_ops_write_mms">создать MMS-сообщение</string>
<string name="app_ops_write_sms">создать SMS-сообщение</string>
+ <string name="app_ops_use_fingerprint">использовать сканер отпечатков пальцев</string>
+ <string name="app_ops_add_voicemail">добавить сообщение голосовой почты</string>
+ <string name="app_ops_read_phone_state">получить данные о состоянии телефона</string>
+ <string name="app_ops_scan_wifi">выполнить сканирование сетей Wi-Fi</string>
+ <string name="app_ops_change_wallpaper">изменить обои</string>
+ <string name="app_ops_assist_structure">использовать структуру ассистента</string>
+ <string name="app_ops_assist_screenshot">сделать скриншот</string>
+ <string name="app_ops_use_body_sensors">использовать нательные датчики</string>
+ <string name="app_ops_read_cell_broadcasts">прочитать сообщения оповещения населения</string>
+ <string name="app_ops_mock_location">предоставить фиктивные сведения о местоположении</string>
+ <string name="app_ops_read_external_storage">прочитать данные с внешнего запоминающего устройства</string>
+ <string name="app_ops_write_external_storage">записать данные на внешнее запоминающее устройство</string>
+ <string name="app_ops_turn_on_screen">включить экран</string>
+ <string name="app_ops_get_accounts">получить информацию об аккаунтах</string>
+ <string name="app_ops_wifi_change">изменить состояние Wi-Fi</string>
<string name="app_ops_su">получить права суперпользователя</string>
<string name="lock_to_app_toast_no_navbar">Чтобы открепить экран, нажмите и удерживайте кнопку «Назад».</string>
<string name="live_display_auto">Автоматически</string>
diff --git a/core/res/res/values-sl/cm_strings.xml b/core/res/res/values-sl/cm_strings.xml
index caadcc6..ce8b312 100644
--- a/core/res/res/values-sl/cm_strings.xml
+++ b/core/res/res/values-sl/cm_strings.xml
@@ -112,6 +112,7 @@
<string name="app_ops_toggle_bluetooth">preklapljanje Bluetootha</string>
<string name="app_ops_toggle_mobile_data">preklapljanje mobilnih podatkov</string>
<string name="app_ops_toggle_nfc">preklapljanje NFC-ja</string>
+ <string name="app_ops_toggle_wifi">preklapljanje omr. Wi-Fi</string>
<string name="app_ops_use_alarm_volume">nadzor glasnosti budilke</string>
<string name="app_ops_use_audio_focus">nadzor žarišča zvoka</string>
<string name="app_ops_use_bluetooth_volume">nadzor glasnosti Bluetooth</string>
@@ -124,6 +125,21 @@
<string name="app_ops_use_voice_volume">nadzor glasnosti klicev</string>
<string name="app_ops_write_mms">sestavljanje sporočil MMS</string>
<string name="app_ops_write_sms">sestavljanje sporočil SMS</string>
+ <string name="app_ops_use_fingerprint">uporaba prstnih odtisov</string>
+ <string name="app_ops_add_voicemail">dodajanje glasovne pošte</string>
+ <string name="app_ops_read_phone_state">dostop do stanja telefona</string>
+ <string name="app_ops_scan_wifi">preiskovanje omrežij Wi-Fi</string>
+ <string name="app_ops_change_wallpaper">spreminjanje slike ozadja</string>
+ <string name="app_ops_assist_structure">uporaba zgradbe za pomoč</string>
+ <string name="app_ops_assist_screenshot">zajemanje zaslonskih slik</string>
+ <string name="app_ops_use_body_sensors">uporaba tipal naprave</string>
+ <string name="app_ops_read_cell_broadcasts">branje signala oddajnikov</string>
+ <string name="app_ops_mock_location">prikazovanje lažne lokacije</string>
+ <string name="app_ops_read_external_storage">branje zunanje pomnilniške naprave</string>
+ <string name="app_ops_write_external_storage">pisanje zunanje pomnilniške naprave</string>
+ <string name="app_ops_turn_on_screen">vklapljanje zaslona</string>
+ <string name="app_ops_get_accounts">pridobivanje računov naprave</string>
+ <string name="app_ops_wifi_change">spreminjanje stanja Wi-Fi</string>
<string name="app_ops_su">pridobitev skrbniškega dostopa</string>
<string name="lock_to_app_toast_no_navbar">Da odpnete ta zaslon, se dotaknite in pridržite gumb Nazaj.</string>
<string name="live_display_auto">Samodejno</string>
diff --git a/core/res/res/values-th/cm_strings.xml b/core/res/res/values-th/cm_strings.xml
index 61e2901..974c171 100644
--- a/core/res/res/values-th/cm_strings.xml
+++ b/core/res/res/values-th/cm_strings.xml
@@ -17,11 +17,141 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="global_action_screenshot">ถ่ายภาพหน้าจอ</string>
+ <string name="permlab_receiveProtectedSms">รับ SMS ที่ได้รับการปกป้อง</string>
+ <string name="permdesc_receiveProtectedSms">อนุญาตให้แอปรับ SMS ที่ได้รับการปกป้อง</string>
+ <string name="permlab_modifyProtectedSmsList">แก้ไขรายการ SMS ที่ได้รับการปกป้อง</string>
+ <string name="permdesc_modifyProtectedSmsList">อนุญาตให้แอปแก้ไขรายการที่อยู่ SMS ที่ได้รับการปกป้อง</string>
+ <string name="permgrouplab_security">ความปลอดภัย</string>
+ <string name="permgroupdesc_security">สิทธิ์ที่เกี่ยวข้องกับข้อมูลความปลอดภัยของอุปกรณ์</string>
+ <string name="permlab_readPhoneBlacklist">อ่านรายชื่อบัญชีดำ</string>
+ <string name="permdesc_readPhoneBlacklist">อนุญาตให้แอปอ่านข้อมูลหมายเลขโทรศัพท์ที่ถูกบล็อคสำหรับสายการโทรเข้าหรือข้อความ</string>
+ <string name="permlab_changePhoneBlacklist">เปลี่ยนรายชื่อบัญชีดำ</string>
+ <string name="permdesc_changePhoneBlacklist">อนุญาตให้แอปเปลี่ยนหมายเลขที่ถูกบล็อคสำหรับสายการโทรเข้าหรือข้อความ</string>
<string name="global_action_choose_profile">โปรไฟล์</string>
+ <string name="permlab_setKeyguardWallpaper">ตั้งภาพล็อคหน้าจอ</string>
+ <string name="permdesc_setKeyguardWallpaper">อนุญาตให้แอปเปลี่ยนภาพล็อคหน้าจอได้</string>
+ <string name="global_action_reboot">เริ่มระบบใหม่</string>
+ <string name="global_action_current_user">ปัจจุบัน</string>
+ <string name="reboot_reboot">เริ่มระบบใหม่</string>
+ <string name="reboot_recovery">Recovery</string>
+ <string name="reboot_bootloader">Bootloader</string>
+ <string name="reboot_download">ดาวน์โหลด</string>
+ <string name="reboot_soft">เริ่มระบบแบบซอฟต์รีบู๊ต</string>
+ <string name="reboot_title">เริ่มระบบใหม่</string>
+ <string name="reboot_confirm" product="tablet">แท็บเล็ตของคุณจะเริ่มระบบใหม่</string>
+ <string name="reboot_confirm" product="default">โทรศัพท์ของคุณจะเริ่มระบบใหม่</string>
+ <string name="reboot_progress">กำลังเริ่มระบบใหม่\u2026</string>
+ <string name="app_killed_message">ปิดแอป</string>
+ <string name="adb_net_active_notification_title">ADB บนเครือข่ายถูกเปิดใช้งาน</string>
+ <string name="adb_both_active_notification_title">ADB บน USB และ &amp; เครือข่ายถูกเปิดใช้งาน</string>
+ <string name="adb_active_generic_notification_message">แตะเพื่อปิดการแก้ไขข้อบกพร่อง</string>
<string name="adb_active_custom_tile">ADB - <xliff:g id="adb_type" example="USB">%1$s</xliff:g></string>
<string name="adb_active_custom_tile_both">USB &amp; เครือข่าย</string>
<string name="adb_active_custom_tile_usb">USB</string>
<string name="adb_active_custom_tile_net">เครือข่าย</string>
+ <string name="permlab_accessThemeService">เข้าถึงรูปแบบธีม</string>
+ <string name="permlab_interceptPackageLaunch">ขัดขวางการเปิดแอป</string>
+ <string name="permdesc_accessThemeService">อนุญาตให้แอปเข้าถึงรูปแบบธีมได้ ซึ่งถือว่าไม่จำเป็นในแอปปกติ</string>
+ <string name="permlab_readThemes">อ่านข้อมูลรูปแบบธีมของคุณ</string>
+ <string name="permdesc_readThemesDesc">อนุญาตให้แอปอ่านข้อมูลรูปแบบธีมและกำหนดหาว่ารูปแบบธีมใดที่คุณใช้</string>
+ <string name="permlab_writeThemes">แก้ไขรูปแบบธีมของคุณ</string>
+ <string name="permdesc_writeThemesDesc">อณุญาตให้แอปเพิ่มรูปแบบธีมใหม่และแก้ไขรูปแบบธีมที่คุณใช้</string>
+ <string name="theme_install_error_title">การติดตั้งรูปแบบธีมล้มเหลว</string>
+ <string name="theme_install_error_message">%s ล้มเหลวในการติดตั้ง</string>
+ <string name="stylus_app_not_installed">%s ไม่ถูกติดตั้ง</string>
+ <string name="theme_reset_notification_title">รีเซ็ตรูปแบบธีม</string>
+ <string name="theme_reset_notification_body">ระบบกลับมาใช้รูปแบบธีมเดิมเนื่องจากมีหลายปัญหาที่เกิดกับแอป</string>
<string name="silent_mode_priority">ระดับความสำคัญ</string>
<string name="silent_mode_none">ไม่มี</string>
+ <string name="subscription_change_disabled_wifi_ap">ปิดฮอตสปอต Wi-Fi เนื่องจากการเปลี่ยนแปลงการสมัครซิมการ์ด</string>
+ <string name="notify_turn_wifi_off_title">ปิด Wi-Fi</string>
+ <string name="permlab_changePrivacyGuardState">เปิดหรือปิดการป้องกันความเป็นส่วนตัว</string>
+ <string name="permdesc_changePrivacyGuardState">อนุญาตให้แอปเปลี่ยนแปลงไม่ว่าแอปอื่นทำงานโดยใช้การป้องกันความเป็นส่วนตัวหรือไม่ก็ตาม เมื่อแอปกำลังทำงานโดยใช้การป้องกันความเป็นส่วนตัว แอปจะไม่สามารถเข้าถึงข้อมูลส่วนบุคคล เช่น รายชื่อติดต่อ ประวัติการโทร หรือข้อความได้</string>
+ <string name="privacy_guard_notification">การป้องกันความเป็นส่วนตัวทำงาน</string>
+ <string name="privacy_guard_notification_detail"><xliff:g id="app">%1$s</xliff:g> จะไม่สามารถเข้าถึงข้อมูลส่วนตัวได้</string>
+ <string name="privacy_guard_dialog_title">รักษาความเป็นส่วนตัว</string>
+ <string name="privacy_guard_dialog_summary"><xliff:g id="app">%1$s</xliff:g> ต้องการ <xliff:g id="op">%2$s</xliff:g></string>
+ <string name="permission_remember_choice">จำตัวเลือกของฉัน</string>
+ <string name="app_ops_access_camera">เข้าถึงกล้อง</string>
+ <string name="app_ops_access_location">เข้าถึงตำแหน่งที่ตั้งของคุณ</string>
+ <string name="app_ops_access_notifications">อ่านการแจ้งเตือน</string>
+ <string name="app_ops_activate_vpn">เปิดใช้งาน VPN</string>
+ <string name="app_ops_auto_start">เริ่มเมื่อเปิดเครื่อง</string>
+ <string name="app_ops_delete_call_log">ลบประวัติการโทรของคุณ</string>
+ <string name="app_ops_delete_contacts">ลบรายชื่อติดต่อของคุณ</string>
+ <string name="app_ops_delete_mms">ลบข้อความ MMS ของคุณ</string>
+ <string name="app_ops_delete_sms">ลบข้อความ SMS ของคุณ</string>
+ <string name="app_ops_draw_on_top">วาดหน้าต่างทับ</string>
+ <string name="app_ops_get_usage_stats">รับสถิติการใช้งานแอป</string>
+ <string name="app_ops_keep_device_awake">เปิดจอค้าง</string>
+ <string name="app_ops_make_phone_call">โทรออก</string>
+ <string name="app_ops_modify_calendar">อัปเดตปฏิทิน</string>
+ <string name="app_ops_modify_call_log">อัปเดตประวัติการโทร</string>
+ <string name="app_ops_modify_clipboard">ปรับแต่งคลิปบอร์ด</string>
+ <string name="app_ops_modify_contacts">อัปเดตรายชื่อติดต่อ</string>
+ <string name="app_ops_modify_settings">อัปเดตการตั้งค่าระบบ</string>
+ <string name="app_ops_mute_unmute_microphone">ปิด/เปิด ไมโครโฟน</string>
+ <string name="app_ops_play_audio">เล่นเสียง</string>
+ <string name="app_ops_post_notification">โพสต์การแจ้งเตือน</string>
+ <string name="app_ops_project_media">สื่อโครงการ</string>
+ <string name="app_ops_read_calendar">อ่านปฏิทิน</string>
+ <string name="app_ops_read_call_log">อ่านประวัติการโทร</string>
+ <string name="app_ops_read_clipboard">อ่านคลิปบอร์ด</string>
+ <string name="app_ops_read_contacts">อ่านรายชื่อติดต่อ</string>
+ <string name="app_ops_read_mms">อ่านข้อความ MMS</string>
+ <string name="app_ops_read_sms">อ่านข้อความ SMS</string>
+ <string name="app_ops_receive_sms">รับข้อความ SMS</string>
+ <string name="app_ops_record_audio">บันทึกเสียง</string>
+ <string name="app_ops_send_mms">ส่งข้อความ MMS</string>
+ <string name="app_ops_send_sms">ส่งข้อความ SMS</string>
+ <string name="app_ops_start_at_bootup">เริ่มเมื่อเปิดเครื่อง</string>
+ <string name="app_ops_toast_window">แสดงแถบข้อความ</string>
+ <string name="app_ops_toggle_bluetooth">สลับบลูทูธ</string>
+ <string name="app_ops_toggle_mobile_data">สลับข้อมูลมือถือ</string>
+ <string name="app_ops_toggle_nfc">สลับ NFC</string>
+ <string name="app_ops_toggle_wifi">สลับ WiFi</string>
+ <string name="app_ops_use_alarm_volume">ควบคุมระดับเสียงนาฬิกาปลุก</string>
+ <string name="app_ops_use_audio_focus">ควบคุมการโฟกัสเสียง</string>
+ <string name="app_ops_use_bluetooth_volume">ควบคุมระดับเสียงบลูทูธ</string>
+ <string name="app_ops_use_master_volume">ควบคุมระดับเสียงหลัก</string>
+ <string name="app_ops_use_media_buttons">ใช้ปุ่มสื่อ</string>
+ <string name="app_ops_use_media_volume">ควบคุมระดับเสียงสื่อ</string>
+ <string name="app_ops_use_notification_volume">ควบคุมระดับเสียงแจ้งเตือน</string>
+ <string name="app_ops_use_ring_volume">ควบคุมระดับเสียงเรียกเข้า</string>
+ <string name="app_ops_use_vibrate">ใช้สั่นเมื่อแตะ</string>
+ <string name="app_ops_use_voice_volume">ควบคุมเสียงสนทนา</string>
+ <string name="app_ops_write_mms">เขียนข้อความ MMS</string>
+ <string name="app_ops_write_sms">เขียนข้อความ SMS</string>
+ <string name="app_ops_use_fingerprint">ใช้ลายนิ้วมือ</string>
+ <string name="app_ops_add_voicemail">เพิ่มการฝากข้อความ</string>
+ <string name="app_ops_read_phone_state">เข้าถึงสถานะโทรศัพท์</string>
+ <string name="app_ops_scan_wifi">ค้นหาเครือข่าย Wi-Fi</string>
+ <string name="app_ops_change_wallpaper">เปลี่ยนรูปพื้นหลัง</string>
+ <string name="app_ops_assist_structure">ใช้โครงสร้างช่วย</string>
+ <string name="app_ops_assist_screenshot">ถ่ายภาพหน้าจอ</string>
+ <string name="app_ops_use_body_sensors">ใช้เซนเซอร์ตรวจร่างกาย</string>
+ <string name="app_ops_read_cell_broadcasts">อ่านการติดต่อเครือข่าย</string>
+ <string name="app_ops_mock_location">จำลองที่ตั้ง</string>
+ <string name="app_ops_read_external_storage">อ่านที่เก็บข้อมูลภายนอก</string>
+ <string name="app_ops_write_external_storage">เขียนที่เก็บข้อมูลภายนอก</string>
+ <string name="app_ops_turn_on_screen">เปิดหน้าจอ</string>
+ <string name="app_ops_get_accounts">เข้าถึงบัญชีของอุปกรณ์</string>
+ <string name="app_ops_wifi_change">เปลี่ยนแปลงสถานะ Wi-Fi</string>
+ <string name="app_ops_su">รับสิทธิผู้ดูแลระบบ</string>
+ <string name="lock_to_app_toast_no_navbar">เพื่อยกเลิกการปักหมุดหน้าจอนี้ กดปุ่มกลับค้างไว้</string>
+ <string name="live_display_auto">อัตโนมัติ</string>
+ <string name="live_display_auto_summary">ตั้งอุณหภูมิสีจออัตโนมัติหลังดวงอาทิตย์ขึ้นและตก</string>
+ <string name="live_display_off">ปิด</string>
+ <string name="live_display_off_summary">ปิดการปรับแต่งทั้งหมด</string>
+ <string name="live_display_day">กลางวัน</string>
+ <string name="live_display_day_summary">ใช้การตั้งค่ากลางวันเท่านั้น</string>
+ <string name="live_display_night">กลางคืน</string>
+ <string name="live_display_night_summary">ใช้การตั้งค่ากลางคืนเท่านั้น</string>
+ <string name="live_display_outdoor">กลางแจ้ง (แดดจ้า)</string>
+ <string name="live_display_outdoor_summary">ใช้การตั้งค่ากลางแจ้งเท่านั้น</string>
+ <string name="live_display_hint">LiveDisplay สามารถช่วยลดอาการปวดตา และช่วยให้คุณนอนหลับในเวลากลางคืน คลิกที่นี่เพื่อลองใช้!</string>
+ <string name="tethered_notification_no_device_message">ไม่มีอุปกรณ์เชื่อมต่อ</string>
+ <string name="tethered_notification_one_device_message"><xliff:g id="count">%1$s</xliff:g> อุปกรณ์เชื่อมต่ออยู่</string>
+ <string name="tethered_notification_multi_device_message"><xliff:g id="count">%1$s</xliff:g> อุปกรณ์เชื่อมต่ออยู่</string>
</resources>
diff --git a/core/res/res/values-tr/cm_strings.xml b/core/res/res/values-tr/cm_strings.xml
index 2ca56bd..1cf06cf 100644
--- a/core/res/res/values-tr/cm_strings.xml
+++ b/core/res/res/values-tr/cm_strings.xml
@@ -36,7 +36,7 @@
<string name="reboot_reboot">Yeniden başlat</string>
<string name="reboot_recovery">Kurtarma modu (Recovery)</string>
<string name="reboot_bootloader">Ön yükleyici (Bootloader)</string>
- <string name="reboot_download">İndirme Kipi</string>
+ <string name="reboot_download">İndir</string>
<string name="reboot_soft">Yazılımsal yeniden başlatma</string>
<string name="reboot_title">Yeniden Başlat</string>
<string name="reboot_confirm" product="tablet">Tabletiniz yeniden başlatılacak.</string>
@@ -56,7 +56,7 @@
<string name="permlab_readThemes">tema bilgisini oku</string>
<string name="permdesc_readThemesDesc">Uygulamanın temalarınızı okumasına ve hangi
temayı uyguladığınızı belirlemesine izin verir.</string>
- <string name="permlab_writeThemes">temaları değiştir</string>
+ <string name="permlab_writeThemes">temalarınızı değiştirin</string>
<string name="permdesc_writeThemesDesc">Uygulamanın yeni temalar eklemesine ve
uyguladığınız temayı değiştirmesine izin verir.</string>
<string name="theme_install_error_title">Tema yüklenemedi</string>
@@ -82,7 +82,7 @@ uyguladığınız temayı değiştirmesine izin verir.</string>
<string name="app_ops_auto_start">açılışta başla</string>
<string name="app_ops_delete_call_log">arama kaydını sil</string>
<string name="app_ops_delete_contacts">kişileri sil</string>
- <string name="app_ops_delete_mms">MMS mesajlarını sil</string>
+ <string name="app_ops_delete_mms">MMS mesajlarınızı silin</string>
<string name="app_ops_delete_sms">SMS\'leri sil</string>
<string name="app_ops_draw_on_top">pencereleri üstte göster</string>
<string name="app_ops_get_usage_stats">uyg. kullanım istatistiklerini al</string>
@@ -101,7 +101,7 @@ uyguladığınız temayı değiştirmesine izin verir.</string>
<string name="app_ops_read_call_log">arama kaydını oku</string>
<string name="app_ops_read_clipboard">panoyu oku</string>
<string name="app_ops_read_contacts">kişileri oku</string>
- <string name="app_ops_read_mms">MMS mesajları oku</string>
+ <string name="app_ops_read_mms">MMS mesajlarınızı okuyun</string>
<string name="app_ops_read_sms">SMS mesajlarını oku</string>
<string name="app_ops_receive_sms">SMS mesajı al</string>
<string name="app_ops_record_audio">ses kaydet</string>
@@ -155,5 +155,5 @@ uyguladığınız temayı değiştirmesine izin verir.</string>
<string name="live_display_hint">LiveDisplay göz yorgunluğunuzu azaltıp geceleri uyumanıza yardımcı olabilir. Denemek için buraya tıklayın!</string>
<string name="tethered_notification_no_device_message">Bağlı cihaz yok</string>
<string name="tethered_notification_one_device_message"><xliff:g id="count">%1$s </xliff:g> cihaz bağlı</string>
- <string name="tethered_notification_multi_device_message"><xliff:g id="count">%1$s </xliff:g> cihaz bağlı</string>
+ <string name="tethered_notification_multi_device_message"><xliff:g id="count">%1$s</xliff:g> cihaz bağlı</string>
</resources>
diff --git a/core/res/res/values-vi/cm_strings.xml b/core/res/res/values-vi/cm_strings.xml
new file mode 100644
index 0000000..f6b6fe2
--- /dev/null
+++ b/core/res/res/values-vi/cm_strings.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (C) 2012-2015 The CyanogenMod Project
+ Copyright (c) 2013, The Linux Foundation. All rights reserved.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="global_action_screenshot">Ảnh chụp màn hình</string>
+ <string name="permlab_receiveProtectedSms">nhận SMS được bảo vệ</string>
+ <string name="permdesc_receiveProtectedSms">Cho phép ứng dụng nhận tin nhắn SMS đến được bảo vệ.</string>
+ <string name="permlab_modifyProtectedSmsList">thay đổi danh sách SMS được bảo vệ</string>
+ <string name="permdesc_modifyProtectedSmsList">Cho phép ứng dụng sửa đổi danh sách địa chỉ SMS được bảo vệ.</string>
+ <string name="permgrouplab_security">Bảo mật</string>
+ <string name="permgroupdesc_security">Quyền liên quan đến thông tin bảo mật của thiết bị.</string>
+ <string name="permlab_readPhoneBlacklist">đọc danh sách đen của điện thoại</string>
+ <string name="permdesc_readPhoneBlacklist">Cho phép ứng dụng đọc thông tin về các số điện thoại bị chặn cuộc gọi hoặc tin nhắn đến.</string>
+ <string name="permlab_changePhoneBlacklist">thay đổi danh sách đen của điện thoại</string>
+ <string name="permdesc_changePhoneBlacklist">Cho phép ứng dụng thay đổi số điện thoại bị chặn cuộc gọi hoặc tin nhắn đến.</string>
+ <string name="global_action_choose_profile">Cấu hình</string>
+ <string name="permlab_setKeyguardWallpaper">thiết lập hình nền bảo vệ phím</string>
+ <string name="permdesc_setKeyguardWallpaper">Cho phép ứng dụng thay đổi hình nền màn hình khoá.</string>
+ <string name="global_action_reboot">Khởi động lại</string>
+ <string name="global_action_current_user">Hiện tại</string>
+ <string name="reboot_reboot">Khởi động lại</string>
+ <string name="reboot_recovery">Phục hồi</string>
+ <string name="reboot_bootloader">Trình nạp khởi động</string>
+ <string name="reboot_download">Tải về</string>
+ <string name="reboot_soft">Khởi động lại nhanh</string>
+ <string name="reboot_title">Khởi động lại</string>
+ <string name="reboot_confirm" product="tablet">Máy tính bảng của bạn sẽ khởi động lại.</string>
+ <string name="reboot_confirm" product="default">Điện thoại của bạn sẽ khởi động lại.</string>
+ <string name="reboot_progress">Đang khởi động lại\u2026</string>
+ <string name="app_killed_message">Ứng dụng đã tắt</string>
+ <string name="adb_net_active_notification_title">Đã bật ADB qua mạng</string>
+ <string name="adb_both_active_notification_title">Đã kích hoạt ADB qua USB &amp; mạng</string>
+ <string name="adb_active_generic_notification_message">Chạm để tắt gỡ lỗi.</string>
+ <string name="adb_active_custom_tile">ADB - <xliff:g id="adb_type" example="USB">%1$s</xliff:g></string>
+ <string name="adb_active_custom_tile_both">USB &amp; mạng</string>
+ <string name="adb_active_custom_tile_usb">USB</string>
+ <string name="adb_active_custom_tile_net">Mạng</string>
+ <string name="permlab_accessThemeService">truy cập dịch vụ chủ đề</string>
+ <string name="permlab_interceptPackageLaunch">chặn ứng dụng khởi chạy</string>
+ <string name="permdesc_accessThemeService">Cho phép ứng dụng truy cập dịch vụ chủ đề. Ứng dụng bình thường không bao giờ cần quyền này.</string>
+ <string name="permlab_readThemes">đọc thông tin chủ đề của bạn</string>
+ <string name="permdesc_readThemesDesc">Cho phép ứng dụng đọc và xác định chủ đề nào bạn đã áp dụng.</string>
+ <string name="permlab_writeThemes">sửa đổi chủ đề của bạn</string>
+ <string name="permdesc_writeThemesDesc">Cho phép ứng dụng chèn các chủ đề mới và sửa đổi chủ đề bạn đã áp dụng.</string>
+ <string name="theme_install_error_title">Không thể cài đặt chủ đề</string>
+ <string name="theme_install_error_message">Không thể cài đặt %s</string>
+ <string name="stylus_app_not_installed">%s chưa được cài đặt</string>
+ <string name="theme_reset_notification_title">Đặt lại chủ đề</string>
+ <string name="theme_reset_notification_body">Đã khôi phục chủ đề hệ thống vì nhiều ứng dụng bị lỗi.</string>
+ <string name="silent_mode_priority">Ưu tiên</string>
+ <string name="silent_mode_none">Không có</string>
+ <string name="subscription_change_disabled_wifi_ap">Đã vô hiệu hóa điểm truy cập WiFi vì thay đổi đăng ký SIM</string>
+ <string name="notify_turn_wifi_off_title">Tắt WiFi</string>
+ <string name="permlab_changePrivacyGuardState">bật hoặc tắt Bảo vệ quyền riêng tư</string>
+ <string name="permdesc_changePrivacyGuardState">Cho phép ứng dụng thay đổi ứng dụng khác chạy với Bảo vệ quyền riêng tư. Khi một ứng dụng chạy với Bảo vệ quyền riêng tư, nó sẽ không có quyền truy cập dữ liệu cá nhân như số liên lạc, nhật ký cuộc gọi hoặc tin nhắn.</string>
+ <string name="privacy_guard_notification">Bảo vệ quyền riêng tư đang hoạt động</string>
+ <string name="privacy_guard_notification_detail"><xliff:g id="app">%1$s</xliff:g> sẽ không thể truy cập dữ liệu cá nhân</string>
+ <string name="privacy_guard_dialog_title">Bảo vệ quyền riêng tư</string>
+ <string name="privacy_guard_dialog_summary"><xliff:g id="app">%1$s</xliff:g> muốn <xliff:g id="op">%2$s</xliff:g>.</string>
+ <string name="permission_remember_choice">Nhớ lựa chọn của tôi</string>
+ <string name="app_ops_access_camera">truy cập máy ảnh</string>
+ <string name="app_ops_access_location">truy cập vị trí của bạn</string>
+ <string name="app_ops_access_notifications">đọc thông báo của bạn</string>
+ <string name="app_ops_activate_vpn">kích hoạt VPN</string>
+ <string name="app_ops_auto_start">chạy lúc khởi động</string>
+ <string name="app_ops_delete_call_log">xóa nhật ký cuộc gọi của bạn</string>
+ <string name="app_ops_delete_contacts">xóa danh bạ của bạn</string>
+ <string name="app_ops_delete_mms">xoá tin nhắn MMS của bạn</string>
+ <string name="app_ops_delete_sms">xoá tin nhắn SMS của bạn</string>
+ <string name="app_ops_draw_on_top">hiện cửa sổ trên cùng</string>
+ <string name="app_ops_get_usage_stats">lấy thống kê sử dụng ứng dụng</string>
+ <string name="app_ops_keep_device_awake">giữ thiết bị của bạn sáng</string>
+ <string name="app_ops_make_phone_call">thực hiện cuộc gọi điện thoại</string>
+ <string name="app_ops_modify_calendar">cập nhật lịch của bạn</string>
+ <string name="app_ops_modify_call_log">cập nhật nhật kí cuộc gọi</string>
+ <string name="app_ops_modify_clipboard">sửa đổi bảng tạm</string>
+ <string name="app_ops_modify_contacts">cập nhật danh bạ của bạn</string>
+ <string name="app_ops_modify_settings">cập nhật thiết lập hệ thống</string>
+ <string name="app_ops_mute_unmute_microphone">tắt/bật tiếng micro</string>
+ <string name="app_ops_play_audio">phát âm thanh</string>
+ <string name="app_ops_post_notification">gửi thông báo</string>
+ <string name="app_ops_project_media">chiếu đa phương tiện</string>
+ <string name="app_ops_read_calendar">đọc lịch của bạn</string>
+ <string name="app_ops_read_call_log">đọc nhật kí cuộc gọi</string>
+ <string name="app_ops_read_clipboard">đọc bảng tạm</string>
+ <string name="app_ops_read_contacts">đọc danh bạ của bạn</string>
+ <string name="app_ops_read_mms">đọc tin nhắn MMS của bạn</string>
+ <string name="app_ops_read_sms">đọc tin nhắn SMS của bạn</string>
+ <string name="app_ops_receive_sms">nhận tin nhắn SMS</string>
+ <string name="app_ops_record_audio">ghi âm</string>
+ <string name="app_ops_send_mms">gửi tin nhắn MMS</string>
+ <string name="app_ops_send_sms">gửi tin nhắn SMS</string>
+ <string name="app_ops_start_at_bootup">chạy lúc khởi động</string>
+ <string name="app_ops_toast_window">hiện thông báo nhanh</string>
+ <string name="app_ops_toggle_bluetooth">bật/tắt Bluetooth</string>
+ <string name="app_ops_toggle_mobile_data">bật/tắt dữ liệu di động</string>
+ <string name="app_ops_toggle_nfc">bật/tắt NFC</string>
+ <string name="app_ops_use_alarm_volume">điều khiển âm lượng báo thức</string>
+ <string name="app_ops_use_audio_focus">điều khiển trọng tâm âm thanh</string>
+ <string name="app_ops_use_bluetooth_volume">điều khiển âm lượng Bluetooth</string>
+ <string name="app_ops_use_master_volume">điều khiển âm lượng tổng thể</string>
+ <string name="app_ops_use_media_buttons">sử dụng nút phương tiện</string>
+ <string name="app_ops_use_media_volume">điều khiển âm lượng đa phương tiện</string>
+ <string name="app_ops_use_notification_volume">điều khiển âm lượng thông báo</string>
+ <string name="app_ops_use_ring_volume">điều khiển âm lượng nhạc chuông</string>
+ <string name="app_ops_use_vibrate">dùng phản hồi xúc giác</string>
+ <string name="app_ops_use_voice_volume">điều khiển âm lượng cuộc gọi thoại</string>
+ <string name="app_ops_write_mms">soạn tin nhắn MMS</string>
+ <string name="app_ops_write_sms">soạn tin nhắn SMS</string>
+ <string name="app_ops_su">lấy quyền truy cập root</string>
+ <string name="lock_to_app_toast_no_navbar">Để bỏ ghim màn hình này, hãy chạm và giữ phím Quay lại.</string>
+ <string name="live_display_auto">Tự động</string>
+ <string name="live_display_auto_summary">Tự động chỉnh nhiệt độ màu của màn hình theo ngày và đêm</string>
+ <string name="live_display_off">Tắt</string>
+ <string name="live_display_off_summary">Vô hiệu hoá tất cả điều chỉnh</string>
+ <string name="live_display_day">Ngày</string>
+ <string name="live_display_day_summary">Chỉ sử dụng cài đặt ban ngày</string>
+ <string name="live_display_night">Đêm</string>
+ <string name="live_display_night_summary">Chỉ sử dụng cài đặt ban đêm</string>
+ <string name="live_display_outdoor">Ngoài trời (ánh sáng mặt trời)</string>
+ <string name="live_display_outdoor_summary">Chỉ sử dụng cài đặt ngoài trời</string>
+ <string name="live_display_hint">LiveDisplay có thể giúp giảm mỏi mắt và giúp bạn ngủ vào ban đêm. Nhấn vào đây để thử!</string>
+ <string name="tethered_notification_no_device_message">Không có thiết bị kết nối</string>
+ <string name="tethered_notification_one_device_message"><xliff:g id="count">%1$s</xliff:g> thiết bị đã kết nối</string>
+ <string name="tethered_notification_multi_device_message"><xliff:g id="count">%1$s</xliff:g> thiết bị đã kết nối</string>
+</resources>
diff --git a/core/res/res/values-zh-rCN/cm_strings.xml b/core/res/res/values-zh-rCN/cm_strings.xml
index b3b8f30..7c201f1 100644
--- a/core/res/res/values-zh-rCN/cm_strings.xml
+++ b/core/res/res/values-zh-rCN/cm_strings.xml
@@ -110,7 +110,7 @@
<string name="app_ops_toggle_bluetooth">开启蓝牙</string>
<string name="app_ops_toggle_mobile_data">开启移动数据</string>
<string name="app_ops_toggle_nfc">切换 NFC</string>
- <string name="app_ops_toggle_wifi">切换 Wi-Fi</string>
+ <string name="app_ops_toggle_wifi">开关 Wi-Fi</string>
<string name="app_ops_use_alarm_volume">控制闹铃音量</string>
<string name="app_ops_use_audio_focus">控制音频焦点</string>
<string name="app_ops_use_bluetooth_volume">控制蓝牙音量</string>
diff --git a/core/res/res/values/cm_integers.xml b/core/res/res/values/cm_integers.xml
new file mode 100644
index 0000000..0668c92
--- /dev/null
+++ b/core/res/res/values/cm_integers.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2015, The CyanogenMod Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources>
+ <!-- Default for Settings.Global.WIFI_IDLE_MS (15 minutes) -->
+ <integer name="def_wifi_idle_ms">900000</integer>
+</resources>
diff --git a/core/res/res/values/cm_symbols.xml b/core/res/res/values/cm_symbols.xml
index 08570f8..3a511e8 100644
--- a/core/res/res/values/cm_symbols.xml
+++ b/core/res/res/values/cm_symbols.xml
@@ -115,6 +115,9 @@
<!-- PlatLogo -->
<java-symbol type="drawable" name="platlogo_cm" />
+ <!-- Automatic brightness enhancements -->
+ <java-symbol type="integer" name="config_autoBrightnessBrighteningLightFastDebounce"/>
+
<!-- LiveDisplay -->
<java-symbol type="string" name="live_display_title" />
<java-symbol type="string" name="live_display_hint" />
@@ -136,4 +139,7 @@
<java-symbol type="string" name="tethered_notification_no_device_message" />
<java-symbol type="string" name="tethered_notification_one_device_message" />
<java-symbol type="string" name="tethered_notification_multi_device_message" />
+
+ <!-- Wifi idle time default -->
+ <java-symbol type="integer" name="def_wifi_idle_ms" />
</resources>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index a87e56c..0e2dafc 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1061,6 +1061,7 @@
when adapting to brighter or darker environments. This parameter controls how quickly
brightness changes occur in response to an observed change in light level that exceeds the
hysteresis threshold. -->
+ <integer name="config_autoBrightnessBrighteningLightFastDebounce">500</integer>
<integer name="config_autoBrightnessBrighteningLightDebounce">4000</integer>
<integer name="config_autoBrightnessDarkeningLightDebounce">8000</integer>
diff --git a/core/res/res/values/customize.xml b/core/res/res/values/customize.xml
index 0cb79cf..53a1807 100644
--- a/core/res/res/values/customize.xml
+++ b/core/res/res/values/customize.xml
@@ -27,10 +27,14 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
-
<resources>
<!-- Support for disabling to fetch APN from OMH card
for some cdma carriers -->
<java-symbol type="bool" name="config_fetch_apn_from_omh_card" />
<bool name="config_fetch_apn_from_omh_card">false</bool>
+ <!-- Used in LocalePicker, default language must be contained -->
+ <string name="locale_codes" translatable="false"></string>
+
+ <!-- custom date format or not -->
+ <bool name="def_custom_dateformat">false</bool>
</resources>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 2a66a96..d31ab73 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -243,6 +243,7 @@
<java-symbol type="attr" name="accessibilityFocusedDrawable"/>
<java-symbol type="attr" name="isLightTheme"/>
+ <java-symbol type="bool" name="def_custom_dateformat" />
<java-symbol type="bool" name="action_bar_embed_tabs" />
<java-symbol type="bool" name="action_bar_embed_tabs_pre_jb" />
<java-symbol type="bool" name="action_bar_expanded_action_views_exclusive" />
@@ -446,6 +447,7 @@
<java-symbol type="dimen" name="accessibility_magnification_indicator_width" />
<java-symbol type="dimen" name="circular_display_mask_thickness" />
+ <java-symbol type="string" name="locale_codes" />
<java-symbol type="string" name="add_account_button_label" />
<java-symbol type="string" name="addToDictionary" />
<java-symbol type="string" name="action_bar_home_description" />
diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java
index 1cfccc4..6d3bf3e 100644
--- a/graphics/java/android/graphics/drawable/VectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/VectorDrawable.java
@@ -32,6 +32,7 @@ import android.graphics.PathMeasure;
import android.graphics.PixelFormat;
import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
+import android.graphics.RectF;
import android.graphics.PorterDuff.Mode;
import android.util.ArrayMap;
import android.util.AttributeSet;
@@ -225,9 +226,9 @@ public class VectorDrawable extends Drawable {
private Insets mDpiScaleInsets = Insets.NONE;
// Temp variable, only for saving "new" operation at the draw() time.
- private final float[] mTmpFloats = new float[9];
private final Matrix mTmpMatrix = new Matrix();
private final Rect mTmpBounds = new Rect();
+ private final RectF mTmpDstBounds = new RectF();
public VectorDrawable() {
this(null, null);
@@ -288,11 +289,10 @@ public class VectorDrawable extends Drawable {
// size first. This bitmap size is determined by the bounds and the
// canvas scale.
canvas.getMatrix(mTmpMatrix);
- mTmpMatrix.getValues(mTmpFloats);
- float canvasScaleX = Math.abs(mTmpFloats[Matrix.MSCALE_X]);
- float canvasScaleY = Math.abs(mTmpFloats[Matrix.MSCALE_Y]);
- int scaledWidth = (int) (mTmpBounds.width() * canvasScaleX);
- int scaledHeight = (int) (mTmpBounds.height() * canvasScaleY);
+ mTmpDstBounds.set(mTmpBounds);
+ mTmpMatrix.mapRect(mTmpDstBounds);
+ int scaledWidth = (int) mTmpDstBounds.width();
+ int scaledHeight = (int) mTmpDstBounds.height();
scaledWidth = Math.min(MAX_CACHED_BITMAP_SIZE, scaledWidth);
scaledHeight = Math.min(MAX_CACHED_BITMAP_SIZE, scaledHeight);
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index 4e405e3..7112c1a 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -456,7 +456,7 @@ public class MediaRecorder
profile.quality == CamcorderProfile.QUALITY_TIME_LAPSE_VGA) {
// Nothing needs to be done. Call to setCaptureRate() enables
// time lapse video recording.
- } else {
+ } else if (profile.audioCodec >= 0) {
setAudioEncodingBitRate(profile.audioBitRate);
setAudioChannels(profile.audioChannels);
setAudioSamplingRate(profile.audioSampleRate);
diff --git a/media/java/android/media/Ringtone.java b/media/java/android/media/Ringtone.java
index c2bcd93..2f96d1f 100644
--- a/media/java/android/media/Ringtone.java
+++ b/media/java/android/media/Ringtone.java
@@ -214,8 +214,14 @@ public class Ringtone {
if (Settings.AUTHORITY.equals(authority)) {
if (followSettingsUri) {
- Uri actualUri = RingtoneManager.getActualDefaultRingtoneUri(context,
- RingtoneManager.getDefaultType(uri));
+ Uri actualUri;
+ if (RingtoneManager.getDefaultType(uri) == RingtoneManager.TYPE_RINGTONE) {
+ actualUri = RingtoneManager.getActualRingtoneUriBySubId(context,
+ RingtoneManager.getDefaultRingtoneSubIdByUri(uri));
+ } else {
+ actualUri = RingtoneManager.getActualDefaultRingtoneUri(context,
+ RingtoneManager.getDefaultType(uri));
+ }
String actualTitle = getTitle(
context, actualUri, false /*followSettingsUri*/, allowRemote);
title = context
@@ -412,9 +418,9 @@ public class Ringtone {
private boolean playFallbackRingtone() {
if (mAudioManager.getStreamVolume(AudioAttributes.toLegacyStreamType(mAudioAttributes))
!= 0) {
- int ringtoneType = RingtoneManager.getDefaultType(mUri);
- if (ringtoneType == -1 ||
- RingtoneManager.getActualDefaultRingtoneUri(mContext, ringtoneType) != null) {
+ int subId = RingtoneManager.getDefaultRingtoneSubIdByUri(mUri);
+ if (subId != -1 &&
+ RingtoneManager.getActualRingtoneUriBySubId(mContext, subId) != null) {
// Default ringtone, try fallback ringtone.
try {
AssetFileDescriptor afd = mContext.getResources().openRawResourceFd(
diff --git a/media/java/android/media/RingtoneManager.java b/media/java/android/media/RingtoneManager.java
index 01cae5c..fe4c91b 100644
--- a/media/java/android/media/RingtoneManager.java
+++ b/media/java/android/media/RingtoneManager.java
@@ -700,7 +700,9 @@ public class RingtoneManager {
public static int getDefaultType(Uri defaultRingtoneUri) {
if (defaultRingtoneUri == null) {
return -1;
- } else if (defaultRingtoneUri.equals(Settings.System.DEFAULT_RINGTONE_URI)) {
+ } else if (defaultRingtoneUri.equals(Settings.System.DEFAULT_RINGTONE_URI) ||
+ defaultRingtoneUri.equals(Settings.System.DEFAULT_RINGTONE_URI_2) ||
+ defaultRingtoneUri.equals(Settings.System.DEFAULT_RINGTONE_URI_3)) {
return TYPE_RINGTONE;
} else if (defaultRingtoneUri.equals(Settings.System.DEFAULT_NOTIFICATION_URI)) {
return TYPE_NOTIFICATION;
@@ -731,5 +733,106 @@ public class RingtoneManager {
return null;
}
}
-
+
+ /**
+ * Returns the subscription ID of {@link Uri}.
+ *
+ * @param defaultRingtoneUri The default {@link Uri}. For example,
+ * {@link System#DEFAULT_RINGTONE_URI},
+ * {@link System#DEFAULT_RINGTONE_URI_2}, or
+ * {@link System#DEFAULT_RINGTONE_URI_3}.
+ * @return The Subscription ID of the defaultRingtoneUri, or -1.
+ * @hide
+ */
+ public static int getDefaultRingtoneSubIdByUri(Uri defaultRingtoneUri) {
+ if (defaultRingtoneUri == null) {
+ return -1;
+ }
+ /**
+ * URI is encoded as below:
+ * DEFAULT_RINGTONE_URI: content://settings/system/ringtone
+ * DEFAULT_RINGTONE_URI_2: content://settings/system/ringtone_2
+ * DEFAULT_RINGTONE_URI_3: content://settings/system/ringtone_3
+ */
+ if (defaultRingtoneUri.equals(Settings.System.DEFAULT_RINGTONE_URI)) {
+ return 0; /* Sub-1 */
+ }
+ final String uriString = defaultRingtoneUri.toString();
+ int parsedSubId = -1;
+ if (uriString.startsWith(Settings.System.DEFAULT_RINGTONE_URI.toString())) {
+ parsedSubId = Integer.parseInt(uriString.substring(uriString.lastIndexOf("_") + 1));
+ if ((parsedSubId > 0 && parsedSubId <= Settings.System.MAX_NUM_RINGTONES)) {
+ return parsedSubId - 1;
+ }
+ }
+ return -1;
+ }
+
+ /**
+ * Gets the actual default sound's {@link Uri}. This will give the actual
+ * sound {@link Uri}, instead of using this, most clients can use
+ * {@link System#DEFAULT_RINGTONE_URI}.
+ *
+ * @param subId The Subscription ID.
+ * @return A {@link Uri} pointing to the default sound for the sound type.
+ * @hide
+ */
+ public static Uri getDefaultRingtoneUriBySubId(int subId) {
+ if (!(subId >= 0 && subId < Settings.System.MAX_NUM_RINGTONES)) {
+ return null;
+ }
+ if (subId == 0) {
+ return Settings.System.DEFAULT_RINGTONE_URI;
+ } else {
+ final String uriString =
+ Settings.System.DEFAULT_RINGTONE_URI.toString() + "_" + (subId + 1);
+ return Uri.parse(uriString);
+ }
+ }
+
+ /**
+ * Gets the current default sound's {@link Uri}. This will give the actual
+ * sound {@link Uri}, instead of using this, most clients can use
+ * {@link System#DEFAULT_RINGTONE_URI}.
+ *
+ * @param context A context used for querying.
+ * @param subId The Subscription ID.
+ * @return A {@link Uri} pointing to the default sound for the sound type.
+ * @hide
+ */
+ public static Uri getActualRingtoneUriBySubId(Context context, int subId) {
+ if (!(subId >= 0 && subId < Settings.System.MAX_NUM_RINGTONES)) {
+ return null;
+ }
+ String setting;
+ if (subId == 0) {
+ setting = Settings.System.RINGTONE;
+ } else {
+ setting = Settings.System.RINGTONE + "_" + (subId + 1);
+ }
+ final String uriString = Settings.System.getString(context.getContentResolver(), setting);
+ return uriString != null ? Uri.parse(uriString) : null;
+ }
+
+ /**
+ * Sets the {@link Uri} of the default sound for a given sound type.
+ *
+ * @param context A context used for querying.
+ * @param subId The Subscription ID.
+ * @param ringtoneUri A {@link Uri} pointing to the default sound to set.
+ * @hide
+ */
+ public static void setActualRingtoneUriBySubId(Context context, int subId, Uri ringtoneUri) {
+ if (!(subId >= 0 && subId < Settings.System.MAX_NUM_RINGTONES)) {
+ return;
+ }
+ String setting;
+ if (subId == 0) {
+ setting = Settings.System.RINGTONE;
+ } else {
+ setting = Settings.System.RINGTONE + "_" + (subId + 1);
+ }
+ Settings.System.putString(context.getContentResolver(), setting,
+ ringtoneUri != null ? ringtoneUri.toString() : null);
+ }
}
diff --git a/packages/Keyguard/res/values-ar/cm_strings.xml b/packages/Keyguard/res/values-ar/cm_strings.xml
new file mode 100644
index 0000000..46f5512
--- /dev/null
+++ b/packages/Keyguard/res/values-ar/cm_strings.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (C) 2012-2015 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="lockscreen_sim_error_message_short">بطاقة غير صالحة.</string>
+</resources>
diff --git a/packages/Keyguard/res/values-bn-rBD/cm_strings.xml b/packages/Keyguard/res/values-bn-rBD/cm_strings.xml
new file mode 100644
index 0000000..bdb0111
--- /dev/null
+++ b/packages/Keyguard/res/values-bn-rBD/cm_strings.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (C) 2012-2015 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="lockscreen_sim_error_message_short">অবৈধ কার্ড।</string>
+</resources>
diff --git a/packages/Keyguard/res/values-en-rIN/cm_strings.xml b/packages/Keyguard/res/values-en-rIN/cm_strings.xml
index 5bf42fa..c6a7b7d 100644
--- a/packages/Keyguard/res/values-en-rIN/cm_strings.xml
+++ b/packages/Keyguard/res/values-en-rIN/cm_strings.xml
@@ -16,5 +16,10 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="keyguard_perso_locked_message">SIM/RUIM is Perso locked</string>
<string name="lockscreen_sim_error_message_short">Invalid card.</string>
+ <plurals name="kg_password_default_pin_message">
+ <item quantity="one">Enter SIM PIN, you have <xliff:g id="number">%d</xliff:g> remaining attempt before you must contact your carrier to unlock your device.</item>
+ <item quantity="other">Enter SIM PIN, you have <xliff:g id="number">%d</xliff:g> remaining attempts.</item>
+ </plurals>
</resources>
diff --git a/packages/Keyguard/res/values-es/cm_strings.xml b/packages/Keyguard/res/values-es/cm_strings.xml
index 00cc610..72ed182 100644
--- a/packages/Keyguard/res/values-es/cm_strings.xml
+++ b/packages/Keyguard/res/values-es/cm_strings.xml
@@ -16,6 +16,7 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="keyguard_perso_locked_message">La tarjeta SIM tiene un bloqueo personalizado</string>
<string name="lockscreen_sim_error_message_short">Tarjeta no válida.</string>
<plurals name="kg_password_default_pin_message">
<item quantity="one">Introduce el código PIN. Tienes <xliff:g id="number">%d</xliff:g> intento restante antes de tener que comunicarte con tu operadora para desbloquear el dispositivo.</item>
diff --git a/packages/Keyguard/res/values-hr/cm_strings.xml b/packages/Keyguard/res/values-hr/cm_strings.xml
new file mode 100644
index 0000000..c680bfb
--- /dev/null
+++ b/packages/Keyguard/res/values-hr/cm_strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (C) 2012-2015 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="keyguard_perso_locked_message">SIM kartica je Perso zaključana</string>
+ <string name="lockscreen_sim_error_message_short">Nevažeća kartica.</string>
+</resources>
diff --git a/packages/Keyguard/res/values-hu/cm_strings.xml b/packages/Keyguard/res/values-hu/cm_strings.xml
index ca33ec5..e4c03f6 100644
--- a/packages/Keyguard/res/values-hu/cm_strings.xml
+++ b/packages/Keyguard/res/values-hu/cm_strings.xml
@@ -16,5 +16,10 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="keyguard_perso_locked_message">SIM/RUIM Perso zárva</string>
<string name="lockscreen_sim_error_message_short">Érvénytelen kártya.</string>
+ <plurals name="kg_password_default_pin_message">
+ <item quantity="one">Adja meg a SIM-kártya PIN-kódját. <xliff:g id="number">%d</xliff:g> kísérlete maradt mielőtt fel kell vennie a kapcsolatot a mobilszolgáltatójával a készülék feloldásához.</item>
+ <item quantity="other">Adja meg a SIM-kártya PIN-kódját. <xliff:g id="number">%d</xliff:g> kísérlete maradt.</item>
+ </plurals>
</resources>
diff --git a/packages/Keyguard/res/values-ko/cm_strings.xml b/packages/Keyguard/res/values-ko/cm_strings.xml
index a31800f..392c96e 100644
--- a/packages/Keyguard/res/values-ko/cm_strings.xml
+++ b/packages/Keyguard/res/values-ko/cm_strings.xml
@@ -16,5 +16,9 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="keyguard_perso_locked_message">SIM/RUIM이 Perso lock되어 있습니다.</string>
<string name="lockscreen_sim_error_message_short">올바르지 않은 카드입니다.</string>
+ <plurals name="kg_password_default_pin_message">
+ <item quantity="other">SIM PIN을 입력하십시오. <xliff:g id="number">%d</xliff:g>회 후에는 이동통신사에 연락하여 기기를 잠금 해제해야 합니다.</item>
+ </plurals>
</resources>
diff --git a/packages/Keyguard/res/values-nb/cm_strings.xml b/packages/Keyguard/res/values-nb/cm_strings.xml
index 40d27f3..43727d9 100644
--- a/packages/Keyguard/res/values-nb/cm_strings.xml
+++ b/packages/Keyguard/res/values-nb/cm_strings.xml
@@ -16,5 +16,10 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="keyguard_perso_locked_message">SIM/RUIM er Person låst</string>
<string name="lockscreen_sim_error_message_short">Ugyldig kort.</string>
+ <plurals name="kg_password_default_pin_message">
+ <item quantity="one">Angi SIM PIN, du har <xliff:g id="number">%d</xliff:g> forsøk igjen før må du kontakte operatøren for å låse opp enheten.</item>
+ <item quantity="other">Angi SIM PIN, du har <xliff:g id="number">%d</xliff:g> gjenstående forsøk.</item>
+ </plurals>
</resources>
diff --git a/packages/Keyguard/res/values-nl/cm_strings.xml b/packages/Keyguard/res/values-nl/cm_strings.xml
index 13f293d..26a2a41 100644
--- a/packages/Keyguard/res/values-nl/cm_strings.xml
+++ b/packages/Keyguard/res/values-nl/cm_strings.xml
@@ -16,5 +16,10 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="keyguard_perso_locked_message">Simkaart is Perso-vergrendeld</string>
<string name="lockscreen_sim_error_message_short">Ongeldige simkaart.</string>
+ <plurals name="kg_password_default_pin_message">
+ <item quantity="one">SIM-PIN invoeren, u heeft <xliff:g id="number">%d</xliff:g> resterende pogingen voordat u contact moet opnemen met uw provider om uw apparaat te ontgrendelen.</item>
+ <item quantity="other">SIM-PIN invoeren, u heeft <xliff:g id="number">%d</xliff:g> resterende pogingen.</item>
+ </plurals>
</resources>
diff --git a/packages/Keyguard/res/values-pt-rBR/cm_strings.xml b/packages/Keyguard/res/values-pt-rBR/cm_strings.xml
index b07850b..c490c87 100644
--- a/packages/Keyguard/res/values-pt-rBR/cm_strings.xml
+++ b/packages/Keyguard/res/values-pt-rBR/cm_strings.xml
@@ -16,5 +16,10 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="keyguard_perso_locked_message">O cartão SIM está bloqueado</string>
<string name="lockscreen_sim_error_message_short">Cartão SIM inválido.</string>
+ <plurals name="kg_password_default_pin_message">
+ <item quantity="one">Digite o PIN do cartão SIM, você tem <xliff:g id="number">%d</xliff:g> tentativa restante antes de precisar contatar sua operadora para desbloquear seu aparelho.</item>
+ <item quantity="other">Digite o PIN do cartão SIM, você tem <xliff:g id="number">%d</xliff:g> tentativas restantes.</item>
+ </plurals>
</resources>
diff --git a/packages/Keyguard/res/values-sl/cm_strings.xml b/packages/Keyguard/res/values-sl/cm_strings.xml
index cfc4b2e..b3d5c41 100644
--- a/packages/Keyguard/res/values-sl/cm_strings.xml
+++ b/packages/Keyguard/res/values-sl/cm_strings.xml
@@ -16,5 +16,12 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="keyguard_perso_locked_message">Kartica SIM je zaklenjena v načinu Perso</string>
<string name="lockscreen_sim_error_message_short">Neveljavna kartica.</string>
+ <plurals name="kg_password_default_pin_message">
+ <item quantity="one">Vnesite PIN kartice SIM, imate še <xliff:g id="number">%d</xliff:g> preostali poskus, preden boste morali stopiti v stik s svojim ponudnikom, da vam odklene napravo.</item>
+ <item quantity="two">Vnesite PIN kartice SIM, imate še <xliff:g id="number">%d</xliff:g> preostala poskusa.</item>
+ <item quantity="few">Vnesite PIN kartice SIM, imate še <xliff:g id="number">%d</xliff:g> preostale poskuse.</item>
+ <item quantity="other">Vnesite PIN kartice SIM, imate še <xliff:g id="number">%d</xliff:g> preostalih poskusov.</item>
+ </plurals>
</resources>
diff --git a/packages/Keyguard/res/values-th/cm_strings.xml b/packages/Keyguard/res/values-th/cm_strings.xml
new file mode 100644
index 0000000..ce76f24
--- /dev/null
+++ b/packages/Keyguard/res/values-th/cm_strings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (C) 2012-2015 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="keyguard_perso_locked_message">ซิมการ์ดถูกเปโซล็อค</string>
+ <string name="lockscreen_sim_error_message_short">ซิมการ์ดไม่ถูกต้อง</string>
+ <plurals name="kg_password_default_pin_message">
+ <item quantity="other">ใส่รหัสซิมการ์ด สามารถใส่รหัสได้อีก <xliff:g id="number">%d</xliff:g> ก่อนจะต้องติดต่อติดต่อผู้ให้บริการเพื่อปลดล็อคอุปกรณ์ของคุณ</item>
+ </plurals>
+</resources>
diff --git a/packages/Keyguard/res/values-vi/cm_strings.xml b/packages/Keyguard/res/values-vi/cm_strings.xml
new file mode 100644
index 0000000..12d4975
--- /dev/null
+++ b/packages/Keyguard/res/values-vi/cm_strings.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (C) 2012-2015 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="lockscreen_sim_error_message_short">Thẻ sim không hợp lệ.</string>
+</resources>
diff --git a/packages/Keyguard/res/values-zh-rCN/cm_strings.xml b/packages/Keyguard/res/values-zh-rCN/cm_strings.xml
index f42ca4b..80240bf 100644
--- a/packages/Keyguard/res/values-zh-rCN/cm_strings.xml
+++ b/packages/Keyguard/res/values-zh-rCN/cm_strings.xml
@@ -19,6 +19,6 @@
<string name="keyguard_perso_locked_message">SIM 卡已被锁定</string>
<string name="lockscreen_sim_error_message_short">无效的 SIM 卡。</string>
<plurals name="kg_password_default_pin_message">
- <item quantity="other">输入 SIM 卡 PIN ,您还有 <xliff:g id="number">%d</xliff:g> 次机会解锁,否则必须联系您的运营商以解锁您的设备。</item>
+ <item quantity="other">输入 SIM 卡 PIN。您还有 <xliff:g id="number">%d</xliff:g> 次尝试机会;若超出此次数,则必须联系运营商以解锁 SIM 卡。</item>
</plurals>
</resources>
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
index 4c08bb7..3aa36c8 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
@@ -257,9 +257,9 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
}
resetPasswordText(true /* animate */);
if (result == PhoneConstants.PIN_RESULT_SUCCESS) {
+ mRemainingAttempts = -1;
KeyguardUpdateMonitor.getInstance(getContext())
.reportSimUnlocked(mSubId);
- mRemainingAttempts = -1;
if (mCallback != null) {
mCallback.dismiss(true);
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
index f95b0ae..adb5ae9 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
@@ -1,4 +1,7 @@
/*
+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+ *
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,6 +26,7 @@ import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.UserHandle;
+import android.provider.Settings;
import android.text.TextUtils;
import android.text.format.DateFormat;
import android.util.AttributeSet;
@@ -229,10 +233,20 @@ public class KeyguardStatusView extends GridLayout {
: R.string.abbrev_wday_month_day_no_year);
final String clockView12Skel = res.getString(R.string.clock_12hr_format);
final String clockView24Skel = res.getString(R.string.clock_24hr_format);
- final String key = locale.toString() + dateViewSkel + clockView12Skel + clockView24Skel;
- if (key.equals(cacheKey)) return;
- dateView = DateFormat.getBestDateTimePattern(locale, dateViewSkel);
+ if (res.getBoolean(com.android.internal.R.bool.def_custom_dateformat)) {
+ final String dateformat = Settings.System.getString(context.getContentResolver(),
+ Settings.System.DATE_FORMAT);
+ dateView = dateformat.equals(dateView) ? dateView : dateformat;
+ } else {
+ final String key = locale.toString() + dateViewSkel + clockView12Skel
+ + clockView24Skel;
+ if (key.equals(cacheKey)) {
+ return;
+ }
+ dateView = DateFormat.getBestDateTimePattern(locale, dateViewSkel);
+ cacheKey = key;
+ }
clockView12 = DateFormat.getBestDateTimePattern(locale, clockView12Skel);
// CLDR insists on adding an AM/PM indicator even though it wasn't in the skeleton
@@ -247,7 +261,6 @@ public class KeyguardStatusView extends GridLayout {
clockView24 = clockView24.replace(':', '\uee01');
clockView12 = clockView12.replace(':', '\uee01');
- cacheKey = key;
}
}
}
diff --git a/packages/SettingsLib/res/values-de/cm_strings.xml b/packages/SettingsLib/res/values-de/cm_strings.xml
new file mode 100644
index 0000000..2e33a1d
--- /dev/null
+++ b/packages/SettingsLib/res/values-de/cm_strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+/*
+**
+** Copyright 2015 The CyanogenMod Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="profile_applist_title">Apps</string>
+ <string name="picker_activities">Aktivitäten</string>
+ <string name="select_custom_app_title">Anwendung wählen</string>
+ <string name="select_custom_activity_title">Aktivität wählen</string>
+ <string name="lockscreen_targets_message">Sperrbildschirm-Verknüpfungen</string>
+</resources>
diff --git a/packages/SettingsLib/res/values-el/cm_strings.xml b/packages/SettingsLib/res/values-el/cm_strings.xml
new file mode 100644
index 0000000..f622a7f
--- /dev/null
+++ b/packages/SettingsLib/res/values-el/cm_strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+/*
+**
+** Copyright 2015 The CyanogenMod Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="profile_applist_title">Εφαρμογές</string>
+ <string name="picker_activities">Δραστηριότητες</string>
+ <string name="select_custom_app_title">Επιλέξτε προσαρμοσμένη εφαρμογή</string>
+ <string name="select_custom_activity_title">Επιλέξτε προσαρμοσμένη δραστηριότητα</string>
+ <string name="lockscreen_targets_message">Συντομεύσεις οθόνης κλειδώματος</string>
+</resources>
diff --git a/packages/SettingsLib/res/values-fr/cm_strings.xml b/packages/SettingsLib/res/values-fr/cm_strings.xml
new file mode 100644
index 0000000..7cd934f
--- /dev/null
+++ b/packages/SettingsLib/res/values-fr/cm_strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+/*
+**
+** Copyright 2015 The CyanogenMod Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="profile_applist_title">Applications</string>
+ <string name="picker_activities">Activités</string>
+ <string name="select_custom_app_title">Sélectionner une application personnalisée</string>
+ <string name="select_custom_activity_title">Sélectionner une activité personnalisée</string>
+ <string name="lockscreen_targets_message">Raccourcis de l\'écran de verrouillage</string>
+</resources>
diff --git a/packages/SettingsLib/res/values-it/cm_strings.xml b/packages/SettingsLib/res/values-it/cm_strings.xml
new file mode 100644
index 0000000..e7cc83a
--- /dev/null
+++ b/packages/SettingsLib/res/values-it/cm_strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+/*
+**
+** Copyright 2015 The CyanogenMod Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="profile_applist_title">App</string>
+ <string name="picker_activities">Attività</string>
+ <string name="select_custom_app_title">Seleziona app personalizzata</string>
+ <string name="select_custom_activity_title">Seleziona attività personalizzata</string>
+ <string name="lockscreen_targets_message">Scorciatoie schermata di sblocco</string>
+</resources>
diff --git a/packages/SettingsLib/res/values-ko/cm_strings.xml b/packages/SettingsLib/res/values-ko/cm_strings.xml
new file mode 100644
index 0000000..9669798
--- /dev/null
+++ b/packages/SettingsLib/res/values-ko/cm_strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+/*
+**
+** Copyright 2015 The CyanogenMod Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="profile_applist_title">애플리케이션</string>
+ <string name="picker_activities">액티비티</string>
+ <string name="select_custom_app_title">사용자 정의 앱 선택</string>
+ <string name="select_custom_activity_title">사용자 정의 액티비티 선택</string>
+ <string name="lockscreen_targets_message">잠금 화면 바로 가기</string>
+</resources>
diff --git a/packages/SettingsLib/res/values-zh-rCN/cm_strings.xml b/packages/SettingsLib/res/values-zh-rCN/cm_strings.xml
new file mode 100644
index 0000000..7fbfad4
--- /dev/null
+++ b/packages/SettingsLib/res/values-zh-rCN/cm_strings.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+/*
+**
+** Copyright 2015 The CyanogenMod Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="profile_applist_title">应用</string>
+ <string name="picker_activities">活动</string>
+ <string name="select_custom_app_title">选择自定义应用</string>
+ <string name="select_custom_activity_title">选择自定义活动</string>
+ <string name="lockscreen_targets_message">锁屏快捷方式</string>
+</resources>
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
index 60bb472..f7b1cee 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
@@ -834,7 +834,12 @@ public final class CachedBluetoothDevice implements Comparable<CachedBluetoothDe
// The pairing dialog now warns of phone-book access for paired devices.
// No separate prompt is displayed after pairing.
if (getPhonebookPermissionChoice() == CachedBluetoothDevice.ACCESS_UNKNOWN) {
- setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_ALLOWED);
+ if (mDevice.getBluetoothClass().getDeviceClass()
+ == BluetoothClass.Device.AUDIO_VIDEO_HANDSFREE) {
+ setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_ALLOWED);
+ } else {
+ setPhonebookPermissionChoice(CachedBluetoothDevice.ACCESS_REJECTED);
+ }
}
}
}
diff --git a/packages/SettingsProvider/res/mipmap-hdpi/ic_launcher_settings.png b/packages/SettingsProvider/res/mipmap-hdpi/ic_launcher_settings.png
index a8ccc89..252e6b4 100644
--- a/packages/SettingsProvider/res/mipmap-hdpi/ic_launcher_settings.png
+++ b/packages/SettingsProvider/res/mipmap-hdpi/ic_launcher_settings.png
Binary files differ
diff --git a/packages/SettingsProvider/res/mipmap-mdpi/ic_launcher_settings.png b/packages/SettingsProvider/res/mipmap-mdpi/ic_launcher_settings.png
index 69709a8..d2ecee9 100644
--- a/packages/SettingsProvider/res/mipmap-mdpi/ic_launcher_settings.png
+++ b/packages/SettingsProvider/res/mipmap-mdpi/ic_launcher_settings.png
Binary files differ
diff --git a/packages/SettingsProvider/res/mipmap-xhdpi/ic_launcher_settings.png b/packages/SettingsProvider/res/mipmap-xhdpi/ic_launcher_settings.png
index c3adce61..fa8c813 100644
--- a/packages/SettingsProvider/res/mipmap-xhdpi/ic_launcher_settings.png
+++ b/packages/SettingsProvider/res/mipmap-xhdpi/ic_launcher_settings.png
Binary files differ
diff --git a/packages/SettingsProvider/res/mipmap-xxhdpi/ic_launcher_settings.png b/packages/SettingsProvider/res/mipmap-xxhdpi/ic_launcher_settings.png
index 52fe978..3fa69e9 100644
--- a/packages/SettingsProvider/res/mipmap-xxhdpi/ic_launcher_settings.png
+++ b/packages/SettingsProvider/res/mipmap-xxhdpi/ic_launcher_settings.png
Binary files differ
diff --git a/packages/SettingsProvider/res/mipmap-xxxhdpi/ic_launcher_settings.png b/packages/SettingsProvider/res/mipmap-xxxhdpi/ic_launcher_settings.png
index 6b92795..72946b7 100644
--- a/packages/SettingsProvider/res/mipmap-xxxhdpi/ic_launcher_settings.png
+++ b/packages/SettingsProvider/res/mipmap-xxxhdpi/ic_launcher_settings.png
Binary files differ
diff --git a/packages/SettingsProvider/res/values/customize.xml b/packages/SettingsProvider/res/values/customize.xml
new file mode 100644
index 0000000..b5e6648
--- /dev/null
+++ b/packages/SettingsProvider/res/values/customize.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2014, The Linux Foundation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<resources>
+
+ <!-- Time format,default vlaue is 24 : 24 format,other value is 12 format -->
+ <string name="def_time_format" translatable="false">24</string>
+
+ <!-- Date format,yyyy-MM-dd: 2013/07/30; MM-dd-yyyy:07/30/2013; dd-MM-yyyy:30/07/2013 -->
+ <string name="def_date_format" translatable="false">MM-dd-yyyy</string>
+
+ <!--
+ Default Input Method, its value is from inputmethod's package name and main class name
+ such as "com.android.inputmethod.pinyin/.PinyinIME"
+ -->
+ <string name="def_input_method" translatable="false"></string>
+
+ <!-- Default for Settings.Global.DATA_ROAMING -->
+ <bool name="def_enable_data_roaming">false</bool>
+
+ <!-- Default for Settings.Global.MOBILE_DATA -->
+ <bool name="def_enable_mobile_data">true</bool>
+
+ <!--
+ Default Enable InputMethods, its value is from inputmethod's package name and main class name
+ such as "com.android.inputmethod.pinyin/.PinyinIME" ;This is a string
+ containing the IDs of all enabled input methods, each ID separated by ':'.
+ -->
+ <string name="def_enable_input_methods" translatable="false"></string>
+
+ <!-- enable accessiblity or not,1:enable;0:disable -->
+ <integer name="def_enable_accessiblity" translatable="false">0</integer>
+
+ <!-- for enable accessiblity services,split by ":" ,example "com.google.android.marvin.talkback/com.google.android.marvin.talkback.TalkBackService" -->
+ <string name="def_enable_accessiblity_services" translatable="false"></string>
+
+</resources>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index 7b69b5f..c70c8e3 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -80,12 +80,17 @@ class DatabaseHelper extends SQLiteOpenHelper {
private static final String TAG = "SettingsProvider";
private static final String DATABASE_NAME = "settings.db";
+ private static final int TYPE_NONE = -1;
+
// Please, please please. If you update the database version, check to make sure the
// database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
// is properly propagated through your change. Not doing so will result in a loss of user
// settings.
private static final int DATABASE_VERSION = 125;
+ //Maximum number of phones
+ private static final int MAX_PHONE_COUNT = 3;
+
private Context mContext;
private int mUserHandle;
@@ -2584,6 +2589,13 @@ class DatabaseHelper extends SQLiteOpenHelper {
*
* See: SettingsProvider.UpgradeController#onUpgradeLocked
*/
+
+ //LEGACY CAF CHANGES
+ loadStringSetting(stmt, Settings.System.TIME_12_24,
+ R.string.def_time_format);
+
+ loadStringSetting(stmt, Settings.System.DATE_FORMAT,
+ R.string.def_date_format);
} finally {
if (stmt != null) stmt.close();
}
@@ -2635,7 +2647,7 @@ class DatabaseHelper extends SQLiteOpenHelper {
// Allow mock locations default, based on build
loadSetting(stmt, Settings.Secure.ALLOW_MOCK_LOCATION,
- "1".equals(SystemProperties.get("ro.allow.mock.location")) ? 1 : 0);
+ "1".equals(SystemProperties.get("persist.env.c.allow.enable")) ? 1 : 0);
loadSecure35Settings(stmt);
@@ -2725,6 +2737,24 @@ class DatabaseHelper extends SQLiteOpenHelper {
*
* See: SettingsProvider.UpgradeController#onUpgradeLocked
*/
+
+ //LEGACY CAF CHANGES
+ if (!TextUtils.isEmpty(mContext.getResources().getString(R.string.def_input_method))) {
+ loadStringSetting(stmt, Settings.Secure.DEFAULT_INPUT_METHOD,
+ R.string.def_input_method);
+ }
+
+ if (!TextUtils.isEmpty(mContext.getResources().getString(
+ R.string.def_enable_input_methods))) {
+ loadStringSetting(stmt, Settings.Secure.ENABLED_INPUT_METHODS,
+ R.string.def_enable_input_methods);
+ }
+
+ // for accessibility enabled
+ loadStringSetting(stmt, Settings.Secure.ACCESSIBILITY_ENABLED,
+ R.integer.def_enable_accessiblity);
+ loadStringSetting(stmt, Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
+ R.string.def_enable_accessiblity_services);
} finally {
if (stmt != null) stmt.close();
}
@@ -2797,10 +2827,8 @@ class DatabaseHelper extends SQLiteOpenHelper {
RILConstants.CDMA_CELL_BROADCAST_SMS_DISABLED);
// Data roaming default, based on build
- loadSetting(stmt, Settings.Global.DATA_ROAMING,
- "true".equalsIgnoreCase(
- SystemProperties.get("ro.com.android.dataroaming",
- "false")) ? 1 : 0);
+ loadBooleanSetting(stmt, Settings.Global.DATA_ROAMING,
+ R.bool.def_enable_data_roaming);
loadBooleanSetting(stmt, Settings.Global.DEVICE_PROVISIONED,
R.bool.def_device_provisioned);
@@ -2820,10 +2848,20 @@ class DatabaseHelper extends SQLiteOpenHelper {
}
// Mobile Data default, based on build
- loadSetting(stmt, Settings.Global.MOBILE_DATA,
- "true".equalsIgnoreCase(
- SystemProperties.get("ro.com.android.mobiledata",
- "true")) ? 1 : 0);
+ loadBooleanSetting(stmt, Settings.Global.MOBILE_DATA,
+ R.bool.def_enable_mobile_data);
+
+ int phoneCount = TelephonyManager.getDefault().getPhoneCount();
+ // SUB specific flags for Multisim devices
+ for (int phoneId = 0; phoneId < MAX_PHONE_COUNT; phoneId++) {
+ // Mobile Data default, based on build
+ loadBooleanSetting(stmt, Settings.Global.MOBILE_DATA + phoneId,
+ R.bool.def_enable_mobile_data);
+
+ // Data roaming default, based on build
+ loadBooleanSetting(stmt, Settings.Global.DATA_ROAMING + phoneId,
+ R.bool.def_enable_data_roaming);
+ }
loadBooleanSetting(stmt, Settings.Global.NETSTATS_ENABLED,
R.bool.def_netstats_enabled);
@@ -2859,6 +2897,8 @@ class DatabaseHelper extends SQLiteOpenHelper {
R.string.def_car_undock_sound);
loadStringSetting(stmt, Settings.Global.WIRELESS_CHARGING_STARTED_SOUND,
R.string.def_wireless_charging_started_sound);
+ loadIntegerSetting(stmt, Settings.Global.DOCK_AUDIO_MEDIA_ENABLED,
+ R.integer.def_dock_audio_media_enabled);
loadIntegerSetting(stmt, Settings.Global.DOCK_AUDIO_MEDIA_ENABLED,
R.integer.def_dock_audio_media_enabled);
@@ -2875,7 +2915,6 @@ class DatabaseHelper extends SQLiteOpenHelper {
// Set the preferred network mode to target desired value or Default
// value defined in RILConstants
- int phoneCount = TelephonyManager.getDefault().getPhoneCount();
final String defVal = SystemProperties.get("ro.telephony.default_network", "");
final String[] defNetworkSettings = defVal.split(",");
final String[] networkSettings = new String[phoneCount];
diff --git a/packages/SystemUI/AndroidManifest_cm.xml b/packages/SystemUI/AndroidManifest_cm.xml
index d3837b6..0a71215 100644
--- a/packages/SystemUI/AndroidManifest_cm.xml
+++ b/packages/SystemUI/AndroidManifest_cm.xml
@@ -62,5 +62,13 @@
android:process=":tuner"
android:exported="true"
android:permission="android.permission.STATUS_BAR" />
+
+ <activity android:name=".tuner.TunerActivity$StatusBarIconActivity"
+ android:icon="@drawable/tuner"
+ android:theme="@android:style/Theme.Material.Settings"
+ android:label="@string/status_bar"
+ android:process=":tuner"
+ android:exported="true"
+ android:permission="android.permission.STATUS_BAR" />
</application>
</manifest>
diff --git a/packages/SystemUI/res/drawable/ic_qs_tile_category_other.xml b/packages/SystemUI/res/drawable/ic_qs_tile_category_other.xml
new file mode 100644
index 0000000..f3f9dca
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_qs_tile_category_other.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The CyangenMod 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:height="24dp" android:width="24dp"
+ android:viewportHeight="24.0" android:viewportWidth="24.0">
+ <path android:fillColor="#FFFFFFFF"
+ android:pathData="M12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zm7,-7H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.11,0 2,-0.9 2,-2V5c0,-1.1 -0.89,-2 -2,-2zm-1.75,9c0,0.23 -0.02,0.46 -0.05,0.68l1.48,1.16c0.13,0.11 0.17,0.3 0.08,0.45l-1.4,2.42c-0.09,0.15 -0.27,0.21 -0.43,0.15l-1.74,-0.7c-0.36,0.28 -0.76,0.51 -1.18,0.69l-0.26,1.85c-0.03,0.17 -0.18,0.3 -0.35,0.3h-2.8c-0.17,0 -0.32,-0.13 -0.35,-0.29l-0.26,-1.85c-0.43,-0.18 -0.82,-0.41 -1.18,-0.69l-1.74,0.7c-0.16,0.06 -0.34,0 -0.43,-0.15l-1.4,-2.42c-0.09,-0.15 -0.05,-0.34 0.08,-0.45l1.48,-1.16c-0.03,-0.23 -0.05,-0.46 -0.05,-0.69 0,-0.23 0.02,-0.46 0.05,-0.68l-1.48,-1.16c-0.13,-0.11 -0.17,-0.3 -0.08,-0.45l1.4,-2.42c0.09,-0.15 0.27,-0.21 0.43,-0.15l1.74,0.7c0.36,-0.28 0.76,-0.51 1.18,-0.69l0.26,-1.85c0.03,-0.17 0.18,-0.3 0.35,-0.3h2.8c0.17,0 0.32,0.13 0.35,0.29l0.26,1.85c0.43,0.18 0.82,0.41 1.18,0.69l1.74,-0.7c0.16,-0.06 0.34,0 0.43,0.15l1.4,2.42c0.09,0.15 0.05,0.34 -0.08,0.45l-1.48,1.16c0.03,0.23 0.05,0.46 0.05,0.69z"/>
+</vector>
+
diff --git a/packages/SystemUI/res/drawable/ic_qs_tile_category_system.xml b/packages/SystemUI/res/drawable/ic_qs_tile_category_system.xml
new file mode 100644
index 0000000..a54bec7
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_qs_tile_category_system.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The CyangenMod 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:height="18dp"
+ android:width="18dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ >
+ <path android:fillColor="#FFFFFFFF"
+ android:pathData="M12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zm7,-7H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.11,0 2,-0.9 2,-2V5c0,-1.1 -0.89,-2 -2,-2zm-1.75,9c0,0.23 -0.02,0.46 -0.05,0.68l1.48,1.16c0.13,0.11 0.17,0.3 0.08,0.45l-1.4,2.42c-0.09,0.15 -0.27,0.21 -0.43,0.15l-1.74,-0.7c-0.36,0.28 -0.76,0.51 -1.18,0.69l-0.26,1.85c-0.03,0.17 -0.18,0.3 -0.35,0.3h-2.8c-0.17,0 -0.32,-0.13 -0.35,-0.29l-0.26,-1.85c-0.43,-0.18 -0.82,-0.41 -1.18,-0.69l-1.74,0.7c-0.16,0.06 -0.34,0 -0.43,-0.15l-1.4,-2.42c-0.09,-0.15 -0.05,-0.34 0.08,-0.45l1.48,-1.16c-0.03,-0.23 -0.05,-0.46 -0.05,-0.69 0,-0.23 0.02,-0.46 0.05,-0.68l-1.48,-1.16c-0.13,-0.11 -0.17,-0.3 -0.08,-0.45l1.4,-2.42c0.09,-0.15 0.27,-0.21 0.43,-0.15l1.74,0.7c0.36,-0.28 0.76,-0.51 1.18,-0.69l0.26,-1.85c0.03,-0.17 0.18,-0.3 0.35,-0.3h2.8c0.17,0 0.32,0.13 0.35,0.29l0.26,1.85c0.43,0.18 0.82,0.41 1.18,0.69l1.74,-0.7c0.16,-0.06 0.34,0 0.43,0.15l1.4,2.42c0.09,0.15 0.05,0.34 -0.08,0.45l-1.48,1.16c0.03,0.23 0.05,0.46 0.05,0.69z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_tile_contract.xml b/packages/SystemUI/res/drawable/ic_qs_tile_contract.xml
new file mode 100644
index 0000000..e98f57c
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_qs_tile_contract.xml
@@ -0,0 +1,24 @@
+<!--
+Copyright (C) 2015 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="18.0dp"
+ android:height="18.0dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M12.000000,8.000000l-6.000000,6.000000 1.400000,1.400000 4.600000,-4.599999 4.600000,4.599999 1.400000,-1.400000z"
+ android:fillColor="#FFFFFFFF"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_tile_expand.xml b/packages/SystemUI/res/drawable/ic_qs_tile_expand.xml
new file mode 100644
index 0000000..a429456
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_qs_tile_expand.xml
@@ -0,0 +1,24 @@
+<!--
+Copyright (C) 2015 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="18.0dp"
+ android:height="18.0dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M16.600000,8.600000l-4.600000,4.599999 -4.600000,-4.599999 -1.400000,1.400000 6.000000,6.000000 6.000000,-6.000000z"
+ android:fillColor="#FFFFFFFF"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_roaming.xml b/packages/SystemUI/res/drawable/stat_sys_data_roaming.xml
new file mode 100644
index 0000000..17c4b04
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_data_roaming.xml
@@ -0,0 +1,22 @@
+<!--
+Copyright (C) 2014 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="4.25dp"
+ android:height="17dp"
+ android:viewportWidth="6.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M 2.8,18.8 l -1,0 0,3.1 -1.6,0 0,-8.5 2.7,0 c 0.9,0 1.5,0.2 2,0.7 0.5,0.5 0.7,1.1 0.7,1.9 0,0.6 -0.1,1.1 -0.3,1.5 -0.2,0.4 -0.5,0.6 -0.9,0.8 l 1.5,3.5 0,0.1 -1.8,0 -1.3,-3.1 z m -1,-1.4 1.1,0 C 3.3,17.4 3.5,17.3 3.7,17 3.9,16.7 4,16.5 4,16.1 4,15.7 3.9,15.3 3.7,15.1 3.5,14.9 3.3,14.7 2.9,14.7 l -1.1,0 0,2.7 z" />
+
+</vector> \ No newline at end of file
diff --git a/packages/SystemUI/res/layout/mobile_signal_group.xml b/packages/SystemUI/res/layout/mobile_signal_group.xml
index 6ae5cf3..0756e0a 100644
--- a/packages/SystemUI/res/layout/mobile_signal_group.xml
+++ b/packages/SystemUI/res/layout/mobile_signal_group.xml
@@ -24,24 +24,37 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
- <com.android.systemui.statusbar.AnimatedImageView
- android:theme="@style/DualToneLightTheme"
- android:id="@+id/mobile_signal"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- systemui:hasOverlappingRendering="false"
- />
- <com.android.systemui.statusbar.AnimatedImageView
- android:theme="@style/DualToneDarkTheme"
- android:id="@+id/mobile_signal_dark"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:alpha="0.0"
- systemui:hasOverlappingRendering="false"
- />
+ <FrameLayout
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ >
+ <com.android.systemui.statusbar.AnimatedImageView
+ android:theme="@style/DualToneLightTheme"
+ android:id="@+id/mobile_signal"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ systemui:hasOverlappingRendering="false"
+ />
+ <com.android.systemui.statusbar.AnimatedImageView
+ android:theme="@style/DualToneDarkTheme"
+ android:id="@+id/mobile_signal_dark"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:alpha="0.0"
+ systemui:hasOverlappingRendering="false"
+ />
+ <ImageView
+ android:id="@+id/mobile_type"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ />
+ </FrameLayout>
+
<ImageView
- android:id="@+id/mobile_type"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- />
+ android:id="@+id/mobile_roaming"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:visibility="gone"
+ android:src="@drawable/stat_sys_data_roaming"
+ />
</FrameLayout>
diff --git a/packages/SystemUI/res/layout/qs_tile_category_row.xml b/packages/SystemUI/res/layout/qs_tile_category_row.xml
new file mode 100644
index 0000000..1736221
--- /dev/null
+++ b/packages/SystemUI/res/layout/qs_tile_category_row.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="@dimen/qs_detail_item_height"
+ android:background="@drawable/btn_borderless_rect"
+ android:gravity="center_vertical"
+ android:orientation="horizontal" >
+
+ <ImageView
+ android:id="@android:id/icon"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" />
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="12dp"
+ android:layout_weight="1"
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@android:id/title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textStyle="bold"
+ android:ellipsize="end"
+ android:textAppearance="@style/TextAppearance.QS.DetailItemPrimary" />
+ </LinearLayout>
+
+ <ImageView
+ android:id="@android:id/icon2"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_marginStart="12dp"
+ android:layout_marginEnd="12dp" />
+
+</LinearLayout>
diff --git a/packages/SystemUI/res/layout/qs_tile_child_row.xml b/packages/SystemUI/res/layout/qs_tile_child_row.xml
new file mode 100644
index 0000000..bb30729
--- /dev/null
+++ b/packages/SystemUI/res/layout/qs_tile_child_row.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="@dimen/qs_detail_item_height"
+ android:background="@drawable/btn_borderless_rect"
+ android:gravity="center_vertical"
+ android:orientation="horizontal" >
+
+ <ImageView
+ android:id="@android:id/icon"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:layout_marginStart="72dp"
+ android:layout_marginEnd="12dp" />
+
+ <TextView
+ android:id="@android:id/title"
+ android:layout_weight="1"
+ android:layout_marginStart="12dp"
+ android:layout_width="0dp"
+ android:gravity="center_vertical"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:textAppearance="@style/TextAppearance.QS.DetailItemPrimary" />
+
+</LinearLayout>
diff --git a/packages/SystemUI/res/layout/super_status_bar.xml b/packages/SystemUI/res/layout/super_status_bar.xml
index 896efde..c6178a0 100644
--- a/packages/SystemUI/res/layout/super_status_bar.xml
+++ b/packages/SystemUI/res/layout/super_status_bar.xml
@@ -18,13 +18,13 @@
-->
<!-- This is the combined status bar / notification panel window. -->
-<FrameLayout
+<com.android.systemui.statusbar.phone.NavBarInsetLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:sysui="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
- android:fitsSystemWindows="false"
+ android:fitsSystemWindows="true"
android:descendantFocusability="afterDescendants">
<com.android.systemui.statusbar.BackDropView
@@ -45,29 +45,34 @@
android:visibility="invisible" />
</com.android.systemui.statusbar.BackDropView>
- <FrameLayout android:id="@+id/scrimview"
+ <com.android.systemui.statusbar.phone.NavBarInsetLayout
+ android:id="@+id/scrimview"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:visibility="visible">
+ android:visibility="visible"
+ sysui:ignoreRightInset="true"
+ android:fitsSystemWindows="true">
<com.android.systemui.statusbar.ScrimView
android:id="@+id/scrim_behind"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ sysui:ignoreRightInset="true"
android:importantForAccessibility="no"/>
<com.android.systemui.statusbar.AlphaOptimizedView
- android:id="@+id/heads_up_scrim"
- android:layout_width="match_parent"
- android:layout_height="@dimen/heads_up_scrim_height"
- android:background="@drawable/heads_up_scrim"
- android:importantForAccessibility="no"/>
+ android:id="@+id/heads_up_scrim"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/heads_up_scrim_height"
+ android:background="@drawable/heads_up_scrim"
+ android:importantForAccessibility="no"/>
<com.android.systemui.statusbar.VisualizerView
android:id="@+id/visualizerview"
android:gravity="bottom"
android:layout_gravity="bottom"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ sysui:ignoreRightInset="true"
android:visibility="visible"/>
- </FrameLayout>
+ </com.android.systemui.statusbar.phone.NavBarInsetLayout>
<include layout="@layout/status_bar"
android:layout_width="match_parent"
@@ -109,4 +114,4 @@
sysui:ignoreRightInset="true"
/>
-</FrameLayout>
+</com.android.systemui.statusbar.phone.NavBarInsetLayout>
diff --git a/packages/SystemUI/res/values-ar/cm_arrays.xml b/packages/SystemUI/res/values-ar/cm_arrays.xml
new file mode 100644
index 0000000..cf5825b
--- /dev/null
+++ b/packages/SystemUI/res/values-ar/cm_arrays.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (C) 2012-2014 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="cardinal_directions">
+ <item>N</item>
+ <item>NE</item>
+ <item>E</item>
+ <item>SE</item>
+ <item>S</item>
+ <item>SW</item>
+ <item>W</item>
+ <item>NW</item>
+ </string-array>
+</resources>
diff --git a/packages/SystemUI/res/values-ar/cm_strings.xml b/packages/SystemUI/res/values-ar/cm_strings.xml
index e49da26..530e651 100644
--- a/packages/SystemUI/res/values-ar/cm_strings.xml
+++ b/packages/SystemUI/res/values-ar/cm_strings.xml
@@ -22,9 +22,25 @@
<string name="select_application">حدد التطبيق</string>
<string name="lockscreen_choose_action_title">اختر إجراء</string>
<string name="lockscreen_none_target">لا شيء</string>
+ <string name="navbar_dialog_title">اختر الإجراء لتخصيصه</string>
+ <string name="navbar_home_button">زر الرئيسية</string>
+ <string name="navbar_recent_button">زر الأشياء الأخيرة</string>
+ <string name="navbar_search_button">زر البحث</string>
+ <string name="navbar_back_button">زر العودة</string>
<string name="navbar_empty_button">زر خالٍ</string>
+ <string name="navbar_menu_conditional_button">زر القائمة (الإخفاء التلقائي)</string>
+ <string name="navbar_menu_always_button">زر القائمة (يظهر دائماً)</string>
+ <string name="navbar_menu_big_button">زر القائمة</string>
+ <string name="accessibility_dpad_left">المؤشر إلى اليسار</string>
+ <string name="accessibility_dpad_right">المؤشر الى اليمين</string>
+ <string name="advanced_dev_option_wipe_app">مسح بيانات التطبيق</string>
+ <string name="advanced_dev_option_force_stop">إيقاف إجباري</string>
+ <string name="advanced_dev_option_uninstall">إلغاء التثبيت</string>
+ <string name="accessibility_quick_settings_profiles_off">إيقاف ملفات التعريف.</string>
+ <string name="accessibility_quick_settings_profiles">ملف التعريف: <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="accessibility_quick_settings_profiles_changed_off">تعطيل ملفات التعريف. </string>
<string name="accessibility_quick_settings_profiles_changed">تم تغيير ملف التعريف إلى <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
+ <string name="quick_settings_compass_init">تهيئة\u2026</string>
<string name="screen_pinning_description_no_navbar">ستظل ظاهرة حتى يمكنك إزالتها. المس مع الاستمرار زر العودة لإزالتها.</string>
<string name="quick_settings_custom_tile_detail_title">مربع مخصص</string>
<string name="quick_settings_remove">إزالة المربع</string>
@@ -38,6 +54,7 @@
<string name="accessibility_quick_settings_sync_changed_off">تم تعطيل المزامنة.</string>
<string name="accessibility_quick_settings_sync_changed_on">تم تشغيل المزامنة.</string>
<string name="quick_settings_sync_label">المزامنة</string>
+ <string name="quick_settings_volume_panel_label">لوحة مستوى الصوت</string>
<string name="quick_settings_usb_tether_label">الربط عبر USB
</string>
<string name="quick_settings_screen_timeout_detail_title">مهلة الشاشة</string>
@@ -46,10 +63,18 @@
<string name="quick_settings_lockscreen_label_enforced">إعمال قفل الشاشة</string>
<string name="accessibility_quick_settings_screen_timeout">مهلة الشاشة: <xliff:g id="timeout" example="30 seconds">%s</xliff:g>.</string>
<string name="accessibility_quick_settings_screen_timeout_changed">تم تغيير مهلة الشاشة إلى: <xliff:g id="timeout" example="30 seconds">%s</xliff:g>.</string>
+ <string name="qs_tile_performance">وضع البطارية</string>
<string name="accessibility_quick_settings_perf_profile_pwrsv">وضع البطارية: وضع توفير الطاقة.</string>
<string name="accessibility_quick_settings_perf_profile_bal">وضع البطارية: وضع متوازن.</string>
<string name="accessibility_quick_settings_perf_profile_perf">وضع البطارية: وضع الأداء.</string>
+ <string name="accessibility_quick_settings_perf_profile_bias_power">وضع البطارية: وضع الكفاءة.</string>
+ <string name="accessibility_quick_settings_perf_profile_bias_perf">وضع البطارية: الوضع السريع.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_pwrsv">تم تغيير وضع البطارية إلى وضع توفير الطاقة.</string>
<string name="accessibility_quick_settings_perf_profile_changed_bal">تم تغيير وضع البطارية إلى الوضع المتوازن.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_perf">تم تغيير وضع البطارية إلى وضع الأداء.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_bias_power">تم تغيير وضع البطارية الى وضع الكفاءة.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_bias_perf">تم تغيير وضع البطارية الى الوضع السريع.</string>
+ <string name="quick_settings_performance_profile_detail_title">وضع البطارية</string>
<string name="accessibility_quick_settings_lock_screen_off">تعطيل شاشة القفل.</string>
<string name="accessibility_quick_settings_lock_screen_on">تشغيل شاشة القفل.</string>
<string name="accessibility_quick_settings_lock_screen_changed_off">تم تعطيل شاشة القفل.</string>
diff --git a/packages/SystemUI/res/values-de/cm_strings.xml b/packages/SystemUI/res/values-de/cm_strings.xml
index 4baa329..b3fc26f 100644
--- a/packages/SystemUI/res/values-de/cm_strings.xml
+++ b/packages/SystemUI/res/values-de/cm_strings.xml
@@ -46,6 +46,9 @@
<string name="accessibility_quick_settings_profiles_changed_off">Profile ausgeschaltet.</string>
<string name="accessibility_quick_settings_profiles_changed">Profil auf <xliff:g id="profile" example="Default">%s</xliff:g> geändert.</string>
<string name="quick_settings_compass_init">Initialisiere\u2026</string>
+ <string name="led_notification_title">LED-Einstellungen</string>
+ <string name="led_notification_text">Benachrichtigungslicht durch Einstellungen aktiviert</string>
+ <string name="qs_tile_edit_header_instruction">Drücken und halten Sie die Kacheln, um sie neu anzuordnen</string>
<string name="quick_settings_edit_label">Kacheln bearbeiten</string>
<string name="quick_settings_cannot_delete_edit_tile">\"Kacheln bearbeiten\" kann nicht gelöscht werden</string>
<string name="qs_tiles_reset_confirmation">Kacheln der Schnelleinstellungen auf Standardkonfiguration zurücksetzen?</string>
@@ -120,4 +123,6 @@
<string name="accessibility_quick_settings_location_changed_battery_saving">Standortmodus auf \"Energiesparmodus\" geändert.</string>
<string name="accessibility_quick_settings_location_changed_gps_only">Standortmodus auf \"Nur Gerät\" geändert.</string>
<string name="accessibility_quick_settings_location_changed_high_accuracy">Standortmodus auf \"Hohe Genauigkeit\" geändert.</string>
+ <string name="quick_settings_tiles_category_system">System-Kacheln</string>
+ <string name="quick_settings_tiles_add_tiles">Kachel hinzufügen</string>
</resources>
diff --git a/packages/SystemUI/res/values-el/cm_strings.xml b/packages/SystemUI/res/values-el/cm_strings.xml
index b56a8c4..e8be8ff 100644
--- a/packages/SystemUI/res/values-el/cm_strings.xml
+++ b/packages/SystemUI/res/values-el/cm_strings.xml
@@ -123,4 +123,6 @@
<string name="accessibility_quick_settings_location_changed_battery_saving">Η αναφορά τοποθεσίας άλλαξε σε λειτουργία εξοικονόμησης μπαταρίας.</string>
<string name="accessibility_quick_settings_location_changed_gps_only">Η αναφορά τοποθεσίας άλλαξε σε λειτουργία μόνο αισθητήρων.</string>
<string name="accessibility_quick_settings_location_changed_high_accuracy">Η αναφορά τοποθεσίας άλλαξε σε λειτουργία υψηλής ακρίβειας.</string>
+ <string name="quick_settings_tiles_category_system">Πλακίδια συστήματος</string>
+ <string name="quick_settings_tiles_add_tiles">Προσθήκη πλακιδίου</string>
</resources>
diff --git a/packages/SystemUI/res/values-en-rIN/cm_strings.xml b/packages/SystemUI/res/values-en-rIN/cm_strings.xml
index ff390ea..c4daae3 100644
--- a/packages/SystemUI/res/values-en-rIN/cm_strings.xml
+++ b/packages/SystemUI/res/values-en-rIN/cm_strings.xml
@@ -16,9 +16,13 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="accessibility_data_connection_hspap">HSPA+</string>
+ <string name="accessibility_data_connection_4g_plus">4G+</string>
<string name="status_bar_expanded_header_weather_format"><xliff:g id="temp">%1$s</xliff:g> - <xliff:g id="condition">%2$s</xliff:g></string>
<string name="left_shortcut_hint">Swipe right for %1$s</string>
<string name="right_shortcut_hint">Swipe left for %1$s</string>
+ <string name="lockscreen_message">Tap an icon on the left or right to reassign a lock screen shortcut.</string>
+ <string name="lockscreen_default_target">Default</string>
<string name="select_application">Select application</string>
<string name="lockscreen_choose_action_title">Choose action</string>
<string name="lockscreen_none_target">None</string>
@@ -36,15 +40,79 @@
<string name="advanced_dev_option_wipe_app">Wipe app data</string>
<string name="advanced_dev_option_force_stop">Force stop</string>
<string name="advanced_dev_option_uninstall">Uninstall</string>
+ <string name="accessibility_notification_brightness">Light brightness</string>
+ <string name="accessibility_quick_settings_profiles_off">Profiles off.</string>
+ <string name="accessibility_quick_settings_profiles">Profile: <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
+ <string name="accessibility_quick_settings_profiles_changed_off">Profiles turned off.</string>
+ <string name="accessibility_quick_settings_profiles_changed">Profile changed to <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="quick_settings_compass_init">Initializing\u2026</string>
+ <string name="led_notification_title">Light settings</string>
+ <string name="led_notification_text">LED light enabled by settings</string>
+ <string name="qs_tile_edit_header_instruction">Press and hold tiles to rearrange</string>
+ <string name="quick_settings_edit_label">Edit tiles</string>
+ <string name="quick_settings_cannot_delete_edit_tile">Cannot delete the Edit tile</string>
+ <string name="qs_tiles_reset_confirmation">Reset quick settings tiles to default configuration?</string>
+ <string name="quick_settings_tile_reset_to_default">Reset to default layout</string>
+ <string name="quick_settings_title_header">Header</string>
+ <string name="quick_settings_title_tiles">Tiles</string>
+ <string name="quick_settings_title_show_weather">Show weather</string>
+ <string name="quick_settings_title_enlarge_first_row">Enlarge first row</string>
+ <string name="screen_pinning_description_no_navbar">This keeps it in view until you unpin. Touch and hold the Back button to unpin.</string>
+ <string name="quick_settings_custom_tile_detail_title">Custom tile</string>
+ <string name="quick_settings_remove">Remove tile</string>
<string name="quick_settings_network_adb_label">ADB over network</string>
<string name="quick_settings_compass_label">Compass</string>
<string name="quick_settings_nfc_label">NFC</string>
<string name="quick_settings_profiles">System profiles</string>
<string name="quick_settings_profiles_off">Profiles disabled</string>
+ <string name="accessibility_quick_settings_sync_off">Sync off.</string>
+ <string name="accessibility_quick_settings_sync_on">Sync on.</string>
+ <string name="accessibility_quick_settings_sync_changed_off">Sync turned off.</string>
+ <string name="accessibility_quick_settings_sync_changed_on">Sync turned on.</string>
+ <string name="quick_settings_sync_label">Sync</string>
+ <string name="quick_settings_volume_panel_label">Volume panel</string>
+ <string name="quick_settings_usb_tether_label">USB tethering</string>
<string name="quick_settings_screen_timeout_detail_title">Screen timeout</string>
<string name="quick_settings_lockscreen_label">Lock screen</string>
+ <string name="quick_settings_ambient_display_label">Ambient display</string>
<string name="quick_settings_lockscreen_label_enforced">Lock screen enforced</string>
+ <string name="accessibility_quick_settings_screen_timeout">Screen timeout: <xliff:g id="timeout" example="30 seconds">%s</xliff:g>.</string>
+ <string name="accessibility_quick_settings_screen_timeout_changed">Screen timeout changed to <xliff:g id="timeout" example="30 seconds">%s</xliff:g>.</string>
+ <string name="qs_tile_performance">Battery mode</string>
+ <string name="accessibility_quick_settings_perf_profile_pwrsv">Battery mode: power save mode.</string>
+ <string name="accessibility_quick_settings_perf_profile_bal">Battery mode: balanced mode.</string>
+ <string name="accessibility_quick_settings_perf_profile_perf">Battery mode: performance mode.</string>
+ <string name="accessibility_quick_settings_perf_profile_bias_power">Battery mode: efficiency mode.</string>
+ <string name="accessibility_quick_settings_perf_profile_bias_perf">Battery mode: quick mode.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_pwrsv">Battery mode changed to power save mode.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_bal">Battery mode changed to balanced mode.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_perf">Battery mode changed to performance mode.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_bias_power">Battery mode changed to efficiency mode.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_bias_perf">Battery mode changed to quick mode.</string>
+ <string name="quick_settings_performance_profile_detail_title">Battery mode</string>
+ <string name="accessibility_quick_settings_lock_screen_off">Lock screen off.</string>
+ <string name="accessibility_quick_settings_lock_screen_on">Lock screen on.</string>
+ <string name="accessibility_quick_settings_lock_screen_changed_off">Lock screen turned off.</string>
+ <string name="accessibility_quick_settings_lock_screen_changed_on">Lock screen turned on.</string>
+ <string name="accessibility_quick_settings_ambient_display_off">Ambient display off.</string>
+ <string name="accessibility_quick_settings_ambient_display_on">Ambient display on.</string>
+ <string name="accessibility_quick_settings_ambient_display_changed_off">Ambient display turned off.</string>
+ <string name="accessibility_quick_settings_ambient_display_changed_on">Ambient display turned on.</string>
+ <string name="quick_settings_dynamic_tile_detail_title">Dynamic tile</string>
+ <string name="dynamic_qs_tile_next_alarm_label">Next alarm</string>
+ <string name="dynamic_qs_tile_ime_selector_label">IME selector</string>
+ <string name="dynamic_qs_tile_su_label">Root access</string>
+ <string name="accessibility_quick_settings_live_display_off">LiveDisplay off.</string>
+ <string name="accessibility_quick_settings_live_display_auto">LiveDisplay: auto mode.</string>
+ <string name="accessibility_quick_settings_live_display_day">LiveDisplay: day mode.</string>
+ <string name="accessibility_quick_settings_live_display_night">LiveDisplay: night mode.</string>
+ <string name="accessibility_quick_settings_live_display_outdoor">LiveDisplay: outdoor mode.</string>
+ <string name="accessibility_quick_settings_live_display_changed_off">LiveDisplay turned off.</string>
+ <string name="accessibility_quick_settings_live_display_changed_auto">LiveDisplay changed to auto mode.</string>
+ <string name="accessibility_quick_settings_live_display_changed_day">LiveDisplay changed to day mode.</string>
+ <string name="accessibility_quick_settings_live_display_changed_night">LiveDisplay changed to night mode.</string>
+ <string name="accessibility_quick_settings_live_display_changed_outdoor">LiveDisplay changed to outdoor mode.</string>
+ <string name="quick_settings_title_advanced_location">Tri-state location</string>
<string name="accessibility_quick_settings_location_battery_saving">Location reporting: battery saving mode.</string>
<string name="accessibility_quick_settings_location_gps_only">Location reporting: sensors only mode.</string>
<string name="accessibility_quick_settings_location_high_accuracy">Location reporting: high accuracy mode.</string>
@@ -52,4 +120,7 @@
<string name="quick_settings_location_battery_saving_label">Battery saving</string>
<string name="quick_settings_location_gps_only_label">Device only</string>
<string name="quick_settings_location_high_accuracy_label">High accuracy</string>
+ <string name="accessibility_quick_settings_location_changed_battery_saving">Location reporting changed to battery saving mode.</string>
+ <string name="accessibility_quick_settings_location_changed_gps_only">Location reporting changed to sensors only mode.</string>
+ <string name="accessibility_quick_settings_location_changed_high_accuracy">Location reporting changed to high accuracy mode.</string>
</resources>
diff --git a/packages/SystemUI/res/values-es/cm_strings.xml b/packages/SystemUI/res/values-es/cm_strings.xml
index a4fc901..bc72063 100644
--- a/packages/SystemUI/res/values-es/cm_strings.xml
+++ b/packages/SystemUI/res/values-es/cm_strings.xml
@@ -18,24 +18,66 @@
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="accessibility_data_connection_hspap">HSPA+</string>
<string name="accessibility_data_connection_4g_plus">4G+</string>
+ <string name="status_bar_expanded_header_weather_format"><xliff:g id="temp">%1$s</xliff:g> - <xliff:g id="condition">%2$s</xliff:g></string>
+ <string name="left_shortcut_hint">Desliza a la derecha para %1$s</string>
+ <string name="right_shortcut_hint">Desliza a la izquierda para %1$s</string>
<string name="lockscreen_message">Toca un icono a la izquierda o derecha para volver a asignar un atajo a la pantalla de bloqueo.</string>
<string name="lockscreen_default_target">Por defecto</string>
+ <string name="select_application">Selecciona una aplicación</string>
+ <string name="lockscreen_choose_action_title">Elegir acción</string>
+ <string name="lockscreen_none_target">Ninguno</string>
+ <string name="navbar_dialog_title">Elegir acción a asignar</string>
+ <string name="navbar_home_button">Botón Inicio</string>
+ <string name="navbar_recent_button">Botón reciente</string>
+ <string name="navbar_search_button">Botón de búsqueda</string>
+ <string name="navbar_back_button">Botón Atrás</string>
+ <string name="navbar_empty_button">Botón vacío</string>
+ <string name="navbar_menu_conditional_button">Botón de menú (auto-ocultar)</string>
+ <string name="navbar_menu_always_button">Botón de menú (siempre visible)</string>
+ <string name="navbar_menu_big_button">Botón de menú</string>
+ <string name="accessibility_dpad_left">Cursor izquierdo</string>
+ <string name="accessibility_dpad_right">Cursor derecho</string>
<string name="advanced_dev_option_wipe_app">Borrar datos de la aplicación</string>
+ <string name="advanced_dev_option_force_stop">Forzar detención</string>
<string name="advanced_dev_option_uninstall">Desinstalar</string>
<string name="accessibility_notification_brightness">Brillo ligero</string>
- <string name="accessibility_quick_settings_profiles_off">Perfiles desactivado.</string>
+ <string name="accessibility_quick_settings_profiles_off">Perfiles desactivados.</string>
+ <string name="accessibility_quick_settings_profiles">Perfil: <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="accessibility_quick_settings_profiles_changed_off">Perfiles desactivado.</string>
- <string name="led_notification_title">Configuracion de luz</string>
+ <string name="accessibility_quick_settings_profiles_changed">Perfil cambiado a <xliff:g id="profile" example="Default">%s </xliff:g>.</string>
+ <string name="quick_settings_compass_init">Inicializando\u2026</string>
+ <string name="led_notification_title">Ajustes de luz</string>
<string name="led_notification_text">Luz LED activada por ajustes</string>
+ <string name="qs_tile_edit_header_instruction">Toca y deja presionados los controles para reorganizarlos</string>
+ <string name="quick_settings_edit_label">Editar controles</string>
+ <string name="quick_settings_cannot_delete_edit_tile">No se puede eliminar el control de \"Editar\"</string>
+ <string name="qs_tiles_reset_confirmation">¿Restaurar los controles de ajustes rápidos a su configuración predeterminada?</string>
<string name="quick_settings_tile_reset_to_default">Restaurar disposición por defecto</string>
+ <string name="quick_settings_title_header">Encabezado</string>
+ <string name="quick_settings_title_tiles">Controles</string>
<string name="quick_settings_title_show_weather">Mostrar el clima</string>
<string name="quick_settings_title_enlarge_first_row">Ampliar la primera fila</string>
+ <string name="screen_pinning_description_no_navbar">Esto fija la pantalla en esta vista hasta que es liberada. Mantén pulsado el botón Atrás para liberarla.</string>
+ <string name="quick_settings_custom_tile_detail_title">Control personalizado</string>
+ <string name="quick_settings_remove">Eliminar control</string>
+ <string name="quick_settings_network_adb_label">ADB sobre red</string>
+ <string name="quick_settings_compass_label">Brújula</string>
+ <string name="quick_settings_nfc_label">NFC</string>
+ <string name="quick_settings_profiles">Perfiles del sistema</string>
+ <string name="quick_settings_profiles_off">Perfiles desactivados</string>
<string name="accessibility_quick_settings_sync_off">Sincronización desactivada.</string>
<string name="accessibility_quick_settings_sync_on">Sincronización activada.</string>
<string name="accessibility_quick_settings_sync_changed_off">Sincronización desactivada.</string>
<string name="accessibility_quick_settings_sync_changed_on">Sincronización activada.</string>
<string name="quick_settings_sync_label">Sincronizar</string>
+ <string name="quick_settings_volume_panel_label">Panel de volumen</string>
+ <string name="quick_settings_usb_tether_label">Anclaje de red por USB</string>
+ <string name="quick_settings_screen_timeout_detail_title">Tiempo de espera de pantalla</string>
+ <string name="quick_settings_lockscreen_label">Pantalla de bloqueo</string>
<string name="quick_settings_ambient_display_label">Pantalla ambiente</string>
+ <string name="quick_settings_lockscreen_label_enforced">Pantalla de bloqueo forzada</string>
+ <string name="accessibility_quick_settings_screen_timeout">Tiempo de espera de pantalla: <xliff:g id="timeout" example="30 seconds">%s</xliff:g>.</string>
+ <string name="accessibility_quick_settings_screen_timeout_changed">Tiempo de espera de pantalla cambiado a <xliff:g id="timeout" example="30 seconds">%s</xliff:g>.</string>
<string name="qs_tile_performance">Modo de la batería</string>
<string name="accessibility_quick_settings_perf_profile_pwrsv">Modo de batería: ahorro de energía.</string>
<string name="accessibility_quick_settings_perf_profile_bal">Modo de batería: equilibrado.</string>
@@ -56,6 +98,9 @@
<string name="accessibility_quick_settings_ambient_display_on">Pantalla ambiente activada.</string>
<string name="accessibility_quick_settings_ambient_display_changed_off">Pantalla ambiente desactivada.</string>
<string name="accessibility_quick_settings_ambient_display_changed_on">Pantalla ambiente activada.</string>
+ <string name="quick_settings_dynamic_tile_detail_title">Control dinámico</string>
+ <string name="dynamic_qs_tile_next_alarm_label">Próxima alarma</string>
+ <string name="dynamic_qs_tile_ime_selector_label">Selector IME</string>
<string name="dynamic_qs_tile_su_label">Acceso administrativo</string>
<string name="accessibility_quick_settings_live_display_off">LiveDisplay desactivado.</string>
<string name="accessibility_quick_settings_live_display_auto">LiveDisplay: modo automático.</string>
@@ -67,9 +112,15 @@
<string name="accessibility_quick_settings_live_display_changed_day">LiveDisplay ha cambiado a modo diurno.</string>
<string name="accessibility_quick_settings_live_display_changed_night">LiveDisplay ha cambiado a modo nocturno.</string>
<string name="accessibility_quick_settings_live_display_changed_outdoor">LiveDisplay cambiado a modo aire libre.</string>
+ <string name="quick_settings_title_advanced_location">Ubicación por triangulación</string>
<string name="accessibility_quick_settings_location_battery_saving">Informes de ubicación: modo de ahorro de batería.</string>
+ <string name="accessibility_quick_settings_location_gps_only">Informes de ubicación: modo de solo sensores.</string>
<string name="accessibility_quick_settings_location_high_accuracy">Informes de ubicación: modo de alta precisión.</string>
+ <string name="quick_settings_location_detail_title">Modo de ubicación</string>
<string name="quick_settings_location_battery_saving_label">Ahorro de batería</string>
+ <string name="quick_settings_location_gps_only_label">Solo en dispositivo</string>
+ <string name="quick_settings_location_high_accuracy_label">Alta precisión</string>
<string name="accessibility_quick_settings_location_changed_battery_saving">Informes de ubicación cambiados a modo de ahorro de batería.</string>
+ <string name="accessibility_quick_settings_location_changed_gps_only">Informes de ubicación cambiados a modo solo dispositivo.</string>
<string name="accessibility_quick_settings_location_changed_high_accuracy">Informes de ubicación cambiados a modo de gran precisión.</string>
</resources>
diff --git a/packages/SystemUI/res/values-fr/cm_strings.xml b/packages/SystemUI/res/values-fr/cm_strings.xml
index 9f32719..cda12e5 100644
--- a/packages/SystemUI/res/values-fr/cm_strings.xml
+++ b/packages/SystemUI/res/values-fr/cm_strings.xml
@@ -21,6 +21,8 @@
<string name="status_bar_expanded_header_weather_format"><xliff:g id="temp">%1$s</xliff:g> - <xliff:g id="condition">%2$s</xliff:g></string>
<string name="left_shortcut_hint">Balayer à droite pour %1$s</string>
<string name="right_shortcut_hint">Balayer à gauche pour %1$s</string>
+ <string name="lockscreen_message">Appuyez sur une icône à gauche ou à droite pour réattribuer un raccourci sur l\'écran de verrouillage.</string>
+ <string name="lockscreen_default_target">Par défaut</string>
<string name="select_application">Sélectionner une application</string>
<string name="lockscreen_choose_action_title">Choisir une action</string>
<string name="lockscreen_none_target">Aucun</string>
@@ -38,11 +40,23 @@
<string name="advanced_dev_option_wipe_app">Effacer les données</string>
<string name="advanced_dev_option_force_stop">Forcer l\'arrêt</string>
<string name="advanced_dev_option_uninstall">Désinstaller</string>
+ <string name="accessibility_notification_brightness">Luminosité</string>
<string name="accessibility_quick_settings_profiles_off">Profils désactivés.</string>
<string name="accessibility_quick_settings_profiles">Profil : <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="accessibility_quick_settings_profiles_changed_off">Profils désactivés.</string>
<string name="accessibility_quick_settings_profiles_changed">Profil changé en <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="quick_settings_compass_init">Initialisation\u2026</string>
+ <string name="led_notification_title">Paramètres de la DEL</string>
+ <string name="led_notification_text">DEL activée par les paramètres</string>
+ <string name="qs_tile_edit_header_instruction">Appuyez et maintenez les raccourcis pour les réorganiser</string>
+ <string name="quick_settings_edit_label">Modifier les raccourcis</string>
+ <string name="quick_settings_cannot_delete_edit_tile">Impossible de supprimer le raccourci modifié</string>
+ <string name="qs_tiles_reset_confirmation">Réinitialiser les raccourcis à la configuration par défaut ?</string>
+ <string name="quick_settings_tile_reset_to_default">Réinitialiser à la disposition par défaut</string>
+ <string name="quick_settings_title_header">En-tête</string>
+ <string name="quick_settings_title_tiles">Raccourcis</string>
+ <string name="quick_settings_title_show_weather">Afficher la météo</string>
+ <string name="quick_settings_title_enlarge_first_row">Agrandir la première ligne</string>
<string name="screen_pinning_description_no_navbar">Cela le laisse en vue jusqu\'à ce que vous le détachiez. Appuyez et maintenez le bouton retour pour détacher.</string>
<string name="quick_settings_custom_tile_detail_title">Personnaliser le raccourci</string>
<string name="quick_settings_remove">Supprimer le raccourci</string>
@@ -98,6 +112,7 @@
<string name="accessibility_quick_settings_live_display_changed_day">LiveDisplay changé en mode jour.</string>
<string name="accessibility_quick_settings_live_display_changed_night">LiveDisplay changé en mode nuit.</string>
<string name="accessibility_quick_settings_live_display_changed_outdoor">LiveDisplay changé en mode plein air.</string>
+ <string name="quick_settings_title_advanced_location">Localisation par triangulation</string>
<string name="accessibility_quick_settings_location_battery_saving">Localisation : mode économie de batterie.</string>
<string name="accessibility_quick_settings_location_gps_only">Localisation : mode appareil uniquement.</string>
<string name="accessibility_quick_settings_location_high_accuracy">Localisation : mode haute précision.</string>
@@ -108,4 +123,6 @@
<string name="accessibility_quick_settings_location_changed_battery_saving">Localisation changée en mode économie de batterie.</string>
<string name="accessibility_quick_settings_location_changed_gps_only">Localisation changée en mode appareil uniquement.</string>
<string name="accessibility_quick_settings_location_changed_high_accuracy">Localisation changée en mode haute précision.</string>
+ <string name="quick_settings_tiles_category_system">Raccourcis système</string>
+ <string name="quick_settings_tiles_add_tiles">Ajouter un raccourci</string>
</resources>
diff --git a/packages/SystemUI/res/values-gl-rES/cm_strings.xml b/packages/SystemUI/res/values-gl-rES/cm_strings.xml
index de88a30..1d0a344 100644
--- a/packages/SystemUI/res/values-gl-rES/cm_strings.xml
+++ b/packages/SystemUI/res/values-gl-rES/cm_strings.xml
@@ -16,9 +16,13 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="accessibility_data_connection_hspap">HSPA+</string>
+ <string name="accessibility_data_connection_4g_plus">4G+</string>
<string name="status_bar_expanded_header_weather_format"><xliff:g id="temp">%1$s</xliff:g> - <xliff:g id="condition">%2$s</xliff:g></string>
<string name="left_shortcut_hint">Arrastra á dereita para %1$s</string>
<string name="right_shortcut_hint">Arrastra á esquerda para %1$s</string>
+ <string name="lockscreen_message">Toque nunha icona na dereita ou na esquerda para volver a asignar un atallo da pantalla de bloqueo.</string>
+ <string name="lockscreen_default_target">Predeterminado</string>
<string name="select_application">Seleccionar aplicación</string>
<string name="lockscreen_choose_action_title">Escoller acción</string>
<string name="lockscreen_none_target">Ningunha</string>
@@ -36,11 +40,23 @@
<string name="advanced_dev_option_wipe_app">Borrar os datos da aplicación</string>
<string name="advanced_dev_option_force_stop">Forzar a parada</string>
<string name="advanced_dev_option_uninstall">Desinstalar</string>
+ <string name="accessibility_notification_brightness">Brillo da luz</string>
<string name="accessibility_quick_settings_profiles_off">Perfís desactivados.</string>
<string name="accessibility_quick_settings_profiles">Perfil: <xliff:g id="profile" example="Predeterminado">%s</xliff:g>.</string>
<string name="accessibility_quick_settings_profiles_changed_off">Perfís desactivados.</string>
<string name="accessibility_quick_settings_profiles_changed">Perfil cambiado a <xliff:g id="profile" example="Predeterminado">%s</xliff:g>.</string>
<string name="quick_settings_compass_init">Inicializando\u2026</string>
+ <string name="led_notification_title">Configuración de luz</string>
+ <string name="led_notification_text">Luz LED activada por configuración</string>
+ <string name="qs_tile_edit_header_instruction">Prema e sosteña as baldosas para reorganizalas</string>
+ <string name="quick_settings_edit_label">Editar baldosas</string>
+ <string name="quick_settings_cannot_delete_edit_tile">Non foi posíbel eliminar a baldosa Editar</string>
+ <string name="qs_tiles_reset_confirmation">Restabelecer a configuración rápida de baldosas á configuración predeterminada?</string>
+ <string name="quick_settings_tile_reset_to_default">Restabelecer coa disposición predeterminada</string>
+ <string name="quick_settings_title_header">Cabeceira</string>
+ <string name="quick_settings_title_tiles">Baldosas</string>
+ <string name="quick_settings_title_show_weather">Amosar o prognóstico</string>
+ <string name="quick_settings_title_enlarge_first_row">Ampliar a primeira fila</string>
<string name="screen_pinning_description_no_navbar">Amosarase mentres esté fixado. Para deixar de fixalo, mantén tocado o botón Atrás.</string>
<string name="quick_settings_custom_tile_detail_title">Botón personalizado</string>
<string name="quick_settings_remove">Retirar botón</string>
@@ -96,6 +112,7 @@
<string name="accessibility_quick_settings_live_display_changed_day">LiveDisplay cambiado a modo día.</string>
<string name="accessibility_quick_settings_live_display_changed_night">LiveDisplay cambiado a modo noite.</string>
<string name="accessibility_quick_settings_live_display_changed_outdoor">LiveDisplay cambiado a modo exteriores.</string>
+ <string name="quick_settings_title_advanced_location">Localización por triangulación</string>
<string name="accessibility_quick_settings_location_battery_saving">Informe de localización: en modo aforro de batería.</string>
<string name="accessibility_quick_settings_location_gps_only">Informe de localización: en modo de sensores.</string>
<string name="accessibility_quick_settings_location_high_accuracy">Informe de localización: en modo de alta precisión.</string>
diff --git a/packages/SystemUI/res/values-hr/cm_strings.xml b/packages/SystemUI/res/values-hr/cm_strings.xml
index c12f63a..302eb54 100644
--- a/packages/SystemUI/res/values-hr/cm_strings.xml
+++ b/packages/SystemUI/res/values-hr/cm_strings.xml
@@ -16,11 +16,22 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="accessibility_data_connection_hspap">HSPA+</string>
+ <string name="accessibility_data_connection_4g_plus">4G+</string>
+ <string name="status_bar_expanded_header_weather_format">%1$s - %2$s</string>
+ <string name="left_shortcut_hint">Kliznite desno za %1$s</string>
+ <string name="right_shortcut_hint">Kliznite lijevo za %1$s</string>
+ <string name="lockscreen_message">Dodirnite ikonu na lijevo ili desno kako bi preraspodijelili prečac zaključanog zaslona .</string>
+ <string name="lockscreen_default_target">Zadano</string>
+ <string name="select_application">Odaberite aplikaciju</string>
+ <string name="lockscreen_choose_action_title">Odaberite radnju</string>
+ <string name="lockscreen_none_target">Ništa</string>
<string name="navbar_dialog_title">Odaberi radnju</string>
<string name="navbar_home_button">Home tipka</string>
<string name="navbar_recent_button">Tipka nedavno</string>
<string name="navbar_search_button">Tipka za pretraživanje</string>
<string name="navbar_back_button">Tipka nazad</string>
+ <string name="navbar_empty_button">Prazna tipka</string>
<string name="navbar_menu_conditional_button">Tipka izbornika (automatsko sakrivanje)</string>
<string name="navbar_menu_always_button">Tipka izbornika (uvijek prikaži)</string>
<string name="navbar_menu_big_button">Tipka izbornika</string>
@@ -28,5 +39,90 @@
<string name="accessibility_dpad_right">Kursor desno</string>
<string name="advanced_dev_option_wipe_app">Izbriši podatke aplikacije</string>
<string name="advanced_dev_option_force_stop">Prisilno zaustavi</string>
+ <string name="advanced_dev_option_uninstall">Deinstaliraj</string>
+ <string name="accessibility_notification_brightness">Osvjetljenje svjetla</string>
+ <string name="accessibility_quick_settings_profiles_off">Profili isklučeni.</string>
+ <string name="accessibility_quick_settings_profiles">Profil: <xliff:g id="profile" example="Default">%s </xliff:g>.</string>
+ <string name="accessibility_quick_settings_profiles_changed_off">Profili su isključeni.</string>
+ <string name="accessibility_quick_settings_profiles_changed">Profil promijenjen u <xliff:g id="profile" example="Default">%s </xliff:g>.</string>
<string name="quick_settings_compass_init">Inicijalizacija\u2026</string>
+ <string name="led_notification_title">Postavke svjetla</string>
+ <string name="led_notification_text">LED svjetlo omogućeno postavkama</string>
+ <string name="qs_tile_edit_header_instruction">Pritisnite i držite pločicu za uređivanje</string>
+ <string name="quick_settings_edit_label">Uredi pločice</string>
+ <string name="quick_settings_cannot_delete_edit_tile">Nije moguće obrisati Uredi pločice</string>
+ <string name="qs_tiles_reset_confirmation">Resetirati pločice brzih postavki na zadano?</string>
+ <string name="quick_settings_tile_reset_to_default">Vraćanje na zadani izgled</string>
+ <string name="quick_settings_title_header">Zaglavlje</string>
+ <string name="quick_settings_title_tiles">Pločice</string>
+ <string name="quick_settings_title_show_weather">Pokaži vrijeme</string>
+ <string name="quick_settings_title_enlarge_first_row">Povećaj prvi red</string>
+ <string name="screen_pinning_description_no_navbar">Ovo drži u pogledu dok ne otkvačite. Dodirnite i držite gumb natrag da bi otkvačili.</string>
+ <string name="quick_settings_custom_tile_detail_title">Prilagodljive pločice</string>
+ <string name="quick_settings_remove">Uklanjanje pločice</string>
+ <string name="quick_settings_network_adb_label">ADB preko mreže</string>
+ <string name="quick_settings_compass_label">Kompas</string>
+ <string name="quick_settings_nfc_label">NFC</string>
+ <string name="quick_settings_profiles">Profili sustava</string>
+ <string name="quick_settings_profiles_off">Profili onemogućeni</string>
+ <string name="accessibility_quick_settings_sync_off">Sinkronizacija isključena.</string>
+ <string name="accessibility_quick_settings_sync_on">Sinkronizacija uključena.</string>
+ <string name="accessibility_quick_settings_sync_changed_off">Sinkronizacija je isključena.</string>
+ <string name="accessibility_quick_settings_sync_changed_on">Sinkronizacija je uključena.</string>
+ <string name="quick_settings_sync_label">Sinkroniziranje</string>
+ <string name="quick_settings_volume_panel_label">Zvučna ploča</string>
+ <string name="quick_settings_usb_tether_label">USB dijeljenje veze</string>
+ <string name="quick_settings_screen_timeout_detail_title">Vrijeme do gašenja zaslona</string>
+ <string name="quick_settings_lockscreen_label">Zaključani zaslon</string>
+ <string name="quick_settings_ambient_display_label">Ambijentni zaslon</string>
+ <string name="quick_settings_lockscreen_label_enforced">Provođenje zaključavanja zaslona</string>
+ <string name="accessibility_quick_settings_screen_timeout">Isključivanje zaslona: <xliff:g id="timeout" example="30 seconds">%s </xliff:g>.</string>
+ <string name="accessibility_quick_settings_screen_timeout_changed">Isključivanje zaslona promijenjeno u <xliff:g id="timeout" example="30 seconds">%s </xliff:g>.</string>
+ <string name="qs_tile_performance">Način rada baterije</string>
+ <string name="accessibility_quick_settings_perf_profile_pwrsv">Baterija: način uštede energije.</string>
+ <string name="accessibility_quick_settings_perf_profile_bal">Baterija: uravnoteženo.</string>
+ <string name="accessibility_quick_settings_perf_profile_perf">Baterija: performanse.</string>
+ <string name="accessibility_quick_settings_perf_profile_bias_power">Baterija: učinkoviti način.</string>
+ <string name="accessibility_quick_settings_perf_profile_bias_perf">Baterija: brzo.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_pwrsv">Rad baterije promijenjen u način uštede.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_bal">Rad baterije promijenjen u uravnotežen način.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_perf">Rad baterije promijenjen u performanse.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_bias_power">Način baterije promijenjen u učinkoviti.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_bias_perf">Način baterije promijenjen u brzi.</string>
+ <string name="quick_settings_performance_profile_detail_title">Način rada baterije</string>
+ <string name="accessibility_quick_settings_lock_screen_off">Zaključani zaslon isključen.</string>
+ <string name="accessibility_quick_settings_lock_screen_on">Zaključani zaslon uključen.</string>
+ <string name="accessibility_quick_settings_lock_screen_changed_off">Zaključani zaslon je isključen.</string>
+ <string name="accessibility_quick_settings_lock_screen_changed_on">Zaključani zaslon je uključen.</string>
+ <string name="accessibility_quick_settings_ambient_display_off">Ambijentni zaslon isključen.</string>
+ <string name="accessibility_quick_settings_ambient_display_on">Ambijentni zaslon uključen.</string>
+ <string name="accessibility_quick_settings_ambient_display_changed_off">Ambijentni zaslon je isključen.</string>
+ <string name="accessibility_quick_settings_ambient_display_changed_on">Ambijentni zaslon je uključen.</string>
+ <string name="quick_settings_dynamic_tile_detail_title">Dinamičke pločice</string>
+ <string name="dynamic_qs_tile_next_alarm_label">Slijedeći alarm</string>
+ <string name="dynamic_qs_tile_ime_selector_label">IME za odabir</string>
+ <string name="dynamic_qs_tile_su_label">Root pristup</string>
+ <string name="accessibility_quick_settings_live_display_off">LiveDisplay isključen.</string>
+ <string name="accessibility_quick_settings_live_display_auto">LiveDisplay: auto.</string>
+ <string name="accessibility_quick_settings_live_display_day">LiveDisplay: dnevni način.</string>
+ <string name="accessibility_quick_settings_live_display_night">LiveDisplay: noćni način.</string>
+ <string name="accessibility_quick_settings_live_display_outdoor">LiveDisplay: vanjski način.</string>
+ <string name="accessibility_quick_settings_live_display_changed_off">LiveDisplay isključeno.</string>
+ <string name="accessibility_quick_settings_live_display_changed_auto">LiveDisplay promijenjen u auto.</string>
+ <string name="accessibility_quick_settings_live_display_changed_day">LiveDisplay promijenjen u dnevni način.</string>
+ <string name="accessibility_quick_settings_live_display_changed_night">LiveDisplay promijenjen u noćni način rada.</string>
+ <string name="accessibility_quick_settings_live_display_changed_outdoor">LiveDisplay promijenjen u vanjski način.</string>
+ <string name="quick_settings_title_advanced_location">Način lokacije</string>
+ <string name="accessibility_quick_settings_location_battery_saving">Prijavljivanje lokacije: štednja baterije.</string>
+ <string name="accessibility_quick_settings_location_gps_only">Prijavljivanje lokacije: samo senzori.</string>
+ <string name="accessibility_quick_settings_location_high_accuracy">Prijavljivanje lokacije: visoka preciznost.</string>
+ <string name="quick_settings_location_detail_title">Način rada lokacije</string>
+ <string name="quick_settings_location_battery_saving_label">Štednja baterije</string>
+ <string name="quick_settings_location_gps_only_label">Samo uređaj</string>
+ <string name="quick_settings_location_high_accuracy_label">Visoka preciznost</string>
+ <string name="accessibility_quick_settings_location_changed_battery_saving">Prijavljivanje lokacije promijenjeno u način uštednje baterije.</string>
+ <string name="accessibility_quick_settings_location_changed_gps_only">Prijavljivanje lokacije promijenjeno u samo senzori.</string>
+ <string name="accessibility_quick_settings_location_changed_high_accuracy">Prijavljivanje lokacije promijenjeno u način visoke preciznosti.</string>
+ <string name="quick_settings_tiles_category_system">Sistemske pločice</string>
+ <string name="quick_settings_tiles_add_tiles">Dodaj pločicu</string>
</resources>
diff --git a/packages/SystemUI/res/values-hu/cm_strings.xml b/packages/SystemUI/res/values-hu/cm_strings.xml
index e14cb7a..d185af0 100644
--- a/packages/SystemUI/res/values-hu/cm_strings.xml
+++ b/packages/SystemUI/res/values-hu/cm_strings.xml
@@ -16,9 +16,13 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="accessibility_data_connection_hspap">HSPA+</string>
+ <string name="accessibility_data_connection_4g_plus">4G+</string>
<string name="status_bar_expanded_header_weather_format"><xliff:g id="temp">%1$s</xliff:g> - <xliff:g id="condition">%2$s</xliff:g></string>
<string name="left_shortcut_hint">Csúsztasson jobbra ezért: %1$s</string>
<string name="right_shortcut_hint">Csúsztasson balra ezért: %1$s</string>
+ <string name="lockscreen_message">Érintsen meg egy ikont jobb vagy bal oldalt a zárképernyő hivatkozások ismételt hozzárendeléséhez.</string>
+ <string name="lockscreen_default_target">Alapértelmezett</string>
<string name="select_application">Válasszon alkalmazást</string>
<string name="lockscreen_choose_action_title">Válasszon eseményt</string>
<string name="lockscreen_none_target">Nincs</string>
@@ -36,11 +40,23 @@
<string name="advanced_dev_option_wipe_app">Alkalmazások adatok törlése</string>
<string name="advanced_dev_option_force_stop">Kényszerített leállítás</string>
<string name="advanced_dev_option_uninstall">Eltávolítás</string>
+ <string name="accessibility_notification_brightness">LED fényereje</string>
<string name="accessibility_quick_settings_profiles_off">Profilok ki.</string>
<string name="accessibility_quick_settings_profiles">Profil: <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="accessibility_quick_settings_profiles_changed_off">Profilok kikapcsolva.</string>
<string name="accessibility_quick_settings_profiles_changed">Profil megváltoztatva: <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="quick_settings_compass_init">Inicializálás\u2026</string>
+ <string name="led_notification_title">LED beállítások</string>
+ <string name="led_notification_text">LED fény engedélyezve</string>
+ <string name="qs_tile_edit_header_instruction">Nyomja meg és tartsa nyomva a csempéket az átrendezéséhez</string>
+ <string name="quick_settings_edit_label">Csempék szerkesztése</string>
+ <string name="quick_settings_cannot_delete_edit_tile">Szerkesztési csempe nem távolítható el</string>
+ <string name="qs_tiles_reset_confirmation">Gyors beállítások csempéinek visszaállítása alapértelmezett konfigurációra?</string>
+ <string name="quick_settings_tile_reset_to_default">Visszaállítás az alapértelmezett elrendezésre</string>
+ <string name="quick_settings_title_header">Fejléc</string>
+ <string name="quick_settings_title_tiles">Csempék</string>
+ <string name="quick_settings_title_show_weather">Időjárás megjelenítése</string>
+ <string name="quick_settings_title_enlarge_first_row">Első sor nagyítása</string>
<string name="screen_pinning_description_no_navbar">Ez a nézetben tartja, amíg a rögzítést fel nem oldja. Érintse meg és tartsa nyomva a Vissza gombot a rögzítés feloldásához.</string>
<string name="quick_settings_custom_tile_detail_title">Egyéni csempe</string>
<string name="quick_settings_remove">Csempe eltávolítása</string>
@@ -96,6 +112,7 @@
<string name="accessibility_quick_settings_live_display_changed_day">LiveDisplay nappali módra változtatva.</string>
<string name="accessibility_quick_settings_live_display_changed_night">LiveDisplay éjszakai módra változtatva.</string>
<string name="accessibility_quick_settings_live_display_changed_outdoor">LiveDisplay szabadtéri módra változtatva.</string>
+ <string name="quick_settings_title_advanced_location">Bővített helymeghatározás</string>
<string name="accessibility_quick_settings_location_battery_saving">Helymeghatározás jelentése: energiatakarékos.</string>
<string name="accessibility_quick_settings_location_gps_only">Helymeghatározás jelentése: csak GPS.</string>
<string name="accessibility_quick_settings_location_high_accuracy">Helymeghatározás jelentése: nagyon pontos.</string>
diff --git a/packages/SystemUI/res/values-it/cm_strings.xml b/packages/SystemUI/res/values-it/cm_strings.xml
index 520c475..94b0ab6 100644
--- a/packages/SystemUI/res/values-it/cm_strings.xml
+++ b/packages/SystemUI/res/values-it/cm_strings.xml
@@ -123,4 +123,6 @@
<string name="accessibility_quick_settings_location_changed_battery_saving">Segnalatore posizione cambiato in modalità risparmio batteria.</string>
<string name="accessibility_quick_settings_location_changed_gps_only">Segnalatore posizione cambiato in modalità solo sensori.</string>
<string name="accessibility_quick_settings_location_changed_high_accuracy">Segnalatore posizione cambiato in modalità alta precisione.</string>
+ <string name="quick_settings_tiles_category_system">Tile di sistema</string>
+ <string name="quick_settings_tiles_add_tiles">Aggiungi tile</string>
</resources>
diff --git a/packages/SystemUI/res/values-iw/cm_strings.xml b/packages/SystemUI/res/values-iw/cm_strings.xml
index c23aa0e..fea5506 100644
--- a/packages/SystemUI/res/values-iw/cm_strings.xml
+++ b/packages/SystemUI/res/values-iw/cm_strings.xml
@@ -48,7 +48,11 @@
<string name="quick_settings_compass_init">מאתחל\u2026</string>
<string name="led_notification_title">הגדרות נורית</string>
<string name="led_notification_text">נורית LED מופעלת בידי ההגדרות</string>
+ <string name="qs_tile_edit_header_instruction">יש לגעת ולהחזיק את האריחים לסידור מחדש</string>
<string name="quick_settings_edit_label">ערוך אריחים</string>
+ <string name="quick_settings_cannot_delete_edit_tile">לא ניתן למחוק את אריח העריכה</string>
+ <string name="qs_tiles_reset_confirmation">האם לאפס את אריחי ההגדרות המהירות לברירת המחדל?</string>
+ <string name="quick_settings_tile_reset_to_default">איפוס לפריסת ברירת המחדל</string>
<string name="quick_settings_title_header">כותרת</string>
<string name="quick_settings_title_tiles">אריחים</string>
<string name="quick_settings_title_show_weather">הצג מזג אוויר</string>
@@ -108,6 +112,7 @@
<string name="accessibility_quick_settings_live_display_changed_day">LiveDisplay שונה למצב יום.</string>
<string name="accessibility_quick_settings_live_display_changed_night">LiveDisplay שונה למצב לילה.</string>
<string name="accessibility_quick_settings_live_display_changed_outdoor">LiveDisplay שונה למצב חוץ.</string>
+ <string name="quick_settings_title_advanced_location">שלושה מצבי מיקום</string>
<string name="accessibility_quick_settings_location_battery_saving">דיווח מיקום: מצב חיסכון בסוללה.</string>
<string name="accessibility_quick_settings_location_gps_only">דיווח מיקום: מצב חיישנים בלבד.</string>
<string name="accessibility_quick_settings_location_high_accuracy">דיווח מיקום: מצב רמת דיוק גבוהה.</string>
diff --git a/packages/SystemUI/res/values-ja/cm_strings.xml b/packages/SystemUI/res/values-ja/cm_strings.xml
index 93e9d78..1220657 100644
--- a/packages/SystemUI/res/values-ja/cm_strings.xml
+++ b/packages/SystemUI/res/values-ja/cm_strings.xml
@@ -123,4 +123,6 @@
<string name="accessibility_quick_settings_location_changed_battery_saving">位置情報レポートがバッテリー節約モードに変更されました。</string>
<string name="accessibility_quick_settings_location_changed_gps_only">位置情報レポートが端末のみモードに変更されました。</string>
<string name="accessibility_quick_settings_location_changed_high_accuracy">位置情報レポートが高精度モードに変更されました。</string>
+ <string name="quick_settings_tiles_category_system">システムのタイル</string>
+ <string name="quick_settings_tiles_add_tiles">タイルを追加</string>
</resources>
diff --git a/packages/SystemUI/res/values-nb/cm_strings.xml b/packages/SystemUI/res/values-nb/cm_strings.xml
index 23697fd..d8630cf 100644
--- a/packages/SystemUI/res/values-nb/cm_strings.xml
+++ b/packages/SystemUI/res/values-nb/cm_strings.xml
@@ -16,9 +16,13 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="accessibility_data_connection_hspap">HSPA+</string>
+ <string name="accessibility_data_connection_4g_plus">4G+</string>
<string name="status_bar_expanded_header_weather_format"><xliff:g id="temp">%1$s</xliff:g> - <xliff:g id="condition">%2$s</xliff:g></string>
<string name="left_shortcut_hint">Sveip til høyre for %1$s</string>
<string name="right_shortcut_hint">Sveip til venstre for %1$s</string>
+ <string name="lockscreen_message">Trykk på ikonet på venstre eller høyre for å tilordne en låseskjermsnarvei.</string>
+ <string name="lockscreen_default_target">Standard</string>
<string name="select_application">Velg applikasjon</string>
<string name="lockscreen_choose_action_title">Velg handling</string>
<string name="lockscreen_none_target">Ingen</string>
@@ -36,11 +40,23 @@
<string name="advanced_dev_option_wipe_app">Slett appdata</string>
<string name="advanced_dev_option_force_stop">Tving avslutning</string>
<string name="advanced_dev_option_uninstall">Avinstaller</string>
+ <string name="accessibility_notification_brightness">Lys lysstyrke</string>
<string name="accessibility_quick_settings_profiles_off">Profiler av.</string>
<string name="accessibility_quick_settings_profiles">Profil: <xliff:g id="profile" example="Default">%s </xliff:g>.</string>
<string name="accessibility_quick_settings_profiles_changed_off">Profiler deaktivert.</string>
<string name="accessibility_quick_settings_profiles_changed">Profil endret til <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="quick_settings_compass_init">Initialiserer\u2026</string>
+ <string name="led_notification_title">Lys innstillinger</string>
+ <string name="led_notification_text">LED lyset aktiveres av innstillingene</string>
+ <string name="qs_tile_edit_header_instruction">Trykk og hold fliser for å omorganisere</string>
+ <string name="quick_settings_edit_label">Rediger fliser</string>
+ <string name="quick_settings_cannot_delete_edit_tile">Kan ikke slette Rediger-flisen</string>
+ <string name="qs_tiles_reset_confirmation">Tilbakestill innstillinger for innstillingsflisene til standardkonfigurasjonen?</string>
+ <string name="quick_settings_tile_reset_to_default">Tilbakestille til standard oppsett</string>
+ <string name="quick_settings_title_header">Topptekst</string>
+ <string name="quick_settings_title_tiles">Fliser</string>
+ <string name="quick_settings_title_show_weather">Vis været</string>
+ <string name="quick_settings_title_enlarge_first_row">Forstørr første rad</string>
<string name="screen_pinning_description_no_navbar">Dette holder den i syne inntill du løsner den. Trykk og hold på tilbake knappen for å løsne.</string>
<string name="quick_settings_custom_tile_detail_title">Egendefinerte fliser</string>
<string name="quick_settings_remove">Fjern flis</string>
diff --git a/packages/SystemUI/res/values-nl/cm_strings.xml b/packages/SystemUI/res/values-nl/cm_strings.xml
index 05ed86b..f06cadf 100644
--- a/packages/SystemUI/res/values-nl/cm_strings.xml
+++ b/packages/SystemUI/res/values-nl/cm_strings.xml
@@ -16,9 +16,13 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="accessibility_data_connection_hspap">HSPA+</string>
+ <string name="accessibility_data_connection_4g_plus">4G+</string>
<string name="status_bar_expanded_header_weather_format"><xliff:g id="temp">%1$s</xliff:g> - <xliff:g id="condition">%2$s</xliff:g></string>
<string name="left_shortcut_hint">Veeg naar rechts voor %1$s</string>
<string name="right_shortcut_hint">Veeg naar links voor %1$s</string>
+ <string name="lockscreen_message">Tik links of rechts op een pictogram om de snelkoppeling opnieuw toe te wijzen.</string>
+ <string name="lockscreen_default_target">Standaard</string>
<string name="select_application">App selecteren</string>
<string name="lockscreen_choose_action_title">Actie selecteren</string>
<string name="lockscreen_none_target">Geen</string>
@@ -36,11 +40,23 @@
<string name="advanced_dev_option_wipe_app">App-gegevens wissen</string>
<string name="advanced_dev_option_force_stop">Nu stoppen</string>
<string name="advanced_dev_option_uninstall">Verwijderen</string>
+ <string name="accessibility_notification_brightness">Verlichtingshelderheid</string>
<string name="accessibility_quick_settings_profiles_off">Profielen uit.</string>
<string name="accessibility_quick_settings_profiles">Profiel: <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="accessibility_quick_settings_profiles_changed_off">Profielen uitgeschakeld.</string>
<string name="accessibility_quick_settings_profiles_changed">Profiel gewijzigd naar <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="quick_settings_compass_init">Initialiseren\u2026</string>
+ <string name="led_notification_title">Verlichtingsinstellingen</string>
+ <string name="led_notification_text">LED-verlichting ingeschakeld door instellingen</string>
+ <string name="qs_tile_edit_header_instruction">Tegels ingedrukt houden om te verplaatsen</string>
+ <string name="quick_settings_edit_label">Tegels bewerken</string>
+ <string name="quick_settings_cannot_delete_edit_tile">Kan de bewerk-tegel niet verwijderen</string>
+ <string name="qs_tiles_reset_confirmation">Tegels snelle instellingen naar standaardwaarden herstellen?</string>
+ <string name="quick_settings_tile_reset_to_default">Standaardindeling herstellen</string>
+ <string name="quick_settings_title_header">Koptekst</string>
+ <string name="quick_settings_title_tiles">Tegels</string>
+ <string name="quick_settings_title_show_weather">Weer weergeven</string>
+ <string name="quick_settings_title_enlarge_first_row">Eerst rij vergroten</string>
<string name="screen_pinning_description_no_navbar">Met scherm vastzetten wordt het beeldscherm vergrendeld op één weergave.\n\nBlijf de Terug-knop aanraken om het scherm los te maken.</string>
<string name="quick_settings_custom_tile_detail_title">Aangepaste tegel</string>
<string name="quick_settings_remove">Tegel verwijderen</string>
@@ -96,6 +112,7 @@
<string name="accessibility_quick_settings_live_display_changed_day">LiveDisplay gewijzigd naar dagstand.</string>
<string name="accessibility_quick_settings_live_display_changed_night">LiveDisplay gewijzigd naar nachtstand.</string>
<string name="accessibility_quick_settings_live_display_changed_outdoor">LiveDisplay gewijzigd naar buitenstand.</string>
+ <string name="quick_settings_title_advanced_location">Locatie met 3 standen</string>
<string name="accessibility_quick_settings_location_battery_saving">Locatiemelding: accubesparing.</string>
<string name="accessibility_quick_settings_location_gps_only">Locatiemelding: alleen apparaat.</string>
<string name="accessibility_quick_settings_location_high_accuracy">Locatiemelding: grote nauwkeurigheid.</string>
diff --git a/packages/SystemUI/res/values-pl/cm_strings.xml b/packages/SystemUI/res/values-pl/cm_strings.xml
index 68e8227..01ae7af 100644
--- a/packages/SystemUI/res/values-pl/cm_strings.xml
+++ b/packages/SystemUI/res/values-pl/cm_strings.xml
@@ -21,6 +21,8 @@
<string name="status_bar_expanded_header_weather_format"><xliff:g id="temp">%1$s</xliff:g> - <xliff:g id="condition">%2$s</xliff:g></string>
<string name="left_shortcut_hint">Przesuń palcem w prawo do %1$s</string>
<string name="right_shortcut_hint">Przesuń palcem w lewo do %1$s</string>
+ <string name="lockscreen_message">Dotknij ikony po lewej lub prawej, aby przypisać skrót ekranu blokady.</string>
+ <string name="lockscreen_default_target">Domyślna</string>
<string name="select_application">Wybierz aplikację</string>
<string name="lockscreen_choose_action_title">Wybierz akcję</string>
<string name="lockscreen_none_target">Brak</string>
@@ -38,16 +40,23 @@
<string name="advanced_dev_option_wipe_app">Usuń dane aplikacji</string>
<string name="advanced_dev_option_force_stop">Wymuś zamknięcie</string>
<string name="advanced_dev_option_uninstall">Odinstaluj</string>
+ <string name="accessibility_notification_brightness">Jasność światła</string>
<string name="accessibility_quick_settings_profiles_off">Profile wyłączone.</string>
<string name="accessibility_quick_settings_profiles">Profil: <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="accessibility_quick_settings_profiles_changed_off">Profile zostały wyłączone.</string>
<string name="accessibility_quick_settings_profiles_changed">Profil zmieniony na <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="quick_settings_compass_init">Inicjalizowanie\u2026</string>
+ <string name="led_notification_title">Ustawienia diody</string>
+ <string name="led_notification_text">Diody LED włączone przez ustawienia</string>
<string name="qs_tile_edit_header_instruction">Naciśnij i przytrzymaj kafelki, aby zmienić kolejność</string>
+ <string name="quick_settings_edit_label">Edycja kafelków</string>
+ <string name="quick_settings_cannot_delete_edit_tile">Nie można usunąć kafelka edycji</string>
+ <string name="qs_tiles_reset_confirmation">Zresetować ustawienia kafelków szybkiego dostępu do domyślnej konfiguracji?</string>
<string name="quick_settings_tile_reset_to_default">Przywróć domyślny układ</string>
<string name="quick_settings_title_header">Nagłówek</string>
<string name="quick_settings_title_tiles">Kafelki</string>
<string name="quick_settings_title_show_weather">Pokaż pogodę</string>
+ <string name="quick_settings_title_enlarge_first_row">Powiększenie pierwszego rzędu</string>
<string name="screen_pinning_description_no_navbar">Zostaje na widoku do czasu odpięcia. Dotknij i przytrzymaj przycisk Wstecz, aby odpiąć.</string>
<string name="quick_settings_custom_tile_detail_title">Kafelek niestandardowy</string>
<string name="quick_settings_remove">Usuń kafelek</string>
@@ -103,6 +112,7 @@
<string name="accessibility_quick_settings_live_display_changed_day">LiveDisplay zmieniony na tryb dzienny.</string>
<string name="accessibility_quick_settings_live_display_changed_night">LiveDisplay zmieniony na tryb nocny.</string>
<string name="accessibility_quick_settings_live_display_changed_outdoor">LiveDisplay zmieniony na tryb zewnętrzny.</string>
+ <string name="quick_settings_title_advanced_location">Trójstanowa lokalizacja</string>
<string name="accessibility_quick_settings_location_battery_saving">Raportowanie lokalizacji: tryb oszczędzania baterii.</string>
<string name="accessibility_quick_settings_location_gps_only">Raportowanie lokalizacji: tylko czujniki.</string>
<string name="accessibility_quick_settings_location_high_accuracy">Raportowanie lokalizacji: wysoka dokładność.</string>
diff --git a/packages/SystemUI/res/values-pt-rBR/cm_strings.xml b/packages/SystemUI/res/values-pt-rBR/cm_strings.xml
index 526ba9a..29548ec 100644
--- a/packages/SystemUI/res/values-pt-rBR/cm_strings.xml
+++ b/packages/SystemUI/res/values-pt-rBR/cm_strings.xml
@@ -16,9 +16,13 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="accessibility_data_connection_hspap">HSPA+</string>
+ <string name="accessibility_data_connection_4g_plus">4G+</string>
<string name="status_bar_expanded_header_weather_format"><xliff:g id="tempo">%1$s</xliff:g> - <xliff:g id="condição">%2$s</xliff:g></string>
<string name="left_shortcut_hint">Deslizar para a direita para %1$s</string>
<string name="right_shortcut_hint">Deslizar para a esquerda para %1$s</string>
+ <string name="lockscreen_message">Toque em um ícone da esquerda ou da direita para reatribuir o atalho da tela de bloqueio.</string>
+ <string name="lockscreen_default_target">Padrão</string>
<string name="select_application">Selecionar aplicativo</string>
<string name="lockscreen_choose_action_title">Escolher ação</string>
<string name="lockscreen_none_target">Nenhum</string>
@@ -36,11 +40,23 @@
<string name="advanced_dev_option_wipe_app">Limpar dados de aplicativos</string>
<string name="advanced_dev_option_force_stop">Forçar fechamento</string>
<string name="advanced_dev_option_uninstall">Desinstalar</string>
+ <string name="accessibility_notification_brightness">Brilho</string>
<string name="accessibility_quick_settings_profiles_off">Perfis desligados.</string>
<string name="accessibility_quick_settings_profiles">Perfil: <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="accessibility_quick_settings_profiles_changed_off">Perfis foram desligados.</string>
<string name="accessibility_quick_settings_profiles_changed">Perfil alterado para <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="quick_settings_compass_init">Inicializando\u2026</string>
+ <string name="led_notification_title">Configurações de luz</string>
+ <string name="led_notification_text">Luz de LED ativada pelas configurações</string>
+ <string name="qs_tile_edit_header_instruction">Pressione e segure os botões para reorganizar</string>
+ <string name="quick_settings_edit_label">Editar botões</string>
+ <string name="quick_settings_cannot_delete_edit_tile">Não é possível excluir o botão de Edição</string>
+ <string name="qs_tiles_reset_confirmation">Redefinir botões das configurações rápidas para o padrão?</string>
+ <string name="quick_settings_tile_reset_to_default">Redefinir para a organização padrão</string>
+ <string name="quick_settings_title_header">Cabeçalho</string>
+ <string name="quick_settings_title_tiles">Botões</string>
+ <string name="quick_settings_title_show_weather">Mostrar tempo</string>
+ <string name="quick_settings_title_enlarge_first_row">Ampliar a primeira linha</string>
<string name="screen_pinning_description_no_navbar">Isto manterá-la na tela até você desafixar. Toque e segure o botão Voltar para desafixar.</string>
<string name="quick_settings_custom_tile_detail_title">Botão personalizado</string>
<string name="quick_settings_remove">Remover botão</string>
@@ -96,6 +112,7 @@
<string name="accessibility_quick_settings_live_display_changed_day">LiveDisplay alterado para modo dia.</string>
<string name="accessibility_quick_settings_live_display_changed_night">LiveDisplay alterado para modo noite.</string>
<string name="accessibility_quick_settings_live_display_changed_outdoor">LiveDisplay alterado para modo ao ar livre.</string>
+ <string name="quick_settings_title_advanced_location">Localização em 3 estados</string>
<string name="accessibility_quick_settings_location_battery_saving">Localização: economia de bateria.</string>
<string name="accessibility_quick_settings_location_gps_only">Localização: apenas no dispositivo.</string>
<string name="accessibility_quick_settings_location_high_accuracy">Localização: alta precisão.</string>
diff --git a/packages/SystemUI/res/values-pt-rPT/cm_strings.xml b/packages/SystemUI/res/values-pt-rPT/cm_strings.xml
index a67d78a..9962325 100644
--- a/packages/SystemUI/res/values-pt-rPT/cm_strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/cm_strings.xml
@@ -71,7 +71,7 @@
<string name="accessibility_quick_settings_sync_changed_on">Sincronização foi ligada.</string>
<string name="quick_settings_sync_label">Sincronização</string>
<string name="quick_settings_volume_panel_label">Painel de volume</string>
- <string name="quick_settings_usb_tether_label">Associação USB</string>
+ <string name="quick_settings_usb_tether_label">Partilha de internet por USB</string>
<string name="quick_settings_screen_timeout_detail_title">Tempo limite do ecrã</string>
<string name="quick_settings_lockscreen_label">Ecrã de bloqueio</string>
<string name="quick_settings_ambient_display_label">Visualização de ambiente</string>
diff --git a/packages/SystemUI/res/values-ro/cm_strings.xml b/packages/SystemUI/res/values-ro/cm_strings.xml
index 14d931c..83dcc8a 100644
--- a/packages/SystemUI/res/values-ro/cm_strings.xml
+++ b/packages/SystemUI/res/values-ro/cm_strings.xml
@@ -42,9 +42,12 @@
<string name="accessibility_quick_settings_profiles_changed">Profil schimbat în <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="quick_settings_compass_init">Inițializare\u2026</string>
<string name="led_notification_title">Setări de lumină</string>
+ <string name="qs_tile_edit_header_instruction">Apăsați și țineți apăsate plăcuțele pentru a rearanja</string>
+ <string name="quick_settings_edit_label">Editare plăcuțe</string>
<string name="quick_settings_title_header">Antet</string>
- <string name="quick_settings_custom_tile_detail_title">Card personalizat</string>
- <string name="quick_settings_remove">Elimină card</string>
+ <string name="quick_settings_title_tiles">Plăcuțe</string>
+ <string name="quick_settings_custom_tile_detail_title">Plăcuță personalizată</string>
+ <string name="quick_settings_remove">Eliminare plăcuță</string>
<string name="quick_settings_network_adb_label">ADB prin rețea</string>
<string name="quick_settings_compass_label">Busolă</string>
<string name="quick_settings_nfc_label">NFC</string>
@@ -55,6 +58,7 @@
<string name="accessibility_quick_settings_sync_changed_off">Sincronizare oprită.</string>
<string name="accessibility_quick_settings_sync_changed_on">Sincronizare pornită.</string>
<string name="quick_settings_sync_label">Sincronizare</string>
+ <string name="quick_settings_volume_panel_label">Panou volum</string>
<string name="quick_settings_usb_tether_label">Tethering USB</string>
<string name="quick_settings_screen_timeout_detail_title">Timpul de expirare ecran</string>
<string name="quick_settings_lockscreen_label">Ecran de blocare</string>
@@ -63,7 +67,7 @@
<string name="accessibility_quick_settings_perf_profile_bal">Mod baterie: mod echilibrat.</string>
<string name="accessibility_quick_settings_ambient_display_off">Afișare ambientală oprită.</string>
<string name="accessibility_quick_settings_ambient_display_on">Afișare ambientală pornită.</string>
- <string name="quick_settings_dynamic_tile_detail_title">Card dinamic</string>
+ <string name="quick_settings_dynamic_tile_detail_title">Plăcuță dinamică</string>
<string name="dynamic_qs_tile_next_alarm_label">Următoarea alarmă</string>
<string name="dynamic_qs_tile_ime_selector_label">Selector IME</string>
<string name="dynamic_qs_tile_su_label">Acces root</string>
diff --git a/packages/SystemUI/res/values-ru/cm_strings.xml b/packages/SystemUI/res/values-ru/cm_strings.xml
index ec0c036..ee3b9a7 100644
--- a/packages/SystemUI/res/values-ru/cm_strings.xml
+++ b/packages/SystemUI/res/values-ru/cm_strings.xml
@@ -47,9 +47,9 @@
<string name="accessibility_quick_settings_profiles_changed">Профиль изменён на <xliff:g id="профиль" example="По умолчанию">%s</xliff:g>.</string>
<string name="quick_settings_compass_init">Включение\u2026</string>
<string name="led_notification_title">Индикатор событий</string>
- <string name="led_notification_text">Светодиод включен параметрами</string>
- <string name="qs_tile_edit_header_instruction">Нажмите и удерживайте плитку для изменения</string>
- <string name="quick_settings_edit_label">Редактировать плитки</string>
+ <string name="led_notification_text">Светодиод включен в настройках</string>
+ <string name="qs_tile_edit_header_instruction">Нажмите и удерживайте плитку для её перемещения</string>
+ <string name="quick_settings_edit_label">Изменить плитки</string>
<string name="quick_settings_cannot_delete_edit_tile">Невозможно удалить кнопку редактирования</string>
<string name="qs_tiles_reset_confirmation">Восстановить набор плиток по умолчанию?</string>
<string name="quick_settings_tile_reset_to_default">Восстановить стандартные</string>
diff --git a/packages/SystemUI/res/values-sl/cm_strings.xml b/packages/SystemUI/res/values-sl/cm_strings.xml
index 1746708..b081eac 100644
--- a/packages/SystemUI/res/values-sl/cm_strings.xml
+++ b/packages/SystemUI/res/values-sl/cm_strings.xml
@@ -16,9 +16,13 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="accessibility_data_connection_hspap">HSPA+</string>
+ <string name="accessibility_data_connection_4g_plus">4G+</string>
<string name="status_bar_expanded_header_weather_format"><xliff:g id="temp">%1$s</xliff:g> - <xliff:g id="condition">%2$s</xliff:g></string>
<string name="left_shortcut_hint">Povlecite desno za %1$s</string>
<string name="right_shortcut_hint">Povlecite levo za %1$s</string>
+ <string name="lockscreen_message">Tapnite ikono na levi ali desni, da ponovno dodelite bližnjico zaslona za zaklepanje.</string>
+ <string name="lockscreen_default_target">Privzeto</string>
<string name="select_application">Izberite program</string>
<string name="lockscreen_choose_action_title">Izberite dejanje</string>
<string name="lockscreen_none_target">Brez</string>
@@ -36,11 +40,23 @@
<string name="advanced_dev_option_wipe_app">Izbriši podatke programe</string>
<string name="advanced_dev_option_force_stop">Vsili ustavitev</string>
<string name="advanced_dev_option_uninstall">Odstrani</string>
+ <string name="accessibility_notification_brightness">Svetlost lučke</string>
<string name="accessibility_quick_settings_profiles_off">Profili izklopljeni.</string>
<string name="accessibility_quick_settings_profiles">Profil: <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="accessibility_quick_settings_profiles_changed_off">Profili izklopljeni.</string>
<string name="accessibility_quick_settings_profiles_changed">Profil spremenjen v <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="quick_settings_compass_init">Začenjanje \u2026</string>
+ <string name="led_notification_title">Nastavitve lučke</string>
+ <string name="led_notification_text">Lučka LED omogočena v nastavitvah</string>
+ <string name="qs_tile_edit_header_instruction">Pritisnite in pridržite ploščice za preurejanje</string>
+ <string name="quick_settings_edit_label">Uredi ploščice</string>
+ <string name="quick_settings_cannot_delete_edit_tile">Ploščice za urejanje ni mogoče izbrisati</string>
+ <string name="qs_tiles_reset_confirmation">Ponastavi ploščice hitrih nastavitev na privzeto nastavitev?</string>
+ <string name="quick_settings_tile_reset_to_default">Ponastavi na privzeto razporeditev</string>
+ <string name="quick_settings_title_header">Glava</string>
+ <string name="quick_settings_title_tiles">Ploščice</string>
+ <string name="quick_settings_title_show_weather">Prikaži vreme</string>
+ <string name="quick_settings_title_enlarge_first_row">Povečaj prvo vrstico</string>
<string name="screen_pinning_description_no_navbar">To jo ohrani prikazano, dokler je ne odpnete. Tapnite in pridržite gumb Nazaj, da jo odpnete.</string>
<string name="quick_settings_custom_tile_detail_title">Ploščica po meri</string>
<string name="quick_settings_remove">Odstrani ploščico</string>
@@ -96,6 +112,7 @@
<string name="accessibility_quick_settings_live_display_changed_day">LiveDisplay spremenjen v dnevni način.</string>
<string name="accessibility_quick_settings_live_display_changed_night">LiveDisplay spremenjen v nočni način.</string>
<string name="accessibility_quick_settings_live_display_changed_outdoor">LiveDisplay spremenjen v zunanji način.</string>
+ <string name="quick_settings_title_advanced_location">Tri stanja lokacije</string>
<string name="accessibility_quick_settings_location_battery_saving">Poročanje o lokaciji: način varčevanja energije.</string>
<string name="accessibility_quick_settings_location_gps_only">Poročanje o lokaciji: način \'samo tipala\'.</string>
<string name="accessibility_quick_settings_location_high_accuracy">Poročanje o lokaciji: način visoke natančnosti.</string>
diff --git a/packages/SystemUI/res/values-sv/cm_strings.xml b/packages/SystemUI/res/values-sv/cm_strings.xml
index d7fb6e5..7d0f40b 100644
--- a/packages/SystemUI/res/values-sv/cm_strings.xml
+++ b/packages/SystemUI/res/values-sv/cm_strings.xml
@@ -16,9 +16,12 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="accessibility_data_connection_hspap">HSPA+</string>
+ <string name="accessibility_data_connection_4g_plus">4G+</string>
<string name="status_bar_expanded_header_weather_format"><xliff:g id="temp">%1$s</xliff:g> - <xliff:g id="condition">%2$s</xliff:g></string>
<string name="left_shortcut_hint">Svep höger för %1$s</string>
<string name="right_shortcut_hint">Svep vänster för %1$s</string>
+ <string name="lockscreen_default_target">Standard</string>
<string name="select_application">Välj app</string>
<string name="lockscreen_choose_action_title">Välj åtgärd</string>
<string name="lockscreen_none_target">Ingen</string>
diff --git a/packages/SystemUI/res/values-th/cm_arrays.xml b/packages/SystemUI/res/values-th/cm_arrays.xml
new file mode 100644
index 0000000..cf5825b
--- /dev/null
+++ b/packages/SystemUI/res/values-th/cm_arrays.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (C) 2012-2014 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="cardinal_directions">
+ <item>N</item>
+ <item>NE</item>
+ <item>E</item>
+ <item>SE</item>
+ <item>S</item>
+ <item>SW</item>
+ <item>W</item>
+ <item>NW</item>
+ </string-array>
+</resources>
diff --git a/packages/SystemUI/res/values-th/cm_strings.xml b/packages/SystemUI/res/values-th/cm_strings.xml
index beffbab..fba34af 100644
--- a/packages/SystemUI/res/values-th/cm_strings.xml
+++ b/packages/SystemUI/res/values-th/cm_strings.xml
@@ -16,8 +16,111 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="quick_settings_dynamic_tile_detail_title">กระเบื้องแบบไดนามิก</string>
+ <string name="accessibility_data_connection_hspap">HSPA+</string>
+ <string name="accessibility_data_connection_4g_plus">4G+</string>
+ <string name="status_bar_expanded_header_weather_format"><xliff:g id="temp">%1$s</xliff:g> - <xliff:g id="condition">%2$s</xliff:g></string>
+ <string name="left_shortcut_hint">ปัดไปทางขวาเพื่อ %1$s</string>
+ <string name="right_shortcut_hint">ปัดไปทางซ้ายเพื่อ %1$s</string>
+ <string name="lockscreen_message">แตะที่ไอคอนด้านซ้ายหรือขวาเพื่อกำหนดทางลัดสำหรับหน้าจอล็อค</string>
+ <string name="lockscreen_default_target">ค่าเริ่มต้น</string>
+ <string name="select_application">เลือกแอปพลิเคชัน</string>
+ <string name="lockscreen_choose_action_title">เลือกการกระทำ</string>
+ <string name="lockscreen_none_target">ไม่มี</string>
+ <string name="navbar_dialog_title">เลือกใช้การกระทำ</string>
+ <string name="navbar_home_button">ปุ่มหลัก</string>
+ <string name="navbar_recent_button">ปุ่มแอปล่าสุด</string>
+ <string name="navbar_search_button">ปุ่มค้นหา</string>
+ <string name="navbar_back_button">ปุ่มกลับ</string>
+ <string name="navbar_empty_button">ปุ่มว่าง</string>
+ <string name="navbar_menu_conditional_button">ปุ่มเมนู (ซ่อนอัตโนมัติ)</string>
+ <string name="navbar_menu_always_button">ปุ่มเมนู (แสดงตลอด)</string>
+ <string name="navbar_menu_big_button">ปุ่มเมนู</string>
+ <string name="accessibility_dpad_left">เคอร์เซอร์ซ้าย</string>
+ <string name="accessibility_dpad_right">เคอร์เซอร์ขวา</string>
+ <string name="advanced_dev_option_wipe_app">ล้างข้อมูลแอป</string>
+ <string name="advanced_dev_option_force_stop">บังคับปิด</string>
+ <string name="advanced_dev_option_uninstall">ยกเลิกการติดตั้ง</string>
+ <string name="accessibility_notification_brightness">ความสว่าง</string>
+ <string name="accessibility_quick_settings_profiles_off">โปรไฟล์ปิดอยู่</string>
+ <string name="accessibility_quick_settings_profiles">โปรไฟล์: <xliff:g id="profile" example="Default">%s</xliff:g></string>
+ <string name="accessibility_quick_settings_profiles_changed_off">ปิดโปรไฟล์</string>
+ <string name="accessibility_quick_settings_profiles_changed">โปรไฟล์เปลี่ยนเป็น <xliff:g id="profile" example="Default">%s</xliff:g></string>
+ <string name="quick_settings_compass_init">กำลังเตรียมการ\u2026</string>
+ <string name="led_notification_title">การตั้งค่าแสง</string>
+ <string name="led_notification_text">LED ถูกเปิดใช้งานโดยการตั้งค่า</string>
+ <string name="qs_tile_edit_header_instruction">แตะไทต์ค้างไว้เพื่อย้ายตำแหน่ง</string>
+ <string name="quick_settings_edit_label">แก้ไขไทต์</string>
+ <string name="quick_settings_cannot_delete_edit_tile">ไม่สามารถลบไทต์แก้ไขได้</string>
+ <string name="qs_tiles_reset_confirmation">คืนค่าการจัดวางไทต์เป็นค่าเริ่มต้น</string>
+ <string name="quick_settings_tile_reset_to_default">คืนค่าเป็นการจัดวางเริ่มต้น</string>
+ <string name="quick_settings_title_header">หัวข้อ</string>
+ <string name="quick_settings_title_tiles">ไทต์</string>
+ <string name="quick_settings_title_show_weather">แสดงสภาพอากาศ</string>
+ <string name="quick_settings_title_enlarge_first_row">ขยายแถวแรก</string>
+ <string name="screen_pinning_description_no_navbar">จะแสดงหน้านี้จนกว่าคุณจะเลิกปักหมุด กดปุ่มกลับค้างเพื่อเลิกปักหมุด</string>
+ <string name="quick_settings_custom_tile_detail_title">ไทล์กำหนดเอง</string>
+ <string name="quick_settings_remove">ลบไทล์ออก</string>
+ <string name="quick_settings_network_adb_label">ADB บนเครือข่าย</string>
+ <string name="quick_settings_compass_label">เข็มทิศ</string>
+ <string name="quick_settings_nfc_label">NFC</string>
+ <string name="quick_settings_profiles">โปรไฟล์ระบบ</string>
+ <string name="quick_settings_profiles_off">โปรไฟล์ถูกปิดอยู่</string>
+ <string name="accessibility_quick_settings_sync_off">ปิดการซิงค์</string>
+ <string name="accessibility_quick_settings_sync_on">การซิงค์เปิดอยู่</string>
+ <string name="accessibility_quick_settings_sync_changed_off">การซิงค์ปิดอยู่</string>
+ <string name="accessibility_quick_settings_sync_changed_on">การซิงค์เปิดอยู่</string>
+ <string name="quick_settings_sync_label">ซิงค์</string>
+ <string name="quick_settings_volume_panel_label">แผงควบคุมระดับเสียง</string>
+ <string name="quick_settings_usb_tether_label">ปล่อยสัญญาณผ่าน USB</string>
+ <string name="quick_settings_screen_timeout_detail_title">เวลาที่หน้าจอดับ</string>
+ <string name="quick_settings_lockscreen_label">หน้าจอล็อค</string>
+ <string name="quick_settings_ambient_display_label">หน้าจอแวดล้อม</string>
+ <string name="quick_settings_lockscreen_label_enforced">บังคับล็อคหน้าจอ</string>
+ <string name="accessibility_quick_settings_screen_timeout">หมดเวลาหน้าจอ: <xliff:g id="timeout" example="30 seconds">%s</xliff:g></string>
+ <string name="accessibility_quick_settings_screen_timeout_changed">หมดเวลาหน้าจอเปลี่ยนเป็น <xliff:g id="timeout" example="30 seconds">%s</xliff:g></string>
+ <string name="qs_tile_performance">รูปแบบแบตเตอรี่</string>
+ <string name="accessibility_quick_settings_perf_profile_pwrsv">รูปแบบแบตเตอรี่: ประหยัดพลังงาน</string>
+ <string name="accessibility_quick_settings_perf_profile_bal">รูปแบบแบตเตอรี่: สมดุล</string>
+ <string name="accessibility_quick_settings_perf_profile_perf">รูปแบบแบตเตอรี่: ประสิทธิภาพ</string>
+ <string name="accessibility_quick_settings_perf_profile_bias_power">รูปแบบแบตเตอรี่: รูปแบบใช้พลังงานต่ำ</string>
+ <string name="accessibility_quick_settings_perf_profile_bias_perf">รูปแบบแบตเตอรี่: รูปแบบรวดเร็ว</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_pwrsv">รูปแบบแบตเตอรี่เปลี่ยนเป็นรูปแบบประหยัดพลังงาน</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_bal">รูปแบบแบตเตอรี่เปลี่ยนเป็นสมดุล</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_perf">รูปแบบแบตเตอรี่เปลี่ยนเป็นรูปแบบประสิทธิภาพ</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_bias_power">รูปแบบแบตเตอรี่เปลี่ยนเป็นรูปแบบใช้พลังงานต่ำ</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_bias_perf">รูปแบบแบตเตอรี่เปลี่ยนเป็นรูปแบบรวดเร็ว</string>
+ <string name="quick_settings_performance_profile_detail_title">รูปแบบแบตเตอรี่</string>
+ <string name="accessibility_quick_settings_lock_screen_off">หน้าจอล็อคปิดอยู่</string>
+ <string name="accessibility_quick_settings_lock_screen_on">หน้าจอล็อคเปิดอยู่</string>
+ <string name="accessibility_quick_settings_lock_screen_changed_off">หน้าจอล็อคถูกปิด</string>
+ <string name="accessibility_quick_settings_lock_screen_changed_on">หน้าจอล็อคถูกเปิด</string>
+ <string name="accessibility_quick_settings_ambient_display_off">ปิดหน้าจอแวดล้อม</string>
+ <string name="accessibility_quick_settings_ambient_display_on">เปิดหน้าจอแวดล้อม</string>
+ <string name="accessibility_quick_settings_ambient_display_changed_off">หน้าจอแวดล้อมปิดอยู่</string>
+ <string name="accessibility_quick_settings_ambient_display_changed_on">หน้าจอแวดล้อมเปิดอยู่</string>
+ <string name="quick_settings_dynamic_tile_detail_title">ไทล์แบบไดนามิก</string>
<string name="dynamic_qs_tile_next_alarm_label">การปลุกครั้งต่อไป</string>
<string name="dynamic_qs_tile_ime_selector_label">ตัวเลือก IME</string>
- <string name="dynamic_qs_tile_su_label">การเข้าถึงราก</string>
+ <string name="dynamic_qs_tile_su_label">สิทธิผู้ดูแลระบบ</string>
+ <string name="accessibility_quick_settings_live_display_off">LiveDisplay ปิดอยู่</string>
+ <string name="accessibility_quick_settings_live_display_auto">LiveDisplay: รูปแบบอัตโนมัติ</string>
+ <string name="accessibility_quick_settings_live_display_day">LiveDisplay: รูปแบบกลางวัน</string>
+ <string name="accessibility_quick_settings_live_display_night">LiveDisplay: รูปแบบกลางคืน</string>
+ <string name="accessibility_quick_settings_live_display_outdoor">LiveDisplay: รูปแบบกลางแจ้ง</string>
+ <string name="accessibility_quick_settings_live_display_changed_off">LiveDisplay ถูกปิด</string>
+ <string name="accessibility_quick_settings_live_display_changed_auto">LiveDisplay เปลี่ยนเป็นรูปแบบอัตโนมัติ</string>
+ <string name="accessibility_quick_settings_live_display_changed_day">LiveDisplay เปลี่ยนเป็นรูปแบบกลางวัน</string>
+ <string name="accessibility_quick_settings_live_display_changed_night">LiveDisplay เปลี่ยนเป็นรูปแบบกลางคืน</string>
+ <string name="accessibility_quick_settings_live_display_changed_outdoor">LiveDisplay เปลี่ยนเป็นรูปแบบกลางแจ้ง</string>
+ <string name="quick_settings_title_advanced_location">ตำแหน่งแบบสามสถานะ</string>
+ <string name="accessibility_quick_settings_location_battery_saving">การระบุตำแหน่ง: รูปแบบประหยัดแบตเตอรี่</string>
+ <string name="accessibility_quick_settings_location_gps_only">รายงานตำแหน่งที่ตั้ง: เซนเซอร์เท่านั้น</string>
+ <string name="accessibility_quick_settings_location_high_accuracy">รูปแบบการระบุตำแหน่ง: ความแม่นยำสูง</string>
+ <string name="quick_settings_location_detail_title">รูปแบบตำแหน่งที่ตั้ง</string>
+ <string name="quick_settings_location_battery_saving_label">ประหยัดแบตเตอรี่</string>
+ <string name="quick_settings_location_gps_only_label">อุปกรณ์เท่านั้น</string>
+ <string name="quick_settings_location_high_accuracy_label">ความแม่นยำสูง</string>
+ <string name="accessibility_quick_settings_location_changed_battery_saving">ตำแหน่งการระบุเปลี่ยนเป็นรูปแบบประหยัดแบตเตอรี่</string>
+ <string name="accessibility_quick_settings_location_changed_gps_only">การระบุตำแหน่งเปลี่ยนเป็นรูปแบบเฉพาะเซนเซอร์</string>
+ <string name="accessibility_quick_settings_location_changed_high_accuracy">การระบุตำแหน่งเปลี่ยนรูปแบบเป็นความแม่นยำสูง</string>
</resources>
diff --git a/packages/SystemUI/res/values-tr/cm_strings.xml b/packages/SystemUI/res/values-tr/cm_strings.xml
index eb5e749..ebf75e0 100644
--- a/packages/SystemUI/res/values-tr/cm_strings.xml
+++ b/packages/SystemUI/res/values-tr/cm_strings.xml
@@ -58,7 +58,7 @@
<string name="quick_settings_title_show_weather">Hava durumunu göster</string>
<string name="quick_settings_title_enlarge_first_row">İlk satırı büyüt</string>
<string name="screen_pinning_description_no_navbar">Ekrandan kaldırana kadar görünümde tutar. Kaldırmak için Geri tuşuna dokunun ve tutun.</string>
- <string name="quick_settings_custom_tile_detail_title">Özel kareler</string>
+ <string name="quick_settings_custom_tile_detail_title">Özel kare</string>
<string name="quick_settings_remove">Kareyi kaldır</string>
<string name="quick_settings_network_adb_label">Ağ üzerinden ADB</string>
<string name="quick_settings_compass_label">Pusula</string>
@@ -91,7 +91,7 @@
<string name="accessibility_quick_settings_perf_profile_changed_bias_perf">Pil modu hızlı moda geçti.</string>
<string name="quick_settings_performance_profile_detail_title">Pil modu</string>
<string name="accessibility_quick_settings_lock_screen_off">Kilit ekranı kapalı.</string>
- <string name="accessibility_quick_settings_lock_screen_on">Kilit ekranı kapalı.</string>
+ <string name="accessibility_quick_settings_lock_screen_on">Kilit ekranı açık.</string>
<string name="accessibility_quick_settings_lock_screen_changed_off">Kilit ekranı kapatıldı.</string>
<string name="accessibility_quick_settings_lock_screen_changed_on">Kilit ekranı açıldı.</string>
<string name="accessibility_quick_settings_ambient_display_off">Bildirim ekranı kapalı.</string>
@@ -103,7 +103,7 @@
<string name="dynamic_qs_tile_ime_selector_label">IME seçici</string>
<string name="dynamic_qs_tile_su_label">Root erişimi</string>
<string name="accessibility_quick_settings_live_display_off">LiveDisplay kapalı.</string>
- <string name="accessibility_quick_settings_live_display_auto">LiveDisplay: otomatik.</string>
+ <string name="accessibility_quick_settings_live_display_auto">LiveDisplay: otomatik mod.</string>
<string name="accessibility_quick_settings_live_display_day">LiveDisplay: gündüz modu.</string>
<string name="accessibility_quick_settings_live_display_night">LiveDisplay: gece modu.</string>
<string name="accessibility_quick_settings_live_display_outdoor">LiveDisplay: açık hava modu.</string>
diff --git a/packages/SystemUI/res/values-vi/cm_arrays.xml b/packages/SystemUI/res/values-vi/cm_arrays.xml
new file mode 100644
index 0000000..582b87c
--- /dev/null
+++ b/packages/SystemUI/res/values-vi/cm_arrays.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Generated by crowdin.com-->
+<!--
+ Copyright (C) 2012-2014 The CyanogenMod Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array name="cardinal_directions">
+ <item>B</item>
+ <item>ĐB</item>
+ <item>Đ</item>
+ <item>ĐN</item>
+ <item>N</item>
+ <item>TN</item>
+ <item>T</item>
+ <item>TB</item>
+ </string-array>
+</resources>
diff --git a/packages/SystemUI/res/values-vi/cm_strings.xml b/packages/SystemUI/res/values-vi/cm_strings.xml
index aa2c78d..f343c99 100644
--- a/packages/SystemUI/res/values-vi/cm_strings.xml
+++ b/packages/SystemUI/res/values-vi/cm_strings.xml
@@ -31,23 +31,49 @@
<string name="navbar_menu_conditional_button">Phím trình đơn (tự ẩn)</string>
<string name="navbar_menu_always_button">Nút trình đơn (luôn hiện)</string>
<string name="navbar_menu_big_button">Nút trình đơn</string>
+ <string name="accessibility_dpad_left">Trỏ trái</string>
+ <string name="accessibility_dpad_right">Trỏ phải</string>
+ <string name="advanced_dev_option_wipe_app">Xoá dữ liệu ứng dụng</string>
+ <string name="advanced_dev_option_force_stop">Buộc dừng</string>
+ <string name="advanced_dev_option_uninstall">Gỡ cài đặt</string>
<string name="accessibility_quick_settings_profiles_off">Hồ sơ tắt.</string>
<string name="accessibility_quick_settings_profiles">Hồ sơ: <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
<string name="accessibility_quick_settings_profiles_changed_off">Hồ sơ đã tắt.</string>
<string name="accessibility_quick_settings_profiles_changed">Hồ sơ đã đổi thành <xliff:g id="profile" example="Default">%s</xliff:g>.</string>
+ <string name="quick_settings_compass_init">Đang khởi tạo\u2026</string>
<string name="screen_pinning_description_no_navbar">Điều này sẽ giúp nó hiển thị cho đến khi bạn bỏ ghim. Chạm và giữ nút Quay lại để bỏ ghim.</string>
<string name="quick_settings_custom_tile_detail_title">Kiểu xếp cạnh nhau tùy chỉnh</string>
<string name="quick_settings_remove">Gỡ kiểu xếp cạnh nhau</string>
+ <string name="quick_settings_network_adb_label">ADB qua mạng</string>
+ <string name="quick_settings_compass_label">La bàn</string>
+ <string name="quick_settings_nfc_label">NFC</string>
+ <string name="quick_settings_profiles">Cấu hình hệ thống</string>
+ <string name="quick_settings_profiles_off">Cấu hình bị vô hiệu hóa</string>
+ <string name="accessibility_quick_settings_sync_off">Tắt đồng bộ.</string>
+ <string name="accessibility_quick_settings_sync_on">Bật đồng bộ.</string>
+ <string name="accessibility_quick_settings_sync_changed_off">Đã tắt đồng bộ.</string>
+ <string name="accessibility_quick_settings_sync_changed_on">Đã bật đồng bộ.</string>
+ <string name="quick_settings_sync_label">Đồng bộ</string>
<string name="quick_settings_volume_panel_label">Bảng điều khiển âm lượng</string>
+ <string name="quick_settings_usb_tether_label">Kết nối mạng qua USB</string>
+ <string name="quick_settings_screen_timeout_detail_title">Thời gian sáng màn hình</string>
+ <string name="quick_settings_lockscreen_label">Màn hình khoá</string>
<string name="quick_settings_ambient_display_label">Hiển thị môi trường xung quanh</string>
+ <string name="quick_settings_lockscreen_label_enforced">Buộc khoá màn hình</string>
<string name="accessibility_quick_settings_screen_timeout">Thời gian chờ của màn hình: <xliff:g id="timeout" example="30 seconds">%s</xliff:g>.</string>
<string name="accessibility_quick_settings_screen_timeout_changed">Thời gian chờ của màn hình đã đổi thành <xliff:g id="timeout" example="30 seconds">%s</xliff:g>.</string>
+ <string name="qs_tile_performance">Chế độ pin</string>
<string name="accessibility_quick_settings_perf_profile_pwrsv">Chế độ pin: chế độ tiết kiệm năng lượng.</string>
<string name="accessibility_quick_settings_perf_profile_bal">Chế độ pin: chế độ cân bằng.</string>
<string name="accessibility_quick_settings_perf_profile_perf">Pin chế độ: chế độ hiệu suất.</string>
+ <string name="accessibility_quick_settings_perf_profile_bias_power">Chế độ pin: chế độ hiệu quả.</string>
+ <string name="accessibility_quick_settings_perf_profile_bias_perf">Chế độ pin: chế độ nhanh.</string>
<string name="accessibility_quick_settings_perf_profile_changed_pwrsv">Chế độ pin đã đổi sang chế độ tiết kiệm năng lượng.</string>
<string name="accessibility_quick_settings_perf_profile_changed_bal">Chế độ pin đã đổi sang chế độ cân bằng.</string>
<string name="accessibility_quick_settings_perf_profile_changed_perf">Chế độ pin đã đổi sang chế độ hiệu suất.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_bias_power">Chế độ pin được chuyển sang hiệu quả.</string>
+ <string name="accessibility_quick_settings_perf_profile_changed_bias_perf">Chế độ pin được chuyển sang nhanh.</string>
+ <string name="quick_settings_performance_profile_detail_title">Chế độ pin</string>
<string name="accessibility_quick_settings_lock_screen_off">Màn hình khóa tắt.</string>
<string name="accessibility_quick_settings_lock_screen_on">Màn hình khóa bật.</string>
<string name="accessibility_quick_settings_lock_screen_changed_off">Màn hình khóa đã tắt.</string>
@@ -70,6 +96,13 @@
<string name="accessibility_quick_settings_live_display_changed_day">LiveDisplay đã đổi sang chế độ ban ngày.</string>
<string name="accessibility_quick_settings_live_display_changed_night">LiveDisplay đã đổi sang chế độ ban đêm.</string>
<string name="accessibility_quick_settings_live_display_changed_outdoor">LiveDisplay đã đổi sang chế độ ngoài trời.</string>
+ <string name="accessibility_quick_settings_location_battery_saving">Báo cáo vị trí: chế độ tiết kiệm pin.</string>
+ <string name="accessibility_quick_settings_location_gps_only">Báo cáo vị trí: chế độ chỉ cám biến.</string>
+ <string name="accessibility_quick_settings_location_high_accuracy">Báo cáo vị trí: chế độ chính xác cao.</string>
+ <string name="quick_settings_location_detail_title">Chế độ vị trí</string>
+ <string name="quick_settings_location_battery_saving_label">Tiết kiệm pin</string>
+ <string name="quick_settings_location_gps_only_label">Chỉ thiết bị</string>
+ <string name="quick_settings_location_high_accuracy_label">Chính xác cao</string>
<string name="accessibility_quick_settings_location_changed_battery_saving">Báo cáo vị trí đã đổi sang chế độ tiết kiệm pin.</string>
<string name="accessibility_quick_settings_location_changed_gps_only">Báo cáo vị trí đã đổi sang chế độ chỉ cảm biến.</string>
<string name="accessibility_quick_settings_location_changed_high_accuracy">Báo cáo vị trí đã đổi sang chế độ chính xác cao.</string>
diff --git a/packages/SystemUI/res/values-zh-rCN/cm_strings.xml b/packages/SystemUI/res/values-zh-rCN/cm_strings.xml
index d9c4c22..184413e 100644
--- a/packages/SystemUI/res/values-zh-rCN/cm_strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/cm_strings.xml
@@ -50,7 +50,7 @@
<string name="led_notification_text">LED 灯由设置启用</string>
<string name="qs_tile_edit_header_instruction">长按瓷块来重新排列</string>
<string name="quick_settings_edit_label">编辑瓷块</string>
- <string name="quick_settings_cannot_delete_edit_tile">无法删除编辑的瓷块</string>
+ <string name="quick_settings_cannot_delete_edit_tile">不能删除“编辑”瓷块</string>
<string name="qs_tiles_reset_confirmation">重置快速设置瓷块位置为默认配置?</string>
<string name="quick_settings_tile_reset_to_default">重置为默认布局</string>
<string name="quick_settings_title_header">标题</string>
@@ -123,4 +123,6 @@
<string name="accessibility_quick_settings_location_changed_battery_saving">地理位置报告已修改为节能模式。</string>
<string name="accessibility_quick_settings_location_changed_gps_only">位置报告已修改为仅使用传感器模式。</string>
<string name="accessibility_quick_settings_location_changed_high_accuracy">位置报告已修改为准确度高模式。</string>
+ <string name="quick_settings_tiles_category_system">系统磁块</string>
+ <string name="quick_settings_tiles_add_tiles">添加磁块</string>
</resources>
diff --git a/packages/SystemUI/res/values/cm_colors.xml b/packages/SystemUI/res/values/cm_colors.xml
index 5578741..cedeeee 100644
--- a/packages/SystemUI/res/values/cm_colors.xml
+++ b/packages/SystemUI/res/values/cm_colors.xml
@@ -97,4 +97,10 @@
<color name="play_button_text_color">#000000</color>
<color name="zen_ic_close_tint_color">@android:color/white</color>
<color name="header_debug_info_text_color">#00A040</color>
+
+ <!-- QS Detailed View Text and Icon Colors -->
+ <color name="qs_detailed_default_text_color">@android:color/white</color>
+ <color name="qs_detailed_expansion_indicator_color">@color/qs_title_text_color</color>
+ <color name="qs_detailed_title_text_color">@color/qs_title_text_color</color>
+ <color name="qs_detailed_icon_tint_color">@color/qs_title_text_color</color>
</resources>
diff --git a/packages/SystemUI/res/values/cm_strings.xml b/packages/SystemUI/res/values/cm_strings.xml
index a41fd3c..481bdf5 100644
--- a/packages/SystemUI/res/values/cm_strings.xml
+++ b/packages/SystemUI/res/values/cm_strings.xml
@@ -211,4 +211,8 @@
<string name="accessibility_quick_settings_location_changed_gps_only">Location reporting changed to sensors only mode.</string>
<!-- Announcement made when the location tile changes to high accuracy (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_quick_settings_location_changed_high_accuracy">Location reporting changed to high accuracy mode.</string>
+
+ <string name="quick_settings_tiles_category_system">System tiles</string>
+ <!-- detail header when adding a tile -->
+ <string name="quick_settings_tiles_add_tiles">Add a tile</string>
</resources>
diff --git a/packages/SystemUI/res/xml/tuner_prefs.xml b/packages/SystemUI/res/xml/tuner_prefs.xml
index 3a41c3c..2d70faa 100644
--- a/packages/SystemUI/res/xml/tuner_prefs.xml
+++ b/packages/SystemUI/res/xml/tuner_prefs.xml
@@ -18,59 +18,8 @@
android:title="@string/system_ui_tuner">
<Preference
- android:key="qs_tuner"
- android:title="@string/quick_settings" />
-
- <PreferenceScreen
- android:title="@string/status_bar" >
-
- <com.android.systemui.tuner.StatusBarSwitch
- android:key="cast"
- android:title="@string/quick_settings_cast_title" />
-
- <com.android.systemui.tuner.StatusBarSwitch
- android:key="hotspot"
- android:title="@string/quick_settings_hotspot_label" />
-
- <com.android.systemui.tuner.StatusBarSwitch
- android:key="bluetooth"
- android:title="@string/quick_settings_bluetooth_label" />
-
- <com.android.systemui.tuner.StatusBarSwitch
- android:key="zen"
- android:title="@string/quick_settings_dnd_label" />
-
- <com.android.systemui.tuner.StatusBarSwitch
- android:key="alarm_clock"
- android:title="@string/status_bar_alarm" />
-
- <com.android.systemui.tuner.StatusBarSwitch
- android:key="managed_profile"
- android:title="@string/status_bar_work" />
-
- <com.android.systemui.tuner.StatusBarSwitch
- android:key="wifi"
- android:title="@string/quick_settings_wifi_label" />
-
- <com.android.systemui.tuner.StatusBarSwitch
- android:key="ethernet"
- android:title="@string/status_bar_ethernet" />
-
- <com.android.systemui.tuner.StatusBarSwitch
- android:key="mobile"
- android:title="@string/quick_settings_cellular_detail_title" />
-
- <com.android.systemui.tuner.StatusBarSwitch
- android:key="airplane"
- android:title="@string/status_bar_airplane" />
-
- </PreferenceScreen>
-
- <SwitchPreference
- android:key="battery_pct"
- android:title="@string/show_battery_percentage"
- android:summary="@string/show_battery_percentage_summary"
- android:persistent="false" />
+ android:key="statusbar_icon_blacklist"
+ android:title="@string/status_bar" />
<Preference
android:key="demo_mode"
diff --git a/packages/SystemUI/res/xml/tuner_statusbar_icons.xml b/packages/SystemUI/res/xml/tuner_statusbar_icons.xml
new file mode 100644
index 0000000..863c8b0
--- /dev/null
+++ b/packages/SystemUI/res/xml/tuner_statusbar_icons.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The CyanogenMod 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.
+-->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+ android:title="@string/status_bar">
+
+ <com.android.systemui.tuner.StatusBarSwitch
+ android:key="cast"
+ android:title="@string/quick_settings_cast_title"/>
+
+ <com.android.systemui.tuner.StatusBarSwitch
+ android:key="hotspot"
+ android:title="@string/quick_settings_hotspot_label"/>
+
+ <com.android.systemui.tuner.StatusBarSwitch
+ android:key="bluetooth"
+ android:title="@string/quick_settings_bluetooth_label"/>
+
+ <com.android.systemui.tuner.StatusBarSwitch
+ android:key="zen"
+ android:title="@string/quick_settings_dnd_label"/>
+
+ <com.android.systemui.tuner.StatusBarSwitch
+ android:key="alarm_clock"
+ android:title="@string/status_bar_alarm"/>
+
+ <com.android.systemui.tuner.StatusBarSwitch
+ android:key="managed_profile"
+ android:title="@string/status_bar_work"/>
+
+ <com.android.systemui.tuner.StatusBarSwitch
+ android:key="wifi"
+ android:title="@string/quick_settings_wifi_label"/>
+
+ <com.android.systemui.tuner.StatusBarSwitch
+ android:key="ethernet"
+ android:title="@string/status_bar_ethernet"/>
+
+ <com.android.systemui.tuner.StatusBarSwitch
+ android:key="mobile"
+ android:title="@string/quick_settings_cellular_detail_title"/>
+
+ <com.android.systemui.tuner.StatusBarSwitch
+ android:key="airplane"
+ android:title="@string/status_bar_airplane"/>
+
+</PreferenceScreen>
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 0957316..8555ef0 100755
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -30,7 +30,9 @@ import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.SharedPreferences;
import android.content.pm.UserInfo;
+import android.database.ContentObserver;
import android.media.AudioManager;
import android.media.SoundPool;
import android.os.Bundle;
@@ -57,6 +59,7 @@ import android.view.WindowManagerPolicy;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
+import com.android.systemui.cm.UserContentObserver;
import com.android.systemui.qs.tiles.LockscreenToggleTile;
import cyanogenmod.app.Profile;
import cyanogenmod.app.ProfileManager;
@@ -78,6 +81,7 @@ import com.android.systemui.statusbar.phone.PhoneStatusBar;
import com.android.systemui.statusbar.phone.ScrimController;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.phone.StatusBarWindowManager;
+import cyanogenmod.providers.CMSettings;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -343,6 +347,50 @@ public class KeyguardViewMediator extends SystemUI {
private boolean mWakeAndUnlocking;
private IKeyguardDrawnCallback mDrawnCallback;
+ private LockscreenEnabledSettingsObserver mSettingsObserver;
+ public static class LockscreenEnabledSettingsObserver extends UserContentObserver {
+
+ private static final String KEY_ENABLED = "lockscreen_enabled";
+
+ private boolean mObserving;
+ private SharedPreferences mPrefs;
+ private Context mContext;
+
+ public LockscreenEnabledSettingsObserver(Context context, Handler handler) {
+ super(handler);
+ mContext = context;
+ mPrefs = mContext.getSharedPreferences("quicksettings", Context.MODE_PRIVATE);
+ }
+
+ public boolean getPersistedDefaultOldSetting() {
+ return mPrefs.getBoolean(KEY_ENABLED, true);
+ }
+
+ @Override
+ public void observe() {
+ if (mObserving) {
+ return;
+ }
+ mObserving = true;
+ mContext.getContentResolver().registerContentObserver(CMSettings.Secure.getUriFor(
+ CMSettings.Secure.LOCKSCREEN_INTERNALLY_ENABLED), false, this,
+ UserHandle.USER_ALL);
+ update();
+ }
+
+ @Override
+ public void unobserve() {
+ if (mObserving) {
+ mObserving = false;
+ mContext.getContentResolver().unregisterContentObserver(this);
+ }
+ }
+
+ @Override
+ public void update() {
+ }
+ }
+
KeyguardUpdateMonitorCallback mUpdateCallback = new KeyguardUpdateMonitorCallback() {
@Override
@@ -634,6 +682,20 @@ public class KeyguardViewMediator extends SystemUI {
mHideAnimation = AnimationUtils.loadAnimation(mContext,
com.android.internal.R.anim.lock_screen_behind_enter);
+
+ mSettingsObserver = new LockscreenEnabledSettingsObserver(mContext, new Handler()) {
+ @Override
+ public void update() {
+ boolean newDisabledState = CMSettings.Secure.getIntForUser(mContext.getContentResolver(),
+ CMSettings.Secure.LOCKSCREEN_INTERNALLY_ENABLED,
+ getPersistedDefaultOldSetting() ? 1 : 0,
+ UserHandle.USER_CURRENT) == 0;
+ if (newDisabledState != mInternallyDisabled && mKeyguardBound) {
+ // it was updated,
+ setKeyguardEnabledInternal(!newDisabledState);
+ }
+ }
+ };
}
@Override
@@ -1298,9 +1360,11 @@ public class KeyguardViewMediator extends SystemUI {
}
} else if (KEYGUARD_SERVICE_ACTION_STATE_CHANGE.equals(intent.getAction())) {
mKeyguardBound = intent.getBooleanExtra(KEYGUARD_SERVICE_EXTRA_ACTIVE, false);
- context.sendBroadcast(new Intent(
- LockscreenToggleTile.ACTION_APPLY_LOCKSCREEN_STATE)
- .setPackage(context.getPackageName()));
+ if (mKeyguardBound) {
+ mSettingsObserver.observe();
+ } else {
+ mSettingsObserver.unobserve();
+ }
}
}
};
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java
index 9326504..df45120 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSDragPanel.java
@@ -23,24 +23,35 @@ import android.app.AlertDialog;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
-import android.content.res.Resources;
+import android.content.Intent;
+import android.content.pm.PackageManager;
import android.content.res.Configuration;
+import android.content.res.Resources;
import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Point;
import android.graphics.PointF;
+import android.graphics.PorterDuff;
+import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.UserHandle;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
+import android.util.ArrayMap;
import android.util.AttributeSet;
import android.util.Log;
import android.view.DragEvent;
import android.view.LayoutInflater;
+import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
+import android.widget.BaseExpandableListAdapter;
import android.widget.EditText;
+import android.widget.ExpandableListView;
import android.widget.ImageView;
+import android.widget.LinearLayout;
import android.widget.TextView;
import com.android.internal.logging.MetricsLogger;
import com.android.systemui.FontSizeUtils;
@@ -54,14 +65,11 @@ import com.android.systemui.statusbar.phone.QSTileHost;
import com.android.systemui.statusbar.phone.SystemUIDialog;
import com.android.systemui.statusbar.policy.BrightnessMirrorController;
import com.android.systemui.tuner.QsTuner;
-
import com.viewpagerindicator.CirclePageIndicator;
-
-import org.cyanogenmod.internal.util.QSUtils;
-
-import cyanogenmod.providers.CMSettings;
-
import cyanogenmod.app.StatusBarPanelCustomTile;
+import cyanogenmod.providers.CMSettings;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
+import org.cyanogenmod.internal.util.QSUtils;
import java.util.ArrayList;
import java.util.Arrays;
@@ -69,6 +77,7 @@ import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
public class QSDragPanel extends QSPanel implements View.OnDragListener, View.OnLongClickListener {
@@ -88,7 +97,7 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
CirclePageIndicator mPageIndicator;
private TextView mDetailRemoveButton;
- private DragTileRecord mDraggingRecord;
+ private DragTileRecord mDraggingRecord, mLastDragRecord;
private boolean mEditing;
private boolean mDragging;
private float mLastTouchLocationX, mLastTouchLocationY;
@@ -107,6 +116,9 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
= Collections.synchronizedList(new ArrayList<TileRecord>());
private Collection<QSTile<?>> mTempTiles = null;
+ private Point mDisplaySize;
+ private int[] mTmpLoc;
+
public QSDragPanel(Context context) {
this(context, null);
}
@@ -150,11 +162,13 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
});
// add target click listener
- mQsPanelTop.findViewById(R.id.add_target).setOnClickListener(
+ mQsPanelTop.getAddTarget().setOnClickListener(
new OnClickListener() {
@Override
public void onClick(View v) {
- showAddDialog();
+ TilesListAdapter adapter = new TilesListAdapter(mContext, QSDragPanel.this);
+ showDetailAdapter(true, adapter,
+ v.getLocationOnScreen());
}
});
mViewPager = new QSViewPager(getContext());
@@ -334,7 +348,10 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
}
protected void drawTile(TileRecord r, QSTile.State state) {
- final int visibility = state.visible || mEditing ? VISIBLE : GONE;
+ if (mEditing) {
+ state.visible = true;
+ }
+ final int visibility = state.visible ? VISIBLE : GONE;
setTileVisibility(r.tileView, visibility);
r.tileView.onStateChanged(state);
}
@@ -389,8 +406,8 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
mPageIndicator.setEditing(editing);
mPagerAdapter.notifyDataSetChanged();
- ensurePagerState();
requestLayout();
+ ensurePagerState();
}
protected void onStartDrag() {
@@ -400,6 +417,7 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
protected void onStopDrag() {
mDraggingRecord.tileView.setAlpha(1f);
+ mLastDragRecord = mDraggingRecord;
mDraggingRecord = null;
mDragging = false;
mRestored = false;
@@ -408,7 +426,6 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
mLastRightShift = -1;
mQsPanelTop.onStopDrag();
-
requestLayout();
ensurePagerState();
}
@@ -426,7 +443,10 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
}
protected int getPagesForCount(int tileCount) {
- tileCount -= getTilesPerPage(true);
+ if (tileCount == 0) {
+ return 1;
+ }
+ tileCount = Math.max(0, tileCount - getTilesPerPage(true));
// first page + rest of tiles
return 1 + (int) Math.ceil(tileCount / (double) getTilesPerPage(false));
}
@@ -475,25 +495,95 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
return pages;
}
- public void setTiles(Collection<QSTile<?>> tiles) {
- if (DEBUG_DRAG) {
- Log.i(TAG, "setTiles() called with " + "tiles = ["
- + tiles + "], mTempTiles: " + mTempTiles);
- if (mTempTiles != null) {
- Log.e(TAG, "temp tiles being overridden... : " +
- Arrays.toString(mTempTiles.toArray()));
+ public void setTiles(final Collection<QSTile<?>> tilesCollection) {
+ final List<QSTile<?>> tiles = new ArrayList<>(tilesCollection);
+ if (isLaidOut()) {
+ if (DEBUG_DRAG) {
+ Log.i(TAG, "setTiles() called with " + "tiles = ["
+ + tiles + "], mTempTiles: " + mTempTiles);
+ if (mTempTiles != null) {
+ Log.e(TAG, "temp tiles being overridden... : " +
+ Arrays.toString(mTempTiles.toArray()));
+ }
}
- }
- for (Record record : mRecords) {
- if (record instanceof DragTileRecord) {
- DragTileRecord dr = (DragTileRecord) record;
- mPages.get(dr.page).removeView(dr.tileView);
+
+ if (mLastDragRecord != null && mRecords.indexOf(mLastDragRecord) == -1) {
+ // the last removed record might be stored in mLastDragRecord if we just shifted
+ // re-add it to the list so we'll clean it up below
+ mRecords.add(mLastDragRecord);
+ mLastDragRecord = null;
}
- }
- mRecords.clear();
- if (isLaidOut()) {
- for (QSTile<?> tile : tiles) {
- addTile(tile);
+
+ Map<QSTile<?>, DragTileRecord> recordMap = new ArrayMap<>();
+ Iterator<TileRecord> iterator = mRecords.iterator();
+
+ int recordsRemoved = 0;
+ // cleanup current records
+ while (iterator.hasNext()) {
+ DragTileRecord dr = (DragTileRecord) iterator.next();
+
+ if (tiles.contains(dr.tile)) {
+ if (DEBUG_DRAG) {
+ Log.i(TAG, "caching tile: " + dr.tile);
+ }
+ recordMap.put(dr.tile, dr);
+ } else {
+ if (DEBUG_DRAG) {
+ Log.i(TAG, "removing tile: " + dr.tile);
+ }
+ // clean up view
+ mPages.get(dr.page).removeView(dr.tileView);
+
+ // remove record
+ iterator.remove();
+ recordsRemoved++;
+ }
+ }
+
+
+ // at this point recordMap should have all retained tiles, no new or old tiles
+ int delta = tiles.size() - recordMap.size() - recordsRemoved;
+ if (DEBUG_DRAG) {
+ Log.i(TAG, "record map delta: " + delta);
+ }
+ mRecords.ensureCapacity(tiles.size());
+ mPagerAdapter.notifyDataSetChanged();
+
+ // add new tiles
+ for (int i = 0; i < tiles.size(); i++) {
+ QSTile<?> tile = tiles.get(i);
+ final int tileDestPage = getPagesForCount(i + 1) - 1;
+
+ if (DEBUG_DRAG) {
+ Log.d(TAG, "tile at : " + i + ": " + tile + " to dest page: " + tileDestPage);
+ }
+ if (!recordMap.containsKey(tile)) {
+ DragTileRecord record = makeRecord(tile);
+ record.destinationPage = tileDestPage;
+ recordMap.put(tile, record);
+ mRecords.add(i, record);
+ mPagerAdapter.notifyDataSetChanged();
+
+ // add the view
+ mPages.get(record.destinationPage).addView(record.tileView);
+ record.page = record.destinationPage;
+ if (DEBUG_DRAG) {
+ Log.d(TAG, "added new record " + record);
+ }
+ } else {
+ DragTileRecord record = recordMap.get(tile);
+ int indexOf = mRecords.indexOf(record);
+ if (indexOf != i) {
+ if (DEBUG_DRAG) {
+ Log.w(TAG, "moving index of " + record + " from "
+ + indexOf + " to " + i);
+ }
+ Collections.swap(mRecords, indexOf, i);
+
+ record.destinationPage = tileDestPage;
+ ensureDestinationPage(record);
+ }
+ }
}
if (isShowingDetail()) {
mDetail.bringToFront();
@@ -505,26 +595,32 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
mTempTiles = Collections.synchronizedCollection(new ArrayList<QSTile<?>>(tiles));
}
mPagerAdapter.notifyDataSetChanged();
+
+ refreshAllTiles();
requestLayout();
- ensurePagerState();
}
- protected void addTile(final QSTile<?> tile) {
+ private void ensureDestinationPage(DragTileRecord record) {
+ if (record.destinationPage != record.page) {
+ if (record.page >= 0) {
+ getPage(record.page).removeView(record.tileView);
+ }
+ getPage(record.destinationPage).addView(record.tileView);
+ record.page = record.destinationPage;
+ }
+ }
+
+ private DragTileRecord makeRecord(final QSTile<?> tile) {
if (DEBUG_DRAG) {
- Log.d(TAG, "+++ addTile() called with " + "tile = [" + tile + "]");
+ Log.d(TAG, "+++ makeRecord() called with " + "tile = [" + tile + "]");
}
final DragTileRecord r = new DragTileRecord();
- mRecords.add(r);
- mPagerAdapter.notifyDataSetChanged();
-
- int potentialPageIdx = getPagesForCount(mRecords.size()) - 1;
r.tile = tile;
- r.page = potentialPageIdx;
- r.destinationPage = r.page;
+ r.page = -1;
+ r.destinationPage = -1;
r.tileView = tile.createTileView(mContext);
- r.tileView.setVisibility(View.GONE);
final QSTile.Callback callback = new QSTile.Callback() {
@Override
public void onStateChanged(QSTile.State state) {
@@ -589,13 +685,32 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
r.tileView.init(click, clickSecondary, longClick);
r.tile.setListening(mListening);
r.tile.refreshState();
- if (mEditing) {
- // force it to be visible, we'll refresh its state once editing is done
- r.tile.getState().visible = true;
- }
+ r.tileView.setVisibility(mEditing ? View.VISIBLE : View.GONE);
callback.onStateChanged(r.tile.getState());
- mPages.get(r.page).addView(r.tileView);
+ if (DEBUG_DRAG) {
+ Log.d(TAG, "--- makeRecord() called with " + "tile = [" + tile + "]");
+ }
+ return r;
+ }
+
+ private void addTile(final QSTile<?> tile) {
+ if (DEBUG_DRAG) {
+ Log.d(TAG, "+++ addTile() called with " + "tile = [" + tile + "]");
+ }
+ DragTileRecord r = makeRecord(tile);
+ mRecords.add(r);
+ mPagerAdapter.notifyDataSetChanged();
+
+ r.destinationPage = getPagesForCount(mRecords.size()) - 1;
+
+ if (DEBUG_DRAG) {
+ Log.d(TAG, "destinationPage: " + r.destinationPage);
+ }
+
+ mPages.get(r.destinationPage).addView(r.tileView);
+ r.page = r.destinationPage;
+ drawTile(r, r.tile.getState());
ensurePagerState();
@@ -612,13 +727,20 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
}
public int getTilesPerPage(boolean firstPage) {
- if ((!mFirstRowLarge && firstPage)|| !firstPage) {
+ if ((!mFirstRowLarge && firstPage) || !firstPage) {
return QSTileHost.TILES_PER_PAGE + 1;
}
return QSTileHost.TILES_PER_PAGE;
}
@Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ super.onSizeChanged(w, h, oldw, oldh);
+ mTmpLoc = null;
+ mDisplaySize = null;
+ }
+
+ @Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
final int width = MeasureSpec.getSize(widthMeasureSpec);
@@ -639,8 +761,32 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
if (mDetail.getMeasuredHeight() < h) {
mDetail.measure(exactly(width), exactly(h));
}
- mGridHeight = h;
- setMeasuredDimension(width, Math.max(h, mDetail.getMeasuredHeight()));
+
+ // Check if the detail view would be overflowing below the physical height of the device
+ // and cutting the content off. If it is, reduce the detail height to fit.
+ if (isShowingDetail()) {
+ if (mDisplaySize == null) {
+ mDisplaySize = new Point();
+ getDisplay().getSize(mDisplaySize);
+ }
+ if (mTmpLoc == null) {
+ mTmpLoc = new int[2];
+ mDetail.getLocationOnScreen(mTmpLoc);
+ }
+
+ final int containerTop = mTmpLoc[1];
+ final int detailBottom = containerTop + mDetail.getMeasuredHeight();
+ if (detailBottom >= mDisplaySize.y) {
+ // panel is hanging below the screen
+ final int detailMinHeight = mDisplaySize.y - containerTop;
+ mDetail.measure(exactly(width), exactly(detailMinHeight));
+ }
+ setMeasuredDimension(width, mDetail.getMeasuredHeight());
+ mGridHeight = mDetail.getMeasuredHeight();
+ } else {
+ setMeasuredDimension(width, h);
+ mGridHeight = h;
+ }
for (TileRecord record : mRecords) {
setupRecord(record);
@@ -686,8 +832,7 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
// layout page indicator below view pager
mPageIndicator.layout(0, top, w, top + mPageIndicator.getMeasuredHeight());
- // detail takes up whole height
- mDetail.layout(0, 0, mDetail.getMeasuredWidth(), getMeasuredHeight());
+ mDetail.layout(0, 0, w, mDetail.getMeasuredHeight());
if (mFooter.hasFooter()) {
View footer = mFooter.getView();
@@ -703,6 +848,7 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
}
mTempTiles = null;
mPagerAdapter.notifyDataSetChanged();
+ requestLayout();
}
ensurePagerState();
}
@@ -717,7 +863,7 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
return mColumns;
}
- public int getColumnCount(int page, int row) {
+ public int getColumnCount(int page, int row, boolean smart) {
int cols = 0;
for (Record record : mRecords) {
if (record instanceof DragTileRecord) {
@@ -728,24 +874,30 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
}
}
- if (isEditing() && (isDragging() || mRestoring) && !isDragRecordAttached()) {
+ if (smart && isEditing() && (isDragging() || mRestoring) && !isDragRecordAttached()) {
// if shifting tiles back, and one moved from previous page
// if it's the very last row on the last page, we should add an extra column to account
- // for where teh dragging record would go
- DragTileRecord record = (DragTileRecord) mRecords.get(mRecords.size() - 1);
-
- if (record.destinationPage == page && record.row == row && cols < getColumnCount()) {
+ // for where teh dragging lastRecord would go
+ DragTileRecord lastRecord = (DragTileRecord) mRecords.get(mRecords.size() - 1);
+ if (lastRecord.destinationPage == page && lastRecord.row == row
+ && cols < getColumnCount()) {
cols++;
if (DEBUG_DRAG) {
- Log.w(TAG, "adding another col, cols: " + cols + ", last: " + record
- + ", drag: " + mDraggingRecord + ", ");
+ boolean draggingRecordBefore = isBefore(mDraggingRecord, lastRecord);
+ Log.w(TAG, "adding another col, cols: " + cols + ", last: " + lastRecord
+ + ", drag: " + mDraggingRecord
+ + ", and dragging record before last: " + draggingRecordBefore);
}
}
}
return cols;
}
+ public int getColumnCount(int page, int row) {
+ return getColumnCount(page, row, true);
+ }
+
public int getCurrentMaxRow() {
int max = 0;
for (TileRecord record : mRecords) {
@@ -865,15 +1017,13 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
return true;
} else {
mRestored = true;
- getPage(mDraggingRecord.page).removeView(mDraggingRecord.tileView);
-
// what spec is this tile?
String spec = mHost.getSpec(mDraggingRecord.tile);
if (DEBUG_DRAG) {
Log.w(TAG, "removing tile: " + mDraggingRecord + " with spec: " + spec);
}
- mHost.remove(spec);
onStopDrag();
+ mHost.remove(spec);
}
} else {
restoreDraggingTilePosition(v);
@@ -1050,9 +1200,18 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
// setup x destination to animate to
float destinationX = mDraggingRecord.destination.x;
- if (mDraggingRecord.destinationPage + 1 > mViewPager.getCurrentItem()) {
+
+ // see if we should animate this to the left or right off the page
+ // the +1's are to account for the edit page
+ if (mDraggingRecord.destinationPage > mViewPager.getCurrentItem() - 1) {
+ if (DEBUG_DRAG) {
+ Log.d(TAG, "adding width to animate out >>>>>");
+ }
destinationX += getWidth();
- } else if (mDraggingRecord.destinationPage + 1 < mViewPager.getCurrentItem()) {
+ } else if (mDraggingRecord.destinationPage < mViewPager.getCurrentItem() - 1) {
+ if (DEBUG_DRAG) {
+ Log.d(TAG, "removing width to animate out <<<<<");
+ }
destinationX -= getWidth();
}
@@ -1076,11 +1235,12 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
final QSPage targetP = getPage(mDraggingRecord.destinationPage);
- if (dragRecordDetached) {
- Log.i(TAG, "drag record was detached");
-
- } else {
- Log.i(TAG, "drag record was attached");
+ if (DEBUG_DRAG) {
+ if (dragRecordDetached) {
+ Log.i(TAG, "drag record was detached");
+ } else {
+ Log.i(TAG, "drag record was attached");
+ }
}
mDraggingRecord.page = mDraggingRecord.destinationPage;
targetP.addView(mDraggingRecord.tileView);
@@ -1130,18 +1290,15 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
Log.w(TAG, "tile's destination page moved to: " + tile.destinationPage);
}
}
- int columnCount = Math.max(1, getColumnCount(tile.destinationPage, tile.row));
+ int columnCount = Math.max(1, getColumnCount(tile.destinationPage, tile.row, false));
+ if (columnCount < maxCols) {
+ // if columncount gives us 1 and we're at col 2
+ columnCount = Math.max((tile.col + 1), columnCount);
+ }
if (DEBUG_DRAG) {
- Log.w(TAG, "columCount initially at: " + columnCount);
+ Log.w(TAG, "columCount at: " + columnCount);
}
- if (!mRecords.contains(tile) && tile != mDraggingRecord) {
- // increase column count for the destination location to account for this tile being added
- columnCount++;
- if (DEBUG_DRAG) {
- Log.w(TAG, "column count adjusted to: " + columnCount);
- }
- }
boolean firstRowLarge = mFirstRowLarge && tile.row == 0 && tile.destinationPage == 0;
tile.destination.x = getLeft(tile.row, tile.col, columnCount, firstRowLarge);
@@ -1153,11 +1310,34 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
}
}
+ private boolean isBefore(DragTileRecord r1, DragTileRecord r2) {
+ if (DEBUG_DRAG) {
+ Log.d(TAG, "isBefore() called with " + "r1 = [" + r1 + "], r2 = [" + r2 + "]");
+ }
+ boolean isBefore = r1.destinationPage <= r2.destinationPage;
+ if (r1.destinationPage == r2.destinationPage) {
+ isBefore = r1.row <= r2.row;
+ if (r1.row == r2.row) {
+ isBefore = r1.col <= r2.col;
+ }
+ }
+
+ if (DEBUG_DRAG) {
+ Log.d(TAG, "r1 isBefore r2: " + isBefore);
+ }
+ return isBefore;
+ }
+
private void setToLastDestination(DragTileRecord record) {
DragTileRecord last = (DragTileRecord) mRecords.get(mRecords.size() - 1);
- Log.d(TAG, "setToLastDestination() called with record = ["
- + record + "], and last record is: " + last);
- if (record != last && record.destinationPage <= last.destinationPage) {
+ if (DEBUG_DRAG) {
+ Log.d(TAG, "setToLastDestination() called with record = ["
+ + record + "], and last record is: " + last);
+ }
+
+ if (isBefore(record, last)) {
+ // if the record is before the last record in the records list, set it to the
+ // last location, then spoof it one space forward
record.destinationPage = last.destinationPage;
record.row = last.row;
record.col = last.col;
@@ -1398,7 +1578,9 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
if (ti.row != lastRow) {
desiredColCount = getColumnCount(ti.destinationPage, ti.row);
- Log.e(TAG, "updating desired colum count to: " + desiredColCount);
+ if (DEBUG_DRAG) {
+ Log.e(TAG, "updating desired colum count to: " + desiredColCount);
+ }
}
// save current tile's loc
@@ -1499,14 +1681,6 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
}
}
- public int getDesiredColumnCount(int page, int row) {
- if (page == 0 && row == 0) {
- return 2; // TODO change if large tiles are disabled
- } else {
- return mColumns;
- }
- }
-
@Override
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
@@ -1518,7 +1692,7 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
super.setExpanded(expanded);
if (!expanded) {
if (mEditing) {
- setEditing(false);
+ mHost.setEditing(false);
}
}
}
@@ -1552,74 +1726,319 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
return mCurrentlyAnimating.contains(t);
}
- // todo implement proper add tile ui
- protected void showAddDialog() {
- List<String> currentTileSpec = mHost.getTileSpecs();
- final List<String> availableTilesSpec = QSUtils.getAvailableTiles(getContext());
+ public static class TilesListAdapter extends BaseExpandableListAdapter
+ implements QSTile.DetailAdapter {
+
+ public static final String PACKAGE_ANDROID = "android";
+
+ Context mContext;
+ QSTileHost mHost;
+ QSDragPanel mPanel;
+
+ ArrayMap<String, List<String>> mPackageTileMap = new ArrayMap<>();
+
+ public TilesListAdapter(Context context, QSDragPanel panel) {
+ mContext = context;
+ mHost = panel.getHost();
+ mPanel = panel;
+
+ List<String> currentTileSpec = mHost.getTileSpecs();
+ final Collection<String> tiles = QSUtils.getAvailableTiles(mContext);
+ tiles.removeAll(currentTileSpec);
+
+ // we'll always have a system tiles category
+ mPackageTileMap.put(PACKAGE_ANDROID, new ArrayList<String>());
+
+ final Iterator<String> i = tiles.iterator();
+ while (i.hasNext()) {
+ final String spec = i.next();
+ if (QSUtils.isStaticQsTile(spec) || QSUtils.isDynamicQsTile(spec)) {
+ List<String> packageList = mPackageTileMap.get(PACKAGE_ANDROID);
+ packageList.add(spec);
+ } else {
+ String tilePackage = getCustomTilePackage(spec);
+ List<String> packageList = mPackageTileMap.get(tilePackage);
+ if (packageList == null) {
+ mPackageTileMap.put(tilePackage, packageList = new ArrayList<>());
+ }
+ packageList.add(spec);
+ }
+ }
+
+ // add broadcast tile
+ mPackageTileMap.get(PACKAGE_ANDROID).add(BROADCAST_TILE_SPEC_PLACEHOLDER);
+ }
+
+ private String getCustomTilePackage(String spec) {
+ StatusBarPanelCustomTile sbc = mHost.getCustomTileData().get(spec).sbc;
+ return sbc.getPackage();
+ }
+
+ @Override
+ public int getGroupCount() {
+ return mPackageTileMap.keySet().size();
+ }
+
+ @Override
+ public int getChildrenCount(int groupPosition) {
+ return mPackageTileMap.valueAt(groupPosition).size();
+ }
+
+ @Override
+ public String getGroup(int groupPosition) {
+ return mPackageTileMap.keyAt(groupPosition);
+ }
+
+ @Override
+ public String getChild(int groupPosition, int childPosition) {
+ return mPackageTileMap.valueAt(groupPosition).get(childPosition);
+ }
+
+ @Override
+ public long getGroupId(int groupPosition) {
+ return groupPosition;
+ }
- // Remove tiles already used
- availableTilesSpec.removeAll(currentTileSpec);
+ @Override
+ public long getChildId(int groupPosition, int childPosition) {
+ return mPackageTileMap.valueAt(groupPosition).get(childPosition).hashCode();
+ }
+
+ @Override
+ public boolean hasStableIds() {
+ return true;
+ }
- // Populate labels
- List<String> availableTilesLabel = new ArrayList<String>();
- for (String tileSpec : availableTilesSpec) {
- int resource = QSTileHost.getLabelResource(tileSpec);
- if (resource != 0) {
- availableTilesLabel.add(getContext().getString(resource));
+ @Override
+ public View getGroupView(int groupPosition, boolean isExpanded, View convertView,
+ ViewGroup parent) {
+ LinearLayout row = (LinearLayout) convertView;
+ if (row == null) {
+ row = (LinearLayout) LayoutInflater.from(mContext)
+ .inflate(R.layout.qs_tile_category_row, parent, false);
+ }
+ TextView title = (TextView) row.findViewById(android.R.id.title);
+
+ ImageView systemOrAppIcon = (ImageView) row.findViewById(android.R.id.icon);
+ ImageView expansionIndicator = (ImageView) row.findViewById(android.R.id.icon2);
+
+ expansionIndicator.setImageResource(isExpanded ? R.drawable.ic_qs_tile_contract
+ : R.drawable.ic_qs_tile_expand);
+ // hide indicator when there's only 1 group
+ final boolean singleGroupMode = getGroupCount() == 1;
+ expansionIndicator.setVisibility(singleGroupMode ? View.GONE : View.VISIBLE);
+
+ String group = getGroup(groupPosition);
+ if (group.equals(PACKAGE_ANDROID)) {
+ group = mContext.getText(R.string.quick_settings_tiles_category_system).toString();
+ // special icon
+ systemOrAppIcon.setImageResource(R.drawable.ic_qs_tile_category_system);
} else {
- availableTilesLabel.add(tileSpec);
+ systemOrAppIcon.setImageResource(R.drawable.ic_qs_tile_category_other);
}
+ title.setText(group);
+
+ if (isExpanded) {
+ expansionIndicator.setColorFilter(
+ mContext.getColor(
+ R.color.qs_detailed_expansion_indicator_color), PorterDuff.Mode.SRC_ATOP);
+ systemOrAppIcon.setColorFilter(
+ mContext.getColor(R.color.qs_detailed_icon_tint_color), PorterDuff.Mode.SRC_ATOP);
+ title.setTextColor(mContext.getColor(R.color.qs_detailed_title_text_color));
+ } else {
+ title.setTextColor(mContext.getColor(R.color.qs_detailed_default_text_color));
+ systemOrAppIcon.setColorFilter(null);
+ expansionIndicator.setColorFilter(null);
+ }
+ return row;
}
- // Add broadcast tile
- availableTilesLabel.add(getContext().getString(R.string.broadcast_tile));
- availableTilesSpec.add(BROADCAST_TILE_SPEC_PLACEHOLDER);
+ @Override
+ public View getChildView(int groupPosition, int childPosition, boolean isLastChild,
+ View convertView, ViewGroup parent) {
+ LinearLayout child = (LinearLayout) convertView;
+ if (child == null) {
+ child = (LinearLayout) LayoutInflater.from(mContext)
+ .inflate(R.layout.qs_tile_child_row, parent, false);
+ }
+ String spec = getChild(groupPosition, childPosition);
+
+ TextView title = (TextView) child.findViewById(android.R.id.title);
+ title.setText(getQSTileLabel(spec));
- String[] items = new String[availableTilesLabel.size()];
- availableTilesLabel.toArray(items);
+ ImageView icon = (ImageView) child.findViewById(android.R.id.icon);
+ icon.setImageDrawable(getQSTileIcon(spec));
- final AlertDialog d = new AlertDialog.Builder(getContext(), R.style.Theme_SystemUI_Dialog)
- .setTitle(R.string.add_tile)
- .setItems(items, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- String tileSpec = availableTilesSpec.get(which);
- if (tileSpec.equals(BROADCAST_TILE_SPEC_PLACEHOLDER)) {
- showBroadcastTileDialog();
- } else {
- add(tileSpec);
- }
+ return child;
+ }
+
+ private String getQSTileLabel(String spec) {
+ if (spec.equals(BROADCAST_TILE_SPEC_PLACEHOLDER)) {
+ return mContext.getText(R.string.broadcast_tile).toString();
+ } else if (QSUtils.isStaticQsTile(spec)) {
+ int resource = QSTileHost.getLabelResource(spec);
+ return mContext.getText(resource).toString();
+ } else if (QSUtils.isDynamicQsTile(spec)) {
+ return QSUtils.getDynamicQSTileLabel(mContext,
+ UserHandle.myUserId(), spec);
+ } else {
+ return getPackageLabel(getCustomTilePackage(spec));
+ }
+ }
+
+ private Drawable getQSTileIcon(String spec) {
+ if (QSUtils.isDynamicQsTile(spec)) {
+ return QSTile.ResourceIcon.get(
+ QSUtils.getDynamicQSTileResIconId(mContext, UserHandle.myUserId(), spec))
+ .getDrawable(mContext);
+ } else if (QSUtils.isStaticQsTile(spec)) {
+ return QSTile.ResourceIcon.get(QSTileHost.getIconResource(spec))
+ .getDrawable(mContext);
+ } else {
+ QSTile<?> tile = mHost.getTile(spec);
+ if (tile != null) {
+ QSTile.State state = tile.getState();
+ if (state != null && state.icon != null) {
+ return state.icon.getDrawable(mContext);
}
- }).create();
- SystemUIDialog.makeSystemUIDialog(d);
- d.show();
- }
+ }
+ if (spec.equals(BROADCAST_TILE_SPEC_PLACEHOLDER)) {
+ return getPackageDrawable(PACKAGE_ANDROID);
+ }
+ return getPackageDrawable(getCustomTilePackage(spec));
+ }
+ }
- public void showBroadcastTileDialog() {
- final EditText editText = new EditText(getContext());
- final AlertDialog d = new AlertDialog.Builder(getContext())
- .setTitle(R.string.broadcast_tile)
- .setView(editText)
- .setNegativeButton(android.R.string.cancel, null)
- .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
- public void onClick(DialogInterface dialog, int which) {
- String action = editText.getText().toString();
- if (isValid(action)) {
- add(IntentTile.PREFIX + action + ')');
- }
+ private String getPackageLabel(String packageName) {
+ try {
+ return mContext.getPackageManager().getApplicationLabel(
+ mContext.getPackageManager().getApplicationInfo(packageName, 0)).toString();
+ } catch (PackageManager.NameNotFoundException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ private Drawable getPackageDrawable(String packageName) {
+ try {
+ return mContext.getPackageManager().getApplicationIcon(packageName);
+ } catch (PackageManager.NameNotFoundException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isChildSelectable(int groupPosition, int childPosition) {
+ return true;
+ }
+
+ @Override
+ public int getTitle() {
+ return R.string.quick_settings_tiles_add_tiles;
+ }
+
+ @Override
+ public Boolean getToggleState() {
+ return null;
+ }
+
+ @Override
+ public View createDetailView(Context context, View convertView, ViewGroup parent) {
+ ExpandableListView lv = (ExpandableListView) convertView;
+ if (lv == null) {
+ lv = new ExpandableListView(parent.getContext());
+ lv.setOnTouchListener(new OnTouchListener() {
+ // Setting on Touch Listener for handling the touch inside ScrollView
+ @Override
+ public boolean onTouch(View v, MotionEvent event) {
+ // Disallow the touch request for parent scroll on touch of child view
+ v.getParent().requestDisallowInterceptTouchEvent(true);
+ return false;
}
- }).create();
- SystemUIDialog.makeSystemUIDialog(d);
- d.show();
- }
+ });
+ }
+ lv.setAdapter(this);
+ lv.expandGroup(mPackageTileMap.indexOfKey(PACKAGE_ANDROID));
+ lv.setGroupIndicator(null);
+ lv.setChildIndicator(null);
+ lv.setChildDivider(new ColorDrawable(Color.TRANSPARENT));
+ lv.setOnChildClickListener(new ExpandableListView.OnChildClickListener() {
+ @Override
+ public boolean onChildClick(ExpandableListView parent, View v,
+ int groupPosition, int childPosition, long id) {
+ String spec = getChild(groupPosition, childPosition);
+ if (spec.equals(BROADCAST_TILE_SPEC_PLACEHOLDER)) {
+ showBroadcastTileDialog();
+ } else {
+ mPanel.add(spec);
+ mPanel.closeDetail();
+ }
+ return true;
+ }
+ });
+ lv.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
+ @Override
+ public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition,
+ long id) {
+ if (getGroupCount() == 1) {
+ // disable contracting/expanding group when there's only 1
+ return true;
+ }
+ return false;
+ }
+ });
+ return lv;
+ }
+
+ @Override
+ public Intent getSettingsIntent() {
+ return null;
+ }
+
+ @Override
+ public StatusBarPanelCustomTile getCustomTile() {
+ return null;
+ }
+
+ @Override
+ public void setToggleState(boolean state) {
+
+ }
- private boolean isValid(String action) {
- for (int i = 0; i < action.length(); i++) {
- char c = action.charAt(i);
- if (!Character.isAlphabetic(c) && !Character.isDigit(c) && c != '.') {
- return false;
+ @Override
+ public int getMetricsCategory() {
+ return CMMetricsLogger.DONT_LOG;
+ }
+
+ public void showBroadcastTileDialog() {
+ final EditText editText = new EditText(mContext);
+ final AlertDialog d = new AlertDialog.Builder(mContext)
+ .setTitle(R.string.broadcast_tile)
+ .setView(editText)
+ .setNegativeButton(android.R.string.cancel, null)
+ .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ String action = editText.getText().toString();
+ if (isValid(action)) {
+ mPanel.add(IntentTile.PREFIX + action + ')');
+ mPanel.closeDetail();
+ }
+ }
+ }).create();
+ SystemUIDialog.makeSystemUIDialog(d);
+ d.show();
+ }
+
+ private boolean isValid(String action) {
+ for (int i = 0; i < action.length(); i++) {
+ char c = action.charAt(i);
+ if (!Character.isAlphabetic(c) && !Character.isDigit(c) && c != '.') {
+ return false;
+ }
}
+ return true;
}
- return true;
}
public void add(String tile) {
@@ -1634,7 +2053,7 @@ public class QSDragPanel extends QSPanel implements View.OnDragListener, View.On
}
public boolean isDragRecordAttached() {
- return mDragging && mDraggingRecord != null && mRecords.indexOf(mDraggingRecord) >= 0;
+ return mRecords.indexOf(mDraggingRecord) >= 0;
}
public void goToSettingsPage() {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanelTopView.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanelTopView.java
index c2862e6..060d06c 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanelTopView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanelTopView.java
@@ -40,6 +40,7 @@ public class QSPanelTopView extends FrameLayout {
protected View mDropTarget;
protected View mBrightnessView;
protected TextView mToastView;
+ protected View mAddTarget;
private boolean mEditing = false;
private boolean mDisplayingInstructions = false;
@@ -74,6 +75,10 @@ public class QSPanelTopView extends FrameLayout {
return mBrightnessView;
}
+ public View getAddTarget() {
+ return mAddTarget;
+ }
+
@Override
protected void onFinishInflate() {
super.onFinishInflate();
@@ -81,6 +86,7 @@ public class QSPanelTopView extends FrameLayout {
mEditTileInstructionView = findViewById(R.id.edit_container);
mBrightnessView = findViewById(R.id.brightness_container);
mToastView = (TextView) findViewById(R.id.qs_toast);
+ mAddTarget = findViewById(R.id.add_target);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSSettings.java b/packages/SystemUI/src/com/android/systemui/qs/QSSettings.java
index 959a1ee..fd2fb17 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSSettings.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSSettings.java
@@ -22,11 +22,10 @@ import android.content.DialogInterface;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
+import com.android.systemui.R;
import com.android.systemui.statusbar.phone.QSTileHost;
import com.android.systemui.statusbar.phone.SystemUIDialog;
-import com.android.systemui.R;
-
public class QSSettings extends LinearLayout {
private QSTileHost mHost;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
index 667bd30..d1a1ad5 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java
@@ -128,7 +128,6 @@ public class QSTileView extends ViewGroup {
}
private void recreateLabel() {
- Log.d(TAG, "recreateLabel() called with " + "");
CharSequence labelText = null;
CharSequence labelDescription = null;
if (mLabel != null) {
@@ -392,7 +391,9 @@ public class QSTileView extends ViewGroup {
if (mLabel != null) {
mLabel.setFocusable(!editing);
}
- mRipple.setVisible(!editing, false);
+ if (mRipple != null) {
+ mRipple.setVisible(!editing, false);
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSViewPager.java b/packages/SystemUI/src/com/android/systemui/qs/QSViewPager.java
index 01c48b1..94c7c62 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSViewPager.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSViewPager.java
@@ -16,6 +16,7 @@ public class QSViewPager extends ViewPager {
protected static final float SCROLL_PERCENT = .10f;
private boolean mPagingEnabled;
QSDragPanel mDragPanel;
+ private int mLastHeight = 0;
public QSViewPager(Context context) {
super(context);
@@ -44,13 +45,14 @@ public class QSViewPager extends ViewPager {
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- int height = 0;
+ int height = mLastHeight;
for (int i = 0; i < getChildCount(); i++) {
View child = getChildAt(i);
child.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));
int h = child.getMeasuredHeight();
if (h > height) height = h;
}
+ mLastHeight = height;
heightMeasureSpec = MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY);
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/AdbOverNetworkTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/AdbOverNetworkTile.java
index a313e1e..d741330 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/AdbOverNetworkTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/AdbOverNetworkTile.java
@@ -26,13 +26,13 @@ import android.net.wifi.WifiManager;
import android.os.UserHandle;
import android.provider.Settings;
-import com.android.internal.logging.MetricsConstants;
import com.android.systemui.R;
import com.android.systemui.qs.QSTile;
import java.net.InetAddress;
import cyanogenmod.providers.CMSettings;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
public class AdbOverNetworkTile extends QSTile<QSTile.BooleanState> {
@@ -85,7 +85,7 @@ public class AdbOverNetworkTile extends QSTile<QSTile.BooleanState> {
@Override
public int getMetricsCategory() {
- return MetricsConstants.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_ADB_OVER_NETWORK;
}
private boolean isAdbEnabled() {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/AmbientDisplayTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/AmbientDisplayTile.java
index 3ea9749..cc08d02 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/AmbientDisplayTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/AmbientDisplayTile.java
@@ -21,10 +21,10 @@ import android.content.Intent;
import android.provider.Settings;
import android.provider.Settings.Secure;
-import com.android.internal.logging.MetricsLogger;
import com.android.systemui.qs.SecureSetting;
import com.android.systemui.qs.QSTile;
import com.android.systemui.R;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
/** Quick settings tile: Ambient Display **/
public class AmbientDisplayTile extends QSTile<QSTile.BooleanState> {
@@ -86,7 +86,7 @@ public class AmbientDisplayTile extends QSTile<QSTile.BooleanState> {
@Override
public int getMetricsCategory() {
- return MetricsLogger.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_AMBIENT_DISPLAY;
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
index e2c0a2d..f4602de 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
@@ -201,7 +201,7 @@ public class CellularTile extends QSTile<QSTile.SignalState> {
@Override
public void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
int qsType, boolean activityIn, boolean activityOut, String typeContentDescription,
- String description, boolean isWide, int subId) {
+ String description, boolean isWide, boolean showSeparateRoaming, int subId) {
if (qsIcon == null) {
// Not data sim, don't display.
return;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CompassTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CompassTile.java
index 1f1f7a2..f19e466 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CompassTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CompassTile.java
@@ -23,10 +23,10 @@ import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.widget.ImageView;
-import com.android.internal.logging.MetricsConstants;
import com.android.systemui.R;
import com.android.systemui.qs.QSTile;
import com.android.systemui.qs.QSTileView;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
public class CompassTile extends QSTile<QSTile.BooleanState> implements SensorEventListener {
private final static float ALPHA = 0.97f;
@@ -121,7 +121,7 @@ public class CompassTile extends QSTile<QSTile.BooleanState> implements SensorEv
@Override
public int getMetricsCategory() {
- return MetricsConstants.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_COMPASS;
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CustomQSTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CustomQSTile.java
index 96cc51a..f0c4f52 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CustomQSTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CustomQSTile.java
@@ -47,6 +47,7 @@ import cyanogenmod.app.StatusBarPanelCustomTile;
import com.android.systemui.R;
import com.android.systemui.qs.QSTile;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
import java.util.Arrays;
@@ -119,6 +120,10 @@ public class CustomQSTile extends QSTile<QSTile.State> {
}
}
+ public StatusBarPanelCustomTile getTile() {
+ return mTile;
+ }
+
@Override
protected void handleUpdateState(State state, Object arg) {
if (arg instanceof StatusBarPanelCustomTile) {
@@ -146,7 +151,7 @@ public class CustomQSTile extends QSTile<QSTile.State> {
@Override
public int getMetricsCategory() {
- return MetricsLogger.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_CUSTOM_QS;
}
private boolean isDynamicTile() {
@@ -191,7 +196,7 @@ public class CustomQSTile extends QSTile<QSTile.State> {
@Override
public int getMetricsCategory() {
- return MetricsLogger.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_CUSTOM_QS_DETAIL;
}
@Override
@@ -282,4 +287,4 @@ public class CustomQSTile extends QSTile<QSTile.State> {
return themeConfig != null ? themeConfig.getOverlayForStatusBar() : null;
}
}
-} \ No newline at end of file
+}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
index 0d43f8c..0cb9dcf 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
@@ -114,7 +114,7 @@ public class DndTile extends QSTile<QSTile.BooleanState> {
mDisableTotalSilence.setAllowAnimation(true);
MetricsLogger.action(mContext, getMetricsCategory(), !mState.value);
if (mState.value) {
- mController.setZen(Global.ZEN_MODE_OFF, null, TAG);
+ showDetail(true);
} else {
int zen = Prefs.getInt(mContext, Prefs.Key.DND_FAVORITE_ZEN, Global.ZEN_MODE_ALARMS);
mController.setZen(zen, null, TAG);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/EditTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/EditTile.java
index eaa5ff5..cbc906f 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/EditTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/EditTile.java
@@ -16,9 +16,9 @@
package com.android.systemui.qs.tiles;
-import com.android.internal.logging.MetricsLogger;
import com.android.systemui.R;
import com.android.systemui.qs.QSTile;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
public class EditTile extends QSTile<QSTile.BooleanState> {
@@ -66,7 +66,7 @@ public class EditTile extends QSTile<QSTile.BooleanState> {
@Override
public int getMetricsCategory() {
- return MetricsLogger.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_EDIT;
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/LiveDisplayTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/LiveDisplayTile.java
index 487bedb..b14934f 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/LiveDisplayTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/LiveDisplayTile.java
@@ -25,13 +25,13 @@ import android.os.Handler;
import android.os.UserHandle;
import android.provider.Settings;
-import com.android.internal.logging.MetricsConstants;
import com.android.internal.util.ArrayUtils;
import com.android.systemui.R;
import com.android.systemui.qs.QSTile;
import cyanogenmod.hardware.CMHardwareManager;
import cyanogenmod.providers.CMSettings;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
/** Quick settings tile: LiveDisplay mode switcher **/
public class LiveDisplayTile extends QSTile<LiveDisplayTile.LiveDisplayState> {
@@ -124,7 +124,7 @@ public class LiveDisplayTile extends QSTile<LiveDisplayTile.LiveDisplayState> {
@Override
public int getMetricsCategory() {
- return MetricsConstants.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_LIVE_DISPLAY;
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/LockscreenToggleTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/LockscreenToggleTile.java
index 3b439d1..6f1a921 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/LockscreenToggleTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/LockscreenToggleTile.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 The CyanogenMod Project
+ * Copyright (C) 2015-2016 The CyanogenMod Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,69 +16,67 @@
package com.android.systemui.qs.tiles;
-import android.app.admin.DevicePolicyManager;
-import android.content.BroadcastReceiver;
-import android.content.Context;
import android.content.Intent;
-import android.content.IntentFilter;
-import android.content.SharedPreferences;
-
-import android.widget.Toast;
-import com.android.internal.logging.MetricsLogger;
+import android.os.UserHandle;
import com.android.systemui.R;
import com.android.systemui.SystemUIApplication;
import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.qs.QSTile;
import com.android.systemui.statusbar.policy.KeyguardMonitor;
+import cyanogenmod.providers.CMSettings;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
public class LockscreenToggleTile extends QSTile<QSTile.BooleanState>
implements KeyguardMonitor.Callback {
- public static final String ACTION_APPLY_LOCKSCREEN_STATE =
- "com.android.systemui.qs.tiles.action.APPLY_LOCKSCREEN_STATE";
-
- private static final String KEY_ENABLED = "lockscreen_enabled";
-
private static final Intent LOCK_SCREEN_SETTINGS =
new Intent("android.settings.LOCK_SCREEN_SETTINGS");
private KeyguardViewMediator mKeyguardViewMediator;
private KeyguardMonitor mKeyguard;
private boolean mPersistedState;
- private boolean mKeyguardBound;
- private SharedPreferences mPrefs;
-
- private BroadcastReceiver mReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- if (mKeyguardViewMediator != null) {
- mKeyguardBound = mKeyguardViewMediator.isKeyguardBound();
- applyLockscreenState();
- refreshState();
- }
- }
- };
+ private boolean mListening;
+
+ private KeyguardViewMediator.LockscreenEnabledSettingsObserver mSettingsObserver;
public LockscreenToggleTile(Host host) {
super(host);
- mPrefs = mContext.getSharedPreferences("quicksettings", Context.MODE_PRIVATE);
mKeyguard = host.getKeyguardMonitor();
mKeyguardViewMediator =
((SystemUIApplication)
mContext.getApplicationContext()).getComponent(KeyguardViewMediator.class);
- mPersistedState = getPersistedState();
- mKeyguardBound = mKeyguardViewMediator.isKeyguardBound();
- applyLockscreenState();
- mContext.registerReceiver(mReceiver, new IntentFilter(ACTION_APPLY_LOCKSCREEN_STATE));
+ mSettingsObserver = new KeyguardViewMediator.LockscreenEnabledSettingsObserver(mContext,
+ mUiHandler) {
+
+ @Override
+ public void update() {
+ boolean newEnabledState = CMSettings.Secure.getIntForUser(
+ mContext.getContentResolver(),
+ CMSettings.Secure.LOCKSCREEN_INTERNALLY_ENABLED,
+ getPersistedDefaultOldSetting() ? 1 : 0,
+ UserHandle.USER_CURRENT) != 0;
+ if (newEnabledState != mPersistedState) {
+ mPersistedState = newEnabledState;
+ refreshState();
+ }
+ }
+ };
+
}
@Override
public void setListening(boolean listening) {
+ if (mListening == listening) {
+ return;
+ }
+ mListening = listening;
if (listening) {
+ mSettingsObserver.observe();
mKeyguard.addCallback(this);
} else {
+ mSettingsObserver.unobserve();
mKeyguard.removeCallback(this);
}
}
@@ -91,8 +89,6 @@ public class LockscreenToggleTile extends QSTile<QSTile.BooleanState>
@Override
protected void handleClick() {
setPersistedState(!mPersistedState);
- applyLockscreenState();
- refreshState();
}
@Override
@@ -125,7 +121,7 @@ public class LockscreenToggleTile extends QSTile<QSTile.BooleanState>
@Override
public int getMetricsCategory() {
- return MetricsLogger.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_LOCKSCREEN_TOGGLE;
}
@Override
@@ -140,31 +136,14 @@ public class LockscreenToggleTile extends QSTile<QSTile.BooleanState>
}
@Override
- protected void handleDestroy() {
- super.handleDestroy();
- mContext.unregisterReceiver(mReceiver);
- }
-
- @Override
public void onKeyguardChanged() {
refreshState();
}
- private void applyLockscreenState() {
- if (!mKeyguardBound) {
- // do nothing yet
- return;
- }
-
- mKeyguardViewMediator.setKeyguardEnabledInternal(mPersistedState);
- }
-
- private boolean getPersistedState() {
- return mPrefs.getBoolean(KEY_ENABLED, true);
- }
-
private void setPersistedState(boolean enabled) {
- mPrefs.edit().putBoolean(KEY_ENABLED, enabled).apply();
+ CMSettings.Secure.putIntForUser(mContext.getContentResolver(),
+ CMSettings.Secure.LOCKSCREEN_INTERNALLY_ENABLED,
+ enabled ? 1 : 0, UserHandle.USER_CURRENT);
mPersistedState = enabled;
}
} \ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java
index 23df305..1bfbb8f 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java
@@ -22,9 +22,9 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.nfc.NfcAdapter;
-import com.android.internal.logging.MetricsConstants;
import com.android.systemui.R;
import com.android.systemui.qs.QSTile;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
public class NfcTile extends QSTile<QSTile.BooleanState> {
private NfcAdapter mNfcAdapter;
@@ -102,7 +102,7 @@ public class NfcTile extends QSTile<QSTile.BooleanState> {
@Override
public int getMetricsCategory() {
- return MetricsConstants.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_NFC;
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/PerfProfileTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/PerfProfileTile.java
index 0392efc..e6e6bb4 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/PerfProfileTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/PerfProfileTile.java
@@ -29,11 +29,11 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
-import com.android.internal.logging.MetricsConstants;
import com.android.systemui.R;
import com.android.systemui.qs.QSDetailItemsList;
import com.android.systemui.qs.QSTile;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
import org.cyanogenmod.internal.util.QSUtils;
import cyanogenmod.app.StatusBarPanelCustomTile;
@@ -104,7 +104,7 @@ public class PerfProfileTile extends QSTile<PerfProfileTile.ProfileState> {
@Override
public int getMetricsCategory() {
- return MetricsConstants.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_PERF_PROFILE;
}
@Override
@@ -212,7 +212,7 @@ public class PerfProfileTile extends QSTile<PerfProfileTile.ProfileState> {
@Override
public int getMetricsCategory() {
- return MetricsConstants.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_PERF_PROFILE_DETAIL;
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/ProfilesTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/ProfilesTile.java
index 42aa122..9053643 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/ProfilesTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/ProfilesTile.java
@@ -32,7 +32,6 @@ import android.widget.ArrayAdapter;
import android.widget.CheckedTextView;
import android.widget.ListView;
-import com.android.internal.logging.MetricsConstants;
import com.android.systemui.R;
import com.android.systemui.qs.QSDetailItemsList;
import com.android.systemui.qs.QSTile;
@@ -42,6 +41,7 @@ import cyanogenmod.app.Profile;
import cyanogenmod.app.ProfileManager;
import cyanogenmod.app.StatusBarPanelCustomTile;
import cyanogenmod.providers.CMSettings;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
import java.util.ArrayList;
import java.util.List;
@@ -112,7 +112,7 @@ public class ProfilesTile extends QSTile<QSTile.State> {
@Override
public int getMetricsCategory() {
- return MetricsConstants.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_PROFILES;
}
@Override
@@ -182,7 +182,7 @@ public class ProfilesTile extends QSTile<QSTile.State> {
@Override
public int getMetricsCategory() {
- return MetricsConstants.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_PROFILES_DETAIL;
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/ScreenTimeoutTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/ScreenTimeoutTile.java
index 2399f5d..81899d3 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/ScreenTimeoutTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/ScreenTimeoutTile.java
@@ -31,11 +31,11 @@ import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
-import com.android.internal.logging.MetricsConstants;
import com.android.systemui.R;
import com.android.systemui.qs.QSDetailItemsList;
import com.android.systemui.qs.QSTile;
import cyanogenmod.app.StatusBarPanelCustomTile;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
import java.util.ArrayList;
import java.util.Arrays;
@@ -247,7 +247,7 @@ public class ScreenTimeoutTile extends QSTile<ScreenTimeoutTile.TimeoutState> {
@Override
public int getMetricsCategory() {
- return MetricsConstants.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_SCREEN_TIME_OUT;
}
@Override
@@ -309,7 +309,7 @@ public class ScreenTimeoutTile extends QSTile<ScreenTimeoutTile.TimeoutState> {
@Override
public int getMetricsCategory() {
- return MetricsConstants.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_SCREEN_TIME_OUT_DETAIL;
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/SyncTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/SyncTile.java
index c37e0d5..7ffebc7 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/SyncTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/SyncTile.java
@@ -20,9 +20,9 @@ import android.content.ContentResolver;
import android.content.Intent;
import android.content.SyncStatusObserver;
-import com.android.internal.logging.MetricsConstants;
import com.android.systemui.R;
import com.android.systemui.qs.QSTile;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
/** Quick settings tile: Sync **/
public class SyncTile extends QSTile<QSTile.BooleanState> {
@@ -70,7 +70,7 @@ public class SyncTile extends QSTile<QSTile.BooleanState> {
@Override
public int getMetricsCategory() {
- return MetricsConstants.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_SYNC;
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/UsbTetherTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/UsbTetherTile.java
index b3b013c..1274195 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/UsbTetherTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/UsbTetherTile.java
@@ -24,9 +24,9 @@ import android.hardware.usb.UsbManager;
import android.provider.Settings;
import android.net.ConnectivityManager;
-import com.android.internal.logging.MetricsConstants;
import com.android.systemui.R;
import com.android.systemui.qs.QSTile;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
/**
* USB Tether quick settings tile
@@ -114,6 +114,6 @@ public class UsbTetherTile extends QSTile<QSTile.BooleanState> {
@Override
public int getMetricsCategory() {
- return MetricsConstants.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_USB_TETHER;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/VolumeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/VolumeTile.java
index ff254f0..ae29f16 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/VolumeTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/VolumeTile.java
@@ -21,9 +21,9 @@ import android.content.Intent;
import android.media.AudioManager;
import android.provider.Settings;
-import com.android.internal.logging.MetricsConstants;
import com.android.systemui.R;
import com.android.systemui.qs.QSTile;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
public class VolumeTile extends QSTile<QSTile.BooleanState> {
@@ -53,7 +53,7 @@ public class VolumeTile extends QSTile<QSTile.BooleanState> {
@Override
public int getMetricsCategory() {
- return MetricsConstants.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.TILE_VOLUME;
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
index b0fc398..842d7a4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
@@ -217,7 +217,7 @@ public class SignalClusterView
@Override
public void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
int qsType, boolean activityIn, boolean activityOut, String typeContentDescription,
- String description, boolean isWide, int subId) {
+ String description, boolean isWide, boolean showRoamingIndicator, int subId) {
PhoneState state = getState(subId);
if (state == null) {
return;
@@ -228,6 +228,7 @@ public class SignalClusterView
state.mMobileDescription = statusIcon.contentDescription;
state.mMobileTypeDescription = typeContentDescription;
state.mIsMobileTypeIconWide = statusType != 0 && isWide;
+ state.mShowRoamingIndicator = showRoamingIndicator;
apply();
}
@@ -478,9 +479,11 @@ public class SignalClusterView
private int mMobileStrengthId = 0, mMobileTypeId = 0;
private boolean mIsMobileTypeIconWide;
private String mMobileDescription, mMobileTypeDescription;
+ private boolean mShowRoamingIndicator;
private ViewGroup mMobileGroup;
private ImageView mMobile, mMobileDark, mMobileType;
+ private ImageView mMobileRoaming;
public PhoneState(int subId, Context context) {
ViewGroup root = (ViewGroup) LayoutInflater.from(context)
@@ -494,6 +497,7 @@ public class SignalClusterView
mMobile = (ImageView) root.findViewById(R.id.mobile_signal);
mMobileDark = (ImageView) root.findViewById(R.id.mobile_signal_dark);
mMobileType = (ImageView) root.findViewById(R.id.mobile_type);
+ mMobileRoaming = (ImageView) root.findViewById(R.id.mobile_roaming);
}
public boolean apply(boolean isSecondaryIcon) {
@@ -520,6 +524,7 @@ public class SignalClusterView
mMobileGroup.setContentDescription(mMobileTypeDescription
+ " " + mMobileDescription);
mMobileGroup.setVisibility(View.VISIBLE);
+ mMobileRoaming.setVisibility(mShowRoamingIndicator ? View.VISIBLE : View.GONE);
} else {
mMobileGroup.setVisibility(View.GONE);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/VisualizerView.java b/packages/SystemUI/src/com/android/systemui/statusbar/VisualizerView.java
index cbf5e5b..1991602 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/VisualizerView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/VisualizerView.java
@@ -156,6 +156,7 @@ public class VisualizerView extends View implements Palette.PaletteAsyncListener
private void updateViewVisibility() {
setVisibility(mKeyguardMonitor != null && mKeyguardMonitor.isShowing()
&& mVisualizerEnabled ? View.VISIBLE : View.GONE);
+ checkStateChanged();
}
@Override
@@ -316,8 +317,8 @@ public class VisualizerView extends View implements Palette.PaletteAsyncListener
}
private void checkStateChanged() {
- if (mVisible && mPlaying && !mDozing && !mPowerSaveMode && mVisualizerEnabled
- && !mOccluded) {
+ if (getVisibility() == View.VISIBLE && mVisible && mPlaying && !mDozing && !mPowerSaveMode
+ && mVisualizerEnabled && !mOccluded) {
if (!mDisplaying) {
mDisplaying = true;
AsyncTask.execute(mLinkVisualizer);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavBarInsetLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavBarInsetLayout.java
new file mode 100644
index 0000000..e767ca5
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavBarInsetLayout.java
@@ -0,0 +1,217 @@
+/*
+ * Copyright (C) 2016 The CyanogenMod Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.phone;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.PorterDuff;
+import android.graphics.PorterDuffXfermode;
+import android.graphics.Rect;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.UserHandle;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.WindowManager;
+import android.view.WindowManagerGlobal;
+import android.widget.FrameLayout;
+import com.android.systemui.R;
+import com.android.systemui.cm.UserContentObserver;
+import com.android.systemui.statusbar.BaseStatusBar;
+import cyanogenmod.providers.CMSettings;
+
+public class NavBarInsetLayout extends FrameLayout {
+ public static final String TAG = "NavBarInsetLayout";
+ public static final boolean DEBUG = BaseStatusBar.DEBUG;
+
+ boolean mLeftInsetMode = false;
+
+ private int mLeftInset = 0;
+ private int mRightInset = 0;
+
+ private final Paint mTransparentSrcPaint = new Paint();
+
+ private SettingsObserver mSettingsObserver;
+
+ @Override
+ protected void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ mSettingsObserver.observe();
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ mSettingsObserver.unobserve();
+ }
+
+ public NavBarInsetLayout(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ mTransparentSrcPaint.setColor(0);
+ mTransparentSrcPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.SRC));
+
+ mSettingsObserver = new SettingsObserver(new Handler());
+ }
+
+ @Override
+ protected boolean fitSystemWindows(Rect insets) {
+ if (getFitsSystemWindows()) {
+ boolean paddingChanged;
+
+ if (mLeftInsetMode) {
+ paddingChanged = insets.right != getPaddingRight()
+ || insets.top != getPaddingTop()
+ || insets.bottom != getPaddingBottom();
+
+ if (insets.left != mLeftInset) {
+ mLeftInset = insets.left;
+ applyMargins();
+ }
+ } else {
+ paddingChanged = insets.left != getPaddingLeft()
+ || insets.top != getPaddingTop()
+ || insets.bottom != getPaddingBottom();
+
+ if (insets.right != mRightInset) {
+ mRightInset = insets.right;
+ applyMargins();
+ }
+ }
+
+ // Drop top inset, apply left inset and pass through bottom inset.
+ if (paddingChanged) {
+ setPadding(mLeftInsetMode ? 0 : insets.left,
+ 0,
+ mLeftInsetMode ? insets.right : 0,
+ 0);
+ }
+ insets.left = 0;
+ insets.top = 0;
+ insets.right = 0;
+ } else {
+ boolean applyMargins = false;
+ if (mLeftInset != 0) {
+ mLeftInset = 0;
+ applyMargins = true;
+ }
+ if (mRightInset != 0) {
+ mRightInset = 0;
+ applyMargins = true;
+ }
+ if (applyMargins) {
+ applyMargins();
+ }
+ boolean changed = getPaddingLeft() != 0
+ || getPaddingRight() != 0
+ || getPaddingTop() != 0
+ || getPaddingBottom() != 0;
+ if (changed) {
+ setPadding(0, 0, 0, 0);
+ }
+ insets.top = 0;
+ }
+ return false;
+ }
+
+ private void applyMargins() {
+ final int N = getChildCount();
+ for (int i = 0; i < N; i++) {
+ View child = getChildAt(i);
+ if (child.getLayoutParams() instanceof InsetLayoutParams) {
+ InsetLayoutParams lp = (InsetLayoutParams) child.getLayoutParams();
+ if (!lp.ignoreRightInset) {
+ if (mLeftInsetMode && lp.leftMargin != mLeftInset) {
+ lp.leftMargin = mLeftInset;
+ if (lp.rightMargin != 0) {
+ lp.rightMargin = 0;
+ }
+ } else if (lp.rightMargin != mRightInset) {
+ lp.rightMargin = mRightInset;
+ if (lp.leftMargin != 0) {
+ lp.leftMargin = 0;
+ }
+ }
+ child.requestLayout();
+ }
+ }
+ }
+ }
+
+ @Override
+ public FrameLayout.LayoutParams generateLayoutParams(AttributeSet attrs) {
+ return new InsetLayoutParams(getContext(), attrs);
+ }
+
+ @Override
+ protected FrameLayout.LayoutParams generateDefaultLayoutParams() {
+ return new InsetLayoutParams(InsetLayoutParams.MATCH_PARENT,
+ InsetLayoutParams.MATCH_PARENT);
+ }
+
+ private class SettingsObserver extends UserContentObserver {
+
+ public SettingsObserver(Handler handler) {
+ super(handler);
+ }
+
+ @Override
+ protected void observe() {
+ super.observe();
+ mContext.getContentResolver().registerContentObserver(
+ CMSettings.System.getUriFor(CMSettings.System.NAVBAR_LEFT_IN_LANDSCAPE), false,
+ this, UserHandle.USER_CURRENT);
+ update();
+ }
+
+ @Override
+ protected void unobserve() {
+ super.unobserve();
+ mContext.getContentResolver().unregisterContentObserver(this);
+ }
+
+ @Override
+ protected void update() {
+ boolean before = mLeftInsetMode;
+ mLeftInsetMode = CMSettings.System.getIntForUser(mContext.getContentResolver(),
+ CMSettings.System.NAVBAR_LEFT_IN_LANDSCAPE, 0, UserHandle.USER_CURRENT) == 1;
+ if (mLeftInsetMode != before) {
+ applyMargins();
+ }
+ }
+ }
+
+ public static class InsetLayoutParams extends FrameLayout.LayoutParams {
+
+ public boolean ignoreRightInset;
+
+ public InsetLayoutParams(int width, int height) {
+ super(width, height);
+ }
+
+ public InsetLayoutParams(Context c, AttributeSet attrs) {
+ super(c, attrs);
+
+ TypedArray a = c.obtainStyledAttributes(attrs, R.styleable.StatusBarWindowView_Layout);
+ ignoreRightInset = a.getBoolean(
+ R.styleable.StatusBarWindowView_Layout_ignoreRightInset, false);
+ a.recycle();
+ }
+ }
+}
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index bff457d..1536137 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -21,12 +21,15 @@ import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.ValueAnimator;
+import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.ContentResolver;
import android.app.ActivityManager;
import android.app.StatusBarManager;
import android.content.Context;
import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.content.res.Configuration;
import android.database.ContentObserver;
@@ -227,6 +230,7 @@ public class NotificationPanelView extends PanelView implements
private ComponentName mThirdPartyKeyguardViewComponent;
private KeyguardExternalView mKeyguardExternalView;
+ private CmLockPatternUtils mLockPatternUtils;
private Runnable mHeadsUpExistenceChangedRunnable = new Runnable() {
@Override
@@ -314,9 +318,9 @@ public class NotificationPanelView extends PanelView implements
}
});
- CmLockPatternUtils lockPatternUtils = new CmLockPatternUtils(getContext());
- if (lockPatternUtils.isThirdPartyKeyguardEnabled()) {
- mThirdPartyKeyguardViewComponent = lockPatternUtils.getThirdPartyKeyguardComponent();
+ mLockPatternUtils = new CmLockPatternUtils(getContext());
+ if (mLockPatternUtils.isThirdPartyKeyguardEnabled()) {
+ mThirdPartyKeyguardViewComponent = mLockPatternUtils.getThirdPartyKeyguardComponent();
}
}
@@ -324,12 +328,15 @@ public class NotificationPanelView extends PanelView implements
protected void onAttachedToWindow() {
super.onAttachedToWindow();
mSettingsObserver.observe();
+ mContext.registerReceiver(mExternalKeyguardViewChangedReceiver,
+ new IntentFilter(CmLockPatternUtils.ACTION_THIRD_PARTY_KEYGUARD_COMPONENT_CHANGED));
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
mSettingsObserver.unobserve();
+ mContext.unregisterReceiver(mExternalKeyguardViewChangedReceiver);
}
@Override
@@ -1184,25 +1191,47 @@ public class NotificationPanelView extends PanelView implements
private KeyguardExternalView.KeyguardExternalViewCallbacks mExternalKeyguardViewCallbacks =
new KeyguardExternalView.KeyguardExternalViewCallbacks() {
@Override
- public void dismiss() {
+ public boolean requestDismiss() {
if (hasExternalKeyguardView()) {
- mStatusBar.setBarState(StatusBarState.KEYGUARD);
- mStatusBar.showBouncer();
+ post(new Runnable() {
+ @Override
+ public void run() {
+ mStatusBar.showKeyguard();
+ mStatusBar.showBouncer();
+ }
+ });
+ return true;
}
+ return false;
}
@Override
- public void dismissAndStartActivity(Intent intent) {
+ public boolean requestDismissAndStartActivity(final Intent intent) {
if (hasExternalKeyguardView()) {
- mStatusBar.setBarState(StatusBarState.KEYGUARD);
- mStatusBar.startActivity(intent, true);
+ if (hasExternalKeyguardView()) {
+ post(new Runnable() {
+ @Override
+ public void run() {
+ mStatusBar.showKeyguard();
+ mStatusBar.startActivity(intent, true);
+ }
+ });
+ }
+ return true;
}
+ return false;
}
@Override
public void collapseNotificationPanel() {
- if (mStatusBar.getBarState() == StatusBarState.KEYGUARD && hasExternalKeyguardView()) {
- mStatusBar.focusKeyguardExternalView();
+ if (mStatusBar.getBarState() == StatusBarState.KEYGUARD && hasExternalKeyguardView() &&
+ mKeyguardExternalView.isInteractive()) {
+ post(new Runnable() {
+ @Override
+ public void run() {
+ mStatusBar.focusKeyguardExternalView();
+ }
+ });
}
}
@@ -1214,6 +1243,26 @@ public class NotificationPanelView extends PanelView implements
}
};
+ private BroadcastReceiver mExternalKeyguardViewChangedReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ String pkgName = getSendingPackage(intent);
+ if (pkgName != null) {
+ PackageManager pm = context.getPackageManager();
+ if (pm.checkPermission(android.Manifest.permission.ACCESS_KEYGUARD_SECURE_STORAGE,
+ pkgName) != PackageManager.PERMISSION_GRANTED) {
+ // we should not be here if the sending app does not have the proper permission,
+ // so do nothing and return.
+ return;
+ }
+ } else {
+ // null package name? something is not right so just return and skip doing anything
+ return;
+ }
+ updateExternalKeyguardView();
+ }
+ };
+
private void animateHeaderSlidingIn() {
// If the QS is already expanded we don't need to slide in the header as it's already
// visible.
@@ -2635,4 +2684,29 @@ public class NotificationPanelView extends PanelView implements
}
return null;
}
+
+ private void updateExternalKeyguardView() {
+ ComponentName cn = mLockPatternUtils.getThirdPartyKeyguardComponent();
+ // If mThirdPartyKeyguardViewComponent differs from cn, go ahead and update
+ if ((cn == null && mThirdPartyKeyguardViewComponent != null) ||
+ (cn != null && mThirdPartyKeyguardViewComponent == null) ||
+ !mThirdPartyKeyguardViewComponent.equals(cn)) {
+ mThirdPartyKeyguardViewComponent = cn;
+ if (mKeyguardExternalView != null) {
+ if (indexOfChild(mKeyguardExternalView) >= 0) {
+ removeView(mKeyguardExternalView);
+ }
+ mKeyguardExternalView.unregisterKeyguardExternalViewCallback(
+ mExternalKeyguardViewCallbacks);
+ if (mThirdPartyKeyguardViewComponent != null) {
+ mKeyguardExternalView =
+ getExternalKeyguardView(mThirdPartyKeyguardViewComponent);
+ mKeyguardExternalView.registerKeyguardExternalViewCallback(
+ mExternalKeyguardViewCallbacks);
+ } else {
+ mKeyguardExternalView = null;
+ }
+ }
+ }
+ }
}
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 dbf77a1..b93c17a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -154,6 +154,7 @@ import com.android.systemui.statusbar.NotificationOverflowContainer;
import com.android.systemui.statusbar.ScrimView;
import com.android.systemui.statusbar.SignalClusterView;
import com.android.systemui.statusbar.SpeedBumpView;
+import com.android.systemui.statusbar.StatusBarIconView;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.VisualizerView;
import com.android.systemui.statusbar.phone.UnlockMethodCache.OnUnlockMethodChangedListener;
@@ -345,6 +346,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
// settings
private QSDragPanel mQSPanel;
+ private QSTileHost mQSTileHost;
private DevForceNavbarObserver mDevForceNavbarObserver;
// top bar
@@ -910,7 +912,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
R.color.notification_panel_solid_background)));
}
- mHeadsUpManager = new HeadsUpManager(context, mStatusBarWindow);
+ if (mHeadsUpManager == null) {
+ mHeadsUpManager = new HeadsUpManager(context, mStatusBarWindow);
+ }
mHeadsUpManager.setBar(this);
mHeadsUpManager.addListener(this);
mHeadsUpManager.addListener(mNotificationPanel);
@@ -954,7 +958,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
// no window manager? good luck with that
}
- mAssistManager = new AssistManager(this, context);
+ if (mAssistManager == null) {
+ mAssistManager = new AssistManager(this, context);
+ }
if (mNavigationBarView == null) {
mAssistManager.onConfigurationChanged();
}
@@ -1038,40 +1044,65 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
mHandlerThread.start();
// Other icons
- mLocationController = new LocationControllerImpl(mContext,
- mHandlerThread.getLooper()); // will post a notification
- mBatteryController = new BatteryController(mContext, mHandler);
- mBatteryController.addStateChangedCallback(new BatteryStateChangeCallback() {
- @Override
- public void onPowerSaveChanged() {
- mHandler.post(mCheckBarModes);
- if (mDozeServiceHost != null) {
- mDozeServiceHost.firePowerSaveChanged(mBatteryController.isPowerSave());
+ if (mLocationController == null) {
+ mLocationController = new LocationControllerImpl(mContext,
+ mHandlerThread.getLooper()); // will post a notification
+ }
+ if (mBatteryController == null) {
+ mBatteryController = new BatteryController(mContext, mHandler);
+ mBatteryController.addStateChangedCallback(new BatteryStateChangeCallback() {
+ @Override
+ public void onPowerSaveChanged() {
+ mHandler.post(mCheckBarModes);
+ if (mDozeServiceHost != null) {
+ mDozeServiceHost.firePowerSaveChanged(mBatteryController.isPowerSave());
+ }
}
- }
- @Override
- public void onBatteryLevelChanged(int level, boolean pluggedIn, boolean charging) {
- // noop
- }
- @Override
- public void onBatteryStyleChanged(int style, int percentMode) {
- // noop
- }
- });
- mNetworkController = new NetworkControllerImpl(mContext, mHandlerThread.getLooper());
- mHotspotController = new HotspotControllerImpl(mContext);
- mBluetoothController = new BluetoothControllerImpl(mContext, mHandlerThread.getLooper());
- mSecurityController = new SecurityControllerImpl(mContext);
+
+ @Override
+ public void onBatteryLevelChanged(int level, boolean pluggedIn, boolean charging) {
+ // noop
+ }
+
+ @Override
+ public void onBatteryStyleChanged(int style, int percentMode) {
+ // noop
+ }
+ });
+ }
+ if (mNetworkController == null) {
+ mNetworkController = new NetworkControllerImpl(mContext, mHandlerThread.getLooper());
+ }
+ if (mHotspotController == null) {
+ mHotspotController = new HotspotControllerImpl(mContext);
+ }
+ if (mBluetoothController == null) {
+ mBluetoothController = new BluetoothControllerImpl(mContext,
+ mHandlerThread.getLooper());
+ }
+ if (mSecurityController == null) {
+ mSecurityController = new SecurityControllerImpl(mContext);
+ }
if (mContext.getResources().getBoolean(R.bool.config_showRotationLock)) {
- mRotationLockController = new RotationLockControllerImpl(mContext);
+ if (mRotationLockController == null) {
+ mRotationLockController = new RotationLockControllerImpl(mContext);
+ }
+ }
+ if (mUserInfoController == null) {
+ mUserInfoController = new UserInfoController(mContext);
}
- mUserInfoController = new UserInfoController(mContext);
mVolumeComponent = getComponent(VolumeComponent.class);
if (mVolumeComponent != null) {
- mZenModeController = mVolumeComponent.getZenController();
+ if (mZenModeController == null) {
+ mZenModeController = mVolumeComponent.getZenController();
+ }
+ }
+ if (mCastController == null) {
+ mCastController = new CastControllerImpl(mContext);
+ }
+ if (mSuController == null) {
+ mSuController = new SuControllerImpl(mContext);
}
- mCastController = new CastControllerImpl(mContext);
- mSuController = new SuControllerImpl(mContext);
final SignalClusterView signalCluster =
(SignalClusterView) mStatusBarView.findViewById(R.id.signal_cluster);
final SignalClusterView signalClusterKeyguard =
@@ -1092,19 +1123,31 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
mNetworkController.addEmergencyListener(mHeader);
}
- mFlashlightController = new FlashlightController(mContext);
+ if (mFlashlightController == null) {
+ mFlashlightController = new FlashlightController(mContext);
+ }
mKeyguardBottomArea.setFlashlightController(mFlashlightController);
mKeyguardBottomArea.setPhoneStatusBar(this);
mKeyguardBottomArea.setUserSetupComplete(mUserSetup);
- mAccessibilityController = new AccessibilityController(mContext);
+ if (mAccessibilityController == null) {
+ mAccessibilityController = new AccessibilityController(mContext);
+ }
mKeyguardBottomArea.setAccessibilityController(mAccessibilityController);
- mNextAlarmController = new NextAlarmController(mContext);
- mKeyguardMonitor = new KeyguardMonitor(mContext);
+ if (mNextAlarmController == null) {
+ mNextAlarmController = new NextAlarmController(mContext);
+ }
+ if (mKeyguardMonitor == null) {
+ mKeyguardMonitor = new KeyguardMonitor(mContext);
+ }
if (UserSwitcherController.isUserSwitcherAvailable(UserManager.get(mContext))) {
- mUserSwitcherController = new UserSwitcherController(mContext, mKeyguardMonitor,
- mHandler);
+ if (mUserSwitcherController == null) {
+ mUserSwitcherController = new UserSwitcherController(mContext, mKeyguardMonitor,
+ mHandler);
+ }
+ }
+ if (mWeatherController == null) {
+ mWeatherController = new WeatherControllerImpl(mContext);
}
- mWeatherController = new WeatherControllerImpl(mContext);
mKeyguardUserSwitcher = new KeyguardUserSwitcher(mContext,
(ViewStub) mStatusBarWindowContent.findViewById(R.id.keyguard_user_switcher),
@@ -1114,24 +1157,28 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
// Set up the quick settings tile panel
mQSPanel = (QSDragPanel) mStatusBarWindowContent.findViewById(R.id.quick_settings_panel);
if (mQSPanel != null) {
- final QSTileHost qsh = new QSTileHost(mContext, this,
- mBluetoothController, mLocationController, mRotationLockController,
- mNetworkController, mZenModeController, mHotspotController,
- mCastController, mFlashlightController,
- mUserSwitcherController, mKeyguardMonitor,
- mSecurityController);
- mQSPanel.setHost(qsh);
- mQSPanel.setTiles(qsh.getTiles());
- mBrightnessMirrorController = new BrightnessMirrorController(mStatusBarWindowContent);
+ if (mQSTileHost == null) {
+ mQSTileHost = new QSTileHost(mContext, this,
+ mBluetoothController, mLocationController, mRotationLockController,
+ mNetworkController, mZenModeController, mHotspotController,
+ mCastController, mFlashlightController,
+ mUserSwitcherController, mKeyguardMonitor,
+ mSecurityController);
+ }
+ mQSPanel.setHost(mQSTileHost);
+ mQSPanel.setTiles(mQSTileHost.getTiles());
+ if (mBrightnessMirrorController == null) {
+ mBrightnessMirrorController = new BrightnessMirrorController(mStatusBarWindowContent);
+ }
mQSPanel.setBrightnessMirror(mBrightnessMirrorController);
mHeader.setQSPanel(mQSPanel);
- qsh.setCallback(new QSTileHost.Callback() {
+ mQSTileHost.setCallback(new QSTileHost.Callback() {
@Override
public void onTilesChanged() {
mHandler.post(new Runnable() {
@Override
public void run() {
- mQSPanel.setTiles(qsh.getTiles());
+ mQSPanel.setTiles(mQSTileHost.getTiles());
}
});
}
@@ -3594,26 +3641,28 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
if (mNetworkController != null) {
removeSignalCallbacks(mNetworkController);
}
+ if (mHeadsUpManager != null) {
+ mHeadsUpManager.removeListener(mNotificationPanel);
+ }
mStatusBarWindow.removeContent(mStatusBarWindowContent);
mStatusBarWindow.clearDisappearingChildren();
- RankingMap rankingMap = mNotificationData.getRankingMap();
// extract icons from the soon-to-be recreated viewgroup.
- /*
- int nIcons = mStatusIcons != null ? mStatusIcons.getChildCount() : 0;
+ ViewGroup statusIcons = mIconController.getStatusIcons();
+ int nIcons = statusIcons != null ? statusIcons.getChildCount() : 0;
ArrayList<StatusBarIcon> icons = new ArrayList<StatusBarIcon>(nIcons);
ArrayList<String> iconSlots = new ArrayList<String>(nIcons);
for (int i = 0; i < nIcons; i++) {
- StatusBarIconView iconView = (StatusBarIconView)mStatusIcons.getChildAt(i);
+ StatusBarIconView iconView = (StatusBarIconView) statusIcons.getChildAt(i);
icons.add(iconView.getStatusBarIcon());
iconSlots.add(iconView.getStatusBarSlot());
}
- */
removeAllViews(mStatusBarWindowContent);
// extract notifications.
+ RankingMap rankingMap = mNotificationData.getRankingMap();
int nNotifs = mNotificationData.size();
ArrayList<Pair<String, StatusBarNotification>> notifications =
new ArrayList<Pair<String, StatusBarNotification>>(nNotifs);
@@ -3623,14 +3672,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
makeStatusBarView();
repositionNavigationBar();
- // recreate StatusBarIconViews.
- /*
+ // re-add status icons
for (int i = 0; i < nIcons; i++) {
StatusBarIcon icon = icons.get(i);
String slot = iconSlots.get(i);
addIcon(slot, i, i, icon);
}
- */
// recreate notifications.
for (int i = 0; i < nNotifs; i++) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
index 2da937c..c3428bb 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
@@ -30,6 +30,7 @@ import android.os.RemoteException;
import android.os.UserHandle;
import android.provider.Settings;
import android.text.TextUtils;
+import android.util.ArrayMap;
import android.util.Log;
import com.android.internal.logging.MetricsLogger;
@@ -294,7 +295,7 @@ public class QSTileHost implements QSTile.Host, Tunable {
final List<String> tileSpecs = loadTileSpecs(newValue);
if (tileSpecs.equals(mTileSpecs)) return;
for (Map.Entry<String, QSTile<?>> tile : mTiles.entrySet()) {
- if (!tileSpecs.contains(tile.getKey())) {
+ if (!tileSpecs.contains(tile.getKey()) && mCustomTileData.get(tile.getKey()) == null) {
if (DEBUG) Log.d(TAG, "Destroying tile: " + tile.getKey());
tile.getValue().destroy();
}
@@ -415,6 +416,10 @@ public class QSTileHost implements QSTile.Host, Tunable {
CMSettings.Secure.QS_TILES, "default", ActivityManager.getCurrentUser());
}
+ public QSTile<?> getTile(String spec) {
+ return mTiles.get(spec);
+ }
+
public static int getLabelResource(String spec) {
if (spec.equals("wifi")) return R.string.quick_settings_wifi_label;
else if (spec.equals("bt")) return R.string.quick_settings_bluetooth_label;
@@ -443,6 +448,34 @@ public class QSTileHost implements QSTile.Host, Tunable {
return 0;
}
+ public static int getIconResource(String spec) {
+ if (spec.equals("wifi")) return R.drawable.ic_qs_wifi_full_4;
+ else if (spec.equals("bt")) return R.drawable.ic_qs_bluetooth_on;
+ else if (spec.equals("inversion")) return R.drawable.ic_invert_colors_enable_animation;
+ else if (spec.equals("cell")) return R.drawable.ic_qs_signal_full_4;
+ else if (spec.equals("airplane")) return R.drawable.ic_signal_airplane_enable;
+ else if (spec.equals("dnd")) return R.drawable.ic_dnd;
+ else if (spec.equals("rotation")) return R.drawable.ic_portrait_from_auto_rotate;
+ else if (spec.equals("flashlight")) return R.drawable.ic_signal_flashlight_enable;
+ else if (spec.equals("location")) return R.drawable.ic_signal_location_enable;
+ else if (spec.equals("cast")) return R.drawable.ic_qs_cast_on;
+ else if (spec.equals("hotspot")) return R.drawable.ic_hotspot_enable;
+ else if (spec.equals("edit")) return R.drawable.ic_qs_edit_tiles;
+ else if (spec.equals("adb_network")) return R.drawable.ic_qs_network_adb_on;
+ else if (spec.equals("compass")) return R.drawable.ic_qs_compass_on;
+ else if (spec.equals("nfc")) return R.drawable.ic_qs_nfc_on;
+ else if (spec.equals("profiles")) return R.drawable.ic_qs_profiles_on;
+ else if (spec.equals("sync")) return R.drawable.ic_qs_sync_on;
+ else if (spec.equals("volume_panel")) return R.drawable.ic_qs_volume_panel;
+ else if (spec.equals("usb_tether")) return R.drawable.ic_qs_usb_tether_on;
+ else if (spec.equals("screen_timeout")) return R.drawable.ic_qs_screen_timeout_short_avd;
+ else if (spec.equals("performance")) return R.drawable.ic_qs_perf_profile;
+ else if (spec.equals("lockscreen")) return R.drawable.ic_qs_lock_screen_on;
+ else if (spec.equals("ambient_display")) return R.drawable.ic_qs_ambientdisplay_on;
+ else if (spec.equals("live_display")) return R.drawable.ic_livedisplay_auto;
+ return 0;
+ }
+
void updateCustomTile(StatusBarPanelCustomTile sbc) {
synchronized (mTiles) {
if (mTiles.containsKey(sbc.getKey())) {
@@ -479,7 +512,7 @@ public class QSTileHost implements QSTile.Host, Tunable {
}
}
- CustomTileData getCustomTileData() {
+ public CustomTileData getCustomTileData() {
return mCustomTileData;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
index 6624b30..f83fbea 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java
@@ -55,7 +55,6 @@ import android.widget.Switch;
import android.widget.TextView;
import android.widget.Toast;
-import com.android.internal.logging.MetricsConstants;
import com.android.keyguard.KeyguardStatusView;
import com.android.systemui.BatteryLevelTextView;
import com.android.systemui.BatteryMeterView;
@@ -77,6 +76,7 @@ import java.text.NumberFormat;
import cyanogenmod.app.StatusBarPanelCustomTile;
import cyanogenmod.providers.CMSettings;
+import org.cyanogenmod.internal.logging.CMMetricsLogger;
/**
* The view to manage the header area in the expanded status bar.
@@ -157,6 +157,8 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
private SettingsObserver mSettingsObserver;
private boolean mShowWeather;
private boolean mShowBatteryTextExpanded;
+
+ private QSTile.DetailAdapter mEditingDetailAdapter;
private boolean mEditing;
public StatusBarHeaderView(Context context, AttributeSet attrs) {
@@ -747,13 +749,8 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
public void setEditing(boolean editing) {
mEditing = editing;
- if (mEditing) {
- mQsPanelCallback.onShowingDetail(new QSTile.DetailAdapter() {
- @Override
- public StatusBarPanelCustomTile getCustomTile() {
- return null;
- }
-
+ if (mEditingDetailAdapter == null) {
+ mEditingDetailAdapter = new QSTile.DetailAdapter() {
@Override
public int getTitle() {
return R.string.quick_settings_edit_label;
@@ -775,18 +772,23 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
}
@Override
+ public StatusBarPanelCustomTile getCustomTile() {
+ return null;
+ }
+
+ @Override
public void setToggleState(boolean state) {
}
@Override
public int getMetricsCategory() {
- return MetricsConstants.DONT_TRACK_ME_BRO;
+ return CMMetricsLogger.DONT_LOG;
}
- });
- } else {
- mQsPanelCallback.onShowingDetail(null);
+ };
}
+ mQsPanelCallback.onShowingDetail(mEditing ? mEditingDetailAdapter : null);
+ updateEverything();
}
/**
@@ -865,7 +867,7 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
post(new Runnable() {
@Override
public void run() {
- handleShowingDetail(detail);
+ handleShowingDetail(mEditing && detail == null ? mEditingDetailAdapter : detail);
}
});
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
index 93ac4e0..0c68785 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
@@ -482,6 +482,10 @@ public class StatusBarIconController implements Tunable {
refreshAllIconsForLayout(mNotificationIcons);
}
+ public LinearLayout getStatusIcons() {
+ return mStatusIcons;
+ }
+
private void refreshAllIconsForLayout(LinearLayout ll) {
final int count = ll.getChildCount();
for (int n = 0; n < count; n++) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
index 77d4959..2347a33 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java
@@ -524,7 +524,8 @@ public class StatusBarKeyguardViewManager {
}
public boolean shouldDisableWindowAnimationsForUnlock() {
- return mPhoneStatusBar.isInLaunchTransition();
+ return mPhoneStatusBar.isInLaunchTransition() ||
+ mPhoneStatusBar.mNotificationPanel.hasExternalKeyguardView();
}
public boolean isGoingToNotificationShade() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
index 75d2283..56ced84 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
@@ -64,8 +64,6 @@ public class StatusBarWindowView extends FrameLayout {
private NotificationPanelView mNotificationPanel;
private View mBrightnessMirror;
- private int mRightInset = 0;
-
private PhoneStatusBar mService;
private final Paint mTransparentSrcPaint = new Paint();
@@ -87,66 +85,6 @@ public class StatusBarWindowView extends FrameLayout {
}
@Override
- protected boolean fitSystemWindows(Rect insets) {
- if (getFitsSystemWindows()) {
- boolean paddingChanged = insets.left != getPaddingLeft()
- || insets.top != getPaddingTop()
- || insets.bottom != getPaddingBottom();
-
- // Super-special right inset handling, because scrims and backdrop need to ignore it.
- if (insets.right != mRightInset) {
- mRightInset = insets.right;
- applyMargins();
- }
- // Drop top inset, apply left inset and pass through bottom inset.
- if (paddingChanged) {
- setPadding(insets.left, 0, 0, 0);
- }
- insets.left = 0;
- insets.top = 0;
- insets.right = 0;
- } else {
- if (mRightInset != 0) {
- mRightInset = 0;
- applyMargins();
- }
- boolean changed = getPaddingLeft() != 0
- || getPaddingRight() != 0
- || getPaddingTop() != 0
- || getPaddingBottom() != 0;
- if (changed) {
- setPadding(0, 0, 0, 0);
- }
- insets.top = 0;
- }
- return false;
- }
-
- private void applyMargins() {
- final int N = getChildCount();
- for (int i = 0; i < N; i++) {
- View child = getChildAt(i);
- if (child.getLayoutParams() instanceof LayoutParams) {
- LayoutParams lp = (LayoutParams) child.getLayoutParams();
- if (!lp.ignoreRightInset && lp.rightMargin != mRightInset) {
- lp.rightMargin = mRightInset;
- child.requestLayout();
- }
- }
- }
- }
-
- @Override
- public FrameLayout.LayoutParams generateLayoutParams(AttributeSet attrs) {
- return new LayoutParams(getContext(), attrs);
- }
-
- @Override
- protected FrameLayout.LayoutParams generateDefaultLayoutParams() {
- return new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
- }
-
- @Override
protected void onFinishInflate() {
super.onFinishInflate();
mStackScrollLayout = (NotificationStackScrollLayout) findViewById(
@@ -190,11 +128,13 @@ public class StatusBarWindowView extends FrameLayout {
// occur if our window is translucent. Since we are drawing the whole window anyway with
// the scrim, we don't need the window to be cleared in the beginning.
if (mService.isScrimSrcModeEnabled()) {
- IBinder windowToken = getWindowToken();
- WindowManager.LayoutParams lp = (WindowManager.LayoutParams) getLayoutParams();
- lp.token = windowToken;
- setLayoutParams(lp);
- WindowManagerGlobal.getInstance().changeCanvasOpacity(windowToken, true);
+ if (getLayoutParams() instanceof WindowManager.LayoutParams) {
+ WindowManager.LayoutParams lp = (WindowManager.LayoutParams) getLayoutParams();
+ IBinder windowToken = getWindowToken();
+ lp.token = windowToken;
+ setLayoutParams(lp);
+ WindowManagerGlobal.getInstance().changeCanvasOpacity(windowToken, true);
+ }
setWillNotDraw(false);
} else {
setWillNotDraw(!DEBUG);
@@ -208,6 +148,16 @@ public class StatusBarWindowView extends FrameLayout {
}
@Override
+ protected boolean fitSystemWindows(Rect insets) {
+ insets.bottom = 0;
+ insets.top = 0;
+ insets.right = 0;
+ insets.left = 0;
+ super.fitSystemWindows(insets);
+ return false;
+ }
+
+ @Override
public boolean dispatchKeyEvent(KeyEvent event) {
boolean down = event.getAction() == KeyEvent.ACTION_DOWN;
switch (event.getKeyCode()) {
@@ -300,7 +250,7 @@ public class StatusBarWindowView extends FrameLayout {
}
@Override
- public void onDraw(Canvas canvas) {
+ protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if (mService.isScrimSrcModeEnabled()) {
// We need to ensure that our window is always drawn fully even when we have paddings,
@@ -351,24 +301,6 @@ public class StatusBarWindowView extends FrameLayout {
removeView(content);
}
- public class LayoutParams extends FrameLayout.LayoutParams {
-
- public boolean ignoreRightInset;
-
- public LayoutParams(int width, int height) {
- super(width, height);
- }
-
- public LayoutParams(Context c, AttributeSet attrs) {
- super(c, attrs);
-
- TypedArray a = c.obtainStyledAttributes(attrs, R.styleable.StatusBarWindowView_Layout);
- ignoreRightInset = a.getBoolean(
- R.styleable.StatusBarWindowView_Layout_ignoreRightInset, false);
- a.recycle();
- }
- }
-
class SettingsObserver extends ContentObserver {
SettingsObserver(Handler handler) {
super(handler);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CallbackHandler.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CallbackHandler.java
index e618cb8..e7f65b4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CallbackHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CallbackHandler.java
@@ -126,14 +126,15 @@ public class CallbackHandler extends Handler implements EmergencyListener, Signa
public void setMobileDataIndicators(final IconState statusIcon, final IconState qsIcon,
final int statusType, final int qsType,final boolean activityIn,
final boolean activityOut, final String typeContentDescription,
- final String description, final boolean isWide, final int subId) {
+ final String description, final boolean isWide, final boolean showSeparateRoaming,
+ final int subId) {
post(new Runnable() {
@Override
public void run() {
for (SignalCallback signalCluster : mSignalCallbacks) {
signalCluster.setMobileDataIndicators(statusIcon, qsIcon, statusType, qsType,
activityIn, activityOut, typeContentDescription, description, isWide,
- subId);
+ showSeparateRoaming, subId);
}
}
});
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
index 186005c..720ab44 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
@@ -1,4 +1,7 @@
/*
+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+ *
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -105,11 +108,19 @@ public class DateView extends TextView {
}
mCurrentTime.setTime(System.currentTimeMillis());
-
- final String text = mDateFormat.format(mCurrentTime);
+ final String text = getDateFormat();
if (!text.equals(mLastText)) {
setText(text);
mLastText = text;
}
}
+
+ private String getDateFormat() {
+ if (getContext().getResources().getBoolean(
+ com.android.internal.R.bool.def_custom_dateformat)) {
+ return DateFormat.getDateFormat(getContext()).format(mCurrentTime);
+ } else {
+ return mDateFormat.format(mCurrentTime);
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
index 4a95d3a..5847f42 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
@@ -160,6 +160,10 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
mListeners.add(listener);
}
+ public void removeListener(OnHeadsUpChangedListener listener) {
+ mListeners.remove(listener);
+ }
+
public PhoneStatusBar getBar() {
return mBar;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
index 33df7a8..435787e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
@@ -19,6 +19,7 @@ import android.content.Context;
import android.content.Intent;
import android.net.NetworkCapabilities;
import android.os.Looper;
+import android.os.SystemProperties;
import android.telephony.PhoneStateListener;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
@@ -238,6 +239,7 @@ public class MobileSignalController extends SignalController<
int typeIcon = showDataIcon ? icons.mDataType : 0;
mCallbackHandler.setMobileDataIndicators(statusIcon, qsIcon, typeIcon, qsTypeIcon,
activityIn, activityOut, dataContentDescription, description, icons.mIsWide,
+ mCurrentState.showSeparateRoaming,
mSubscriptionInfo.getSubscriptionId());
}
@@ -398,7 +400,12 @@ public class MobileSignalController extends SignalController<
if (isCarrierNetworkChangeActive()) {
mCurrentState.iconGroup = TelephonyIcons.CARRIER_NETWORK_CHANGE;
} else if (isRoaming()) {
- mCurrentState.iconGroup = TelephonyIcons.ROAMING;
+ mCurrentState.showSeparateRoaming = false;
+ if (SystemProperties.getBoolean("ro.config.always_show_roaming", false)) {
+ mCurrentState.showSeparateRoaming = true;
+ } else {
+ mCurrentState.iconGroup = TelephonyIcons.ROAMING;
+ }
}
if (isEmergencyOnly() != mCurrentState.isEmergency) {
mCurrentState.isEmergency = isEmergencyOnly();
@@ -530,6 +537,7 @@ public class MobileSignalController extends SignalController<
boolean airplaneMode;
boolean carrierNetworkChangeMode;
boolean isDefault;
+ boolean showSeparateRoaming;
@Override
public void copyFrom(State s) {
@@ -543,6 +551,7 @@ public class MobileSignalController extends SignalController<
isEmergency = state.isEmergency;
airplaneMode = state.airplaneMode;
carrierNetworkChangeMode = state.carrierNetworkChangeMode;
+ showSeparateRoaming = state.showSeparateRoaming;
}
@Override
@@ -557,6 +566,7 @@ public class MobileSignalController extends SignalController<
builder.append("isEmergency=").append(isEmergency).append(',');
builder.append("airplaneMode=").append(airplaneMode).append(',');
builder.append("carrierNetworkChangeMode=").append(carrierNetworkChangeMode);
+ builder.append("showSeparateRoaming=").append(showSeparateRoaming);
}
@Override
@@ -569,7 +579,8 @@ public class MobileSignalController extends SignalController<
&& ((MobileState) o).isEmergency == isEmergency
&& ((MobileState) o).airplaneMode == airplaneMode
&& ((MobileState) o).carrierNetworkChangeMode == carrierNetworkChangeMode
- && ((MobileState) o).isDefault == isDefault;
+ && ((MobileState) o).isDefault == isDefault
+ && ((MobileState) o).showSeparateRoaming == showSeparateRoaming;
}
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index 8023ea6..57b0dba 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -40,7 +40,7 @@ public interface NetworkController {
void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
int qsType, boolean activityIn, boolean activityOut, String typeContentDescription,
- String description, boolean isWide, int subId);
+ String description, boolean isWide, boolean showSeparateRoaming, int subId);
void setSubs(List<SubscriptionInfo> subs);
void setNoSims(boolean show);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SignalCallbackAdapter.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SignalCallbackAdapter.java
index dce889f..f13ef9f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SignalCallbackAdapter.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SignalCallbackAdapter.java
@@ -37,7 +37,7 @@ public class SignalCallbackAdapter implements SignalCallback {
@Override
public void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
int qsType, boolean activityIn, boolean activityOut, String typeContentDescription,
- String description, boolean isWide, int subId) {
+ String description, boolean isWide, boolean showSeparateRoaming, int subId) {
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SignalController.java
index 5e9447e..72e3a06 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SignalController.java
@@ -256,6 +256,7 @@ public abstract class SignalController<T extends SignalController.State,
IconGroup iconGroup;
int inetCondition;
int rssi; // Only for logging.
+ boolean showSeparateRoaming;
// Not used for comparison, just used for logging.
long time;
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/StatusBarIconBlacklistFragment.java b/packages/SystemUI/src/com/android/systemui/tuner/StatusBarIconBlacklistFragment.java
new file mode 100644
index 0000000..c339541
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/tuner/StatusBarIconBlacklistFragment.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2016 The CyanogenMod Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.systemui.tuner;
+
+import android.annotation.Nullable;
+import android.os.Bundle;
+import android.preference.Preference;
+import android.preference.PreferenceFragment;
+
+import android.preference.PreferenceGroup;
+import com.android.systemui.R;
+import com.android.systemui.statusbar.phone.StatusBarIconController;
+
+public class StatusBarIconBlacklistFragment extends PreferenceFragment {
+ @Override
+ public void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ addPreferencesFromResource(R.xml.tuner_statusbar_icons);
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ registerPrefs(getPreferenceScreen());
+ }
+
+ @Override
+ public void onPause() {
+ super.onPause();
+ unregisterPrefs(getPreferenceScreen());
+ }
+
+ private void registerPrefs(PreferenceGroup group) {
+ TunerService tunerService = TunerService.get(getContext());
+ final int N = group.getPreferenceCount();
+ for (int i = 0; i < N; i++) {
+ Preference pref = group.getPreference(i);
+ if (pref instanceof StatusBarSwitch) {
+ tunerService.addTunable((TunerService.Tunable) pref, StatusBarIconController.ICON_BLACKLIST);
+ } else if (pref instanceof PreferenceGroup) {
+ registerPrefs((PreferenceGroup) pref);
+ }
+ }
+ }
+
+ private void unregisterPrefs(PreferenceGroup group) {
+ TunerService tunerService = TunerService.get(getContext());
+ final int N = group.getPreferenceCount();
+ for (int i = 0; i < N; i++) {
+ Preference pref = group.getPreference(i);
+ if (pref instanceof TunerService.Tunable) {
+ tunerService.removeTunable((TunerService.Tunable) pref);
+ } else if (pref instanceof PreferenceGroup) {
+ registerPrefs((PreferenceGroup) pref);
+ }
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
index 43203c8..401fb0e 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerActivity.java
@@ -61,4 +61,11 @@ public class TunerActivity extends Activity {
return new DemoModeFragment();
}
}
+
+ public static final class StatusBarIconActivity extends FragmentTunerActivityBase {
+ @Override
+ protected Fragment getFragment() {
+ return new StatusBarIconBlacklistFragment();
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java
index 1ff5cef..0bc663b 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerFragment.java
@@ -44,18 +44,13 @@ public class TunerFragment extends PreferenceFragment {
private static final String TAG = "TunerFragment";
- private static final String KEY_QS_TUNER = "qs_tuner";
+ private static final String KEY_STATUSBAR_BLACKLIST = "statusbar_icon_blacklist";
private static final String KEY_DEMO_MODE = "demo_mode";
- private static final String KEY_BATTERY_PCT = "battery_pct";
public static final String SETTING_SEEN_TUNER_WARNING = "seen_tuner_warning";
private static final int MENU_REMOVE = Menu.FIRST + 1;
- private final SettingObserver mSettingObserver = new SettingObserver();
-
- private SwitchPreference mBatteryPct;
-
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -63,11 +58,12 @@ public class TunerFragment extends PreferenceFragment {
getActivity().getActionBar().setDisplayHomeAsUpEnabled(true);
setHasOptionsMenu(true);
- findPreference(KEY_QS_TUNER).setOnPreferenceClickListener(new OnPreferenceClickListener() {
+ findPreference(KEY_STATUSBAR_BLACKLIST).setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
FragmentTransaction ft = getFragmentManager().beginTransaction();
- ft.replace(android.R.id.content, new QsTuner(), "QsTuner");
+ ft.replace(android.R.id.content, new StatusBarIconBlacklistFragment(),
+ "StatusBarBlacklist");
ft.addToBackStack(null);
ft.commit();
return true;
@@ -83,7 +79,6 @@ public class TunerFragment extends PreferenceFragment {
return true;
}
});
- mBatteryPct = (SwitchPreference) findPreference(KEY_BATTERY_PCT);
if (Settings.Secure.getInt(getContext().getContentResolver(), SETTING_SEEN_TUNER_WARNING,
0) == 0) {
new AlertDialog.Builder(getContext())
@@ -102,7 +97,6 @@ public class TunerFragment extends PreferenceFragment {
@Override
public void onResume() {
super.onResume();
- updateBatteryPct();
registerPrefs(getPreferenceScreen());
MetricsLogger.visibility(getContext(), MetricsLogger.TUNER, true);
@@ -111,7 +105,6 @@ public class TunerFragment extends PreferenceFragment {
@Override
public void onPause() {
super.onPause();
- getContext().getContentResolver().unregisterContentObserver(mSettingObserver);
unregisterPrefs(getPreferenceScreen());
MetricsLogger.visibility(getContext(), MetricsLogger.TUNER, false);
@@ -165,30 +158,4 @@ public class TunerFragment extends PreferenceFragment {
}
return super.onOptionsItemSelected(item);
}
-
- private void updateBatteryPct() {
- mBatteryPct.setOnPreferenceChangeListener(null);
- mBatteryPct.setOnPreferenceChangeListener(mBatteryPctChange);
- }
-
- private final class SettingObserver extends ContentObserver {
- public SettingObserver() {
- super(new Handler());
- }
-
- @Override
- public void onChange(boolean selfChange, Uri uri, int userId) {
- super.onChange(selfChange, uri, userId);
- updateBatteryPct();
- }
- }
-
- private final OnPreferenceChangeListener mBatteryPctChange = new OnPreferenceChangeListener() {
- @Override
- public boolean onPreferenceChange(Preference preference, Object newValue) {
- final boolean v = (Boolean) newValue;
- MetricsLogger.action(getContext(), MetricsLogger.TUNER_BATTERY_PERCENTAGE, v);
- return true;
- }
- };
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CallbackHandlerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CallbackHandlerTest.java
index 00b8de2..7df96a9 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CallbackHandlerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/CallbackHandlerTest.java
@@ -103,9 +103,10 @@ public class CallbackHandlerTest extends AndroidTestCase {
int type = R.drawable.stat_sys_data_fully_connected_1x;
int qsType = R.drawable.ic_qs_signal_1x;
boolean wide = true;
+ boolean showSeparateRoamIndicator = false;
int subId = 5;
mHandler.setMobileDataIndicators(status, qs, type, qsType, in, out, typeDescription,
- description, wide, subId);
+ description, wide, showSeparateRoamIndicator, subId);
waitForCallbacks();
ArgumentCaptor<IconState> statusArg = ArgumentCaptor.forClass(IconState.class);
@@ -117,11 +118,13 @@ public class CallbackHandlerTest extends AndroidTestCase {
ArgumentCaptor<String> typeContentArg = ArgumentCaptor.forClass(String.class);
ArgumentCaptor<String> descArg = ArgumentCaptor.forClass(String.class);
ArgumentCaptor<Boolean> wideArg = ArgumentCaptor.forClass(Boolean.class);
+ ArgumentCaptor<Boolean> showSeparateRoamIndicatorArg =
+ ArgumentCaptor.forClass(Boolean.class);
ArgumentCaptor<Integer> subIdArg = ArgumentCaptor.forClass(Integer.class);
Mockito.verify(mSignalCallback).setMobileDataIndicators(statusArg.capture(),
qsArg.capture(), typeIconArg.capture(), qsTypeIconArg.capture(), inArg.capture(),
outArg.capture(), typeContentArg.capture(), descArg.capture(), wideArg.capture(),
- subIdArg.capture());
+ showSeparateRoamIndicatorArg.capture(), subIdArg.capture());
assertEquals(status, statusArg.getValue());
assertEquals(qs, qsArg.getValue());
assertEquals(type, (int) typeIconArg.getValue());
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java
index 30c08cd..db38d3b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java
@@ -279,6 +279,7 @@ public class NetworkControllerBaseTest extends SysuiTestCase {
ArgumentCaptor.forClass(String.class).capture(),
ArgumentCaptor.forClass(String.class).capture(),
ArgumentCaptor.forClass(Boolean.class).capture(),
+ ArgumentCaptor.forClass(Boolean.class).capture(),
ArgumentCaptor.forClass(Integer.class).capture());
IconState iconState = iconArg.getValue();
assertEquals("Visibility in, quick settings", visible, iconState.visible);
@@ -305,6 +306,7 @@ public class NetworkControllerBaseTest extends SysuiTestCase {
ArgumentCaptor.forClass(String.class).capture(),
ArgumentCaptor.forClass(String.class).capture(),
ArgumentCaptor.forClass(Boolean.class).capture(),
+ ArgumentCaptor.forClass(Boolean.class).capture(),
ArgumentCaptor.forClass(Integer.class).capture());
IconState iconState = iconArg.getValue();
diff --git a/services/core/java/com/android/server/LockSettingsStrongAuth.java b/services/core/java/com/android/server/LockSettingsStrongAuth.java
index c023f4a..5add4c0 100644
--- a/services/core/java/com/android/server/LockSettingsStrongAuth.java
+++ b/services/core/java/com/android/server/LockSettingsStrongAuth.java
@@ -16,6 +16,7 @@
package com.android.server;
+import android.os.Looper;
import com.android.internal.widget.LockPatternUtils;
import com.android.internal.widget.LockPatternUtils.StrongAuthTracker;
@@ -47,6 +48,12 @@ public class LockSettingsStrongAuth {
private final ArrayList<IStrongAuthTracker> mStrongAuthTrackers = new ArrayList<>();
private final SparseIntArray mStrongAuthForUser = new SparseIntArray();
+ private final Handler mHandler;
+
+ public LockSettingsStrongAuth() {
+ mHandler = new Handler(Looper.getMainLooper(), mHandlerCallback);
+ }
+
private void handleAddStrongAuthTracker(IStrongAuthTracker tracker) {
for (int i = 0; i < mStrongAuthTrackers.size(); i++) {
if (mStrongAuthTrackers.get(i).asBinder() == tracker.asBinder()) {
@@ -145,9 +152,9 @@ public class LockSettingsStrongAuth {
requireStrongAuth(STRONG_AUTH_NOT_REQUIRED, userId);
}
- private final Handler mHandler = new Handler() {
+ private final Handler.Callback mHandlerCallback = new Handler.Callback() {
@Override
- public void handleMessage(Message msg) {
+ public boolean handleMessage(Message msg) {
switch (msg.what) {
case MSG_REGISTER_TRACKER:
handleAddStrongAuthTracker((IStrongAuthTracker) msg.obj);
@@ -162,6 +169,7 @@ public class LockSettingsStrongAuth {
handleRemoveUser(msg.arg1);
break;
}
+ return true;
}
};
}
diff --git a/services/core/java/com/android/server/ThemeService.java b/services/core/java/com/android/server/ThemeService.java
index dd85ad9..106bd85 100644
--- a/services/core/java/com/android/server/ThemeService.java
+++ b/services/core/java/com/android/server/ThemeService.java
@@ -97,6 +97,7 @@ public class ThemeService extends IThemeService.Stub {
private static final String GOOGLE_SETUPWIZARD_PACKAGE = "com.google.android.setupwizard";
private static final String CM_SETUPWIZARD_PACKAGE = "com.cyanogenmod.account";
+ private static final String MANAGED_PROVISIONING_PACKAGE = "com.android.managedprovisioning";
private static final long MAX_ICON_CACHE_SIZE = 33554432L; // 32MB
private static final long PURGED_ICON_CACHE_SIZE = 25165824L; // 24 MB
@@ -660,19 +661,14 @@ public class ThemeService extends IThemeService.Stub {
boolean success;
success = setCustomLockScreenWallpaper(pkgName);
- // TODO: uncomment once Keyguard wallpaper is re-implemented
- /*
if (success) {
mContext.sendBroadcastAsUser(new Intent(Intent.ACTION_KEYGUARD_WALLPAPER_CHANGED),
UserHandle.ALL);
}
- */
return success;
}
private boolean setCustomLockScreenWallpaper(String pkgName) {
- // TODO: uncomment once Keyguard wallpaper is re-implemented
- /*
WallpaperManager wm = WallpaperManager.getInstance(mContext);
try {
if (SYSTEM_DEFAULT.equals(pkgName) || TextUtils.isEmpty(pkgName)) {
@@ -688,7 +684,6 @@ public class ThemeService extends IThemeService.Stub {
Log.e(TAG, "There was an error setting lockscreen wp for pkg " + pkgName, e);
return false;
}
- */
return true;
}
@@ -865,6 +860,7 @@ public class ThemeService extends IThemeService.Stub {
private boolean isSetupActivity(ResolveInfo info) {
return GOOGLE_SETUPWIZARD_PACKAGE.equals(info.activityInfo.packageName) ||
+ MANAGED_PROVISIONING_PACKAGE.equals(info.activityInfo.packageName) ||
CM_SETUPWIZARD_PACKAGE.equals(info.activityInfo.packageName);
}
diff --git a/services/core/java/com/android/server/WiredAccessoryManager.java b/services/core/java/com/android/server/WiredAccessoryManager.java
index 1b82ed6..3b52fce 100644
--- a/services/core/java/com/android/server/WiredAccessoryManager.java
+++ b/services/core/java/com/android/server/WiredAccessoryManager.java
@@ -22,6 +22,7 @@ import android.os.Looper;
import android.os.Message;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
+import android.os.SystemProperties;
import android.os.UEventObserver;
import android.util.Slog;
import android.media.AudioManager;
@@ -66,6 +67,7 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks {
private static final String NAME_H2W = "h2w";
private static final String NAME_USB_AUDIO = "usb_audio";
+ private static final String NAME_EMU_AUDIO = "semu_audio";
private static final String NAME_SAMSUNG_USB_AUDIO = "dock";
private static final String NAME_HDMI_AUDIO = "hdmi_audio";
private static final String NAME_HDMI = "hdmi";
@@ -386,13 +388,17 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks {
Slog.w(TAG, "This kernel does not have usb audio support");
}
+ // Monitor Motorola EMU audio jack
+ uei = new UEventInfo(NAME_EMU_AUDIO, BIT_USB_HEADSET_ANLG, 0, 0);
+ if (uei.checkSwitchExists()) {
+ retVal.add(uei);
+ }
+
// Monitor Samsung USB audio
uei = new UEventInfo(NAME_SAMSUNG_USB_AUDIO, BIT_USB_HEADSET_DGTL,
BIT_USB_HEADSET_ANLG, 0);
if (uei.checkSwitchExists()) {
retVal.add(uei);
- } else {
- Slog.w(TAG, "This kernel does not have samsung usb dock audio support");
}
// Monitor HDMI
@@ -425,6 +431,13 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks {
try {
String devPath = event.get("DEVPATH");
String name = event.get("SWITCH_NAME");
+ if (SystemProperties.getBoolean("tcmd.whisper", false) &&
+ (name.equals("CAR") || name.equals("DESK"))) {
+ // Motorola dock - ignore this event and don't change
+ // the audio routing just because we're docked.
+ // Let only the dock emu audio jack sensing do that.
+ return;
+ }
int state = validateSwitchState(Integer.parseInt(event.get("SWITCH_STATE")));
synchronized (mLock) {
updateStateLocked(devPath, name, state);
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index b34a6ef..bb61149 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -2122,7 +2122,7 @@ public final class ActivityManagerService extends ActivityManagerNative
context.getApplicationInfo().loadLabel(context.getPackageManager()));
String title = mContext.getString(R.string.privacy_guard_notification);
- Intent infoIntent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,
+ Intent infoIntent = new Intent(Settings.ACTION_APP_OPS_DETAILS_SETTINGS,
Uri.fromParts("package", root.packageName, null));
Notification notification = new Notification();
diff --git a/services/core/java/com/android/server/display/AutomaticBrightnessController.java b/services/core/java/com/android/server/display/AutomaticBrightnessController.java
index bac4fd1..1925ed3 100644
--- a/services/core/java/com/android/server/display/AutomaticBrightnessController.java
+++ b/services/core/java/com/android/server/display/AutomaticBrightnessController.java
@@ -61,6 +61,11 @@ class AutomaticBrightnessController {
private static final float BRIGHTENING_LIGHT_HYSTERESIS = 0.10f;
private static final float DARKENING_LIGHT_HYSTERESIS = 0.20f;
+ // Threshold (in lux) to select between normal and fast debounce time.
+ // If the difference between last sample and weighted value is larger than this value,
+ // fast debounce is used.
+ private static final float BRIGHTENING_FAST_THRESHOLD = 1000f;
+
// How long the current sensor reading is assumed to be valid beyond the current time.
// This provides a bit of prediction, as well as ensures that the weight for the last sample is
// non-zero, which in turn ensures that the total weight is non-zero.
@@ -119,6 +124,7 @@ class AutomaticBrightnessController {
// when adapting to brighter or darker environments. This parameter controls how quickly
// brightness changes occur in response to an observed change in light level that exceeds the
// hysteresis threshold.
+ private final long mBrighteningLightFastDebounceConfig;
private final long mBrighteningLightDebounceConfig;
private final long mDarkeningLightDebounceConfig;
@@ -204,7 +210,8 @@ class AutomaticBrightnessController {
SensorManager sensorManager, Spline autoBrightnessSpline, int lightSensorWarmUpTime,
int brightnessMin, int brightnessMax, float dozeScaleFactor,
int lightSensorRate, long brighteningLightDebounceConfig,
- long darkeningLightDebounceConfig, boolean resetAmbientLuxAfterWarmUpConfig,
+ long brighteningLightFastDebounceConfig, long darkeningLightDebounceConfig,
+ boolean resetAmbientLuxAfterWarmUpConfig,
int ambientLightHorizon, LiveDisplayController ldc) {
mContext = context;
mCallbacks = callbacks;
@@ -217,6 +224,7 @@ class AutomaticBrightnessController {
mDozeScaleFactor = dozeScaleFactor;
mLightSensorRate = lightSensorRate;
mBrighteningLightDebounceConfig = brighteningLightDebounceConfig;
+ mBrighteningLightFastDebounceConfig = brighteningLightFastDebounceConfig;
mDarkeningLightDebounceConfig = darkeningLightDebounceConfig;
mResetAmbientLuxAfterWarmUpConfig = resetAmbientLuxAfterWarmUpConfig;
mLiveDisplay = ldc;
@@ -268,6 +276,7 @@ class AutomaticBrightnessController {
pw.println(" mScreenBrightnessRangeMaximum=" + mScreenBrightnessRangeMaximum);
pw.println(" mLightSensorWarmUpTimeConfig=" + mLightSensorWarmUpTimeConfig);
pw.println(" mBrighteningLightDebounceConfig=" + mBrighteningLightDebounceConfig);
+ pw.println(" mBrighteningLightFastDebounceConfig=" + mBrighteningLightFastDebounceConfig);
pw.println(" mDarkeningLightDebounceConfig=" + mDarkeningLightDebounceConfig);
pw.println(" mResetAmbientLuxAfterWarmUpConfig=" + mResetAmbientLuxAfterWarmUpConfig);
@@ -315,6 +324,7 @@ class AutomaticBrightnessController {
private void handleLightSensorEvent(long time, float lux) {
mHandler.removeMessages(MSG_UPDATE_AMBIENT_LUX);
+ if (DEBUG) Slog.d(TAG, "handleLightSensorEvent: time=" + time + ", lux=" + lux);
applyLightSensorMeasurement(time, lux);
updateAmbientLux(time);
}
@@ -382,7 +392,7 @@ class AutomaticBrightnessController {
return x * (x * 0.5f + mWeightingIntercept);
}
- private long nextAmbientLightBrighteningTransition(long time) {
+ private long nextAmbientLightBrighteningTransition(long time, float ambientLux) {
final int N = mAmbientLightRingBuffer.size();
long earliestValidTime = time;
for (int i = N - 1; i >= 0; i--) {
@@ -391,10 +401,13 @@ class AutomaticBrightnessController {
}
earliestValidTime = mAmbientLightRingBuffer.getTime(i);
}
- return earliestValidTime + mBrighteningLightDebounceConfig;
+
+ long debounceDelay = mLastObservedLux - ambientLux > BRIGHTENING_FAST_THRESHOLD
+ ? mBrighteningLightFastDebounceConfig : mBrighteningLightDebounceConfig;
+ return earliestValidTime + debounceDelay;
}
- private long nextAmbientLightDarkeningTransition(long time) {
+ private long nextAmbientLightDarkeningTransition(long time, float ambientLux) {
final int N = mAmbientLightRingBuffer.size();
long earliestValidTime = time;
for (int i = N - 1; i >= 0; i--) {
@@ -438,13 +451,12 @@ class AutomaticBrightnessController {
updateAutoBrightness(true);
}
- long nextBrightenTransition = nextAmbientLightBrighteningTransition(time);
- long nextDarkenTransition = nextAmbientLightDarkeningTransition(time);
float ambientLux = calculateAmbientLux(time);
+ long nextBrightenTransition = nextAmbientLightBrighteningTransition(time, ambientLux);
+ long nextDarkenTransition = nextAmbientLightDarkeningTransition(time, ambientLux);
if (ambientLux >= mBrighteningLuxThreshold && nextBrightenTransition <= time
|| ambientLux <= mDarkeningLuxThreshold && nextDarkenTransition <= time) {
- setAmbientLux(ambientLux);
if (DEBUG) {
Slog.d(TAG, "updateAmbientLux: "
+ ((ambientLux > mAmbientLux) ? "Brightened" : "Darkened") + ": "
@@ -452,9 +464,10 @@ class AutomaticBrightnessController {
+ ", mAmbientLightRingBuffer=" + mAmbientLightRingBuffer
+ ", mAmbientLux=" + mAmbientLux);
}
+ setAmbientLux(ambientLux);
updateAutoBrightness(true);
- nextBrightenTransition = nextAmbientLightBrighteningTransition(time);
- nextDarkenTransition = nextAmbientLightDarkeningTransition(time);
+ nextBrightenTransition = nextAmbientLightBrighteningTransition(time, ambientLux);
+ nextDarkenTransition = nextAmbientLightDarkeningTransition(time, ambientLux);
}
long nextTransitionTime = Math.min(nextDarkenTransition, nextBrightenTransition);
// If one of the transitions is ready to occur, but the total weighted ambient lux doesn't
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index 0d795dd..ae596cb 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -317,6 +317,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
com.android.internal.R.integer.config_autoBrightnessLightSensorRate);
long brighteningLightDebounce = resources.getInteger(
com.android.internal.R.integer.config_autoBrightnessBrighteningLightDebounce);
+ long brighteningLightFastDebounce = resources.getInteger(
+ com.android.internal.R.integer.config_autoBrightnessBrighteningLightFastDebounce);
long darkeningLightDebounce = resources.getInteger(
com.android.internal.R.integer.config_autoBrightnessDarkeningLightDebounce);
boolean autoBrightnessResetAmbientLuxAfterWarmUp = resources.getBoolean(
@@ -359,9 +361,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
handler.getLooper(), sensorManager, screenAutoBrightnessSpline,
lightSensorWarmUpTimeConfig, screenBrightnessRangeMinimum,
mScreenBrightnessRangeMaximum, dozeScaleFactor, lightSensorRate,
- brighteningLightDebounce, darkeningLightDebounce,
- autoBrightnessResetAmbientLuxAfterWarmUp, ambientLightHorizon,
- mLiveDisplayController);
+ brighteningLightDebounce, brighteningLightFastDebounce,
+ darkeningLightDebounce, autoBrightnessResetAmbientLuxAfterWarmUp,
+ ambientLightHorizon, mLiveDisplayController);
}
}
diff --git a/services/core/java/com/android/server/location/GpsLocationProvider.java b/services/core/java/com/android/server/location/GpsLocationProvider.java
index 42b8783..11de1a2 100644
--- a/services/core/java/com/android/server/location/GpsLocationProvider.java
+++ b/services/core/java/com/android/server/location/GpsLocationProvider.java
@@ -88,6 +88,7 @@ import java.io.StringReader;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Date;
+import java.util.HashSet;
import java.util.Map.Entry;
import java.util.Properties;
@@ -359,6 +360,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
private String mC2KServerHost;
private int mC2KServerPort;
private boolean mSuplEsEnabled = false;
+ private HashSet<String> mLastKnownMccMnc;
private final Context mContext;
private final NtpTrustedTime mNtpTime;
@@ -482,18 +484,14 @@ public class GpsLocationProvider implements LocationProviderInterface {
};
private void subscriptionOrSimChanged(Context context) {
- Log.d(TAG, "received SIM related action: ");
- TelephonyManager phone = (TelephonyManager)
- mContext.getSystemService(Context.TELEPHONY_SERVICE);
- String mccMnc = phone.getSimOperator();
- if (!TextUtils.isEmpty(mccMnc)) {
- Log.d(TAG, "SIM MCC/MNC is available: " + mccMnc);
- synchronized (mLock) {
+ HashSet<String> mccMnc = getKnownMccMnc(context);
+ Log.d(TAG, "received SIM change, new known MCC/MNC: " + mccMnc);
+ synchronized (mLock) {
+ if (!mccMnc.isEmpty() && !mccMnc.equals(mLastKnownMccMnc)) {
reloadGpsProperties(context, mProperties);
mNIHandler.setSuplEsEnabled(mSuplEsEnabled);
}
- } else {
- Log.d(TAG, "SIM MCC/MNC is still not available");
+ mLastKnownMccMnc = mccMnc;
}
}
@@ -585,6 +583,20 @@ public class GpsLocationProvider implements LocationProviderInterface {
}
}
+ private HashSet<String> getKnownMccMnc(Context context) {
+ final TelephonyManager phone = (TelephonyManager)
+ context.getSystemService(Context.TELEPHONY_SERVICE);
+ final HashSet<String> mccMnc = new HashSet<String>();
+ final int phoneCnt = phone.getPhoneCount();
+ for (int i = 0;i < phoneCnt; ++i) {
+ String operator = phone.getNetworkOperatorForPhone(i);
+ if (!TextUtils.isEmpty(operator)) {
+ mccMnc.add(operator);
+ }
+ }
+ return mccMnc;
+ }
+
private void loadPropertiesFromResource(Context context,
Properties properties) {
String[] configValues = context.getResources().getStringArray(
@@ -650,6 +662,8 @@ public class GpsLocationProvider implements LocationProviderInterface {
// Construct internal handler
mHandler = new ProviderHandler(looper);
+ mLastKnownMccMnc = getKnownMccMnc(mContext);
+
// Load GPS configuration and register listeners in the background:
// some operations, such as opening files and registering broadcast receivers, can take a
// relative long time, so the ctor() is kept to create objects needed by this instance,
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index cb1cf47..c94d9b3 100755
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -702,8 +702,9 @@ public class NotificationManagerService extends SystemService {
"Bad notification posted from package " + pkg
+ ": " + message);
} catch (RemoteException e) {
+ } finally {
+ Binder.restoreCallingIdentity(ident);
}
- Binder.restoreCallingIdentity(ident);
}
@Override
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 358b773..b877b9d 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -8418,25 +8418,34 @@ public class PackageManagerService extends IPackageManager.Stub {
private void setUpCustomResolverActivity(PackageParser.Package pkg) {
synchronized (mPackages) {
- mResolverReplaced = true;
- // Set up information for custom user intent resolution activity.
- mResolveActivity.applicationInfo = pkg.applicationInfo;
- mResolveActivity.name = mCustomResolverComponentName.getClassName();
- mResolveActivity.packageName = pkg.applicationInfo.packageName;
- mResolveActivity.processName = pkg.applicationInfo.packageName;
- mResolveActivity.launchMode = ActivityInfo.LAUNCH_MULTIPLE;
- mResolveActivity.flags = ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS |
- ActivityInfo.FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS;
- mResolveActivity.theme = 0;
- mResolveActivity.exported = true;
- mResolveActivity.enabled = true;
- mResolveInfo.activityInfo = mResolveActivity;
- mResolveInfo.priority = 0;
- mResolveInfo.preferredOrder = 0;
- mResolveInfo.match = 0;
- mResolveComponentName = mCustomResolverComponentName;
- Slog.i(TAG, "Replacing default ResolverActivity with custom activity: " +
- mResolveComponentName);
+ for (Activity a : pkg.activities) {
+ if (a.getComponentName().getClassName()
+ .equals(mCustomResolverComponentName.getClassName())) {
+ mResolverReplaced = true;
+ // Set up information for custom user intent resolution activity.
+ mResolveActivity.applicationInfo = pkg.applicationInfo;
+ mResolveActivity.name = mCustomResolverComponentName.getClassName();
+ mResolveActivity.packageName = pkg.applicationInfo.packageName;
+ mResolveActivity.processName = pkg.applicationInfo.packageName;
+ mResolveActivity.launchMode = ActivityInfo.LAUNCH_MULTIPLE;
+ mResolveActivity.flags = ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS |
+ ActivityInfo.FLAG_FINISH_ON_CLOSE_SYSTEM_DIALOGS;
+ mResolveActivity.theme = a.info.theme;
+ mResolveActivity.exported = true;
+ mResolveActivity.enabled = true;
+ mResolveInfo.activityInfo = mResolveActivity;
+ mResolveInfo.priority = 0;
+ mResolveInfo.preferredOrder = 0;
+ mResolveInfo.match = 0;
+ mResolveComponentName = mCustomResolverComponentName;
+ Slog.i(TAG, "Replacing default ResolverActivity with custom activity: " +
+ mResolveComponentName);
+ break;
+ }
+ }
+ if (mResolveActivity.theme == 0) {
+ mResolveActivity.theme = R.style.Theme_DeviceDefault_Resolver;
+ }
}
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 60ddd85..1d5f64c 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -4361,7 +4361,7 @@ public class WindowManagerService extends IWindowManager.Stub
AppWindowToken ttoken = findAppWindowToken(transferFrom);
if (ttoken != null) {
WindowState startingWindow = ttoken.startingWindow;
- if (startingWindow != null) {
+ if (startingWindow != null && ttoken.startingView != null) {
// In this case, the starting icon has already been displayed, so start
// letting windows get shown immediately without any more transitions.
mSkipAppTransitionAnimation = true;
diff --git a/tools/aapt/StringPool.cpp b/tools/aapt/StringPool.cpp
index 9908c44..0d59fae 100644
--- a/tools/aapt/StringPool.cpp
+++ b/tools/aapt/StringPool.cpp
@@ -127,7 +127,7 @@ int StringPool::entry::compare(const entry& o) const {
}
StringPool::StringPool(bool utf8) :
- mUTF8(utf8), mValues(-1)
+ mUTF8(utf8)
{
}
@@ -144,8 +144,8 @@ ssize_t StringPool::add(const String16& value, const Vector<entry_style_span>& s
ssize_t StringPool::add(const String16& value,
bool mergeDuplicates, const String8* configTypeName, const ResTable_config* config)
{
- ssize_t vidx = mValues.indexOfKey(value);
- ssize_t pos = vidx >= 0 ? mValues.valueAt(vidx) : -1;
+ auto it = mValues.find(value);
+ ssize_t pos = it != mValues.end() ? it->second : -1;
ssize_t eidx = pos >= 0 ? mEntryArray.itemAt(pos) : -1;
if (eidx < 0) {
eidx = mEntries.add(entry(value));
@@ -192,21 +192,21 @@ ssize_t StringPool::add(const String16& value,
}
}
- const bool first = vidx < 0;
+ const bool first = (it == mValues.end());
const bool styled = (pos >= 0 && (size_t)pos < mEntryStyleArray.size()) ?
mEntryStyleArray[pos].spans.size() : 0;
if (first || styled || !mergeDuplicates) {
pos = mEntryArray.add(eidx);
if (first) {
- vidx = mValues.add(value, pos);
+ mValues[value] = pos;
}
entry& ent = mEntries.editItemAt(eidx);
ent.indices.add(pos);
}
if (kIsDebug) {
- printf("Adding string %s to pool: pos=%zd eidx=%zd vidx=%zd\n",
- String8(value).string(), SSIZE(pos), SSIZE(eidx), SSIZE(vidx));
+ printf("Adding string %s to pool: pos=%zd eidx=%zd\n",
+ String8(value).string(), SSIZE(pos), SSIZE(eidx));
}
return pos;
@@ -349,14 +349,18 @@ void StringPool::sortByConfig()
// Now trim any entries at the end of the new style array that are
// not needed.
- for (ssize_t i=newEntryStyleArray.size()-1; i>=0; i--) {
+ ssize_t i;
+ for (i=newEntryStyleArray.size()-1; i>=0; i--) {
const entry_style& style = newEntryStyleArray[i];
if (style.spans.size() > 0) {
// That's it.
break;
}
- // This one is not needed; remove.
- newEntryStyleArray.removeAt(i);
+ }
+
+ ssize_t nToRemove=newEntryStyleArray.size()-(i+1);
+ if (nToRemove) {
+ newEntryStyleArray.removeItemsAt(i+1, nToRemove);
}
// All done, install the new data structures and upate mValues with
@@ -367,7 +371,7 @@ void StringPool::sortByConfig()
mValues.clear();
for (size_t i=0; i<mEntries.size(); i++) {
const entry& ent = mEntries[i];
- mValues.add(ent.value, ent.indices[0]);
+ mValues[ent.value] = ent.indices[0];
}
#if 0
@@ -610,9 +614,10 @@ ssize_t StringPool::offsetForString(const String16& val) const
const Vector<size_t>* StringPool::offsetsForString(const String16& val) const
{
- ssize_t pos = mValues.valueFor(val);
- if (pos < 0) {
+ auto it = mValues.find(val);
+ if (it == mValues.end()) {
return NULL;
}
+ ssize_t pos = it->second;
return &mEntries[mEntryArray[pos]].indices;
}
diff --git a/tools/aapt/StringPool.h b/tools/aapt/StringPool.h
index dbe8c85..3014a3b 100644
--- a/tools/aapt/StringPool.h
+++ b/tools/aapt/StringPool.h
@@ -19,6 +19,7 @@
#include <fcntl.h>
#include <ctype.h>
#include <errno.h>
+#include <map>
#include <libexpat/expat.h>
@@ -175,7 +176,7 @@ private:
// Unique set of all the strings added to the pool, mapped to
// the first index of mEntryArray where the value was added.
- DefaultKeyedVector<String16, ssize_t> mValues;
+ std::map<String16, ssize_t> mValues;
// This array maps from the original position a string was placed at
// in mEntryArray to its new position after being sorted with sortByConfig().
Vector<size_t> mOriginalPosToNewPos;