Merge the 2019-08-01 SPL branch from AOSP-Partner
* security-aosp-nyc-mr2-release:
Clear the Parcel before writing an exception during a transaction
Protect VPN dialogs against overlay.
[RESTRICT AUTOMERGE] Make Lock task default behaviour consistent with Settings.
SUPL ES Extension - June 2019 rollup
Limit IsSeparateProfileChallengeAllowed to system callers
[RESTRICT AUTOMERGE]: Add cross user permission check - areNotificationsEnabledForPackage
[RESTRICT AUTOMERGE] Added missing permission check to isPackageDeviceAdminOnAnyUser.
Permission Check For DPM.getPermittedAccessibilityServices
Change-Id: Ic42855742de81476527df18c96d962cb93343961
diff --git a/Android.mk b/Android.mk
index 730eeb1..65dcd82 100644
--- a/Android.mk
+++ b/Android.mk
@@ -126,6 +126,7 @@
core/java/android/bluetooth/IBluetoothGatt.aidl \
core/java/android/bluetooth/IBluetoothGattCallback.aidl \
core/java/android/bluetooth/IBluetoothGattServerCallback.aidl \
+ core/java/android/bluetooth/IBluetoothDun.aidl \
core/java/android/content/IClipboard.aidl \
core/java/android/content/IContentService.aidl \
core/java/android/content/IIntentReceiver.aidl \
@@ -329,6 +330,7 @@
core/java/com/android/internal/policy/IShortcutService.aidl \
core/java/com/android/internal/os/IDropBoxManagerService.aidl \
core/java/com/android/internal/os/IParcelFileDescriptorFactory.aidl \
+ core/java/com/android/internal/os/IRegionalizationService.aidl \
core/java/com/android/internal/os/IResultReceiver.aidl \
core/java/com/android/internal/statusbar/IStatusBar.aidl \
core/java/com/android/internal/statusbar/IStatusBarService.aidl \
@@ -465,6 +467,8 @@
packages/services/Proxy/com/android/net/IProxyPortListener.aidl \
core/java/android/service/quicksettings/IQSService.aidl \
core/java/android/service/quicksettings/IQSTileService.aidl \
+ telephony/java/com/android/internal/telephony/ISmsSecurityService.aidl \
+ telephony/java/com/android/internal/telephony/ISmsSecurityAgent.aidl \
# The following are native binders that need to go with the native component
# at system/update_engine/binder_bindings/. Use relative path to refer to them.
diff --git a/api/current.txt b/api/current.txt
index 8655d89..ca3e89e 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -24474,6 +24474,7 @@
field public java.util.BitSet allowedPairwiseCiphers;
field public java.util.BitSet allowedProtocols;
field public android.net.wifi.WifiEnterpriseConfig enterpriseConfig;
+ field public java.util.BitSet filsKeyMgmts;
field public boolean hiddenSSID;
field public int networkId;
field public java.lang.String preSharedKey;
@@ -24493,6 +24494,12 @@
field public static final java.lang.String varName = "auth_alg";
}
+ public static class WifiConfiguration.Fils {
+ field public static final int FILS_SHA256 = 0; // 0x0
+ field public static final int FILS_SHA384 = 1; // 0x1
+ field public static final java.lang.String[] filsKeyStrings;
+ }
+
public static class WifiConfiguration.GroupCipher {
field public static final int CCMP = 3; // 0x3
field public static final int TKIP = 2; // 0x2
diff --git a/api/system-current.txt b/api/system-current.txt
index 6b6f7e9..7e42b97 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -26755,6 +26755,7 @@
field public java.lang.String creatorName;
field public int creatorUid;
field public android.net.wifi.WifiEnterpriseConfig enterpriseConfig;
+ field public java.util.BitSet filsKeyMgmts;
field public boolean hiddenSSID;
field public java.lang.String lastUpdateName;
field public int lastUpdateUid;
@@ -26780,6 +26781,12 @@
field public static final java.lang.String varName = "auth_alg";
}
+ public static class WifiConfiguration.Fils {
+ field public static final int FILS_SHA256 = 0; // 0x0
+ field public static final int FILS_SHA384 = 1; // 0x1
+ field public static final java.lang.String[] filsKeyStrings;
+ }
+
public static class WifiConfiguration.GroupCipher {
field public static final int CCMP = 3; // 0x3
field public static final int TKIP = 2; // 0x2
diff --git a/api/test-current.txt b/api/test-current.txt
index fcbd1b5..42fc6da 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -24548,6 +24548,7 @@
field public java.util.BitSet allowedPairwiseCiphers;
field public java.util.BitSet allowedProtocols;
field public android.net.wifi.WifiEnterpriseConfig enterpriseConfig;
+ field public java.util.BitSet filsKeyMgmts;
field public boolean hiddenSSID;
field public int networkId;
field public java.lang.String preSharedKey;
@@ -24567,6 +24568,12 @@
field public static final java.lang.String varName = "auth_alg";
}
+ public static class WifiConfiguration.Fils {
+ field public static final int FILS_SHA256 = 0; // 0x0
+ field public static final int FILS_SHA384 = 1; // 0x1
+ field public static final java.lang.String[] filsKeyStrings;
+ }
+
public static class WifiConfiguration.GroupCipher {
field public static final int CCMP = 3; // 0x3
field public static final int TKIP = 2; // 0x2
diff --git a/cmds/bootanimation/Android.mk b/cmds/bootanimation/Android.mk
index 3a92b9e..0b211fc 100644
--- a/cmds/bootanimation/Android.mk
+++ b/cmds/bootanimation/Android.mk
@@ -26,7 +26,8 @@
libGLESv1_CM \
libgui \
libOpenSLES \
- libtinyalsa
+ libtinyalsa \
+ libregionalization
LOCAL_MODULE:= bootanimation
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
index 10fabcf..82c12e6 100644
--- a/cmds/bootanimation/BootAnimation.cpp
+++ b/cmds/bootanimation/BootAnimation.cpp
@@ -58,6 +58,9 @@
#include <EGL/eglext.h>
#include "BootAnimation.h"
+
+#include <private/regionalization/Environment.h>
+
#include "audioplay.h"
namespace android {
@@ -258,6 +261,35 @@
return NO_ERROR;
}
+
+// Get bootup Animation File
+// Parameter: ImageID: IMG_OEM IMG_SYS IMG_ENC
+// Return Value : File path
+const char *BootAnimation::getAnimationFileName(ImageID image)
+{
+ const char *fileName[3] = { OEM_BOOTANIMATION_FILE,
+ SYSTEM_BOOTANIMATION_FILE,
+ SYSTEM_ENCRYPTED_BOOTANIMATION_FILE };
+
+ // Load animations of Carrier through regionalization environment
+ if (Environment::isSupported()) {
+ Environment* environment = new Environment();
+ const char* animFile = environment->getMediaFile(
+ Environment::ANIMATION_TYPE, Environment::BOOT_STATUS);
+ ALOGE("Get Carrier Animation type: %d,status:%d", Environment::ANIMATION_TYPE,Environment::BOOT_STATUS);
+ if (animFile != NULL && strcmp(animFile, "") != 0) {
+ return animFile;
+ }else{
+ ALOGD("Get Carrier Animation file: %s failed", animFile);
+ }
+ delete environment;
+ }else{
+ ALOGE("Get Carrier Animation file,since it's not support carrier");
+ }
+
+ return fileName[image];
+}
+
status_t BootAnimation::readyToRun() {
mAssets.addDefaultAssets();
@@ -319,14 +351,14 @@
bool encryptedAnimation = atoi(decrypt) != 0 || !strcmp("trigger_restart_min_framework", decrypt);
- if (encryptedAnimation && (access(SYSTEM_ENCRYPTED_BOOTANIMATION_FILE, R_OK) == 0)) {
- mZipFileName = SYSTEM_ENCRYPTED_BOOTANIMATION_FILE;
+ if (encryptedAnimation && (access(getAnimationFileName(IMG_ENC), R_OK) == 0)) {
+ mZipFileName = getAnimationFileName(IMG_ENC);
}
- else if (access(OEM_BOOTANIMATION_FILE, R_OK) == 0) {
- mZipFileName = OEM_BOOTANIMATION_FILE;
+ else if (access(getAnimationFileName(IMG_OEM), R_OK) == 0) {
+ mZipFileName = getAnimationFileName(IMG_OEM);
}
- else if (access(SYSTEM_BOOTANIMATION_FILE, R_OK) == 0) {
- mZipFileName = SYSTEM_BOOTANIMATION_FILE;
+ else if (access(getAnimationFileName(IMG_SYS), R_OK) == 0) {
+ mZipFileName = getAnimationFileName(IMG_SYS);
}
return NO_ERROR;
}
diff --git a/cmds/bootanimation/BootAnimation.h b/cmds/bootanimation/BootAnimation.h
index 7a2e4c2..26b25cd 100644
--- a/cmds/bootanimation/BootAnimation.h
+++ b/cmds/bootanimation/BootAnimation.h
@@ -122,6 +122,13 @@
Font clockFont;
};
+ /**
+ *IMG_OEM: bootanimation file from oem/media
+ *IMG_SYS: bootanimation file from system/media
+ *IMG_ENC: encrypted bootanimation file from system/media
+ */
+ enum ImageID { IMG_OEM = 0, IMG_SYS = 1, IMG_ENC = 2 };
+ const char *getAnimationFileName(ImageID image);
status_t initTexture(Texture* texture, AssetManager& asset, const char* name);
status_t initTexture(FileMap* map, int* width, int* height);
status_t initFont(Font* font, const char* fallback);
diff --git a/cmds/idmap/scan.cpp b/cmds/idmap/scan.cpp
index ab6adfb..57b1229 100644
--- a/cmds/idmap/scan.cpp
+++ b/cmds/idmap/scan.cpp
@@ -202,38 +202,56 @@
struct stat st;
char overlay_apk_path[PATH_MAX + 1];
snprintf(overlay_apk_path, PATH_MAX, "%s/%s", overlay_dir, dirent->d_name);
+
if (stat(overlay_apk_path, &st) < 0) {
continue;
}
- if (!S_ISREG(st.st_mode)) {
+
+ if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode)) {
continue;
}
- int priority = parse_apk(overlay_apk_path, target_package_name);
- if (priority < 0) {
- continue;
+ if (S_ISDIR(st.st_mode)) {
+ String8 dir_name = String8(overlay_apk_path).getPathLeaf();
+ if (dir_name == "." || dir_name == "..") {
+ // Skip the "." and ".." dir.
+ continue;
+ }
+ android::Vector<const char *> ovector;
+ ovector.push(overlay_apk_path);
+ idmap_scan(target_package_name, target_apk_path, idmap_dir, &ovector);
+ }else{
+ int priority = parse_apk(overlay_apk_path, target_package_name);
+ if (priority < 0) {
+ continue;
+ }
+
+ String8 filename = String8(idmap_dir);
+ filename.appendPath("overlays.list");
+ if (unlink(filename.string()) != 0 && errno != ENOENT) {
+ return EXIT_FAILURE;
+ }
+
+ String8 idmap_path(idmap_dir);
+ idmap_path.appendPath(flatten_path(overlay_apk_path + 1));
+ idmap_path.append("@idmap");
+ if (idmap_create_path(target_apk_path, overlay_apk_path, idmap_path.string()) != 0) {
+ ALOGE("error: failed to create idmap for target=%s overlay=%s idmap=%s\n",
+ target_apk_path, overlay_apk_path, idmap_path.string());
+ continue;
+ }
+
+ Overlay overlay(String8(overlay_apk_path), idmap_path, priority);
+ overlayVector.add(overlay);
+
+ if (!writePackagesList(filename.string(), overlayVector)) {
+ return EXIT_FAILURE;
+ }
}
-
- String8 idmap_path(idmap_dir);
- idmap_path.appendPath(flatten_path(overlay_apk_path + 1));
- idmap_path.append("@idmap");
-
- if (idmap_create_path(target_apk_path, overlay_apk_path, idmap_path.string()) != 0) {
- ALOGE("error: failed to create idmap for target=%s overlay=%s idmap=%s\n",
- target_apk_path, overlay_apk_path, idmap_path.string());
- continue;
- }
-
- Overlay overlay(String8(overlay_apk_path), idmap_path, priority);
- overlayVector.add(overlay);
}
closedir(dir);
}
- if (!writePackagesList(filename.string(), overlayVector)) {
- return EXIT_FAILURE;
- }
-
return EXIT_SUCCESS;
}
diff --git a/cmds/media/src/com/android/commands/media/Media.java b/cmds/media/src/com/android/commands/media/Media.java
index d7f23cb..d185b56 100644
--- a/cmds/media/src/com/android/commands/media/Media.java
+++ b/cmds/media/src/com/android/commands/media/Media.java
@@ -222,6 +222,26 @@
System.out.println("onVolumeInfoChanged " + info);
}
+ @Override
+ public void onPlayItemResponse(boolean success) throws RemoteException {
+ System.out.println("onPlayItemResponse ");
+ }
+
+ @Override
+ public void onUpdateNowPlayingEntries(long[] playList) throws RemoteException {
+ System.out.println("onUpdateNowPlayingEntries ");
+ }
+
+ @Override
+ public void onUpdateFolderInfoBrowsedPlayer(String stringUri) throws RemoteException {
+ System.out.println("onUpdateFolderInfoBrowsedPlayer ");
+ }
+
+ @Override
+ public void onUpdateNowPlayingContentChange() throws RemoteException {
+ System.out.println("onUpdateNowPlayingContentChange ");
+ }
+
void printUsageMessage() {
try {
System.out.println("V2Monitoring session " + mController.getTag()
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index 72707b7..b0c22d7 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -367,6 +367,7 @@
* @return The account's password, null if none or if the account doesn't exist
*/
public String getPassword(final Account account) {
+ android.util.SeempLog.record(22);
if (account == null) throw new IllegalArgumentException("account is null");
try {
return mService.getPassword(account);
@@ -394,6 +395,7 @@
* @return The user data, null if the account or key doesn't exist
*/
public String getUserData(final Account account, final String key) {
+ android.util.SeempLog.record(23);
if (account == null) throw new IllegalArgumentException("account is null");
if (key == null) throw new IllegalArgumentException("key is null");
try {
@@ -602,6 +604,7 @@
return new Future2Task<String>(handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(31);
mService.getAuthTokenLabel(mResponse, accountType, authTokenType);
}
@@ -648,6 +651,7 @@
return new Future2Task<Boolean>(handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(31);
mService.hasFeatures(mResponse, account, features, mContext.getOpPackageName());
}
@Override
@@ -702,6 +706,7 @@
return new Future2Task<Account[]>(handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(31);
mService.getAccountsByFeatures(mResponse, type, features,
mContext.getOpPackageName());
}
@@ -746,6 +751,7 @@
* already exists, the account is null, or another error occurs.
*/
public boolean addAccountExplicitly(Account account, String password, Bundle userdata) {
+ android.util.SeempLog.record(24);
if (account == null) throw new IllegalArgumentException("account is null");
try {
return mService.addAccountExplicitly(account, password, userdata);
@@ -815,6 +821,7 @@
return new Future2Task<Account>(handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(31);
mService.renameAccount(mResponse, account, newName);
}
@Override
@@ -875,10 +882,12 @@
@Deprecated
public AccountManagerFuture<Boolean> removeAccount(final Account account,
AccountManagerCallback<Boolean> callback, Handler handler) {
+ android.util.SeempLog.record(25);
if (account == null) throw new IllegalArgumentException("account is null");
return new Future2Task<Boolean>(handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(31);
mService.removeAccount(mResponse, account, false);
}
@Override
@@ -934,10 +943,12 @@
*/
public AccountManagerFuture<Bundle> removeAccount(final Account account,
final Activity activity, AccountManagerCallback<Bundle> callback, Handler handler) {
+ android.util.SeempLog.record(28);
if (account == null) throw new IllegalArgumentException("account is null");
return new AmsTask(activity, handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(34);
mService.removeAccount(mResponse, account, activity != null);
}
}.start();
@@ -959,6 +970,7 @@
return new Future2Task<Boolean>(handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(31);
mService.removeAccountAsUser(mResponse, account, false, userHandle.getIdentifier());
}
@Override
@@ -985,6 +997,7 @@
return new AmsTask(activity, handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(34);
mService.removeAccountAsUser(mResponse, account, activity != null,
userHandle.getIdentifier());
}
@@ -1098,6 +1111,7 @@
* @param password The password to set, null to clear the password
*/
public void setPassword(final Account account, final String password) {
+ android.util.SeempLog.record(26);
if (account == null) throw new IllegalArgumentException("account is null");
try {
mService.setPassword(account, password);
@@ -1126,6 +1140,7 @@
* @param account The account whose password to clear
*/
public void clearPassword(final Account account) {
+ android.util.SeempLog.record(27);
if (account == null) throw new IllegalArgumentException("account is null");
try {
mService.clearPassword(account);
@@ -1153,6 +1168,7 @@
* @param value String value to set, {@code null} to clear this user data key
*/
public void setUserData(final Account account, final String key, final String value) {
+ android.util.SeempLog.record(28);
if (account == null) throw new IllegalArgumentException("account is null");
if (key == null) throw new IllegalArgumentException("key is null");
try {
@@ -1303,6 +1319,7 @@
return new AmsTask(activity, handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(31);
mService.getAuthToken(mResponse, account, authTokenType,
false /* notifyOnAuthFailure */, true /* expectActivityLaunch */,
optionsIn);
@@ -1472,6 +1489,7 @@
return new AmsTask(null, handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(31);
mService.getAuthToken(mResponse, account, authTokenType,
notifyAuthFailure, false /* expectActivityLaunch */, optionsIn);
}
@@ -1532,6 +1550,7 @@
final String authTokenType, final String[] requiredFeatures,
final Bundle addAccountOptions,
final Activity activity, AccountManagerCallback<Bundle> callback, Handler handler) {
+ android.util.SeempLog.record(29);
if (accountType == null) throw new IllegalArgumentException("accountType is null");
final Bundle optionsIn = new Bundle();
if (addAccountOptions != null) {
@@ -1542,6 +1561,7 @@
return new AmsTask(activity, handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(31);
mService.addAccount(mResponse, accountType, authTokenType,
requiredFeatures, activity != null, optionsIn);
}
@@ -1567,6 +1587,7 @@
return new AmsTask(activity, handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(31);
mService.addAccountAsUser(mResponse, accountType, authTokenType,
requiredFeatures, activity != null, optionsIn, userHandle.getIdentifier());
}
@@ -1616,6 +1637,7 @@
return new Future2Task<Boolean>(handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(34);
mService.copyAccountToUser(
mResponse, account, fromUser.getIdentifier(), toUser.getIdentifier());
}
@@ -1742,6 +1764,7 @@
return new AmsTask(activity, handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(31);
mService.confirmCredentialsAsUser(mResponse, account, options, activity != null,
userId);
}
@@ -1855,10 +1878,12 @@
public AccountManagerFuture<Bundle> editProperties(final String accountType,
final Activity activity, final AccountManagerCallback<Bundle> callback,
final Handler handler) {
+ android.util.SeempLog.record(30);
if (accountType == null) throw new IllegalArgumentException("accountType is null");
return new AmsTask(activity, handler, callback) {
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(31);
mService.editProperties(mResponse, accountType, activity != null);
}
}.start();
@@ -2246,6 +2271,7 @@
@Override
public void doWork() throws RemoteException {
+ android.util.SeempLog.record(31);
getAccountsByTypeAndFeatures(mAccountType, mFeatures,
new AccountManagerCallback<Account[]>() {
@Override
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 3cb3b0b..0787ee9 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -127,6 +127,7 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
+import android.util.BoostFramework;
/**
* An activity is a single, focused thing that the user can do. Almost all
@@ -689,6 +690,10 @@
OnCreateContextMenuListener, ComponentCallbacks2,
Window.OnWindowDismissedCallback, WindowControllerCallback {
private static final String TAG = "Activity";
+ private static BoostFramework mPerf = null;
+ private static int mDragBoostPossible = -1;
+ private static int mPerfLockDuration = -1;
+ private static int mAsParamVal[];
private static final boolean DEBUG_LIFECYCLE = false;
/** Standard activity result: operation canceled. */
@@ -3058,6 +3063,42 @@
* @return boolean Return true if this event was consumed.
*/
public boolean dispatchTouchEvent(MotionEvent ev) {
+ if(mDragBoostPossible == -1) {
+ mDragBoostPossible = 0;
+ String currentActivity = getPackageName();
+ String[] activityList = getResources().getStringArray(
+ com.android.internal.R.array.boost_activityList);
+ if(activityList != null){
+ for (String match : activityList) {
+ if (currentActivity.indexOf(match) != -1){
+ mDragBoostPossible = 1;
+ break;
+ }
+ }
+ }
+ }
+
+ Context context = getApplicationContext();
+ if (mPerf == null){
+ mPerf = new BoostFramework();
+ }
+ boolean override = mPerf.boostOverride(context, ev, getResources().getDisplayMetrics());
+
+ if (mDragBoostPossible == 1 && override != true) {
+ if (mPerf == null){
+ mPerf = new BoostFramework();
+ }
+ if(mPerfLockDuration == -1){
+ mPerfLockDuration = getResources().getInteger(
+ com.android.internal.R.integer.ascrollboost_timeout);
+ mAsParamVal = getResources().getIntArray(
+ com.android.internal.R.array.ascrollboost_param_value);
+ }
+ mPerf.perfLockAcquireTouch(ev,
+ getResources().getDisplayMetrics(),
+ mPerfLockDuration, mAsParamVal);
+ }
+
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
onUserInteraction();
}
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index a1b34e6..b25a6d6 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -945,7 +945,8 @@
* @hide
*/
static public boolean isHighEndGfx() {
- return !isLowRamDeviceStatic() &&
+ return !("1".equals(SystemProperties.get("persist.sys.force_sw_gles", "0"))) &&
+ !isLowRamDeviceStatic() &&
!Resources.getSystem().getBoolean(com.android.internal.R.bool.config_avoidGfxAccel);
}
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 5cfcac3..bb16cd7 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -5172,10 +5172,17 @@
/**
* Switch this process to density compatibility mode if needed.
*/
- if ((data.appInfo.flags&ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES)
+ if ((data.appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES)
== 0) {
mDensityCompatMode = true;
Bitmap.setDefaultDensity(DisplayMetrics.DENSITY_DEFAULT);
+ } else {
+ int overrideDensity = data.appInfo.getOverrideDensity();
+ if(overrideDensity != 0) {
+ Log.d(TAG, "override app density from " + DisplayMetrics.DENSITY_DEVICE + " to " + overrideDensity);
+ mDensityCompatMode = true;
+ Bitmap.setDefaultDensity(overrideDensity);
+ }
}
updateDefaultDensity();
diff --git a/core/java/android/app/AlarmManager.java b/core/java/android/app/AlarmManager.java
index c561a19..90b69b6 100644
--- a/core/java/android/app/AlarmManager.java
+++ b/core/java/android/app/AlarmManager.java
@@ -33,6 +33,9 @@
import libcore.util.ZoneInfoDB;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.FileWriter;
import java.io.IOException;
/**
@@ -107,6 +110,57 @@
public static final int ELAPSED_REALTIME = 3;
/**
+ * Alarm time in {@link System#currentTimeMillis System.currentTimeMillis()}
+ * (wall clock time in UTC), which will wake up the device when
+ * it goes off. And it will power on the devices when it shuts down.
+ * Set as 5 to make it be compatible with android_alarm_type.
+ * @hide
+ */
+ public static final int RTC_POWEROFF_WAKEUP = 5;
+
+ /**
+ * File to save value to indicate that power off alarm is set
+ * @hide
+ */
+ public static final String POWER_OFF_ALARM_SET_FILE =
+ "/persist/alarm/powerOffAlarmSet";
+ /**
+ * File to indicate that if power off alarm is handled in
+ * encryption status.
+ * @hide
+ */
+ public static final String POWER_OFF_ALARM_HANDLE_FILE =
+ "/persist/alarm/powerOffAlarmHandle";
+ /**
+ * File to save instance time which will handle in encryption status.
+ * @hide
+ */
+ public static final String POWER_OFF_ALARM_INSTANCE_FILE =
+ "/persist/alarm/powerOffAlarmInstance";
+
+ /**
+ * @hide
+ */
+ public static final String POWER_OFF_ALARM_TIMEZONE_FILE =
+ "/persist/alarm/timezone";
+ /**
+ * @hide
+ */
+ public static final String POWER_OFF_ALARM_SET = "1";
+ /**
+ * @hide
+ */
+ public static final String POWER_OFF_ALARM_NOT_SET = "0";
+ /**
+ * @hide
+ */
+ public static final String POWER_OFF_ALARM_NOT_HANDLED = "0";
+ /**
+ * @hide
+ */
+ public static final String POWER_OFF_ALARM_HANDLED = "1";
+
+ /**
* Broadcast Action: Sent after the value returned by
* {@link #getNextAlarmClock()} has changed.
*
@@ -1031,6 +1085,57 @@
}
}
+
+ /**
+ * Read value from power off alarm files
+ *
+ * @hide
+ */
+ public static String readPowerOffAlarmFile(String fileName) {
+ BufferedReader reader = null;
+ String line = null;
+ try {
+ reader = new BufferedReader(new FileReader(fileName));
+ line = reader.readLine();
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ if (reader != null) {
+ try {
+ reader.close();
+ } catch (Exception e1) {
+ e1.printStackTrace();
+ }
+ }
+ }
+ return line;
+ }
+
+
+ /**
+ * Write value to power off alarm files
+ *
+ * @hide
+ */
+ public static void writePowerOffAlarmFile(String fileName, String value) {
+ FileWriter writer = null;
+ try {
+ writer = new FileWriter(fileName, false);
+ writer.write(value);
+ writer.flush();
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ if (writer != null) {
+ try {
+ writer.close();
+ } catch (Exception e1) {
+ e1.printStackTrace();
+ }
+ }
+ }
+ }
+
/**
* An immutable description of a scheduled "alarm clock" event.
*
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index 440ddd6..8a616d1 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.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");
@@ -28,6 +31,7 @@
import android.os.Process;
import android.os.RemoteException;
import android.os.UserHandle;
+import android.os.SystemProperties;
import android.os.UserManager;
import android.util.ArrayMap;
@@ -103,9 +107,18 @@
*/
public static final int MODE_DEFAULT = 3;
+ /**
+ * @hide Result from {@link #checkOp}, {@link #noteOp}, {@link #startOp}:
+ * AppOps Service should show a dialog box on screen to get user
+ * permission.
+ */
+ public static final int MODE_ASK = 4;
+
// when adding one of these:
// - increment _NUM_OP
- // - add rows to sOpToSwitch, sOpToString, sOpNames, sOpToPerms, sOpDefault
+ // - add rows to sOpToSwitch, sOpToString, sOpNames, sOpToPerms, sOpDefault, sOpDefaultStrictMode
+ // sOpToOpString, sOpStrictMode
+ // - add descriptive strings to frameworks/base/core/res/res/values/config.xml
// - add descriptive strings to Settings/res/values/arrays.xml
// - add the op to the appropriate template in AppOpsState.OpsTemplate (settings app)
@@ -239,8 +252,14 @@
public static final int OP_GET_ACCOUNTS = 62;
/** @hide Control whether an application is allowed to run in the background. */
public static final int OP_RUN_IN_BACKGROUND = 63;
+ /** @hide CHANGE_WIFI_STATE . */
+ public static final int OP_CHANGE_WIFI_STATE = 64;
+ /** @hide BLUETOOTH_ADMIN . */
+ public static final int OP_BLUETOOTH_ADMIN = 65;
/** @hide */
- public static final int _NUM_OP = 64;
+ public static final int OP_SU = 66;
+ /** @hide */
+ public static final int _NUM_OP = 67;
/** Access to coarse location information. */
public static final String OPSTR_COARSE_LOCATION = "android:coarse_location";
@@ -338,6 +357,17 @@
/** @hide Get device accounts. */
public static final String OPSTR_GET_ACCOUNTS
= "android:get_accounts";
+ /** @hide CHANGE_WIFI_STATE . */
+ public static final String OPSTR_CHANGE_WIFI_STATE
+ = "android:change_wifi_state";
+ /** @hide BLUETOOTH_ADMIN . */
+ public static final String OPSTR_BLUETOOTH_ADMIN
+ = "android:bluetooth_admin";
+ /** @hide PROCESS_OUTGOING_CALLS. */
+ public static final String OPSTR_PROCESS_OUTGOING_CALLS
+ = "android:process_outgoing_calls";
+ private static final String OPSTR_SU =
+ "android:su";
private static final int[] RUNTIME_PERMISSIONS_OPS = {
// Contacts
@@ -386,8 +416,8 @@
*/
private static int[] sOpToSwitch = new int[] {
OP_COARSE_LOCATION,
- OP_COARSE_LOCATION,
- OP_COARSE_LOCATION,
+ OP_FINE_LOCATION,
+ OP_GPS,
OP_VIBRATE,
OP_READ_CONTACTS,
OP_WRITE_CONTACTS,
@@ -426,8 +456,8 @@
OP_AUDIO_NOTIFICATION_VOLUME,
OP_AUDIO_BLUETOOTH_VOLUME,
OP_WAKE_LOCK,
- OP_COARSE_LOCATION,
- OP_COARSE_LOCATION,
+ OP_FINE_LOCATION,
+ OP_FINE_LOCATION,
OP_GET_USAGE_STATS,
OP_MUTE_MICROPHONE,
OP_TOAST_WINDOW,
@@ -449,6 +479,9 @@
OP_TURN_SCREEN_ON,
OP_GET_ACCOUNTS,
OP_RUN_IN_BACKGROUND,
+ OP_CHANGE_WIFI_STATE,
+ OP_BLUETOOTH_ADMIN,
+ OP_SU
};
/**
@@ -510,7 +543,7 @@
OPSTR_READ_PHONE_STATE,
OPSTR_ADD_VOICEMAIL,
OPSTR_USE_SIP,
- null,
+ OPSTR_PROCESS_OUTGOING_CALLS,
OPSTR_USE_FINGERPRINT,
OPSTR_BODY_SENSORS,
OPSTR_READ_CELL_BROADCASTS,
@@ -520,6 +553,9 @@
null,
OPSTR_GET_ACCOUNTS,
null,
+ OPSTR_CHANGE_WIFI_STATE,
+ OPSTR_BLUETOOTH_ADMIN,
+ OPSTR_SU,
};
/**
@@ -591,6 +627,9 @@
"TURN_ON_SCREEN",
"GET_ACCOUNTS",
"RUN_IN_BACKGROUND",
+ "CHANGE_WIFI_STATE",
+ "BLUETOOTH_ADMIN",
+ "SU",
};
/**
@@ -662,6 +701,9 @@
null, // no permission for turning the screen on
Manifest.permission.GET_ACCOUNTS,
null, // no permission for running in background
+ android.Manifest.permission.CHANGE_WIFI_STATE,
+ android.Manifest.permission.BLUETOOTH_ADMIN,
+ null,
};
/**
@@ -734,6 +776,9 @@
null, // TURN_ON_SCREEN
null, // GET_ACCOUNTS
null, // RUN_IN_BACKGROUND
+ null, // OP_CHANGE_WIFI_STATE
+ null, // OP_BLUETOOTH_ADMIN
+ UserManager.DISALLOW_SU, //SU TODO: this should really be investigated.
};
/**
@@ -805,6 +850,9 @@
false, // TURN_ON_SCREEN
false, // GET_ACCOUNTS
false, // RUN_IN_BACKGROUND
+ false, // OP_CHANGE_WIFI_STATE
+ false, // OP_BLUETOOTH_ADMIN
+ false, //SU
};
/**
@@ -875,6 +923,156 @@
AppOpsManager.MODE_ALLOWED, // OP_TURN_ON_SCREEN
AppOpsManager.MODE_ALLOWED,
AppOpsManager.MODE_ALLOWED, // OP_RUN_IN_BACKGROUND
+ AppOpsManager.MODE_ALLOWED, //OP_CHANGE_WIFI_STATE
+ AppOpsManager.MODE_ALLOWED, //OP_BLUETOOTH_ADMIN
+ AppOpsManager.MODE_ASK, // OP_SU
+ };
+
+ /**
+ * This specifies the default mode for each strict operation.
+ */
+
+ private static int[] sOpDefaultStrictMode = new int[] {
+ AppOpsManager.MODE_ASK, // OP_COARSE_LOCATION
+ AppOpsManager.MODE_ASK, // OP_FINE_LOCATION
+ AppOpsManager.MODE_ASK, // OP_GPS
+ AppOpsManager.MODE_ALLOWED, // OP_VIBRATE
+ AppOpsManager.MODE_ASK, // OP_READ_CONTACTS
+ AppOpsManager.MODE_ASK, // OP_WRITE_CONTACTS
+ AppOpsManager.MODE_ASK, // OP_READ_CALL_LOG
+ AppOpsManager.MODE_ASK, // OP_WRITE_CALL_LOG
+ AppOpsManager.MODE_ALLOWED, // OP_READ_CALENDAR
+ AppOpsManager.MODE_ALLOWED, // OP_WRITE_CALENDAR
+ AppOpsManager.MODE_ASK, // OP_WIFI_SCAN
+ AppOpsManager.MODE_ALLOWED, // OP_POST_NOTIFICATION
+ AppOpsManager.MODE_ALLOWED, // OP_NEIGHBORING_CELLS
+ AppOpsManager.MODE_ASK, // OP_CALL_PHONE
+ AppOpsManager.MODE_ASK, // OP_READ_SMS
+ AppOpsManager.MODE_ASK, // OP_WRITE_SMS
+ AppOpsManager.MODE_ASK, // OP_RECEIVE_SMS
+ AppOpsManager.MODE_ALLOWED, // OP_RECEIVE_EMERGECY_SMS
+ AppOpsManager.MODE_ASK, // OP_RECEIVE_MMS
+ AppOpsManager.MODE_ALLOWED, // OP_RECEIVE_WAP_PUSH
+ AppOpsManager.MODE_ASK, // OP_SEND_SMS
+ AppOpsManager.MODE_ALLOWED, // OP_READ_ICC_SMS
+ AppOpsManager.MODE_ALLOWED, // OP_WRITE_ICC_SMS
+ AppOpsManager.MODE_ALLOWED, // OP_WRITE_SETTINGS
+ AppOpsManager.MODE_ALLOWED, // OP_SYSTEM_ALERT_WINDOW
+ AppOpsManager.MODE_ALLOWED, // OP_ACCESS_NOTIFICATIONS
+ AppOpsManager.MODE_ASK, // OP_CAMERA
+ AppOpsManager.MODE_ASK, // OP_RECORD_AUDIO
+ AppOpsManager.MODE_ALLOWED, // OP_PLAY_AUDIO
+ AppOpsManager.MODE_ALLOWED, // OP_READ_CLIPBOARD
+ AppOpsManager.MODE_ALLOWED, // OP_WRITE_CLIPBOARD
+ AppOpsManager.MODE_ALLOWED, // OP_TAKE_MEDIA_BUTTONS
+ AppOpsManager.MODE_ALLOWED, // OP_TAKE_AUDIO_FOCUS
+ AppOpsManager.MODE_ALLOWED, // OP_AUDIO_MASTER_VOLUME
+ AppOpsManager.MODE_ALLOWED, // OP_AUDIO_VOICE_VOLUME
+ AppOpsManager.MODE_ALLOWED, // OP_AUDIO_RING_VOLUME
+ AppOpsManager.MODE_ALLOWED, // OP_AUDIO_MEDIA_VOLUME
+ AppOpsManager.MODE_ALLOWED, // OP_AUDIO_ALARM_VOLUME
+ AppOpsManager.MODE_ALLOWED, // OP_AUDIO_NOTIFICATION_VOLUME
+ AppOpsManager.MODE_ALLOWED, // OP_AUDIO_BLUETOOTH_VOLUME
+ AppOpsManager.MODE_ALLOWED, // OP_WAKE_LOCK
+ AppOpsManager.MODE_ALLOWED, // OP_MONITOR_LOCATION
+ AppOpsManager.MODE_ASK, // OP_MONITOR_HIGH_POWER_LOCATION
+ AppOpsManager.MODE_DEFAULT, // OP_GET_USAGE_STATS
+ AppOpsManager.MODE_ALLOWED, // OP_MUTE_MICROPHONE
+ AppOpsManager.MODE_ALLOWED, // OP_TOAST_WINDOW
+ AppOpsManager.MODE_IGNORED, // OP_PROJECT_MEDIA
+ AppOpsManager.MODE_IGNORED, // OP_ACTIVATE_VPN
+ AppOpsManager.MODE_ALLOWED, // OP WALLPAPER
+ AppOpsManager.MODE_ALLOWED, // OP_ASSIST_STRUCTURE
+ AppOpsManager.MODE_ALLOWED, // OP_ASSIST_SCREENSHOT
+ AppOpsManager.MODE_ALLOWED, // OP_READ_PHONE_STATE
+ AppOpsManager.MODE_ALLOWED, // OP_ADD_VOICEMAIL
+ AppOpsManager.MODE_ALLOWED, // OP_USE_SIP
+ AppOpsManager.MODE_ALLOWED, // OP_PROCESS_OUTGOING_CALLS
+ AppOpsManager.MODE_ALLOWED, // OP_USE_FINGERPRINT
+ AppOpsManager.MODE_ALLOWED, // OP_BODY_SENSORS
+ AppOpsManager.MODE_ALLOWED, // OP_READ_CELL_BROADCASTS
+ AppOpsManager.MODE_ERRORED, // OP_MOCK_LOCATION
+ AppOpsManager.MODE_ALLOWED, // OP_READ_EXTERNAL_STORAGE
+ AppOpsManager.MODE_ALLOWED, // OP_WRITE_EXTERNAL_STORAGE
+ AppOpsManager.MODE_ALLOWED, // OP_TURN_ON_SCREEN
+ AppOpsManager.MODE_ALLOWED, // OP_GET_ACCOUNTS
+ AppOpsManager.MODE_ALLOWED, // MODE_RUN_IN_BACKGROUND
+ AppOpsManager.MODE_ASK, // OP_CHANGE_WIFI_STATE
+ AppOpsManager.MODE_ASK, // OP_BLUETOOTH_CHANGE
+ AppOpsManager.MODE_ASK, // OP_SU
+ };
+
+ /**
+ * This specifies if operation is in strict mode.
+ */
+ private final static boolean[] sOpStrictMode = new boolean[] {
+ true, // OP_COARSE_LOCATION
+ true, // OP_FINE_LOCATION
+ true, // OP_GPS
+ false, // OP_VIBRATE
+ true, // OP_READ_CONTACTS
+ true, // OP_WRITE_CONTACTS
+ true, // OP_READ_CALL_LOG
+ true, // OP_WRITE_CALL_LOG
+ false, // OP_READ_CALENDAR
+ false, // OP_WRITE_CALENDAR
+ true, // OP_WIFI_SCAN
+ false, // OP_POST_NOTIFICATION
+ false, // OP_NEIGHBORING_CELLS
+ true, // OP_CALL_PHONE
+ true, // OP_READ_SMS
+ true, // OP_WRITE_SMS
+ false, // OP_RECEIVE_SMS
+ false, // OP_RECEIVE_EMERGECY_SMS
+ true, // OP_RECEIVE_MMS
+ false, // OP_RECEIVE_WAP_PUSH
+ true, // OP_SEND_SMS
+ false, // OP_READ_ICC_SMS
+ false, // OP_WRITE_ICC_SMS
+ false, // OP_WRITE_SETTINGS
+ false, // OP_SYSTEM_ALERT_WINDOW
+ false, // OP_ACCESS_NOTIFICATIONS
+ true, // OP_CAMERA
+ true, // OP_RECORD_AUDIO
+ false, // OP_PLAY_AUDIO
+ false, // OP_READ_CLIPBOARD
+ false, // OP_WRITE_CLIPBOARD
+ false, // OP_TAKE_MEDIA_BUTTONS
+ false, // OP_TAKE_AUDIO_FOCUS
+ false, // OP_AUDIO_MASTER_VOLUME
+ false, // OP_AUDIO_VOICE_VOLUME
+ false, // OP_AUDIO_RING_VOLUME
+ false, // OP_AUDIO_MEDIA_VOLUME
+ false, // OP_AUDIO_ALARM_VOLUME
+ false, // OP_AUDIO_NOTIFICATION_VOLUME
+ false, // OP_AUDIO_BLUETOOTH_VOLUME
+ false, // OP_WAKE_LOCK
+ false, // OP_MONITOR_LOCATION
+ true, // OP_MONITOR_HIGH_POWER_LOCATION
+ false, // OP_GET_USAGE_STATS
+ false, // OP_MUTE_MICROPHONE
+ false, // OP_TOAST_WINDOW
+ false, // OP_PROJECT_MEDIA
+ false, // OP_ACTIVATE_VPN
+ true, // OP WALLPAPER
+ false, //ASSIST_STRUCTURE
+ false, //ASSIST_SCREENSHOT
+ false, //READ_PHONE_STATE
+ false, //ADD_VOICEMAIL
+ false, // USE_SIP
+ false, // PROCESS_OUTGOING_CALLS
+ false, // USE_FINGERPRINT
+ false, // BODY_SENSORS
+ false, // READ_CELL_BROADCASTS
+ false, // MOCK_LOCATION
+ true, // READ_EXTERNAL_STORAGE
+ true, // WRITE_EXTERNAL_STORAGE
+ false, // TURN_ON_SCREEN
+ false, // GET_ACCOUNTS
+ false, // RUN_IN_BACKGROUND
+ true, // OP_CHANGE_WIFI_STATE
+ true, // OP_BLUETOOTH_CHANGE
+ true, // OP_SU
};
/**
@@ -949,6 +1147,9 @@
false,
false,
false,
+ false, //OP_CHANGE_WIFI_STATE
+ false, //OP_BLUETOOTH_ADMIN
+ false, // OP_SU
};
/**
@@ -961,6 +1162,8 @@
*/
private static HashMap<String, Integer> sRuntimePermToOp = new HashMap<>();
+ private static HashMap<String, Integer> sNameToOp = new HashMap<String, Integer>();
+
static {
if (sOpToSwitch.length != _NUM_OP) {
throw new IllegalStateException("sOpToSwitch length " + sOpToSwitch.length
@@ -982,6 +1185,10 @@
throw new IllegalStateException("sOpDefaultMode length " + sOpDefaultMode.length
+ " should be " + _NUM_OP);
}
+ if (sOpDefaultStrictMode.length != _NUM_OP) {
+ throw new IllegalStateException("sOpDefaultStrictMode length " + sOpDefaultStrictMode.length
+ + " should be " + _NUM_OP);
+ }
if (sOpDisableReset.length != _NUM_OP) {
throw new IllegalStateException("sOpDisableReset length " + sOpDisableReset.length
+ " should be " + _NUM_OP);
@@ -994,6 +1201,10 @@
throw new IllegalStateException("sOpAllowSYstemRestrictionsBypass length "
+ sOpRestrictions.length + " should be " + _NUM_OP);
}
+ if (sOpStrictMode.length != _NUM_OP) {
+ throw new IllegalStateException("sOpStrictMode length "
+ + sOpStrictMode.length + " should be " + _NUM_OP);
+ }
for (int i=0; i<_NUM_OP; i++) {
if (sOpToString[i] != null) {
sOpStrToOp.put(sOpToString[i], i);
@@ -1004,6 +1215,9 @@
sRuntimePermToOp.put(sOpPerms[op], op);
}
}
+ for (int i=0; i<_NUM_OP; i++) {
+ sNameToOp.put(sOpNames[i], i);
+ }
}
/**
@@ -1036,6 +1250,15 @@
}
/**
+ * Map a non-localized name for the operation back to the Op number
+ * @hide
+ */
+ public static int nameToOp(String name) {
+ Integer val = sNameToOp.get(name);
+ return val != null ? val : OP_NONE;
+ }
+
+ /**
* Retrieve the permission associated with an operation, or null if there is not one.
* @hide
*/
@@ -1075,7 +1298,9 @@
* Retrieve the default mode for the operation.
* @hide
*/
- public static int opToDefaultMode(int op) {
+ public static int opToDefaultMode(int op, boolean isStrict) {
+ if (isStrict)
+ return sOpDefaultStrictMode[op];
return sOpDefaultMode[op];
}
@@ -1860,4 +2085,49 @@
public void finishOp(int op) {
finishOp(op, Process.myUid(), mContext.getOpPackageName());
}
+
+ /** @hide */
+ public static boolean isStrictEnable() {
+ return SystemProperties.getBoolean("persist.sys.strict_op_enable", false);
+ }
+
+ /**
+ * Check if op in strict mode
+ * @hide
+ */
+ public static boolean isStrictOp(int code) {
+ return sOpStrictMode[code];
+ }
+
+
+ /** @hide */
+ public static int stringToMode(String permission) {
+ if ("allowed".equalsIgnoreCase(permission)) {
+ return AppOpsManager.MODE_ALLOWED;
+ } else if ("ignored".equalsIgnoreCase(permission)) {
+ return AppOpsManager.MODE_IGNORED;
+ } else if ("ask".equalsIgnoreCase(permission)) {
+ return AppOpsManager.MODE_ASK;
+ }
+ return AppOpsManager.MODE_ERRORED;
+ }
+
+ /** @hide */
+ public static int stringOpToOp (String op) {
+ Integer val = sOpStrToOp.get(op);
+ if (val == null) {
+ val = OP_NONE;
+ }
+ return val;
+ }
+
+ /** @hide */
+ public boolean isControlAllowed(int op, String packageName) {
+ boolean isShow = true;
+ try {
+ isShow = mService.isControlAllowed(op, packageName);
+ } catch (RemoteException e) {
+ }
+ return isShow;
+ }
}
diff --git a/core/java/android/app/IAlarmManager.aidl b/core/java/android/app/IAlarmManager.aidl
index 7b05b49..ab45e29 100644
--- a/core/java/android/app/IAlarmManager.aidl
+++ b/core/java/android/app/IAlarmManager.aidl
@@ -37,4 +37,6 @@
void remove(in PendingIntent operation, in IAlarmListener listener);
long getNextWakeFromIdleTime();
AlarmManager.AlarmClockInfo getNextAlarmClock(int userId);
+ // update the uids being synchronized by network socket request manager
+ void updateBlockedUids(int uid, boolean isBlocked);
}
diff --git a/core/java/android/app/Instrumentation.java b/core/java/android/app/Instrumentation.java
index 95ea2a5..5c2aa37 100644
--- a/core/java/android/app/Instrumentation.java
+++ b/core/java/android/app/Instrumentation.java
@@ -385,6 +385,7 @@
* @see Context#startActivity
*/
public Activity startActivitySync(Intent intent) {
+ android.util.SeempLog.record_str(376, intent.toString());
validateNotAppThread();
synchronized (mSync) {
@@ -1492,6 +1493,7 @@
public ActivityResult execStartActivity(
Context who, IBinder contextThread, IBinder token, Activity target,
Intent intent, int requestCode, Bundle options) {
+ android.util.SeempLog.record_str(377, intent.toString());
IApplicationThread whoThread = (IApplicationThread) contextThread;
Uri referrer = target != null ? target.onProvideReferrer() : null;
if (referrer != null) {
@@ -1552,6 +1554,7 @@
public void execStartActivitiesAsUser(Context who, IBinder contextThread,
IBinder token, Activity target, Intent[] intents, Bundle options,
int userId) {
+ android.util.SeempLog.record_str(378, intents.toString());
IApplicationThread whoThread = (IApplicationThread) contextThread;
if (mActivityMonitors != null) {
synchronized (mSync) {
@@ -1615,6 +1618,7 @@
public ActivityResult execStartActivity(
Context who, IBinder contextThread, IBinder token, String target,
Intent intent, int requestCode, Bundle options) {
+ android.util.SeempLog.record_str(377, intent.toString());
IApplicationThread whoThread = (IApplicationThread) contextThread;
if (mActivityMonitors != null) {
synchronized (mSync) {
@@ -1675,6 +1679,7 @@
public ActivityResult execStartActivity(
Context who, IBinder contextThread, IBinder token, Activity target,
Intent intent, int requestCode, Bundle options, UserHandle user) {
+ android.util.SeempLog.record_str(377, intent.toString());
IApplicationThread whoThread = (IApplicationThread) contextThread;
if (mActivityMonitors != null) {
synchronized (mSync) {
@@ -1714,6 +1719,7 @@
Context who, IBinder contextThread, IBinder token, Activity target,
Intent intent, int requestCode, Bundle options, boolean ignoreTargetSecurity,
int userId) {
+ android.util.SeempLog.record_str(379, intent.toString());
IApplicationThread whoThread = (IApplicationThread) contextThread;
if (mActivityMonitors != null) {
synchronized (mSync) {
@@ -1752,6 +1758,7 @@
public void execStartActivityFromAppTask(
Context who, IBinder contextThread, IAppTask appTask,
Intent intent, Bundle options) {
+ android.util.SeempLog.record_str(380, intent.toString());
IApplicationThread whoThread = (IApplicationThread) contextThread;
if (mActivityMonitors != null) {
synchronized (mSync) {
diff --git a/core/java/android/app/backup/BackupAgent.java b/core/java/android/app/backup/BackupAgent.java
index 45d9fb7..d3a1485 100644
--- a/core/java/android/app/backup/BackupAgent.java
+++ b/core/java/android/app/backup/BackupAgent.java
@@ -636,8 +636,11 @@
// Pull out the domain and set it aside to use when making the tarball.
String domainPath = FullBackup.getBackupScheme(this).tokenToDirectoryPath(domain);
if (domainPath == null) {
- // Should never happen.
- return;
+ if (startingPath == null) {
+ return;
+ } else {
+ domainPath = startingPath;
+ }
}
File rootFile = new File(startingPath);
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index e04f1e1..24bde46 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -589,6 +589,7 @@
* @throws IllegalArgumentException if address is invalid
*/
public BluetoothDevice getRemoteDevice(String address) {
+ android.util.SeempLog.record(62);
return new BluetoothDevice(address);
}
@@ -604,6 +605,7 @@
* @throws IllegalArgumentException if address is invalid
*/
public BluetoothDevice getRemoteDevice(byte[] address) {
+ android.util.SeempLog.record(62);
if (address == null || address.length != 6) {
throw new IllegalArgumentException("Bluetooth address must have 6 bytes");
}
@@ -797,6 +799,7 @@
public int getState() {
int state = BluetoothAdapter.STATE_OFF;
+ android.util.SeempLog.record(63);
try {
mServiceLock.readLock().lock();
if (mService != null) {
@@ -895,12 +898,19 @@
*/
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
public boolean enable() {
+ android.util.SeempLog.record(56);
if (isEnabled()) {
if (DBG) Log.d(TAG, "enable(): BT already enabled!");
return true;
}
try {
- return mManagerService.enable(ActivityThread.currentPackageName());
+ boolean ret;
+ mManagerService.setBrEdrEnableStatus(true);
+ ret = mManagerService.enable(ActivityThread.currentPackageName());
+ if(!ret) {
+ mManagerService.setBrEdrEnableStatus(false);
+ }
+ return ret;
} catch (RemoteException e) {Log.e(TAG, "", e);}
return false;
}
@@ -931,7 +941,9 @@
*/
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
public boolean disable() {
+ android.util.SeempLog.record(57);
try {
+ mManagerService.setBrEdrEnableStatus(false);
return mManagerService.disable(ActivityThread.currentPackageName(), true);
} catch (RemoteException e) {Log.e(TAG, "", e);}
return false;
@@ -948,6 +960,7 @@
* @hide
*/
public boolean disable(boolean persist) {
+ android.util.SeempLog.record(57);
try {
return mManagerService.disable(ActivityThread.currentPackageName(), persist);
@@ -1219,6 +1232,7 @@
*/
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
public boolean startDiscovery() {
+ android.util.SeempLog.record(58);
if (getState() != STATE_ON) return false;
try {
mServiceLock.readLock().lock();
@@ -1301,7 +1315,7 @@
* @return true if Multiple Advertisement feature is supported
*/
public boolean isMultipleAdvertisementSupported() {
- if (getState() != STATE_ON) return false;
+ if (!getLeAccess()) return false;
try {
mServiceLock.readLock().lock();
if (mService != null) return mService.isMultiAdvertisementSupported();
@@ -1339,7 +1353,7 @@
* @hide
*/
public boolean isPeripheralModeSupported() {
- if (getState() != STATE_ON) return false;
+ if (!getLeAccess()) return false;
try {
mServiceLock.readLock().lock();
if (mService != null) return mService.isPeripheralModeSupported();
@@ -1477,6 +1491,7 @@
*/
@RequiresPermission(Manifest.permission.BLUETOOTH)
public Set<BluetoothDevice> getBondedDevices() {
+ android.util.SeempLog.record(61);
if (getState() != STATE_ON) {
return toDeviceSet(new BluetoothDevice[0]);
}
@@ -1566,6 +1581,7 @@
*/
@RequiresPermission(Manifest.permission.BLUETOOTH)
public int getProfileConnectionState(int profile) {
+ android.util.SeempLog.record(64);
if (getState() != STATE_ON) return BluetoothProfile.STATE_DISCONNECTED;
try {
mServiceLock.readLock().lock();
@@ -1689,6 +1705,7 @@
@RequiresPermission(Manifest.permission.BLUETOOTH)
public BluetoothServerSocket listenUsingInsecureRfcommWithServiceRecord(String name, UUID uuid)
throws IOException {
+ android.util.SeempLog.record(59);
return createNewRfcommSocketAndRecord(name, uuid, false, false);
}
@@ -1861,6 +1878,35 @@
return listenUsingL2capOn(port, false, false);
}
+
+ /**
+ * Construct an insecure L2CAP server socket.
+ * Call #accept to retrieve connections to this socket.
+ * <p>To auto assign a port without creating a SDP record use
+ * {@link SOCKET_CHANNEL_AUTO_STATIC_NO_SDP} as port number.
+ * @param port the PSM to listen on
+ * @return An L2CAP BluetoothServerSocket
+ * @throws IOException On error, for example Bluetooth not available, or
+ * insufficient permissions.
+ * @hide
+ */
+ public BluetoothServerSocket listenUsingInsecureL2capOn(int port) throws IOException {
+ BluetoothServerSocket socket = new BluetoothServerSocket(
+ BluetoothSocket.TYPE_L2CAP, false, false, port, false, false);
+ int errno = socket.mSocket.bindListen();
+ if(port == SOCKET_CHANNEL_AUTO_STATIC_NO_SDP) {
+ socket.setChannel(socket.mSocket.getPort());
+ }
+ if (errno != 0) {
+ //TODO(BT): Throw the same exception error code
+ // that the previous code was using.
+ //socket.mSocket.throwErrnoNative(errno);
+ throw new IOException("Error: " + errno);
+ }
+ return socket;
+
+ }
+
/**
* Read the local Out of Band Pairing Data
* <p>Requires {@link android.Manifest.permission#BLUETOOTH}
@@ -1911,6 +1957,9 @@
} else if (profile == BluetoothProfile.PAN) {
BluetoothPan pan = new BluetoothPan(context, listener);
return true;
+ } else if (profile == BluetoothProfile.DUN) {
+ BluetoothDun dun = new BluetoothDun(context, listener);
+ return true;
} else if (profile == BluetoothProfile.HEALTH) {
BluetoothHealth health = new BluetoothHealth(context, listener);
return true;
@@ -1970,6 +2019,10 @@
BluetoothPan pan = (BluetoothPan)proxy;
pan.close();
break;
+ case BluetoothProfile.DUN:
+ BluetoothDun dun = (BluetoothDun)proxy;
+ dun.close();
+ break;
case BluetoothProfile.HEALTH:
BluetoothHealth health = (BluetoothHealth)proxy;
health.close();
@@ -2039,6 +2092,8 @@
}
synchronized (mProxyServiceStateCallbacks) {
+ Log.d(TAG, "onBluetoothServiceDown: Sending callbacks to " +
+ mProxyServiceStateCallbacks.size() + " clients");
for (IBluetoothManagerCallback cb : mProxyServiceStateCallbacks ){
try {
if (cb != null) {
@@ -2046,11 +2101,10 @@
} else {
Log.d(TAG, "onBluetoothServiceDown: cb is null!");
}
- } catch (Exception e) {
- Log.e(TAG,"",e);
- }
+ } catch (Exception e) { Log.e(TAG,"",e);}
}
}
+ Log.d(TAG, "onBluetoothServiceDown: Finished sending callbacks to registered clients");
}
public void onBrEdrDown() {
@@ -2069,7 +2123,13 @@
return true;
}
try {
- return mManagerService.enableNoAutoConnect(ActivityThread.currentPackageName());
+ boolean ret;
+ mManagerService.setBrEdrEnableStatus(true);
+ ret = mManagerService.enableNoAutoConnect(ActivityThread.currentPackageName());
+ if(!ret) {
+ mManagerService.setBrEdrEnableStatus(false);
+ }
+ return ret;
} catch (RemoteException e) {Log.e(TAG, "", e);}
return false;
}
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index d329175..f9d59b8 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -620,9 +620,10 @@
public void onBluetoothServiceUp(IBluetooth bluetoothService)
throws RemoteException {
synchronized (BluetoothDevice.class) {
- if (sService == null) {
- sService = bluetoothService;
+ if (sService != null) {
+ Log.w(TAG, "sService is not NULL");
}
+ sService = bluetoothService;
}
}
@@ -1408,6 +1409,27 @@
}
/**
+ * Create an L2cap {@link BluetoothSocket} ready to start an insecure
+ * outgoing connection to this remote device on given channel.
+ * <p>The remote device will be not authenticated and communication on this
+ * socket will not be encrypted.
+ * <p>Use {@link BluetoothSocket#connect} to initiate the outgoing
+ * connection.
+ * <p>Valid L2CAP PSM channels are in range 1 to 2^16.
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
+ *
+ * @param channel L2cap PSM/channel to connect to
+ * @return a RFCOMM BluetoothServerSocket ready for an outgoing connection
+ * @throws IOException on error, for example Bluetooth not available, or
+ * insufficient permissions
+ * @hide
+ */
+ public BluetoothSocket createInsecureL2capSocket(int channel) throws IOException {
+ return new BluetoothSocket(BluetoothSocket.TYPE_L2CAP, -1, false, false, this, channel,
+ null);
+ }
+
+ /**
* Create an RFCOMM {@link BluetoothSocket} ready to start a secure
* outgoing connection to this remote device using SDP lookup of uuid.
* <p>This is designed to be used with {@link
diff --git a/core/java/android/bluetooth/BluetoothDevicePicker.java b/core/java/android/bluetooth/BluetoothDevicePicker.java
index c794be2..51d14cc 100644
--- a/core/java/android/bluetooth/BluetoothDevicePicker.java
+++ b/core/java/android/bluetooth/BluetoothDevicePicker.java
@@ -44,6 +44,14 @@
"android.bluetooth.devicepicker.action.DEVICE_SELECTED";
/**
+ * Broadcast when no BT device is selected from BT device picker screen.
+ * This happens when user presses back button.
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_DEVICE_NOT_SELECTED =
+ "org.codeaurora.bluetooth.devicepicker.action.DEVICE_NOT_SELECTED";
+
+ /**
* Broadcast when someone want to select one BT device from devices list.
* This intent contains below extra data:
* - {@link #EXTRA_NEED_AUTH} (boolean): if need authentication
diff --git a/core/java/android/bluetooth/BluetoothDun.java b/core/java/android/bluetooth/BluetoothDun.java
new file mode 100644
index 0000000..0912061
--- /dev/null
+++ b/core/java/android/bluetooth/BluetoothDun.java
@@ -0,0 +1,296 @@
+/*
+*Copyright (c) 2013, 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.
+*/
+
+
+package android.bluetooth;
+
+import android.annotation.SdkConstant;
+import android.annotation.SdkConstant.SdkConstantType;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.util.Log;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This class provides the APIs to control the Bluetooth Dun
+ * Profile.
+ *
+ *<p>BluetoothDun is a proxy object for controlling the Bluetooth DUN
+ * Service via IPC. Use {@link BluetoothAdapter#getProfileProxy} to get
+ * the BluetoothDun proxy object.
+ *
+ *<p>Each method is protected with its appropriate permission.
+ *@hide
+ */
+public final class BluetoothDun implements BluetoothProfile {
+ private static final String TAG = "BluetoothDun";
+ private static final boolean DBG = false;
+ private static final boolean VDBG = false;
+
+ /**
+ * Intent used to broadcast the change in connection state of the Dun
+ * profile.
+ *
+ * <p>This intent will have 3 extras:
+ * <ul>
+ * <li> {@link #EXTRA_STATE} - The current state of the profile. </li>
+ * <li> {@link #EXTRA_PREVIOUS_STATE}- The previous state of the profile.</li>
+ * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li>
+ * </ul>
+ *
+ * <p>{@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} can be any of
+ * {@link #STATE_DISCONNECTED}, {@link #STATE_CONNECTED}.
+ *
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission to
+ * receive.
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_CONNECTION_STATE_CHANGED =
+ "codeaurora.bluetooth.dun.profile.action.CONNECTION_STATE_CHANGED";
+
+ private Context mContext;
+ private ServiceListener mServiceListener;
+ private BluetoothAdapter mAdapter;
+ private IBluetoothDun mDunService;
+
+ /**
+ * Create a BluetoothDun proxy object for interacting with the local
+ * Bluetooth Service which handles the Dun profile
+ *
+ */
+ /*package*/ BluetoothDun(Context context, ServiceListener l) {
+ mContext = context;
+ mServiceListener = l;
+ mAdapter = BluetoothAdapter.getDefaultAdapter();
+ try {
+ mAdapter.getBluetoothManager().registerStateChangeCallback(mStateChangeCallback);
+ } catch (RemoteException re) {
+ Log.w(TAG,"Unable to register BluetoothStateChangeCallback",re);
+ }
+ Log.d(TAG, "BluetoothDun() call bindService");
+ doBind();
+ }
+
+ boolean doBind() {
+ Intent intent = new Intent(IBluetoothDun.class.getName());
+ ComponentName comp = intent.resolveSystemService(mContext.getPackageManager(), 0);
+ intent.setComponent(comp);
+ if (comp == null || !mContext.bindServiceAsUser(intent, mConnection, 0,
+ android.os.Process.myUserHandle())) {
+ Log.e(TAG, "Could not bind to Bluetooth Dun Service with " + intent);
+ return false;
+ }
+ return true;
+ }
+
+
+ /*package*/ void close() {
+ if (VDBG) log("close()");
+ mServiceListener = null;
+ IBluetoothManager mgr = mAdapter.getBluetoothManager();
+ if (mgr != null) {
+ try {
+ mgr.unregisterStateChangeCallback(mStateChangeCallback);
+ } catch (RemoteException re) {
+ Log.w(TAG,"Unable to unregister BluetoothStateChangeCallback",re);
+ }
+ }
+
+ synchronized (mConnection) {
+ if ( mDunService != null) {
+ try {
+ mDunService = null;
+ mContext.unbindService(mConnection);
+ } catch (Exception re) {
+ Log.e(TAG,"",re);
+ }
+ }
+ }
+ }
+
+ protected void finalize() {
+ close();
+ }
+
+ private IBluetoothStateChangeCallback mStateChangeCallback =
+ new IBluetoothStateChangeCallback.Stub() {
+
+ @Override
+ public void onBluetoothStateChange(boolean on) {
+ //Handle enable request to bind again.
+ Log.d(TAG, "onBluetoothStateChange on: " + on);
+ if (on) {
+ try {
+ if (mDunService == null) {
+ Log.d(TAG, "onBluetoothStateChange call bindService");
+ doBind();
+ }
+ } catch (IllegalStateException e) {
+ Log.e(TAG,"onBluetoothStateChange: could not bind to DUN service: ", e);
+ } catch (SecurityException e) {
+ Log.e(TAG,"onBluetoothStateChange: could not bind to DUN service: ", e);
+ }
+ } else {
+ if (VDBG) Log.d(TAG,"Unbinding service...");
+ synchronized (mConnection) {
+ if ( mDunService != null) {
+ try {
+ mDunService = null;
+ mContext.unbindService(mConnection);
+ } catch (Exception re) {
+ Log.e(TAG,"",re);
+ }
+ }
+ }
+ }
+ }
+ };
+
+ /**
+ * Initiate disconnection from DUN server.
+ *
+ * <p> Once the disconnection is initiated by any device either local host
+ * or remote device, the state will transition from {@link #STATE_CONNECTED}
+ * to {@link #STATE_DISCONNECTED}.
+ *
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}
+ * permission.
+ *
+ * @param device Remote Bluetooth Device
+ * @return false on immediate error,
+ * true otherwise
+ * @hide
+ */
+ public boolean disconnect(BluetoothDevice device) {
+ if (DBG) log("disconnect(" + device + ")");
+ if (mDunService != null && isEnabled() &&
+ isValidDevice(device)) {
+ try {
+ return mDunService.disconnect(device);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return false;
+ }
+ }
+ if (mDunService == null) Log.w(TAG, "Proxy not attached to service");
+ return false;
+ }
+ /**
+ * {@inheritDoc}
+ */
+ public List<BluetoothDevice> getConnectedDevices() {
+ if (VDBG) log("getConnectedDevices()");
+ if (mDunService != null && isEnabled()) {
+ try {
+ return mDunService.getConnectedDevices();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return new ArrayList<BluetoothDevice>();
+ }
+ }
+ if (mDunService == null) Log.w(TAG, "Proxy not attached to service");
+ return new ArrayList<BluetoothDevice>();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public List<BluetoothDevice> getDevicesMatchingConnectionStates(int[] states) {
+ if (VDBG) log("getDevicesMatchingStates()");
+ if (mDunService != null && isEnabled()) {
+ try {
+ return mDunService.getDevicesMatchingConnectionStates(states);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return new ArrayList<BluetoothDevice>();
+ }
+ }
+ if (mDunService == null) Log.w(TAG, "Proxy not attached to service");
+ return new ArrayList<BluetoothDevice>();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public int getConnectionState(BluetoothDevice device) {
+ if (VDBG) log("getState(" + device + ")");
+ if (mDunService != null && isEnabled()
+ && isValidDevice(device)) {
+ try {
+ return mDunService.getConnectionState(device);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return BluetoothProfile.STATE_DISCONNECTED;
+ }
+ }
+ if (mDunService == null) Log.w(TAG, "Proxy not attached to service");
+ return BluetoothProfile.STATE_DISCONNECTED;
+ }
+
+ private ServiceConnection mConnection = new ServiceConnection() {
+ public void onServiceConnected(ComponentName className, IBinder service) {
+ if (DBG) Log.d(TAG, "BluetoothDUN Proxy object connected");
+ mDunService = IBluetoothDun.Stub.asInterface(service);
+
+ if (mServiceListener != null) {
+ mServiceListener.onServiceConnected(BluetoothProfile.DUN,
+ BluetoothDun.this);
+ }
+ }
+ public void onServiceDisconnected(ComponentName className) {
+ if (DBG) Log.d(TAG, "BluetoothDUN Proxy object disconnected");
+ mDunService = null;
+ if (mServiceListener != null) {
+ mServiceListener.onServiceDisconnected(BluetoothProfile.DUN);
+ }
+ }
+ };
+
+ private boolean isEnabled() {
+ if (mAdapter.getState() == BluetoothAdapter.STATE_ON) return true;
+ return false;
+ }
+
+ private boolean isValidDevice(BluetoothDevice device) {
+ if (device == null) return false;
+
+ if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true;
+ return false;
+ }
+
+ private static void log(String msg) {
+ Log.d(TAG, msg);
+ }
+}
diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java
index f46a3b3..5d206d9 100644
--- a/core/java/android/bluetooth/BluetoothHeadset.java
+++ b/core/java/android/bluetooth/BluetoothHeadset.java
@@ -25,6 +25,7 @@
import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
+import android.os.UserHandle;
import android.util.Log;
import java.util.ArrayList;
@@ -47,7 +48,7 @@
public final class BluetoothHeadset implements BluetoothProfile {
private static final String TAG = "BluetoothHeadset";
private static final boolean DBG = true;
- private static final boolean VDBG = false;
+ private static final boolean VDBG = true;
/**
* Intent used to broadcast the change in connection state of the Headset
@@ -129,6 +130,13 @@
"android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT";
/**
+ * @hide Broadcast intent when HF indicator value changed is updated by HS.
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_HF_INDICATOR_VALUE_CHANGED =
+ "codeaurora.bluetooth.headset.action.ACTION_HF_INDICATOR_VALUE_CHANGED";
+
+ /**
* A String extra field in {@link #ACTION_VENDOR_SPECIFIC_HEADSET_EVENT}
* intents that contains the name of the vendor-specific command.
*/
@@ -199,6 +207,20 @@
public static final String VENDOR_RESULT_CODE_COMMAND_ANDROID = "+ANDROID";
/**
+ * @hide Used for sharing the HF indicator assigned number.
+ */
+ public static final String HF_INDICATOR_ASSIGNED_NUMBER =
+ "codeaurora.bluetooth.headset.intent.category.anum";
+
+
+ /**
+ * @hide Used for sharing the HF indicator assigned number's value.
+ */
+ public static final String HF_INDICATOR_ASSIGNED_NUMBER_VALUE =
+ "codeaurora.bluetooth.headset.intent.category.anumvalue";
+
+
+ /**
* Headset state when SCO audio is not connected.
* This state can be one of
* {@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} of
@@ -220,46 +242,6 @@
* {@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} of
* {@link #ACTION_AUDIO_STATE_CHANGED} intent.
*/
-
- /**
- * Intent used to broadcast the headset's indicator status
- *
- * <p>This intent will have 3 extras:
- * <ul>
- * <li> {@link #EXTRA_IND_ID} - The Assigned number of headset Indicator which is supported by
- the headset ( as indicated by AT+BIND
- command in the SLC sequence).or whose value
- is changed (indicated by AT+BIEV command)</li>
- * <li> {@link #EXTRA_IND_VALUE}- The updated value of headset indicator. </li>
- * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li>
- * </ul>
- * <p>{@link #EXTRA_IND_ID} is defined by Bluetooth SIG and each of the indicators are
- * given an assigned number. Below shows the assigned number of Indicator added so far
- * - Enhanced Safety - 1
- * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission to
- * receive.
- * @hide
- */
- public static final String ACTION_HF_INDICATORS_VALUE_CHANGED =
- "android.bluetooth.headset.action.HF_INDICATORS_VALUE_CHANGED";
-
- /**
- * A String extra field in {@link #ACTION_HF_INDICATORS_VALUE_CHANGED}
- * intents that contains the UUID of the headset indicator (as defined by Bluetooth SIG)
- * that is being sent.
- * @hide
- */
- public static final String EXTRA_HF_INDICATORS_IND_ID =
- "android.bluetooth.headset.extra.HF_INDICATORS_IND_ID";
-
- /**
- * A int extra field in {@link #ACTION_HF_INDICATORS_VALUE_CHANGED}
- * intents that contains the value of the Headset indicator that is being sent.
- * @hide
- */
- public static final String EXTRA_HF_INDICATORS_IND_VALUE =
- "android.bluetooth.headset.extra.HF_INDICATORS_IND_VALUE";
-
public static final int STATE_AUDIO_CONNECTED = 12;
private static final int MESSAGE_HEADSET_SERVICE_CONNECTED = 100;
@@ -1009,29 +991,6 @@
return false;
}
- /**
- * Send Headset the BIND response from AG to report change in the status of the
- * HF indicators to the headset
- *
- * @param ind_id Assigned Number of the indicator (defined by SIG)
- * @param ind_status
- * possible values- false-Indicator is disabled, no value changes shall be sent for this indicator
- * true-Indicator is enabled, value changes may be sent for this indicator
- * @hide
- */
- public void bindResponse(int ind_id, boolean ind_status) {
- if (mService != null && isEnabled()) {
- try {
- mService.bindResponse(ind_id, ind_status);
- } catch (RemoteException e) {
- Log.e(TAG, e.toString());
- }
- } else {
- Log.w(TAG, "Proxy not attached to service");
- if (DBG) Log.d(TAG, Log.getStackTraceString(new Throwable()));
- }
- }
-
private final IBluetoothProfileServiceConnection mConnection
= new IBluetoothProfileServiceConnection.Stub() {
@Override
diff --git a/core/java/android/bluetooth/BluetoothHeadsetClient.java b/core/java/android/bluetooth/BluetoothHeadsetClient.java
index 874026f..484a856 100644
--- a/core/java/android/bluetooth/BluetoothHeadsetClient.java
+++ b/core/java/android/bluetooth/BluetoothHeadsetClient.java
@@ -100,7 +100,9 @@
* {@link #EXTRA_BATTERY_LEVEL},
* {@link #EXTRA_OPERATOR_NAME},
* {@link #EXTRA_VOICE_RECOGNITION},
- * {@link #EXTRA_IN_BAND_RING}</p>
+ * {@link #EXTRA_IN_BAND_RING}
+ * {@link #EXTRA_MANF_ID}
+ * {@link #EXTRA_MANF_MODEL}</p>
*/
public static final String ACTION_AG_EVENT =
"android.bluetooth.headsetclient.profile.action.AG_EVENT";
@@ -206,6 +208,21 @@
"android.bluetooth.headsetclient.extra.SUBSCRIBER_INFO";
/**
+ * Extra for AG_EVENT intent indicates manufacturer identification.
+ * <p>Value: <code>String</code> containing manufacturer identification.</p>
+ */
+ public static final String EXTRA_MANF_ID =
+ "android.bluetooth.headsetclient.extra.MANF_ID";
+
+ /**
+ * Extra for AG_EVENT intent indicates manufacturer model.
+ * <p>Value: <code>String</code> containing manufacturer model.</p>
+ */
+ public static final String EXTRA_MANF_MODEL =
+ "android.bluetooth.headsetclient.extra.MANF_MODEL";
+
+
+ /**
* Extra for AG_CALL_CHANGED intent indicates the
* {@link BluetoothHeadsetClientCall} object that has changed.
*/
diff --git a/core/java/android/bluetooth/BluetoothInputDevice.java b/core/java/android/bluetooth/BluetoothInputDevice.java
index 252e3d2..db23ef5 100644
--- a/core/java/android/bluetooth/BluetoothInputDevice.java
+++ b/core/java/android/bluetooth/BluetoothInputDevice.java
@@ -96,6 +96,12 @@
public static final String ACTION_VIRTUAL_UNPLUG_STATUS =
"android.bluetooth.input.profile.action.VIRTUAL_UNPLUG_STATUS";
+ /**
+ * @hide
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_IDLE_TIME_CHANGED =
+ "codeaurora.bluetooth.input.profile.action.IDLE_TIME_CHANGED";
/**
* Return codes for the connect and disconnect Bluez / Dbus calls.
@@ -199,6 +205,11 @@
*/
public static final String EXTRA_VIRTUAL_UNPLUG_STATUS = "android.bluetooth.BluetoothInputDevice.extra.VIRTUAL_UNPLUG_STATUS";
+ /**
+ * @hide
+ */
+ public static final String EXTRA_IDLE_TIME = "codeaurora.bluetooth.BluetoothInputDevice.extra.IDLE_TIME";
+
private Context mContext;
private ServiceListener mServiceListener;
private BluetoothAdapter mAdapter;
@@ -658,6 +669,56 @@
if (mService == null) Log.w(TAG, "Proxy not attached to service");
return false;
}
+
+ /**
+ * Send Get_Idle_Time command to the connected HID input device.
+ *
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN} permission.
+ *
+ * @param device Remote Bluetooth Device
+ * @return false on immediate error,
+ * true otherwise
+ * @hide
+ */
+ public boolean getIdleTime(BluetoothDevice device) {
+ if (DBG) log("getIdletime(" + device + ")");
+ if (mService != null && isEnabled() && isValidDevice(device)) {
+ try {
+ return mService.getIdleTime(device);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return false;
+ }
+ }
+ if (mService == null) Log.w(TAG, "Proxy not attached to service");
+ return false;
+ }
+
+ /**
+ * Send Set_Idle_Time command to the connected HID input device.
+ *
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN} permission.
+ *
+ * @param device Remote Bluetooth Device
+ * @param idleTime Idle time to be set on HID Device
+ * @return false on immediate error,
+ * true otherwise
+ * @hide
+ */
+ public boolean setIdleTime(BluetoothDevice device, byte idleTime) {
+ if (DBG) log("setIdletime(" + device + "), idleTime=" + idleTime);
+ if (mService != null && isEnabled() && isValidDevice(device)) {
+ try {
+ return mService.setIdleTime(device, idleTime);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
+ return false;
+ }
+ }
+ if (mService == null) Log.w(TAG, "Proxy not attached to service");
+ return false;
+ }
+
private static void log(String msg) {
Log.d(TAG, msg);
}
diff --git a/core/java/android/bluetooth/BluetoothProfile.java b/core/java/android/bluetooth/BluetoothProfile.java
index 20d95cc..74ea206 100644
--- a/core/java/android/bluetooth/BluetoothProfile.java
+++ b/core/java/android/bluetooth/BluetoothProfile.java
@@ -137,11 +137,17 @@
public static final int PBAP_CLIENT = 17;
/**
+ * DUN
+ * @hide
+ */
+ public static final int DUN = 18;
+
+ /**
* Max profile ID. This value should be updated whenever a new profile is added to match
* the largest value assigned to a profile.
* @hide
*/
- public static final int MAX_PROFILE_ID = 17;
+ public static final int MAX_PROFILE_ID = 18;
/**
* Default priority for devices that we try to auto-connect to and
diff --git a/core/java/android/bluetooth/BluetoothSocket.java b/core/java/android/bluetooth/BluetoothSocket.java
index ec01bef..6300968 100644
--- a/core/java/android/bluetooth/BluetoothSocket.java
+++ b/core/java/android/bluetooth/BluetoothSocket.java
@@ -248,6 +248,7 @@
as.mSocketOS = as.mSocket.getOutputStream();
as.mAddress = RemoteAddr;
as.mDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(RemoteAddr);
+ as.mPort = mPort;
return as;
}
/**
@@ -469,6 +470,61 @@
return acceptedSocket;
}
+ /**
+ * setSocketOpt for the Buetooth Socket.
+ *
+ * @param optionName socket option name
+ * @param optionVal socket option value
+ * @param optionLen socket option length
+ * @return -1 on immediate error,
+ * 0 otherwise
+ * @hide
+ */
+ public int setSocketOpt(int optionName, byte [] optionVal, int optionLen) throws IOException {
+ int ret = 0;
+ if (mSocketState == SocketState.CLOSED) throw new IOException("socket closed");
+ IBluetooth bluetoothProxy = BluetoothAdapter.getDefaultAdapter().getBluetoothService(null);
+ if (bluetoothProxy == null) {
+ Log.e(TAG, "setSocketOpt fail, reason: bluetooth is off");
+ return -1;
+ }
+ try {
+ if(VDBG) Log.d(TAG, "setSocketOpt(), mType: " + mType + " mPort: " + mPort);
+ ret = bluetoothProxy.setSocketOpt(mType, mPort, optionName, optionVal, optionLen);
+ } catch (RemoteException e) {
+ Log.e(TAG, Log.getStackTraceString(new Throwable()));
+ return -1;
+ }
+ return ret;
+ }
+
+ /**
+ * getSocketOpt for the Buetooth Socket.
+ *
+ * @param optionName socket option name
+ * @param optionVal socket option value
+ * @return -1 on immediate error,
+ * length of returned socket option otherwise
+ * @hide
+ */
+ public int getSocketOpt(int optionName, byte [] optionVal) throws IOException {
+ int ret = 0;
+ if (mSocketState == SocketState.CLOSED) throw new IOException("socket closed");
+ IBluetooth bluetoothProxy = BluetoothAdapter.getDefaultAdapter().getBluetoothService(null);
+ if (bluetoothProxy == null) {
+ Log.e(TAG, "getSocketOpt fail, reason: bluetooth is off");
+ return -1;
+ }
+ try {
+ if(VDBG) Log.d(TAG, "getSocketOpt(), mType: " + mType + " mPort: " + mPort);
+ ret = bluetoothProxy.getSocketOpt(mType, mPort, optionName, optionVal);
+ } catch (RemoteException e) {
+ Log.e(TAG, Log.getStackTraceString(new Throwable()));
+ return -1;
+ }
+ return ret;
+ }
+
/*package*/ int available() throws IOException {
if (VDBG) Log.d(TAG, "available: " + mSocketIS);
return mSocketIS.available();
diff --git a/core/java/android/bluetooth/IBluetooth.aidl b/core/java/android/bluetooth/IBluetooth.aidl
index f28ab27..54c68d3 100644
--- a/core/java/android/bluetooth/IBluetooth.aidl
+++ b/core/java/android/bluetooth/IBluetooth.aidl
@@ -116,4 +116,7 @@
void onLeServiceUp();
void onBrEdrDown();
+
+ int setSocketOpt(int type, int port, int optionName, in byte [] optionVal, int optionLen);
+ int getSocketOpt(int type, int port, int optionName, out byte [] optionVal);
}
diff --git a/core/java/android/bluetooth/IBluetoothDun.aidl b/core/java/android/bluetooth/IBluetoothDun.aidl
new file mode 100644
index 0000000..a4f2017
--- /dev/null
+++ b/core/java/android/bluetooth/IBluetoothDun.aidl
@@ -0,0 +1,45 @@
+/*
+*Copyright (c) 2013, 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.
+*/
+
+package android.bluetooth;
+
+import android.bluetooth.BluetoothDevice;
+
+/**
+ * API for Bluetooth Dun service
+ *
+ * {@hide}
+ */
+interface IBluetoothDun {
+ // Public API
+ boolean disconnect(in BluetoothDevice device);
+ int getConnectionState(in BluetoothDevice device);
+ List<BluetoothDevice> getConnectedDevices();
+ List<BluetoothDevice> getDevicesMatchingConnectionStates(in int[] states);
+}
diff --git a/core/java/android/bluetooth/IBluetoothHeadset.aidl b/core/java/android/bluetooth/IBluetoothHeadset.aidl
old mode 100755
new mode 100644
index 6ad442b..0bb4088
--- a/core/java/android/bluetooth/IBluetoothHeadset.aidl
+++ b/core/java/android/bluetooth/IBluetoothHeadset.aidl
@@ -59,5 +59,4 @@
String number, int type);
boolean enableWBS();
boolean disableWBS();
- void bindResponse(int ind_id, boolean ind_status);
}
diff --git a/core/java/android/bluetooth/IBluetoothInputDevice.aidl b/core/java/android/bluetooth/IBluetoothInputDevice.aidl
index 1ebb9ca..5bd3f78 100644
--- a/core/java/android/bluetooth/IBluetoothInputDevice.aidl
+++ b/core/java/android/bluetooth/IBluetoothInputDevice.aidl
@@ -56,4 +56,12 @@
* @hide
*/
boolean sendData(in BluetoothDevice device, String report);
+ /**
+ * @hide
+ */
+ boolean getIdleTime(in BluetoothDevice device);
+ /**
+ * @hide
+ */
+ boolean setIdleTime(in BluetoothDevice device, byte idleTime);
}
diff --git a/core/java/android/bluetooth/IBluetoothManager.aidl b/core/java/android/bluetooth/IBluetoothManager.aidl
index 5afd774..d111d8d 100644
--- a/core/java/android/bluetooth/IBluetoothManager.aidl
+++ b/core/java/android/bluetooth/IBluetoothManager.aidl
@@ -49,4 +49,5 @@
boolean isBleScanAlwaysAvailable();
int updateBleAppCount(IBinder b, boolean enable, String packageName);
boolean isBleAppPresent();
+ void setBrEdrEnableStatus(boolean status);
}
diff --git a/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java b/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
index d468bd4..092eeee 100644
--- a/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
+++ b/core/java/android/bluetooth/le/BluetoothLeAdvertiser.java
@@ -152,6 +152,13 @@
*/
public void stopAdvertising(final AdvertiseCallback callback) {
synchronized (mLeAdvertisers) {
+ try {
+ BluetoothLeUtils.checkAdapterStateOn(mBluetoothAdapter);
+ } catch (IllegalStateException e) {
+ Log.e(TAG, "Failed to stop Advertisement:",e);
+ return;
+ }
+
if (callback == null) {
throw new IllegalArgumentException("callback cannot be null");
}
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index daa1b93..8d0367d 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -471,6 +471,7 @@
public final @Nullable Cursor query(@RequiresPermission.Read @NonNull Uri uri,
@Nullable String[] projection, @Nullable String selection,
@Nullable String[] selectionArgs, @Nullable String sortOrder) {
+ android.util.SeempLog.record_uri(13, uri);
return query(uri, projection, selection, selectionArgs, sortOrder, null);
}
@@ -512,6 +513,7 @@
@Nullable String[] projection, @Nullable String selection,
@Nullable String[] selectionArgs, @Nullable String sortOrder,
@Nullable CancellationSignal cancellationSignal) {
+ android.util.SeempLog.record_uri(13, uri);
Preconditions.checkNotNull(uri, "uri");
IContentProvider unstableProvider = acquireUnstableProvider(uri);
if (unstableProvider == null) {
@@ -1266,6 +1268,7 @@
*/
public final @Nullable Uri insert(@RequiresPermission.Write @NonNull Uri url,
@Nullable ContentValues values) {
+ android.util.SeempLog.record_uri(37, url);
Preconditions.checkNotNull(url, "url");
IContentProvider provider = acquireProvider(url);
if (provider == null) {
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index b7364e2..25931b3 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -23,6 +23,8 @@
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Environment;
+import android.os.SystemProperties;
+import android.util.DisplayMetrics;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.UserHandle;
@@ -542,6 +544,25 @@
public int privateFlags;
/**
+ * Boolean indicating whether the resolution of the SurfaceView associated
+ * with this appplication can be overriden.
+ * {@hide}
+ */
+ public int overrideRes = 0;
+
+ /**
+ * In case, app needs different density than device density, set this value.
+ * {@hide}
+ */
+ public int overrideDensity = 0;
+
+ /**
+ * In case, app is whitelisted for density-overriding, set this value to 1
+ * (@hide)
+ */
+ public int whiteListed = 0;
+
+ /**
* The required smallest screen width the application can run on. If 0,
* nothing has been specified. Comes from
* {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp
@@ -897,6 +918,9 @@
theme = orig.theme;
flags = orig.flags;
privateFlags = orig.privateFlags;
+ overrideRes = orig.overrideRes;
+ overrideDensity = orig.overrideDensity;
+ whiteListed = orig.whiteListed;
requiresSmallestWidthDp = orig.requiresSmallestWidthDp;
compatibleWidthLimitDp = orig.compatibleWidthLimitDp;
largestWidthLimitDp = orig.largestWidthLimitDp;
@@ -953,6 +977,9 @@
dest.writeInt(theme);
dest.writeInt(flags);
dest.writeInt(privateFlags);
+ dest.writeInt(overrideRes);
+ dest.writeInt(overrideDensity);
+ dest.writeInt(whiteListed);
dest.writeInt(requiresSmallestWidthDp);
dest.writeInt(compatibleWidthLimitDp);
dest.writeInt(largestWidthLimitDp);
@@ -1009,6 +1036,9 @@
theme = source.readInt();
flags = source.readInt();
privateFlags = source.readInt();
+ overrideRes = source.readInt();
+ overrideDensity = source.readInt();
+ whiteListed = source.readInt();
requiresSmallestWidthDp = source.readInt();
compatibleWidthLimitDp = source.readInt();
largestWidthLimitDp = source.readInt();
@@ -1208,12 +1238,45 @@
return this;
}
+ /** @hide */
+ public void setAppOverrideDensity() {
+ int density = 0;
+ String prop = SystemProperties.get("persist.debug.appdensity");
+ if(prop != null) {
+ density = Integer.parseInt(prop);
+ if((density < DisplayMetrics.DENSITY_LOW) ||(density > DisplayMetrics.DENSITY_XXHIGH))
+ density = 0;
+ }
+ setOverrideDensity(density);
+ }
+
+ /** @hide */
+ public void setOverrideDensity(int density) {
+ overrideDensity = density;
+ }
+
+ /** @hide */
+ public int getOverrideDensity() {
+ return overrideDensity;
+ }
+
+ /** @hide */
+ public boolean isAppWhiteListed() {
+ return (whiteListed == 1);
+ }
+
+ /** @hide */
+ public void setAppWhiteListed(int val) {
+ whiteListed = val;
+ }
+
/** {@hide} */ public void setCodePath(String codePath) { scanSourceDir = codePath; }
/** {@hide} */ public void setBaseCodePath(String baseCodePath) { sourceDir = baseCodePath; }
/** {@hide} */ public void setSplitCodePaths(String[] splitCodePaths) { splitSourceDirs = splitCodePaths; }
/** {@hide} */ public void setResourcePath(String resourcePath) { scanPublicSourceDir = resourcePath; }
/** {@hide} */ public void setBaseResourcePath(String baseResourcePath) { publicSourceDir = baseResourcePath; }
/** {@hide} */ public void setSplitResourcePaths(String[] splitResourcePaths) { splitPublicSourceDirs = splitResourcePaths; }
+ /** {@hide} */ public void setOverrideRes(int overrideResolution) { overrideRes = overrideResolution; }
/** {@hide} */ public String getCodePath() { return scanSourceDir; }
/** {@hide} */ public String getBaseCodePath() { return sourceDir; }
@@ -1221,4 +1284,5 @@
/** {@hide} */ public String getResourcePath() { return scanPublicSourceDir; }
/** {@hide} */ public String getBaseResourcePath() { return publicSourceDir; }
/** {@hide} */ public String[] getSplitResourcePaths() { return splitSourceDirs; }
+ /** {@hide} */ public int canOverrideRes() { return overrideRes; }
}
diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java
index 2093124..9e488fc 100644
--- a/core/java/android/content/pm/PackageParser.java
+++ b/core/java/android/content/pm/PackageParser.java
@@ -24,6 +24,7 @@
import org.xmlpull.v1.XmlPullParserException;
import android.app.ActivityManager;
+import android.content.Context;
import android.content.ComponentName;
import android.content.Intent;
import android.content.IntentFilter;
@@ -161,6 +162,8 @@
private static final String TAG_PACKAGE = "package";
private static final String TAG_RESTRICT_UPDATE = "restrict-update";
+ private Context mContext;
+
// These are the tags supported by child packages
private static final Set<String> CHILD_PACKAGE_TAGS = new ArraySet<>();
static {
@@ -254,6 +257,7 @@
private String[] mSeparateProcesses;
private boolean mOnlyCoreApps;
private DisplayMetrics mMetrics;
+ private boolean mOnlyPowerOffAlarmApps;
private static final int SDK_VERSION = Build.VERSION.SDK_INT;
private static final String[] SDK_CODENAMES = Build.VERSION.ACTIVE_CODENAMES;
@@ -431,6 +435,11 @@
mMetrics.setToDefaults();
}
+ public PackageParser(Context context) {
+ this();
+ mContext = context;
+ }
+
public void setSeparateProcesses(String[] procs) {
mSeparateProcesses = procs;
}
@@ -448,6 +457,10 @@
mMetrics = metrics;
}
+ public void setOnlyPowerOffAlarmApps(boolean onlyPowerOffAlarmApps) {
+ mOnlyPowerOffAlarmApps = onlyPowerOffAlarmApps;
+ }
+
public static final boolean isApkFile(File file) {
return isApkPath(file.getName());
}
@@ -802,6 +815,27 @@
}
}
+
+ /*
+ * Check if the package belongs to power off alarm packages
+ */
+ private boolean isPowerOffAlarmPackage(String packageName) {
+ if (mContext != null) {
+ String[] packageArray =
+ mContext.getResources().getStringArray(R.array.power_off_alarm_apps);
+ if(packageArray.length ==0) {
+ Slog.w(TAG, "power off alarm app array is empty " + packageName);
+ return false;
+ } else {
+ List<String> tempList = Arrays.asList(packageArray);
+ if (tempList.contains(packageName)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
/**
* Parse all APKs contained in the given directory, treating them as a
* single package. This also performs sanity checking, such as requiring
@@ -813,8 +847,15 @@
*/
private Package parseClusterPackage(File packageDir, int flags) throws PackageParserException {
final PackageLite lite = parseClusterPackageLite(packageDir, 0);
+ // When mOnlyPowerOffAlarmApps is true, only parse power off alarm packages
+ if (mOnlyPowerOffAlarmApps) {
+ if (!isPowerOffAlarmPackage(lite.packageName)) {
+ throw new PackageParserException(INSTALL_PARSE_FAILED_MANIFEST_MALFORMED,
+ "Not a powerOffAlarmApp: " + packageDir);
+ }
+ }
- if (mOnlyCoreApps && !lite.coreApp) {
+ if (!mOnlyPowerOffAlarmApps && mOnlyCoreApps && !lite.coreApp) {
throw new PackageParserException(INSTALL_PARSE_FAILED_MANIFEST_MALFORMED,
"Not a coreApp: " + packageDir);
}
@@ -872,7 +913,15 @@
@Deprecated
public Package parseMonolithicPackage(File apkFile, int flags) throws PackageParserException {
final PackageLite lite = parseMonolithicPackageLite(apkFile, flags);
- if (mOnlyCoreApps) {
+ // When mOnlyPowerOffAlarmApps is true, only parse power off alarm packages
+ if (mOnlyPowerOffAlarmApps) {
+ if (!isPowerOffAlarmPackage(lite.packageName)) {
+ throw new PackageParserException(INSTALL_PARSE_FAILED_MANIFEST_MALFORMED,
+ "Not a powerOffAlarmApp: " + apkFile);
+ }
+ }
+
+ if (!mOnlyPowerOffAlarmApps && mOnlyCoreApps) {
if (!lite.coreApp) {
throw new PackageParserException(INSTALL_PARSE_FAILED_MANIFEST_MALFORMED,
"Not a coreApp: " + apkFile);
diff --git a/core/java/android/content/res/CompatibilityInfo.java b/core/java/android/content/res/CompatibilityInfo.java
index da35ee9..241251b 100644
--- a/core/java/android/content/res/CompatibilityInfo.java
+++ b/core/java/android/content/res/CompatibilityInfo.java
@@ -27,6 +27,7 @@
import android.view.MotionEvent;
import android.view.WindowManager;
import android.view.WindowManager.LayoutParams;
+import android.util.Log;
/**
* CompatibilityInfo class keeps the information about compatibility mode that the application is
@@ -39,6 +40,8 @@
public static final CompatibilityInfo DEFAULT_COMPATIBILITY_INFO = new CompatibilityInfo() {
};
+ static final String TAG = "CompatibilityInfo";
+
/**
* This is the number of pixels we would like to have along the
* short axis of an app that needs to run on a normal size screen.
@@ -134,11 +137,18 @@
// Let the user decide.
compatFlags |= NEEDS_SCREEN_COMPAT;
}
-
- // Modern apps always support densities.
- applicationDensity = DisplayMetrics.DENSITY_DEVICE;
- applicationScale = 1.0f;
- applicationInvertedScale = 1.0f;
+ int density = appInfo.getOverrideDensity();
+ if(density != 0) {
+ applicationDensity = density;
+ applicationScale = DisplayMetrics.DENSITY_DEVICE / (float) applicationDensity;
+ applicationInvertedScale = 1.0f / applicationScale;
+ compatFlags |= SCALING_REQUIRED;
+ } else {
+ // Modern apps always support densities.
+ applicationDensity = DisplayMetrics.DENSITY_DEVICE;
+ applicationScale = 1.0f;
+ applicationInvertedScale = 1.0f;
+ }
} else {
/**
@@ -225,20 +235,30 @@
compatFlags |= NEVER_NEEDS_COMPAT;
}
- if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES) != 0) {
- applicationDensity = DisplayMetrics.DENSITY_DEVICE;
- applicationScale = 1.0f;
- applicationInvertedScale = 1.0f;
- } else {
+ int density = appInfo.getOverrideDensity();
+ if ((appInfo.flags & ApplicationInfo.FLAG_SUPPORTS_SCREEN_DENSITIES) == 0) {
applicationDensity = DisplayMetrics.DENSITY_DEFAULT;
applicationScale = DisplayMetrics.DENSITY_DEVICE
/ (float) DisplayMetrics.DENSITY_DEFAULT;
applicationInvertedScale = 1.0f / applicationScale;
compatFlags |= SCALING_REQUIRED;
+ } else if(density != 0) {
+ applicationDensity = density;
+ applicationScale = DisplayMetrics.DENSITY_DEVICE / (float) applicationDensity;
+ applicationInvertedScale = 1.0f / applicationScale;
+ compatFlags |= SCALING_REQUIRED;
+ } else {
+ applicationDensity = DisplayMetrics.DENSITY_DEVICE;
+ applicationScale = 1.0f;
+ applicationInvertedScale = 1.0f;
}
}
mCompatibilityFlags = compatFlags;
+
+ Log.d(TAG, "mCompatibilityFlags - " + Integer.toHexString(mCompatibilityFlags));
+ Log.d(TAG, "applicationDensity - " + applicationDensity);
+ Log.d(TAG, "applicationScale - " + applicationScale);
}
private CompatibilityInfo(int compFlags,
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index acf0677..9549265 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -32,6 +32,7 @@
import android.os.Message;
import android.os.RemoteException;
import android.os.ServiceManager;
+import android.os.SystemProperties;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
@@ -41,6 +42,7 @@
import android.text.TextUtils;
import android.view.Surface;
import android.view.SurfaceHolder;
+import android.os.SystemProperties;
import java.io.IOException;
import java.lang.ref.WeakReference;
@@ -156,6 +158,10 @@
private static final int CAMERA_MSG_RAW_IMAGE_NOTIFY = 0x200;
private static final int CAMERA_MSG_PREVIEW_METADATA = 0x400;
private static final int CAMERA_MSG_FOCUS_MOVE = 0x800;
+ /* ### QC ADD-ONS: START */
+ private static final int CAMERA_MSG_STATS_DATA = 0x1000;
+ private static final int CAMERA_MSG_META_DATA = 0x2000;
+ /* ### QC ADD-ONS: END */
private long mNativeContext; // accessed by native methods
private EventHandler mEventHandler;
@@ -176,6 +182,17 @@
private final Object mAutoFocusCallbackLock = new Object();
private static final int NO_ERROR = 0;
+ private static final int EACCESS = -13;
+ private static final int ENODEV = -19;
+ private static final int EBUSY = -16;
+ private static final int EINVAL = -22;
+ private static final int ENOSYS = -38;
+ private static final int EUSERS = -87;
+ private static final int EOPNOTSUPP = -95;
+ /* ### QC ADD-ONS: START */
+ private CameraDataCallback mCameraDataCallback;
+ private CameraMetaDataCallback mCameraMetaDataCallback;
+ /* ### QC ADD-ONS: END */
/**
* @deprecated This broadcast is no longer delivered by the system; use
@@ -230,13 +247,44 @@
/**
* Returns the number of physical cameras available on this device.
*/
- public native static int getNumberOfCameras();
+ public static int getNumberOfCameras() {
+ boolean exposeAuxCamera = false;
+ String packageName = ActivityThread.currentOpPackageName();
+ /* Force to expose only two cameras
+ * if the package name does not falls in this bucket
+ */
+ String packageList = SystemProperties.get("camera.aux.packagelist");
+ if (packageList.length() > 0) {
+ TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(',');
+ splitter.setString(packageList);
+ for (String str : splitter) {
+ if (packageName.equals(str)) {
+ exposeAuxCamera = true;
+ break;
+ }
+ }
+ }
+ int numberOfCameras = _getNumberOfCameras();
+ if (exposeAuxCamera == false && (numberOfCameras > 2)) {
+ numberOfCameras = 2;
+ }
+ return numberOfCameras;
+ }
+
+ /**
+ * Returns the number of physical cameras available on this device.
+ */
+ /** @hide */
+ public native static int _getNumberOfCameras();
/**
* Returns the information about a particular camera.
* If {@link #getNumberOfCameras()} returns N, the valid id is 0 to N-1.
*/
public static void getCameraInfo(int cameraId, CameraInfo cameraInfo) {
+ if(cameraId >= getNumberOfCameras()){
+ throw new RuntimeException("Unknown camera ID");
+ }
_getCameraInfo(cameraId, cameraInfo);
IBinder b = ServiceManager.getService(Context.AUDIO_SERVICE);
IAudioService audioService = IAudioService.Stub.asInterface(b);
@@ -270,6 +318,17 @@
*/
public static final int CAMERA_FACING_FRONT = 1;
+ /* ### QC ADD-ONS: START TBD*/
+ /** @hide
+ * camera is in ZSL mode.
+ */
+ public static final int CAMERA_SUPPORT_MODE_ZSL = 2;
+
+ /** @hide
+ * camera is in non-ZSL mode.
+ */
+ public static final int CAMERA_SUPPORT_MODE_NONZSL = 3;
+ /* ### QC ADD-ONS: END */
/**
* The direction that the camera faces. It should be
* CAMERA_FACING_BACK or CAMERA_FACING_FRONT.
@@ -452,6 +511,10 @@
mPostviewCallback = null;
mUsingPreviewAllocation = false;
mZoomListener = null;
+ /* ### QC ADD-ONS: START */
+ mCameraDataCallback = null;
+ mCameraMetaDataCallback = null;
+ /* ### QC ADD-ONS: END */
Looper looper;
if ((looper = Looper.myLooper()) != null) {
@@ -462,8 +525,21 @@
mEventHandler = null;
}
- return native_setup(new WeakReference<Camera>(this), cameraId, halVersion,
- ActivityThread.currentOpPackageName());
+ String packageName = ActivityThread.currentOpPackageName();
+
+ //Force HAL1 if the package name falls in this bucket
+ String packageList = SystemProperties.get("camera.hal1.packagelist", "");
+ if (packageList.length() > 0) {
+ TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(',');
+ splitter.setString(packageList);
+ for (String str : splitter) {
+ if (packageName.equals(str)) {
+ halVersion = CAMERA_HAL_API_VERSION_1_0;
+ break;
+ }
+ }
+ }
+ return native_setup(new WeakReference<Camera>(this), cameraId, halVersion, packageName);
}
private int cameraInitNormal(int cameraId) {
@@ -490,6 +566,9 @@
/** used by Camera#open, Camera#open(int) */
Camera(int cameraId) {
+ if(cameraId >= getNumberOfCameras()){
+ throw new RuntimeException("Unknown camera ID");
+ }
int err = cameraInitNormal(cameraId);
if (checkInitErrors(err)) {
if (err == -EACCES) {
@@ -766,6 +845,7 @@
* @see android.media.MediaActionSound
*/
public final void setPreviewCallback(PreviewCallback cb) {
+ android.util.SeempLog.record(66);
mPreviewCallback = cb;
mOneShot = false;
mWithBuffer = false;
@@ -792,6 +872,7 @@
* @see android.media.MediaActionSound
*/
public final void setOneShotPreviewCallback(PreviewCallback cb) {
+ android.util.SeempLog.record(68);
mPreviewCallback = cb;
mOneShot = true;
mWithBuffer = false;
@@ -830,6 +911,7 @@
* @see android.media.MediaActionSound
*/
public final void setPreviewCallbackWithBuffer(PreviewCallback cb) {
+ android.util.SeempLog.record(67);
mPreviewCallback = cb;
mOneShot = false;
mWithBuffer = true;
@@ -1152,7 +1234,23 @@
mAutoFocusMoveCallback.onAutoFocusMoving(msg.arg1 == 0 ? false : true, mCamera);
}
return;
+ /* ### QC ADD-ONS: START */
+ case CAMERA_MSG_STATS_DATA:
+ int statsdata[] = new int[257];
+ for(int i =0; i<257; i++ ) {
+ statsdata[i] = byteToInt( (byte[])msg.obj, i*4);
+ }
+ if (mCameraDataCallback != null) {
+ mCameraDataCallback.onCameraData(statsdata, mCamera);
+ }
+ return;
+ case CAMERA_MSG_META_DATA:
+ if (mCameraMetaDataCallback != null) {
+ mCameraMetaDataCallback.onCameraMetaData((byte[])msg.obj, mCamera);
+ }
+ return;
+ /* ### QC ADD-ONS: END */
default:
Log.e(TAG, "Unknown message type " + msg.what);
return;
@@ -1376,6 +1474,7 @@
*/
public final void takePicture(ShutterCallback shutter, PictureCallback raw,
PictureCallback jpeg) {
+ android.util.SeempLog.record(65);
takePicture(shutter, raw, null, jpeg);
}
private native final void native_takePicture(int msgType);
@@ -1411,6 +1510,7 @@
*/
public final void takePicture(ShutterCallback shutter, PictureCallback raw,
PictureCallback postview, PictureCallback jpeg) {
+ android.util.SeempLog.record(65);
mShutterCallback = shutter;
mRawImageCallback = raw;
mPostviewCallback = postview;
@@ -1806,6 +1906,23 @@
* as a set. Either they are all valid, or none of them are.
*/
public Point mouth = null;
+
+ /**
+ * {@hide}
+ */
+ public int smileDegree = 0;
+ /**
+ * {@hide}
+ */
+ public int smileScore = 0;
+ /**
+ * {@hide}
+ */
+ public int blinkDetected = 0;
+ /**
+ * {@hide}
+ */
+ public int faceRecognised = 0;
}
/**
@@ -1898,6 +2015,27 @@
return p;
}
+ /** @hide
+ * Returns the current cct value of white balance.
+ *
+ * If it's in AWB mode, cct is determined by stats/awb module.
+ *
+ * If it's in Manual WB mode, it actually returns cct value
+ * set by user via {@link #setParameters(Camera.Parameters)}.
+ */
+ public int getWBCurrentCCT() {
+ Parameters p = new Parameters();
+ String s = native_getParameters();
+ p.unflatten(s);
+
+ int cct = 0;
+ if (p.getWBCurrentCCT() != null) {
+ cct = Integer.parseInt(p.getWBCurrentCCT());
+ }
+
+ return cct;
+ }
+
/**
* Returns an empty {@link Parameters} for testing purpose.
*
@@ -1910,6 +2048,157 @@
return camera.new Parameters();
}
+ /* ### QC ADD-ONS: START */
+ private static int byteToInt(byte[] b, int offset) {
+ int value = 0;
+ for (int i = 0; i < 4; i++) {
+ int shift = (4 - 1 - i) * 8;
+ value += (b[(3-i) + offset] & 0x000000FF) << shift;
+ }
+ return value;
+ }
+ /** @hide
+ * Handles the callback for when Camera Data is available.
+ * data is read from the camera.
+ */
+ public interface CameraDataCallback {
+ /**
+ * Callback for when camera data is available.
+ *
+ * @param data a int array of the camera data
+ * @param camera the Camera service object
+ */
+ void onCameraData(int[] data, Camera camera);
+ };
+
+ /** @hide
+ * Set camera histogram mode and registers a callback function to run.
+ * Only valid after startPreview() has been called.
+ *
+ * @param cb the callback to run
+ */
+ public final void setHistogramMode(CameraDataCallback cb)
+ {
+ mCameraDataCallback = cb;
+ native_setHistogramMode(cb!=null);
+ }
+ private native final void native_setHistogramMode(boolean mode);
+
+ /** @hide
+ * Set camera histogram command to send data.
+ *
+ */
+ public final void sendHistogramData()
+ {
+ native_sendHistogramData();
+ }
+ private native final void native_sendHistogramData();
+
+ /** @hide
+ * Handles the callback for when Camera Meta Data is available.
+ * Meta data is read from the camera.
+ */
+ public interface CameraMetaDataCallback {
+ /**
+ * Callback for when camera meta data is available.
+ *
+ * @param data a byte array of the camera meta data
+ * @param camera the Camera service object
+ */
+ void onCameraMetaData(byte[] data, Camera camera);
+ };
+
+ /** @hide
+ * Set camera meta data and registers a callback function to run.
+ * Only valid after startPreview() has been called.
+ *
+ * @param cb the callback to run
+ */
+ public final void setMetadataCb(CameraMetaDataCallback cb)
+ {
+ mCameraMetaDataCallback = cb;
+ native_setMetadataCb(cb!=null);
+ }
+ private native final void native_setMetadataCb(boolean mode);
+
+ /** @hide
+ * Set camera face detection command to send meta data.
+ */
+ public final void sendMetaData()
+ {
+ native_sendMetaData();
+ }
+ private native final void native_sendMetaData();
+
+ /** @hide
+ * Configure longshot mode. Available only in ZSL.
+ *
+ * @param enable enable/disable this mode
+ */
+ public final void setLongshot(boolean enable)
+ {
+ native_setLongshot(enable);
+ }
+ private native final void native_setLongshot(boolean enable);
+
+ /** @hide
+ * Handles the Touch Co-ordinate.
+ */
+ public class Coordinate {
+ /**
+ * Sets the x,y co-ordinates for a touch event
+ *
+ * @param x the x co-ordinate (pixels)
+ * @param y the y co-ordinate (pixels)
+ */
+ public Coordinate(int x, int y) {
+ xCoordinate = x;
+ yCoordinate = y;
+ }
+ /**
+ * Compares {@code obj} to this co-ordinate.
+ *
+ * @param obj the object to compare this co-ordinate with.
+ * @return {@code true} if the xCoordinate and yCoordinate of {@code obj} is the
+ * same as those of this coordinate. {@code false} otherwise.
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof Coordinate)) {
+ return false;
+ }
+ Coordinate c = (Coordinate) obj;
+ return xCoordinate == c.xCoordinate && yCoordinate == c.yCoordinate;
+ }
+
+ /** x co-ordinate for the touch event*/
+ public int xCoordinate;
+
+ /** y co-ordinate for the touch event */
+ public int yCoordinate;
+ };
+
+ /** @hide
+ * Returns the current focus position.
+ *
+ * If it's in AF mode, it's the lens position after af is done.
+ *
+ * If it's in Manual Focus mode, it actually returns the value
+ * set by user via {@link #setParameters(Camera.Parameters)}.
+ */
+ public int getCurrentFocusPosition() {
+ Parameters p = new Parameters();
+ String s = native_getParameters();
+ p.unflatten(s);
+
+ int focus_pos = -1;
+ if (p.getCurrentFocusPosition() != null) {
+ focus_pos = Integer.parseInt(p.getCurrentFocusPosition());
+ }
+ return focus_pos;
+ }
+
+ /* ### QC ADD-ONS: END */
/**
* Returns a copied {@link Parameters}; for shim use only.
*
@@ -2157,6 +2446,10 @@
public static final String WHITE_BALANCE_CLOUDY_DAYLIGHT = "cloudy-daylight";
public static final String WHITE_BALANCE_TWILIGHT = "twilight";
public static final String WHITE_BALANCE_SHADE = "shade";
+ /** @hide
+ * wb manual cct mode.
+ */
+ public static final String WHITE_BALANCE_MANUAL_CCT = "manual-cct";
// Values for color effect settings.
public static final String EFFECT_NONE = "none";
@@ -2204,6 +2497,11 @@
*/
public static final String FLASH_MODE_TORCH = "torch";
+ /** @hide
+ * Scene mode is off.
+ */
+ public static final String SCENE_MODE_ASD = "asd";
+
/**
* Scene mode is off.
*/
@@ -2280,6 +2578,14 @@
* Capture the naturally warm color of scenes lit by candles.
*/
public static final String SCENE_MODE_CANDLELIGHT = "candlelight";
+ /** @hide
+ * SCENE_MODE_BACKLIGHT
+ **/
+ public static final String SCENE_MODE_BACKLIGHT = "backlight";
+ /** @hide
+ * SCENE_MODE_FLOWERS
+ **/
+ public static final String SCENE_MODE_FLOWERS = "flowers";
/**
* Applications are looking for a barcode. Camera driver will be
@@ -2322,6 +2628,13 @@
*/
public static final String FOCUS_MODE_FIXED = "fixed";
+ /** @hide
+ * Normal focus mode. Applications should call
+ * {@link #autoFocus(AutoFocusCallback)} to start the focus in this
+ * mode.
+ */
+ public static final String FOCUS_MODE_NORMAL = "normal";
+
/**
* Extended depth of field (EDOF). Focusing is done digitally and
* continuously. Applications should not call {@link
@@ -2374,6 +2687,11 @@
*/
public static final String FOCUS_MODE_CONTINUOUS_PICTURE = "continuous-picture";
+ /** @hide
+ * manual focus mode
+ */
+ public static final String FOCUS_MODE_MANUAL_POSITION = "manual";
+
// Indices for focus distance array.
/**
* The array index of near focus distance for use with
@@ -2410,11 +2728,15 @@
// Formats for setPreviewFormat and setPictureFormat.
private static final String PIXEL_FORMAT_YUV422SP = "yuv422sp";
private static final String PIXEL_FORMAT_YUV420SP = "yuv420sp";
+ private static final String PIXEL_FORMAT_YUV420SP_ADRENO = "yuv420sp-adreno";
private static final String PIXEL_FORMAT_YUV422I = "yuv422i-yuyv";
private static final String PIXEL_FORMAT_YUV420P = "yuv420p";
private static final String PIXEL_FORMAT_RGB565 = "rgb565";
private static final String PIXEL_FORMAT_JPEG = "jpeg";
private static final String PIXEL_FORMAT_BAYER_RGGB = "bayer-rggb";
+ private static final String PIXEL_FORMAT_RAW = "raw";
+ private static final String PIXEL_FORMAT_YV12 = "yv12";
+ private static final String PIXEL_FORMAT_NV12 = "nv12";
/**
* Order matters: Keys that are {@link #set(String, String) set} later
@@ -3202,8 +3524,11 @@
* parameters.
*/
public void removeGpsData() {
+ remove(KEY_QC_GPS_LATITUDE_REF);
remove(KEY_GPS_LATITUDE);
+ remove(KEY_QC_GPS_LONGITUDE_REF);
remove(KEY_GPS_LONGITUDE);
+ remove(KEY_QC_GPS_ALTITUDE_REF);
remove(KEY_GPS_ALTITUDE);
remove(KEY_GPS_TIMESTAMP);
remove(KEY_GPS_PROCESSING_METHOD);
@@ -4226,5 +4551,1231 @@
if (s1 != null && s1.equals(s2)) return true;
return false;
}
+ /* ### QC ADD-ONS: START */
+
+ /* ### QC ADDED PARAMETER KEYS*/
+ private static final String KEY_QC_HFR_SIZE = "hfr-size";
+ private static final String KEY_QC_PREVIEW_FRAME_RATE_MODE = "preview-frame-rate-mode";
+ private static final String KEY_QC_PREVIEW_FRAME_RATE_AUTO_MODE = "frame-rate-auto";
+ private static final String KEY_QC_PREVIEW_FRAME_RATE_FIXED_MODE = "frame-rate-fixed";
+ private static final String KEY_QC_GPS_LATITUDE_REF = "gps-latitude-ref";
+ private static final String KEY_QC_GPS_LONGITUDE_REF = "gps-longitude-ref";
+ private static final String KEY_QC_GPS_ALTITUDE_REF = "gps-altitude-ref";
+ private static final String KEY_QC_GPS_STATUS = "gps-status";
+ private static final String KEY_QC_EXIF_DATETIME = "exif-datetime";
+ private static final String KEY_QC_TOUCH_AF_AEC = "touch-af-aec";
+ private static final String KEY_QC_TOUCH_INDEX_AEC = "touch-index-aec";
+ private static final String KEY_QC_TOUCH_INDEX_AF = "touch-index-af";
+ private static final String KEY_QC_MANUAL_FOCUS_POSITION = "manual-focus-position";
+ private static final String KEY_QC_MANUAL_FOCUS_POS_TYPE = "manual-focus-pos-type";
+ private static final String KEY_QC_SCENE_DETECT = "scene-detect";
+ private static final String KEY_QC_ISO_MODE = "iso";
+ private static final String KEY_QC_EXPOSURE_TIME = "exposure-time";
+ private static final String KEY_QC_MIN_EXPOSURE_TIME = "min-exposure-time";
+ private static final String KEY_QC_MAX_EXPOSURE_TIME = "max-exposure-time";
+ private static final String KEY_QC_LENSSHADE = "lensshade";
+ private static final String KEY_QC_HISTOGRAM = "histogram";
+ private static final String KEY_QC_SKIN_TONE_ENHANCEMENT = "skinToneEnhancement";
+ private static final String KEY_QC_AUTO_EXPOSURE = "auto-exposure";
+ private static final String KEY_QC_SHARPNESS = "sharpness";
+ private static final String KEY_QC_MAX_SHARPNESS = "max-sharpness";
+ private static final String KEY_QC_CONTRAST = "contrast";
+ private static final String KEY_QC_MAX_CONTRAST = "max-contrast";
+ private static final String KEY_QC_SATURATION = "saturation";
+ private static final String KEY_QC_MAX_SATURATION = "max-saturation";
+ private static final String KEY_QC_DENOISE = "denoise";
+ private static final String KEY_QC_CONTINUOUS_AF = "continuous-af";
+ private static final String KEY_QC_SELECTABLE_ZONE_AF = "selectable-zone-af";
+ private static final String KEY_QC_FACE_DETECTION = "face-detection";
+ private static final String KEY_QC_MEMORY_COLOR_ENHANCEMENT = "mce";
+ private static final String KEY_QC_REDEYE_REDUCTION = "redeye-reduction";
+ private static final String KEY_QC_ZSL = "zsl";
+ private static final String KEY_QC_CAMERA_MODE = "camera-mode";
+ private static final String KEY_QC_VIDEO_HIGH_FRAME_RATE = "video-hfr";
+ private static final String KEY_QC_VIDEO_HDR = "video-hdr";
+ private static final String KEY_QC_POWER_MODE = "power-mode";
+ private static final String KEY_QC_POWER_MODE_SUPPORTED = "power-mode-supported";
+ private static final String KEY_QC_WB_MANUAL_CCT = "wb-manual-cct";
+ private static final String KEY_QC_MIN_WB_CCT = "min-wb-cct";
+ private static final String KEY_QC_MAX_WB_CCT = "max-wb-cct";
+ private static final String KEY_QC_AUTO_HDR_ENABLE = "auto-hdr-enable";
+ private static final String KEY_QC_VIDEO_ROTATION = "video-rotation";
+
+ /** @hide
+ * KEY_QC_AE_BRACKET_HDR
+ **/
+ public static final String KEY_QC_AE_BRACKET_HDR = "ae-bracket-hdr";
+
+ /* ### QC ADDED PARAMETER VALUES*/
+
+ // Values for touch af/aec settings.
+ /** @hide
+ * TOUCH_AF_AEC_OFF
+ **/
+ public static final String TOUCH_AF_AEC_OFF = "touch-off";
+ /** @hide
+ * TOUCH_AF_AEC_ON
+ **/
+ public static final String TOUCH_AF_AEC_ON = "touch-on";
+
+ // Values for auto exposure settings.
+ /** @hide
+ * Auto exposure frame-avg
+ **/
+ public static final String AUTO_EXPOSURE_FRAME_AVG = "frame-average";
+ /** @hide
+ * Auto exposure center weighted
+ **/
+ public static final String AUTO_EXPOSURE_CENTER_WEIGHTED = "center-weighted";
+ /** @hide
+ * Auto exposure spot metering
+ **/
+ public static final String AUTO_EXPOSURE_SPOT_METERING = "spot-metering";
+
+ //Values for ISO settings
+ /** @hide
+ * ISO_AUTO
+ **/
+ public static final String ISO_AUTO = "auto";
+ /** @hide
+ * ISO_HJR
+ **/
+ public static final String ISO_HJR = "ISO_HJR";
+ /** @hide
+ * ISO_100
+ **/
+ public static final String ISO_100 = "ISO100";
+ /** @hide
+ * ISO_200
+ **/
+ public static final String ISO_200 = "ISO200";
+ /** @hide
+ * ISO_400
+ **/
+ public static final String ISO_400 = "ISO400";
+ /** @hide
+ * ISO_800
+ **/
+ public static final String ISO_800 = "ISO800";
+ /** @hide
+ * ISO_1600
+ **/
+ public static final String ISO_1600 = "ISO1600";
+
+ /** @hide
+ * ISO_3200
+ **/
+ public static final String ISO_3200 = "ISO3200";
+
+ //Values for Lens Shading
+ /** @hide
+ * LENSSHADE_ENABLE
+ **/
+ public static final String LENSSHADE_ENABLE = "enable";
+ /** @hide
+ * LENSSHADE_DISABLE
+ **/
+ public static final String LENSSHADE_DISABLE= "disable";
+
+ //Values for Histogram
+ /** @hide
+ * Histogram enable
+ **/
+ public static final String HISTOGRAM_ENABLE = "enable";
+ /** @hide
+ * Histogram disable
+ **/
+ public static final String HISTOGRAM_DISABLE= "disable";
+
+ //Values for Skin Tone Enhancement
+ /** @hide
+ * SKIN_TONE_ENHANCEMENT_ENABLE
+ **/
+ public static final String SKIN_TONE_ENHANCEMENT_ENABLE = "enable";
+ /** @hide
+ * SKIN_TONE_ENHANCEMENT_DISABLE
+ **/
+ public static final String SKIN_TONE_ENHANCEMENT_DISABLE= "disable";
+
+ // Values for MCE settings.
+ /** @hide
+ * MCE_ENaBLE
+ **/
+ public static final String MCE_ENABLE = "enable";
+ /** @hide
+ * MCE_DISABLE
+ **/
+ public static final String MCE_DISABLE = "disable";
+
+ // Values for ZSL settings.
+ /** @hide
+ * ZSL_ON
+ **/
+ public static final String ZSL_ON = "on";
+ /** @hide
+ * ZSL_OFF
+ **/
+ public static final String ZSL_OFF = "off";
+
+ // Values for HDR Bracketing settings.
+
+ /** @hide
+ * AEC bracketing off
+ **/
+ public static final String AE_BRACKET_HDR_OFF = "Off";
+ /** @hide
+ * AEC bracketing hdr
+ **/
+ public static final String AE_BRACKET_HDR = "HDR";
+ /** @hide
+ * AEC bracketing aec-bracket
+ **/
+ public static final String AE_BRACKET = "AE-Bracket";
+
+ // Values for Power mode.
+ /** @hide
+ * LOW_POWER
+ **/
+ public static final String LOW_POWER = "Low_Power";
+ /** @hide
+ * NORMAL_POWER
+ **/
+ public static final String NORMAL_POWER = "Normal_Power";
+
+ // Values for HFR settings.
+ /** @hide
+ * VIDEO_HFR_OFF
+ **/
+ public static final String VIDEO_HFR_OFF = "off";
+ /** @hide
+ * VIDEO_HFR_2X
+ **/
+ public static final String VIDEO_HFR_2X = "60";
+ /** @hide
+ * VIDEO_HFR_3X
+ **/
+ public static final String VIDEO_HFR_3X = "90";
+ /** @hide
+ * VIDEO_HFR_4X
+ **/
+ public static final String VIDEO_HFR_4X = "120";
+
+ // Values for auto scene detection settings.
+ /** @hide
+ * SCENE_DETECT_OFF
+ **/
+ public static final String SCENE_DETECT_OFF = "off";
+ /** @hide
+ * SCENE_DETECT_ON
+ **/
+ public static final String SCENE_DETECT_ON = "on";
+
+ //Values for Continuous AF
+
+ /** @hide
+ * CAF off
+ **/
+ public static final String CONTINUOUS_AF_OFF = "caf-off";
+ /** @hide
+ * CAF on
+ **/
+ public static final String CONTINUOUS_AF_ON = "caf-on";
+ /** @hide
+ * Denoise off
+ **/
+ public static final String DENOISE_OFF = "denoise-off";
+ /** @hide
+ * Denoise on
+ **/
+ public static final String DENOISE_ON = "denoise-on";
+
+ // Values for Redeye Reduction settings.
+ /** @hide
+ * REDEYE_REDUCTION_ENABLE
+ **/
+ public static final String REDEYE_REDUCTION_ENABLE = "enable";
+ /** @hide
+ * REDEYE_REDUCTION_DISABLE
+ **/
+ public static final String REDEYE_REDUCTION_DISABLE = "disable";
+
+ // Values for selectable zone af settings.
+ /** @hide
+ * SELECTABLE_ZONE_AF_AUTO
+ **/
+ public static final String SELECTABLE_ZONE_AF_AUTO = "auto";
+ /** @hide
+ * SELECTABLE_ZONE_AF_SPOTMETERING
+ **/
+ public static final String SELECTABLE_ZONE_AF_SPOTMETERING = "spot-metering";
+ /** @hide
+ * SELECTABLE_ZONE_AF_CENTER_WEIGHTED
+ **/
+ public static final String SELECTABLE_ZONE_AF_CENTER_WEIGHTED = "center-weighted";
+ /** @hide
+ * SELECTABLE_ZONE_AF_FRAME_AVERAGE
+ **/
+ public static final String SELECTABLE_ZONE_AF_FRAME_AVERAGE = "frame-average";
+
+ // Values for Face Detection settings.
+ /** @hide
+ * Face Detection off
+ **/
+ public static final String FACE_DETECTION_OFF = "off";
+ /** @hide
+ * Face Detction on
+ **/
+ public static final String FACE_DETECTION_ON = "on";
+
+ // Values for video rotation settings.
+
+ /** @hide
+ * VIDEO_ROTATION_0
+ **/
+ public static final String VIDEO_ROTATION_0 = "0";
+ /** @hide
+ * VIDEO_ROTATION_90
+ **/
+ public static final String VIDEO_ROTATION_90 = "90";
+ /** @hide
+ * VIDEO_ROTATION_180
+ **/
+ public static final String VIDEO_ROTATION_180 = "180";
+ /** @hide
+ * VIDEO_ROTATION_270
+ **/
+ public static final String VIDEO_ROTATION_270 = "270";
+
+ /* ### QC ADDED PARAMETER APIS*/
+ /** @hide
+ * Gets the supported preview sizes in high frame rate recording mode.
+ *
+ * @return a list of Size object. This method will always return a list
+ * with at least one element.
+ */
+ public List<Size> getSupportedHfrSizes() {
+ String str = get(KEY_QC_HFR_SIZE + SUPPORTED_VALUES_SUFFIX);
+ return splitSize(str);
+ }
+
+ /** @hide
+ * Gets the supported Touch AF/AEC setting.
+ *
+ * @return a List of TOUCH_AF_AEC_XXX string constants. null if TOUCH AF/AEC
+ * setting is not supported.
+ *
+ */
+ public List<String> getSupportedTouchAfAec() {
+ String str = get(KEY_QC_TOUCH_AF_AEC + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /**
+ * Gets the supported Touch AF/AEC setting.
+ *
+ * @return a List of TOUCH_AF_AEC_XXX string constants. null if TOUCH AF/AEC
+ * setting is not supported.
+ *
+ */
+
+ /** @hide
+ * Gets the supported frame rate modes.
+ *
+ * @return a List of FRAME_RATE_XXX_MODE string constant. null if this
+ * setting is not supported.
+ */
+ public List<String> getSupportedPreviewFrameRateModes() {
+ String str = get(KEY_QC_PREVIEW_FRAME_RATE_MODE + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported auto scene detection modes.
+ *
+ * @return a List of SCENE_DETECT_XXX string constant. null if scene detection
+ * setting is not supported.
+ *
+ */
+ public List<String> getSupportedSceneDetectModes() {
+ String str = get(KEY_QC_SCENE_DETECT + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported ISO values.
+ *
+ * @return a List of FLASH_MODE_XXX string constants. null if flash mode
+ * setting is not supported.
+ */
+ public List<String> getSupportedIsoValues() {
+ String str = get(KEY_QC_ISO_MODE + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported Lensshade modes.
+ *
+ * @return a List of LENS_MODE_XXX string constants. null if lens mode
+ * setting is not supported.
+ */
+ public List<String> getSupportedLensShadeModes() {
+ String str = get(KEY_QC_LENSSHADE + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported Histogram modes.
+ *
+ * @return a List of HISTOGRAM_XXX string constants. null if histogram mode
+ * setting is not supported.
+ */
+ public List<String> getSupportedHistogramModes() {
+ String str = get(KEY_QC_HISTOGRAM + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported Skin Tone Enhancement modes.
+ *
+ * @return a List of SKIN_TONE_ENHANCEMENT_XXX string constants. null if skin tone enhancement
+ * setting is not supported.
+ */
+ public List<String> getSupportedSkinToneEnhancementModes() {
+ String str = get(KEY_QC_SKIN_TONE_ENHANCEMENT + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported auto exposure setting.
+ *
+ * @return a List of AUTO_EXPOSURE_XXX string constants. null if auto exposure
+ * setting is not supported.
+ */
+ public List<String> getSupportedAutoexposure() {
+ String str = get(KEY_QC_AUTO_EXPOSURE + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported MCE modes.
+ *
+ * @return a List of MCE_ENABLE/DISABLE string constants. null if MCE mode
+ * setting is not supported.
+ */
+ public List<String> getSupportedMemColorEnhanceModes() {
+ String str = get(KEY_QC_MEMORY_COLOR_ENHANCEMENT + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported ZSL modes.
+ *
+ * @return a List of ZSL_OFF/OFF string constants. null if ZSL mode
+ * setting is not supported.
+ */
+ public List<String> getSupportedZSLModes() {
+ String str = get(KEY_QC_ZSL + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported Video HDR modes.
+ *
+ * @return a List of Video HDR_OFF/OFF string constants. null if
+ * Video HDR mode setting is not supported.
+ */
+ public List<String> getSupportedVideoHDRModes() {
+ String str = get(KEY_QC_VIDEO_HDR + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported HFR modes.
+ *
+ * @return a List of VIDEO_HFR_XXX string constants. null if hfr mode
+ * setting is not supported.
+ */
+ public List<String> getSupportedVideoHighFrameRateModes() {
+ String str = get(KEY_QC_VIDEO_HIGH_FRAME_RATE + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported Continuous AF modes.
+ *
+ * @return a List of CONTINUOUS_AF_XXX string constant. null if continuous AF
+ * setting is not supported.
+ *
+ */
+ public List<String> getSupportedContinuousAfModes() {
+ String str = get(KEY_QC_CONTINUOUS_AF + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported DENOISE modes.
+ *
+ * @return a List of DENOISE_XXX string constant. null if DENOISE
+ * setting is not supported.
+ *
+ */
+ public List<String> getSupportedDenoiseModes() {
+ String str = get(KEY_QC_DENOISE + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported selectable zone af setting.
+ *
+ * @return a List of SELECTABLE_ZONE_AF_XXX string constants. null if selectable zone af
+ * setting is not supported.
+ */
+ public List<String> getSupportedSelectableZoneAf() {
+ String str = get(KEY_QC_SELECTABLE_ZONE_AF + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported face detection modes.
+ *
+ * @return a List of FACE_DETECTION_XXX string constant. null if face detection
+ * setting is not supported.
+ *
+ */
+ public List<String> getSupportedFaceDetectionModes() {
+ String str = get(KEY_QC_FACE_DETECTION + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Gets the supported redeye reduction modes.
+ *
+ * @return a List of REDEYE_REDUCTION_XXX string constant. null if redeye reduction
+ * setting is not supported.
+ *
+ */
+ public List<String> getSupportedRedeyeReductionModes() {
+ String str = get(KEY_QC_REDEYE_REDUCTION + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ /** @hide
+ * Sets GPS altitude reference. This will be stored in JPEG EXIF header.
+ * @param altRef reference GPS altitude in meters.
+ */
+ public void setGpsAltitudeRef(double altRef) {
+ set(KEY_QC_GPS_ALTITUDE_REF, Double.toString(altRef));
+ }
+
+ /** @hide
+ * Sets GPS Status. This will be stored in JPEG EXIF header.
+ *
+ * @param status GPS status (UTC in seconds since January 1,
+ * 1970).
+ */
+ public void setGpsStatus(double status) {
+ set(KEY_QC_GPS_STATUS, Double.toString(status));
+ }
+
+ /** @hide
+ * Sets the touch co-ordinate for Touch AEC.
+ *
+ * @param x the x co-ordinate of the touch event
+ * @param y the y co-ordinate of the touch event
+ *
+ */
+ public void setTouchIndexAec(int x, int y) {
+ String v = Integer.toString(x) + "x" + Integer.toString(y);
+ set(KEY_QC_TOUCH_INDEX_AEC, v);
+ }
+
+ /** @hide
+ * Returns the touch co-ordinates of the touch event.
+ *
+ * @return a Index object with the x and y co-ordinated
+ * for the touch event
+ *
+ */
+ public Coordinate getTouchIndexAec() {
+ String pair = get(KEY_QC_TOUCH_INDEX_AEC);
+ return strToCoordinate(pair);
+ }
+
+ /** @hide
+ * Sets the touch co-ordinate for Touch AF.
+ *
+ * @param x the x co-ordinate of the touch event
+ * @param y the y co-ordinate of the touch event
+ *
+ */
+ public void setTouchIndexAf(int x, int y) {
+ String v = Integer.toString(x) + "x" + Integer.toString(y);
+ set(KEY_QC_TOUCH_INDEX_AF, v);
+ }
+
+ /** @hide
+ * Returns the touch co-ordinates of the touch event.
+ *
+ * @return a Index object with the x and y co-ordinated
+ * for the touch event
+ *
+ */
+ public Coordinate getTouchIndexAf() {
+ String pair = get(KEY_QC_TOUCH_INDEX_AF);
+ return strToCoordinate(pair);
+ }
+ /** @hide
+ * Set Sharpness Level
+ *
+ * @param sharpness level
+ */
+ public void setSharpness(int sharpness){
+ if((sharpness < 0) || (sharpness > getMaxSharpness()) )
+ throw new IllegalArgumentException(
+ "Invalid Sharpness " + sharpness);
+
+ set(KEY_QC_SHARPNESS, String.valueOf(sharpness));
+ }
+
+ /** @hide
+ * Set Contrast Level
+ *
+ * @param contrast level
+ */
+ public void setContrast(int contrast){
+ if((contrast < 0 ) || (contrast > getMaxContrast()))
+ throw new IllegalArgumentException(
+ "Invalid Contrast " + contrast);
+
+ set(KEY_QC_CONTRAST, String.valueOf(contrast));
+ }
+
+ /** @hide
+ * Set Saturation Level
+ *
+ * @param saturation level
+ */
+ public void setSaturation(int saturation){
+ if((saturation < 0 ) || (saturation > getMaxSaturation()))
+ throw new IllegalArgumentException(
+ "Invalid Saturation " + saturation);
+
+ set(KEY_QC_SATURATION, String.valueOf(saturation));
+ }
+
+ /** @hide
+ * @return true if full size video snapshot is supported.
+ */
+ public boolean isPowerModeSupported() {
+ String str = get(KEY_QC_POWER_MODE_SUPPORTED);
+ return TRUE.equals(str);
+ }
+
+ /** @hide
+ * Get Sharpness level
+ *
+ * @return sharpness level
+ */
+ public int getSharpness(){
+ return getInt(KEY_QC_SHARPNESS);
+ }
+
+ /** @hide
+ * Get Max Sharpness Level
+ *
+ * @return max sharpness level
+ */
+ public int getMaxSharpness(){
+ return getInt(KEY_QC_MAX_SHARPNESS);
+ }
+
+ /** @hide
+ * Get Contrast level
+ *
+ * @return contrast level
+ */
+ public int getContrast(){
+ return getInt(KEY_QC_CONTRAST);
+ }
+
+ /** @hide
+ * Get Max Contrast Level
+ *
+ * @return max contrast level
+ */
+ public int getMaxContrast(){
+ return getInt(KEY_QC_MAX_CONTRAST);
+ }
+
+ /** @hide
+ * Get Saturation level
+ *
+ * @return saturation level
+ */
+ public int getSaturation(){
+ return getInt(KEY_QC_SATURATION);
+ }
+
+ /** @hide
+ * Get Max Saturation Level
+ *
+ * @return max contrast level
+ */
+ public int getMaxSaturation(){
+ return getInt(KEY_QC_MAX_SATURATION);
+ }
+
+ /** @hide
+ * Sets GPS latitude reference coordinate. This will be stored in JPEG EXIF
+ * header.
+ * @param latRef GPS latitude reference coordinate.
+ */
+ public void setGpsLatitudeRef(String latRef) {
+ set(KEY_QC_GPS_LATITUDE_REF, latRef);
+ }
+
+ /** @hide
+ * Sets GPS longitude reference coordinate. This will be stored in JPEG EXIF
+ * header.
+ * @param lonRef GPS longitude reference coordinate.
+ */
+ public void setGpsLongitudeRef(String lonRef) {
+ set(KEY_QC_GPS_LONGITUDE_REF, lonRef);
+ }
+
+ /** @hide
+ * Sets system timestamp. This will be stored in JPEG EXIF header.
+ *
+ * @param dateTime current timestamp (UTC in seconds since January 1,
+ * 1970).
+ */
+ public void setExifDateTime(String dateTime) {
+ set(KEY_QC_EXIF_DATETIME, dateTime);
+ }
+
+ /** @hide
+ * Gets the current Touch AF/AEC setting.
+ *
+ * @return one of TOUCH_AF_AEC_XXX string constant. null if Touch AF/AEC
+ * setting is not supported.
+ *
+ */
+ public String getTouchAfAec() {
+ return get(KEY_QC_TOUCH_AF_AEC);
+ }
+
+ /** @hide
+ * Sets the current TOUCH AF/AEC setting.
+ *
+ * @param value TOUCH_AF_AEC_XXX string constants.
+ *
+ */
+ public void setTouchAfAec(String value) {
+ set(KEY_QC_TOUCH_AF_AEC, value);
+ }
+
+ /** @hide
+ * Gets the current redeye reduction setting.
+ *
+ * @return one of REDEYE_REDUCTION_XXX string constant. null if redeye reduction
+ * setting is not supported.
+ *
+ */
+ public String getRedeyeReductionMode() {
+ return get(KEY_QC_REDEYE_REDUCTION);
+ }
+
+ /** @hide
+ * Sets the redeye reduction. Other parameters may be changed after changing
+ * redeye reduction. After setting redeye reduction,
+ * applications should call getParameters to know if some parameters are
+ * changed.
+ *
+ * @param value REDEYE_REDUCTION_XXX string constants.
+ *
+ */
+ public void setRedeyeReductionMode(String value) {
+ set(KEY_QC_REDEYE_REDUCTION, value);
+ }
+
+ /** @hide
+ * Gets the frame rate mode setting.
+ *
+ * @return one of FRAME_RATE_XXX_MODE string constant. null if this
+ * setting is not supported.
+ */
+ public String getPreviewFrameRateMode() {
+ return get(KEY_QC_PREVIEW_FRAME_RATE_MODE);
+ }
+
+ /** @hide
+ * Sets the frame rate mode.
+ *
+ * @param value FRAME_RATE_XXX_MODE string constants.
+ */
+ public void setPreviewFrameRateMode(String value) {
+ set(KEY_QC_PREVIEW_FRAME_RATE_MODE, value);
+ }
+
+ /** @hide
+ * Gets the current auto scene detection setting.
+ *
+ * @return one of SCENE_DETECT_XXX string constant. null if auto scene detection
+ * setting is not supported.
+ *
+ */
+ public String getSceneDetectMode() {
+ return get(KEY_QC_SCENE_DETECT);
+ }
+
+ /** @hide
+ * Sets the auto scene detect. Other parameters may be changed after changing
+ * scene detect. After setting auto scene detection,
+ * applications should call getParameters to know if some parameters are
+ * changed.
+ *
+ * @param value SCENE_DETECT_XXX string constants.
+ *
+ */
+ public void setSceneDetectMode(String value) {
+ set(KEY_QC_SCENE_DETECT, value);
+ }
+
+ /** @hide
+ * Gets the current hdr bracketing mode setting.
+ *
+ * @return current hdr bracketing mode.
+ * @see #KEY_AE_BRACKET_OFF
+ * @see #KEY_AE_BRACKET_HDR
+ * @see #KEY_AE_BRACKET_BRACKATING
+ */
+ public String getAEBracket() {
+ return get(KEY_QC_AE_BRACKET_HDR);
+ }
+
+ /** @hide
+ * Sets the Power mode.
+ *
+ * @param value Power mode.
+ * @see #getPowerMode()
+ */
+ public void setPowerMode(String value) {
+ set(KEY_QC_POWER_MODE, value);
+ }
+
+ /** @hide
+ * Gets the current power mode setting.
+ *
+ * @return current power mode. null if power mode setting is not
+ * supported.
+ * @see #POWER_MODE_LOW
+ * @see #POWER_MODE_NORMAL
+ */
+ public String getPowerMode() {
+ return get(KEY_QC_POWER_MODE);
+ }
+
+ /** @hide
+ * Set HDR-Bracketing Level
+ *
+ * @param value HDR-Bracketing
+ */
+ public void setAEBracket(String value){
+ set(KEY_QC_AE_BRACKET_HDR, value);
+ }
+
+ /** @hide
+ * Gets the current ISO setting.
+ *
+ * @return one of ISO_XXX string constant. null if ISO
+ * setting is not supported.
+ */
+ public String getISOValue() {
+ return get(KEY_QC_ISO_MODE);
+ }
+
+ /** @hide
+ * Sets the ISO.
+ *
+ * @param iso ISO_XXX string constant.
+ */
+ public void setISOValue(String iso) {
+ set(KEY_QC_ISO_MODE, iso);
+ }
+
+ /** @hide
+ * Sets the exposure time.
+ *
+ * @param value exposure time.
+ */
+ public void setExposureTime(int value) {
+ set(KEY_QC_EXPOSURE_TIME, Integer.toString(value));
+ }
+
+ /** @hide
+ * Gets the current exposure time.
+ *
+ * @return exposure time.
+ */
+ public String getExposureTime() {
+ return get(KEY_QC_EXPOSURE_TIME);
+ }
+
+ /** @hide
+ * Gets the min supported exposure time.
+ *
+ * @return min supported exposure time.
+ */
+ public String getMinExposureTime() {
+ return get(KEY_QC_MIN_EXPOSURE_TIME);
+ }
+
+ /** @hide
+ * Gets the max supported exposure time.
+ *
+ * @return max supported exposure time.
+ */
+ public String getMaxExposureTime() {
+ return get(KEY_QC_MAX_EXPOSURE_TIME);
+ }
+
+ /** @hide
+ * Gets the current LensShade Mode.
+ *
+ * @return LensShade Mode
+ */
+ public String getLensShade() {
+ return get(KEY_QC_LENSSHADE);
+ }
+
+ /** @hide
+ * Sets the current LensShade Mode.
+ *
+ * @return LensShade Mode
+ */
+ public void setLensShade(String lensshade) {
+ set(KEY_QC_LENSSHADE, lensshade);
+ }
+
+ /** @hide
+ * Gets the current auto exposure setting.
+ *
+ * @return one of AUTO_EXPOSURE_XXX string constant. null if auto exposure
+ * setting is not supported.
+ */
+ public String getAutoExposure() {
+ return get(KEY_QC_AUTO_EXPOSURE);
+ }
+
+ /** @hide
+ * Sets the current auto exposure setting.
+ *
+ * @param value AUTO_EXPOSURE_XXX string constants.
+ */
+ public void setAutoExposure(String value) {
+ set(KEY_QC_AUTO_EXPOSURE, value);
+ }
+
+ /** @hide
+ * Gets the current MCE Mode.
+ *
+ * @return MCE value
+ */
+ public String getMemColorEnhance() {
+ return get(KEY_QC_MEMORY_COLOR_ENHANCEMENT);
+ }
+
+ /** @hide
+ * Sets the current MCE Mode.
+ *
+ * @return MCE Mode
+ */
+ public void setMemColorEnhance(String mce) {
+ set(KEY_QC_MEMORY_COLOR_ENHANCEMENT, mce);
+ }
+
+ /** @hide
+ * Set white balance manual cct value.
+ *
+ * @param cct user CCT setting.
+ */
+ public void setWBManualCCT(int cct) {
+ set(KEY_QC_WB_MANUAL_CCT, Integer.toString(cct));
+ }
+
+ /** @hide
+ * Gets the WB min supported CCT.
+ *
+ * @return min cct value.
+ */
+ public String getWBMinCCT() {
+ return get(KEY_QC_MIN_WB_CCT);
+ }
+
+ /** @hide
+ * Gets the WB max supported CCT.
+ *
+ * @return max cct value.
+ */
+ public String getMaxWBCCT() {
+ return get(KEY_QC_MAX_WB_CCT);
+ }
+
+ /** @hide
+ * Gets the current WB CCT.
+ *
+ * @return CCT value
+ */
+ public String getWBCurrentCCT() {
+ return get(KEY_QC_WB_MANUAL_CCT);
+ }
+
+ /** @hide
+ * Gets the current ZSL Mode.
+ *
+ * @return ZSL mode value
+ */
+ public String getZSLMode() {
+ return get(KEY_QC_ZSL);
+ }
+
+ /** @hide
+ * Sets the current ZSL Mode. ZSL mode is set as a 0th bit in KEY_CAMERA_MODE.
+ *
+ * @return null
+ */
+ public void setZSLMode(String zsl) {
+ set(KEY_QC_ZSL, zsl);
+ }
+
+ /** @hide
+ * Sets the current Auto HDR Mode.
+ * @ auto_hdr auto hdr string for enable/disable
+ * @return null
+ */
+ public void setAutoHDRMode(String auto_hdr){
+ set(KEY_QC_AUTO_HDR_ENABLE,auto_hdr);
+ }
+
+ /** @hide
+ * Gets the current Camera Mode Flag. Camera mode includes a
+ * flag(byte) which indicates different camera modes.
+ * For now support for ZSL added at bit0
+ *
+ * @return Camera Mode.
+ */
+ public String getCameraMode() {
+ return get(KEY_QC_CAMERA_MODE);
+ }
+
+ /** @hide
+ * Sets the current Camera Mode.
+ *
+ * @return null
+ */
+ public void setCameraMode(int cameraMode) {
+ set(KEY_QC_CAMERA_MODE, cameraMode);
+ }
+
+ private static final int MANUAL_FOCUS_POS_TYPE_INDEX = 0;
+ private static final int MANUAL_FOCUS_POS_TYPE_DAC = 1;
+ /** @hide
+ * Set focus position.
+ *
+ * @param pos user setting of focus position.
+ */
+ public void setFocusPosition(int type, int pos) {
+ set(KEY_QC_MANUAL_FOCUS_POS_TYPE, Integer.toString(type));
+ set(KEY_QC_MANUAL_FOCUS_POSITION, Integer.toString(pos));
+ }
+
+ /** @hide
+ * Gets the current focus position.
+ *
+ * @return current focus position
+ */
+ public String getCurrentFocusPosition() {
+ return get(KEY_QC_MANUAL_FOCUS_POSITION);
+ }
+
+
+ /** @hide
+ * Gets the current HFR Mode.
+ *
+ * @return VIDEO_HFR_XXX string constants
+ */
+ public String getVideoHighFrameRate() {
+ return get(KEY_QC_VIDEO_HIGH_FRAME_RATE);
+ }
+
+ /** @hide
+ * Sets the current HFR Mode.
+ *
+ * @param hfr VIDEO_HFR_XXX string constants
+ */
+ public void setVideoHighFrameRate(String hfr) {
+ set(KEY_QC_VIDEO_HIGH_FRAME_RATE, hfr);
+ }
+
+ /** @hide
+ * Gets the current Video HDR Mode.
+ *
+ * @return Video HDR mode value
+ */
+ public String getVideoHDRMode() {
+ return get(KEY_QC_VIDEO_HDR);
+ }
+
+ /** @hide
+ * Sets the current Video HDR Mode.
+ *
+ * @return null
+ */
+ public void setVideoHDRMode(String videohdr) {
+ set(KEY_QC_VIDEO_HDR, videohdr);
+ }
+
+ /** @hide
+ * Gets the current DENOISE setting.
+ *
+ * @return one of DENOISE_XXX string constant. null if Denoise
+ * setting is not supported.
+ *
+ */
+ public String getDenoise() {
+ return get(KEY_QC_DENOISE);
+ }
+
+ /** @hide
+ * Gets the current Continuous AF setting.
+ *
+ * @return one of CONTINUOUS_AF_XXX string constant. null if continuous AF
+ * setting is not supported.
+ *
+ */
+ public String getContinuousAf() {
+ return get(KEY_QC_CONTINUOUS_AF);
+ }
+
+ /** @hide
+ * Sets the current Denoise mode.
+ * @param value DENOISE_XXX string constants.
+ *
+ */
+
+ public void setDenoise(String value) {
+ set(KEY_QC_DENOISE, value);
+ }
+
+ /** @hide
+ * Sets the current Continuous AF mode.
+ * @param value CONTINUOUS_AF_XXX string constants.
+ *
+ */
+ public void setContinuousAf(String value) {
+ set(KEY_QC_CONTINUOUS_AF, value);
+ }
+
+ /** @hide
+ * Gets the current selectable zone af setting.
+ *
+ * @return one of SELECTABLE_ZONE_AF_XXX string constant. null if selectable zone af
+ * setting is not supported.
+ */
+ public String getSelectableZoneAf() {
+ return get(KEY_QC_SELECTABLE_ZONE_AF);
+ }
+
+ /** @hide
+ * Sets the current selectable zone af setting.
+ *
+ * @param value SELECTABLE_ZONE_AF_XXX string constants.
+ */
+ public void setSelectableZoneAf(String value) {
+ set(KEY_QC_SELECTABLE_ZONE_AF, value);
+ }
+
+ /** @hide
+ * Gets the current face detection setting.
+ *
+ * @return one of FACE_DETECTION_XXX string constant. null if face detection
+ * setting is not supported.
+ *
+ */
+ public String getFaceDetectionMode() {
+ return get(KEY_QC_FACE_DETECTION);
+ }
+
+ /** @hide
+ * Sets the auto scene detect. Other settings like Touch AF/AEC might be
+ * changed after setting face detection.
+ *
+ * @param value FACE_DETECTION_XXX string constants.
+ *
+ */
+ public void setFaceDetectionMode(String value) {
+ set(KEY_QC_FACE_DETECTION, value);
+ }
+
+ /** @hide
+ * Gets the current video rotation setting.
+ *
+ * @return one of VIDEO_QC_ROTATION_XXX string constant. null if video rotation
+ * setting is not supported.
+ */
+ public String getVideoRotation() {
+ return get(KEY_QC_VIDEO_ROTATION);
+ }
+
+ /** @hide
+ * Sets the current video rotation setting.
+ *
+ * @param value VIDEO_QC_ROTATION_XXX string constants.
+ */
+ public void setVideoRotation(String value) {
+ set(KEY_QC_VIDEO_ROTATION, value);
+ }
+ /** @hide
+ * Gets the supported video rotation modes.
+ *
+ * @return a List of VIDEO_QC_ROTATION_XXX string constant. null if this
+ * setting is not supported.
+ */
+ public List<String> getSupportedVideoRotationValues() {
+ String str = get(KEY_QC_VIDEO_ROTATION + SUPPORTED_VALUES_SUFFIX);
+ return split(str);
+ }
+
+ // Splits a comma delimited string to an ArrayList of Coordinate.
+ // Return null if the passing string is null or the Coordinate is 0.
+ private ArrayList<Coordinate> splitCoordinate(String str) {
+ if (str == null) return null;
+ TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(',');
+ splitter.setString(str);
+ ArrayList<Coordinate> coordinateList = new ArrayList<Coordinate>();
+ for (String s : splitter) {
+ Coordinate coordinate = strToCoordinate(s);
+ if (coordinate != null) coordinateList.add(coordinate);
+ }
+ if (coordinateList.size() == 0) return null;
+ return coordinateList;
+ }
+
+ // Parses a string (ex: "500x500") to Coordinate object.
+ // Return null if the passing string is null.
+ private Coordinate strToCoordinate(String str) {
+ if (str == null) return null;
+
+ int pos = str.indexOf('x');
+ if (pos != -1) {
+ String x = str.substring(0, pos);
+ String y = str.substring(pos + 1);
+ return new Coordinate(Integer.parseInt(x),
+ Integer.parseInt(y));
+ }
+ Log.e(TAG, "Invalid Coordinate parameter string=" + str);
+ return null;
+ }
+ /* ### QC ADD-ONS: END */
};
}
diff --git a/core/java/android/hardware/SystemSensorManager.java b/core/java/android/hardware/SystemSensorManager.java
index 259ca03..69f7b84 100644
--- a/core/java/android/hardware/SystemSensorManager.java
+++ b/core/java/android/hardware/SystemSensorManager.java
@@ -130,6 +130,7 @@
@Override
protected boolean registerListenerImpl(SensorEventListener listener, Sensor sensor,
int delayUs, Handler handler, int maxBatchReportLatencyUs, int reservedFlags) {
+ android.util.SeempLog.record_sensor_rate(381, sensor, delayUs);
if (listener == null || sensor == null) {
Log.e(TAG, "sensor or listener is null");
return false;
@@ -171,6 +172,7 @@
/** @hide */
@Override
protected void unregisterListenerImpl(SensorEventListener listener, Sensor sensor) {
+ android.util.SeempLog.record_sensor(382, sensor);
// Trigger Sensors should use the cancelTriggerSensor call.
if (sensor != null && sensor.getReportingMode() == Sensor.REPORTING_MODE_ONE_SHOT) {
return;
diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java
index 145b1d0..d77a46f 100644
--- a/core/java/android/hardware/camera2/CameraManager.java
+++ b/core/java/android/hardware/camera2/CameraManager.java
@@ -19,6 +19,7 @@
import android.annotation.RequiresPermission;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.app.ActivityThread;
import android.content.Context;
import android.hardware.ICameraService;
import android.hardware.ICameraServiceListener;
@@ -34,6 +35,8 @@
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.ServiceSpecificException;
+import android.os.SystemProperties;
+import android.text.TextUtils;
import android.util.Log;
import android.util.ArrayMap;
@@ -689,6 +692,25 @@
try {
numCameras = cameraService.getNumberOfCameras(CAMERA_TYPE_ALL);
+ /* Force to expose only two cameras
+ * if the package name does not falls in this bucket
+ */
+ boolean exposeAuxCamera = false;
+ String packageName = ActivityThread.currentOpPackageName();
+ String packageList = SystemProperties.get("camera.aux.packagelist");
+ if (packageList.length() > 0) {
+ TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(',');
+ splitter.setString(packageList);
+ for (String str : splitter) {
+ if (packageName.equals(str)) {
+ exposeAuxCamera = true;
+ break;
+ }
+ }
+ }
+ if (exposeAuxCamera == false && (numCameras > 2)) {
+ numCameras = 2;
+ }
} catch(ServiceSpecificException e) {
throwAsPublicException(e);
} catch (RemoteException e) {
@@ -897,6 +919,26 @@
throw new IllegalArgumentException("cameraId was null");
}
+ /* Force to expose only two cameras
+ * if the package name does not falls in this bucket
+ */
+ boolean exposeAuxCamera = false;
+ String packageName = ActivityThread.currentOpPackageName();
+ String packageList = SystemProperties.get("camera.aux.packagelist");
+ if (packageList.length() > 0) {
+ TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(',');
+ splitter.setString(packageList);
+ for (String str : splitter) {
+ if (packageName.equals(str)) {
+ exposeAuxCamera = true;
+ break;
+ }
+ }
+ }
+ if (exposeAuxCamera == false && (Integer.parseInt(cameraId) >= 2)) {
+ throw new IllegalArgumentException("invalid cameraId");
+ }
+
ICameraService cameraService = getCameraService();
if (cameraService == null) {
throw new CameraAccessException(CameraAccessException.CAMERA_DISCONNECTED,
@@ -1016,6 +1058,30 @@
}
private void onStatusChangedLocked(int status, String id) {
+ /* Force to ignore the last mono/aux camera status update
+ * if the package name does not falls in this bucket
+ */
+ boolean exposeMonoCamera = false;
+ String packageName = ActivityThread.currentOpPackageName();
+ String packageList = SystemProperties.get("camera.aux.packagelist");
+ if (packageList.length() > 0) {
+ TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(',');
+ splitter.setString(packageList);
+ for (String str : splitter) {
+ if (packageName.equals(str)) {
+ exposeMonoCamera = true;
+ break;
+ }
+ }
+ }
+
+ if (exposeMonoCamera == false) {
+ if (Integer.parseInt(id) >= 2) {
+ Log.w(TAG, "[soar.cts] ignore the status update of camera: " + id);
+ return;
+ }
+ }
+
if (DEBUG) {
Log.v(TAG,
String.format("Camera id %s has status changed to 0x%x", id, status));
@@ -1086,6 +1152,31 @@
String.format("Camera id %s has torch status changed to 0x%x", id, status));
}
+ /* Force to ignore the aux or composite camera torch status update
+ * if the package name does not falls in this bucket
+ */
+ boolean exposeMonoCamera = false;
+ String packageName = ActivityThread.currentOpPackageName();
+ String packageList = SystemProperties.get("camera.aux.packagelist");
+ if (packageList.length() > 0) {
+ TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(',');
+ splitter.setString(packageList);
+ for (String str : splitter) {
+ if (packageName.equals(str)) {
+ exposeMonoCamera = true;
+ break;
+ }
+ }
+ }
+
+ if (exposeMonoCamera == false) {
+ if (Integer.parseInt(id) >= 2) {
+ Log.w(TAG, "ignore the torch status update of camera: " + id);
+ return;
+ }
+ }
+
+
if (!validTorchStatus(status)) {
Log.e(TAG, String.format("Ignoring invalid device %s torch status 0x%x", id,
status));
diff --git a/core/java/android/hardware/camera2/impl/CallbackProxies.java b/core/java/android/hardware/camera2/impl/CallbackProxies.java
index dac2ef8..5d2a62bf 100644
--- a/core/java/android/hardware/camera2/impl/CallbackProxies.java
+++ b/core/java/android/hardware/camera2/impl/CallbackProxies.java
@@ -110,6 +110,13 @@
}
@Override
+ public void onCaptureBufferLost(CameraDevice camera,
+ CaptureRequest request, Surface target, long frameNumber) {
+ mProxy.invoke("onCaptureBufferLost", camera, request, target, frameNumber);
+ }
+
+
+ @Override
public void onCaptureProgressed(CameraDevice camera,
CaptureRequest request, CaptureResult partialResult) {
mProxy.invoke("onCaptureProgressed", camera, request, partialResult);
diff --git a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
index b10c341..56f91df 100644
--- a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java
@@ -170,7 +170,8 @@
} else if (request.isReprocess() && !isReprocessable()) {
throw new IllegalArgumentException("this capture session cannot handle reprocess " +
"requests");
- } else if (request.isReprocess() && request.getReprocessableSessionId() != mId) {
+ } else if (!mDeviceImpl.isPrivilegedApp() &&
+ request.isReprocess() && request.getReprocessableSessionId() != mId) {
throw new IllegalArgumentException("capture request was created for another session");
}
diff --git a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
index ee8a6d7..3947765 100644
--- a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
+++ b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java
@@ -18,6 +18,7 @@
import static android.hardware.camera2.CameraAccessException.CAMERA_IN_USE;
+import android.app.ActivityThread;
import android.graphics.ImageFormat;
import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraCaptureSession;
@@ -41,6 +42,8 @@
import android.os.Looper;
import android.os.RemoteException;
import android.os.ServiceSpecificException;
+import android.os.SystemProperties;
+import android.text.TextUtils;
import android.util.Log;
import android.util.Range;
import android.util.Size;
@@ -116,6 +119,8 @@
private CameraCaptureSessionCore mCurrentSession;
private int mNextSessionId = 0;
+ private boolean mIsPrivilegedApp = false;
+
// Runnables for all state transitions, except error, which needs the
// error code argument
@@ -256,6 +261,7 @@
} else {
mTotalPartialCount = partialCount;
}
+ mIsPrivilegedApp = checkPrivilegedAppList();
}
public CameraDeviceCallbacks getCallbacks() {
@@ -1038,11 +1044,41 @@
}
}
+ private boolean checkPrivilegedAppList() {
+ String packageName = ActivityThread.currentOpPackageName();
+ String packageList = SystemProperties.get("persist.camera.cfa.packagelist");
+
+ if (packageList.length() > 0) {
+ TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(',');
+ splitter.setString(packageList);
+ for (String str : splitter) {
+ if (packageName.equals(str)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ public boolean isPrivilegedApp() {
+ return mIsPrivilegedApp;
+ }
+
private void checkInputConfiguration(InputConfiguration inputConfig) {
if (inputConfig != null) {
StreamConfigurationMap configMap = mCharacteristics.get(
CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
+ /*
+ * don't check input format and size,
+ * if the package name is in the white list
+ */
+ if (isPrivilegedApp()) {
+ Log.w(TAG, "ignore input format/size check for white listed app");
+ return;
+ }
+
int[] inputFormats = configMap.getInputFormats();
boolean validFormat = false;
for (int format : inputFormats) {
diff --git a/core/java/android/hardware/camera2/utils/SurfaceUtils.java b/core/java/android/hardware/camera2/utils/SurfaceUtils.java
index 4b958df..056f2fa 100644
--- a/core/java/android/hardware/camera2/utils/SurfaceUtils.java
+++ b/core/java/android/hardware/camera2/utils/SurfaceUtils.java
@@ -29,6 +29,11 @@
import java.util.Iterator;
import java.util.List;
+import android.app.ActivityThread;
+import android.os.SystemProperties;
+import android.text.TextUtils;
+
+
/**
* Various Surface utilities.
*/
@@ -149,7 +154,13 @@
+ " the size must be 1 or 2");
}
+ if (isPrivilegedApp()) {
+ //skip checks for privileged apps
+ return;
+ }
+
List<Size> highSpeedSizes = null;
+
if (fpsRange == null) {
highSpeedSizes = Arrays.asList(config.getHighSpeedVideoSizes());
} else {
@@ -201,4 +212,20 @@
}
}
+ private static boolean isPrivilegedApp() {
+ String packageName = ActivityThread.currentOpPackageName();
+ String packageList = SystemProperties.get("persist.camera.privapp.list");
+
+ if (packageList.length() > 0) {
+ TextUtils.StringSplitter splitter = new TextUtils.SimpleStringSplitter(',');
+ splitter.setString(packageList);
+ for (String str : splitter) {
+ if (packageName.equals(str)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
}
diff --git a/core/java/android/hardware/usb/UsbManager.java b/core/java/android/hardware/usb/UsbManager.java
old mode 100644
new mode 100755
index 3df57bc..ed09994
--- a/core/java/android/hardware/usb/UsbManager.java
+++ b/core/java/android/hardware/usb/UsbManager.java
@@ -246,6 +246,14 @@
public static final String USB_FUNCTION_ACCESSORY = "accessory";
/**
+ * Name of the charging USB function.
+ * Used in extras for the {@link #ACTION_USB_STATE} broadcast
+ *
+ * {@hide}
+ */
+ public static final String USB_FUNCTION_CHARGING = "charging";
+
+ /**
* Name of extra for {@link #ACTION_USB_PORT_CHANGED}
* containing the {@link UsbPort} object for the port.
*
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index 2b5afa7..5bff631 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -26,6 +26,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
+import android.net.wifi.WifiDevice;
import android.os.Binder;
import android.os.Build.VERSION_CODES;
import android.os.Bundle;
@@ -59,6 +60,7 @@
import java.net.InetAddress;
import java.util.HashMap;
import java.util.concurrent.atomic.AtomicInteger;
+import java.util.List;
/**
* Class that answers queries about the state of network connectivity. It also
@@ -311,6 +313,15 @@
"android.net.conn.TETHER_STATE_CHANGED";
/**
+ * Broadcast intent action indicating that a Station is connected
+ * or disconnected.
+ *
+ * @hide
+ */
+ public static final String TETHER_CONNECT_STATE_CHANGED =
+ "codeaurora.net.conn.TETHER_CONNECT_STATE_CHANGED";
+
+ /**
* @hide
* gives a String[] listing all the interfaces configured for
* tethering and currently available for tethering.
@@ -397,6 +408,13 @@
public static final int TETHERING_BLUETOOTH = 2;
/**
+ * WIGIG tethering type. Use a separate type to prevent
+ * conflicts with TETHERING_WIFI
+ * @hide
+ */
+ public static final int TETHERING_WIGIG = 3;
+
+ /**
* Extra used for communicating with the TetherService. Includes the type of tethering to
* enable if any.
* @hide
@@ -2215,6 +2233,20 @@
}
}
+ /**
+ * Get the list of Stations connected to Hotspot.
+ *
+ * @return a list of {@link WifiDevice} objects.
+ * {@hide}
+ */
+ public List<WifiDevice> getTetherConnectedSta() {
+ try {
+ return mService.getTetherConnectedSta();
+ } catch (RemoteException e) {
+ return null;
+ }
+ }
+
/** {@hide} */
public static final int TETHER_ERROR_NO_ERROR = 0;
/** {@hide} */
diff --git a/core/java/android/net/IConnectivityManager.aidl b/core/java/android/net/IConnectivityManager.aidl
index 4aabda9..a4ec4f5 100644
--- a/core/java/android/net/IConnectivityManager.aidl
+++ b/core/java/android/net/IConnectivityManager.aidl
@@ -26,6 +26,7 @@
import android.net.NetworkRequest;
import android.net.NetworkState;
import android.net.ProxyInfo;
+import android.net.wifi.WifiDevice;
import android.os.IBinder;
import android.os.Messenger;
import android.os.ParcelFileDescriptor;
@@ -36,6 +37,8 @@
import com.android.internal.net.VpnInfo;
import com.android.internal.net.VpnProfile;
+import java.util.List;
+
/**
* Interface that answers queries about, and allows changing, the
* state of network connectivity.
@@ -97,6 +100,8 @@
int setUsbTethering(boolean enable);
+ List<WifiDevice> getTetherConnectedSta();
+
void reportInetCondition(int networkType, int percentage);
void reportNetworkConnectivity(in Network network, boolean hasConnectivity);
diff --git a/core/java/android/net/INetworkManagementEventObserver.aidl b/core/java/android/net/INetworkManagementEventObserver.aidl
index b7af374..5a70ff1 100644
--- a/core/java/android/net/INetworkManagementEventObserver.aidl
+++ b/core/java/android/net/INetworkManagementEventObserver.aidl
@@ -92,6 +92,13 @@
void interfaceClassDataActivityChanged(String label, boolean active, long tsNanos);
/**
+ * Message is received from network interface.
+ *
+ * @param message The message
+ */
+ void interfaceMessageRecevied(String message);
+
+ /**
* Information about available DNS servers has been received.
*
* @param iface The interface on which the information was received.
diff --git a/core/java/android/net/INetworkStatsService.aidl b/core/java/android/net/INetworkStatsService.aidl
index e693009..527c73a 100644
--- a/core/java/android/net/INetworkStatsService.aidl
+++ b/core/java/android/net/INetworkStatsService.aidl
@@ -67,4 +67,6 @@
/** Unregisters a callback on data usage. */
void unregisterUsageRequest(in DataUsageRequest request);
+ /** record video call data usage. */
+ void recordVideoCallData(String iface, int ifaceType, long rxBytes, long txBytes);
}
diff --git a/core/java/android/net/NetworkIdentity.java b/core/java/android/net/NetworkIdentity.java
index d570e66..d3c8c5b 100644
--- a/core/java/android/net/NetworkIdentity.java
+++ b/core/java/android/net/NetworkIdentity.java
@@ -186,7 +186,11 @@
roaming = state.networkInfo.isRoaming();
metered = !state.networkCapabilities.hasCapability(
- NetworkCapabilities.NET_CAPABILITY_NOT_METERED);
+ NetworkCapabilities.NET_CAPABILITY_NOT_METERED)
+ || (context.getResources().getBoolean(
+ com.android.internal.R.bool.config_video_call_datausage_enable)
+ && state.networkCapabilities.hasCapability(
+ NetworkCapabilities.NET_CAPABILITY_IMS));
} else if (type == TYPE_WIFI) {
if (state.networkId != null) {
diff --git a/core/java/android/net/ZeroBalanceHelper.java b/core/java/android/net/ZeroBalanceHelper.java
new file mode 100644
index 0000000..36b18d0
--- /dev/null
+++ b/core/java/android/net/ZeroBalanceHelper.java
@@ -0,0 +1,100 @@
+/*
+ ** Copyright (c) 2015-16, 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.
+ */
+
+package android.net;
+
+import android.app.ActivityThread;
+import android.content.Context;
+import android.content.Intent;
+import android.os.SystemProperties;
+import android.os.UserHandle;
+import android.util.Log;
+
+import com.android.internal.R;
+
+
+/** @hide */
+public final class ZeroBalanceHelper {
+
+ public static final String BACKGROUND_DATA_PROPERTY = "sys.background.data.disable";
+ public static final String BACKGROUND_DATA_BROADCAST = "org.codeaurora.background.data";
+ public static final String TAG = "ZeroBalance";
+
+ private static int sRedirectCount = 0;
+ private static int sRedirectMaxCount = 3;
+
+ private Context mContext = null;
+
+ public ZeroBalanceHelper() {
+ mContext = ActivityThread.currentApplication();
+ }
+
+ public void setBgDataProperty(String enabled) {
+ Intent intent = new Intent();
+ intent.setAction(BACKGROUND_DATA_BROADCAST);
+ intent.putExtra("enabled", enabled);
+ mContext.sendBroadcast(intent);
+ }
+
+ public String getBgDataProperty() {
+ String isBgDataPropertySet = SystemProperties.get(BACKGROUND_DATA_PROPERTY, "false");
+ if(Boolean.valueOf(isBgDataPropertySet)) {
+ sRedirectCount = 0;
+ }
+ return isBgDataPropertySet;
+ }
+
+ private String getConfiguredRedirectURL() {
+ String redirectURL = mContext.getResources().getString(
+ com.android.internal.R.string.operator_config_url);
+ Log.d(TAG, "Returning the configured redirect URL : "
+ + redirectURL);
+ return redirectURL;
+ }
+
+ public synchronized void setHttpRedirectCount(String url) {
+ String redirectUrl = getConfiguredRedirectURL();
+ if (redirectUrl != null && url.contains(redirectUrl)) {
+ sRedirectCount++;
+ Log.d(TAG, "http:sRedirectCount="+sRedirectCount);
+ if (sRedirectCount >= sRedirectMaxCount) {
+ Log.d(TAG,"http:Background Data will be disabled" );
+ setBgDataProperty("true");
+ sRedirectCount = 0;
+ }
+ } else {
+ Log.d(TAG,"http: resetting the counter ");
+ sRedirectCount = 0;
+ }
+ }
+
+ public boolean getFeatureConfigValue() {
+ return mContext.getResources().getBoolean(R.bool.config_zero_balance_operator);
+ }
+}
diff --git a/core/java/android/nfc/INfcAdapter.aidl b/core/java/android/nfc/INfcAdapter.aidl
index f991efe..8ea509c 100644
--- a/core/java/android/nfc/INfcAdapter.aidl
+++ b/core/java/android/nfc/INfcAdapter.aidl
@@ -1,4 +1,7 @@
/*
+ * Copyright (c) 2015, 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");
@@ -30,6 +33,7 @@
import android.nfc.INfcUnlockHandler;
import android.nfc.ITagRemovedCallback;
import android.os.Bundle;
+import android.os.IBinder;
/**
* @hide
@@ -40,6 +44,7 @@
INfcCardEmulation getNfcCardEmulationInterface();
INfcFCardEmulation getNfcFCardEmulationInterface();
INfcAdapterExtras getNfcAdapterExtrasInterface(in String pkg);
+ IBinder getNfcAdapterVendorInterface(in String vendor);
int getState();
boolean disable(boolean saveState);
diff --git a/core/java/android/nfc/cardemulation/AidGroup.java b/core/java/android/nfc/cardemulation/AidGroup.java
index 78a9401..ce67061 100644
--- a/core/java/android/nfc/cardemulation/AidGroup.java
+++ b/core/java/android/nfc/cardemulation/AidGroup.java
@@ -1,4 +1,7 @@
/*
+ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+ *
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -37,7 +40,7 @@
*
* @hide
*/
-public final class AidGroup implements Parcelable {
+public class AidGroup implements Parcelable {
/**
* The maximum number of AIDs that can be present in any one group.
*/
@@ -45,9 +48,9 @@
static final String TAG = "AidGroup";
- final List<String> aids;
- final String category;
- final String description;
+ protected List<String> aids;
+ protected String category;
+ protected String description;
/**
* Creates a new AidGroup object.
diff --git a/core/java/android/nfc/cardemulation/ApduServiceInfo.java b/core/java/android/nfc/cardemulation/ApduServiceInfo.java
index 7678678..fe3b594 100644
--- a/core/java/android/nfc/cardemulation/ApduServiceInfo.java
+++ b/core/java/android/nfc/cardemulation/ApduServiceInfo.java
@@ -1,4 +1,7 @@
/*
+ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+ *
* Copyright (C) 2013 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -48,53 +51,53 @@
/**
* @hide
*/
-public final class ApduServiceInfo implements Parcelable {
+public class ApduServiceInfo implements Parcelable {
static final String TAG = "ApduServiceInfo";
/**
* The service that implements this
*/
- final ResolveInfo mService;
+ protected ResolveInfo mService;
/**
* Description of the service
*/
- final String mDescription;
+ protected String mDescription;
/**
* Whether this service represents AIDs running on the host CPU
*/
- final boolean mOnHost;
+ protected boolean mOnHost;
/**
* Mapping from category to static AID group
*/
- final HashMap<String, AidGroup> mStaticAidGroups;
+ protected HashMap<String, AidGroup> mStaticAidGroups;
/**
* Mapping from category to dynamic AID group
*/
- final HashMap<String, AidGroup> mDynamicAidGroups;
+ protected HashMap<String, AidGroup> mDynamicAidGroups;
/**
* Whether this service should only be started when the device is unlocked.
*/
- final boolean mRequiresDeviceUnlock;
+ protected boolean mRequiresDeviceUnlock;
/**
* The id of the service banner specified in XML.
*/
- final int mBannerResourceId;
+ protected int mBannerResourceId;
/**
* The uid of the package the service belongs to
*/
- final int mUid;
+ protected int mUid;
/**
* Settings Activity for this service
*/
- final String mSettingsActivityName;
+ protected String mSettingsActivityName;
/**
* @hide
diff --git a/core/java/android/nfc/tech/MifareClassic.java b/core/java/android/nfc/tech/MifareClassic.java
index 8c92288..302c02d 100644
--- a/core/java/android/nfc/tech/MifareClassic.java
+++ b/core/java/android/nfc/tech/MifareClassic.java
@@ -1,4 +1,6 @@
/*
+ * Copyright (C) 2015 NXP Semiconductors
+ * The original Work has been changed by NXP Semiconductors.
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -173,6 +175,10 @@
mType = TYPE_CLASSIC;
mSize = SIZE_4K;
break;
+ case 0x19:
+ mType = TYPE_CLASSIC;
+ mSize = SIZE_2K;
+ break;
case 0x28:
mType = TYPE_CLASSIC;
mSize = SIZE_1K;
diff --git a/core/java/android/nfc/tech/NfcA.java b/core/java/android/nfc/tech/NfcA.java
index 88730f9..b7fa455 100644
--- a/core/java/android/nfc/tech/NfcA.java
+++ b/core/java/android/nfc/tech/NfcA.java
@@ -1,4 +1,6 @@
/*
+ * Copyright (C) 2015 NXP Semiconductors
+ * The original Work has been changed by NXP Semiconductors.
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -66,8 +68,15 @@
/** @hide */
public NfcA(Tag tag) throws RemoteException {
super(tag, TagTechnology.NFC_A);
- Bundle extras = tag.getTechExtras(TagTechnology.NFC_A);
- mSak = extras.getShort(EXTRA_SAK);
+ Bundle extras;
+ mSak = 0;
+ if(tag.hasTech(TagTechnology.MIFARE_CLASSIC))
+ {
+ extras = tag.getTechExtras(TagTechnology.MIFARE_CLASSIC);
+ mSak = extras.getShort(EXTRA_SAK);
+ }
+ extras = tag.getTechExtras(TagTechnology.NFC_A);
+ mSak |= extras.getShort(EXTRA_SAK);
mAtqa = extras.getByteArray(EXTRA_ATQA);
}
diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java
index 0bb05b5..00750de 100644
--- a/core/java/android/os/BatteryStats.java
+++ b/core/java/android/os/BatteryStats.java
@@ -3107,8 +3107,8 @@
for (Map.Entry<String, ? extends Timer> ent : kernelWakelocks.entrySet()) {
sb.setLength(0);
printWakeLockCheckin(sb, ent.getValue(), rawRealtime, null, which, "");
- dumpLine(pw, 0 /* uid */, category, KERNEL_WAKELOCK_DATA, ent.getKey(),
- sb.toString());
+ dumpLine(pw, 0 /* uid */, category, KERNEL_WAKELOCK_DATA,
+ "\"" + ent.getKey() + "\"", sb.toString());
}
}
final Map<String, ? extends Timer> wakeupReasons = getWakeupReasonStats();
@@ -3286,7 +3286,7 @@
final long totalTime = (timer.getTotalTimeLocked(rawRealtime, which) + 500) / 1000;
final int count = timer.getCountLocked(which);
if (totalTime != 0) {
- dumpLine(pw, uid, category, SYNC_DATA, syncs.keyAt(isy), totalTime, count);
+ dumpLine(pw, uid, category, SYNC_DATA, "\"" + syncs.keyAt(isy) + "\"", totalTime, count);
}
}
@@ -3297,7 +3297,7 @@
final long totalTime = (timer.getTotalTimeLocked(rawRealtime, which) + 500) / 1000;
final int count = timer.getCountLocked(which);
if (totalTime != 0) {
- dumpLine(pw, uid, category, JOB_DATA, jobs.keyAt(ij), totalTime, count);
+ dumpLine(pw, uid, category, JOB_DATA, "\"" + jobs.keyAt(ij) + "\"", totalTime, count);
}
}
@@ -3366,7 +3366,7 @@
if (userMillis != 0 || systemMillis != 0 || foregroundMillis != 0
|| starts != 0 || numAnrs != 0 || numCrashes != 0) {
- dumpLine(pw, uid, category, PROCESS_DATA, processStats.keyAt(ipr), userMillis,
+ dumpLine(pw, uid, category, PROCESS_DATA, "\"" + processStats.keyAt(ipr) + "\"", userMillis,
systemMillis, foregroundMillis, starts, numAnrs, numCrashes);
}
}
diff --git a/core/java/android/os/IDeviceIdleController.aidl b/core/java/android/os/IDeviceIdleController.aidl
index cc2af21..9cd7dfa 100644
--- a/core/java/android/os/IDeviceIdleController.aidl
+++ b/core/java/android/os/IDeviceIdleController.aidl
@@ -40,4 +40,6 @@
void exitIdle(String reason);
boolean registerMaintenanceActivityListener(IMaintenanceActivityListener listener);
void unregisterMaintenanceActivityListener(IMaintenanceActivityListener listener);
+ int getIdleStateDetailed();
+ int getLightIdleStateDetailed();
}
diff --git a/core/java/android/os/INetworkManagementService.aidl b/core/java/android/os/INetworkManagementService.aidl
index 0b548d5..b6d3655 100644
--- a/core/java/android/os/INetworkManagementService.aidl
+++ b/core/java/android/os/INetworkManagementService.aidl
@@ -234,11 +234,21 @@
void startAccessPoint(in WifiConfiguration wifiConfig, String iface);
/**
+ * Start Wigig Access Point
+ */
+ void startWigigAccessPoint();
+
+ /**
* Stop Wifi Access Point
*/
void stopAccessPoint(String iface);
/**
+ * Stop Wigig Access Point
+ */
+ void stopWigigAccessPoint();
+
+ /**
* Set Access Point config
*/
void setAccessPoint(in WifiConfiguration wifiConfig, String iface);
@@ -445,4 +455,13 @@
int removeRoutesFromLocalNetwork(in List<RouteInfo> routes);
void setAllowOnlyVpnForUids(boolean enable, in UidRange[] uidRanges);
+ /**
+ * Create SoftAp Interface
+ */
+ void createSoftApInterface(String wlanIface);
+
+ /**
+ * Delete SoftAp Interface
+ */
+ void deleteSoftApInterface(String wlanIface);
}
diff --git a/core/java/android/os/IPowerManager.aidl b/core/java/android/os/IPowerManager.aidl
index 1d464c0..646f665 100644
--- a/core/java/android/os/IPowerManager.aidl
+++ b/core/java/android/os/IPowerManager.aidl
@@ -65,4 +65,6 @@
// sets the attention light (used by phone app only)
void setAttentionLight(boolean on, int color);
+ // update the uids being synchronized by network socket request manager
+ void updateBlockedUids(int uid, boolean isBlocked);
}
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index 85b010a..cad5e9f 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2012 The Android Open Source Project
+ * 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.
@@ -695,6 +696,18 @@
public static final String EXTRA_USER_ACCOUNT_OPTIONS
= "android.os.extra.USER_ACCOUNT_OPTIONS";
+ /**
+ * Specifies if the user is not allowed to use SU commands.
+ * The default value is <code>false</code>.
+ *
+ * <p/>Key for user restrictions.
+ * <p/>Type: Boolean
+ * @see #setUserRestrictions(Bundle)
+ * @see #getUserRestrictions()
+ * @hide
+ */
+ public static final String DISALLOW_SU = "no_su";
+
/** @hide */
public static final int PIN_VERIFICATION_FAILED_INCORRECT = -3;
/** @hide */
diff --git a/core/java/android/os/storage/IMountService.java b/core/java/android/os/storage/IMountService.java
index b9bcd1c..9f4b05c 100644
--- a/core/java/android/os/storage/IMountService.java
+++ b/core/java/android/os/storage/IMountService.java
@@ -647,6 +647,24 @@
return _result;
}
+ public int encryptWipeStorage(int type, String password) throws RemoteException {
+ Parcel _data = Parcel.obtain();
+ Parcel _reply = Parcel.obtain();
+ int _result;
+ try {
+ _data.writeInterfaceToken(DESCRIPTOR);
+ _data.writeInt(type);
+ _data.writeString(password);
+ mRemote.transact(Stub.TRANSACTION_encryptWipeStorage, _data, _reply, 0);
+ _reply.readException();
+ _result = _reply.readInt();
+ } finally {
+ _reply.recycle();
+ _data.recycle();
+ }
+ return _result;
+ }
+
public int changeEncryptionPassword(int type, String password) throws RemoteException {
Parcel _data = Parcel.obtain();
Parcel _reply = Parcel.obtain();
@@ -1507,6 +1525,8 @@
static final int TRANSACTION_fixateNewestUserKeyAuth = IBinder.FIRST_CALL_TRANSACTION + 71;
+ static final int TRANSACTION_encryptWipeStorage = IBinder.FIRST_CALL_TRANSACTION + 72;
+
/**
* Cast an IBinder object into an IMountService interface, generating a
* proxy if needed.
@@ -1809,6 +1829,15 @@
reply.writeInt(result);
return true;
}
+ case TRANSACTION_encryptWipeStorage: {
+ data.enforceInterface(DESCRIPTOR);
+ int type = data.readInt();
+ String password = data.readString();
+ int result = encryptWipeStorage(type, password);
+ reply.writeNoException();
+ reply.writeInt(result);
+ return true;
+ }
case TRANSACTION_changeEncryptionPassword: {
data.enforceInterface(DESCRIPTOR);
int type = data.readInt();
@@ -2320,7 +2349,8 @@
* Returns whether or not the external storage is emulated.
*/
public boolean isExternalStorageEmulated() throws RemoteException;
-
+ /** The volume has been encrypted succesfully and MDTP state is 'activated'. */
+ static final int ENCRYPTION_STATE_OK_MDTP_ACTIVATED = 2;
/** The volume is not encrypted. */
static final int ENCRYPTION_STATE_NONE = 1;
/** The volume has been encrypted succesfully. */
@@ -2333,6 +2363,8 @@
static final int ENCRYPTION_STATE_ERROR_INCONSISTENT = -3;
/** Underlying data is corrupt */
static final int ENCRYPTION_STATE_ERROR_CORRUPT = -4;
+ /** The volume is in a bad state and MDTP state is 'activated'.*/
+ static final int ENCRYPTION_STATE_ERROR_MDTP_ACTIVATED = -5;
/**
* Determines the encryption state of the volume.
@@ -2356,6 +2388,11 @@
public int encryptStorage(int type, String password) throws RemoteException;
/**
+ * Encrypts and wipes storage.
+ */
+ public int encryptWipeStorage(int type, String password) throws RemoteException;
+
+ /**
* Changes the encryption password.
*/
public int changeEncryptionPassword(int type, String password)
diff --git a/core/java/android/provider/Browser.java b/core/java/android/provider/Browser.java
index 7d05522..299a95c 100644
--- a/core/java/android/provider/Browser.java
+++ b/core/java/android/provider/Browser.java
@@ -244,6 +244,7 @@
*/
public static final Cursor getAllBookmarks(ContentResolver cr) throws
IllegalStateException {
+ android.util.SeempLog.record(32);
return new MatrixCursor(new String[]{Bookmarks.URL}, 0);
}
@@ -256,6 +257,7 @@
*/
public static final Cursor getAllVisitedUrls(ContentResolver cr) throws
IllegalStateException {
+ android.util.SeempLog.record(33);
return new MatrixCursor(new String[]{Combined.URL}, 0);
}
@@ -264,6 +266,7 @@
}
private static final Cursor getVisitedLike(ContentResolver cr, String url) {
+ android.util.SeempLog.record(34);
boolean secure = false;
String compareString = url;
if (compareString.startsWith("http://")) {
@@ -324,6 +327,7 @@
*/
@Deprecated
public static final String[] getVisitedHistory(ContentResolver cr) {
+ android.util.SeempLog.record(35);
return new String[0];
}
@@ -359,6 +363,7 @@
* @removed
*/
public static final void clearHistory(ContentResolver cr) {
+ android.util.SeempLog.record(37);
}
@@ -420,6 +425,7 @@
*/
public static final void requestAllIcons(ContentResolver cr, String where,
WebIconDatabase.IconListener listener) {
+ android.util.SeempLog.record(36);
// Do nothing: this is no longer used.
}
diff --git a/core/java/android/provider/CalendarContract.java b/core/java/android/provider/CalendarContract.java
index aa22041..2ede026 100644
--- a/core/java/android/provider/CalendarContract.java
+++ b/core/java/android/provider/CalendarContract.java
@@ -871,6 +871,7 @@
* @return A Cursor containing all attendees for the event
*/
public static final Cursor query(ContentResolver cr, long eventId, String[] projection) {
+ android.util.SeempLog.record(54);
String[] attArgs = {Long.toString(eventId)};
return cr.query(CONTENT_URI, projection, ATTENDEES_WHERE, attArgs /* selection args */,
null /* sort order */);
@@ -1750,6 +1751,7 @@
*/
public static final Cursor query(ContentResolver cr, String[] projection,
long begin, long end) {
+ android.util.SeempLog.record(54);
Uri.Builder builder = CONTENT_URI.buildUpon();
ContentUris.appendId(builder, begin);
ContentUris.appendId(builder, end);
@@ -1779,6 +1781,7 @@
*/
public static final Cursor query(ContentResolver cr, String[] projection,
long begin, long end, String searchQuery) {
+ android.util.SeempLog.record(54);
Uri.Builder builder = CONTENT_SEARCH_URI.buildUpon();
ContentUris.appendId(builder, begin);
ContentUris.appendId(builder, end);
@@ -2029,6 +2032,7 @@
*/
public static final Cursor query(ContentResolver cr, int startDay, int numDays,
String[] projection) {
+ android.util.SeempLog.record(54);
if (numDays < 1) {
return null;
}
@@ -2112,6 +2116,7 @@
* @return A Cursor containing all reminders for the event
*/
public static final Cursor query(ContentResolver cr, long eventId, String[] projection) {
+ android.util.SeempLog.record(54);
String[] remArgs = {Long.toString(eventId)};
return cr.query(CONTENT_URI, projection, REMINDERS_WHERE, remArgs /*selection args*/,
null /* sort order */);
@@ -2262,6 +2267,7 @@
*/
public static final Uri insert(ContentResolver cr, long eventId,
long begin, long end, long alarmTime, int minutes) {
+ android.util.SeempLog.record(51);
ContentValues values = new ContentValues();
values.put(CalendarAlerts.EVENT_ID, eventId);
values.put(CalendarAlerts.BEGIN, begin);
@@ -2289,6 +2295,7 @@
* @hide
*/
public static final long findNextAlarmTime(ContentResolver cr, long millis) {
+ android.util.SeempLog.record(53);
String selection = ALARM_TIME + ">=" + millis;
// TODO: construct an explicit SQL query so that we can add
// "LIMIT 1" to the end and get just one result.
@@ -2412,6 +2419,7 @@
*/
public static final boolean alarmExists(ContentResolver cr, long eventId,
long begin, long alarmTime) {
+ android.util.SeempLog.record(52);
// TODO: construct an explicit SQL query so that we can add
// "LIMIT 1" to the end and get just one result.
String[] projection = new String[] { ALARM_TIME };
diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java
index c7c6ceb..b5290bd 100644
--- a/core/java/android/provider/CallLog.java
+++ b/core/java/android/provider/CallLog.java
@@ -203,6 +203,36 @@
* device other than the current one.
*/
public static final int ANSWERED_EXTERNALLY_TYPE = 7;
+ /**
+ * Call log type for incoming IMS calls.
+ * @hide
+ */
+ public static final int INCOMING_IMS_TYPE = 1000;
+ /**
+ * Call log type for outgoing IMS calls.
+ * @hide
+ */
+ public static final int OUTGOING_IMS_TYPE = 1001;
+ /**
+ * Call log type for missed IMS calls.
+ * @hide
+ */
+ public static final int MISSED_IMS_TYPE = 1002;
+ /**
+ * Call log type for incoming WiFi calls.
+ * @hide
+ */
+ public static final int INCOMING_WIFI_TYPE = 1003;
+ /**
+ * Call log type for outgoing WiFi calls.
+ * @hide
+ */
+ public static final int OUTGOING_WIFI_TYPE = 1004;
+ /**
+ * Call log type for missed WiFi calls.
+ * @hide
+ */
+ public static final int MISSED_WIFI_TYPE = 1005;
/**
* Bit-mask describing features of the call (e.g. video).
@@ -662,7 +692,8 @@
values.put(NEW, Integer.valueOf(1));
values.put(ADD_FOR_ALL_USERS, addForAllUsers ? 1 : 0);
- if (callType == MISSED_TYPE) {
+ if (callType == MISSED_TYPE || callType == MISSED_IMS_TYPE
+ || callType == MISSED_WIFI_TYPE) {
values.put(IS_READ, Integer.valueOf(is_read ? 1 : 0));
}
@@ -822,7 +853,8 @@
c = resolver.query(
CONTENT_URI,
new String[] {NUMBER},
- TYPE + " = " + OUTGOING_TYPE,
+ TYPE + " = " + OUTGOING_TYPE + " OR " + TYPE + " = " + OUTGOING_IMS_TYPE +
+ " OR " + TYPE + " = " + OUTGOING_WIFI_TYPE,
null,
DEFAULT_SORT_ORDER + " LIMIT 1");
if (c == null || !c.moveToFirst()) {
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index c495e6c..e5ba321 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -1592,6 +1592,7 @@
* {@link #CONTENT_LOOKUP_URI} to attempt refreshing.
*/
public static Uri getLookupUri(ContentResolver resolver, Uri contactUri) {
+ android.util.SeempLog.record(86);
final Cursor c = resolver.query(contactUri, new String[] {
Contacts.LOOKUP_KEY, Contacts._ID
}, null, null, null);
@@ -1619,6 +1620,7 @@
* provided parameters.
*/
public static Uri getLookupUri(long contactId, String lookupKey) {
+ android.util.SeempLog.record(86);
if (TextUtils.isEmpty(lookupKey)) {
return null;
}
@@ -1632,6 +1634,7 @@
* Returns null if the contact cannot be found.
*/
public static Uri lookupContact(ContentResolver resolver, Uri lookupUri) {
+ android.util.SeempLog.record(87);
if (lookupUri == null) {
return null;
}
@@ -2102,6 +2105,7 @@
*/
public static InputStream openContactPhotoInputStream(ContentResolver cr, Uri contactUri,
boolean preferHighres) {
+ android.util.SeempLog.record(88);
if (preferHighres) {
final Uri displayPhotoUri = Uri.withAppendedPath(contactUri,
Contacts.Photo.DISPLAY_PHOTO);
@@ -2150,6 +2154,7 @@
* of the thumbnail the high-res picture is preferred
*/
public static InputStream openContactPhotoInputStream(ContentResolver cr, Uri contactUri) {
+ android.util.SeempLog.record(88);
return openContactPhotoInputStream(cr, contactUri, false);
}
}
@@ -2847,6 +2852,7 @@
* entry of the given {@link RawContacts} entry.
*/
public static Uri getContactLookupUri(ContentResolver resolver, Uri rawContactUri) {
+ android.util.SeempLog.record(89);
// TODO: use a lighter query by joining rawcontacts with contacts in provider
final Uri dataUri = Uri.withAppendedPath(rawContactUri, Data.CONTENT_DIRECTORY);
final Cursor cursor = resolver.query(dataUri, new String[] {
@@ -4793,6 +4799,7 @@
* </p>
*/
public static Uri getContactLookupUri(ContentResolver resolver, Uri dataUri) {
+ android.util.SeempLog.record(89);
final Cursor cursor = resolver.query(dataUri, new String[] {
RawContacts.CONTACT_ID, Contacts.LOOKUP_KEY
}, null, null, null);
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
old mode 100755
new mode 100644
index a8209af6..4f35a883
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1925,6 +1925,7 @@
/** @hide */
public static String getStringForUser(ContentResolver resolver, String name,
int userHandle) {
+ android.util.SeempLog.record(android.util.SeempLog.getSeempGetApiIdFromValue(name));
if (MOVED_TO_SECURE.contains(name)) {
Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
+ " to android.provider.Settings.Secure, returning read-only value.");
@@ -1952,6 +1953,7 @@
/** @hide */
public static boolean putStringForUser(ContentResolver resolver, String name, String value,
int userHandle) {
+ android.util.SeempLog.record(android.util.SeempLog.getSeempPutApiIdFromValue(name));
if (MOVED_TO_SECURE.contains(name)) {
Log.w(TAG, "Setting " + name + " has moved from android.provider.Settings.System"
+ " to android.provider.Settings.Secure, value is unchanged.");
@@ -4189,6 +4191,8 @@
MOVED_TO_GLOBAL.add(Settings.Global.WIFI_ON);
MOVED_TO_GLOBAL.add(Settings.Global.WIFI_P2P_DEVICE_NAME);
MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SAVED_STATE);
+ MOVED_TO_GLOBAL.add(Settings.Global.WIFI_HOTSPOT2_ENABLED);
+ MOVED_TO_GLOBAL.add(Settings.Global.WIFI_HOTSPOT2_REL1_ENABLED);
MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS);
MOVED_TO_GLOBAL.add(Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED);
MOVED_TO_GLOBAL.add(Settings.Global.WIFI_VERBOSE_LOGGING_ENABLED);
@@ -4237,6 +4241,7 @@
MOVED_TO_GLOBAL.add(Settings.Global.DEFAULT_DNS_SERVER);
MOVED_TO_GLOBAL.add(Settings.Global.PREFERRED_NETWORK_MODE);
MOVED_TO_GLOBAL.add(Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY);
+ MOVED_TO_GLOBAL.add(Settings.Global.WIFI_AUTO_CONNECT_TYPE);
}
/** @hide */
@@ -4840,6 +4845,12 @@
* Best-effort location computation allowed.
*/
public static final int LOCATION_MODE_HIGH_ACCURACY = 3;
+ /**
+ * Setting to configure Wifi disconnect delay duration in seconds.
+ * @hide
+ **/
+ public static final String WIFI_DISCONNECT_DELAY_DURATION =
+ "wifi_disconnect_delay_duration";
/**
* A flag containing settings used for biometric weak
@@ -6484,6 +6495,7 @@
ENHANCED_VOICE_PRIVACY_ENABLED,
TTY_MODE_ENABLED,
INCALL_POWER_BUTTON_BEHAVIOR,
+ WIFI_DISCONNECT_DELAY_DURATION,
NIGHT_DISPLAY_CUSTOM_START_TIME,
NIGHT_DISPLAY_CUSTOM_END_TIME,
NIGHT_DISPLAY_AUTO_MODE,
@@ -6737,6 +6749,12 @@
public static final String AIRPLANE_MODE_ON = "airplane_mode_on";
/**
+ * Whether VoLTE Preferred is on
+ * @hide
+ */
+ public static final String VOLTE_PREFERRED_ON = "volte_preferred_on";
+
+ /**
* Whether Theater Mode is on.
* {@hide}
*/
@@ -7600,6 +7618,7 @@
*/
public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
"wifi_networks_available_notification_on";
+
/**
* {@hide}
*/
@@ -7679,6 +7698,22 @@
public static final String WIFI_SAVED_STATE = "wifi_saved_state";
/**
+ * Used to save the hotspot2 on/off state.
+ * This state will be used to open/close passpoint functions
+ *
+ * @hide
+ */
+ public static final String WIFI_HOTSPOT2_ENABLED = "wifi_hotspot2_enabled";
+
+ /**
+ * Used to save the hotspot2 on/off state for Hotspot 2 rel1.
+ * This state will be used to open/close passpoint functions for Hotspot2 rel1
+ *
+ * @hide
+ */
+ public static final String WIFI_HOTSPOT2_REL1_ENABLED = "wifi_hotspot2_rel1_enabled";
+
+ /**
* The interval in milliseconds to scan as used by the wifi supplicant
* @hide
*/
@@ -7728,6 +7763,14 @@
"wifi_suspend_optimizations_enabled";
/**
+ * Setting to turn on auto connect . Enabled by default and
+ * needs to be set to 1 to disable it.
+ * @hide
+ */
+ public static final String WIFI_AUTO_CONNECT_TYPE =
+ "wifi_auto_connect_type";
+
+ /**
* Setting to enable verbose logging in Wi-Fi; disabled by default, and setting to 1
* will enable it. In the future, additional values may be supported.
* @hide
diff --git a/core/java/android/security/keymaster/KeymasterDefs.java b/core/java/android/security/keymaster/KeymasterDefs.java
index eb3d031..b5e7309 100644
--- a/core/java/android/security/keymaster/KeymasterDefs.java
+++ b/core/java/android/security/keymaster/KeymasterDefs.java
@@ -89,6 +89,8 @@
public static final int KM_TAG_AUTH_TOKEN = KM_BYTES | 1002;
public static final int KM_TAG_MAC_LENGTH = KM_UINT | 1003;
+ public static final int KM_TAG_USE_SECURE_PROCESSOR = KM_BOOL | 15000;
+
// Algorithm values.
public static final int KM_ALGORITHM_RSA = 1;
public static final int KM_ALGORITHM_EC = 3;
diff --git a/core/java/android/speech/SpeechRecognizer.java b/core/java/android/speech/SpeechRecognizer.java
index 88e2ede..3eb24e4 100644
--- a/core/java/android/speech/SpeechRecognizer.java
+++ b/core/java/android/speech/SpeechRecognizer.java
@@ -260,6 +260,7 @@
* not set explicitly, default values will be used by the recognizer.
*/
public void startListening(final Intent recognizerIntent) {
+ android.util.SeempLog.record(72);
if (recognizerIntent == null) {
throw new IllegalArgumentException("intent must not be null");
}
diff --git a/core/java/android/util/BoostFramework.java b/core/java/android/util/BoostFramework.java
new file mode 100644
index 0000000..5668b1a
--- /dev/null
+++ b/core/java/android/util/BoostFramework.java
@@ -0,0 +1,246 @@
+/*
+ * Copyright (c) 2015, 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.
+ */
+
+package android.util;
+
+import android.util.Log;
+import dalvik.system.PathClassLoader;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.lang.System;
+import android.view.MotionEvent;
+import android.util.DisplayMetrics;
+import android.os.SystemProperties;
+import android.content.Context;
+
+/** @hide */
+public class BoostFramework {
+
+ private static final String TAG = "BoostFramework";
+ private static final String PERFORMANCE_JAR = "/system/framework/QPerformance.jar";
+ private static final String PERFORMANCE_CLASS = "com.qualcomm.qti.Performance";
+
+/** @hide */
+ private static boolean mIsLoaded = false;
+ private static Method mAcquireFunc = null;
+ private static Method mReleaseFunc = null;
+ private static Method mAcquireTouchFunc = null;
+ private static Method mIOPStart = null;
+ private static Method mIOPStop = null;
+ private static Constructor<Class> mConstructor = null;
+ private static int mLockDuration = -1;
+ private static int mParamVal[];
+ private static String mBoostActivityList[];
+ private static long mStartTime;
+ private static final int mDebugBoost = getDebugBoostProperty();
+
+/** @hide */
+ private Object mPerf = null;
+
+/** @hide */
+ public BoostFramework() {
+ synchronized(BoostFramework.class) {
+ if (mIsLoaded == false) {
+ try {
+ Class perfClass;
+ PathClassLoader perfClassLoader;
+
+ perfClassLoader = new PathClassLoader(PERFORMANCE_JAR,
+ ClassLoader.getSystemClassLoader());
+ perfClass = perfClassLoader.loadClass(PERFORMANCE_CLASS);
+ mConstructor = perfClass.getConstructor();
+
+ Class[] argClasses = new Class[] {int.class, int[].class};
+ mAcquireFunc = perfClass.getDeclaredMethod("perfLockAcquire", argClasses);
+
+ argClasses = new Class[] {};
+ mReleaseFunc = perfClass.getDeclaredMethod("perfLockRelease", argClasses);
+
+ argClasses = new Class[] {MotionEvent.class, DisplayMetrics.class, int.class, int[].class};
+ mAcquireTouchFunc = perfClass.getDeclaredMethod("perfLockAcquireTouch", argClasses);
+
+ argClasses = new Class[] {int.class, String.class};
+ mIOPStart = perfClass.getDeclaredMethod("perfIOPrefetchStart", argClasses);
+
+ argClasses = new Class[] {};
+ mIOPStop = perfClass.getDeclaredMethod("perfIOPrefetchStop", argClasses);
+
+ mIsLoaded = true;
+ }
+ catch(Exception e) {
+ Log.e(TAG,"BoostFramework() : Exception_1 = " + e);
+ }
+ }
+ }
+
+ try {
+ if (mConstructor != null) {
+ mPerf = mConstructor.newInstance();
+ }
+ }
+ catch(Exception e) {
+ Log.e(TAG,"BoostFramework() : Exception_2 = " + e);
+ }
+ }
+
+/** @hide */
+/* private static void loadNative() {
+ if(!isLoaded){
+ //System.loadLibrary("perf_jni");
+ System.loadLibrary("qti_performance");
+ isLoaded=true;
+ }
+ return;
+ }
+*/
+
+/** @hide */
+ public int perfLockAcquire(int duration, int... list) {
+ int ret = -1;
+ try {
+ Object retVal = mAcquireFunc.invoke(mPerf, duration, list);
+ ret = (int)retVal;
+ } catch(Exception e) {
+ Log.e(TAG,"Exception " + e);
+ }
+ return ret;
+ }
+
+/** @hide */
+ public int perfLockRelease() {
+ int ret = -1;
+ try {
+ Object retVal = mReleaseFunc.invoke(mPerf);
+ ret = (int)retVal;
+ } catch(Exception e) {
+ Log.e(TAG,"Exception " + e);
+ }
+ return ret;
+ }
+
+/** @hide Reads system property
+ * @return 1 if property is set
+ */
+ public static int getDebugBoostProperty() {
+ return SystemProperties.getInt("persist.debugboost.enable", 0);
+ }
+
+/** @hide Acquires debug boost perflock
+ * @param ev Touch Screen event
+ */
+ public void enableDebugBoost(Context context, MotionEvent ev, DisplayMetrics metrics) {
+
+ final int NANO_TO_MILLI = 1000000;
+ long elapsedMillis;
+ boolean mDebugBoostPossible = false;
+
+ /* extract the XML params */
+ if (mLockDuration == -1 || mParamVal == null || mBoostActivityList == null) {
+ mLockDuration = context.getResources().getInteger(
+ com.android.internal.R.integer.debugBoost_timeout);
+ mParamVal = context.getResources().getIntArray(
+ com.android.internal.R.array.debugBoost_param_value);
+ mBoostActivityList = context.getResources().getStringArray(
+ com.android.internal.R.array.debugBoost_activityList);
+ }
+
+ String currentActivity = context.getPackageName();
+
+ /* search for the current activity in list */
+ for (String match : mBoostActivityList) {
+ if (currentActivity.indexOf(match) != -1) {
+ /* break if found */
+ mDebugBoostPossible = true;
+ break;
+ }
+ }
+
+ elapsedMillis = (System.nanoTime() - mStartTime)/NANO_TO_MILLI;
+
+ /* elapsed should be atleast greater than lock duration */
+ if (mDebugBoostPossible == true && elapsedMillis > mLockDuration) {
+ perfLockAcquireTouch(ev, metrics, mLockDuration, mParamVal);
+ mStartTime = System.nanoTime();
+ Log.i(TAG, "dBoost: activity = " + currentActivity + " " + "elapsed = " + elapsedMillis);
+ }
+ }
+
+/** @hide sets debug boost if property is set
+ */
+ public boolean boostOverride(Context context, MotionEvent ev, DisplayMetrics metrics) {
+ /* Enable debug boost if property is set and
+ * current actiivity is present in list
+ */
+ if (mDebugBoost == 1) {
+ enableDebugBoost(context, ev, metrics);
+ return true;
+ }
+ return false;
+ }
+
+/** @hide */
+ public int perfLockAcquireTouch(MotionEvent ev, DisplayMetrics metrics,
+ int duration, int... list) {
+ int ret = -1;
+ try {
+ Object retVal = mAcquireTouchFunc.invoke(mPerf, ev, metrics, duration, list);
+ ret = (int)retVal;
+ } catch(Exception e) {
+ Log.e(TAG,"Exception " + e);
+ }
+ return ret;
+ }
+
+/** @hide */
+ public int perfIOPrefetchStart(int pid, String pkg_name)
+ {
+ int ret = -1;
+ try {
+ Object retVal = mIOPStart.invoke(mPerf,pid,pkg_name);
+ ret = (int)retVal;
+ } catch(Exception e) {
+ Log.e(TAG,"Exception " + e);
+ }
+ return ret;
+ }
+
+/** @hide */
+ public int perfIOPrefetchStop()
+ {
+ int ret = -1;
+ try {
+ Object retVal = mIOPStop.invoke(mPerf);
+ ret = (int)retVal;
+ } catch(Exception e) {
+ Log.e(TAG,"Exception " + e);
+ }
+ return ret;
+ }
+
+};
diff --git a/core/java/android/util/NativeTextHelper.java b/core/java/android/util/NativeTextHelper.java
new file mode 100644
index 0000000..87b60a7
--- /dev/null
+++ b/core/java/android/util/NativeTextHelper.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2015-2016, 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.
+ */
+package android.util;
+
+import android.content.Context;
+
+/**
+ *@hide
+ */
+public class NativeTextHelper {
+
+ /**
+ * parse the string to current language.
+ *
+ * @param context base context of the application
+ * @param originalString original string
+ * @param defPackage the target package where the local language strings
+ * defined
+ * @param originNamesId the id of the original string array.
+ * @param localNamesId the id of the local string keys.
+ * @return local language string
+ */
+ private static final String getLocalString(Context context, String originalString,
+ String defPackage, int originNamesId, int localNamesId) {
+ String[] origNames = context.getResources().getStringArray(originNamesId);
+ String[] localNames = context.getResources().getStringArray(localNamesId);
+ for (int i = 0; i < origNames.length; i++) {
+ if (origNames[i].equalsIgnoreCase(originalString)) {
+ return context.getString(context.getResources().getIdentifier(localNames[i],
+ "string", defPackage));
+ }
+ }
+ return originalString;
+ }
+
+ /**
+ * parse the string to current language string in public resources.
+ *
+ * @param context base context of the application
+ * @param originalString original string
+ * @param originNamesId the id of the original string array.
+ * @param localNamesId the id of the local string keys.
+ * @return local language string
+ */
+ public static final String getLocalString(Context context, String originalString,
+ int originNamesId, int localNamesId) {
+ return getLocalString(context, originalString, "android", originNamesId, localNamesId);
+ }
+
+ /**
+ * parse the string to current language string in current resources.
+ *
+ * @param context base context of the application
+ * @param originalString original string
+ * @param originNamesId the id of the original string array.
+ * @param localNamesId the id of the local string keys.
+ * @return local language string
+ */
+ public static final String getInternalLocalString(Context context, String originalString,
+ int originNamesId,
+ int localNamesId) {
+ return getLocalString(context, originalString, context.getPackageName(), originNamesId,
+ localNamesId);
+ }
+
+}
diff --git a/core/java/android/util/NtpTrustedTime.java b/core/java/android/util/NtpTrustedTime.java
index ed2d3c6..941ea31 100644
--- a/core/java/android/util/NtpTrustedTime.java
+++ b/core/java/android/util/NtpTrustedTime.java
@@ -23,6 +23,7 @@
import android.net.NetworkInfo;
import android.net.SntpClient;
import android.os.SystemClock;
+import android.os.SystemProperties;
import android.provider.Settings;
import android.text.TextUtils;
@@ -49,6 +50,11 @@
private long mCachedNtpElapsedRealtime;
private long mCachedNtpCertainty;
+ private boolean mBackupmode = false;
+ private static String mBackupServer = "";
+ private static int mNtpRetries = 0;
+ private static int mNtpRetriesMax = 0;
+
private NtpTrustedTime(String server, long timeout) {
if (LOGD) Log.d(TAG, "creating NtpTrustedTime using " + server);
mServer = server;
@@ -73,6 +79,22 @@
final String server = secureServer != null ? secureServer : defaultServer;
sSingleton = new NtpTrustedTime(server, timeout);
sContext = context;
+
+ if (null != sSingleton) {
+ final String backupServer = SystemProperties.get("persist.backup.ntpServer");
+
+ sSingleton.mNtpRetriesMax = res.getInteger(
+ com.android.internal.R.integer.config_ntpRetry);
+
+ if ((0 < sSingleton.mNtpRetriesMax) &&
+ (null != backupServer) &&
+ (0 != backupServer.length())) {
+ sSingleton.mBackupServer = (backupServer.trim()).replace("\"", "");
+ } else {
+ sSingleton.mNtpRetriesMax = 0;
+ sSingleton.mBackupServer = "";
+ }
+ }
}
return sSingleton;
@@ -101,13 +123,21 @@
if (LOGD) Log.d(TAG, "forceRefresh() from cache miss");
final SntpClient client = new SntpClient();
- if (client.requestTime(mServer, (int) mTimeout)) {
+
+ String mTargetServer = mServer;
+ if (true == getBackupmode()) {
+ this.setBackupmode(false);
+ mTargetServer = mBackupServer;
+ }
+ if (LOGD) Log.d(TAG, "Ntp Server to access at:" + mTargetServer);
+ if (client.requestTime(mTargetServer, (int) mTimeout)) {
mHasCache = true;
mCachedNtpTime = client.getNtpTime();
mCachedNtpElapsedRealtime = client.getNtpTimeReference();
mCachedNtpCertainty = client.getRoundTripTime() / 2;
return true;
} else {
+ countInBackupmode();
return false;
}
}
@@ -155,4 +185,32 @@
public long getCachedNtpTimeReference() {
return mCachedNtpElapsedRealtime;
}
+
+ public void setBackupmode(boolean mode) {
+ if (true == isBackupSupported()) {
+ this.mBackupmode = mode;
+ }
+ if (LOGD) Log.d(TAG, "setBackupmode() set the backup mode to be:" + this.mBackupmode);
+ }
+
+ private boolean getBackupmode() {
+ return this.mBackupmode;
+ }
+
+ private boolean isBackupSupported() {
+ return ((0 < this.mNtpRetriesMax) &&
+ (null != mBackupServer) &&
+ (0 != mBackupServer.length())) ? true : false;
+ }
+
+ private void countInBackupmode() {
+ if (true == isBackupSupported()) {
+ this.mNtpRetries++;
+ if (this.mNtpRetries == this.mNtpRetriesMax) {
+ this.mNtpRetries = 0;
+ this.setBackupmode(true);
+ }
+ }
+ if (LOGD) Log.d(TAG, "countInBackupmode() func");
+ }
}
diff --git a/core/java/android/util/Patterns.java b/core/java/android/util/Patterns.java
index 0a452db..db0c8c5 100644
--- a/core/java/android/util/Patterns.java
+++ b/core/java/android/util/Patterns.java
@@ -305,6 +305,7 @@
/* A word boundary or end of input. This is to stop foo.sure from matching as foo.su */
private static final String WORD_BOUNDARY = "(?:\\b|$|^)";
+ private static final String WORD_BOUNDARY_WWW = "(?:\\b|$|^|www\\.)";
private static final String USER_INFO = "(?:[a-zA-Z0-9\\$\\-\\_\\.\\+\\!\\*\\'\\(\\)"
+ "\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,64}(?:\\:(?:[a-zA-Z0-9\\$\\-\\_"
@@ -355,14 +356,18 @@
private static final String RELAXED_DOMAIN_NAME =
"(?:" + "(?:" + IRI_LABEL + "(?:\\.(?=\\S))" +"?)+" + "|" + IP_ADDRESS + ")";
+ private static final String CJK_UNIFIED = "["
+ + "\u4E00-\u9FFF"
+ + "]";
/**
* Regular expression to match strings that do not start with a supported protocol. The TLDs
* are expected to be one of the known TLDs.
*/
private static final String WEB_URL_WITHOUT_PROTOCOL = "("
- + WORD_BOUNDARY
+ + WORD_BOUNDARY_WWW
+ "(?<!:\\/\\/)"
+ "("
+ + "(?!.*" + CJK_UNIFIED + "www\\.)"
+ "(?:" + STRICT_DOMAIN_NAME + ")"
+ "(?:" + PORT_NUMBER + ")?"
+ ")"
diff --git a/core/java/android/util/ResolutionOverride.java b/core/java/android/util/ResolutionOverride.java
new file mode 100644
index 0000000..5bb0668
--- /dev/null
+++ b/core/java/android/util/ResolutionOverride.java
@@ -0,0 +1,143 @@
+/* Copyright (c) 2015-2016 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.
+*
+*/
+
+package android.util;
+
+import android.content.ComponentName;
+import android.content.pm.ActivityInfo;
+import android.content.pm.PackageManager;
+import android.content.res.Configuration;
+import android.graphics.Matrix;
+import android.os.SystemProperties;
+import android.util.Log;
+import android.view.MotionEvent;
+import android.view.SurfaceView;
+import android.view.View;
+
+/** @hide */
+public class ResolutionOverride {
+ /** @hide */
+ static private final boolean DEBUG = false;
+ static private final String TAG = "ResolutionOverride";
+ private static final String RES_OVERRIDE = "persist.debug.app_res_override";
+ private boolean mIsEnabled = false;
+ private int mOverrideXres = 0;
+ private int mOverrideYres = 0;
+
+ /** @hide */
+ public ResolutionOverride(SurfaceView view) {
+ boolean enable = (view.getContext().getApplicationInfo().canOverrideRes() == 1);
+ String resStr = SystemProperties.get(RES_OVERRIDE, null);
+
+ if (!enable || resStr == null || resStr.length() == 0 ||
+ view.getResources() == null) {
+ return;
+ }
+
+ int orientation = view.getResources().getConfiguration().orientation;
+
+ if(orientation == Configuration.ORIENTATION_PORTRAIT ||
+ orientation == Configuration.ORIENTATION_LANDSCAPE) {
+ resStr = resStr.toLowerCase();
+ final int pos = resStr.indexOf('x');
+ if (pos > 0 && resStr.lastIndexOf('x') == pos) {
+ try {
+ mOverrideXres = Integer.parseInt(resStr.substring(0, pos));
+ mOverrideYres = Integer.parseInt(resStr.substring(pos + 1));
+ } catch (NumberFormatException ex) {
+ Log.e(TAG, "Error in extracting the overriding xres and yres");
+ }
+ }
+
+ if(orientation == Configuration.ORIENTATION_LANDSCAPE) {
+ int tmp = mOverrideXres;
+ mOverrideXres = mOverrideYres;
+ mOverrideYres = tmp;
+ }
+
+ if(mOverrideXres > 0 && mOverrideYres > 0) {
+ mIsEnabled = true;
+ if (DEBUG) Log.i(TAG, "Orientation: " + orientation +
+ " Overriding resolution to" + " xres: " + mOverrideXres
+ + " yres: " + mOverrideYres);
+ }
+ }
+ }
+
+ /** @hide */
+ public void setFixedSize(SurfaceView view) {
+ if(!mIsEnabled) {
+ return;
+ }
+
+ view.getHolder().setFixedSize(mOverrideXres, mOverrideYres);
+ }
+
+ /** @hide */
+ public void handleTouch(SurfaceView view, MotionEvent ev) {
+ if(!mIsEnabled) {
+ return;
+ }
+
+ Matrix matrix = new Matrix();
+ //mOverride{Xres, Yres} are already swapped if orientation is landscape
+ float xscale = (mOverrideXres * 1.0f) / view.getWidth();
+ float yscale = (mOverrideYres * 1.0f) / view.getHeight();
+
+ if (DEBUG) Log.i(TAG, "Before overriding the touch event x/y : " + ev);
+ matrix.postScale(xscale, yscale);
+ ev.transform(matrix);
+ if (DEBUG) Log.i(TAG, "After overriding the touch event x/y : " + ev);
+ }
+
+ /** @hide */
+ public void handleResize(final SurfaceView surfaceView) {
+ if(!mIsEnabled) {
+ return;
+ }
+
+ /* Change the visibility to GONE and back to VISIBLE and post it
+ * on the main thread for the touch events to be effective on the
+ * changed SurfaceView with the new dimensions
+ */
+ surfaceView.post(new Runnable() {
+ @Override
+ public void run() {
+ surfaceView.setVisibility(View.GONE);
+ }
+ });
+
+ surfaceView.postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ surfaceView.setVisibility(View.VISIBLE);
+ }
+ }, 100);
+ }
+};
diff --git a/core/java/android/util/SeempLog.java b/core/java/android/util/SeempLog.java
new file mode 100644
index 0000000..3764882
--- /dev/null
+++ b/core/java/android/util/SeempLog.java
@@ -0,0 +1,754 @@
+/*
+ * Copyright (c) 2015, 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.
+ */
+
+package android.util;
+
+import com.android.internal.os.RuntimeInit;
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.UnknownHostException;
+import java.util.Hashtable;
+import java.util.Map;
+import java.util.List;
+import java.util.Iterator;
+import android.util.Log;
+import android.provider.Settings;
+
+/**
+ * SeempLog
+ *
+ * @hide
+ */
+public final class SeempLog {
+ private SeempLog() {
+ }
+
+ /**
+ * Send a log message to the seemp log.
+ * @param api The api triggering this message.
+ */
+ public static int record(int api) {
+ return seemp_println_native(api, "");
+ }
+
+ /**
+ * Send a log message to the seemp log.
+ * @param api The api triggering this message.
+ * @param msg The message you would like logged.
+ */
+ public static int record_str(int api, String msg) {
+ if ( msg != null ) {
+ return seemp_println_native(api, msg);
+ }
+ else {
+ return seemp_println_native(api, "");
+ }
+ }
+
+ public static int record_sensor(int api,
+ android.hardware.Sensor sensor) {
+ if ( sensor != null ) {
+ return seemp_println_native(api, "sensor="+sensor.getType());
+ }
+ else {
+ return seemp_println_native(api, "sensor=-1");
+ }
+ }
+
+ public static int record_sensor_rate(int api,
+ android.hardware.Sensor sensor, int rate) {
+ if ( sensor != null ) {
+ return seemp_println_native(api,
+ "sensor="+sensor.getType() + ",rate="+rate);
+ }
+ else {
+ return seemp_println_native(api, "sensor=-1,rate=" + rate);
+ }
+ }
+
+ public static int record_uri(int api, android.net.Uri uri) {
+ if ( uri != null ) {
+ return seemp_println_native(api, "uri, " + uri.toString());
+ }
+ else {
+ return seemp_println_native(api, "uri, null" );
+ }
+ }
+
+ public static int record_vg_layout(int api,
+ android.view.ViewGroup.LayoutParams params) {
+ try {
+ android.view.WindowManager.LayoutParams p =
+ (android.view.WindowManager.LayoutParams) params;
+ if ( p != null ) {
+ return seemp_println_native(api,
+ "window_type=" + p.type + ",window_flag=" + p.flags);
+ }
+ else {
+ return seemp_println_native(api, "");
+ }
+ } catch (ClassCastException cce) {
+ return seemp_println_native(api, "");
+ }
+ }
+
+ /** @hide */ public static native int seemp_println_native(int api, String msg);
+
+ public static final int SEEMP_API_android_provider_Settings__get_ANDROID_ID_ = 7;
+ public static final int SEEMP_API_android_provider_Settings__get_ACCELEROMETER_ROTATION_ = 96;
+ public static final int SEEMP_API_android_provider_Settings__get_USER_ROTATION_ = 97;
+ public static final int SEEMP_API_android_provider_Settings__get_ADB_ENABLED_ = 98;
+ public static final int SEEMP_API_android_provider_Settings__get_DEBUG_APP_ = 99;
+ public static final int SEEMP_API_android_provider_Settings__get_WAIT_FOR_DEBUGGER_ = 100;
+ public static final int SEEMP_API_android_provider_Settings__get_AIRPLANE_MODE_ON_ = 101;
+ public static final int SEEMP_API_android_provider_Settings__get_AIRPLANE_MODE_RADIOS_ = 102;
+ public static final int SEEMP_API_android_provider_Settings__get_ALARM_ALERT_ = 103;
+ public static final int SEEMP_API_android_provider_Settings__get_NEXT_ALARM_FORMATTED_ = 104;
+ public static final int SEEMP_API_android_provider_Settings__get_ALWAYS_FINISH_ACTIVITIES_ = 105;
+ public static final int SEEMP_API_android_provider_Settings__get_LOGGING_ID_ = 106;
+ public static final int SEEMP_API_android_provider_Settings__get_ANIMATOR_DURATION_SCALE_ = 107;
+ public static final int SEEMP_API_android_provider_Settings__get_WINDOW_ANIMATION_SCALE_ = 108;
+ public static final int SEEMP_API_android_provider_Settings__get_FONT_SCALE_ = 109;
+ public static final int SEEMP_API_android_provider_Settings__get_SCREEN_BRIGHTNESS_ = 110;
+ public static final int SEEMP_API_android_provider_Settings__get_SCREEN_BRIGHTNESS_MODE_ = 111;
+ public static final int SEEMP_API_android_provider_Settings__get_SCREEN_BRIGHTNESS_MODE_AUTOMATIC_ = 112;
+ public static final int SEEMP_API_android_provider_Settings__get_SCREEN_BRIGHTNESS_MODE_MANUAL_ = 113;
+ public static final int SEEMP_API_android_provider_Settings__get_SCREEN_OFF_TIMEOUT_ = 114;
+ public static final int SEEMP_API_android_provider_Settings__get_DIM_SCREEN_ = 115;
+ public static final int SEEMP_API_android_provider_Settings__get_TRANSITION_ANIMATION_SCALE_ = 116;
+ public static final int SEEMP_API_android_provider_Settings__get_STAY_ON_WHILE_PLUGGED_IN_ = 117;
+ public static final int SEEMP_API_android_provider_Settings__get_WALLPAPER_ACTIVITY_ = 118;
+ public static final int SEEMP_API_android_provider_Settings__get_SHOW_PROCESSES_ = 119;
+ public static final int SEEMP_API_android_provider_Settings__get_SHOW_WEB_SUGGESTIONS_ = 120;
+ public static final int SEEMP_API_android_provider_Settings__get_SHOW_GTALK_SERVICE_STATUS_ = 121;
+ public static final int SEEMP_API_android_provider_Settings__get_USE_GOOGLE_MAIL_ = 122;
+ public static final int SEEMP_API_android_provider_Settings__get_AUTO_TIME_ = 123;
+ public static final int SEEMP_API_android_provider_Settings__get_AUTO_TIME_ZONE_ = 124;
+ public static final int SEEMP_API_android_provider_Settings__get_DATE_FORMAT_ = 125;
+ public static final int SEEMP_API_android_provider_Settings__get_TIME_12_24_ = 126;
+ public static final int SEEMP_API_android_provider_Settings__get_BLUETOOTH_DISCOVERABILITY_ = 127;
+ public static final int SEEMP_API_android_provider_Settings__get_BLUETOOTH_DISCOVERABILITY_TIMEOUT_ = 128;
+ public static final int SEEMP_API_android_provider_Settings__get_BLUETOOTH_ON_ = 129;
+ public static final int SEEMP_API_android_provider_Settings__get_DEVICE_PROVISIONED_ = 130;
+ public static final int SEEMP_API_android_provider_Settings__get_SETUP_WIZARD_HAS_RUN_ = 131;
+ public static final int SEEMP_API_android_provider_Settings__get_DTMF_TONE_WHEN_DIALING_ = 132;
+ public static final int SEEMP_API_android_provider_Settings__get_END_BUTTON_BEHAVIOR_ = 133;
+ public static final int SEEMP_API_android_provider_Settings__get_RINGTONE_ = 134;
+ public static final int SEEMP_API_android_provider_Settings__get_MODE_RINGER_ = 135;
+ public static final int SEEMP_API_android_provider_Settings__get_INSTALL_NON_MARKET_APPS_ = 136;
+ public static final int SEEMP_API_android_provider_Settings__get_LOCATION_PROVIDERS_ALLOWED_ = 137;
+ public static final int SEEMP_API_android_provider_Settings__get_LOCK_PATTERN_ENABLED_ = 138;
+ public static final int SEEMP_API_android_provider_Settings__get_LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED_ = 139;
+ public static final int SEEMP_API_android_provider_Settings__get_LOCK_PATTERN_VISIBLE_ = 140;
+ public static final int SEEMP_API_android_provider_Settings__get_NETWORK_PREFERENCE_ = 141;
+ public static final int SEEMP_API_android_provider_Settings__get_DATA_ROAMING_ = 142;
+ public static final int SEEMP_API_android_provider_Settings__get_HTTP_PROXY_ = 143;
+ public static final int SEEMP_API_android_provider_Settings__get_PARENTAL_CONTROL_ENABLED_ = 144;
+ public static final int SEEMP_API_android_provider_Settings__get_PARENTAL_CONTROL_LAST_UPDATE_ = 145;
+ public static final int SEEMP_API_android_provider_Settings__get_PARENTAL_CONTROL_REDIRECT_URL_ = 146;
+ public static final int SEEMP_API_android_provider_Settings__get_RADIO_BLUETOOTH_ = 147;
+ public static final int SEEMP_API_android_provider_Settings__get_RADIO_CELL_ = 148;
+ public static final int SEEMP_API_android_provider_Settings__get_RADIO_NFC_ = 149;
+ public static final int SEEMP_API_android_provider_Settings__get_RADIO_WIFI_ = 150;
+ public static final int SEEMP_API_android_provider_Settings__get_SYS_PROP_SETTING_VERSION_ = 151;
+ public static final int SEEMP_API_android_provider_Settings__get_SETTINGS_CLASSNAME_ = 152;
+ public static final int SEEMP_API_android_provider_Settings__get_TEXT_AUTO_CAPS_ = 153;
+ public static final int SEEMP_API_android_provider_Settings__get_TEXT_AUTO_PUNCTUATE_ = 154;
+ public static final int SEEMP_API_android_provider_Settings__get_TEXT_AUTO_REPLACE_ = 155;
+ public static final int SEEMP_API_android_provider_Settings__get_TEXT_SHOW_PASSWORD_ = 156;
+ public static final int SEEMP_API_android_provider_Settings__get_USB_MASS_STORAGE_ENABLED_ = 157;
+ public static final int SEEMP_API_android_provider_Settings__get_VIBRATE_ON_ = 158;
+ public static final int SEEMP_API_android_provider_Settings__get_HAPTIC_FEEDBACK_ENABLED_ = 159;
+ public static final int SEEMP_API_android_provider_Settings__get_VOLUME_ALARM_ = 160;
+ public static final int SEEMP_API_android_provider_Settings__get_VOLUME_BLUETOOTH_SCO_ = 161;
+ public static final int SEEMP_API_android_provider_Settings__get_VOLUME_MUSIC_ = 162;
+ public static final int SEEMP_API_android_provider_Settings__get_VOLUME_NOTIFICATION_ = 163;
+ public static final int SEEMP_API_android_provider_Settings__get_VOLUME_RING_ = 164;
+ public static final int SEEMP_API_android_provider_Settings__get_VOLUME_SYSTEM_ = 165;
+ public static final int SEEMP_API_android_provider_Settings__get_VOLUME_VOICE_ = 166;
+ public static final int SEEMP_API_android_provider_Settings__get_SOUND_EFFECTS_ENABLED_ = 167;
+ public static final int SEEMP_API_android_provider_Settings__get_MODE_RINGER_STREAMS_AFFECTED_ = 168;
+ public static final int SEEMP_API_android_provider_Settings__get_MUTE_STREAMS_AFFECTED_ = 169;
+ public static final int SEEMP_API_android_provider_Settings__get_NOTIFICATION_SOUND_ = 170;
+ public static final int SEEMP_API_android_provider_Settings__get_APPEND_FOR_LAST_AUDIBLE_ = 171;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_MAX_DHCP_RETRY_COUNT_ = 172;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS_ = 173;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON_ = 174;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY_ = 175;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_NUM_OPEN_NETWORKS_KEPT_ = 176;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_ON_ = 177;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_SLEEP_POLICY_ = 178;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_SLEEP_POLICY_DEFAULT_ = 179;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_SLEEP_POLICY_NEVER_ = 180;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED_ = 181;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_STATIC_DNS1_ = 182;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_STATIC_DNS2_ = 183;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_STATIC_GATEWAY_ = 184;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_STATIC_IP_ = 185;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_STATIC_NETMASK_ = 186;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_USE_STATIC_IP_ = 187;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE_ = 188;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_AP_COUNT_ = 189;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS_ = 190;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED_ = 191;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS_ = 192;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT_ = 193;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_MAX_AP_CHECKS_ = 194;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_ON_ = 195;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_PING_COUNT_ = 196;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_PING_DELAY_MS_ = 197;
+ public static final int SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_PING_TIMEOUT_MS_ = 198;
+ public static final int SEEMP_API_android_provider_Settings__put_ACCELEROMETER_ROTATION_ = 199;
+ public static final int SEEMP_API_android_provider_Settings__put_USER_ROTATION_ = 200;
+ public static final int SEEMP_API_android_provider_Settings__put_ADB_ENABLED_ = 201;
+ public static final int SEEMP_API_android_provider_Settings__put_DEBUG_APP_ = 202;
+ public static final int SEEMP_API_android_provider_Settings__put_WAIT_FOR_DEBUGGER_ = 203;
+ public static final int SEEMP_API_android_provider_Settings__put_AIRPLANE_MODE_ON_ = 204;
+ public static final int SEEMP_API_android_provider_Settings__put_AIRPLANE_MODE_RADIOS_ = 205;
+ public static final int SEEMP_API_android_provider_Settings__put_ALARM_ALERT_ = 206;
+ public static final int SEEMP_API_android_provider_Settings__put_NEXT_ALARM_FORMATTED_ = 207;
+ public static final int SEEMP_API_android_provider_Settings__put_ALWAYS_FINISH_ACTIVITIES_ = 208;
+ public static final int SEEMP_API_android_provider_Settings__put_ANDROID_ID_ = 209;
+ public static final int SEEMP_API_android_provider_Settings__put_LOGGING_ID_ = 210;
+ public static final int SEEMP_API_android_provider_Settings__put_ANIMATOR_DURATION_SCALE_ = 211;
+ public static final int SEEMP_API_android_provider_Settings__put_WINDOW_ANIMATION_SCALE_ = 212;
+ public static final int SEEMP_API_android_provider_Settings__put_FONT_SCALE_ = 213;
+ public static final int SEEMP_API_android_provider_Settings__put_SCREEN_BRIGHTNESS_ = 214;
+ public static final int SEEMP_API_android_provider_Settings__put_SCREEN_BRIGHTNESS_MODE_ = 215;
+ public static final int SEEMP_API_android_provider_Settings__put_SCREEN_BRIGHTNESS_MODE_AUTOMATIC_ = 216;
+ public static final int SEEMP_API_android_provider_Settings__put_SCREEN_BRIGHTNESS_MODE_MANUAL_ = 217;
+ public static final int SEEMP_API_android_provider_Settings__put_SCREEN_OFF_TIMEOUT_ = 218;
+ public static final int SEEMP_API_android_provider_Settings__put_DIM_SCREEN_ = 219;
+ public static final int SEEMP_API_android_provider_Settings__put_TRANSITION_ANIMATION_SCALE_ = 220;
+ public static final int SEEMP_API_android_provider_Settings__put_STAY_ON_WHILE_PLUGGED_IN_ = 221;
+ public static final int SEEMP_API_android_provider_Settings__put_WALLPAPER_ACTIVITY_ = 222;
+ public static final int SEEMP_API_android_provider_Settings__put_SHOW_PROCESSES_ = 223;
+ public static final int SEEMP_API_android_provider_Settings__put_SHOW_WEB_SUGGESTIONS_ = 224;
+ public static final int SEEMP_API_android_provider_Settings__put_SHOW_GTALK_SERVICE_STATUS_ = 225;
+ public static final int SEEMP_API_android_provider_Settings__put_USE_GOOGLE_MAIL_ = 226;
+ public static final int SEEMP_API_android_provider_Settings__put_AUTO_TIME_ = 227;
+ public static final int SEEMP_API_android_provider_Settings__put_AUTO_TIME_ZONE_ = 228;
+ public static final int SEEMP_API_android_provider_Settings__put_DATE_FORMAT_ = 229;
+ public static final int SEEMP_API_android_provider_Settings__put_TIME_12_24_ = 230;
+ public static final int SEEMP_API_android_provider_Settings__put_BLUETOOTH_DISCOVERABILITY_ = 231;
+ public static final int SEEMP_API_android_provider_Settings__put_BLUETOOTH_DISCOVERABILITY_TIMEOUT_ = 232;
+ public static final int SEEMP_API_android_provider_Settings__put_BLUETOOTH_ON_ = 233;
+ public static final int SEEMP_API_android_provider_Settings__put_DEVICE_PROVISIONED_ = 234;
+ public static final int SEEMP_API_android_provider_Settings__put_SETUP_WIZARD_HAS_RUN_ = 235;
+ public static final int SEEMP_API_android_provider_Settings__put_DTMF_TONE_WHEN_DIALING_ = 236;
+ public static final int SEEMP_API_android_provider_Settings__put_END_BUTTON_BEHAVIOR_ = 237;
+ public static final int SEEMP_API_android_provider_Settings__put_RINGTONE_ = 238;
+ public static final int SEEMP_API_android_provider_Settings__put_MODE_RINGER_ = 239;
+ public static final int SEEMP_API_android_provider_Settings__put_INSTALL_NON_MARKET_APPS_ = 240;
+ public static final int SEEMP_API_android_provider_Settings__put_LOCATION_PROVIDERS_ALLOWED_ = 241;
+ public static final int SEEMP_API_android_provider_Settings__put_LOCK_PATTERN_ENABLED_ = 242;
+ public static final int SEEMP_API_android_provider_Settings__put_LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED_ = 243;
+ public static final int SEEMP_API_android_provider_Settings__put_LOCK_PATTERN_VISIBLE_ = 244;
+ public static final int SEEMP_API_android_provider_Settings__put_NETWORK_PREFERENCE_ = 245;
+ public static final int SEEMP_API_android_provider_Settings__put_DATA_ROAMING_ = 246;
+ public static final int SEEMP_API_android_provider_Settings__put_HTTP_PROXY_ = 247;
+ public static final int SEEMP_API_android_provider_Settings__put_PARENTAL_CONTROL_ENABLED_ = 248;
+ public static final int SEEMP_API_android_provider_Settings__put_PARENTAL_CONTROL_LAST_UPDATE_ = 249;
+ public static final int SEEMP_API_android_provider_Settings__put_PARENTAL_CONTROL_REDIRECT_URL_ = 250;
+ public static final int SEEMP_API_android_provider_Settings__put_RADIO_BLUETOOTH_ = 251;
+ public static final int SEEMP_API_android_provider_Settings__put_RADIO_CELL_ = 252;
+ public static final int SEEMP_API_android_provider_Settings__put_RADIO_NFC_ = 253;
+ public static final int SEEMP_API_android_provider_Settings__put_RADIO_WIFI_ = 254;
+ public static final int SEEMP_API_android_provider_Settings__put_SYS_PROP_SETTING_VERSION_ = 255;
+ public static final int SEEMP_API_android_provider_Settings__put_SETTINGS_CLASSNAME_ = 256;
+ public static final int SEEMP_API_android_provider_Settings__put_TEXT_AUTO_CAPS_ = 257;
+ public static final int SEEMP_API_android_provider_Settings__put_TEXT_AUTO_PUNCTUATE_ = 258;
+ public static final int SEEMP_API_android_provider_Settings__put_TEXT_AUTO_REPLACE_ = 259;
+ public static final int SEEMP_API_android_provider_Settings__put_TEXT_SHOW_PASSWORD_ = 260;
+ public static final int SEEMP_API_android_provider_Settings__put_USB_MASS_STORAGE_ENABLED_ = 261;
+ public static final int SEEMP_API_android_provider_Settings__put_VIBRATE_ON_ = 262;
+ public static final int SEEMP_API_android_provider_Settings__put_HAPTIC_FEEDBACK_ENABLED_ = 263;
+ public static final int SEEMP_API_android_provider_Settings__put_VOLUME_ALARM_ = 264;
+ public static final int SEEMP_API_android_provider_Settings__put_VOLUME_BLUETOOTH_SCO_ = 265;
+ public static final int SEEMP_API_android_provider_Settings__put_VOLUME_MUSIC_ = 266;
+ public static final int SEEMP_API_android_provider_Settings__put_VOLUME_NOTIFICATION_ = 267;
+ public static final int SEEMP_API_android_provider_Settings__put_VOLUME_RING_ = 268;
+ public static final int SEEMP_API_android_provider_Settings__put_VOLUME_SYSTEM_ = 269;
+ public static final int SEEMP_API_android_provider_Settings__put_VOLUME_VOICE_ = 270;
+ public static final int SEEMP_API_android_provider_Settings__put_SOUND_EFFECTS_ENABLED_ = 271;
+ public static final int SEEMP_API_android_provider_Settings__put_MODE_RINGER_STREAMS_AFFECTED_ = 272;
+ public static final int SEEMP_API_android_provider_Settings__put_MUTE_STREAMS_AFFECTED_ = 273;
+ public static final int SEEMP_API_android_provider_Settings__put_NOTIFICATION_SOUND_ = 274;
+ public static final int SEEMP_API_android_provider_Settings__put_APPEND_FOR_LAST_AUDIBLE_ = 275;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_MAX_DHCP_RETRY_COUNT_ = 276;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS_ = 277;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON_ = 278;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY_ = 279;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_NUM_OPEN_NETWORKS_KEPT_ = 280;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_ON_ = 281;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_SLEEP_POLICY_ = 282;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_SLEEP_POLICY_DEFAULT_ = 283;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_SLEEP_POLICY_NEVER_ = 284;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_SLEEP_POLICY_NEVER_WHILE_PLUGGED_ = 285;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_STATIC_DNS1_ = 286;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_STATIC_DNS2_ = 287;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_STATIC_GATEWAY_ = 288;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_STATIC_IP_ = 289;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_STATIC_NETMASK_ = 290;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_USE_STATIC_IP_ = 291;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE_ = 292;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_AP_COUNT_ = 293;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS_ = 294;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED_ = 295;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS_ = 296;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT_ = 297;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_MAX_AP_CHECKS_ = 298;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_ON_ = 299;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_PING_COUNT_ = 300;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_PING_DELAY_MS_ = 301;
+ public static final int SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_PING_TIMEOUT_MS_ = 302;
+
+ private final static java.util.Map<String,Integer> value_to_get_map;
+ static {
+ value_to_get_map = new java.util.HashMap<String,Integer>( 198 );
+ value_to_get_map.put(Settings.System.NOTIFICATION_SOUND,
+ SEEMP_API_android_provider_Settings__get_NOTIFICATION_SOUND_);
+ value_to_get_map.put(Settings.System.DTMF_TONE_WHEN_DIALING,
+ SEEMP_API_android_provider_Settings__get_DTMF_TONE_WHEN_DIALING_);
+ value_to_get_map.put(Settings.System.LOCK_PATTERN_ENABLED,
+ SEEMP_API_android_provider_Settings__get_LOCK_PATTERN_ENABLED_);
+ value_to_get_map.put(Settings.System.WIFI_MAX_DHCP_RETRY_COUNT,
+ SEEMP_API_android_provider_Settings__get_WIFI_MAX_DHCP_RETRY_COUNT_);
+ value_to_get_map.put(Settings.System.AUTO_TIME,
+ SEEMP_API_android_provider_Settings__get_AUTO_TIME_);
+ value_to_get_map.put(Settings.System.SETUP_WIZARD_HAS_RUN,
+ SEEMP_API_android_provider_Settings__get_SETUP_WIZARD_HAS_RUN_);
+ value_to_get_map.put(Settings.System.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS,
+ SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS_);
+ value_to_get_map.put(Settings.System.LOCATION_PROVIDERS_ALLOWED,
+ SEEMP_API_android_provider_Settings__get_LOCATION_PROVIDERS_ALLOWED_);
+ value_to_get_map.put(Settings.System.ALARM_ALERT,
+ SEEMP_API_android_provider_Settings__get_ALARM_ALERT_);
+ value_to_get_map.put(Settings.System.VIBRATE_ON,
+ SEEMP_API_android_provider_Settings__get_VIBRATE_ON_);
+ value_to_get_map.put(Settings.System.USB_MASS_STORAGE_ENABLED,
+ SEEMP_API_android_provider_Settings__get_USB_MASS_STORAGE_ENABLED_);
+ value_to_get_map.put(Settings.System.WIFI_WATCHDOG_PING_DELAY_MS,
+ SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_PING_DELAY_MS_);
+ value_to_get_map.put(Settings.System.FONT_SCALE,
+ SEEMP_API_android_provider_Settings__get_FONT_SCALE_);
+ value_to_get_map.put(Settings.System.WIFI_WATCHDOG_AP_COUNT,
+ SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_AP_COUNT_);
+ value_to_get_map.put(Settings.System.ALWAYS_FINISH_ACTIVITIES,
+ SEEMP_API_android_provider_Settings__get_ALWAYS_FINISH_ACTIVITIES_);
+ value_to_get_map.put(Settings.System.ACCELEROMETER_ROTATION,
+ SEEMP_API_android_provider_Settings__get_ACCELEROMETER_ROTATION_);
+ value_to_get_map.put(Settings.System.WIFI_WATCHDOG_PING_TIMEOUT_MS,
+ SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_PING_TIMEOUT_MS_);
+ value_to_get_map.put(Settings.System.VOLUME_NOTIFICATION,
+ SEEMP_API_android_provider_Settings__get_VOLUME_NOTIFICATION_);
+ value_to_get_map.put(Settings.System.AIRPLANE_MODE_ON,
+ SEEMP_API_android_provider_Settings__get_AIRPLANE_MODE_ON_);
+ value_to_get_map.put(Settings.System.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS,
+ SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS_);
+ value_to_get_map.put(Settings.System.WIFI_STATIC_IP,
+ SEEMP_API_android_provider_Settings__get_WIFI_STATIC_IP_);
+ value_to_get_map.put(Settings.System.RADIO_BLUETOOTH,
+ SEEMP_API_android_provider_Settings__get_RADIO_BLUETOOTH_);
+ value_to_get_map.put(Settings.System.BLUETOOTH_DISCOVERABILITY_TIMEOUT,
+ SEEMP_API_android_provider_Settings__get_BLUETOOTH_DISCOVERABILITY_TIMEOUT_);
+ value_to_get_map.put(Settings.System.VOLUME_RING,
+ SEEMP_API_android_provider_Settings__get_VOLUME_RING_);
+ value_to_get_map.put(Settings.System.MODE_RINGER_STREAMS_AFFECTED,
+ SEEMP_API_android_provider_Settings__get_MODE_RINGER_STREAMS_AFFECTED_);
+ value_to_get_map.put(Settings.System.VOLUME_SYSTEM,
+ SEEMP_API_android_provider_Settings__get_VOLUME_SYSTEM_);
+ value_to_get_map.put(Settings.System.SCREEN_OFF_TIMEOUT,
+ SEEMP_API_android_provider_Settings__get_SCREEN_OFF_TIMEOUT_);
+ value_to_get_map.put(Settings.System.RADIO_WIFI,
+ SEEMP_API_android_provider_Settings__get_RADIO_WIFI_);
+ value_to_get_map.put(Settings.System.AUTO_TIME_ZONE,
+ SEEMP_API_android_provider_Settings__get_AUTO_TIME_ZONE_);
+ value_to_get_map.put(Settings.System.TEXT_AUTO_CAPS,
+ SEEMP_API_android_provider_Settings__get_TEXT_AUTO_CAPS_);
+ value_to_get_map.put(Settings.System.WALLPAPER_ACTIVITY,
+ SEEMP_API_android_provider_Settings__get_WALLPAPER_ACTIVITY_);
+ value_to_get_map.put(Settings.System.ANIMATOR_DURATION_SCALE,
+ SEEMP_API_android_provider_Settings__get_ANIMATOR_DURATION_SCALE_);
+ value_to_get_map.put(Settings.System.WIFI_NUM_OPEN_NETWORKS_KEPT,
+ SEEMP_API_android_provider_Settings__get_WIFI_NUM_OPEN_NETWORKS_KEPT_);
+ value_to_get_map.put(Settings.System.LOCK_PATTERN_VISIBLE,
+ SEEMP_API_android_provider_Settings__get_LOCK_PATTERN_VISIBLE_);
+ value_to_get_map.put(Settings.System.VOLUME_VOICE,
+ SEEMP_API_android_provider_Settings__get_VOLUME_VOICE_);
+ value_to_get_map.put(Settings.System.DEBUG_APP,
+ SEEMP_API_android_provider_Settings__get_DEBUG_APP_);
+ value_to_get_map.put(Settings.System.WIFI_ON,
+ SEEMP_API_android_provider_Settings__get_WIFI_ON_);
+ value_to_get_map.put(Settings.System.TEXT_SHOW_PASSWORD,
+ SEEMP_API_android_provider_Settings__get_TEXT_SHOW_PASSWORD_);
+ value_to_get_map.put(Settings.System.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,
+ SEEMP_API_android_provider_Settings__get_WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY_);
+ value_to_get_map.put(Settings.System.WIFI_SLEEP_POLICY,
+ SEEMP_API_android_provider_Settings__get_WIFI_SLEEP_POLICY_);
+ value_to_get_map.put(Settings.System.VOLUME_MUSIC,
+ SEEMP_API_android_provider_Settings__get_VOLUME_MUSIC_);
+ value_to_get_map.put(Settings.System.PARENTAL_CONTROL_LAST_UPDATE,
+ SEEMP_API_android_provider_Settings__get_PARENTAL_CONTROL_LAST_UPDATE_);
+ value_to_get_map.put(Settings.System.DEVICE_PROVISIONED,
+ SEEMP_API_android_provider_Settings__get_DEVICE_PROVISIONED_);
+ value_to_get_map.put(Settings.System.HTTP_PROXY,
+ SEEMP_API_android_provider_Settings__get_HTTP_PROXY_);
+ value_to_get_map.put(Settings.System.ANDROID_ID,
+ SEEMP_API_android_provider_Settings__get_ANDROID_ID_);
+ value_to_get_map.put(Settings.System.WIFI_WATCHDOG_MAX_AP_CHECKS,
+ SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_MAX_AP_CHECKS_);
+ value_to_get_map.put(Settings.System.END_BUTTON_BEHAVIOR,
+ SEEMP_API_android_provider_Settings__get_END_BUTTON_BEHAVIOR_);
+ value_to_get_map.put(Settings.System.NEXT_ALARM_FORMATTED,
+ SEEMP_API_android_provider_Settings__get_NEXT_ALARM_FORMATTED_);
+ value_to_get_map.put(Settings.System.RADIO_CELL,
+ SEEMP_API_android_provider_Settings__get_RADIO_CELL_);
+ value_to_get_map.put(Settings.System.PARENTAL_CONTROL_ENABLED,
+ SEEMP_API_android_provider_Settings__get_PARENTAL_CONTROL_ENABLED_);
+ value_to_get_map.put(Settings.System.BLUETOOTH_ON,
+ SEEMP_API_android_provider_Settings__get_BLUETOOTH_ON_);
+ value_to_get_map.put(Settings.System.WINDOW_ANIMATION_SCALE,
+ SEEMP_API_android_provider_Settings__get_WINDOW_ANIMATION_SCALE_);
+ value_to_get_map.put(Settings.System.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED,
+ SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED_);
+ value_to_get_map.put(Settings.System.BLUETOOTH_DISCOVERABILITY,
+ SEEMP_API_android_provider_Settings__get_BLUETOOTH_DISCOVERABILITY_);
+ value_to_get_map.put(Settings.System.WIFI_STATIC_DNS1,
+ SEEMP_API_android_provider_Settings__get_WIFI_STATIC_DNS1_);
+ value_to_get_map.put(Settings.System.WIFI_STATIC_DNS2,
+ SEEMP_API_android_provider_Settings__get_WIFI_STATIC_DNS2_);
+ value_to_get_map.put(Settings.System.HAPTIC_FEEDBACK_ENABLED,
+ SEEMP_API_android_provider_Settings__get_HAPTIC_FEEDBACK_ENABLED_);
+ value_to_get_map.put(Settings.System.SHOW_WEB_SUGGESTIONS,
+ SEEMP_API_android_provider_Settings__get_SHOW_WEB_SUGGESTIONS_);
+ value_to_get_map.put(Settings.System.PARENTAL_CONTROL_REDIRECT_URL,
+ SEEMP_API_android_provider_Settings__get_PARENTAL_CONTROL_REDIRECT_URL_);
+ value_to_get_map.put(Settings.System.DATE_FORMAT,
+ SEEMP_API_android_provider_Settings__get_DATE_FORMAT_);
+ value_to_get_map.put(Settings.System.RADIO_NFC,
+ SEEMP_API_android_provider_Settings__get_RADIO_NFC_);
+ value_to_get_map.put(Settings.System.AIRPLANE_MODE_RADIOS,
+ SEEMP_API_android_provider_Settings__get_AIRPLANE_MODE_RADIOS_);
+ value_to_get_map.put(Settings.System.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED,
+ SEEMP_API_android_provider_Settings__get_LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED_);
+ value_to_get_map.put(Settings.System.TIME_12_24,
+ SEEMP_API_android_provider_Settings__get_TIME_12_24_);
+ value_to_get_map.put(Settings.System.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT,
+ SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT_);
+ value_to_get_map.put(Settings.System.VOLUME_BLUETOOTH_SCO,
+ SEEMP_API_android_provider_Settings__get_VOLUME_BLUETOOTH_SCO_);
+ value_to_get_map.put(Settings.System.USER_ROTATION,
+ SEEMP_API_android_provider_Settings__get_USER_ROTATION_);
+ value_to_get_map.put(Settings.System.WIFI_STATIC_GATEWAY,
+ SEEMP_API_android_provider_Settings__get_WIFI_STATIC_GATEWAY_);
+ value_to_get_map.put(Settings.System.STAY_ON_WHILE_PLUGGED_IN,
+ SEEMP_API_android_provider_Settings__get_STAY_ON_WHILE_PLUGGED_IN_);
+ value_to_get_map.put(Settings.System.SOUND_EFFECTS_ENABLED,
+ SEEMP_API_android_provider_Settings__get_SOUND_EFFECTS_ENABLED_);
+ value_to_get_map.put(Settings.System.WIFI_WATCHDOG_PING_COUNT,
+ SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_PING_COUNT_);
+ value_to_get_map.put(Settings.System.DATA_ROAMING,
+ SEEMP_API_android_provider_Settings__get_DATA_ROAMING_);
+ value_to_get_map.put(Settings.System.SETTINGS_CLASSNAME,
+ SEEMP_API_android_provider_Settings__get_SETTINGS_CLASSNAME_);
+ value_to_get_map.put(Settings.System.TRANSITION_ANIMATION_SCALE,
+ SEEMP_API_android_provider_Settings__get_TRANSITION_ANIMATION_SCALE_);
+ value_to_get_map.put(Settings.System.WAIT_FOR_DEBUGGER,
+ SEEMP_API_android_provider_Settings__get_WAIT_FOR_DEBUGGER_);
+ value_to_get_map.put(Settings.System.INSTALL_NON_MARKET_APPS,
+ SEEMP_API_android_provider_Settings__get_INSTALL_NON_MARKET_APPS_);
+ value_to_get_map.put(Settings.System.ADB_ENABLED,
+ SEEMP_API_android_provider_Settings__get_ADB_ENABLED_);
+ value_to_get_map.put(Settings.System.WIFI_USE_STATIC_IP,
+ SEEMP_API_android_provider_Settings__get_WIFI_USE_STATIC_IP_);
+ value_to_get_map.put(Settings.System.DIM_SCREEN,
+ SEEMP_API_android_provider_Settings__get_DIM_SCREEN_);
+ value_to_get_map.put(Settings.System.VOLUME_ALARM,
+ SEEMP_API_android_provider_Settings__get_VOLUME_ALARM_);
+ value_to_get_map.put(Settings.System.WIFI_WATCHDOG_ON,
+ SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_ON_);
+ value_to_get_map.put(Settings.System.WIFI_STATIC_NETMASK,
+ SEEMP_API_android_provider_Settings__get_WIFI_STATIC_NETMASK_);
+ value_to_get_map.put(Settings.System.NETWORK_PREFERENCE,
+ SEEMP_API_android_provider_Settings__get_NETWORK_PREFERENCE_);
+ value_to_get_map.put(Settings.System.SHOW_PROCESSES,
+ SEEMP_API_android_provider_Settings__get_SHOW_PROCESSES_);
+ value_to_get_map.put(Settings.System.TEXT_AUTO_REPLACE,
+ SEEMP_API_android_provider_Settings__get_TEXT_AUTO_REPLACE_);
+ value_to_get_map.put(Settings.System.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
+ SEEMP_API_android_provider_Settings__get_WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON_);
+ value_to_get_map.put(Settings.System.APPEND_FOR_LAST_AUDIBLE,
+ SEEMP_API_android_provider_Settings__get_APPEND_FOR_LAST_AUDIBLE_);
+ value_to_get_map.put(Settings.System.SHOW_GTALK_SERVICE_STATUS,
+ SEEMP_API_android_provider_Settings__get_SHOW_GTALK_SERVICE_STATUS_);
+ value_to_get_map.put(Settings.System.SCREEN_BRIGHTNESS,
+ SEEMP_API_android_provider_Settings__get_SCREEN_BRIGHTNESS_);
+ value_to_get_map.put(Settings.System.USE_GOOGLE_MAIL,
+ SEEMP_API_android_provider_Settings__get_USE_GOOGLE_MAIL_);
+ value_to_get_map.put(Settings.System.RINGTONE,
+ SEEMP_API_android_provider_Settings__get_RINGTONE_);
+ value_to_get_map.put(Settings.System.LOGGING_ID,
+ SEEMP_API_android_provider_Settings__get_LOGGING_ID_);
+ value_to_get_map.put(Settings.System.MODE_RINGER,
+ SEEMP_API_android_provider_Settings__get_MODE_RINGER_);
+ value_to_get_map.put(Settings.System.MUTE_STREAMS_AFFECTED,
+ SEEMP_API_android_provider_Settings__get_MUTE_STREAMS_AFFECTED_);
+ value_to_get_map.put(Settings.System.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE,
+ SEEMP_API_android_provider_Settings__get_WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE_);
+ value_to_get_map.put(Settings.System.TEXT_AUTO_PUNCTUATE,
+ SEEMP_API_android_provider_Settings__get_TEXT_AUTO_PUNCTUATE_);
+ value_to_get_map.put(Settings.System.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS,
+ SEEMP_API_android_provider_Settings__get_WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS_);
+ value_to_get_map.put(Settings.System.SCREEN_BRIGHTNESS_MODE,
+ SEEMP_API_android_provider_Settings__get_SCREEN_BRIGHTNESS_MODE_);
+ }
+
+ public static int getSeempGetApiIdFromValue( String v )
+ {
+ Integer result = value_to_get_map.get( v );
+ if (result == null)
+ {
+ result = -1;
+ }
+ return result;
+ }
+
+ private final static java.util.Map<String,Integer> value_to_put_map;
+ static {
+ value_to_put_map = new java.util.HashMap<String,Integer>( 198 );
+ value_to_put_map.put(Settings.System.NOTIFICATION_SOUND,
+ SEEMP_API_android_provider_Settings__put_NOTIFICATION_SOUND_);
+ value_to_put_map.put(Settings.System.DTMF_TONE_WHEN_DIALING,
+ SEEMP_API_android_provider_Settings__put_DTMF_TONE_WHEN_DIALING_);
+ value_to_put_map.put(Settings.System.LOCK_PATTERN_ENABLED,
+ SEEMP_API_android_provider_Settings__put_LOCK_PATTERN_ENABLED_);
+ value_to_put_map.put(Settings.System.WIFI_MAX_DHCP_RETRY_COUNT,
+ SEEMP_API_android_provider_Settings__put_WIFI_MAX_DHCP_RETRY_COUNT_);
+ value_to_put_map.put(Settings.System.AUTO_TIME,
+ SEEMP_API_android_provider_Settings__put_AUTO_TIME_);
+ value_to_put_map.put(Settings.System.SETUP_WIZARD_HAS_RUN,
+ SEEMP_API_android_provider_Settings__put_SETUP_WIZARD_HAS_RUN_);
+ value_to_put_map.put(Settings.System.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS,
+ SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS_);
+ value_to_put_map.put(Settings.System.LOCATION_PROVIDERS_ALLOWED,
+ SEEMP_API_android_provider_Settings__put_LOCATION_PROVIDERS_ALLOWED_);
+ value_to_put_map.put(Settings.System.ALARM_ALERT,
+ SEEMP_API_android_provider_Settings__put_ALARM_ALERT_);
+ value_to_put_map.put(Settings.System.VIBRATE_ON,
+ SEEMP_API_android_provider_Settings__put_VIBRATE_ON_);
+ value_to_put_map.put(Settings.System.USB_MASS_STORAGE_ENABLED,
+ SEEMP_API_android_provider_Settings__put_USB_MASS_STORAGE_ENABLED_);
+ value_to_put_map.put(Settings.System.WIFI_WATCHDOG_PING_DELAY_MS,
+ SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_PING_DELAY_MS_);
+ value_to_put_map.put(Settings.System.FONT_SCALE,
+ SEEMP_API_android_provider_Settings__put_FONT_SCALE_);
+ value_to_put_map.put(Settings.System.WIFI_WATCHDOG_AP_COUNT,
+ SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_AP_COUNT_);
+ value_to_put_map.put(Settings.System.ALWAYS_FINISH_ACTIVITIES,
+ SEEMP_API_android_provider_Settings__put_ALWAYS_FINISH_ACTIVITIES_);
+ value_to_put_map.put(Settings.System.ACCELEROMETER_ROTATION,
+ SEEMP_API_android_provider_Settings__put_ACCELEROMETER_ROTATION_);
+ value_to_put_map.put(Settings.System.WIFI_WATCHDOG_PING_TIMEOUT_MS,
+ SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_PING_TIMEOUT_MS_);
+ value_to_put_map.put(Settings.System.VOLUME_NOTIFICATION,
+ SEEMP_API_android_provider_Settings__put_VOLUME_NOTIFICATION_);
+ value_to_put_map.put(Settings.System.AIRPLANE_MODE_ON,
+ SEEMP_API_android_provider_Settings__put_AIRPLANE_MODE_ON_);
+ value_to_put_map.put(Settings.System.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS,
+ SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS_);
+ value_to_put_map.put(Settings.System.WIFI_STATIC_IP,
+ SEEMP_API_android_provider_Settings__put_WIFI_STATIC_IP_);
+ value_to_put_map.put(Settings.System.RADIO_BLUETOOTH,
+ SEEMP_API_android_provider_Settings__put_RADIO_BLUETOOTH_);
+ value_to_put_map.put(Settings.System.BLUETOOTH_DISCOVERABILITY_TIMEOUT,
+ SEEMP_API_android_provider_Settings__put_BLUETOOTH_DISCOVERABILITY_TIMEOUT_);
+ value_to_put_map.put(Settings.System.VOLUME_RING,
+ SEEMP_API_android_provider_Settings__put_VOLUME_RING_);
+ value_to_put_map.put(Settings.System.MODE_RINGER_STREAMS_AFFECTED,
+ SEEMP_API_android_provider_Settings__put_MODE_RINGER_STREAMS_AFFECTED_);
+ value_to_put_map.put(Settings.System.VOLUME_SYSTEM,
+ SEEMP_API_android_provider_Settings__put_VOLUME_SYSTEM_);
+ value_to_put_map.put(Settings.System.SCREEN_OFF_TIMEOUT,
+ SEEMP_API_android_provider_Settings__put_SCREEN_OFF_TIMEOUT_);
+ value_to_put_map.put(Settings.System.RADIO_WIFI,
+ SEEMP_API_android_provider_Settings__put_RADIO_WIFI_);
+ value_to_put_map.put(Settings.System.AUTO_TIME_ZONE,
+ SEEMP_API_android_provider_Settings__put_AUTO_TIME_ZONE_);
+ value_to_put_map.put(Settings.System.TEXT_AUTO_CAPS,
+ SEEMP_API_android_provider_Settings__put_TEXT_AUTO_CAPS_);
+ value_to_put_map.put(Settings.System.WALLPAPER_ACTIVITY,
+ SEEMP_API_android_provider_Settings__put_WALLPAPER_ACTIVITY_);
+ value_to_put_map.put(Settings.System.ANIMATOR_DURATION_SCALE,
+ SEEMP_API_android_provider_Settings__put_ANIMATOR_DURATION_SCALE_);
+ value_to_put_map.put(Settings.System.WIFI_NUM_OPEN_NETWORKS_KEPT,
+ SEEMP_API_android_provider_Settings__put_WIFI_NUM_OPEN_NETWORKS_KEPT_);
+ value_to_put_map.put(Settings.System.LOCK_PATTERN_VISIBLE,
+ SEEMP_API_android_provider_Settings__put_LOCK_PATTERN_VISIBLE_);
+ value_to_put_map.put(Settings.System.VOLUME_VOICE,
+ SEEMP_API_android_provider_Settings__put_VOLUME_VOICE_);
+ value_to_put_map.put(Settings.System.DEBUG_APP,
+ SEEMP_API_android_provider_Settings__put_DEBUG_APP_);
+ value_to_put_map.put(Settings.System.WIFI_ON,
+ SEEMP_API_android_provider_Settings__put_WIFI_ON_);
+ value_to_put_map.put(Settings.System.TEXT_SHOW_PASSWORD,
+ SEEMP_API_android_provider_Settings__put_TEXT_SHOW_PASSWORD_);
+ value_to_put_map.put(Settings.System.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,
+ SEEMP_API_android_provider_Settings__put_WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY_);
+ value_to_put_map.put(Settings.System.WIFI_SLEEP_POLICY,
+ SEEMP_API_android_provider_Settings__put_WIFI_SLEEP_POLICY_);
+ value_to_put_map.put(Settings.System.VOLUME_MUSIC,
+ SEEMP_API_android_provider_Settings__put_VOLUME_MUSIC_);
+ value_to_put_map.put(Settings.System.PARENTAL_CONTROL_LAST_UPDATE,
+ SEEMP_API_android_provider_Settings__put_PARENTAL_CONTROL_LAST_UPDATE_);
+ value_to_put_map.put(Settings.System.DEVICE_PROVISIONED,
+ SEEMP_API_android_provider_Settings__put_DEVICE_PROVISIONED_);
+ value_to_put_map.put(Settings.System.HTTP_PROXY,
+ SEEMP_API_android_provider_Settings__put_HTTP_PROXY_);
+ value_to_put_map.put(Settings.System.ANDROID_ID,
+ SEEMP_API_android_provider_Settings__put_ANDROID_ID_);
+ value_to_put_map.put(Settings.System.WIFI_WATCHDOG_MAX_AP_CHECKS,
+ SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_MAX_AP_CHECKS_);
+ value_to_put_map.put(Settings.System.END_BUTTON_BEHAVIOR,
+ SEEMP_API_android_provider_Settings__put_END_BUTTON_BEHAVIOR_);
+ value_to_put_map.put(Settings.System.NEXT_ALARM_FORMATTED,
+ SEEMP_API_android_provider_Settings__put_NEXT_ALARM_FORMATTED_);
+ value_to_put_map.put(Settings.System.RADIO_CELL,
+ SEEMP_API_android_provider_Settings__put_RADIO_CELL_);
+ value_to_put_map.put(Settings.System.PARENTAL_CONTROL_ENABLED,
+ SEEMP_API_android_provider_Settings__put_PARENTAL_CONTROL_ENABLED_);
+ value_to_put_map.put(Settings.System.BLUETOOTH_ON,
+ SEEMP_API_android_provider_Settings__put_BLUETOOTH_ON_);
+ value_to_put_map.put(Settings.System.WINDOW_ANIMATION_SCALE,
+ SEEMP_API_android_provider_Settings__put_WINDOW_ANIMATION_SCALE_);
+ value_to_put_map.put(Settings.System.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED,
+ SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED_);
+ value_to_put_map.put(Settings.System.BLUETOOTH_DISCOVERABILITY,
+ SEEMP_API_android_provider_Settings__put_BLUETOOTH_DISCOVERABILITY_);
+ value_to_put_map.put(Settings.System.WIFI_STATIC_DNS1,
+ SEEMP_API_android_provider_Settings__put_WIFI_STATIC_DNS1_);
+ value_to_put_map.put(Settings.System.WIFI_STATIC_DNS2,
+ SEEMP_API_android_provider_Settings__put_WIFI_STATIC_DNS2_);
+ value_to_put_map.put(Settings.System.HAPTIC_FEEDBACK_ENABLED,
+ SEEMP_API_android_provider_Settings__put_HAPTIC_FEEDBACK_ENABLED_);
+ value_to_put_map.put(Settings.System.SHOW_WEB_SUGGESTIONS,
+ SEEMP_API_android_provider_Settings__put_SHOW_WEB_SUGGESTIONS_);
+ value_to_put_map.put(Settings.System.PARENTAL_CONTROL_REDIRECT_URL,
+ SEEMP_API_android_provider_Settings__put_PARENTAL_CONTROL_REDIRECT_URL_);
+ value_to_put_map.put(Settings.System.DATE_FORMAT,
+ SEEMP_API_android_provider_Settings__put_DATE_FORMAT_);
+ value_to_put_map.put(Settings.System.RADIO_NFC,
+ SEEMP_API_android_provider_Settings__put_RADIO_NFC_);
+ value_to_put_map.put(Settings.System.AIRPLANE_MODE_RADIOS,
+ SEEMP_API_android_provider_Settings__put_AIRPLANE_MODE_RADIOS_);
+ value_to_put_map.put(Settings.System.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED,
+ SEEMP_API_android_provider_Settings__put_LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED_);
+ value_to_put_map.put(Settings.System.TIME_12_24,
+ SEEMP_API_android_provider_Settings__put_TIME_12_24_);
+ value_to_put_map.put(Settings.System.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT,
+ SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT_);
+ value_to_put_map.put(Settings.System.VOLUME_BLUETOOTH_SCO,
+ SEEMP_API_android_provider_Settings__put_VOLUME_BLUETOOTH_SCO_);
+ value_to_put_map.put(Settings.System.USER_ROTATION,
+ SEEMP_API_android_provider_Settings__put_USER_ROTATION_);
+ value_to_put_map.put(Settings.System.WIFI_STATIC_GATEWAY,
+ SEEMP_API_android_provider_Settings__put_WIFI_STATIC_GATEWAY_);
+ value_to_put_map.put(Settings.System.STAY_ON_WHILE_PLUGGED_IN,
+ SEEMP_API_android_provider_Settings__put_STAY_ON_WHILE_PLUGGED_IN_);
+ value_to_put_map.put(Settings.System.SOUND_EFFECTS_ENABLED,
+ SEEMP_API_android_provider_Settings__put_SOUND_EFFECTS_ENABLED_);
+ value_to_put_map.put(Settings.System.WIFI_WATCHDOG_PING_COUNT,
+ SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_PING_COUNT_);
+ value_to_put_map.put(Settings.System.DATA_ROAMING,
+ SEEMP_API_android_provider_Settings__put_DATA_ROAMING_);
+ value_to_put_map.put(Settings.System.SETTINGS_CLASSNAME,
+ SEEMP_API_android_provider_Settings__put_SETTINGS_CLASSNAME_);
+ value_to_put_map.put(Settings.System.TRANSITION_ANIMATION_SCALE,
+ SEEMP_API_android_provider_Settings__put_TRANSITION_ANIMATION_SCALE_);
+ value_to_put_map.put(Settings.System.WAIT_FOR_DEBUGGER,
+ SEEMP_API_android_provider_Settings__put_WAIT_FOR_DEBUGGER_);
+ value_to_put_map.put(Settings.System.INSTALL_NON_MARKET_APPS,
+ SEEMP_API_android_provider_Settings__put_INSTALL_NON_MARKET_APPS_);
+ value_to_put_map.put(Settings.System.ADB_ENABLED,
+ SEEMP_API_android_provider_Settings__put_ADB_ENABLED_);
+ value_to_put_map.put(Settings.System.WIFI_USE_STATIC_IP,
+ SEEMP_API_android_provider_Settings__put_WIFI_USE_STATIC_IP_);
+ value_to_put_map.put(Settings.System.DIM_SCREEN,
+ SEEMP_API_android_provider_Settings__put_DIM_SCREEN_);
+ value_to_put_map.put(Settings.System.VOLUME_ALARM,
+ SEEMP_API_android_provider_Settings__put_VOLUME_ALARM_);
+ value_to_put_map.put(Settings.System.WIFI_WATCHDOG_ON,
+ SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_ON_);
+ value_to_put_map.put(Settings.System.WIFI_STATIC_NETMASK,
+ SEEMP_API_android_provider_Settings__put_WIFI_STATIC_NETMASK_);
+ value_to_put_map.put(Settings.System.NETWORK_PREFERENCE,
+ SEEMP_API_android_provider_Settings__put_NETWORK_PREFERENCE_);
+ value_to_put_map.put(Settings.System.SHOW_PROCESSES,
+ SEEMP_API_android_provider_Settings__put_SHOW_PROCESSES_);
+ value_to_put_map.put(Settings.System.TEXT_AUTO_REPLACE,
+ SEEMP_API_android_provider_Settings__put_TEXT_AUTO_REPLACE_);
+ value_to_put_map.put(Settings.System.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
+ SEEMP_API_android_provider_Settings__put_WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON_);
+ value_to_put_map.put(Settings.System.APPEND_FOR_LAST_AUDIBLE,
+ SEEMP_API_android_provider_Settings__put_APPEND_FOR_LAST_AUDIBLE_);
+ value_to_put_map.put(Settings.System.SHOW_GTALK_SERVICE_STATUS,
+ SEEMP_API_android_provider_Settings__put_SHOW_GTALK_SERVICE_STATUS_);
+ value_to_put_map.put(Settings.System.SCREEN_BRIGHTNESS,
+ SEEMP_API_android_provider_Settings__put_SCREEN_BRIGHTNESS_);
+ value_to_put_map.put(Settings.System.USE_GOOGLE_MAIL,
+ SEEMP_API_android_provider_Settings__put_USE_GOOGLE_MAIL_);
+ value_to_put_map.put(Settings.System.RINGTONE,
+ SEEMP_API_android_provider_Settings__put_RINGTONE_);
+ value_to_put_map.put(Settings.System.LOGGING_ID,
+ SEEMP_API_android_provider_Settings__put_LOGGING_ID_);
+ value_to_put_map.put(Settings.System.MODE_RINGER,
+ SEEMP_API_android_provider_Settings__put_MODE_RINGER_);
+ value_to_put_map.put(Settings.System.MUTE_STREAMS_AFFECTED,
+ SEEMP_API_android_provider_Settings__put_MUTE_STREAMS_AFFECTED_);
+ value_to_put_map.put(Settings.System.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE,
+ SEEMP_API_android_provider_Settings__put_WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE_);
+ value_to_put_map.put(Settings.System.TEXT_AUTO_PUNCTUATE,
+ SEEMP_API_android_provider_Settings__put_TEXT_AUTO_PUNCTUATE_);
+ value_to_put_map.put(Settings.System.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS,
+ SEEMP_API_android_provider_Settings__put_WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS_);
+ value_to_put_map.put(Settings.System.SCREEN_BRIGHTNESS_MODE,
+ SEEMP_API_android_provider_Settings__put_SCREEN_BRIGHTNESS_MODE_);
+ }
+
+ public static int getSeempPutApiIdFromValue( String v )
+ {
+ Integer result = value_to_put_map.get( v );
+ if (result == null)
+ {
+ result = -1;
+ }
+ return result;
+ }
+}
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java
index e778a7f..6ace304 100644
--- a/core/java/android/view/SurfaceControl.java
+++ b/core/java/android/view/SurfaceControl.java
@@ -230,6 +230,12 @@
*/
public static final int BUILT_IN_DISPLAY_ID_HDMI = 1;
+ /**
+ * Built-in physical display id: Attached HDMI display.
+ * Use only with {@link SurfaceControl#getBuiltInDisplay(int)}.
+ */
+ public static final int BUILT_IN_DISPLAY_ID_TERTIARY = 2;
+
/* Display power modes * /
/**
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 4b9a570..3e457b0 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -33,6 +33,7 @@
import android.os.ParcelFileDescriptor;
import android.util.AttributeSet;
import android.util.Log;
+import android.util.ResolutionOverride;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
@@ -190,6 +191,7 @@
private Translator mTranslator;
private int mWindowInsetLeft;
private int mWindowInsetTop;
+ ResolutionOverride mResolutionOverride = null;
private boolean mGlobalListenersAdded;
@@ -209,6 +211,8 @@
super(context, attrs, defStyleAttr, defStyleRes);
setWillNotDraw(true);
+ mResolutionOverride = new ResolutionOverride(this);
+ mResolutionOverride.setFixedSize(this);
}
/**
@@ -302,6 +306,16 @@
setMeasuredDimension(width, height);
}
+ /**
+ * Transforms the touch events to the new resolution coordinate system
+ * if the resolution has changed
+ */
+ @Override
+ public boolean dispatchTouchEvent(MotionEvent ev) {
+ mResolutionOverride.handleTouch(this, ev);
+ return super.dispatchTouchEvent(ev);
+ }
+
/** @hide */
@Override
protected boolean setFrame(int left, int top, int right, int bottom) {
@@ -823,10 +837,13 @@
Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw,
Configuration newConfig, Rect backDropRect, boolean forceLayout,
boolean alwaysConsumeNavBar) {
- SurfaceView surfaceView = mSurfaceView.get();
+ final SurfaceView surfaceView = mSurfaceView.get();
if (surfaceView != null) {
if (DEBUG) Log.v(TAG, surfaceView + " got resized: w=" + frame.width()
+ " h=" + frame.height() + ", cur w=" + mCurWidth + " h=" + mCurHeight);
+
+ surfaceView.mResolutionOverride.handleResize(surfaceView);
+
surfaceView.mSurfaceLock.lock();
try {
if (reportDraw) {
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 9462d1c..984078a 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -10004,6 +10004,7 @@
final int actionMasked = event.getActionMasked();
if (actionMasked == MotionEvent.ACTION_DOWN) {
+ android.util.SeempLog.record(3);
// Defensive cleanup for new gesture
stopNestedScroll();
}
@@ -10600,6 +10601,7 @@
* @param event the KeyEvent object that defines the button action
*/
public boolean onKeyDown(int keyCode, KeyEvent event) {
+ android.util.SeempLog.record(4);
if (KeyEvent.isConfirmKey(keyCode)) {
if ((mViewFlags & ENABLED_MASK) == DISABLED) {
return true;
@@ -10648,6 +10650,7 @@
* @param event The KeyEvent object that defines the button action.
*/
public boolean onKeyUp(int keyCode, KeyEvent event) {
+ android.util.SeempLog.record(5);
if (KeyEvent.isConfirmKey(keyCode)) {
if ((mViewFlags & ENABLED_MASK) == DISABLED) {
return true;
@@ -11157,6 +11160,7 @@
* @return True if the event was handled, false otherwise.
*/
public boolean onTouchEvent(MotionEvent event) {
+ android.util.SeempLog.record(3);
final float x = event.getX();
final float y = event.getY();
final int viewFlags = mViewFlags;
@@ -16937,7 +16941,7 @@
Bitmap cache = null;
int layerType = getLayerType(); // TODO: signify cache state with just 'cache' local
if (layerType == LAYER_TYPE_SOFTWARE || !drawingWithRenderNode) {
- if (layerType != LAYER_TYPE_NONE) {
+ if (layerType != LAYER_TYPE_NONE && layerType != LAYER_TYPE_SOFTWARE) {
// If not drawing with RenderNode, treat HW layers as SW
layerType = LAYER_TYPE_SOFTWARE;
buildDrawingCache(true);
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index ac5a5db..0248cab 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -69,6 +69,7 @@
import android.util.Slog;
import android.util.TimeUtils;
import android.util.TypedValue;
+import android.util.BoostFramework;
import android.view.Surface.OutOfResourcesException;
import android.view.View.AttachInfo;
import android.view.View.MeasureSpec;
@@ -407,6 +408,12 @@
}
private String mTag = TAG;
+ boolean mHaveMoveEvent = false;
+ boolean mIsPerfLockAcquired = false;
+ boolean mIsPreFlingBoostEnabled = false;
+ BoostFramework mPerf = null;
+ int mPreFlingBoostTimeOut = 0;
+ int mPreFlingBoostParamVal[];
public ViewRootImpl(Context context, Display display) {
mContext = context;
@@ -444,6 +451,14 @@
mFallbackEventHandler = new PhoneFallbackEventHandler(context);
mChoreographer = Choreographer.getInstance();
mDisplayManager = (DisplayManager)context.getSystemService(Context.DISPLAY_SERVICE);
+ mIsPreFlingBoostEnabled = context.getResources().getBoolean(
+ com.android.internal.R.bool.config_enableCpuBoostForPreFling);
+ if (mIsPreFlingBoostEnabled) {
+ mPreFlingBoostTimeOut = context.getResources().getInteger(
+ com.android.internal.R.integer.preflingboost_timeout_param);
+ mPreFlingBoostParamVal = context.getResources().getIntArray(
+ com.android.internal.R.array.preflingboost_param_value);
+ }
loadSystemProperties();
}
@@ -2683,6 +2698,15 @@
scrollToRectOrFocus(null, false);
if (mAttachInfo.mViewScrollChanged) {
+ if (mIsPreFlingBoostEnabled && mHaveMoveEvent && !mIsPerfLockAcquired) {
+ mIsPerfLockAcquired = true;
+ if (mPerf == null) {
+ mPerf = new BoostFramework();
+ }
+ if (mPerf != null) {
+ mPerf.perfLockAcquire(mPreFlingBoostTimeOut, mPreFlingBoostParamVal);
+ }
+ }
mAttachInfo.mViewScrollChanged = false;
mAttachInfo.mTreeObserver.dispatchOnScrollChanged();
}
@@ -3390,6 +3414,7 @@
private final static int MSG_DISPATCH_WINDOW_SHOWN = 25;
private final static int MSG_REQUEST_KEYBOARD_SHORTCUTS = 26;
private final static int MSG_UPDATE_POINTER_ICON = 27;
+ private final static int MSG_HIGHTEXT_CONTRAST_CHANGED = 28;
final class ViewRootHandler extends Handler {
@Override
@@ -3439,6 +3464,8 @@
return "MSG_DISPATCH_WINDOW_SHOWN";
case MSG_UPDATE_POINTER_ICON:
return "MSG_UPDATE_POINTER_ICON";
+ case MSG_HIGHTEXT_CONTRAST_CHANGED:
+ return "MSG_HIGHTEXT_CONTRAST_CHANGED";
}
return super.getMessageName(message);
}
@@ -3697,6 +3724,9 @@
MotionEvent event = (MotionEvent) msg.obj;
resetPointerIcon(event);
} break;
+ case MSG_HIGHTEXT_CONTRAST_CHANGED: {
+ handleHighTextContrastChange(msg.arg1 != 0);
+ } break;
}
}
}
@@ -4436,6 +4466,13 @@
mCapturingView : mView;
mAttachInfo.mHandlingPointerEvent = true;
boolean handled = eventTarget.dispatchPointerEvent(event);
+ int action = event.getActionMasked();
+ if (action == MotionEvent.ACTION_MOVE) {
+ mHaveMoveEvent = true;
+ } else if (action == MotionEvent.ACTION_UP) {
+ mHaveMoveEvent = false;
+ mIsPerfLockAcquired = false;
+ }
maybeUpdatePointerIcon(event);
mAttachInfo.mHandlingPointerEvent = false;
if (mAttachInfo.mUnbufferedDispatchRequested && !mUnbufferedInputDispatch) {
@@ -7310,19 +7347,27 @@
}
}
+ void handleHighTextContrastChange(boolean enabled) {
+ mAttachInfo.mHighContrastText = enabled;
+ // Destroy Displaylists so they can be recreated with high contrast recordings
+ destroyHardwareResources();
+ // Schedule redraw, which will rerecord + redraw all text
+ invalidate();
+ }
+
+ public void dispatchHighTextContrastChange(boolean enabled) {
+ Message msg = mHandler.obtainMessage(MSG_HIGHTEXT_CONTRAST_CHANGED);
+ msg.arg1 = enabled ? 1 : 0;
+ mHandler.sendMessage(msg);
+ }
+
final class HighContrastTextManager implements HighTextContrastChangeListener {
HighContrastTextManager() {
mAttachInfo.mHighContrastText = mAccessibilityManager.isHighTextContrastEnabled();
}
@Override
public void onHighTextContrastStateChanged(boolean enabled) {
- mAttachInfo.mHighContrastText = enabled;
-
- // Destroy Displaylists so they can be recreated with high contrast recordings
- destroyHardwareResources();
-
- // Schedule redraw, which will rerecord + redraw all text
- invalidate();
+ dispatchHighTextContrastChange(enabled);
}
}
diff --git a/core/java/android/view/WindowManagerImpl.java b/core/java/android/view/WindowManagerImpl.java
index dd4e096..c07c87c 100644
--- a/core/java/android/view/WindowManagerImpl.java
+++ b/core/java/android/view/WindowManagerImpl.java
@@ -89,12 +89,14 @@
@Override
public void addView(@NonNull View view, @NonNull ViewGroup.LayoutParams params) {
+ android.util.SeempLog.record_vg_layout(383,params);
applyDefaultToken(params);
mGlobal.addView(view, params, mContext.getDisplay(), mParentWindow);
}
@Override
public void updateViewLayout(@NonNull View view, @NonNull ViewGroup.LayoutParams params) {
+ android.util.SeempLog.record_vg_layout(384,params);
applyDefaultToken(params);
mGlobal.updateViewLayout(view, params);
}
diff --git a/core/java/android/webkit/WebChromeClient.java b/core/java/android/webkit/WebChromeClient.java
index 2d3b6ab..1849dac 100644
--- a/core/java/android/webkit/WebChromeClient.java
+++ b/core/java/android/webkit/WebChromeClient.java
@@ -297,7 +297,9 @@
* origin.
*/
public void onGeolocationPermissionsShowPrompt(String origin,
- GeolocationPermissions.Callback callback) {}
+ GeolocationPermissions.Callback callback) {
+ android.util.SeempLog.record(54);
+ }
/**
* Notify the host application that a request for Geolocation permissions,
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index c01348d..49d1955 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -2174,6 +2174,13 @@
// TODO: Move somewhere sane. This doesn't belong in onLayout().
if (mFastScroll != null) {
mFastScroll.onItemCountChanged(getChildCount(), mItemCount);
+ //This may call internalSetPadding and cause children dirty.
+ //So need to layout children again.
+ if(isLayoutRequested()){
+ mInLayout = true;
+ layoutChildren();
+ mInLayout = false;
+ }
}
mInLayout = false;
}
diff --git a/core/java/android/widget/ListPopupWindow.java b/core/java/android/widget/ListPopupWindow.java
index 6a10743..14ad412 100644
--- a/core/java/android/widget/ListPopupWindow.java
+++ b/core/java/android/widget/ListPopupWindow.java
@@ -628,7 +628,7 @@
} else if (mDropDownHeight == ViewGroup.LayoutParams.WRAP_CONTENT) {
heightSpec = height;
} else {
- heightSpec = mDropDownHeight;
+ heightSpec = Math.max(1, mDropDownHeight);
}
mPopup.setOutsideTouchable(!mForceIgnoreOutsideTouch && !mDropDownAlwaysVisible);
@@ -655,7 +655,7 @@
if (mDropDownHeight == ViewGroup.LayoutParams.WRAP_CONTENT) {
heightSpec = height;
} else {
- heightSpec = mDropDownHeight;
+ heightSpec = Math.max(1, mDropDownHeight);
}
}
diff --git a/core/java/android/widget/MenuPopupWindow.java b/core/java/android/widget/MenuPopupWindow.java
index 85e26d0..32a5724 100644
--- a/core/java/android/widget/MenuPopupWindow.java
+++ b/core/java/android/widget/MenuPopupWindow.java
@@ -138,7 +138,15 @@
setNextSelectedPositionInt(INVALID_POSITION);
// Close only the top-level menu.
- ((MenuAdapter) getAdapter()).getAdapterMenu().close(false /* closeAllMenus */);
+ final ListAdapter adapter = getAdapter();
+ final MenuAdapter menuAdapter;
+ if (adapter instanceof HeaderViewListAdapter) {
+ final HeaderViewListAdapter headerAdapter = (HeaderViewListAdapter) adapter;
+ menuAdapter = (MenuAdapter) headerAdapter.getWrappedAdapter();
+ } else {
+ menuAdapter = (MenuAdapter) adapter;
+ }
+ menuAdapter.getAdapterMenu().close(false /* closeAllMenus */);
return true;
}
return super.onKeyDown(keyCode, event);
@@ -191,4 +199,4 @@
return super.onHoverEvent(ev);
}
}
-}
\ No newline at end of file
+}
diff --git a/core/java/android/widget/OverScroller.java b/core/java/android/widget/OverScroller.java
index 50569d7..ba5d39e 100644
--- a/core/java/android/widget/OverScroller.java
+++ b/core/java/android/widget/OverScroller.java
@@ -22,6 +22,7 @@
import android.view.ViewConfiguration;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
+import android.util.BoostFramework;
/**
* This class encapsulates scrolling with the ability to overshoot the bounds
@@ -599,6 +600,18 @@
private static final int CUBIC = 1;
private static final int BALLISTIC = 2;
+ /*
+ * Perf boost related variables
+ * Enabled/Disabled using config_enableCpuBoostForOverScrollerFling
+ * true value turns it on, by default will be turned off
+ */
+ private BoostFramework mPerf = null;
+ private boolean mIsPerfLockAcquired = false;
+ private boolean mIsPerfBoostEnabled = false;
+ private int fBoostTimeOut = 0;
+ private int flingBoostTimeOut = 0;
+ private int fBoostParamVal[];
+
static {
float x_min = 0.0f;
float y_min = 0.0f;
@@ -643,6 +656,19 @@
* 39.37f // inch/meter
* ppi
* 0.84f; // look and feel tuning
+
+ mIsPerfBoostEnabled = context.getResources().getBoolean(
+ com.android.internal.R.bool.config_enableCpuBoostForOverScrollerFling);
+ if (mIsPerfBoostEnabled) {
+ fBoostTimeOut = context.getResources().getInteger(
+ com.android.internal.R.integer.flingboost_timeout_param);
+ fBoostParamVal = context.getResources().getIntArray(
+ com.android.internal.R.array.flingboost_param_value);
+ }
+
+ if (mPerf == null && mIsPerfBoostEnabled) {
+ mPerf = new BoostFramework();
+ }
}
void updateScroll(float q) {
@@ -690,6 +716,11 @@
}
void finish() {
+ if (mIsPerfLockAcquired && mPerf != null) {
+ mPerf.perfLockRelease();
+ mIsPerfLockAcquired = false;
+ }
+
mCurrentPosition = mFinal;
// Not reset since WebView relies on this value for fast fling.
// TODO: restore when WebView uses the fast fling implemented in this class.
@@ -749,6 +780,11 @@
mStartTime = AnimationUtils.currentAnimationTimeMillis();
mCurrentPosition = mStart = start;
+ if (mIsPerfLockAcquired && mPerf != null) {
+ mPerf.perfLockRelease();
+ mIsPerfLockAcquired = false;
+ }
+
if (start > max || start < min) {
startAfterEdge(start, min, max, velocity);
return;
@@ -913,6 +949,18 @@
return false;
}
+ if (mPerf != null && !mIsPerfLockAcquired) {
+ mIsPerfLockAcquired = true;
+ if (0 == fBoostTimeOut) {
+ //config value is not defined
+ flingBoostTimeOut = mDuration;
+ } else {
+ //config value is present
+ flingBoostTimeOut = fBoostTimeOut;
+ }
+ mPerf.perfLockAcquire(flingBoostTimeOut, fBoostParamVal);
+ }
+
double distance = 0.0;
switch (mState) {
case SPLINE: {
diff --git a/core/java/android/widget/Scroller.java b/core/java/android/widget/Scroller.java
index 357c9c3..d0ba9e6 100644
--- a/core/java/android/widget/Scroller.java
+++ b/core/java/android/widget/Scroller.java
@@ -22,6 +22,7 @@
import android.view.ViewConfiguration;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
+import android.util.BoostFramework;
/**
@@ -108,6 +109,17 @@
private float mDeceleration;
private final float mPpi;
+ /*
+ * Perf boost related variables
+ * Enabled/Disabled using config_enableCpuBoostForScroller
+ * true value turns it on, by default will be turned off
+ */
+ private BoostFramework mPerf = null;
+ boolean bIsPerfBoostEnabled = false;
+ private int sBoostTimeOut = 0;
+ private int scrollBoostTimeOut = 0;
+ private int sBoostParamVal[];
+
// A context-specific coefficient adjusted to physical values.
private float mPhysicalCoeff;
@@ -167,6 +179,7 @@
* not to support progressive "flywheel" behavior in flinging.
*/
public Scroller(Context context, Interpolator interpolator, boolean flywheel) {
+ boolean bIsPerfBoostEnabled = false;
mFinished = true;
if (interpolator == null) {
mInterpolator = new ViscousFluidInterpolator();
@@ -178,6 +191,18 @@
mFlywheel = flywheel;
mPhysicalCoeff = computeDeceleration(0.84f); // look and feel tuning
+ bIsPerfBoostEnabled = context.getResources().getBoolean(
+ com.android.internal.R.bool.config_enableCpuBoostForScroller);
+ if (bIsPerfBoostEnabled) {
+ sBoostTimeOut = context.getResources().getInteger(
+ com.android.internal.R.integer.scrollboost_timeout_param);
+ sBoostParamVal = context.getResources().getIntArray(
+ com.android.internal.R.array.scrollboost_param_value);
+ }
+ if (mPerf == null && bIsPerfBoostEnabled) {
+ mPerf = new BoostFramework();
+ }
+
}
/**
@@ -395,6 +420,17 @@
mDeltaX = dx;
mDeltaY = dy;
mDurationReciprocal = 1.0f / (float) mDuration;
+
+ if ((mPerf != null) && (duration != 0)) {
+ if (0 == sBoostTimeOut) {
+ //config value is not defined
+ scrollBoostTimeOut = mDuration;
+ } else {
+ //config value is present
+ scrollBoostTimeOut = sBoostTimeOut;
+ }
+ mPerf.perfLockAcquire(scrollBoostTimeOut, sBoostParamVal);
+ }
}
/**
diff --git a/core/java/com/android/internal/app/ActivityTrigger.java b/core/java/com/android/internal/app/ActivityTrigger.java
new file mode 100644
index 0000000..4ac548e
--- /dev/null
+++ b/core/java/com/android/internal/app/ActivityTrigger.java
@@ -0,0 +1,150 @@
+/* Copyright (c) 2015-2016, 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.
+ *
+ */
+
+package com.android.internal.app;
+
+import android.content.ComponentName;
+import android.content.Intent;
+import android.content.pm.ActivityInfo;
+import android.content.pm.ApplicationInfo;
+import android.util.Log;
+
+public class ActivityTrigger
+{
+ private static final String TAG = "ActivityTrigger";
+
+ private static final int FLAG_OVERRIDE_RESOLUTION = 1;
+ private static final int FLAG_HARDWARE_ACCELERATED =
+ ActivityInfo.FLAG_HARDWARE_ACCELERATED;
+
+
+ /** &hide */
+ public ActivityTrigger() {
+ //Log.d(TAG, "ActivityTrigger initialized");
+ }
+
+ /** &hide */
+ protected void finalize() {
+ native_at_deinit();
+ }
+
+ /** &hide */
+ public void activityStartTrigger(Intent intent, ActivityInfo acInfo,
+ ApplicationInfo appInfo, boolean IsInFullScreen) {
+ ComponentName cn = intent.getComponent();
+ int overrideFlags = 0;
+ String activity = null;
+
+ if(cn != null)
+ activity = cn.flattenToString() + "/" + appInfo.versionCode;
+
+ overrideFlags = native_at_startActivity(activity, overrideFlags);
+
+ if((overrideFlags & FLAG_HARDWARE_ACCELERATED) != 0) {
+ acInfo.flags |= ActivityInfo.FLAG_HARDWARE_ACCELERATED;
+ }
+ //Overrride density only if Activity is started/resumed in fullscreen
+ if(IsInFullScreen) {
+ Log.d(TAG, "activityStartTrigger: Activity is Triggerred in full screen "
+ + appInfo);
+ if((overrideFlags & FLAG_OVERRIDE_RESOLUTION) != 0) {
+ Log.e(TAG, "activityStartTrigger: whiteListed " + activity +
+ " appInfo.flags - " + Integer.toHexString(appInfo.flags));
+ appInfo.setAppOverrideDensity();
+ appInfo.setAppWhiteListed(1);
+ } else {
+ appInfo.setOverrideDensity(0);
+ appInfo.setAppWhiteListed(0);
+ Log.e(TAG, "activityStartTrigger: not whiteListed" + activity);
+ }
+ } else {
+ Log.d(TAG, "activityStartTrigger: Activity is not Triggerred in full screen "
+ + appInfo);
+ appInfo.setOverrideDensity(0);
+ }
+ }
+
+ /** &hide */
+ public void activityResumeTrigger(Intent intent, ActivityInfo acInfo,
+ ApplicationInfo appInfo, boolean IsInFullScreen) {
+ ComponentName cn = intent.getComponent();
+ String activity = null;
+
+ if (cn != null)
+ activity = cn.flattenToString() + "/" + appInfo.versionCode;
+ native_at_resumeActivity(activity);
+
+ //Overrride density only if Activity is started/resumed in fullscreen
+ if(IsInFullScreen) {
+ Log.d(TAG, "activityResumeTrigger: The activity in " + appInfo +
+ " is now in focus and seems to be in full-screen mode");
+ if(appInfo.isAppWhiteListed()) {
+ Log.e(TAG, "activityResumeTrigger: whiteListed " + activity +
+ " appInfo.flags - " + Integer.toHexString(appInfo.flags));
+ appInfo.setAppOverrideDensity();
+ } else {
+ appInfo.setOverrideDensity(0);
+ Log.e(TAG, "activityResumeTrigger: not whiteListed" + activity);
+ }
+ } else {
+ Log.d(TAG, "activityResumeTrigger: Activity is not Triggerred in full screen "
+ + appInfo);
+ appInfo.setOverrideDensity(0);
+ }
+ }
+
+ public void activityPauseTrigger(Intent intent, ActivityInfo acInfo, ApplicationInfo appInfo) {
+ ComponentName cn = intent.getComponent();
+ String activity = null;
+ Log.d(TAG, "ActivityTrigger activityPauseTrigger ");
+ if (null != cn && null != appInfo)
+ activity = cn.flattenToString() + "/" + appInfo.versionCode;
+ native_at_pauseActivity(activity);
+ }
+
+ public void activityStopTrigger(Intent intent, ActivityInfo acInfo, ApplicationInfo appInfo) {
+ ComponentName cn = intent.getComponent();
+ String activity = null;
+ Log.d(TAG, "ActivityTrigger activityStopTrigger ");
+ if (null != cn && null != appInfo)
+ activity = cn.flattenToString() + "/" + appInfo.versionCode;
+ native_at_stopActivity(activity);
+ }
+
+ public float activityMiscTrigger(int func, String activity, int flag, int type) {
+ return native_at_miscActivity(func, activity, flag, type);
+ }
+
+ private native int native_at_startActivity(String activity, int flags);
+ private native void native_at_resumeActivity(String activity);
+ private native void native_at_pauseActivity(String activity);
+ private native void native_at_stopActivity(String activity);
+ private native void native_at_deinit();
+ private native float native_at_miscActivity(int func, String activity, int flag, int type);
+}
diff --git a/core/java/com/android/internal/app/AlertController.java b/core/java/com/android/internal/app/AlertController.java
old mode 100644
new mode 100755
index 95c291a..d5aeec6
--- a/core/java/com/android/internal/app/AlertController.java
+++ b/core/java/com/android/internal/app/AlertController.java
@@ -192,7 +192,7 @@
}
}
- protected AlertController(Context context, DialogInterface di, Window window) {
+ public AlertController(Context context, DialogInterface di, Window window) {
mContext = context;
mDialogInterface = di;
mWindow = window;
@@ -1112,7 +1112,24 @@
if (mCursor != null) {
adapter = new SimpleCursorAdapter(mContext, layout, mCursor,
- new String[] { mLabelColumn }, new int[] { R.id.text1 });
+ new String[] { mLabelColumn }, new int[] { R.id.text1 }) {
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ View view = super.getView(position, convertView, parent);
+ if (view instanceof CheckedTextView) {
+ final CheckedTextView checkedTextView = (CheckedTextView) view;
+ if (mCheckedItem != -1) {
+ if (mCheckedItem != position) {
+ checkedTextView.setChecked(false);
+ }
+ }
+
+ return checkedTextView;
+ } else {
+ return view;
+ }
+ }
+ };
} else if (mAdapter != null) {
adapter = mAdapter;
} else {
diff --git a/core/java/com/android/internal/app/IAppOpsService.aidl b/core/java/com/android/internal/app/IAppOpsService.aidl
index 3a31b37..aa96179 100644
--- a/core/java/com/android/internal/app/IAppOpsService.aidl
+++ b/core/java/com/android/internal/app/IAppOpsService.aidl
@@ -47,4 +47,5 @@
void setUserRestrictions(in Bundle restrictions, IBinder token, int userHandle);
void setUserRestriction(int code, boolean restricted, IBinder token, int userHandle, in String[] exceptionPackages);
void removeUser(int userHandle);
+ boolean isControlAllowed(int code, String packageName);
}
diff --git a/core/java/com/android/internal/app/LocalePicker.java b/core/java/com/android/internal/app/LocalePicker.java
index 472f583..b42bdb9 100644
--- a/core/java/com/android/internal/app/LocalePicker.java
+++ b/core/java/com/android/internal/app/LocalePicker.java
@@ -29,6 +29,7 @@
import android.os.LocaleList;
import android.os.RemoteException;
import android.provider.Settings;
+import android.text.TextUtils;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@@ -42,6 +43,7 @@
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";
@@ -97,13 +99,39 @@
return pseudoLocales;
}
+ /*
+ * Get the customize locale codes and get the language list
+ */
+ private static ArrayList<String> getLocaleArray(String[] locales, Resources resources) {
+ String localeCodes = resources.getString(R.string.locale_codes);
+ String[] localeCodesArray = null;
+ if (localeCodes != null && !TextUtils.isEmpty(localeCodes.trim())) {
+ localeCodes = localeCodes.replace('_', '-');
+ // ICU use "fil" instead of "tl"
+ localeCodes = localeCodes.replaceAll("tl-", "fil-");
+ localeCodesArray = localeCodes.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 = getSystemAssetLocales();
- List<String> localeList = new ArrayList<String>(locales.length);
- Collections.addAll(localeList, locales);
-
+ String[] locales = null;
+ ArrayList<String> localeList = new ArrayList<String>();
+ if (resources.getString(R.string.locale_codes) != null){
+ locales = Resources.getSystem().getAssets().getLocales();
+ // Check the locale_codes if the locales list is customized in data package overlay.
+ // If locale_codes is customized, use the customized list instead of built-in locales.
+ localeList = getLocaleArray(locales, resources);
+ } else {
+ locales = getSystemAssetLocales();
+ localeList = new ArrayList<String>(locales.length);
+ Collections.addAll(localeList, locales);
+ }
// Don't show the pseudolocales unless we're in developer mode. http://b/17190407.
if (!isInDeveloperMode) {
for (String locale : pseudoLocales) {
diff --git a/core/java/com/android/internal/content/NativeLibraryHelper.java b/core/java/com/android/internal/content/NativeLibraryHelper.java
index f479f4f..f5b948f 100644
--- a/core/java/com/android/internal/content/NativeLibraryHelper.java
+++ b/core/java/com/android/internal/content/NativeLibraryHelper.java
@@ -62,6 +62,8 @@
// that the cpuAbiOverride must be clear.
public static final String CLEAR_ABI_OVERRIDE = "-";
+ private static final Object mRestoreconSync = new Object();
+
/**
* A handle to an opened package, consisting of one or more APKs. Used as
* input to the various NativeLibraryHelper methods. Allows us to scan and
@@ -275,8 +277,12 @@
throw new IOException("Cannot chmod native library directory "
+ path.getPath(), e);
}
- } else if (!SELinux.restorecon(path)) {
- throw new IOException("Cannot set SELinux context for " + path.getPath());
+ } else {
+ synchronized (mRestoreconSync) {
+ if (!SELinux.restorecon(path)) {
+ throw new IOException("Cannot set SELinux context for " + path.getPath());
+ }
+ }
}
}
diff --git a/core/java/com/android/internal/os/IRegionalizationService.aidl b/core/java/com/android/internal/os/IRegionalizationService.aidl
new file mode 100644
index 0000000..0e091ff
--- /dev/null
+++ b/core/java/com/android/internal/os/IRegionalizationService.aidl
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2015, 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.
+ */
+
+package com.android.internal.os;
+
+/**
+ * Direct interface to the RegionalizationService's functionality
+ *
+ * {@hide}
+ */
+interface IRegionalizationService {
+
+ boolean checkFileExists(String filepath);
+
+ List<String> readFile(String filepath, String regularExpression);
+
+ boolean writeFile(String filepath, String content, boolean append);
+
+ void deleteFilesUnderDir(String dirPath, String ext, boolean delDir);
+}
diff --git a/core/java/com/android/internal/os/PowerProfile.java b/core/java/com/android/internal/os/PowerProfile.java
index d217474..ccfb06b 100644
--- a/core/java/com/android/internal/os/PowerProfile.java
+++ b/core/java/com/android/internal/os/PowerProfile.java
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009 The Android Open Source Project
+ * Copyright (C) 2018 Fairphone B.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,12 +21,16 @@
import android.content.Context;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
+import android.annotation.Nullable;
+import android.util.Log;
import com.android.internal.util.XmlUtils;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
+import java.io.BufferedReader;
+import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
@@ -37,6 +42,8 @@
*/
public class PowerProfile {
+ private static final String TAG = "PowerProfile";
+
/**
* No power consumption, or accounted for elsewhere.
*/
@@ -200,6 +207,9 @@
private static final String TAG_ARRAYITEM = "value";
private static final String ATTR_NAME = "name";
+ private static final String FILENAME_BATTERY_DESIGN_CAPACITY =
+ "/sys/class/power_supply/bms/charge_full_design";
+
public PowerProfile(Context context) {
// Read the XML file for the given profile (normally only one per
// device)
@@ -299,6 +309,43 @@
sPowerMap.put(key, (double) value);
}
}
+
+ /*
+ * There is no way to set the battery design capacity automatically here from what the
+ * kernel exposes in the sysfs. Several battery packs can be available for the device and
+ * they might have different capacities. So do not rely on the XML power profile and always
+ * use what the kernel exposes instead.
+ */
+ try {
+ // Read the battery design capacity from the sysfs, in microampere-hour
+ int batteryDesignCapacityMicro =
+ Integer.parseInt(readLine(FILENAME_BATTERY_DESIGN_CAPACITY));
+ // Unconditionally store the sysfs capacity, in milliampere-hour
+ sPowerMap.put(POWER_BATTERY_CAPACITY, ((double) batteryDesignCapacityMicro) / 1000);
+ } catch (IOException ioe) {
+ Log.e(TAG, "Cannot read battery capacity from "
+ + FILENAME_BATTERY_DESIGN_CAPACITY, ioe);
+ } catch (NumberFormatException nfe) {
+ Log.e(TAG, "Read a badly formatted battery capacity from "
+ + FILENAME_BATTERY_DESIGN_CAPACITY, nfe);
+ }
+ }
+
+ /**
+ * Reads a line from the specified file.
+ *
+ * @param filename The file to read from.
+ * @return The first line up to 256 characters, or <code>null</code> if file is empty.
+ * @throws IOException If the file couldn't be read.
+ */
+ @Nullable
+ private static String readLine(String filename) throws IOException {
+ final BufferedReader reader = new BufferedReader(new FileReader(filename), 256);
+ try {
+ return reader.readLine();
+ } finally {
+ reader.close();
+ }
}
private CpuClusterKey[] mCpuClusters;
@@ -392,7 +439,7 @@
public double getAveragePower(String type) {
return getAveragePowerOrDefault(type, 0);
}
-
+
/**
* Returns the average current in mA consumed by the subsystem for the given level.
* @param type the subsystem type
diff --git a/core/java/com/android/internal/os/RegionalizationEnvironment.java b/core/java/com/android/internal/os/RegionalizationEnvironment.java
new file mode 100644
index 0000000..24b9120
--- /dev/null
+++ b/core/java/com/android/internal/os/RegionalizationEnvironment.java
@@ -0,0 +1,279 @@
+/*
+ * Copyright (c) 2015, 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.
+ */
+
+package com.android.internal.os;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.SystemProperties;
+import android.text.TextUtils;
+import android.util.Log;
+
+public class RegionalizationEnvironment {
+ private final static String TAG = "RegionalizationEnvironment";
+
+ private final static boolean SUPPORTED = SystemProperties.getBoolean(
+ "ro.regionalization.support", false);
+ private final static boolean DEBUG = true;
+
+ private static IRegionalizationService mRegionalizationService = null;
+
+ private final static String SPEC_FILE_PATH = "/persist/speccfg/spec";
+
+ private static ArrayList<Package> mPackages = new ArrayList<Package>();
+ private static ArrayList<String> mExcludedApps = new ArrayList<String>();
+
+ private static boolean isLoaded = false;
+ private static void init() {
+ IBinder iBinder = ServiceManager.getService("regionalization");
+ mRegionalizationService = IRegionalizationService.Stub.asInterface(iBinder);
+ if (mRegionalizationService != null) {
+ loadSwitchedPackages();
+ loadExcludedApplist();
+ isLoaded = true;
+ }
+ }
+
+ /**
+ * {@hide}
+ */
+ public static boolean isSupported() {
+ if (SUPPORTED && !isLoaded) {
+ init();
+ }
+ return SUPPORTED;
+ }
+
+ /**
+ * {@hide}
+ */
+ public static int getPackagesCount() {
+ return mPackages.size();
+ }
+
+ /**
+ * {@hide}
+ */
+ public static List<String> getAllPackageNames() {
+ ArrayList<String> packages = new ArrayList<String>();
+ for (Package p : mPackages) {
+ packages.add(p.getName());
+ }
+ return packages;
+ }
+
+ /**
+ * {@hide}
+ */
+ public static List<File> getAllPackageDirectories() {
+ ArrayList<File> directories = new ArrayList<File>();
+ for (Package p : mPackages) {
+ if (DEBUG)
+ Log.v(TAG, "Package Directoriy(" + p.getPriority() + "):" + p.getDirectory());
+ directories.add(p.getDirectory());
+ }
+ return directories;
+ }
+
+ /**
+ * {@hide}
+ */
+ public static boolean isExcludedApp(String appName) {
+ if (getPackagesCount() == 0) {
+ return false;
+ }
+
+ if (!appName.endsWith(".apk")) {
+ return mExcludedApps.contains(appName + ".apk");
+ } else {
+ return mExcludedApps.contains(appName);
+ }
+ }
+
+ /**
+ * {@hide}
+ */
+ public static IRegionalizationService getRegionalizationService() {
+ return mRegionalizationService;
+ }
+
+ /**
+ * {@hide}
+ */
+ public static String getStoragePos() {
+ for (Package pack: mPackages) {
+ String pos = pack.getStoragePos();
+ if (!TextUtils.isEmpty(pos))
+ return pos;
+ }
+ try {
+ mPackages.clear();
+ throw new IOException("Read wrong package for Carrier!");
+ } catch (IOException e) {
+ Log.e(TAG, "Get storage pos error, caused by: " + e.getMessage());
+ }
+ return "";
+ }
+
+ private static void loadSwitchedPackages() {
+ if (DEBUG)
+ Log.d(TAG, "load packages for Carrier!");
+
+ try {
+ ArrayList<String> contents = null;
+ try {
+ contents = (ArrayList<String>)
+ mRegionalizationService.readFile(SPEC_FILE_PATH, null);
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+
+ if (contents != null && contents.size() > 0) {
+ // Get storage pos of carrier pack
+ if (!contents.get(0).startsWith("packStorage=")) {
+ throw new IOException("Can't read storage pos for Carrier package!");
+ }
+ String storagePos = contents.get(0).substring("packStorage=".length());
+ if (TextUtils.isEmpty(storagePos)) {
+ throw new IOException("Storage pos for Carrier package is wrong!");
+ }
+
+ // Get carrier pack count
+ String packNumRegularExpresstion = "^packCount=[0-9]$";
+ if (!contents.get(1).matches(packNumRegularExpresstion)) {
+ throw new IOException("Can't read package count of Carrier!");
+ }
+ int packNum = Integer.parseInt(contents.get(1)
+ .substring("packCount=".length()));
+ if (packNum <= 0 || contents.size() <= packNum) {
+ throw new IOException("Package count of Carrier is wrong!");
+ }
+
+ for (int i = 2; i < packNum + 2; i++) {
+ String packRegularExpresstion = "^strSpec[0-9]=\\w+$";
+ if (contents.get(i).matches(packRegularExpresstion)) {
+ String packName = contents.get(i).substring("strSpec".length() + 2);
+ if (!TextUtils.isEmpty(packName)) {
+ boolean exists = false;
+ try {
+ exists = mRegionalizationService.checkFileExists(
+ storagePos + "/" + packName);
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+
+ if (exists) {
+ mPackages.add(new Package(packName, i, storagePos));
+ } else {
+ mPackages.clear();
+ throw new IOException("Read wrong packages for Carrier!");
+ }
+ }
+ } else {
+ mPackages.clear();
+ throw new IOException("Read wrong packages for Carrier!");
+ }
+ }
+ }
+ } catch (IOException e) {
+ Log.e(TAG, "Load package for carrier error, caused by: " + e.getMessage());
+ }
+ }
+
+ private static void loadExcludedApplist() {
+ if (DEBUG)
+ Log.d(TAG, "loadExcludedApps!");
+
+ if (getPackagesCount() == 0) return;
+
+ for (Package pack : mPackages) {
+ Log.d(TAG, "load excluded apps for " + pack.getDirectory());
+ String excListFilePath = pack.getExcludedListFilePath();
+ ArrayList<String> contents = null;
+ try {
+ contents = (ArrayList<String>)
+ mRegionalizationService.readFile(excListFilePath, null);
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ }
+ if (contents != null && contents.size() > 0) {
+ for (String content : contents) {
+ if (!TextUtils.isEmpty(content)) {
+ int pos = content.lastIndexOf("/");
+ if (pos != -1) {
+ String apkName = content.substring(pos + 1);
+ if (!TextUtils.isEmpty(apkName) && !mExcludedApps.contains(apkName)) {
+ mExcludedApps.add(apkName);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private static class Package {
+ private final String mName;
+ private final int mPriority;
+ private final String mStorage;
+
+ public Package(String name, int priority, String storage) {
+ mName = name;
+ mPriority = priority;
+ mStorage = storage;
+ }
+
+ public String getName() {
+ return mName;
+ }
+
+ public int getPriority() {
+ return mPriority;
+ }
+
+ public String getStoragePos() {
+ return mStorage;
+ }
+
+ public File getDirectory() {
+ return new File(mStorage, mName);
+ }
+
+ public String getExcludedListFilePath() {
+ return getDirectory().getAbsolutePath() + "/exclude.list";
+ }
+ }
+
+}
diff --git a/core/java/com/android/internal/util/StateMachine.java b/core/java/com/android/internal/util/StateMachine.java
index a5a3dba..f804002 100644
--- a/core/java/com/android/internal/util/StateMachine.java
+++ b/core/java/com/android/internal/util/StateMachine.java
@@ -1922,6 +1922,22 @@
}
/**
+ * Check if there are any pending messages with code 'what' in deferred messages queue.
+ */
+ protected final boolean hasDeferredMessages(int what, Object obj) {
+ SmHandler smh = mSmHandler;
+ if (smh == null) return false;
+
+ Iterator<Message> iterator = smh.mDeferredMessages.iterator();
+ while (iterator.hasNext()) {
+ Message msg = iterator.next();
+ if ((msg.what == what) && (msg.obj == obj)) return true;
+ }
+
+ return false;
+ }
+
+ /**
* Check if there are any pending posts of messages with code 'what' in
* the message queue. This does NOT check messages in deferred message queue.
*/
diff --git a/core/java/com/android/internal/widget/ILockSettings.aidl b/core/java/com/android/internal/widget/ILockSettings.aidl
index 9fa558e..89018d49 100644
--- a/core/java/com/android/internal/widget/ILockSettings.aidl
+++ b/core/java/com/android/internal/widget/ILockSettings.aidl
@@ -49,4 +49,6 @@
void systemReady();
void userPresent(int userId);
int getStrongAuthForUser(int userId);
+ void sanitizePassword();
+ String getPassword();
}
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index d49d433..2d92b43 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -662,6 +662,17 @@
}
}
+ /**
+ * clears stored password.
+ */
+ public void sanitizePassword() {
+ try {
+ getLockSettings().sanitizePassword();
+ } catch (RemoteException re) {
+ Log.e(TAG, "Couldn't sanitize password" + re);
+ }
+ }
+
private void updateCryptoUserInfo(int userId) {
if (userId != UserHandle.USER_SYSTEM) {
return;
diff --git a/core/java/com/android/server/SystemConfig.java b/core/java/com/android/server/SystemConfig.java
index 429131b..8c5f3fb 100644
--- a/core/java/com/android/server/SystemConfig.java
+++ b/core/java/com/android/server/SystemConfig.java
@@ -24,7 +24,9 @@
import android.content.pm.PackageManager;
import android.os.Environment;
import android.os.Process;
+import android.os.SystemProperties;
import android.os.storage.StorageManager;
+import android.os.SystemProperties;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Slog;
@@ -212,6 +214,18 @@
Environment.getOemDirectory(), "etc", "sysconfig"), ALLOW_FEATURES);
readPermissions(Environment.buildPath(
Environment.getOemDirectory(), "etc", "permissions"), ALLOW_FEATURES);
+ //Remove vulkan specific features
+ if (SystemProperties.getBoolean("persist.graphics.vulkan.disable", false)) {
+ removeFeature(PackageManager.FEATURE_VULKAN_HARDWARE_LEVEL);
+ removeFeature(PackageManager.FEATURE_VULKAN_HARDWARE_VERSION);
+ }
+ // Remove android extension pack for opengles version 3.0
+ int value = SystemProperties.getInt("ro.opengles.version", 0);
+ if (value > 0 && (value == 196608)) {
+ if (mAvailableFeatures.remove("android.hardware.opengles.aep") != null) {
+ Slog.d(TAG, "Removed android.hardware.opengles.aep feature for opengles 3.0");
+ }
+ }
}
void readPermissions(File libraryDir, int permissionFlag) {
diff --git a/core/java/com/android/server/net/BaseNetworkObserver.java b/core/java/com/android/server/net/BaseNetworkObserver.java
index 3d9fb5c..c3dcd40 100644
--- a/core/java/com/android/server/net/BaseNetworkObserver.java
+++ b/core/java/com/android/server/net/BaseNetworkObserver.java
@@ -63,6 +63,11 @@
}
@Override
+ public void interfaceMessageRecevied(String message) {
+ // default no-op
+ }
+
+ @Override
public void limitReached(String limitName, String iface) {
// default no-op
}
diff --git a/core/java/org/codeaurora/camera/Android.mk b/core/java/org/codeaurora/camera/Android.mk
new file mode 100644
index 0000000..2e005f7
--- /dev/null
+++ b/core/java/org/codeaurora/camera/Android.mk
@@ -0,0 +1,30 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_MODULE:= org.codeaurora.camera
+
+# This will install the file in /system/framework
+LOCAL_MODULE_PATH := $(TARGET_OUT_JAVA_LIBRARIES)
+
+include $(BUILD_JAVA_LIBRARY)
+
+# ==== permissions ========================
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := org.codeaurora.camera.xml
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_MODULE_CLASS := ETC
+
+# This will install the file in /system/etc/permissions
+LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/permissions
+
+LOCAL_SRC_FILES := $(LOCAL_MODULE)
+
+include $(BUILD_PREBUILT)
diff --git a/core/java/org/codeaurora/camera/ExtendedFace.java b/core/java/org/codeaurora/camera/ExtendedFace.java
new file mode 100644
index 0000000..afda0b6
--- /dev/null
+++ b/core/java/org/codeaurora/camera/ExtendedFace.java
@@ -0,0 +1,211 @@
+/* Copyright (c) 2015, The Linux Foundataion. 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.
+*
+*/
+
+package org.codeaurora.camera;
+
+import android.hardware.Camera;
+
+import java.util.ArrayList;
+
+import android.os.Bundle;
+
+import android.os.SystemProperties;
+
+/**
+ * {@hide} Information about a face identified through Extended camera face
+ *
+ * <p>
+ * When face detection is used with a camera, the {@link FaceDetectionListener}
+ * returns a list of face objects for use in focusing and metering.
+ * </p>
+ *
+ * @see FaceDetectionListener
+ */
+public class ExtendedFace extends android.hardware.Camera.Face {
+ public ExtendedFace() {
+ super();
+ }
+
+ private int smileDegree = 0;
+ private int smileScore = 0;
+ private int blinkDetected = 0;
+ private int faceRecognized = 0;
+ private int gazeAngle = 0;
+ private int updownDir = 0;
+ private int leftrightDir = 0;
+ private int rollDir = 0;
+ private int leyeBlink = 0;
+ private int reyeBlink = 0;
+ private int leftrightGaze = 0;
+ private int topbottomGaze = 0;
+
+ private static final String STR_TRUE = "true";
+ private static final String STR_FALSE = "false";
+
+ /**
+ * The smilie degree for the detection of the face.
+ *
+ * @see #startFaceDetection()
+ */
+ public int getSmileDegree() {
+ return smileDegree;
+ }
+
+ /**
+ * The smilie score for the detection of the face.
+ *
+ * @see #startFaceDetection()
+ */
+ public int getSmileScore() {
+ return smileScore;
+ }
+
+ /**
+ * The smilie degree for the detection of the face.
+ *
+ * @see #startFaceDetection()
+ */
+ public int getBlinkDetected() {
+ return blinkDetected;
+ }
+
+ /**
+ * If face is recognized.
+ *
+ * @see #startFaceDetection()
+ */
+ public int getFaceRecognized() {
+ return faceRecognized;
+ }
+
+ /**
+ * The gaze angle for the detected face.
+ *
+ * @see #startFaceDetection()
+ */
+ public int getGazeAngle() {
+ return gazeAngle;
+ }
+
+ /**
+ * The up down direction for the detected face.
+ *
+ * @see #startFaceDetection()
+ */
+ public int getUpDownDirection() {
+ return updownDir;
+ }
+
+ /**
+ * The left right direction for the detected face.
+ *
+ * @see #startFaceDetection()
+ */
+ public int getLeftRightDirection() {
+ return leftrightDir;
+ }
+
+ /**
+ * The roll direction for the detected face.
+ *
+ * @see #startFaceDetection()
+ */
+ public int getRollDirection() {
+ return rollDir;
+ }
+
+ /**
+ * The degree of left eye blink for the detected face.
+ *
+ * @see #startFaceDetection()
+ */
+ public int getLeftEyeBlinkDegree() {
+ return leyeBlink;
+ }
+
+ /**
+ * The degree of right eye blink for the detected face.
+ *
+ * @see #startFaceDetection()
+ */
+ public int getRightEyeBlinkDegree() {
+ return reyeBlink;
+ }
+
+ /**
+ * The gaze degree of left-right direction for the detected face.
+ *
+ * @see #startFaceDetection()
+ */
+ public int getLeftRightGazeDegree() {
+ return leftrightGaze;
+ }
+
+ /**
+ * The gaze degree of up-down direction for the detected face.
+ *
+ * @see #startFaceDetection()
+ */
+ public int getTopBottomGazeDegree() {
+ return topbottomGaze;
+ }
+
+ private static final String BUNDLE_KEY_SMILE_SCORE = "smileScore";
+ private static final String BUNDLE_KEY_SMILE_VALUE = "smileValue";
+ private static final String BUNDLE_KEY_BLINK_DETECTED = "blinkDetected";
+ private static final String BUNDLE_KEY_LEFT_EYE_CLOSED_VALUE = "leftEyeClosedValue";
+ private static final String BUNDLE_KEY_RIGHT_EYE_CLOSED_VALUE = "rightEyeClosedValue";
+ private static final String BUNDLE_KEY_FACE_PITCH_DEGREE = "facePitchDegree";
+ private static final String BUNDLE_KEY_FACE_YAW_DEGREE = "faceYawDegree";
+ private static final String BUNDLE_KEY_FACE_ROLL_DEGREE = "faceRollDegree";
+ private static final String BUNDLE_KEY_GAZE_UP_DOWN_DEGREE = "gazeUpDownDegree";
+ private static final String BUNDLE_KEY_GAZE_LEFT_RIGHT_DEGREE = "gazeLeftRightDegree";
+ private static final String BUNDLE_KEY_FACE_RECOGNIZED = "faceRecognized";
+
+ public Bundle getExtendedFaceInfo() {
+ Bundle faceInfo = new Bundle();
+ faceInfo.putInt(BUNDLE_KEY_SMILE_VALUE, this.smileDegree);
+
+ faceInfo.putInt(BUNDLE_KEY_LEFT_EYE_CLOSED_VALUE, this.leyeBlink);
+ faceInfo.putInt(BUNDLE_KEY_RIGHT_EYE_CLOSED_VALUE, this.reyeBlink);
+
+ faceInfo.putInt(BUNDLE_KEY_FACE_PITCH_DEGREE, this.updownDir);
+ faceInfo.putInt(BUNDLE_KEY_FACE_YAW_DEGREE, this.leftrightDir);
+ faceInfo.putInt(BUNDLE_KEY_FACE_ROLL_DEGREE, this.rollDir);
+ faceInfo.putInt(BUNDLE_KEY_GAZE_UP_DOWN_DEGREE, this.topbottomGaze);
+ faceInfo.putInt(BUNDLE_KEY_GAZE_LEFT_RIGHT_DEGREE, this.leftrightGaze);
+
+ faceInfo.putInt(BUNDLE_KEY_BLINK_DETECTED, this.blinkDetected);
+ faceInfo.putInt(BUNDLE_KEY_SMILE_SCORE, this.smileScore);
+ faceInfo.putInt(BUNDLE_KEY_FACE_RECOGNIZED, this.faceRecognized);
+
+ return faceInfo;
+ }
+
+}
diff --git a/core/java/org/codeaurora/camera/org.codeaurora.camera.xml b/core/java/org/codeaurora/camera/org.codeaurora.camera.xml
new file mode 100644
index 0000000..20b2aa0
--- /dev/null
+++ b/core/java/org/codeaurora/camera/org.codeaurora.camera.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, 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.
+
+-->
+
+<!-- This is the library that allows devices to use Camera QFace APIs. -->
+<permissions>
+ <library name="org.codeaurora.camera"
+ file="/system/framework/org.codeaurora.camera.jar" />
+</permissions>
diff --git a/core/jni/Android.mk b/core/jni/Android.mk
index 6dabc77..90c2ab7fb 100644
--- a/core/jni/Android.mk
+++ b/core/jni/Android.mk
@@ -29,6 +29,7 @@
LOCAL_CFLAGS += -DU_USING_ICU_NAMESPACE=0
LOCAL_SRC_FILES:= \
+ android_util_SeempLog.cpp \
AndroidRuntime.cpp \
com_android_internal_content_NativeLibraryHelper.cpp \
com_google_android_gles_jni_EGLImpl.cpp \
@@ -178,7 +179,8 @@
com_android_internal_os_PathClassLoaderFactory.cpp \
com_android_internal_os_Zygote.cpp \
com_android_internal_util_VirtualRefBasePtr.cpp \
- com_android_internal_view_animation_NativeInterpolatorFactoryHelper.cpp
+ com_android_internal_view_animation_NativeInterpolatorFactoryHelper.cpp \
+ com_android_internal_app_ActivityTrigger.cpp
LOCAL_C_INCLUDES += \
$(JNI_H_INCLUDE) \
@@ -264,7 +266,8 @@
LOCAL_SHARED_LIBRARIES += \
libhwui \
- libdl
+ libdl \
+ libregionalization
# we need to access the private Bionic header
# <bionic_tls.h> in com_google_android_gles_jni_GLImpl.cpp
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 174d382..dd56dff 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -104,6 +104,7 @@
extern int register_android_media_ToneGenerator(JNIEnv *env);
namespace android {
+extern int register_android_util_SeempLog(JNIEnv* env);
/*
* JNI-based registration functions. Note these are properly contained in
@@ -204,6 +205,7 @@
extern int register_com_android_internal_os_PathClassLoaderFactory(JNIEnv* env);
extern int register_com_android_internal_os_Zygote(JNIEnv *env);
extern int register_com_android_internal_util_VirtualRefBasePtr(JNIEnv *env);
+extern int register_com_android_internal_app_ActivityTrigger(JNIEnv *env);
static AndroidRuntime* gCurRuntime = NULL;
@@ -1261,6 +1263,7 @@
}
static const RegJNIRec gRegJNI[] = {
+ REG_JNI(register_android_util_SeempLog),
REG_JNI(register_com_android_internal_os_RuntimeInit),
REG_JNI(register_android_os_SystemClock),
REG_JNI(register_android_util_EventLog),
@@ -1410,7 +1413,7 @@
REG_JNI(register_android_animation_PropertyValuesHolder),
REG_JNI(register_com_android_internal_content_NativeLibraryHelper),
REG_JNI(register_com_android_internal_net_NetworkStatsFactory),
-
+ REG_JNI(register_com_android_internal_app_ActivityTrigger),
};
/*
diff --git a/core/jni/android_hardware_Camera.cpp b/core/jni/android_hardware_Camera.cpp
index b926270..e68a023 100644
--- a/core/jni/android_hardware_Camera.cpp
+++ b/core/jni/android_hardware_Camera.cpp
@@ -62,6 +62,18 @@
jmethodID rect_constructor;
jmethodID face_constructor;
jmethodID point_constructor;
+ jfieldID face_sm_degree;
+ jfieldID face_sm_score;
+ jfieldID face_blink_detected;
+ jfieldID face_gaze_angle;
+ jfieldID face_updown_dir;
+ jfieldID face_leftright_dir;
+ jfieldID face_roll_dir;
+ jfieldID face_leye_blink;
+ jfieldID face_reye_blink;
+ jfieldID face_left_right_gaze;
+ jfieldID face_top_bottom_gaze;
+ jfieldID face_recognised;
};
static fields_t fields;
@@ -97,6 +109,7 @@
jclass mFaceClass; // strong reference to Face class
jclass mRectClass; // strong reference to Rect class
jclass mPointClass; // strong reference to Point class
+ bool mIsExtendedFace;
Mutex mLock;
/*
@@ -148,8 +161,16 @@
mCameraJClass = (jclass)env->NewGlobalRef(clazz);
mCamera = camera;
- jclass faceClazz = env->FindClass("android/hardware/Camera$Face");
- mFaceClass = (jclass) env->NewGlobalRef(faceClazz);
+ jclass extendedfaceClazz = env->FindClass("org/codeaurora/camera/ExtendedFace");
+ if (NULL != extendedfaceClazz) {
+ mFaceClass = (jclass) env->NewGlobalRef(extendedfaceClazz);
+ mIsExtendedFace = true;
+ } else {
+ env->ExceptionClear();
+ jclass faceClazz = env->FindClass("android/hardware/Camera$Face");
+ mFaceClass = (jclass) env->NewGlobalRef(faceClazz);
+ mIsExtendedFace = false;
+ }
jclass rectClazz = env->FindClass("android/graphics/Rect");
mRectClass = (jclass) env->NewGlobalRef(rectClazz);
@@ -381,7 +402,6 @@
env->SetIntField(rect, fields.rect_top, metadata->faces[i].rect[1]);
env->SetIntField(rect, fields.rect_right, metadata->faces[i].rect[2]);
env->SetIntField(rect, fields.rect_bottom, metadata->faces[i].rect[3]);
-
env->SetObjectField(face, fields.face_rect, rect);
env->SetIntField(face, fields.face_score, metadata->faces[i].score);
@@ -410,6 +430,21 @@
env->SetIntField(mouth, fields.point_y, metadata->faces[i].mouth[1]);
env->SetObjectField(face, fields.face_mouth, mouth);
env->DeleteLocalRef(mouth);
+
+ if (mIsExtendedFace) {
+ env->SetIntField(face, fields.face_sm_degree, metadata->faces[i].smile_degree);
+ env->SetIntField(face, fields.face_sm_score, metadata->faces[i].smile_score);
+ env->SetIntField(face, fields.face_blink_detected, metadata->faces[i].blink_detected);
+ env->SetIntField(face, fields.face_recognised, metadata->faces[i].face_recognised);
+ env->SetIntField(face, fields.face_gaze_angle, metadata->faces[i].gaze_angle);
+ env->SetIntField(face, fields.face_updown_dir, metadata->faces[i].updown_dir);
+ env->SetIntField(face, fields.face_leftright_dir, metadata->faces[i].leftright_dir);
+ env->SetIntField(face, fields.face_roll_dir, metadata->faces[i].roll_dir);
+ env->SetIntField(face, fields.face_leye_blink, metadata->faces[i].leye_blink);
+ env->SetIntField(face, fields.face_reye_blink, metadata->faces[i].reye_blink);
+ env->SetIntField(face, fields.face_left_right_gaze, metadata->faces[i].left_right_gaze);
+ env->SetIntField(face, fields.face_top_bottom_gaze, metadata->faces[i].top_bottom_gaze);
+ }
}
env->DeleteLocalRef(face);
@@ -447,6 +482,56 @@
}
}
+static void android_hardware_Camera_setLongshot(JNIEnv *env, jobject thiz, jboolean enable)
+{
+ ALOGV("setLongshot");
+ JNICameraContext* context;
+ status_t rc;
+ sp<Camera> camera = get_native_camera(env, thiz, &context);
+ if (camera == 0) return;
+
+ if ( enable ) {
+ rc = camera->sendCommand(CAMERA_CMD_LONGSHOT_ON, 0, 0);
+ } else {
+ rc = camera->sendCommand(CAMERA_CMD_LONGSHOT_OFF, 0, 0);
+ }
+
+ if (rc != NO_ERROR) {
+ jniThrowException(env, "java/lang/RuntimeException", "enabling longshot mode failed");
+ }
+}
+
+static void android_hardware_Camera_sendHistogramData(JNIEnv *env, jobject thiz)
+ {
+ ALOGV("sendHistogramData" );
+ JNICameraContext* context;
+ status_t rc;
+ sp<Camera> camera = get_native_camera(env, thiz, &context);
+ if (camera == 0) return;
+
+ rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_SEND_DATA, 0, 0);
+
+ if (rc != NO_ERROR) {
+ jniThrowException(env, "java/lang/RuntimeException", "send histogram data failed");
+ }
+ }
+ static void android_hardware_Camera_setHistogramMode(JNIEnv *env, jobject thiz, jboolean mode)
+ {
+ ALOGV("setHistogramMode: mode:%d", (int)mode);
+ JNICameraContext* context;
+ status_t rc;
+ sp<Camera> camera = get_native_camera(env, thiz, &context);
+ if (camera == 0) return;
+
+ if(mode == true)
+ rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_ON, 0, 0);
+ else
+ rc = camera->sendCommand(CAMERA_CMD_HISTOGRAM_OFF, 0, 0);
+
+ if (rc != NO_ERROR) {
+ jniThrowException(env, "java/lang/RuntimeException", "set histogram mode failed");
+ }
+ }
void JNICameraContext::addCallbackBuffer(
JNIEnv *env, jbyteArray cbb, int msgType)
{
@@ -769,7 +854,25 @@
context->setCallbackMode(env, installed, manualBuffer);
}
-static void android_hardware_Camera_addCallbackBuffer(JNIEnv *env, jobject thiz, jbyteArray bytes, jint msgType) {
+static void android_hardware_Camera_setMetadataCb(JNIEnv *env, jobject thiz, jboolean mode)
+{
+ ALOGV("setMetadataCb: mode:%d", (int)mode);
+ JNICameraContext* context;
+ status_t rc;
+ sp<Camera> camera = get_native_camera(env, thiz, &context);
+ if (camera == 0) return;
+
+ if(mode == true)
+ rc = camera->sendCommand(CAMERA_CMD_METADATA_ON, 0, 0);
+ else
+ rc = camera->sendCommand(CAMERA_CMD_METADATA_OFF, 0, 0);
+
+ if (rc != NO_ERROR) {
+ jniThrowException(env, "java/lang/RuntimeException", "set metadata mode failed");
+ }
+}
+
+static void android_hardware_Camera_addCallbackBuffer(JNIEnv *env, jobject thiz, jbyteArray bytes, int msgType) {
ALOGV("addCallbackBuffer: 0x%x", msgType);
JNICameraContext* context = reinterpret_cast<JNICameraContext*>(env->GetLongField(thiz, fields.context));
@@ -1002,7 +1105,7 @@
//-------------------------------------------------
static const JNINativeMethod camMethods[] = {
- { "getNumberOfCameras",
+ { "_getNumberOfCameras",
"()I",
(void *)android_hardware_Camera_getNumberOfCameras },
{ "_getCameraInfo",
@@ -1047,6 +1150,18 @@
{ "native_takePicture",
"(I)V",
(void *)android_hardware_Camera_takePicture },
+ { "native_setHistogramMode",
+ "(Z)V",
+ (void *)android_hardware_Camera_setHistogramMode },
+ { "native_setMetadataCb",
+ "(Z)V",
+ (void *)android_hardware_Camera_setMetadataCb },
+ { "native_sendHistogramData",
+ "()V",
+ (void *)android_hardware_Camera_sendHistogramData },
+ { "native_setLongshot",
+ "(Z)V",
+ (void *)android_hardware_Camera_setLongshot },
{ "native_setParameters",
"(Ljava/lang/String;)V",
(void *)android_hardware_Camera_setParameters },
@@ -1125,6 +1240,27 @@
{ "android/graphics/Point", "y", "I", &fields.point_y},
};
+ field extendedfacefields_to_find[] = {
+ { "org/codeaurora/camera/ExtendedFace", "rect", "Landroid/graphics/Rect;", &fields.face_rect },
+ { "org/codeaurora/camera/ExtendedFace", "score", "I", &fields.face_score },
+ { "org/codeaurora/camera/ExtendedFace", "id", "I", &fields.face_id },
+ { "org/codeaurora/camera/ExtendedFace", "leftEye", "Landroid/graphics/Point;", &fields.face_left_eye },
+ { "org/codeaurora/camera/ExtendedFace", "rightEye", "Landroid/graphics/Point;", &fields.face_right_eye },
+ { "org/codeaurora/camera/ExtendedFace", "mouth", "Landroid/graphics/Point;", &fields.face_mouth },
+ { "org/codeaurora/camera/ExtendedFace", "smileDegree", "I", &fields.face_sm_degree },
+ { "org/codeaurora/camera/ExtendedFace", "smileScore", "I", &fields.face_sm_score },
+ { "org/codeaurora/camera/ExtendedFace", "blinkDetected", "I", &fields.face_blink_detected },
+ { "org/codeaurora/camera/ExtendedFace", "faceRecognized", "I", &fields.face_recognised },
+ { "org/codeaurora/camera/ExtendedFace", "gazeAngle", "I", &fields.face_gaze_angle },
+ { "org/codeaurora/camera/ExtendedFace", "updownDir", "I", &fields.face_updown_dir },
+ { "org/codeaurora/camera/ExtendedFace", "leftrightDir", "I", &fields.face_leftright_dir },
+ { "org/codeaurora/camera/ExtendedFace", "rollDir", "I", &fields.face_roll_dir },
+ { "org/codeaurora/camera/ExtendedFace", "leyeBlink", "I", &fields.face_leye_blink },
+ { "org/codeaurora/camera/ExtendedFace", "reyeBlink", "I", &fields.face_reye_blink },
+ { "org/codeaurora/camera/ExtendedFace", "leftrightGaze", "I", &fields.face_left_right_gaze },
+ { "org/codeaurora/camera/ExtendedFace", "topbottomGaze", "I", &fields.face_top_bottom_gaze },
+ };
+
find_fields(env, fields_to_find, NELEM(fields_to_find));
jclass clazz = FindClassOrDie(env, "android/hardware/Camera");
@@ -1144,6 +1280,12 @@
return -1;
}
+ clazz = env->FindClass("org/codeaurora/camera/ExtendedFace");
+ if (NULL != clazz) {
+ fields.face_constructor = env->GetMethodID(clazz, "<init>", "()V");
+ find_fields(env, extendedfacefields_to_find, NELEM(extendedfacefields_to_find));
+ }
+
// Register native functions
return RegisterMethodsOrDie(env, "android/hardware/Camera", camMethods, NELEM(camMethods));
}
diff --git a/core/jni/android_hardware_camera2_CameraMetadata.cpp b/core/jni/android_hardware_camera2_CameraMetadata.cpp
index 48f6b49..db44dd2 100644
--- a/core/jni/android_hardware_camera2_CameraMetadata.cpp
+++ b/core/jni/android_hardware_camera2_CameraMetadata.cpp
@@ -830,9 +830,9 @@
VendorTagDescriptor::clearGlobalVendorTagDescriptor();
return OK;
} else if (!res.isOk()) {
- VendorTagDescriptor::clearGlobalVendorTagDescriptor();
- ALOGE("%s: Failed to setup vendor tag descriptors: %s",
- __FUNCTION__, res.toString8().string());
+ ALOGE("%s: Failed to setup vendor tag descriptors: %d: %s",
+ __FUNCTION__, res.serviceSpecificErrorCode(),
+ res.toString8().string());
return res.serviceSpecificErrorCode();
}
diff --git a/core/jni/android_media_AudioFormat.h b/core/jni/android_media_AudioFormat.h
index 092aaf6..286f211 100644
--- a/core/jni/android_media_AudioFormat.h
+++ b/core/jni/android_media_AudioFormat.h
@@ -20,20 +20,27 @@
#include <system/audio.h>
// keep these values in sync with AudioFormat.java
-#define ENCODING_PCM_16BIT 2
-#define ENCODING_PCM_8BIT 3
-#define ENCODING_PCM_FLOAT 4
-#define ENCODING_AC3 5
-#define ENCODING_E_AC3 6
-#define ENCODING_DTS 7
-#define ENCODING_DTS_HD 8
-#define ENCODING_MP3 9
-#define ENCODING_AAC_LC 10
-#define ENCODING_AAC_HE_V1 11
-#define ENCODING_AAC_HE_V2 12
-#define ENCODING_IEC61937 13
+#define ENCODING_PCM_16BIT 2
+#define ENCODING_PCM_8BIT 3
+#define ENCODING_PCM_FLOAT 4
+#define ENCODING_AC3 5
+#define ENCODING_E_AC3 6
+#define ENCODING_DTS 7
+#define ENCODING_DTS_HD 8
+#define ENCODING_MP3 9
+#define ENCODING_AAC_LC 10
+#define ENCODING_AAC_HE_V1 11
+#define ENCODING_AAC_HE_V2 12
+#define ENCODING_IEC61937 13
#define ENCODING_DOLBY_TRUEHD 14
+#define ENCODING_AMR_NB 100
+#define ENCODING_AMR_WB 101
+#define ENCODING_EVRC 102
+#define ENCODING_EVRC_B 103
+#define ENCODING_EVRC_WB 104
+#define ENCODING_EVRC_NW 105
+
#define ENCODING_INVALID 0
#define ENCODING_DEFAULT 1
@@ -71,6 +78,18 @@
return AUDIO_FORMAT_DOLBY_TRUEHD;
case ENCODING_IEC61937:
return AUDIO_FORMAT_IEC61937;
+ case ENCODING_AMR_NB:
+ return AUDIO_FORMAT_AMR_NB;
+ case ENCODING_AMR_WB:
+ return AUDIO_FORMAT_AMR_WB;
+ case ENCODING_EVRC:
+ return AUDIO_FORMAT_EVRC;
+ case ENCODING_EVRC_B:
+ return AUDIO_FORMAT_EVRCB;
+ case ENCODING_EVRC_WB:
+ return AUDIO_FORMAT_EVRCWB;
+ case ENCODING_EVRC_NW:
+ return AUDIO_FORMAT_EVRCNW;
case ENCODING_DEFAULT:
return AUDIO_FORMAT_DEFAULT;
default:
@@ -114,6 +133,18 @@
return ENCODING_IEC61937;
case AUDIO_FORMAT_DOLBY_TRUEHD:
return ENCODING_DOLBY_TRUEHD;
+ case AUDIO_FORMAT_AMR_NB:
+ return ENCODING_AMR_NB;
+ case AUDIO_FORMAT_AMR_WB:
+ return ENCODING_AMR_WB;
+ case AUDIO_FORMAT_EVRC:
+ return ENCODING_EVRC;
+ case AUDIO_FORMAT_EVRCB:
+ return ENCODING_EVRC_B;
+ case AUDIO_FORMAT_EVRCWB:
+ return ENCODING_EVRC_WB;
+ case AUDIO_FORMAT_EVRCNW:
+ return ENCODING_EVRC_NW;
case AUDIO_FORMAT_DEFAULT:
return ENCODING_DEFAULT;
default:
diff --git a/core/jni/android_util_AssetManager.cpp b/core/jni/android_util_AssetManager.cpp
index fd663cd..8f29269 100644
--- a/core/jni/android_util_AssetManager.cpp
+++ b/core/jni/android_util_AssetManager.cpp
@@ -28,6 +28,7 @@
#include <sys/system_properties.h>
#include <private/android_filesystem_config.h> // for AID_SYSTEM
+#include <private/regionalization/Environment.h>
#include "androidfw/Asset.h"
#include "androidfw/AssetManager.h"
@@ -131,7 +132,7 @@
}
// This is called by zygote (running as user root) as part of preloadResources.
-static void verifySystemIdmaps()
+static void verifySystemIdmaps(const char* overlay_dir)
{
pid_t pid;
char system_id[10];
@@ -186,6 +187,7 @@
argv[argc++] = AssetManager::TARGET_APK_PATH;
argv[argc++] = AssetManager::IDMAP_DIR;
+
// Directories to scan for overlays: if OVERLAY_THEME_DIR_PROPERTY is defined,
// use OVERLAY_DIR/<value of OVERLAY_THEME_DIR_PROPERTY> in addition to OVERLAY_DIR.
char subdir[PROP_VALUE_MAX];
@@ -196,8 +198,8 @@
argv[argc++] = overlayPath.string();
}
}
- if (stat(AssetManager::OVERLAY_DIR, &st) == 0) {
- argv[argc++] = AssetManager::OVERLAY_DIR;
+ if (stat(overlay_dir, &st) == 0) {
+ argv[argc++] = overlay_dir;
}
// Finally, invoke idmap (if any overlay directory exists)
@@ -2087,7 +2089,20 @@
static void android_content_AssetManager_init(JNIEnv* env, jobject clazz, jboolean isSystem)
{
if (isSystem) {
- verifySystemIdmaps();
+ // Load frameworks-res.apk's overlay through regionalization environment
+ if (Environment::isSupported()) {
+ Environment* environment = new Environment();
+ if (environment != NULL) {
+ const char* overlay_dir = environment->getOverlayDir();
+ if (overlay_dir != NULL && strcmp(overlay_dir, "") != 0) {
+ ALOGD("Regionalization - getOverlayDir:%s", overlay_dir);
+ verifySystemIdmaps(overlay_dir);
+ }
+ delete environment;
+ }
+ }
+
+ verifySystemIdmaps(AssetManager::OVERLAY_DIR);
}
AssetManager* am = new AssetManager();
if (am == NULL) {
diff --git a/core/jni/android_util_Binder.cpp b/core/jni/android_util_Binder.cpp
index 5559d48..a00c16b 100644
--- a/core/jni/android_util_Binder.cpp
+++ b/core/jni/android_util_Binder.cpp
@@ -144,7 +144,7 @@
static void incRefsCreated(JNIEnv* env)
{
int old = android_atomic_inc(&gNumRefsCreated);
- if (old == 200) {
+ if (old == 2000) {
android_atomic_and(0, &gNumRefsCreated);
env->CallStaticVoidMethod(gBinderInternalOffsets.mClass,
gBinderInternalOffsets.mForceGc);
diff --git a/core/jni/android_util_SeempLog.cpp b/core/jni/android_util_SeempLog.cpp
new file mode 100644
index 0000000..7a049ba
--- /dev/null
+++ b/core/jni/android_util_SeempLog.cpp
@@ -0,0 +1,217 @@
+/*
+ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+ *
+ * Copyright (C) 2007-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.
+ */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <unistd.h>
+#include <assert.h>
+#include <cutils/properties.h>
+#include <utils/String8.h>
+#include <android_runtime/Log.h>
+#include <utils/Log.h>
+#ifdef __BIONIC__
+#include <android/set_abort_message.h>
+#endif
+#include <utils/Log.h>
+
+
+#include "jni.h"
+#include "JNIHelp.h"
+#include "utils/misc.h"
+#include "android_runtime/AndroidRuntime.h"
+
+#define LOG_BUF_SIZE 1024
+#define SEEMP_SOCK_NAME "/dev/socket/seempdw"
+#define ZYGOTE_PARENT_PID 1
+#ifndef __unused
+#define __unused __attribute__((__unused__))
+#endif
+
+static int __write_to_log_init(struct iovec *vec, size_t nr);
+static int (*write_to_log)(struct iovec *vec, size_t nr) = __write_to_log_init;
+static int logd_fd = -1;
+
+/* give up, resources too limited */
+static int __write_to_log_null(struct iovec *vec __unused,
+ size_t nr __unused)
+{
+ return -1;
+}
+
+/* log_init_lock assumed */
+static int __write_to_log_initialize()
+{
+ int i, ret = 0;
+ if (logd_fd >= 0) {
+ i = logd_fd;
+ logd_fd = -1;
+ close(i);
+ }
+
+ i = socket(PF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0);
+ if (i < 0) {
+ ret = -errno;
+ write_to_log = __write_to_log_null;
+ } else if (fcntl(i, F_SETFL, O_NONBLOCK) < 0) {
+ ret = -errno;
+ close(i);
+ i = -1;
+ write_to_log = __write_to_log_null;
+ } else {
+ struct sockaddr_un un;
+ memset(&un, 0, sizeof(struct sockaddr_un));
+ un.sun_family = AF_UNIX;
+ strlcpy(un.sun_path, SEEMP_SOCK_NAME, sizeof(un.sun_path));
+ if (connect(i, (struct sockaddr *)&un, sizeof(struct sockaddr_un)) < 0) {
+ ret = -errno;
+ close(i);
+ i = -1;
+ }
+ }
+ logd_fd = i;
+ return ret;
+}
+
+static int __write_to_log_socket(struct iovec *vec, size_t nr)
+{
+ ssize_t ret;
+ if (logd_fd < 0) {
+ return -EBADF;
+ }
+
+ /*
+ * The write below could be lost, but will never block.
+ *
+ * ENOTCONN occurs if logd dies.
+ * EAGAIN occurs if logd is overloaded.
+ */
+ ret = writev(logd_fd, vec, nr);
+ if (ret < 0) {
+ ret = -errno;
+ if (ret == -ENOTCONN) {
+ ret = __write_to_log_initialize();
+ if (ret < 0) {
+ return ret;
+ }
+
+ ret = writev(logd_fd, vec, nr);
+ if (ret < 0) {
+ ret = -errno;
+ }
+ }
+ }
+
+ return ret;
+}
+
+static int __write_to_log_init(struct iovec *vec, size_t nr)
+{
+ if (write_to_log == __write_to_log_init) {
+
+ if (getppid() == ZYGOTE_PARENT_PID) {
+ return 0;
+ }
+
+ int ret;
+
+ ret = __write_to_log_initialize();
+ if (ret < 0) {
+ return ret;
+ }
+
+ write_to_log = __write_to_log_socket;
+ }
+ return write_to_log(vec, nr);
+}
+
+int __android_seemp_socket_write(int len, const char *msg)
+{
+ struct iovec vec;
+ vec.iov_base = (void *) msg;
+ vec.iov_len = len;
+
+ return write_to_log(&vec, 1);
+}
+
+namespace android {
+
+/*
+ * In class android.util.Log:
+ * public static native int println_native(int buffer, int priority, String tag, String msg)
+ */
+static jint android_util_SeempLog_println_native(JNIEnv* env, jobject clazz,
+ jint api, jstring msgObj)
+{
+ if (msgObj == NULL) {
+ jniThrowNullPointerException(env, "seemp_println needs a message");
+ return -1;
+ }
+
+ int apiId = (int)api;
+ int apiIdLen = sizeof(apiId);
+ int utf8MsgLen = env->GetStringUTFLength(msgObj);
+ int len = apiIdLen + 1 + utf8MsgLen + 1;
+ char *msg = (char*)malloc(len);
+ if ( NULL == msg )
+ {
+ return -1;
+ }
+ char *params = msg + apiIdLen + 1; // api_id + encoding byte + params
+
+ *((int*)msg) = apiId; // copy api id
+ // // skip encoding byte
+ env->GetStringUTFRegion(msgObj, 0, env->GetStringLength(msgObj), params); // copy message
+ msg[len - 1] = 0; // copy terminating zero
+
+ int res = __android_seemp_socket_write(len, msg); // send message
+
+ free(msg);
+
+ return res;
+}
+
+/*
+ * JNI registration.
+ */
+static JNINativeMethod gMethods[] = {
+ /* name, signature, funcPtr */
+ { "seemp_println_native", "(ILjava/lang/String;)I",
+ (void*) android_util_SeempLog_println_native },
+};
+
+int register_android_util_SeempLog(JNIEnv* env)
+{
+ jclass clazz = env->FindClass("android/util/SeempLog");
+ if (clazz == NULL) {
+ return -1;
+ }
+
+ return AndroidRuntime::registerNativeMethods(env, "android/util/SeempLog", gMethods,
+ NELEM(gMethods));
+}
+
+}; // namespace android
diff --git a/core/jni/android_view_DisplayListCanvas.cpp b/core/jni/android_view_DisplayListCanvas.cpp
index d6f9db5..71aee90 100644
--- a/core/jni/android_view_DisplayListCanvas.cpp
+++ b/core/jni/android_view_DisplayListCanvas.cpp
@@ -204,6 +204,12 @@
static jboolean android_view_DisplayListCanvas_isAvailable(JNIEnv* env, jobject clazz) {
char prop[PROPERTY_VALUE_MAX];
+
+ property_get("persist.sys.force_sw_gles", prop, "0");
+ if (atoi(prop) == 1) {
+ return JNI_FALSE;
+ }
+
if (property_get("ro.kernel.qemu", prop, NULL) == 0) {
// not in the emulator
return JNI_TRUE;
diff --git a/core/jni/com_android_internal_app_ActivityTrigger.cpp b/core/jni/com_android_internal_app_ActivityTrigger.cpp
new file mode 100644
index 0000000..77cc3ab
--- /dev/null
+++ b/core/jni/com_android_internal_app_ActivityTrigger.cpp
@@ -0,0 +1,252 @@
+/* Copyright (c) 2015-2016, 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.
+ *
+ */
+
+#define LOG_TAG "ActTriggerJNI"
+
+#include "jni.h"
+#include "JNIHelp.h"
+#include <android_runtime/AndroidRuntime.h>
+
+#include <dlfcn.h>
+#include <limits.h>
+#include <string.h>
+
+#include <cutils/properties.h>
+#include <utils/Log.h>
+
+#define LIBRARY_PATH_PREFIX "/vendor/lib/"
+
+namespace android
+{
+
+// ----------------------------------------------------------------------------
+/*
+ * Stuct containing handle to dynamically loaded lib as well as function
+ * pointers to key interfaces.
+ */
+typedef struct dlLibHandler {
+ void *dlhandle;
+ void (*startActivity)(const char *, int *);
+ void (*resumeActivity)(const char *);
+ void (*pauseActivity)(const char *);
+ void (*stopActivity)(const char *);
+ void (*init)(void);
+ void (*deinit)(void);
+ void (*miscActivity)(int, const char *, int, int, float *);
+ const char *dlname;
+}dlLibHandler;
+
+/*
+ * Init for activity trigger library
+ */
+static dlLibHandler mDlLibHandler = {
+ NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, "ro.vendor.at_library"
+};
+
+// ----------------------------------------------------------------------------
+
+static void
+com_android_internal_app_ActivityTrigger_native_at_init()
+{
+ const char *rc;
+ char buf[PROPERTY_VALUE_MAX];
+ bool errored = false;
+
+ /* Retrieve name of vendor library */
+ if (property_get(mDlLibHandler.dlname, buf, NULL) <= 0) {
+ return;
+ }
+
+ /* Sanity check - ensure */
+ buf[PROPERTY_VALUE_MAX-1] = '\0';
+ if (strstr(buf, "/") != NULL) {
+ return;
+ }
+
+ mDlLibHandler.dlhandle = dlopen(buf, RTLD_NOW | RTLD_LOCAL);
+ if (mDlLibHandler.dlhandle == NULL) {
+ return;
+ }
+
+ dlerror();
+
+ *(void **) (&mDlLibHandler.startActivity) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_start");
+ if ((rc = dlerror()) != NULL) {
+ errored = true;
+ }
+ if (!errored) {
+ *(void **) (&mDlLibHandler.resumeActivity) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_resume");
+ if ((rc = dlerror()) != NULL) {
+ errored = true;
+ }
+ }
+ if (!errored) {
+ *(void **) (&mDlLibHandler.pauseActivity) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_pause");
+ if ((rc = dlerror()) != NULL) {
+ errored = true;
+ }
+ }
+ if (!errored) {
+ *(void **) (&mDlLibHandler.stopActivity) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_stop");
+ if ((rc = dlerror()) != NULL) {
+ errored = true;
+ }
+ }
+ if (!errored) {
+ *(void **) (&mDlLibHandler.init) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_init");
+ if ((rc = dlerror()) != NULL) {
+ errored = true;
+ }
+ }
+ if (!errored) {
+ *(void **) (&mDlLibHandler.miscActivity) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_misc");
+ if ((rc = dlerror()) != NULL) {
+ errored = true;
+ }
+ }
+ if (errored) {
+ mDlLibHandler.startActivity = NULL;
+ mDlLibHandler.resumeActivity = NULL;
+ mDlLibHandler.pauseActivity = NULL;
+ mDlLibHandler.stopActivity = NULL;
+ mDlLibHandler.miscActivity = NULL;
+ if (mDlLibHandler.dlhandle) {
+ dlclose(mDlLibHandler.dlhandle);
+ mDlLibHandler.dlhandle = NULL;
+ }
+ } else {
+ (*mDlLibHandler.init)();
+ }
+}
+
+static void
+com_android_internal_app_ActivityTrigger_native_at_deinit(JNIEnv *env, jobject clazz)
+{
+ if (mDlLibHandler.dlhandle) {
+ mDlLibHandler.startActivity = NULL;
+ mDlLibHandler.resumeActivity = NULL;
+ mDlLibHandler.pauseActivity = NULL;
+ mDlLibHandler.stopActivity = NULL;
+ mDlLibHandler.miscActivity = NULL;
+
+ *(void **) (&mDlLibHandler.deinit) = dlsym(mDlLibHandler.dlhandle, "activity_trigger_deinit");
+ if (mDlLibHandler.deinit) {
+ (*mDlLibHandler.deinit)();
+ }
+
+ dlclose(mDlLibHandler.dlhandle);
+ mDlLibHandler.dlhandle = NULL;
+ }
+}
+
+static jint
+com_android_internal_app_ActivityTrigger_native_at_startActivity(JNIEnv *env, jobject clazz, jstring activity, jint flags)
+{
+ int activiyFlags = flags;
+ if(mDlLibHandler.startActivity && activity) {
+ const char *actStr = env->GetStringUTFChars(activity, NULL);
+ if (actStr) {
+ (*mDlLibHandler.startActivity)(actStr, &activiyFlags);
+ env->ReleaseStringUTFChars(activity, actStr);
+ }
+ }
+ return activiyFlags;
+}
+
+static void
+com_android_internal_app_ActivityTrigger_native_at_resumeActivity(JNIEnv *env, jobject clazz, jstring activity)
+{
+ if(mDlLibHandler.resumeActivity && activity) {
+ const char *actStr = env->GetStringUTFChars(activity, NULL);
+ if (actStr) {
+ (*mDlLibHandler.resumeActivity)(actStr);
+ env->ReleaseStringUTFChars(activity, actStr);
+ }
+ }
+}
+
+static void
+com_android_internal_app_ActivityTrigger_native_at_pauseActivity(JNIEnv *env, jobject clazz, jstring activity)
+{
+ if(mDlLibHandler.pauseActivity && activity) {
+ const char *actStr = env->GetStringUTFChars(activity, NULL);
+ if (NULL != actStr) {
+ (*mDlLibHandler.pauseActivity)(actStr);
+ env->ReleaseStringUTFChars(activity, actStr);
+ }
+ }
+}
+
+static void
+com_android_internal_app_ActivityTrigger_native_at_stopActivity(JNIEnv *env, jobject clazz, jstring activity)
+{
+ if(mDlLibHandler.stopActivity && activity) {
+ const char *actStr = env->GetStringUTFChars(activity, NULL);
+ if (NULL != actStr) {
+ (*mDlLibHandler.stopActivity)(actStr);
+ env->ReleaseStringUTFChars(activity, actStr);
+ }
+ }
+}
+
+static jfloat
+com_android_internal_app_ActivityTrigger_native_at_miscActivity(JNIEnv *env, jobject clazz, jint func, jstring activity, jint type, jint flag)
+{
+ float scaleValue = -1.0f;
+ if (mDlLibHandler.miscActivity && activity && func) {
+ const char *actStr = env->GetStringUTFChars(activity, NULL);
+ if (actStr) {
+ (*mDlLibHandler.miscActivity)(func, actStr, type, flag, &scaleValue);
+ env->ReleaseStringUTFChars(activity, actStr);
+ }
+ }
+ return scaleValue;
+}
+
+// ----------------------------------------------------------------------------
+
+static JNINativeMethod gMethods[] = {
+ {"native_at_startActivity", "(Ljava/lang/String;I)I", (void *)com_android_internal_app_ActivityTrigger_native_at_startActivity},
+ {"native_at_resumeActivity", "(Ljava/lang/String;)V", (void *)com_android_internal_app_ActivityTrigger_native_at_resumeActivity},
+ {"native_at_pauseActivity", "(Ljava/lang/String;)V", (void *)com_android_internal_app_ActivityTrigger_native_at_pauseActivity},
+ {"native_at_stopActivity", "(Ljava/lang/String;)V", (void *)com_android_internal_app_ActivityTrigger_native_at_stopActivity},
+ {"native_at_deinit", "()V", (void *)com_android_internal_app_ActivityTrigger_native_at_deinit},
+ {"native_at_miscActivity", "(ILjava/lang/String;II)F", (void *)com_android_internal_app_ActivityTrigger_native_at_miscActivity},
+};
+
+int register_com_android_internal_app_ActivityTrigger(JNIEnv *env)
+{
+ com_android_internal_app_ActivityTrigger_native_at_init();
+
+ return AndroidRuntime::registerNativeMethods(env,
+ "com/android/internal/app/ActivityTrigger", gMethods, NELEM(gMethods));
+}
+
+} // namespace android
diff --git a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
old mode 100644
new mode 100755
index 364ac44..59e192f
--- a/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
+++ b/core/jni/com_android_internal_content_NativeLibraryHelper.cpp
@@ -36,7 +36,7 @@
#include <inttypes.h>
#include <sys/stat.h>
#include <sys/types.h>
-
+#include <dlfcn.h>
#define APK_LIB "lib/"
#define APK_LIB_LEN (sizeof(APK_LIB) - 1)
@@ -55,6 +55,56 @@
#define TMP_FILE_PATTERN "/tmp.XXXXXX"
#define TMP_FILE_PATTERN_LEN (sizeof(TMP_FILE_PATTERN) - 1)
+typedef void* PFilterObject;
+
+typedef PFilterObject (*PRegistFilterObject)(int fd);
+
+typedef void (*PUnRegistFilterObject)(int fd);
+
+typedef PFilterObject (*PGetFilterObject)(int fd);
+
+typedef int (*PNameFilter)(char* name, int length, void* param);
+
+typedef int (*PFilterLibrary)(PFilterObject obj, PNameFilter filter, void* param);
+
+typedef int (*PHasRenderScript)(PFilterObject obj);
+
+#define LIB_UNINIT 0
+#define LIB_INITED_AND_FAIL -1
+#define LIB_INITED_AND_SUCCESS 1
+static int g_libInit = LIB_UNINIT;
+
+static PRegistFilterObject RegistFilterObjectFunc = NULL;
+static PUnRegistFilterObject UnRegistFilterObjectFunc = NULL;
+static PGetFilterObject GetFilterObjectFunc = NULL;
+static PFilterLibrary FilterLibraryFunc = NULL;
+static PHasRenderScript HasRenderScriptFunc = NULL;
+
+static int initApkScanLib() {
+ if (g_libInit!=LIB_UNINIT)
+ return g_libInit;
+ void* handle = dlopen("libapkscanner.so", RTLD_NOW);
+ if (handle != NULL) {
+ RegistFilterObjectFunc = (PRegistFilterObject)dlsym(handle, "RegistFilterObject");
+ UnRegistFilterObjectFunc = (PUnRegistFilterObject)dlsym(handle, "UnRegistFilterObject");
+ GetFilterObjectFunc = (PGetFilterObject)dlsym(handle, "GetFilterObject");
+ FilterLibraryFunc = (PFilterLibrary)dlsym(handle, "FilterLibrary");
+ HasRenderScriptFunc = (PHasRenderScript)dlsym(handle, "HasRenderScript");
+ if (NULL != RegistFilterObjectFunc &&
+ NULL != UnRegistFilterObjectFunc &&
+ NULL != GetFilterObjectFunc &&
+ NULL != FilterLibraryFunc &&
+ NULL != HasRenderScriptFunc) {
+ g_libInit = LIB_INITED_AND_SUCCESS;
+ } else {
+ g_libInit = LIB_INITED_AND_FAIL;
+ }
+ } else {
+ g_libInit = LIB_INITED_AND_FAIL;
+ }
+ return g_libInit;
+}
+
namespace android {
// These match PackageManager.java install codes
@@ -390,6 +440,77 @@
const char* mLastSlash;
};
+typedef struct _LibFileDealer
+{
+ ZipFileRO* zipFile;
+ iterFunc callFunc;
+ JNIEnv *env;
+ void* callArg;
+ const ScopedUtfChars* cpuAbi;
+ install_status_t ret;
+} LibFileDealer, *PLibFileDealer;
+
+typedef struct _LibFileAbiDealer
+{
+ int status;
+ int numAbis;
+ Vector<ScopedUtfChars*>* supportedAbis;
+} LibFileAbiDealer, *PLibFileAbiDealer;
+
+static int dealLibFile(char* fileName, int fileNameLen, void* param)
+{
+ PLibFileDealer dealer = (PLibFileDealer)param;
+ char temp = fileName[fileNameLen];
+ fileName[fileNameLen] = '\0';
+ // Check to make sure the CPU ABI of this file is one we support.
+ const char* lastSlash = strrchr(fileName, '/');
+ const char* cpuAbiOffset = fileName + APK_LIB_LEN;
+ const size_t cpuAbiRegionSize = lastSlash - cpuAbiOffset;
+ int ret = 0;
+ if (dealer->cpuAbi->size() == cpuAbiRegionSize
+ && !strncmp(cpuAbiOffset, dealer->cpuAbi->c_str(), cpuAbiRegionSize)) {
+ ZipEntryRO entry = dealer->zipFile->findEntryByName(fileName);
+ dealer->ret = dealer->callFunc(dealer->env, dealer->callArg,
+ dealer->zipFile, entry, lastSlash + 1);
+ if (dealer->ret != INSTALL_SUCCEEDED) {
+ ALOGV("Failure for entry %s", lastSlash + 1);
+ ret = 1;
+ }
+ }
+ fileName[fileNameLen] = temp;
+ return ret;
+}
+
+static int dealLibAbiFile(char* fileName, int fileNameLen, void* param)
+{
+ PLibFileAbiDealer dealer = (PLibFileAbiDealer)param;
+ char temp = fileName[fileNameLen];
+ fileName[fileNameLen] = '\0';
+ int status = dealer->status;
+ if (status == NO_NATIVE_LIBRARIES) {
+ status = dealer->status = INSTALL_FAILED_NO_MATCHING_ABIS;
+ }
+ const char* abiOffset = fileName + APK_LIB_LEN;
+ const char* lastSlash = strrchr(fileName, '/');
+ const size_t abiSize = lastSlash - abiOffset;
+ int ret = 0;
+ for (int i = 0; i < dealer->numAbis; i++) {
+ const ScopedUtfChars* abi = (*(dealer->supportedAbis))[i];
+ if (abi != NULL && abi->size() == abiSize && !strncmp(abiOffset, abi->c_str(), abiSize)) {
+ // The entry that comes in first (i.e. with a lower index) has the higher priority.
+ if (((i < status) && (status >= 0)) || (status < 0) ) {
+ status = dealer->status = i;
+ if (0 == status) {
+ ret = 1;
+ break;
+ }
+ }
+ }
+ }
+ fileName[fileNameLen] = temp;
+ return ret;
+}
+
static install_status_t
iterateOverNativeFiles(JNIEnv *env, jlong apkHandle, jstring javaCpuAbi,
iterFunc callFunc, void* callArg) {
@@ -397,7 +518,27 @@
if (zipFile == NULL) {
return INSTALL_FAILED_INVALID_APK;
}
-
+ if (initApkScanLib() == LIB_INITED_AND_SUCCESS) {
+ PFilterObject filter = GetFilterObjectFunc(zipFile->getFileDescriptor());
+ if (filter != NULL) {
+ const ScopedUtfChars cpuAbi(env, javaCpuAbi);
+ if (cpuAbi.c_str() == NULL) {
+ // This would've thrown, so this return code isn't observable by
+ // Java.
+ return INSTALL_FAILED_INVALID_APK;
+ }
+ LibFileDealer param;
+ param.zipFile = zipFile;
+ param.callFunc = callFunc;
+ param.env = env;
+ param.callArg = callArg;
+ param.cpuAbi = &cpuAbi;
+ param.ret = INSTALL_SUCCEEDED;
+ if (0 == FilterLibraryFunc(filter, dealLibFile, ¶m)) {
+ return param.ret;
+ }
+ }
+ }
UniquePtr<NativeLibrariesIterator> it(NativeLibrariesIterator::create(zipFile));
if (it.get() == NULL) {
return INSTALL_FAILED_INVALID_APK;
@@ -445,6 +586,24 @@
if (zipFile == NULL) {
return INSTALL_FAILED_INVALID_APK;
}
+ int status = NO_NATIVE_LIBRARIES;
+ if (initApkScanLib() == LIB_INITED_AND_SUCCESS) {
+ PFilterObject filter = GetFilterObjectFunc(zipFile->getFileDescriptor());
+ if (filter != NULL) {
+ LibFileAbiDealer param;
+ param.status = status;
+ param.numAbis = numAbis;
+ param.supportedAbis = &supportedAbis;
+ int ret = FilterLibraryFunc(filter, dealLibAbiFile, ¶m);
+ if ((0 == ret) || (1 == ret)) {
+ status = param.status;
+ for (int i = 0; i < numAbis; ++i) {
+ delete supportedAbis[i];
+ }
+ return status;
+ }
+ }
+ }
UniquePtr<NativeLibrariesIterator> it(NativeLibrariesIterator::create(zipFile));
if (it.get() == NULL) {
@@ -452,7 +611,7 @@
}
ZipEntryRO entry = NULL;
- int status = NO_NATIVE_LIBRARIES;
+
while ((entry = it->next()) != NULL) {
// We're currently in the lib/ directory of the APK, so it does have some native
// code. We should return INSTALL_FAILED_NO_MATCHING_ABIS if none of the
@@ -523,6 +682,16 @@
com_android_internal_content_NativeLibraryHelper_hasRenderscriptBitcode(JNIEnv *env, jclass clazz,
jlong apkHandle) {
ZipFileRO* zipFile = reinterpret_cast<ZipFileRO*>(apkHandle);
+ if (initApkScanLib() == LIB_INITED_AND_SUCCESS) {
+ PFilterObject filter = GetFilterObjectFunc(zipFile->getFileDescriptor());
+ if (filter != NULL) {
+ int ret = HasRenderScriptFunc(filter);
+ if (1 == ret)
+ return BITCODE_PRESENT;
+ else if(0 == ret)
+ return NO_BITCODE_PRESENT;
+ }
+ }
void* cookie = NULL;
if (!zipFile->startIteration(&cookie, NULL /* prefix */, RS_BITCODE_SUFFIX)) {
return APK_SCAN_ERROR;
@@ -551,6 +720,9 @@
{
ScopedUtfChars filePath(env, apkPath);
ZipFileRO* zipFile = ZipFileRO::open(filePath.c_str());
+ if (zipFile != NULL && initApkScanLib() == LIB_INITED_AND_SUCCESS) {
+ RegistFilterObjectFunc(zipFile->getFileDescriptor());
+ }
return reinterpret_cast<jlong>(zipFile);
}
@@ -558,6 +730,13 @@
static void
com_android_internal_content_NativeLibraryHelper_close(JNIEnv *env, jclass, jlong apkHandle)
{
+ if (initApkScanLib() == LIB_INITED_AND_SUCCESS) {
+ ZipFileRO* zipFile = reinterpret_cast<ZipFileRO*>(apkHandle);
+ if (zipFile != NULL) {
+ UnRegistFilterObjectFunc(zipFile->getFileDescriptor());
+ }
+ }
+
delete reinterpret_cast<ZipFileRO*>(apkHandle);
}
diff --git a/core/jni/fd_utils-inl.h b/core/jni/fd_utils-inl.h
index e1ed541..c333531 100644
--- a/core/jni/fd_utils-inl.h
+++ b/core/jni/fd_utils-inl.h
@@ -51,6 +51,7 @@
"/dev/null",
"/dev/socket/zygote",
"/dev/socket/zygote_secondary",
+ "/system/etc/event-log-tags",
"/sys/kernel/debug/tracing/trace_marker",
"/system/framework/framework-res.apk",
"/dev/urandom",
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 37b7d6a..167ff19 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -46,6 +46,7 @@
<protected-broadcast android:name="android.intent.action.PACKAGE_DATA_CLEARED" />
<protected-broadcast android:name="android.intent.action.PACKAGE_FIRST_LAUNCH" />
<protected-broadcast android:name="android.intent.action.PACKAGE_NEEDS_VERIFICATION" />
+ <protected-broadcast android:name="android.intent.action.PACKAGE_NEEDS_OPTIONAL_VERIFICATION" />
<protected-broadcast android:name="android.intent.action.PACKAGE_VERIFIED" />
<protected-broadcast android:name="android.intent.action.PACKAGES_SUSPENDED" />
<protected-broadcast android:name="android.intent.action.PACKAGES_UNSUSPENDED" />
@@ -83,6 +84,7 @@
<protected-broadcast android:name="android.intent.action.USER_INITIALIZE" />
<protected-broadcast android:name="android.intent.action.INTENT_FILTER_NEEDS_VERIFICATION" />
+ <protected-broadcast android:name="Auth_password_wrong" />
<protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGED" />
<protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGING" />
<protected-broadcast android:name="android.os.action.DEVICE_IDLE_MODE_CHANGED" />
@@ -286,8 +288,26 @@
<protected-broadcast android:name="com.android.server.usb.ACTION_OPEN_IN_APPS" />
<protected-broadcast android:name="com.android.server.am.DELETE_DUMPHEAP" />
<protected-broadcast android:name="com.android.server.net.action.SNOOZE_WARNING" />
+
+ <protected-broadcast android:name="com.qualcomm.qti.wigig.WIGIG_CREDENTIAL_CHANGED" />
+ <protected-broadcast android:name="com.qualcomm.qti.wigig.WIGIG_STATE_CHANGED" />
+ <protected-broadcast android:name="com.qualcomm.qti.wigig.WIGIG_AP_STATE_CHANGED" />
+ <protected-broadcast android:name="com.qualcomm.qti.wigig.supplicant.CONNECTION_CHANGE" />
+ <protected-broadcast android:name="com.qualcomm.qti.wigig.STATE_CHANGE" />
+ <protected-broadcast android:name="com.qualcomm.qti.wigig.CONFIGURED_NETWORKS_CHANGE" />
+ <protected-broadcast android:name="com.qualcomm.qti.wigig.SCAN_RESULTS" />
+ <protected-broadcast android:name="com.qualcomm.qti.wigig.LINK_CONFIGURATION_CHANGED" />
+ <protected-broadcast android:name="wigig_scan_available" />
+ <protected-broadcast android:name="android.net.wigig.p2p.STATE_CHANGED" />
+ <protected-broadcast android:name="android.net.wigig.p2p.CONNECTION_STATE_CHANGE" />
+ <protected-broadcast android:name="android.net.wigig.p2p.PEERS_CHANGED" />
+ <protected-broadcast android:name="android.net.wigig.p2p.DISCOVERY_STATE_CHANGE" />
+ <protected-broadcast android:name="android.net.wigig.p2p.THIS_DEVICE_CHANGED" />
+ <protected-broadcast android:name="android.net.wigig.p2p.PERSISTENT_GROUPS_CHANGED" />
+
<protected-broadcast android:name="android.net.wifi.WIFI_STATE_CHANGED" />
<protected-broadcast android:name="android.net.wifi.WIFI_AP_STATE_CHANGED" />
+ <protected-broadcast android:name="android.net.wifi.WIFI_AP_SUB_SYSTEM_RESTART" />
<protected-broadcast android:name="android.net.wifi.WIFI_CREDENTIAL_CHANGED" />
<protected-broadcast android:name="android.net.wifi.WIFI_SCAN_AVAILABLE" />
<protected-broadcast android:name="android.net.wifi.SCAN_RESULTS" />
@@ -303,6 +323,7 @@
<protected-broadcast android:name="android.net.wifi.p2p.PEERS_CHANGED" />
<protected-broadcast android:name="android.net.wifi.p2p.CONNECTION_STATE_CHANGE" />
<protected-broadcast android:name="android.net.wifi.p2p.PERSISTENT_GROUPS_CHANGED" />
+ <protected-broadcast android:name="codeaurora.net.conn.TETHER_CONNECT_STATE_CHANGED" />
<protected-broadcast android:name="android.net.conn.TETHER_STATE_CHANGED" />
<protected-broadcast android:name="android.net.conn.INET_CONDITION_ACTION" />
<protected-broadcast android:name="android.net.conn.NETWORK_CONDITIONS_MEASURED" />
@@ -490,6 +511,8 @@
<protected-broadcast android:name="android.intent.action.MANAGED_PROFILE_UNAVAILABLE" />
<protected-broadcast android:name="com.android.server.pm.DISABLE_QUIET_MODE_AFTER_UNLOCK" />
+ <protected-broadcast android:name="android.telecom.action.TTY_PREFERRED_MODE_CHANGED" />
+ <protected-broadcast android:name="android.telecom.action.CURRENT_TTY_MODE_CHANGED" />
<protected-broadcast android:name="com.android.server.retaildemo.ACTION_RESET_DEMO" />
<!-- ====================================================================== -->
@@ -1078,6 +1101,11 @@
<permission android:name="android.permission.MODIFY_CELL_BROADCASTS"
android:protectionLevel="signature|privileged" />
+ <!-- Allows an application to authorize outgoing SMS messages.
+ @hide -->
+ <permission android:name="com.qti.permission.AUTHORIZE_OUTGOING_SMS"
+ android:protectionLevel="signature" />
+
<!-- =============================================================== -->
<!-- Permissions for setting the device alarm -->
<!-- =============================================================== -->
diff --git a/core/res/res/drawable-hdpi/ic_lock_power_reboot_alpha.png b/core/res/res/drawable-hdpi/ic_lock_power_reboot_alpha.png
new file mode 100644
index 0000000..17b4866
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_lock_power_reboot_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_lock_power_reboot_alpha.png b/core/res/res/drawable-mdpi/ic_lock_power_reboot_alpha.png
new file mode 100644
index 0000000..471a41c8
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_lock_power_reboot_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_lock_power_reboot_alpha.png b/core/res/res/drawable-xhdpi/ic_lock_power_reboot_alpha.png
new file mode 100644
index 0000000..a786b40
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_lock_power_reboot_alpha.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/ic_lock_power_reboot_alpha.png b/core/res/res/drawable-xxhdpi/ic_lock_power_reboot_alpha.png
new file mode 100644
index 0000000..6072387
--- /dev/null
+++ b/core/res/res/drawable-xxhdpi/ic_lock_power_reboot_alpha.png
Binary files differ
diff --git a/core/res/res/drawable/ic_lock_power_reboot.xml b/core/res/res/drawable/ic_lock_power_reboot.xml
new file mode 100644
index 0000000..82c7927
--- /dev/null
+++ b/core/res/res/drawable/ic_lock_power_reboot.xml
@@ -0,0 +1,33 @@
+<?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.
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/ic_lock_power_reboot_alpha"
+ android:tint="?attr/colorControlNormal" />
+
diff --git a/core/res/res/layout/permission_confirmation_dialog.xml b/core/res/res/layout/permission_confirmation_dialog.xml
new file mode 100644
index 0000000..ab5b9fa
--- /dev/null
+++ b/core/res/res/layout/permission_confirmation_dialog.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright (c) 2013, The Linux Foundation. All rights reserved.
+** Not a Contribution.
+**
+** Copyright 2012 The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/parentPanel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="8dip"
+ android:layout_marginRight="8dip"
+ android:orientation="vertical">
+
+ <TextView android:id="@+id/permission_text"
+ style="?android:attr/textAppearanceMedium"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip"
+ android:paddingTop="16dip"
+ android:paddingBottom="16dip" />
+
+ <TableLayout android:id="@+id/permission_remember_layout"
+ android:shrinkColumns="1"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingLeft="16dip"
+ android:paddingRight="16dip">
+
+ <TableRow
+ android:layout_width="wrap_content"
+ 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>
+
+ </TableLayout>
+
+</LinearLayout>
diff --git a/core/res/res/values-ar/strings.xml b/core/res/res/values-ar/strings.xml
index 74b145b..4944e1b 100644
--- a/core/res/res/values-ar/strings.xml
+++ b/core/res/res/values-ar/strings.xml
@@ -1828,5 +1828,7 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"يمكنك إعادة تعيين بيانات المصنع لاستخدام هذا الجهاز بدون قيود"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"المس للتعرف على مزيد من المعلومات."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"تم تعطيل <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="global_action_reboot">"إعادة التمهيد"</string>
<string name="conference_call" msgid="3751093130790472426">"مكالمة جماعية"</string>
</resources>
+
diff --git a/core/res/res/values-bn-rBD/strings.xml b/core/res/res/values-bn-rBD/strings.xml
index 3c8d3bc..c345a6b 100644
--- a/core/res/res/values-bn-rBD/strings.xml
+++ b/core/res/res/values-bn-rBD/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"কোনো বিধিনিষেধ ছাড়াই এই ডিভাইসটিকে ব্যবহার করতে ফ্যাক্টরি রিসেট করুন"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"আরো জানতে স্পর্শ করুন৷"</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"অক্ষম করা <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="global_action_reboot">"রিবুট করুন"</string>
<string name="conference_call" msgid="3751093130790472426">"কনফারেন্স কল"</string>
</resources>
diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml
index c9c7454..683eba6 100644
--- a/core/res/res/values-de/strings.xml
+++ b/core/res/res/values-de/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Gerät auf Werkseinstellungen zurücksetzen, um es ohne Einschränkungen zu nutzen"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Für weitere Informationen tippen."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> deaktiviert"</string>
+ <string name="global_action_reboot">"Neustart"</string>
<string name="conference_call" msgid="3751093130790472426">"Telefonkonferenz"</string>
</resources>
diff --git a/core/res/res/values-es-rUS/strings.xml b/core/res/res/values-es-rUS/strings.xml
index 2db6686..86c872e 100644
--- a/core/res/res/values-es-rUS/strings.xml
+++ b/core/res/res/values-es-rUS/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Restablece la configuración de fábrica para usar este dispositivo sin restricciones"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Toca para obtener más información."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"Se inhabilitó <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="global_action_reboot">"Reiniciar"</string>
<string name="conference_call" msgid="3751093130790472426">"Conferencia"</string>
</resources>
diff --git a/core/res/res/values-es/strings.xml b/core/res/res/values-es/strings.xml
index c140e0c..8cfbeb4 100644
--- a/core/res/res/values-es/strings.xml
+++ b/core/res/res/values-es/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Restablece los datos de fábrica para usar este dispositivo sin restricciones"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Toca para obtener más información."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> inhabilitado"</string>
+ <string name="global_action_reboot">"Reiniciar"</string>
<string name="conference_call" msgid="3751093130790472426">"Conferencia"</string>
</resources>
diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml
index 1c9289b..d62aba7 100644
--- a/core/res/res/values-fa/strings.xml
+++ b/core/res/res/values-fa/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"برای استفاده بدون محدودیت از این دستگاه، بازنشانی کارخانهای انجام دهید"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"برای یادگیری بیشتر لمس کنید."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> غیرفعال شد"</string>
+ <string name="global_action_reboot">"راهاندازی مجدد"</string>
<string name="conference_call" msgid="3751093130790472426">"تماس کنفرانسی"</string>
</resources>
diff --git a/core/res/res/values-fr/strings.xml b/core/res/res/values-fr/strings.xml
index faa5686..9f93681 100644
--- a/core/res/res/values-fr/strings.xml
+++ b/core/res/res/values-fr/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Rétablir la configuration d\'usine pour utiliser cet appareil sans restrictions"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Appuyez ici pour en savoir plus."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"Élément \"<xliff:g id="LABEL">%1$s</xliff:g>\" désactivé"</string>
+ <string name="global_action_reboot">"Redémarrer"</string>
<string name="conference_call" msgid="3751093130790472426">"Conférence téléphonique"</string>
</resources>
diff --git a/core/res/res/values-gu-rIN/strings.xml b/core/res/res/values-gu-rIN/strings.xml
index 290e885..b469fb3 100644
--- a/core/res/res/values-gu-rIN/strings.xml
+++ b/core/res/res/values-gu-rIN/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"આ ઉપકરણનો પ્રતિબંધો વિના ઉપયોગ કરવા માટે ફેક્ટરી રીસેટ કરો"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"વધુ જાણવા માટે ટચ કરો."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> અક્ષમ કર્યું"</string>
+ <string name="global_action_reboot">"રીબુટ કરો"</string>
<string name="conference_call" msgid="3751093130790472426">"કોન્ફરન્સ કૉલ"</string>
</resources>
diff --git a/core/res/res/values-hi/strings.xml b/core/res/res/values-hi/strings.xml
index 96be6b0..e12e9da 100644
--- a/core/res/res/values-hi/strings.xml
+++ b/core/res/res/values-hi/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"इस डिवाइस को प्रतिबंधों के बिना उपयोग करने के लिए फ़ैक्टरी रीसेट करें"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"अधिक जानने के लिए स्पर्श करें."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"अक्षम <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="global_action_reboot">"रीबूट करें"</string>
<string name="conference_call" msgid="3751093130790472426">"कॉन्फ़्रेंस कॉल"</string>
</resources>
diff --git a/core/res/res/values-in/strings.xml b/core/res/res/values-in/strings.xml
index aa90d5a..00970ec 100644
--- a/core/res/res/values-in/strings.xml
+++ b/core/res/res/values-in/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Dikembalikan ke setelan pabrik agar perangkat ini dapat digunakan tanpa batasan"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Sentuh untuk mempelajari lebih lanjut."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> dinonaktifkan"</string>
+ <string name="global_action_reboot">"Boot ulang"</string>
<string name="conference_call" msgid="3751093130790472426">"Konferensi Telepon"</string>
</resources>
diff --git a/core/res/res/values-it/strings.xml b/core/res/res/values-it/strings.xml
index a1f8fc2..5cfcd48 100644
--- a/core/res/res/values-it/strings.xml
+++ b/core/res/res/values-it/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Esegui il ripristino dei dati di fabbrica per utilizzare il dispositivo senza limitazioni"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Tocca per ulteriori informazioni."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"Widget <xliff:g id="LABEL">%1$s</xliff:g> disattivato"</string>
+ <string name="global_action_reboot">"Riavvia"</string>
<string name="conference_call" msgid="3751093130790472426">"Audioconferenza"</string>
</resources>
diff --git a/core/res/res/values-km-rKH/strings.xml b/core/res/res/values-km-rKH/strings.xml
index d00c839..4c95a37 100644
--- a/core/res/res/values-km-rKH/strings.xml
+++ b/core/res/res/values-km-rKH/strings.xml
@@ -1686,5 +1686,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"កំណត់ដូចចេញពីរោងចក្រឡើងវិញដើម្បីប្រើឧបករណ៍នេះដោយគ្មានការរឹតបន្តឹង"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"ប៉ះ ដើម្បីស្វែងយល់បន្ថែម។"</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> ដែលបានបិទដំណើរការ"</string>
+ <string name="global_action_reboot">"ចាប់ផ្ដើមឡើងវិញ"</string>
<string name="conference_call" msgid="3751093130790472426">"ការហៅជាក្រុម"</string>
</resources>
diff --git a/core/res/res/values-kn-rIN/strings.xml b/core/res/res/values-kn-rIN/strings.xml
index ab8d33a..b1acca2 100644
--- a/core/res/res/values-kn-rIN/strings.xml
+++ b/core/res/res/values-kn-rIN/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"ನಿರ್ಬಂಧಗಳು ಇಲ್ಲದೆಯೇ ಈ ಸಾಧನವನ್ನು ಬಳಸಲು ಫ್ಯಾಕ್ಟರಿ ಮರುಹೊಂದಿಸಿ"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"ಇನ್ನಷ್ಟು ತಿಳಿಯಲು ಸ್ಪರ್ಶಿಸಿ."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಲಾಗಿದೆ"</string>
+ <string name="global_action_reboot">"ರೀಬೂಟ್ ಮಾಡು"</string>
<string name="conference_call" msgid="3751093130790472426">"ಕಾನ್ಫರೆನ್ಸ್ ಕರೆ"</string>
</resources>
diff --git a/core/res/res/values-ko/strings.xml b/core/res/res/values-ko/strings.xml
index 4e704d6..09d1579 100644
--- a/core/res/res/values-ko/strings.xml
+++ b/core/res/res/values-ko/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"제한 없이 기기를 사용하기 위한 초기화"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"자세한 내용을 보려면 터치하세요."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> 사용 중지됨"</string>
+ <string name="global_action_reboot">"다시 부팅"</string>
<string name="conference_call" msgid="3751093130790472426">"다자간 통화"</string>
</resources>
diff --git a/core/res/res/values-lo-rLA/strings.xml b/core/res/res/values-lo-rLA/strings.xml
index 84ea55a..bec5ed4 100644
--- a/core/res/res/values-lo-rLA/strings.xml
+++ b/core/res/res/values-lo-rLA/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"ຣີເຊັດໃຫ້ເປັນຄ່າໂຮງງານເພື່ອໃຊ້ອຸປະກອນນີ້ໂດຍບໍ່ມີຂໍ້ຈຳກັດ"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"ແຕະເພື່ອສຶກສາເພີ່ມເຕີມ."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"ປິດການນຳໃຊ້ <xliff:g id="LABEL">%1$s</xliff:g> ແລ້ວ"</string>
+ <string name="global_action_reboot">"ເລີ່ມລະບົບໃໝ່"</string>
<string name="conference_call" msgid="3751093130790472426">"ການປະຊຸມສາຍ"</string>
</resources>
diff --git a/core/res/res/values-mcc202-mnc05/config.xml b/core/res/res/values-mcc202-mnc05/config.xml
new file mode 100644
index 0000000..7ee4dd0
--- /dev/null
+++ b/core/res/res/values-mcc202-mnc05/config.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2016, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array translatable="false" name="config_tether_apndata">
+ <item>Vf Tethering,internet.vodafone.gr,,,,,,,,,202,05,,DUN</item>
+ </string-array>
+</resources>
diff --git a/core/res/res/values-mcc216-mnc70/config.xml b/core/res/res/values-mcc216-mnc70/config.xml
new file mode 100644
index 0000000..48014bb
--- /dev/null
+++ b/core/res/res/values-mcc216-mnc70/config.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2016, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array translatable="false" name="config_tether_apndata">
+ <item>Tethering Vodafone Internet,internet.vodafone.net,,,,,,,,,216,70,,DUN</item>
+ </string-array>
+</resources>
diff --git a/core/res/res/values-mcc222-mnc01/config.xml b/core/res/res/values-mcc222-mnc01/config.xml
new file mode 100644
index 0000000..728aa7e
--- /dev/null
+++ b/core/res/res/values-mcc222-mnc01/config.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2016, 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.
+-->
+
+<!-- These resources are around just to allow their values to be customized
+ for different hardware and product builds. Do not translate. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- String containing the apn value for tethering. May be overriden by secure settings
+ TETHER_DUN_APN. Value is a comma separated series of strings:
+ "name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type",
+ Or string format of ApnSettingV3.
+ note that empty fields can be ommitted: "name,apn,,,,,,,,,310,260,,DUN" -->
+ <string-array translatable="false" name="config_tether_apndata">
+ <item>TIM WEB,ibox.tim.it,,,,,,,,,222,01,0,DUN</item>
+ </string-array>
+
+</resources>
diff --git a/core/res/res/values-mcc230-mnc03/config.xml b/core/res/res/values-mcc230-mnc03/config.xml
new file mode 100644
index 0000000..219e87e
--- /dev/null
+++ b/core/res/res/values-mcc230-mnc03/config.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2016, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array translatable="false" name="config_tether_apndata">
+ <item>Internet,internet,,,,,,,,,230,03,,DUN</item>
+ </string-array>
+</resources>
diff --git a/core/res/res/values-mcc268-mnc01/config.xml b/core/res/res/values-mcc268-mnc01/config.xml
new file mode 100644
index 0000000..f62a261
--- /dev/null
+++ b/core/res/res/values-mcc268-mnc01/config.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2016, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array translatable="false" name="config_tether_apndata">
+ <item>Vodafone Internet,internet.vodafone.pt,,,,,,,,,268,01,,DUN</item>
+ </string-array>
+</resources>
diff --git a/core/res/res/values-mcc272-mnc01/config.xml b/core/res/res/values-mcc272-mnc01/config.xml
new file mode 100644
index 0000000..360cd14
--- /dev/null
+++ b/core/res/res/values-mcc272-mnc01/config.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2016, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array translatable="false" name="config_tether_apndata">
+ <item>Internet,hs.vodafone.ie,,,,,,,,,272,01,,DUN</item>
+ </string-array>
+</resources>
diff --git a/core/res/res/values-mcc286-mnc02/config.xml b/core/res/res/values-mcc286-mnc02/config.xml
new file mode 100644
index 0000000..fa4cdaf
--- /dev/null
+++ b/core/res/res/values-mcc286-mnc02/config.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2016, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array translatable="false" name="config_tether_apndata">
+ <item>internet,internet,,,,,,,,,286,02,,DUN</item>
+ </string-array>
+</resources>
diff --git a/core/res/res/values-mcc310-mnc260/config.xml b/core/res/res/values-mcc310-mnc260/config.xml
index 2cae7cc..e6ce035 100644
--- a/core/res/res/values-mcc310-mnc260/config.xml
+++ b/core/res/res/values-mcc310-mnc260/config.xml
@@ -37,4 +37,30 @@
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
<bool name="config_carrier_wfc_ims_available">true</bool>
+
+ <!-- Array of numeric that operator considered as domestic roaming -->
+ <string-array translatable="false" name="config_operatorConsideredDomesticRoaming">
+ <item>310</item>
+ <item>311</item>
+ <item>312</item>
+ <item>313</item>
+ <item>314</item>
+ <item>315</item>
+ <item>316</item>
+ </string-array>
+
+ <!-- Exceptions of above list -->
+ <string-array translatable="false" name="config_operatorConsideredDomesticRoamingExceptions">
+ <item>310500</item>
+ <item>310970</item>
+ <item>310033</item>
+ <item>310470</item>
+ <item>310370</item>
+ <item>310032</item>
+ <item>310140</item>
+ <item>311250</item>
+ <item>310400</item>
+ <item>311170</item>
+ </string-array>
+
</resources>
diff --git a/core/res/res/values-mcc655-mnc01/config.xml b/core/res/res/values-mcc655-mnc01/config.xml
new file mode 100644
index 0000000..195095d
--- /dev/null
+++ b/core/res/res/values-mcc655-mnc01/config.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2016, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string-array translatable="false" name="config_tether_apndata">
+ <item>LTE,internet,,,,,,,,,655,01,,DUN</item>
+ </string-array>
+</resources>
diff --git a/core/res/res/values-ml-rIN/strings.xml b/core/res/res/values-ml-rIN/strings.xml
index 09b405c..ad0ebdb 100644
--- a/core/res/res/values-ml-rIN/strings.xml
+++ b/core/res/res/values-ml-rIN/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"നിയന്ത്രണങ്ങൾ ഇല്ലാതെ ഈ ഉപകരണം ഉപയോഗിക്കാൻ ഫാക്ടറി റീസെറ്റ് നടത്തുക"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"കൂടുതലറിയുന്നതിന് സ്പർശിക്കുക."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> പ്രവർത്തനരഹിതമാക്കി"</string>
+ <string name="global_action_reboot">"റീബൂട്ട് ചെയ്യുക"</string>
<string name="conference_call" msgid="3751093130790472426">"കോൺഫറൻസ് കോൾ"</string>
</resources>
diff --git a/core/res/res/values-mr-rIN/strings.xml b/core/res/res/values-mr-rIN/strings.xml
index 5239d8f..4a346b1 100644
--- a/core/res/res/values-mr-rIN/strings.xml
+++ b/core/res/res/values-mr-rIN/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"हे डिव्हाइस निर्बंधांशिवाय वापरण्यासाठी फॅक्टरी रीसेट करा"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"अधिक जाणून घेण्यासाठी स्पर्श करा."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> अक्षम केले"</string>
+ <string name="global_action_reboot">"रिबूट करा"</string>
<string name="conference_call" msgid="3751093130790472426">"परिषद कॉल"</string>
</resources>
diff --git a/core/res/res/values-my-rMM/strings.xml b/core/res/res/values-my-rMM/strings.xml
index fbcb1d1..b67c5d6 100644
--- a/core/res/res/values-my-rMM/strings.xml
+++ b/core/res/res/values-my-rMM/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"ဤစက်ပစ္စည်းကို ကန့်သတ်ချက်များမပါဘဲ အသုံးပြုရန် စက်ရုံထုတ်ဆက်တင်အတိုင်း ပြန်လည်သတ်မှတ်ပါ"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"ပိုမိုလေ့လာရန် တို့ပါ။"</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"ပိတ်ထားသည့် <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="global_action_reboot">"ပြန်လည် စတင်လည်ပတ်ပါ"</string>
<string name="conference_call" msgid="3751093130790472426">"လူအမြောက်အမြားတပြိုင်နက် ခေါ်ဆိုမှု"</string>
</resources>
diff --git a/core/res/res/values-or-rIN/strings.xml b/core/res/res/values-or-rIN/strings.xml
new file mode 100644
index 0000000..2ca4a71
--- /dev/null
+++ b/core/res/res/values-or-rIN/strings.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2016, 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 xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- label for item that reboots the phone in phone options dialog -->
+ <string name="global_action_reboot">"ରିବୁଟ୍"</string>
+</resources>
diff --git a/core/res/res/values-pa-rIN/strings.xml b/core/res/res/values-pa-rIN/strings.xml
index fc26602..2e44a2b 100644
--- a/core/res/res/values-pa-rIN/strings.xml
+++ b/core/res/res/values-pa-rIN/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"ਇਸ ਡੀਵਾਈਸ ਨੂੰ ਬਿਨਾਂ ਪਾਬੰਦੀਆਂ ਦੇ ਵਰਤਣ ਲਈ ਫੈਕਟਰੀ ਰੀਸੈੱਟ ਕਰੋ"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"ਹੋਰ ਜਾਣਨ ਲਈ ਸਪਰਸ਼ ਕਰੋ।"</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"ਅਯੋਗ ਬਣਾਇਆ ਗਿਆ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="global_action_reboot">"ਰੀਬੂਟ ਕਰੋ"</string>
<string name="conference_call" msgid="3751093130790472426">"ਕਾਨਫਰੰਸ ਕਾਲ"</string>
</resources>
diff --git a/core/res/res/values-pl/strings.xml b/core/res/res/values-pl/strings.xml
index 5a88c93..49cc334 100644
--- a/core/res/res/values-pl/strings.xml
+++ b/core/res/res/values-pl/strings.xml
@@ -1756,5 +1756,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Aby używać tego urządzenia bez ograniczeń, przywróć ustawienia fabryczne"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Kliknij, by dowiedzieć się więcej."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"Wyłączono: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="global_action_reboot">"Uruchom ponownie"</string>
<string name="conference_call" msgid="3751093130790472426">"Połączenie konferencyjne"</string>
</resources>
diff --git a/core/res/res/values-pt/strings.xml b/core/res/res/values-pt/strings.xml
index 5947ac2..6b424cc 100644
--- a/core/res/res/values-pt/strings.xml
+++ b/core/res/res/values-pt/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Redefinir para a configuração original para usar este dispositivo sem restrições"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Toque para saber mais."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"Widget <xliff:g id="LABEL">%1$s</xliff:g> desativado"</string>
+ <string name="global_action_reboot">"Reiniciar"</string>
<string name="conference_call" msgid="3751093130790472426">"Teleconferência"</string>
</resources>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index 40230fa..070c6aaa 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -1720,5 +1720,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Reveniți la setările din fabrică pentru a folosi acest dispozitiv fără restricții"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Atingeți pentru a afla mai multe."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> a fost dezactivat"</string>
+ <string name="global_action_reboot">"Reporniţi"</string>
<string name="conference_call" msgid="3751093130790472426">"Conferință telefonică"</string>
</resources>
diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml
index a126950..ace6c10 100644
--- a/core/res/res/values-ru/strings.xml
+++ b/core/res/res/values-ru/strings.xml
@@ -1756,5 +1756,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Сброс до заводских настроек для работы без ограничений"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Нажмите, чтобы узнать больше."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"Виджет <xliff:g id="LABEL">%1$s</xliff:g> отключен"</string>
+ <string name="global_action_reboot">"Перезагрузка"</string>
<string name="conference_call" msgid="3751093130790472426">"Конференц-связь"</string>
</resources>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index c2bcbf3..545e87fd 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -1756,5 +1756,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Ak chcete toto zariadenie používať bez obmedzení, obnovte na ňom továrenské nastavenia"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Klepnutím získate ďalšie informácie."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"Deaktivovaná miniaplikácia <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="global_action_reboot">"Reštartovať"</string>
<string name="conference_call" msgid="3751093130790472426">"Konferenčný hovor"</string>
</resources>
diff --git a/core/res/res/values-sl/strings.xml b/core/res/res/values-sl/strings.xml
index 99f1163..abc129b 100644
--- a/core/res/res/values-sl/strings.xml
+++ b/core/res/res/values-sl/strings.xml
@@ -1756,5 +1756,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Ponastavitev naprave na tovarniške nastavitve za uporabo brez omejitev"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Dotaknite se, če želite izvedeti več."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> – onemogočeno"</string>
+ <string name="global_action_reboot">"Znova zaženi"</string>
<string name="conference_call" msgid="3751093130790472426">"Konferenčni klic"</string>
</resources>
diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml
index 7bba6fe..4a307ed 100644
--- a/core/res/res/values-sr/strings.xml
+++ b/core/res/res/values-sr/strings.xml
@@ -1720,5 +1720,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Ресетујте уређај на фабричка подешавања да бисте га користили без ограничења"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Додирните да бисте сазнали више."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"Виџет <xliff:g id="LABEL">%1$s</xliff:g> је онемогућен"</string>
+ <string name="global_action_reboot">"Поново покрени"</string>
<string name="conference_call" msgid="3751093130790472426">"Конференцијски позив"</string>
</resources>
diff --git a/core/res/res/values-sw/strings.xml b/core/res/res/values-sw/strings.xml
index 261ec7f..abdaa57 100644
--- a/core/res/res/values-sw/strings.xml
+++ b/core/res/res/values-sw/strings.xml
@@ -1682,5 +1682,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Rejesha mipangilio iliyotoka nayo kiwandani ili utumie kifaa hiki bila vikwazo"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Gusa ili kupata maelezo zaidi."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> imezimwa"</string>
+ <string name="global_action_reboot">"Washa tena"</string>
<string name="conference_call" msgid="3751093130790472426">"Simu ya Kongamano"</string>
</resources>
diff --git a/core/res/res/values-ta-rIN/strings.xml b/core/res/res/values-ta-rIN/strings.xml
index 271e885..68f2fcf 100644
--- a/core/res/res/values-ta-rIN/strings.xml
+++ b/core/res/res/values-ta-rIN/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"இந்தச் சாதனத்தைக் கட்டுப்பாடுகளின்றிப் பயன்படுத்த, ஆரம்ப நிலைக்கு மீட்டமைக்கவும்"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"மேலும் அறிய தொடவும்."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"முடக்கப்பட்டது: <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="global_action_reboot">"மறுதுவக்கு"</string>
<string name="conference_call" msgid="3751093130790472426">"குழு அழைப்பு"</string>
</resources>
diff --git a/core/res/res/values-te-rIN/strings.xml b/core/res/res/values-te-rIN/strings.xml
index cd67c80..96f6b3b 100644
--- a/core/res/res/values-te-rIN/strings.xml
+++ b/core/res/res/values-te-rIN/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"ఈ పరికరాన్ని ఎటువంటి పరిమితులు లేకుండా ఉపయోగించడానికి ఫ్యాక్టరీ రీసెట్ చేయండి"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"మరింత తెలుసుకోవడానికి తాకండి."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> నిలిపివేయబడింది"</string>
+ <string name="global_action_reboot">"రీబూట్ చేయి"</string>
<string name="conference_call" msgid="3751093130790472426">"కాన్ఫరెన్స్ కాల్"</string>
</resources>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index fbbca89..dd7601e 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"รีเซ็ตเป็นค่าเริ่มต้นเพื่อใช้อุปกรณ์นี้โดยไร้ข้อจำกัด"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"แตะเพื่อเรียนรู้เพิ่มเติม"</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"ปิดใช้ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="global_action_reboot">"เริ่มต้นการทำงานใหม่"</string>
<string name="conference_call" msgid="3751093130790472426">"การประชุมสาย"</string>
</resources>
diff --git a/core/res/res/values-tl/strings.xml b/core/res/res/values-tl/strings.xml
index 0cabf87..b6b2f66 100644
--- a/core/res/res/values-tl/strings.xml
+++ b/core/res/res/values-tl/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"I-factory reset upang magamit ang device na ito nang walang mga paghihigpit"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Pindutin upang matuto nang higit pa."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"Na-disable ang <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="global_action_reboot">"I-reboot"</string>
<string name="conference_call" msgid="3751093130790472426">"Conference Call"</string>
</resources>
diff --git a/core/res/res/values-tr/strings.xml b/core/res/res/values-tr/strings.xml
index 1043e93..16f5c01 100644
--- a/core/res/res/values-tr/strings.xml
+++ b/core/res/res/values-tr/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Bu cihazı kısıtlama olmadan kullanmak için fabrika ayarlarına sıfırlayın"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Daha fazla bilgi edinmek için dokunun."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> devre dışı"</string>
+ <string name="global_action_reboot">"Yeniden başlat"</string>
<string name="conference_call" msgid="3751093130790472426">"Konferans Çağrısı"</string>
</resources>
diff --git a/core/res/res/values-uk/strings.xml b/core/res/res/values-uk/strings.xml
index aaf5253..923f8ae 100644
--- a/core/res/res/values-uk/strings.xml
+++ b/core/res/res/values-uk/strings.xml
@@ -1756,5 +1756,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Відновіть заводські параметри, щоб використовувати пристрій без обмежень"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Торкніться, щоб дізнатися більше."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"<xliff:g id="LABEL">%1$s</xliff:g> вимкнено"</string>
+ <string name="global_action_reboot">"Перезавантаження"</string>
<string name="conference_call" msgid="3751093130790472426">"Конференц-виклик"</string>
</resources>
diff --git a/core/res/res/values-ur-rPK/strings.xml b/core/res/res/values-ur-rPK/strings.xml
index 3136c33..06cfefcaf 100644
--- a/core/res/res/values-ur-rPK/strings.xml
+++ b/core/res/res/values-ur-rPK/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"بغیر کسی حدود کے استعمال کرنے کیلئے اس آلے کو فیکٹری ری سیٹ کریں"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"مزید جاننے کیلئے ٹچ کریں۔"</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"غیر فعال کردہ <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="global_action_reboot">"ریبوٹ کریں"</string>
<string name="conference_call" msgid="3751093130790472426">"کانفرنس کال"</string>
</resources>
diff --git a/core/res/res/values-vi/strings.xml b/core/res/res/values-vi/strings.xml
index 63af1e2..b7252ad 100644
--- a/core/res/res/values-vi/strings.xml
+++ b/core/res/res/values-vi/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"Khôi phục cài đặt gốc để sử dụng thiết bị này mà không bị hạn chế"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"Chạm để tìm hiểu thêm."</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"Đã tắt <xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="global_action_reboot">"Khởi động lại"</string>
<string name="conference_call" msgid="3751093130790472426">"Cuộc gọi nhiều bên"</string>
</resources>
diff --git a/core/res/res/values-zh-rCN/strings.xml b/core/res/res/values-zh-rCN/strings.xml
index 9c6d494..10b78c1 100644
--- a/core/res/res/values-zh-rCN/strings.xml
+++ b/core/res/res/values-zh-rCN/strings.xml
@@ -212,6 +212,9 @@
<string name="shutdown_confirm_question" msgid="2906544768881136183">"您要关机吗?"</string>
<string name="reboot_safemode_title" msgid="7054509914500140361">"重新启动并进入安全模式"</string>
<string name="reboot_safemode_confirm" msgid="55293944502784668">"您要重新启动并进入安全模式吗?这样会停用您已安装的所有第三方应用。再次重新启动将恢复这些应用。"</string>
+ <string name="reboot_title">"重启"</string>
+ <string name="reboot_confirm" product="tablet">"您的平板电脑将会重启。"</string>
+ <string name="reboot_confirm" product="default">"您的手机将会重启。"</string>
<string name="recent_tasks_title" msgid="3691764623638127888">"近期任务"</string>
<string name="no_recent_tasks" msgid="8794906658732193473">"最近没有运行任何应用"</string>
<string name="global_actions" product="tablet" msgid="408477140088053665">"平板电脑选项"</string>
@@ -219,6 +222,7 @@
<string name="global_actions" product="default" msgid="2406416831541615258">"手机选项"</string>
<string name="global_action_lock" msgid="2844945191792119712">"屏幕锁定"</string>
<string name="global_action_power_off" msgid="4471879440839879722">"关机"</string>
+ <string name="global_action_reboot">"重启"</string>
<string name="global_action_emergency" msgid="7112311161137421166">"紧急呼救"</string>
<string name="global_action_bug_report" msgid="7934010578922304799">"错误报告"</string>
<string name="bugreport_title" msgid="2667494803742548533">"提交错误报告"</string>
@@ -251,11 +255,11 @@
<string name="permgrouplab_contacts" msgid="3657758145679177612">"通讯录"</string>
<string name="permgroupdesc_contacts" msgid="6951499528303668046">"访问您的通讯录"</string>
<string name="permgrouplab_location" msgid="7275582855722310164">"位置信息"</string>
- <string name="permgroupdesc_location" msgid="1346617465127855033">"获取此设备的位置信息"</string>
+ <string name="permgroupdesc_location" msgid="1346617465127855033">"获得设备所在位置信息"</string>
<string name="permgrouplab_calendar" msgid="5863508437783683902">"日历"</string>
<string name="permgroupdesc_calendar" msgid="3889615280211184106">"访问您的日历"</string>
<string name="permgrouplab_sms" msgid="228308803364967808">"短信"</string>
- <string name="permgroupdesc_sms" msgid="4656988620100940350">"发送和查看短信"</string>
+ <string name="permgroupdesc_sms" msgid="4656988620100940350">"短信"</string>
<string name="permgrouplab_storage" msgid="1971118770546336966">"存储空间"</string>
<string name="permgroupdesc_storage" msgid="637758554581589203">"访问您设备上的照片、媒体内容和文件"</string>
<string name="permgrouplab_microphone" msgid="171539900250043464">"麦克风"</string>
@@ -263,7 +267,7 @@
<string name="permgrouplab_camera" msgid="4820372495894586615">"相机"</string>
<string name="permgroupdesc_camera" msgid="3250611594678347720">"拍摄照片和录制视频"</string>
<string name="permgrouplab_phone" msgid="5229115638567440675">"电话"</string>
- <string name="permgroupdesc_phone" msgid="6234224354060641055">"拨打电话和管理通话"</string>
+ <string name="permgroupdesc_phone" msgid="6234224354060641055">"电话"</string>
<string name="permgrouplab_sensors" msgid="416037179223226722">"身体传感器"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"访问与您的生命体征相关的传感器数据"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"检索窗口内容"</string>
@@ -300,7 +304,7 @@
<string name="permdesc_subscribedFeedsRead" msgid="5557058907906144505">"允许应用获取有关当前同步的 Feed 的详情。"</string>
<string name="permlab_sendSms" msgid="7544599214260982981">"发送短信"</string>
<string name="permdesc_sendSms" msgid="7094729298204937667">"允许该应用发送短信。此权限可能会导致意外收费。恶意应用可能会未经您的确认而发送短信,由此产生相关费用。"</string>
- <string name="permlab_readSms" msgid="8745086572213270480">"读取短信"</string>
+ <string name="permlab_readSms" msgid="8745086572213270480">"读取您的讯息(短信/彩信)"</string>
<string name="permdesc_readSms" product="tablet" msgid="2467981548684735522">"允许该应用读取您平板电脑或SIM卡上存储的短信。此权限可让该应用读取所有短信,而不考虑短信内容或机密性。"</string>
<string name="permdesc_readSms" product="tv" msgid="5102425513647038535">"允许应用读取您的电视或 SIM 卡上存储的短信。此权限会允许应用读取所有短信,而不论短信内容是什么或是否属于机密内容。"</string>
<string name="permdesc_readSms" product="default" msgid="3695967533457240550">"允许该应用读取您手机或SIM卡上存储的短信。此权限可让该应用读取所有短信,而不考虑短信内容或机密性。"</string>
@@ -338,7 +342,7 @@
<string name="permdesc_readContacts" product="tablet" msgid="5294866856941149639">"允许该应用读取您平板电脑上存储的联系人的相关数据,包括您通过打电话、发送电子邮件或以其他方式与特定个人通信的频率。此权限可让应用保存您的联系人数据,而恶意应用可能会在您不知情的情况下分享联系人数据。"</string>
<string name="permdesc_readContacts" product="tv" msgid="1839238344654834087">"允许应用读取您的电视上存储的联系人相关数据,包括您与特定联系人通话、发送电子邮件或通过其他方式进行通信的频率。此权限可让应用保存您的联系人数据,而且恶意应用可能会在您不知情的情况下分享联系人数据。"</string>
<string name="permdesc_readContacts" product="default" msgid="8440654152457300662">"允许该应用读取您手机上存储的联系人的相关数据,包括您通过打电话、发送电子邮件或以其他方式与特定个人通信的频率。此权限可让应用保存您的联系人数据,而恶意应用可能会在您不知情的情况下分享联系人数据。"</string>
- <string name="permlab_writeContacts" msgid="5107492086416793544">"修改您的通讯录"</string>
+ <string name="permlab_writeContacts" msgid="5107492086416793544">"写入/删除您的通讯录"</string>
<string name="permdesc_writeContacts" product="tablet" msgid="897243932521953602">"允许该应用修改您平板电脑上存储的联系人的相关数据,包括您通过打电话、发送电子邮件或以其他方式与特定联系人通信的频率。此权限可让应用删除联系人数据。"</string>
<string name="permdesc_writeContacts" product="tv" msgid="5438230957000018959">"允许应用修改您的电视上存储的联系人相关数据,包括您与特定联系人通话、发送电子邮件或通过其他方式进行通信的频率。此权限可让应用删除联系人数据。"</string>
<string name="permdesc_writeContacts" product="default" msgid="589869224625163558">"允许该应用修改您手机上存储的联系人的相关数据,包括您通过打电话、发送电子邮件或以其他方式与特定联系人通信的频率。此权限可让应用删除联系人数据。"</string>
@@ -346,7 +350,7 @@
<string name="permdesc_readCallLog" product="tablet" msgid="3700645184870760285">"允许该应用读取平板电脑的通话记录,包括有关来电和外拨电话的数据。此权限可让应用保存您的通话记录数据,而恶意应用可能会在您不知情的情况下分享通话记录数据。"</string>
<string name="permdesc_readCallLog" product="tv" msgid="5611770887047387926">"允许应用读取您的电视的通话记录,包括有关来电和外拨电话的数据。此权限可让应用保存您的通话记录数据,而恶意应用可能会在您不知情的情况下分享通话记录数据。"</string>
<string name="permdesc_readCallLog" product="default" msgid="5777725796813217244">"允许该应用读取手机的通话记录,包括有关来电和外拨电话的数据。此权限可让应用保存您的通话记录数据,而恶意应用可能会在您不知情的情况下分享通话记录数据。"</string>
- <string name="permlab_writeCallLog" msgid="8552045664743499354">"新建/修改/删除通话记录"</string>
+ <string name="permlab_writeCallLog" msgid="8552045664743499354">"写入/删除通话记录"</string>
<string name="permdesc_writeCallLog" product="tablet" msgid="6661806062274119245">"允许该应用修改平板电脑的通话记录,包括有关来电和外拨电话的数据。恶意应用可能会借此清除或修改您的通话记录。"</string>
<string name="permdesc_writeCallLog" product="tv" msgid="4225034892248398019">"允许应用修改电视的通话记录,包括有关来电和外拨电话的数据。恶意应用可能会借此清除或修改您的通话记录。"</string>
<string name="permdesc_writeCallLog" product="default" msgid="683941736352787842">"允许该应用修改手机的通话记录,包括有关来电和外拨电话的数据。恶意应用可能会借此清除或修改您的通话记录。"</string>
@@ -362,7 +366,7 @@
<string name="permdesc_writeCalendar" product="default" msgid="2324469496327249376">"允许该应用添加、删除、更改您可在手机上修改的活动,包括朋友或同事的活动。此权限可让该应用冒充日历所有者发送消息,或在所有者不知情的情况下修改活动。"</string>
<string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"获取额外的位置信息提供程序命令"</string>
<string name="permdesc_accessLocationExtraCommands" msgid="6078307221056649927">"允许该应用使用其他的位置信息提供程序命令。此权限使该应用可以干扰GPS或其他位置信息源的运作。"</string>
- <string name="permlab_accessFineLocation" msgid="251034415460950944">"访问确切位置信息(以 GPS 和网络为依据)"</string>
+ <string name="permlab_accessFineLocation" msgid="251034415460950944">"精确位置(基于GPS)"</string>
<string name="permdesc_accessFineLocation" msgid="5295047563564981250">"允许该应用通过全球定位系统(GPS)或网络位置信息源(例如基站和WLAN)获取您的精确位置信息。您必须在设备上开启这些位置信息服务,应用才能获得位置信息。应用会使用此类服务确定您的位置,这可能会消耗更多电量。"</string>
<string name="permlab_accessCoarseLocation" msgid="7715277613928539434">"访问大致位置信息(以网络为依据)"</string>
<string name="permdesc_accessCoarseLocation" msgid="2538200184373302295">"允许该应用获取您的大致位置信息。这类位置信息来自于使用网络位置信息源(例如基站和WLAN)的位置信息服务。您必须在设备上开启这些位置信息服务,应用才能获得位置信息。应用会使用此类服务确定您的大概位置。"</string>
@@ -414,13 +418,13 @@
<string name="permdesc_changeTetherState" msgid="1524441344412319780">"允许应用更改绑定网络连接的状态。"</string>
<string name="permlab_accessWifiState" msgid="5202012949247040011">"查看WLAN连接"</string>
<string name="permdesc_accessWifiState" msgid="5002798077387803726">"允许该应用查看WLAN网络的相关信息,例如是否启用了WLAN以及连接的WLAN设备的名称。"</string>
- <string name="permlab_changeWifiState" msgid="6550641188749128035">"连接WLAN网络和断开连接"</string>
+ <string name="permlab_changeWifiState" msgid="6550641188749128035">"打开WLAN"</string>
<string name="permdesc_changeWifiState" msgid="7137950297386127533">"允许该应用与WLAN接入点建立和断开连接,以及更改WLAN网络的设备配置。"</string>
<string name="permlab_changeWifiMulticastState" msgid="1368253871483254784">"允许接收WLAN多播"</string>
<string name="permdesc_changeWifiMulticastState" product="tablet" msgid="7969774021256336548">"允许该应用使用多播地址接收发送到WLAN网络上所有设备(而不仅仅是您的平板电脑)的数据包。该操作的耗电量比非多播模式要大。"</string>
<string name="permdesc_changeWifiMulticastState" product="tv" msgid="9031975661145014160">"允许应用使用多播地址接收发送到 WLAN 网络中所有设备(而不仅仅是您的电视)的数据包。该操作的耗电量比非多播模式要大。"</string>
<string name="permdesc_changeWifiMulticastState" product="default" msgid="6851949706025349926">"允许该应用使用多播地址接收发送到WLAN网络上所有设备(而不仅仅是您的手机)的数据包。该操作的耗电量比非多播模式要大。"</string>
- <string name="permlab_bluetoothAdmin" msgid="6006967373935926659">"访问蓝牙设置"</string>
+ <string name="permlab_bluetoothAdmin" msgid="6006967373935926659">"打开蓝牙"</string>
<string name="permdesc_bluetoothAdmin" product="tablet" msgid="6921177471748882137">"允许应用配置本地蓝牙平板电脑,并允许其查找远程设备且与之配对。"</string>
<string name="permdesc_bluetoothAdmin" product="tv" msgid="3373125682645601429">"允许应用配置本地蓝牙电视,并允许其查找远程设备且与之配对。"</string>
<string name="permdesc_bluetoothAdmin" product="default" msgid="8931682159331542137">"允许应用配置本地蓝牙手机,并允许其查找远程设备且与之配对。"</string>
@@ -465,13 +469,13 @@
<string name="permdesc_writeSyncSettings" msgid="8956262591306369868">"允许该应用修改某个帐号的同步设置。例如,此权限可用于在“联系人”应用与某个帐号之间启用同步。"</string>
<string name="permlab_readSyncStats" msgid="7396577451360202448">"读取同步统计信息"</string>
<string name="permdesc_readSyncStats" msgid="1510143761757606156">"允许该应用读取某个帐号的同步统计信息,包括同步活动历史记录和同步数据量。"</string>
- <string name="permlab_sdcardRead" product="nosdcard" msgid="367275095159405468">"读取您的USB存储设备中的内容"</string>
+ <string name="permlab_sdcardRead" product="nosdcard" msgid="367275095159405468">"读取内部存储"</string>
<string name="permlab_sdcardRead" product="default" msgid="2188156462934977940">"读取您的SD卡中的内容"</string>
- <string name="permdesc_sdcardRead" product="nosdcard" msgid="3446988712598386079">"允许应用读取您USB存储设备中的内容。"</string>
+ <string name="permdesc_sdcardRead" product="nosdcard" msgid="3446988712598386079">"允许应用读取存储设备。"</string>
<string name="permdesc_sdcardRead" product="default" msgid="2607362473654975411">"允许应用读取您SD卡的内容。"</string>
- <string name="permlab_sdcardWrite" product="nosdcard" msgid="8485979062254666748">"修改或删除您的USB存储设备中的内容"</string>
- <string name="permlab_sdcardWrite" product="default" msgid="8805693630050458763">"修改或删除您的SD卡中的内容"</string>
- <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"允许应用写入USB存储设备。"</string>
+ <string name="permlab_sdcardWrite" product="nosdcard" msgid="8485979062254666748">"写入/删除内部存储"</string>
+ <string name="permlab_sdcardWrite" product="default" msgid="8805693630050458763">"写入/删除您的SD卡中的内容"</string>
+ <string name="permdesc_sdcardWrite" product="nosdcard" msgid="6175406299445710888">"允许应用写入存储设备。"</string>
<string name="permdesc_sdcardWrite" product="default" msgid="4337417790936632090">"允许应用写入SD卡。"</string>
<string name="permlab_use_sip" msgid="2052499390128979920">"拨打/接听SIP电话"</string>
<string name="permdesc_use_sip" msgid="2297804849860225257">"允许该应用拨打和接听SIP电话。"</string>
@@ -1261,6 +1265,9 @@
<string name="car_mode_disable_notification_message" msgid="6301524980144350051">"点按即可退出车载模式。"</string>
<string name="tethered_notification_title" msgid="3146694234398202601">"网络共享或热点已启用"</string>
<string name="tethered_notification_message" msgid="2113628520792055377">"点按即可进行设置。"</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>
<string name="back_button_label" msgid="2300470004503343439">"上一步"</string>
<string name="next_button_label" msgid="1080555104677992408">"下一步"</string>
<string name="skip_button_label" msgid="1275362299471631819">"跳过"</string>
@@ -1646,6 +1653,7 @@
<item quantity="other">已选择 <xliff:g id="COUNT_1">%1$d</xliff:g> 项</item>
<item quantity="one">已选择 <xliff:g id="COUNT_0">%1$d</xliff:g> 项</item>
</plurals>
+
<string name="importance_from_user" msgid="7318955817386549931">"这些通知的重要程度由您来设置。"</string>
<string name="importance_from_person" msgid="9160133597262938296">"这条通知涉及特定的人,因此被归为重要通知。"</string>
<string name="user_creation_account_exists" msgid="1942606193570143289">"允许<xliff:g id="APP">%1$s</xliff:g>使用 <xliff:g id="ACCOUNT">%2$s</xliff:g> 创建新用户吗?"</string>
@@ -1684,5 +1692,15 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"恢复出厂设置即可正常使用此设备,不受任何限制"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"触摸即可了解详情。"</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"已停用的<xliff:g id="LABEL">%1$s</xliff:g>"</string>
+
+ <!-- Carrier Name -->
+ <string name="China_Mobile">中国移动</string>
+ <string name="China_Unicom">中国联通</string>
+ <string name="China_Telecom">中国电信</string>
+ <string name="other_permissions">其他权限</string>
+ <string name="permission_remember_choice">永远记住</string>
+ <string name="permission_title">权限</string>
+ <string name="allow_button">允许</string>
+ <string name="deny_button">拒绝</string>
<string name="conference_call" msgid="3751093130790472426">"电话会议"</string>
</resources>
diff --git a/core/res/res/values-zh-rHK/strings.xml b/core/res/res/values-zh-rHK/strings.xml
index 7f9b286..ef2109e 100644
--- a/core/res/res/values-zh-rHK/strings.xml
+++ b/core/res/res/values-zh-rHK/strings.xml
@@ -1646,6 +1646,7 @@
<item quantity="other">已選取 <xliff:g id="COUNT_1">%1$d</xliff:g> 個項目</item>
<item quantity="one">已選取 <xliff:g id="COUNT_0">%1$d</xliff:g> 個項目</item>
</plurals>
+
<string name="importance_from_user" msgid="7318955817386549931">"您可以設定這些通知的重要性。"</string>
<string name="importance_from_person" msgid="9160133597262938296">"列為重要的原因:涉及的人。"</string>
<string name="user_creation_account_exists" msgid="1942606193570143289">"要允許 <xliff:g id="APP">%1$s</xliff:g> 使用 <xliff:g id="ACCOUNT">%2$s</xliff:g> 建立新使用者嗎?"</string>
@@ -1684,5 +1685,10 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"將此裝置回復至原廠設定後,使用將不受限制"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"輕觸以瞭解詳情。"</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"「<xliff:g id="LABEL">%1$s</xliff:g>」已停用"</string>
+ <string name="global_action_reboot">"重新啟動"</string>
+ <!-- Carrier Name -->
+ <string name="China_Mobile">中國移動</string>
+ <string name="China_Unicom">中國聯通</string>
+ <string name="China_Telecom">中國電信</string>
<string name="conference_call" msgid="3751093130790472426">"會議通話"</string>
</resources>
diff --git a/core/res/res/values-zh-rTW/strings.xml b/core/res/res/values-zh-rTW/strings.xml
index 7c293f0..2961f56 100644
--- a/core/res/res/values-zh-rTW/strings.xml
+++ b/core/res/res/values-zh-rTW/strings.xml
@@ -1684,5 +1684,6 @@
<string name="audit_safemode_notification" msgid="6416076898350685856">"恢復原廠設定即可正常使用這個裝置"</string>
<string name="audit_safemode_notification_details" msgid="1860601176690176413">"輕觸即可瞭解詳情。"</string>
<string name="suspended_widget_accessibility" msgid="6712143096475264190">"已停用的<xliff:g id="LABEL">%1$s</xliff:g>"</string>
+ <string name="global_action_reboot">"重新啟動"</string>
<string name="conference_call" msgid="3751093130790472426">"電話會議"</string>
</resources>
diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml
index e190bd1..27a3f4f 100644
--- a/core/res/res/values/arrays.xml
+++ b/core/res/res/values/arrays.xml
@@ -235,4 +235,20 @@
<item>@string/app_info</item>
</string-array>
+ <string-array name="power_off_alarm_apps">
+ <item>android</item>
+ <item>com.android.location.fused</item>
+ <item>com.android.settings</item>
+ <item>com.android.defcontainer</item>
+ <item>com.android.poweronalert</item>
+ <item>com.android.shell</item>
+ <item>com.android.deskclock</item>
+ <item>com.android.providers.media</item>
+ <item>com.android.inputdevices</item>
+ <item>com.android.providers.settings</item>
+ <item>com.android.externalstorage</item>
+ <item>com.android.providers.downloads.ui</item>
+ <item>com.android.packageinstaller</item>
+ </string-array>
+
</resources>
diff --git a/core/res/res/values/bools.xml b/core/res/res/values/bools.xml
index b49fe49..89edfea 100644
--- a/core/res/res/values/bools.xml
+++ b/core/res/res/values/bools.xml
@@ -24,6 +24,8 @@
<bool name="show_ongoing_ime_switcher">true</bool>
<bool name="action_bar_expanded_action_views_exclusive">true</bool>
<bool name="target_honeycomb_needs_options_menu">true</bool>
+ <!-- Whether to enable softap extention feature -->
+ <bool name="config_softap_extention">true</bool>
<!-- Whether or not to use the drawable/lockscreen_notselected and
drawable/lockscreen_selected instead of the generic dots when displaying
the LockPatternView.
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
old mode 100644
new mode 100755
index 7baed78..5363492
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -417,7 +417,7 @@
<bool translatable="false" name="config_wifi_dual_band_support">false</bool>
<!-- Boolean indicating whether Hotspot 2.0/Passpoint and ANQP queries is enabled -->
- <bool translatable="false" name="config_wifi_hotspot2_enabled">false</bool>
+ <bool translatable="false" name="config_wifi_hotspot2_enabled">true</bool>
<!-- Boolean indicating whether 802.11r Fast BSS Transition is enabled on this platform -->
<bool translatable="false" name="config_wifi_fast_bss_transition_enabled">false</bool>
@@ -431,6 +431,7 @@
scan and wake the host when a configured SSID is detected by the dongle. This chipset
capability can provide power savings when wifi needs to be always kept on. -->
<bool translatable="false" name="config_wifi_background_scan_support">false</bool>
+ <bool translatable="false" name="wifi_autocon">true</bool>
<!-- Boolean indicating we re-try re-associating once upon disconnection and RSSI is high failure -->
<bool translatable="true" name="config_wifi_enable_disconnection_debounce">true</bool>
@@ -442,6 +443,12 @@
<!-- Boolean indicating whether or not wifi firmware debugging is enabled -->
<bool translatable="false" name="config_wifi_enable_wifi_firmware_debugging">true</bool>
+ <!-- IpReachability monitor enable/Disable -->
+ <bool translatable="false" name="config_wifi_ipreachability_monitor">false</bool>
+
+ <!-- Integer size limit, in KB, for a single WifiLogger ringbuffer -->
+ <integer translatable="false" name="config_wifi_logger_ring_buffer_size_limit_kb">32</integer>
+
<!-- Integer size limit, in KB, for a single WifiLogger ringbuffer, in default logging mode -->
<integer translatable="false" name="config_wifi_logger_ring_buffer_default_size_limit_kb">32</integer>
@@ -526,6 +533,9 @@
<!-- Integer indicating RSSI boost given to current network -->
<integer translatable="false" name="config_wifi_framework_current_network_boost">16</integer>
+ <!-- Integer indicating the number of selective channel scan when Wifi turn on -->
+ <integer translatable="false" name="config_max_initial_scans_on_selective_channels">0</integer>
+
<!-- Integer indicating how to handle beacons with uninitialized RSSI value of 0 -->
<integer translatable="false" name="config_wifi_framework_scan_result_rssi_level_patchup_value">-85</integer>
@@ -1387,6 +1397,9 @@
-->
</string-array>
+ <!-- Component name of the combo network location provider. -->
+ <string name="config_comboNetworkLocationProvider" translatable="false">com.qualcomm.location</string>
+
<!-- Boolean indicating if current platform supports bluetooth SCO for off call
use cases -->
<bool name="config_bluetooth_sco_off_call">true</bool>
@@ -1935,6 +1948,9 @@
<!-- Configure wifi tcp buffersizes in the form:
rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max -->
<string name="config_wifi_tcp_buffers" translatable="false">524288,1048576,2097152,262144,524288,1048576</string>
+ <!-- Configuration to send sms on 1x when UE is attached to eHRPD and there is an active
+ 1xRTT voice call, irrespective of IMS registration state -->
+ <bool name="config_send_sms1x_on_voice_call">true</bool>
<!-- Whether WiFi display is supported by this device.
There are many prerequisites for this feature to work correctly.
@@ -2100,6 +2116,39 @@
obtain user consent to access their location through other means. -->
<string-array name="config_disabledUntilUsedPreinstalledCarrierApps" translatable="false" />
+ <!-- The list of special carrier applications which should be disabled until used.
+ These apps are *not* carrier-privileged apps (e.g. because the carrier does not support the
+ feature itself) and are handled through matching UICC operator codes.
+ (This approach makes the matching rules static - manufacturer-controlled - and not
+ carrier-controlled.)
+ This function suppresses update notifications for these pre-installed apps.
+ In SubscriptionInfoUpdater, the listed applications are disabled until used when all of the
+ following conditions are met:
+ 1. Not currently carrier-matched according to the inserted UICC operator code
+ 2. Pre-installed
+ 3. In the default state (enabled but not explicitly)
+ And SubscriptionInfoUpdater undoes this and marks the app enabled when a UICC is inserted
+ that matches short-listed operator codes.
+ Each item here MUST have matching items (same index) in
+ #config_disabledUntilUsedSpecialCarrierAppUiccOperators, and
+ #config_disabledUntilUsedSpecialCarrierAppIntents.
+ Also, each item here MUST be a unique package name. -->
+ <string-array name="config_disabledUntilUsedSpecialCarrierApps" translatable="false" />
+
+ <!-- The list of UICC operator codes to enable a special carrier application for.
+ An operator code is in the form of "<MCC><MNC>" where MCC is three digits long and MNC
+ either two or three digits long.
+ An empty item is NOT permitted (it will be ignored).
+ If several operator codes are needed, they MUST be separated by commas.
+ Each package name listed in #config_disabledUntilUsedSpecialCarrierApps should have a
+ matching entry (same index) here. -->
+ <string-array name="config_disabledUntilUsedSpecialCarrierAppUiccOperators" translatable="false" />
+
+ <!-- The list of intent actions to broadcast when enabling a special carrier application.
+ Each package name listed in #config_disabledUntilUsedSpecialCarrierApps should have a
+ matching entry (same index) here, even if empty. -->
+ <string-array name="config_disabledUntilUsedSpecialCarrierAppIntents" translatable="false" />
+
<!-- The list of classes that should be added to the notification ranking pipline.
See {@link com.android.server.notification.NotificationSignalExtractor} -->
<string-array name="config_notificationSignalExtractors">
@@ -2251,6 +2300,9 @@
<!-- Flag indicating which package name can access the persistent data partition -->
<string name="config_persistentDataPackageName" translatable="false"></string>
+ <!-- Define optional package verifier name -->
+ <string name="config_optionalPackageVerifierName" translatable="false"></string>
+
<!-- Flag indicating apps will skip sending hold request before merge. In this case
IMS service implementation will do both.i.e.hold followed by merge. -->
<bool name="skipHoldBeforeMerge">true</bool>
@@ -2619,6 +2671,68 @@
<!-- Package of the unbundled tv remote service which can connect to tv
remote provider -->
<string name="config_tvRemoteServicePackage" translatable="false"></string>
+ <!-- Whether cpu boost is enabled for AppLaunch -->
+ <bool name="config_enableCpuBoostForAppLaunch">false</bool>
+ <integer name="launchboost_timeout_param">0</integer>
+ <integer-array name="launchboost_param_value"/>
+
+ <!-- Whether cpu freq aggr is enabled for AppLaunch -->
+ <bool name="config_enableLaunchBoostv2">false</bool>
+ <integer name="lboostv2_timeout_param">0</integer>
+ <integer-array name="lboostv2_param_value"/>
+
+ <!-- Whether cpu freq aggr is enabled for AppLaunch -->
+ <bool name="config_enableFreqAggr">false</bool>
+ <integer name="freqaggr_timeout_param">0</integer>
+ <integer-array name="freqaggr_init_param_value"/>
+ <integer-array name="freqaggr_param_value"/>
+
+ <!-- Whether disablepacking is enabled or not -->
+ <bool name="config_disablePacking">false</bool>
+ <integer name="disablepacking_timeout_param">0</integer>
+ <integer-array name="launchboost_packing_param_value"/>
+
+ <!-- Whether cpu boost is enabled for animation. -->
+ <bool name="config_enablePerfBoostForAnimation">false</bool>
+ <integer name="animationboost_timeout_param">0</integer>
+ <integer-array name="animationboost_param_value"/>
+
+ <!-- Whether cpu boost is enabled for pre-fling. -->
+ <bool name="config_enableCpuBoostForPreFling">false</bool>
+ <integer name="preflingboost_timeout_param">0</integer>
+ <integer-array name="preflingboost_param_value"/>
+
+ <!-- Whether cpu boost is enabled for overscroller fling. -->
+ <bool name="config_enableCpuBoostForOverScrollerFling">false</bool>
+ <integer name="flingboost_timeout_param">0</integer>
+ <integer-array name="flingboost_param_value"/>
+
+ <!-- Whether cpu boost is enabled for horizontal scroll. -->
+ <bool name="config_enableCpuBoostForScroller">false</bool>
+ <integer name="scrollboost_timeout_param">0</integer>
+ <integer-array name="scrollboost_param_value"/>
+
+ <!-- Activities list for boost -->
+ <string-array translatable="false" name="boost_activityList">
+ </string-array>
+
+ <!-- Activity scroll boost params -->
+ <integer name="ascrollboost_timeout">0</integer>
+ <integer-array name="ascrollboost_param_value"/>
+
+ <!-- SSDOU scroll boost optimization -->
+ <bool name="config_debugBoost">false</bool>
+ <string-array translatable="false" name="debugBoost_activityList"></string-array>
+ <integer name="debugBoost_timeout">0</integer>
+ <integer-array name="debugBoost_param_value"/>
+
+ <!-- cpu boost for PanelView fling -->
+ <bool name="config_enableCpuBoostForPanelViewFling">false</bool>
+ <integer-array name="panelview_flingboost_param_value" />
+
+ <!-- system boost for MTP file copy -->
+ <bool name="config_enableBoostForMtp">false</bool>
+ <integer-array name="mtpboost_param_value" />
<!-- True if the device supports persisting security logs across reboots.
This requires the device's kernel to have pstore and pmsg enabled,
@@ -2629,6 +2743,121 @@
<string-array translatable="false" name="config_defaultPinnerServiceFiles">
</string-array>
+ <!-- Configuartion to support SIM contact batch operation.-->
+ <bool name="config_sim_phonebook_batch_operation">true</bool>
+ <string-array name="origin_carrier_names">
+ <item>CHINA\u0020\u0020MOBILE</item>
+ <item>CMCC</item>
+ <item>CHN-UNICOM</item>
+ <item>China Mobile</item>
+ <item>China Unicom</item>
+ <item>China Telecom</item>
+ <item>CHN-CT</item>
+ <item>中国移动</item>
+ <item>中国联通</item>
+ <item>中国电信</item>
+ <item>中國移動</item>
+ <item>中國聯通</item>
+ <item>中國電信</item>
+ <item>Searching for Service</item>
+ </string-array>
+
+ <string-array name="locale_carrier_names">
+ <item>China_Mobile</item>
+ <item>China_Mobile</item>
+ <item>China_Unicom</item>
+ <item>China_Mobile</item>
+ <item>China_Unicom</item>
+ <item>China_Telecom</item>
+ <item>China_Telecom</item>
+ <item>China_Mobile</item>
+ <item>China_Unicom</item>
+ <item>China_Telecom</item>
+ <item>China_Mobile</item>
+ <item>China_Unicom</item>
+ <item>China_Telecom</item>
+ <item>roamingTextSearching</item>
+ </string-array>
+
+ <!-- monitor locale change -->
+ <bool name="config_monitor_locale_change">false</bool>
+
+ <!-- display for radio tech -->
+ <bool name="config_display_rat">false</bool>
+
+ <!-- config 2G/3G/4G RAT strings for carriers -->
+ <string name="config_rat_unknown" translatable="false">""</string>
+ <string name="config_rat_2g" translatable="false">2G</string>
+ <string name="config_rat_3g" translatable="false">3G</string>
+ <string name="config_rat_4g" translatable="false">4G</string>
+
+ <!-- Zero Balance redirect URL config -->
+ <string name="operator_config_url" translatable="false"></string>
+ <!-- Zero Balance ping URL config -->
+ <string name="operator_ping_url" translatable="false"></string>
+ <!-- Zero Balance feature enable config -->
+ <bool name="config_zero_balance_operator">false</bool>
+ <!-- Keypress Optimization -->
+ <bool name="config_enableKeypressOptimization">false</bool>
+ <integer-array name="keypress_param_value"/>
+
+ <bool name="config_enableDataSwitch">false</bool>
+ <!-- Whether to use TMO MCC MNC roaming setting -->
+ <bool name="config_regional_mcc_mnc_roaming_setting">false</bool>
+
+ <!-- Whether to use TMO LTE singnal strength threshold -->
+ <bool name="config_regional_lte_singnal_threshold">false</bool>
+ <!-- Whether to use TMO UMTS singnal strength threshold -->
+ <bool name="config_regional_umts_singnal_threshold">false</bool>
+
+ <integer-array name="umts_signal_strength_threshold">
+ <item>-140</item>
+ <item>-113</item>
+ <item>-103</item>
+ <item>-97</item>
+ <item>-89</item>
+ <item>-44</item>
+ </integer-array>
+ <integer-array name="lte_signal_strength_threshold">
+ <item>-140</item>
+ <item>-120</item>
+ <item>-115</item>
+ <item>-110</item>
+ <item>-100</item>
+ <item>-44</item>
+ </integer-array>
+
+ <!-- Enable framework to record video call data usage -->
+ <bool name="config_video_call_datausage_enable">false</bool>
+ <!-- Enables the feature that can show/hide the operator name in statusbar.
+ When true, the user can select to show/hide operator name through a
+ checkbox in Settings. When false, there is no option to show operator
+ name (no checkbox in Settings). -->
+ <bool name="config_showOperatorNameInStatusBar">false</bool>
+ <bool name="config_regional_hotspot_show_maximum_connection_enable">false</bool>
+ <bool name="config_regional_hotspot_show_broadcast_ssid_checkbox">false</bool>
+ <bool name="config_regional_hotspot_show_notification_when_turn_on">false</bool>
+ <bool name="config_passpoint_setting_on">false</bool>
+ <!-- Emergency Number to be invoked when Power key is pressed.
+ Default value is set to 112 as this FR is mainly intended
+ for Indian market-->
+ <string name="power_key_emergency_number">112</string>
+ <!-- Number of power key hits to invoke emergency call -->
+ <integer name="power_key_hits_emergency">3</integer>
+
+ <!-- Allow the gesture to tap the power button N times to start
+ the Emergency Call while the device is non-interactive. -->
+ <bool name="config_emergencyCallOnPowerkeyTapGestureEnabled">false</bool>
+ <bool name="config_volte_preferred">false</bool>
+
+ <!-- Array of numeric that operator considered as domestic roaming -->
+ <string-array translatable="false" name="config_operatorConsideredDomesticRoaming">
+ </string-array>
+
+ <!-- Exceptions of above list -->
+ <string-array translatable="false" name="config_operatorConsideredDomesticRoamingExceptions">
+ </string-array>
+
<!-- True if camera app should be pinned via Pinner Service -->
<bool name="config_pinnerCameraApp">false</bool>
@@ -2703,6 +2932,12 @@
<!-- An array of packages for which notifications cannot be blocked. -->
<string-array translatable="false" name="config_nonBlockableNotificationPackages" />
+ <!-- The duration (in milliseconds) for the outgoing sms authorization request to timeout.-->
+ <integer name="config_sms_authorization_timeout_ms">0</integer>
+
+ <!-- Enable sms authorization framework-->
+ <bool name="config_sms_authorization_enabled">false</bool>
+
<!-- Specifies whether the permissions needed by a legacy app should be
reviewed before any of its components can run. A legacy app is one
with targetSdkVersion < 23, i.e apps using the old permission model.
diff --git a/core/res/res/values/customize.xml b/core/res/res/values/customize.xml
new file mode 100644
index 0000000..e220733
--- /dev/null
+++ b/core/res/res/values/customize.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2016, 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>
+ <!-- custom date format or not -->
+ <bool name="config_dateformat">false</bool>
+
+ <bool name="config_usb_data_unlock">false</bool>
+ <!-- Used in LocalePicker, default language must be contained -->
+ <string name="locale_codes" translatable="false"></string>
+
+ <!-- Set Wifi hotspot security type
+ NONE : 0
+ WPA2 PSK: 4
+ -->
+ <integer name="wifi_hotspot_security_type">4</integer>
+ <!-- Default wi-fi hotspot pass -->
+ <string name="def_wifi_wifihotspot_pass" translatable="false"></string>
+ <!-- Default wi-fi direct name -->
+ <string name="def_wifi_direct_name" translatable="false"></string>
+ <!-- Setting customize default bluetooth name -->
+ <string name="def_custom_bt_defname"></string>
+</resources>
diff --git a/core/res/res/values/locale_config.xml b/core/res/res/values/locale_config.xml
index f07fe70..08acb57 100644
--- a/core/res/res/values/locale_config.xml
+++ b/core/res/res/values/locale_config.xml
@@ -331,6 +331,7 @@
<item>ko-KP</item> <!-- Korean (North Korea) -->
<item>ko-KR</item> <!-- Korean (South Korea) -->
<item>kok-IN</item> <!-- Konkani (India) -->
+ <item>ks-IN</item> <!-- Kashmiri (India) -->
<item>ksb-TZ</item> <!-- Shambala (Tanzania) -->
<item>ksf-CM</item> <!-- Bafia (Cameroon) -->
<item>ksh-DE</item> <!-- Colognian (Germany) -->
diff --git a/core/res/res/values/qcom_strings.xml b/core/res/res/values/qcom_strings.xml
new file mode 100644
index 0000000..e9fcc73
--- /dev/null
+++ b/core/res/res/values/qcom_strings.xml
@@ -0,0 +1,92 @@
+<?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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Text of the checkbox for the permission confirmation dialog to remember the user's choice. [CHAR LIMIT=40] -->
+ <string name="permission_remember_choice">Remember</string>
+ <string name="permission">Permission</string>
+ <string-array name="app_ops_labels">
+ <item>Trying to access location</item>
+ <item>Trying to access location</item>
+ <item>Trying to access location</item>
+ <item>Trying to use vibrate</item>
+ <item>Trying to read contacts</item>
+ <item>Trying to modify contacts</item>
+ <item>Trying to read call log</item>
+ <item>Trying to modify call log</item>
+ <item>Trying to read calendar</item>
+ <item>Trying to modify calendar</item>
+ <item>Trying to access location</item>
+ <item>Trying to post notification</item>
+ <item>Trying to access location</item>
+ <item>Trying to make phone call</item>
+ <item>Trying to read SMS/MMS</item>
+ <item>Trying to write/modify SMS/MMS</item>
+ <item>Trying to receive SMS/MMS</item>
+ <item>Trying to receive SMS/MMS</item>
+ <item>Trying to receive SMS/MMS</item>
+ <item>Trying to receive SMS/MMS</item>
+ <item>Trying to send SMS/MMS</item>
+ <item>Trying to read SMS/MMS</item>
+ <item>Trying to write/modify SMS/MMS</item>
+ <item>Trying to modify settings</item>
+ <item>Trying to draw on top</item>
+ <item>Trying to access notifications</item>
+ <item>Trying to access Camera</item>
+ <item>Trying to record audio</item>
+ <item>Trying to play audio</item>
+ <item>Trying to read clipboard</item>
+ <item>Trying to modify clipboard</item>
+ <item>Trying to use media buttons</item>
+ <item>Trying to use audio focus</item>
+ <item>Trying to use master volume</item>
+ <item>Trying to use voice volume</item>
+ <item>Trying to use ring volume</item>
+ <item>Trying to use media volume</item>
+ <item>Trying to use alarm volume</item>
+ <item>Trying to use notification volume</item>
+ <item>Trying to use bluetooth volume</item>
+ <item>Trying to Keep device awake</item>
+ <item>Trying to access location</item>
+ <item>Trying to access location</item>
+ <item>Trying to get usage stats</item>
+ <item>Trying to mute microphone</item>
+ <item>Trying to toast window</item>
+ <item>Trying to project media</item>
+ <item>Trying to activate vpn</item>
+ <item>Trying to write wallpaper</item>
+ <item>Trying to assist structure</item>
+ <item>Trying to use assist screenshot</item>
+ <item>Trying to read phone state</item>
+ <item>Trying to add voicemail</item>
+ <item>Trying to use SIP</item>
+ <item>Trying to intercept outgoing call</item>
+ <item>Trying to use Fingerprint API</item>
+ <item>Trying to access body sensors</item>
+ <item>Trying to read cell broadcasts</item>
+ <item>Trying to mock your location</item>
+ <item>Trying to read external storage</item>
+ <item>Trying to write external storage</item>
+ <item>Trying to turn screen on</item>
+ <item>Trying to get device accounts</item>
+ <item>Trying to run in background</item>
+ <item>Trying to enable WLAN</item>
+ <item>Trying to enable BT</item>
+ <item>Trying to get Superuser access</item>
+ </string-array>
+</resources>
diff --git a/core/res/res/values/qcom_symbols.xml b/core/res/res/values/qcom_symbols.xml
new file mode 100755
index 0000000..c922397
--- /dev/null
+++ b/core/res/res/values/qcom_symbols.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
+** Not a Contribution.
+**
+** 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>
+ <!-- We don't want to publish private symbols in android.R as part of the
+ SDK. Instead, put them here. -->
+ <private-symbols package="com.android.internal" />
+
+ <!-- Private symbols that we need to reference from framework code. See
+ frameworks/base/core/res/MakeJavaSymbols.sed for how to easily generate
+ this.
+ -->
+
+ <!-- app opps always-ask -->
+ <java-symbol type="id" name="permission_text" />
+ <java-symbol type="id" name="permission_remember_layout" />
+ <java-symbol type="id" name="permission_remember_choice_checkbox" />
+ <java-symbol type="id" name="permission_remember_choice_text" />
+ <java-symbol type="string" name="allow" />
+ <java-symbol type="string" name="deny" />
+ <java-symbol type="string" name="permission" />
+ <java-symbol type="layout" name="permission_confirmation_dialog" />
+ <java-symbol type="array" name="app_ops_labels" />
+
+</resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
old mode 100644
new mode 100755
index 4172864..57668d3
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -473,6 +473,14 @@
This will disable all third party applications you have installed.
They will be restored when you reboot again.</string>
+ <!-- Title of dialog to confirm rebooting. -->
+ <string name="reboot_title">Reboot</string>
+
+ <!-- Reboot Confirmation Dialog. When the user chooses to reboot the device, there will
+ be a confirmation dialog. This is the message. -->
+ <string name="reboot_confirm" product="tablet">Your tablet will reboot.</string>
+ <string name="reboot_confirm" product="default">Your phone will reboot.</string>
+
<!-- Recent Tasks dialog: title
TODO: this should move to SystemUI.apk, but the code for the old
recent dialog is still in the framework
@@ -497,6 +505,8 @@
<!-- label for item that turns off power in phone options dialog -->
<string name="global_action_power_off">Power off</string>
+ <!-- label for item that reboots the phone in phone options dialog -->
+ <string name="global_action_reboot">Reboot</string>
<!-- label for item that restarts phone in phone options dialog -->
<!-- TODO: promote to separate string-->
<string name="global_action_restart" translatable="false">@string/sim_restart_button</string>
@@ -612,7 +622,7 @@
<!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permgrouplab_sms">SMS</string>
<!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permgroupdesc_sms">send and view SMS messages</string>
+ <string name="permgroupdesc_sms">SMS</string>
<!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permgrouplab_storage">Storage</string>
@@ -632,7 +642,7 @@
<!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permgrouplab_phone">Phone</string>
<!-- Description of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permgroupdesc_phone">make and manage phone calls</string>
+ <string name="permgroupdesc_phone">Phone</string>
<!-- Title of a category of application permissions, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permgrouplab_sensors">Body Sensors</string>
@@ -745,14 +755,14 @@
<string name="permdesc_subscribedFeedsRead">Allows the app to get details about the currently synced feeds.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_sendSms">send and view SMS messages</string>
+ <string name="permlab_sendSms">send SMS messages</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_sendSms">Allows the app to send SMS messages.
This may result in unexpected charges. Malicious apps may cost you money by
sending messages without your confirmation.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_readSms">read your text messages (SMS or MMS)</string>
+ <string name="permlab_readSms">read your text messages (SMS/MMS)</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_readSms" product="tablet">Allows the app to read SMS
messages stored on your tablet or SIM card. This allows the app to read all
@@ -894,7 +904,7 @@
knowledge.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_writeContacts">modify your contacts</string>
+ <string name="permlab_writeContacts">modify/delete your contacts</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_writeContacts" product="tablet">Allows the app to
modify the data about your contacts stored on your tablet, including the
@@ -933,7 +943,7 @@
may share call log data without your knowledge.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_writeCallLog">write call log</string>
+ <string name="permlab_writeCallLog">write/delete call log</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_writeCallLog" product="tablet">Allows the app to modify your tablet\'s call log, including data about incoming and outgoing calls.
Malicious apps may use this to erase or modify your call log.</string>
@@ -999,8 +1009,7 @@
with the operation of the GPS or other location sources.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_accessFineLocation">access precise location (GPS and
- network-based)</string>
+ <string name="permlab_accessFineLocation">access precise location (GPS)</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_accessFineLocation">Allows the app to get your
precise location using the Global Positioning System (GPS) or network
@@ -1050,7 +1059,7 @@
<string name="permdesc_vibrate">Allows the app to control the vibrator.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_callPhone">directly call phone numbers</string>
+ <string name="permlab_callPhone">call phone</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_callPhone">Allows the app to call phone numbers
without your intervention. This may result in unexpected charges or calls.
@@ -1160,7 +1169,7 @@
connected Wi-Fi devices.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_changeWifiState">connect and disconnect from Wi-Fi</string>
+ <string name="permlab_changeWifiState">enable WLAN</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_changeWifiState">Allows the app to connect to and
disconnect from Wi-Fi access points and to make changes to device
@@ -1181,7 +1190,7 @@
not just your phone. It uses more power than the non-multicast mode.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
- <string name="permlab_bluetoothAdmin">access Bluetooth settings</string>
+ <string name="permlab_bluetoothAdmin">enable Bluetooth</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_bluetoothAdmin" product="tablet">Allows the app to
configure the local Bluetooth tablet, and to discover and pair with remote
@@ -1298,20 +1307,20 @@
<string name="permdesc_readSyncStats">Allows an app to read the sync stats for an account, including the history of sync events and how much data is synced. </string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=30] -->
- <string name="permlab_sdcardRead" product="nosdcard">read the contents of your USB storage</string>
+ <string name="permlab_sdcardRead" product="nosdcard">read the contents of your internal storage</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permlab_sdcardRead" product="default">read the contents of your SD card</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=30] -->
- <string name="permdesc_sdcardRead" product="nosdcard">Allows the app to read the contents of your USB storage.</string>
+ <string name="permdesc_sdcardRead" product="nosdcard">Allows the app to read the contents of your internal storage.</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_sdcardRead" product="default">Allows the app to read the contents of your SD card.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=30] -->
- <string name="permlab_sdcardWrite" product="nosdcard">modify or delete the contents of your USB storage</string>
+ <string name="permlab_sdcardWrite" product="nosdcard">write/delete internal storage</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permlab_sdcardWrite" product="default">modify or delete the contents of your SD card</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. [CHAR LIMIT=30] -->
- <string name="permdesc_sdcardWrite" product="nosdcard">Allows the app to write to the USB storage.</string>
+ <string name="permdesc_sdcardWrite" product="nosdcard">Allows the app to write to the internal storage.</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_sdcardWrite" product="default">Allows the app to write to the SD card.</string>
@@ -3379,6 +3388,9 @@
<!-- Shown when the device is tethered -->
<string name="tethered_notification_title">Tethering or hotspot active</string>
<string name="tethered_notification_message">Tap to set up.</string>
+ <string name="tethered_notification_no_device_message">No connected device</string>
+ <string name="tethered_notification_one_device_message"><xliff:g id="count">%1$s</xliff:g> connected device</string>
+ <string name="tethered_notification_multi_device_message"><xliff:g id="count">%1$s</xliff:g> connected devices</string>
<!-- Strings for possible PreferenceActivity Back/Next buttons -->
<string name="back_button_label">Back</string>
@@ -4460,6 +4472,10 @@
<!-- Accessibilty string added to a widget that has been suspended [CHAR LIMIT=20] -->
<string name="suspended_widget_accessibility">Disabled <xliff:g id="label" example="Calendar">%1$s</xliff:g></string>
+ <!-- Carrier Name -->
+ <string name="China_Mobile">China Mobile</string>
+ <string name="China_Unicom">China Unicom</string>
+ <string name="China_Telecom">China Telecom</string>
<!-- Label used by Telephony code, assigned as the display name for conference calls [CHAR LIMIT=60] -->
<string name="conference_call">Conference Call</string>
</resources>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
old mode 100644
new mode 100755
index 08ac043..13b1dd927
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -297,6 +297,8 @@
<java-symbol type="bool" name="config_wifi_enable_disconnection_debounce" />
<java-symbol type="bool" name="config_wifi_revert_country_code_on_cellular_loss" />
<java-symbol type="bool" name="config_wifi_enable_wifi_firmware_debugging" />
+ <java-symbol type="bool" name="config_wifi_ipreachability_monitor" />
+ <java-symbol type="integer" name="config_wifi_logger_ring_buffer_size_limit_kb" />
<java-symbol type="integer" name="config_wifi_logger_ring_buffer_default_size_limit_kb" />
<java-symbol type="integer" name="config_wifi_logger_ring_buffer_verbose_size_limit_kb" />
<java-symbol type="bool" name="config_wifi_turn_off_during_emergency_call" />
@@ -356,6 +358,8 @@
<java-symbol type="integer" name="config_wifi_framework_network_switch_tx_packet_threshold" />
<java-symbol type="integer" name="config_wifi_framework_network_switch_rx_packet_threshold" />
<java-symbol type="integer" name="config_wifi_framework_current_network_boost" />
+ <java-symbol type="integer" name="config_max_initial_scans_on_selective_channels" />
+ <java-symbol type="bool" name="config_send_sms1x_on_voice_call" />
<java-symbol type="integer" name="config_bluetooth_max_advertisers" />
<java-symbol type="integer" name="config_bluetooth_max_scan_filters" />
<java-symbol type="integer" name="config_burnInProtectionMinHorizontalOffset" />
@@ -827,8 +831,10 @@
<java-symbol type="string" name="reboot_to_update_reboot" />
<java-symbol type="string" name="reboot_to_reset_title" />
<java-symbol type="string" name="reboot_to_reset_message" />
+ <java-symbol type="string" name="reboot_confirm" />
<java-symbol type="string" name="reboot_safemode_confirm" />
<java-symbol type="string" name="reboot_safemode_title" />
+ <java-symbol type="string" name="reboot_title" />
<java-symbol type="string" name="relationTypeAssistant" />
<java-symbol type="string" name="relationTypeBrother" />
<java-symbol type="string" name="relationTypeChild" />
@@ -1151,6 +1157,9 @@
<java-symbol type="array" name="config_cdma_dun_supported_types" />
<java-symbol type="array" name="config_disabledUntilUsedPreinstalledImes" />
<java-symbol type="array" name="config_disabledUntilUsedPreinstalledCarrierApps" />
+ <java-symbol type="array" name="config_disabledUntilUsedSpecialCarrierApps" />
+ <java-symbol type="array" name="config_disabledUntilUsedSpecialCarrierAppUiccOperators" />
+ <java-symbol type="array" name="config_disabledUntilUsedSpecialCarrierAppIntents" />
<java-symbol type="array" name="config_operatorConsideredNonRoaming" />
<java-symbol type="array" name="config_sameNamedOperatorConsideredRoaming" />
<java-symbol type="array" name="config_callBarringMMI" />
@@ -1534,6 +1543,7 @@
<java-symbol type="drawable" name="ic_jog_dial_vibrate_on" />
<java-symbol type="drawable" name="ic_lock_airplane_mode" />
<java-symbol type="drawable" name="ic_lock_airplane_mode_off" />
+ <java-symbol type="drawable" name="ic_lock_power_reboot" />
<java-symbol type="drawable" name="ic_menu_cc" />
<java-symbol type="drawable" name="jog_tab_bar_left_unlock" />
<java-symbol type="drawable" name="jog_tab_bar_right_sound_off" />
@@ -1606,6 +1616,7 @@
<java-symbol type="string" name="bugreport_title" />
<java-symbol type="string" name="faceunlock_multiple_failures" />
<java-symbol type="string" name="global_action_power_off" />
+ <java-symbol type="string" name="global_action_reboot" />
<java-symbol type="string" name="global_action_restart" />
<java-symbol type="string" name="global_actions_airplane_mode_off_status" />
<java-symbol type="string" name="global_actions_airplane_mode_on_status" />
@@ -1707,6 +1718,7 @@
<java-symbol type="bool" name="config_goToSleepOnButtonPressTheaterMode" />
<java-symbol type="bool" name="config_supportLongPressPowerWhenNonInteractive" />
<java-symbol type="bool" name="config_wifi_background_scan_support" />
+ <java-symbol type="bool" name="wifi_autocon" />
<java-symbol type="bool" name="config_wifi_dual_band_support" />
<java-symbol type="bool" name="config_wifi_hotspot2_enabled" />
<java-symbol type="bool" name="config_wifi_fast_bss_transition_enabled" />
@@ -1829,6 +1841,7 @@
<java-symbol type="string" name="config_geocoderProviderPackageName" />
<java-symbol type="string" name="config_geofenceProviderPackageName" />
<java-symbol type="string" name="config_networkLocationProviderPackageName" />
+ <java-symbol type="string" name="config_comboNetworkLocationProvider" />
<java-symbol type="string" name="config_wimaxManagerClassname" />
<java-symbol type="string" name="config_wimaxNativeLibLocation" />
<java-symbol type="string" name="config_wimaxServiceClassname" />
@@ -1880,6 +1893,9 @@
<java-symbol type="string" name="smv_application" />
<java-symbol type="string" name="smv_process" />
<java-symbol type="string" name="tethered_notification_message" />
+ <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" />
<java-symbol type="string" name="tethered_notification_title" />
<java-symbol type="string" name="usb_accessory_notification_title" />
<java-symbol type="string" name="usb_mtp_notification_title" />
@@ -1932,6 +1948,7 @@
<java-symbol type="string" name="demo_user_inactivity_timeout_countdown" />
<java-symbol type="string" name="demo_user_inactivity_timeout_left_button" />
<java-symbol type="string" name="demo_user_inactivity_timeout_right_button" />
+ <java-symbol type="string" name="config_optionalPackageVerifierName" />
<java-symbol type="layout" name="resolver_list" />
<java-symbol type="id" name="resolver_list" />
@@ -1941,6 +1958,8 @@
<java-symbol type="integer" name="config_maxResolverActivityColumns" />
<java-symbol type="array" name="config_notificationSignalExtractors" />
+ <java-symbol type="array" name="power_off_alarm_apps" />
+
<java-symbol type="layout" name="notification_material_action" />
<java-symbol type="layout" name="notification_material_action_list" />
<java-symbol type="layout" name="notification_material_action_tombstone" />
@@ -2446,7 +2465,9 @@
<java-symbol type="bool" name="config_cameraDoubleTapPowerGestureEnabled" />
<java-symbol type="drawable" name="platlogo_m" />
-
+ <!-- language/locale picker extention feature -->
+ <java-symbol type="string" name="locale_codes" />
+ <java-symbol type="bool" name="config_dateformat" />
<java-symbol type="string" name="config_iccHotswapPromptForRestartDialogComponent" />
<java-symbol type="string" name="config_packagedKeyboardName" />
@@ -2678,6 +2699,124 @@
<java-symbol type="layout" name="unsupported_display_size_dialog_content" />
<java-symbol type="string" name="unsupported_display_size_message" />
+ <!-- cpu boost for AppLaunch -->
+ <java-symbol type="bool" name="config_enableCpuBoostForAppLaunch" />
+ <java-symbol type="integer" name="launchboost_timeout_param" />
+ <java-symbol type="array" name="launchboost_param_value" />
+
+ <!-- cpu boost v2 for Applaunch -->
+ <java-symbol type="bool" name="config_enableLaunchBoostv2" />
+ <java-symbol type="integer" name="lboostv2_timeout_param" />
+ <java-symbol type="array" name="lboostv2_param_value" />
+
+ <!-- freq aggr for Applaunch -->
+ <java-symbol type="bool" name="config_enableFreqAggr" />
+ <java-symbol type="integer" name="freqaggr_timeout_param" />
+ <java-symbol type="array" name="freqaggr_init_param_value" />
+ <java-symbol type="array" name="freqaggr_param_value" />
+
+ <!-- cpu boost for AppLaunch -->
+ <java-symbol type="bool" name="config_disablePacking" />
+ <java-symbol type="integer" name="disablepacking_timeout_param" />
+ <java-symbol type="array" name="launchboost_packing_param_value" />
+
+ <!-- cpu boost for Animationboost -->
+ <java-symbol type="bool" name="config_enablePerfBoostForAnimation" />
+ <java-symbol type="integer" name="animationboost_timeout_param" />
+ <java-symbol type="array" name="animationboost_param_value" />
+
+ <!-- cpu boost for pre-fling -->
+ <java-symbol type="bool" name="config_enableCpuBoostForPreFling" />
+ <java-symbol type="integer" name="preflingboost_timeout_param" />
+ <java-symbol type="array" name="preflingboost_param_value" />
+
+ <!-- cpu boost for overscroller fling -->
+ <java-symbol type="bool" name="config_enableCpuBoostForOverScrollerFling" />
+ <java-symbol type="integer" name="flingboost_timeout_param" />
+ <java-symbol type="array" name="flingboost_param_value" />
+
+ <!-- cpu boost for horizontal scroll -->
+ <java-symbol type="bool" name="config_enableCpuBoostForScroller" />
+ <java-symbol type="integer" name="scrollboost_timeout_param" />
+ <java-symbol type="array" name="scrollboost_param_value" />
+
+ <!-- Activities list for boost -->
+ <java-symbol type="array" name="boost_activityList" />
+
+ <!-- Activity scroll boost params -->
+ <java-symbol type="integer" name="ascrollboost_timeout" />
+ <java-symbol type="array" name="ascrollboost_param_value" />
+
+ <!-- SSDOU scroll boost optimization -->
+ <java-symbol type="bool" name="config_debugBoost" />
+ <java-symbol type="array" name="debugBoost_activityList" />
+ <java-symbol type="integer" name="debugBoost_timeout" />
+ <java-symbol type="array" name="debugBoost_param_value" />
+
+ <!-- cpu boost for PanelView fling -->
+ <java-symbol type="bool" name="config_enableCpuBoostForPanelViewFling" />
+ <java-symbol type="array" name="panelview_flingboost_param_value" />
+
+ <!-- system boost for MTP file copy -->
+ <java-symbol type="bool" name="config_enableBoostForMtp" />
+ <java-symbol type="array" name="mtpboost_param_value" />
+
+ <!-- SIM contact batch operation -->
+ <java-symbol type="bool" name="config_sim_phonebook_batch_operation" />
+ <!-- config 2G/3G/4G RAT strings for carriers -->
+ <java-symbol type="string" name="config_rat_unknown" />
+ <java-symbol type="string" name="config_rat_2g" />
+ <java-symbol type="string" name="config_rat_3g" />
+ <java-symbol type="string" name="config_rat_4g" />
+
+ <!-- monitor locale change -->
+ <java-symbol type="bool" name="config_monitor_locale_change" />
+
+ <!-- display for radio tech -->
+ <java-symbol type="bool" name="config_display_rat" />
+
+ <java-symbol type="array" name="origin_carrier_names" />
+ <java-symbol type="array" name="locale_carrier_names" />
+ <java-symbol type="string" name="operator_config_url" />
+ <java-symbol type="string" name="operator_ping_url" />
+ <java-symbol type="bool" name="config_zero_balance_operator"/>
+ <!-- Symbols/Overlays for carrier hotspot -->
+ <java-symbol type="bool" name="config_regional_hotspot_show_maximum_connection_enable" />
+
+ <!-- keypress optimization -->
+ <java-symbol type="bool" name="config_enableKeypressOptimization" />
+ <java-symbol type="array" name="keypress_param_value" />
+ <java-symbol type="bool" name="config_enableDataSwitch" />
+ <!-- Symbols/Overlays for Network settings -->
+ <java-symbol type="bool" name="config_regional_mcc_mnc_roaming_setting" />
+ <!-- Symbols/Overlays for Network settings start -->
+ <java-symbol type="bool" name="config_regional_lte_singnal_threshold" />
+ <java-symbol type="bool" name="config_regional_umts_singnal_threshold" />
+
+ <java-symbol type="array" name="umts_signal_strength_threshold" />
+ <java-symbol type="array" name="lte_signal_strength_threshold" />
+
+ <java-symbol type="bool" name="config_regional_hotspot_show_broadcast_ssid_checkbox" />
+ <java-symbol type="bool" name="config_regional_hotspot_show_notification_when_turn_on" />
+
+ <java-symbol type="bool" name="config_video_call_datausage_enable" />
+ <java-symbol type="bool" name="config_showOperatorNameInStatusBar" />
+ <java-symbol type="bool" name="config_passpoint_setting_on" />
+ <java-symbol type="integer" name="wifi_hotspot_security_type" />
+ <java-symbol type="string" name="def_wifi_wifihotspot_pass" />
+ <java-symbol type="string" name="def_wifi_direct_name" />
+
+ <java-symbol type="string" name="power_key_emergency_number" />
+ <java-symbol type="integer" name="power_key_hits_emergency" />
+ <java-symbol type="bool" name="config_emergencyCallOnPowerkeyTapGestureEnabled" />
+ <java-symbol type="bool" name="config_usb_data_unlock" />
+ <java-symbol type="bool" name="config_volte_preferred" />
+ <!-- config softap extention feature -->
+ <java-symbol type="bool" name="config_softap_extention" />
+ <java-symbol type="array" name="config_operatorConsideredDomesticRoaming" />
+ <java-symbol type="array" name="config_operatorConsideredDomesticRoamingExceptions" />
+ <!-- config softap extention feature -->
+ <java-symbol type="string" name="def_custom_bt_defname" />
<java-symbol type="layout" name="notification_material_action_emphasized" />
<!-- Package name for the device provisioning package -->
@@ -2744,6 +2883,8 @@
<!-- Screen-size-dependent modes for picker dialogs. -->
<java-symbol type="integer" name="time_picker_mode" />
<java-symbol type="integer" name="date_picker_mode" />
+ <java-symbol type="integer" name="config_sms_authorization_timeout_ms" />
+ <java-symbol type="bool" name="config_sms_authorization_enabled" />
<java-symbol type="bool" name="config_permissionReviewRequired" />
<java-symbol type="bool" name="use_lock_pattern_drawable" />
diff --git a/core/tests/utiltests/Android.mk b/core/tests/utiltests/Android.mk
index d56c617..4013c4c 100644
--- a/core/tests/utiltests/Android.mk
+++ b/core/tests/utiltests/Android.mk
@@ -26,4 +26,4 @@
include $(BUILD_PACKAGE)
-include $(call all-makefiles-under,$(LOCAL_PATH))
\ No newline at end of file
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/data/fonts/fonts.mk b/data/fonts/fonts.mk
index acd785e..2e14666 100644
--- a/data/fonts/fonts.mk
+++ b/data/fonts/fonts.mk
@@ -14,10 +14,27 @@
# Warning: this is actually a product definition, to be inherited from
+ifneq ($(MULTI_LANG_ENGINE),REVERIE)
PRODUCT_COPY_FILES := \
frameworks/base/data/fonts/fonts.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/fonts.xml
+endif
PRODUCT_PACKAGES := \
DroidSansFallback.ttf \
DroidSansMono.ttf \
- AndroidClock.ttf \
+ AndroidClock.ttf
+
+ifeq ($(MULTI_LANG_ENGINE),REVERIE)
+PRODUCT_PACKAGES += \
+ fonts.xml \
+ DroidSansHindi.ttf \
+ DroidSansTamil.ttf \
+ DroidSansTelugu.ttf \
+ DroidSansGujarati.ttf \
+ DroidSansPunjabi.ttf \
+ DroidSansKannada.ttf \
+ DroidSansBengali.ttf \
+ DroidSansOdia.ttf \
+ DroidSansMyanmar.ttf
+
+endif
diff --git a/data/sounds/AllAudio.mk b/data/sounds/AllAudio.mk
index edfd380..bfb41d1 100644
--- a/data/sounds/AllAudio.mk
+++ b/data/sounds/AllAudio.mk
@@ -24,19 +24,13 @@
$(LOCAL_PATH)/alarms/ogg/Argon.ogg:system/media/audio/alarms/Argon.ogg \
$(LOCAL_PATH)/alarms/ogg/Barium.ogg:system/media/audio/alarms/Barium.ogg \
$(LOCAL_PATH)/alarms/ogg/Carbon.ogg:system/media/audio/alarms/Carbon.ogg \
- $(LOCAL_PATH)/alarms/ogg/Cesium.ogg:system/media/audio/alarms/Cesium.ogg \
- $(LOCAL_PATH)/alarms/ogg/Fermium.ogg:system/media/audio/alarms/Fermium.ogg \
$(LOCAL_PATH)/alarms/ogg/Hassium.ogg:system/media/audio/alarms/Hassium.ogg \
- $(LOCAL_PATH)/alarms/ogg/Helium.ogg:system/media/audio/alarms/Helium.ogg \
$(LOCAL_PATH)/alarms/ogg/Krypton.ogg:system/media/audio/alarms/Krypton.ogg \
$(LOCAL_PATH)/alarms/ogg/Neon.ogg:system/media/audio/alarms/Neon.ogg \
$(LOCAL_PATH)/alarms/ogg/Neptunium.ogg:system/media/audio/alarms/Neptunium.ogg \
- $(LOCAL_PATH)/alarms/ogg/Nobelium.ogg:system/media/audio/alarms/Nobelium.ogg \
$(LOCAL_PATH)/alarms/ogg/Osmium.ogg:system/media/audio/alarms/Osmium.ogg \
- $(LOCAL_PATH)/alarms/ogg/Oxygen.ogg:system/media/audio/alarms/Oxygen.ogg \
$(LOCAL_PATH)/alarms/ogg/Platinum.ogg:system/media/audio/alarms/Platinum.ogg \
$(LOCAL_PATH)/alarms/ogg/Plutonium.ogg:system/media/audio/alarms/Plutonium.ogg \
- $(LOCAL_PATH)/alarms/ogg/Promethium.ogg:system/media/audio/alarms/Promethium.ogg \
$(LOCAL_PATH)/alarms/ogg/Scandium.ogg:system/media/audio/alarms/Scandium.ogg \
$(LOCAL_PATH)/notifications/ogg/Adara.ogg:system/media/audio/notifications/Adara.ogg \
$(LOCAL_PATH)/notifications/Aldebaran.ogg:system/media/audio/notifications/Aldebaran.ogg \
diff --git a/include/SeempLog.h b/include/SeempLog.h
new file mode 100644
index 0000000..30ae338
--- /dev/null
+++ b/include/SeempLog.h
@@ -0,0 +1,51 @@
+/*
+
+Copyright (c) 2015, 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.
+
+*/
+
+#include <dlfcn.h>
+
+#define SEEMPLOG_RECORD(api, params) \
+ static bool shouldTryLoad = true; \
+ static void (*seemp_log_record_func)(int type, const char* msg) = NULL; \
+ \
+ if (shouldTryLoad) { \
+ shouldTryLoad = false; \
+ void* libhandle = dlopen("libSeemplog.so", RTLD_NOW); \
+ if (libhandle != NULL) { \
+ *(void**)(&seemp_log_record_func) = \
+ dlsym(libhandle, "seemp_log_record"); \
+ } \
+ } \
+ if (seemp_log_record_func) \
+ seemp_log_record_func(api, params);
+
+
+
diff --git a/include/androidfw/AssetManager.h b/include/androidfw/AssetManager.h
index 4039d9b..b4a645f 100644
--- a/include/androidfw/AssetManager.h
+++ b/include/androidfw/AssetManager.h
@@ -365,7 +365,7 @@
void addOverlay(const String8& path, const asset_path& overlay);
bool getOverlay(const String8& path, size_t idx, asset_path* out) const;
-
+ void closeZipFromPath(const String8& zip);
private:
void closeZip(int idx);
diff --git a/include/androidfw/ZipFileRO.h b/include/androidfw/ZipFileRO.h
index 7680342..83dcb41 100644
--- a/include/androidfw/ZipFileRO.h
+++ b/include/androidfw/ZipFileRO.h
@@ -154,6 +154,8 @@
~ZipFileRO();
+ int getFileDescriptor() const;
+
private:
/* these are private and not defined */
ZipFileRO(const ZipFileRO& src);
diff --git a/include/private/regionalization/Environment.h b/include/private/regionalization/Environment.h
new file mode 100644
index 0000000..d912383
--- /dev/null
+++ b/include/private/regionalization/Environment.h
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2015-2016, 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.
+ */
+
+#ifndef ANDROID_REGIONALIZATION_ENVIRONMENT_H
+#define ANDROID_REGIONALIZATION_ENVIRONMENT_H
+
+namespace android {
+
+ /**
+ * Class used by Regionalization Carrier switching in order to get
+ * the resource path of switched packages for Carrier.
+ */
+class Environment {
+public:
+ /** For boot and shutdown animation and music
+ * The value which will get different type Animation and boot
+ * audio file path from BOOT_SHUTDOWN_FILE Array.
+ * (STATUS:TYPE)
+ * (0:0) Boot Animation,(0:1) Boot Audio
+ * (1:0) Shutdown Animation,(1,1) Shutdown Audio
+ */
+ const static int BOOT_STATUS = 0;
+ const static int SHUTDOWN_STATUS = 1;
+ const static int ANIMATION_TYPE = 0;
+ const static int MUSIC_TYPE = 1;
+
+ Environment(void);
+
+ ~Environment(void);
+
+ static bool isSupported(void);
+
+ bool loadPackagesFromSpecFile(void);
+
+ const char* getMediaFile(int type, int state);
+
+ const char* getOverlayDir(void);
+
+private:
+ char* mStoragePos;
+ int mPackagesCount;
+ char** mPackages;
+ char* mMediaFile;
+ char* mOverlayDir;
+};
+
+}; // namespace android
+
+#endif // ANDROID_REGIONALIZATION_ENVIRONMENT_H
diff --git a/include/storage/IMountService.h b/include/storage/IMountService.h
index c3d34d8..b04be8a 100644
--- a/include/storage/IMountService.h
+++ b/include/storage/IMountService.h
@@ -71,6 +71,7 @@
virtual bool getMountedObbPath(const String16& filename, String16& path) = 0;
virtual int32_t decryptStorage(const String16& password) = 0;
virtual int32_t encryptStorage(const String16& password) = 0;
+ virtual int32_t encryptWipeStorage(const String16& password) = 0;
};
// ----------------------------------------------------------------------------
diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java b/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
index b234d0f..1d1c4a5 100644
--- a/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
+++ b/keystore/java/android/security/keystore/AndroidKeyStoreKeyGeneratorSpi.java
@@ -271,6 +271,10 @@
args.addEnums(KeymasterDefs.KM_TAG_BLOCK_MODE, mKeymasterBlockModes);
args.addEnums(KeymasterDefs.KM_TAG_PADDING, mKeymasterPaddings);
args.addEnums(KeymasterDefs.KM_TAG_DIGEST, mKeymasterDigests);
+
+ if(spec.isUseSecureProcessor())
+ args.addBoolean(KeymasterDefs.KM_TAG_USE_SECURE_PROCESSOR);
+
KeymasterUtils.addUserAuthArgs(args,
spec.isUserAuthenticationRequired(),
spec.getUserAuthenticationValidityDurationSeconds(),
diff --git a/keystore/java/android/security/keystore/AndroidKeyStoreKeyPairGeneratorSpi.java b/keystore/java/android/security/keystore/AndroidKeyStoreKeyPairGeneratorSpi.java
index 1818f52..ceacc85 100644
--- a/keystore/java/android/security/keystore/AndroidKeyStoreKeyPairGeneratorSpi.java
+++ b/keystore/java/android/security/keystore/AndroidKeyStoreKeyPairGeneratorSpi.java
@@ -114,11 +114,16 @@
private static final int RSA_DEFAULT_KEY_SIZE = 2048;
private static final int RSA_MIN_KEY_SIZE = 512;
private static final int RSA_MAX_KEY_SIZE = 8192;
+ private static final int SP_RSA_MIN_KEY_SIZE = 2048;
+ private static final int SP_RSA_MAX_KEY_SIZE = 2048;
private static final Map<String, Integer> SUPPORTED_EC_NIST_CURVE_NAME_TO_SIZE =
new HashMap<String, Integer>();
+ private static final Map<String, Integer> SUPPORTED_SP_EC_NIST_CURVE_NAME_TO_SIZE =
+ new HashMap<String, Integer>();
private static final List<String> SUPPORTED_EC_NIST_CURVE_NAMES = new ArrayList<String>();
private static final List<Integer> SUPPORTED_EC_NIST_CURVE_SIZES = new ArrayList<Integer>();
+ private static final List<Integer> SUPPORTED_SP_EC_NIST_CURVE_SIZES = new ArrayList<Integer>();
static {
// Aliases for NIST P-224
SUPPORTED_EC_NIST_CURVE_NAME_TO_SIZE.put("p-224", 224);
@@ -130,6 +135,11 @@
SUPPORTED_EC_NIST_CURVE_NAME_TO_SIZE.put("secp256r1", 256);
SUPPORTED_EC_NIST_CURVE_NAME_TO_SIZE.put("prime256v1", 256);
+ // Aliases for NIST P-256
+ SUPPORTED_SP_EC_NIST_CURVE_NAME_TO_SIZE.put("p-256", 256);
+ SUPPORTED_SP_EC_NIST_CURVE_NAME_TO_SIZE.put("secp256r1", 256);
+ SUPPORTED_SP_EC_NIST_CURVE_NAME_TO_SIZE.put("prime256v1", 256);
+
// Aliases for NIST P-384
SUPPORTED_EC_NIST_CURVE_NAME_TO_SIZE.put("p-384", 384);
SUPPORTED_EC_NIST_CURVE_NAME_TO_SIZE.put("secp384r1", 384);
@@ -144,6 +154,10 @@
SUPPORTED_EC_NIST_CURVE_SIZES.addAll(
new HashSet<Integer>(SUPPORTED_EC_NIST_CURVE_NAME_TO_SIZE.values()));
Collections.sort(SUPPORTED_EC_NIST_CURVE_SIZES);
+
+ SUPPORTED_SP_EC_NIST_CURVE_SIZES.addAll(
+ new HashSet<Integer>(SUPPORTED_SP_EC_NIST_CURVE_NAME_TO_SIZE.values()));
+ Collections.sort(SUPPORTED_SP_EC_NIST_CURVE_SIZES);
}
private final int mOriginalKeymasterAlgorithm;
@@ -302,6 +316,9 @@
mKeySizeBits = getDefaultKeySize(keymasterAlgorithm);
}
checkValidKeySize(keymasterAlgorithm, mKeySizeBits);
+ if(spec.isUseSecureProcessor()) {
+ checkSecureProcessorValidKeySize(keymasterAlgorithm, mKeySizeBits);
+ }
if (spec.getKeystoreAlias() == null) {
throw new InvalidAlgorithmParameterException("KeyStore entry alias not provided");
@@ -544,6 +561,9 @@
if (mSpec.isUniqueIdIncluded())
args.addBoolean(KeymasterDefs.KM_TAG_INCLUDE_UNIQUE_ID);
+ if(mSpec.isUseSecureProcessor())
+ args.addBoolean(KeymasterDefs.KM_TAG_USE_SECURE_PROCESSOR);
+
return args;
}
@@ -736,6 +756,26 @@
}
}
+ private static void checkSecureProcessorValidKeySize(int keymasterAlgorithm, int keySize)
+ throws InvalidAlgorithmParameterException {
+ switch (keymasterAlgorithm) {
+ case KeymasterDefs.KM_ALGORITHM_EC:
+ if (!SUPPORTED_SP_EC_NIST_CURVE_SIZES.contains(keySize)) {
+ throw new InvalidAlgorithmParameterException("Unsupported EC key size: "
+ + keySize + " bits. Supported: " + SUPPORTED_SP_EC_NIST_CURVE_SIZES);
+ }
+ break;
+ case KeymasterDefs.KM_ALGORITHM_RSA:
+ if (keySize < SP_RSA_MIN_KEY_SIZE || keySize > SP_RSA_MAX_KEY_SIZE) {
+ throw new InvalidAlgorithmParameterException("RSA key size must be >= "
+ + SP_RSA_MIN_KEY_SIZE + " and <= " + SP_RSA_MAX_KEY_SIZE);
+ }
+ break;
+ default:
+ throw new ProviderException("Unsupported algorithm: " + keymasterAlgorithm);
+ }
+ }
+
/**
* Returns the {@code Signature} algorithm to be used for signing a certificate using the
* specified key or {@code null} if the key cannot be used for signing a certificate.
diff --git a/keystore/java/android/security/keystore/KeyGenParameterSpec.java b/keystore/java/android/security/keystore/KeyGenParameterSpec.java
index ed40b77..9bfbf5f 100644
--- a/keystore/java/android/security/keystore/KeyGenParameterSpec.java
+++ b/keystore/java/android/security/keystore/KeyGenParameterSpec.java
@@ -262,6 +262,7 @@
private final boolean mUniqueIdIncluded;
private final boolean mUserAuthenticationValidWhileOnBody;
private final boolean mInvalidatedByBiometricEnrollment;
+ private final boolean mUseSecureProcessor;
/**
* @hide should be built with Builder
@@ -289,7 +290,8 @@
byte[] attestationChallenge,
boolean uniqueIdIncluded,
boolean userAuthenticationValidWhileOnBody,
- boolean invalidatedByBiometricEnrollment) {
+ boolean invalidatedByBiometricEnrollment,
+ boolean useSecureProcessor) {
if (TextUtils.isEmpty(keyStoreAlias)) {
throw new IllegalArgumentException("keyStoreAlias must not be empty");
}
@@ -335,6 +337,7 @@
mUniqueIdIncluded = uniqueIdIncluded;
mUserAuthenticationValidWhileOnBody = userAuthenticationValidWhileOnBody;
mInvalidatedByBiometricEnrollment = invalidatedByBiometricEnrollment;
+ mUseSecureProcessor = useSecureProcessor;
}
/**
@@ -625,6 +628,14 @@
}
/**
+ * @hide Returns {@code true) if the key was requested to be generated inside
+ * the Secure Processor
+ */
+ public boolean isUseSecureProcessor() {
+ return mUseSecureProcessor;
+ }
+
+ /**
* Builder of {@link KeyGenParameterSpec} instances.
*/
public final static class Builder {
@@ -652,6 +663,7 @@
private boolean mUniqueIdIncluded = false;
private boolean mUserAuthenticationValidWhileOnBody;
private boolean mInvalidatedByBiometricEnrollment = true;
+ private boolean mUseSecureProcessor = false;
/**
* Creates a new instance of the {@code Builder}.
@@ -1143,6 +1155,18 @@
}
/**
+ * @hide Sets whether to use TEE or Secure Processor crypto, if used with unsupported
+ * algorithms, key will be generated by software.
+ * See {@link android.security.keystore.KeyInfo#isInsideSecureHardware()
+ * KeyInfo.isInsideSecurityHardware()}.
+ */
+ @NonNull
+ public Builder setUseSecureProcessor(boolean enable) {
+ mUseSecureProcessor = enable;
+ return this;
+ }
+
+ /**
* Builds an instance of {@code KeyGenParameterSpec}.
*/
@NonNull
@@ -1170,7 +1194,8 @@
mAttestationChallenge,
mUniqueIdIncluded,
mUserAuthenticationValidWhileOnBody,
- mInvalidatedByBiometricEnrollment);
+ mInvalidatedByBiometricEnrollment,
+ mUseSecureProcessor);
}
}
}
diff --git a/libs/androidfw/AssetManager.cpp b/libs/androidfw/AssetManager.cpp
index 80968e5..4f71864 100644
--- a/libs/androidfw/AssetManager.cpp
+++ b/libs/androidfw/AssetManager.cpp
@@ -805,7 +805,15 @@
sharedRes->add(oass, oidmap, offset + 1, false);
const_cast<AssetManager*>(this)->mAssetPaths.add(oap);
const_cast<AssetManager*>(this)->mZipSet.addOverlay(targetPackagePath, oap);
+
+ oidmap->close();
delete oidmap;
+ ALOGD("close idmap=%s pid=%d\n", oap.idmap.string(), getpid());
+ }
+
+ if (oap.path.find(OVERLAY_DIR) != -1) {
+ const_cast<AssetManager*>(this)->mZipSet.closeZipFromPath(oap.path);
+ ALOGD("close: %s and reset entry\n", oap.path.string());
}
}
@@ -2008,6 +2016,22 @@
}
/*
+ * Close a Zip file from path and reset the entry
+ */
+void AssetManager::ZipSet::closeZipFromPath(const String8& zip)
+{
+ //close zip fd
+ int fd = getZip(zip)->getFileDescriptor();
+
+ if (fd > 0) {
+ close(fd);
+ //reset zip object and entry
+ int idx = getIndex(zip);
+ mZipFile.editItemAt(idx) = NULL;
+ }
+}
+
+/*
* Close a Zip file and reset the entry.
*/
void AssetManager::ZipSet::closeZip(int idx)
diff --git a/libs/androidfw/ZipFileRO.cpp b/libs/androidfw/ZipFileRO.cpp
index 49fe8a2..5728223 100644
--- a/libs/androidfw/ZipFileRO.cpp
+++ b/libs/androidfw/ZipFileRO.cpp
@@ -252,3 +252,8 @@
return true;
}
+
+int ZipFileRO::getFileDescriptor() const
+{
+ return GetFileDescriptor(mHandle);
+}
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index b68240a..db5d22b 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -172,15 +172,13 @@
}
void OpenGLRenderer::clear(float left, float top, float right, float bottom, bool opaque) {
- if (!opaque) {
- mRenderState.scissor().setEnabled(true);
- mRenderState.scissor().set(left, getViewportHeight() - bottom, right - left, bottom - top);
- glClear(GL_COLOR_BUFFER_BIT);
- mDirty = true;
- return;
+ mRenderState.scissor().setEnabled(true);
+ mRenderState.scissor().set(left, getViewportHeight() - bottom, right - left, bottom - top);
+ glClear(GL_COLOR_BUFFER_BIT);
+ if (opaque) {
+ mRenderState.scissor().reset();
}
-
- mRenderState.scissor().reset();
+ mDirty = true;
}
bool OpenGLRenderer::finish() {
diff --git a/libs/hwui/font/CacheTexture.cpp b/libs/hwui/font/CacheTexture.cpp
index 4b13814..49e9f65 100644
--- a/libs/hwui/font/CacheTexture.cpp
+++ b/libs/hwui/font/CacheTexture.cpp
@@ -188,15 +188,21 @@
bool CacheTexture::upload() {
const Rect& dirtyRect = mDirtyRect;
- uint32_t x = mHasUnpackRowLength ? dirtyRect.left : 0;
- uint32_t y = dirtyRect.top;
- uint32_t width = mHasUnpackRowLength ? dirtyRect.getWidth() : getWidth();
- uint32_t height = dirtyRect.getHeight();
+ // align the x direction to 32 and y direction to 4 for better performance
+ uint32_t x = (((uint32_t)dirtyRect.left) & (~0x1F));
+ uint32_t y = (((uint32_t)dirtyRect.top) & (~0x3));
+ uint32_t r = ((((uint32_t)dirtyRect.right) + 0x1F) & (~0x1F)) - x;
+ uint32_t b = ((((uint32_t)dirtyRect.bottom) + 0x3) & (~0x3)) - y;
+ uint32_t width = (r > getWidth() ? getWidth() : r);
+ uint32_t height = (b > getHeight() ? getHeight() : b);
// The unpack row length only needs to be specified when a new
// texture is bound
if (mHasUnpackRowLength) {
glPixelStorei(GL_UNPACK_ROW_LENGTH, getWidth());
+ } else {
+ x = 0;
+ width = getWidth();
}
mPixelBuffer->upload(x, y, width, height);
diff --git a/libs/regionalization/Android.mk b/libs/regionalization/Android.mk
new file mode 100644
index 0000000..4a33a3c
--- /dev/null
+++ b/libs/regionalization/Android.mk
@@ -0,0 +1,18 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
+
+LOCAL_MODULE:= libregionalization
+LOCAL_MODULE_TAGS := optional
+LOCAL_SRC_FILES := \
+ Environment.cpp
+LOCAL_C_INCLUDES := \
+ frameworks/base/include
+LOCAL_SHARED_LIBRARIES := \
+ liblog \
+ libcutils \
+ libutils
+
+LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/libs/regionalization/Environment.cpp b/libs/regionalization/Environment.cpp
new file mode 100644
index 0000000..f16fa37
--- /dev/null
+++ b/libs/regionalization/Environment.cpp
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2015-2016, 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.
+ */
+
+#include <string.h>
+#include <stdlib.h>
+#include <cutils/properties.h>
+#include <utils/Log.h>
+#include <private/regionalization/Environment.h>
+
+using namespace android;
+
+static const char* ENVIRONMENT_PROP = "ro.regionalization.support";
+static const char* SPEC_FILE = "/persist/speccfg/spec";
+static const char* BOOT_SHUTDOWN_FILE[2][2] = {
+ {"/system/media/bootanimation.zip", "/system/media/shutdownanimation.zip"},
+ {"/system/media/boot.wav", "/system/media/shutdown.wav"} };
+static const char* OVERLAY_DIR = "/system/vendor/overlay";
+
+static const bool kIsDebug = true;
+
+Environment::Environment(void)
+ : mStoragePos(NULL), mPackagesCount(0),
+ mPackages(NULL), mMediaFile(NULL),
+ mOverlayDir(NULL)
+{
+ mStoragePos = new char[PATH_MAX];
+ mMediaFile = new char[PATH_MAX];
+ mOverlayDir = new char[PATH_MAX];
+ if (mStoragePos == NULL || mMediaFile == NULL || mOverlayDir == NULL) {
+ if (kIsDebug) {
+ ALOGD("Regionalization Environment new memory error!");
+ }
+ return;
+ }
+
+ bool success = loadPackagesFromSpecFile();
+ if (!success) {
+ if (kIsDebug) {
+ ALOGD("Regionalization Environment load packages for Carrier error!");
+ }
+ }
+}
+
+Environment::~Environment(void)
+{
+ if (mStoragePos != NULL) {
+ delete[] mStoragePos;
+ }
+
+ if (mPackages != NULL) {
+ for (int i=0; i < mPackagesCount; i++) {
+ if (mPackages[i] != NULL) {
+ delete[] mPackages[i];
+ }
+ }
+ delete[] mPackages;
+ }
+
+ mPackagesCount = 0;
+
+ if (mMediaFile != NULL) {
+ delete[] mMediaFile;
+ }
+
+ if (mOverlayDir != NULL) {
+ delete[] mOverlayDir;
+ }
+}
+
+bool Environment::isSupported(void)
+{
+ char value[PROPERTY_VALUE_MAX];
+ memset(value, 0, PROPERTY_VALUE_MAX * sizeof(char));
+ property_get(ENVIRONMENT_PROP, value, "false");
+ if (!strcmp(value, "true")) {
+ return true;
+ }
+
+ return false;
+}
+
+bool Environment::loadPackagesFromSpecFile(void) {
+ FILE* fSpec = NULL;
+ if ((fSpec = fopen(SPEC_FILE, "r")) == NULL) {
+ return false;
+ }
+
+ // Read first line to get storage position of packages
+ int res = fscanf(fSpec, "%*[^=]=%s", mStoragePos);
+ if (res < 1 || strcmp(mStoragePos, "") == 0) {
+ fclose(fSpec);
+ return false;
+ }
+
+ // Read second line to get count of packages.
+ res = fscanf(fSpec, "%*[^=]=%d", &mPackagesCount);
+ if (res < 1 || mPackagesCount <= 0) {
+ fclose(fSpec);
+ return false;
+ }
+
+ mPackages = new char*[mPackagesCount];
+ if (mPackages == NULL) {
+ fclose(fSpec);
+ return false;
+ }
+ for (int i = 0; i < mPackagesCount; i++) {
+ mPackages[i] = new char[PATH_MAX];
+ }
+
+ for (int i = 0; i < mPackagesCount; i++) {
+ res = fscanf(fSpec, "%*[^=]=%s", mPackages[i]);
+ if (res < 1) {
+ fclose(fSpec);
+ return false;
+ }
+ }
+
+ fclose(fSpec);
+ return true;
+}
+
+// type: {0:Animation; 1:Audio}
+// state: {0:boot; 1:shutdown}
+const char* Environment::getMediaFile(int type, int state)
+{
+ if (mPackagesCount != 0 && mStoragePos != NULL && mPackages != NULL) {
+ for(int i = mPackagesCount-1; i >= 0; i--) {
+ memset(mMediaFile, 0, PATH_MAX);
+ strlcpy(mMediaFile, mStoragePos, PATH_MAX);
+ strlcat(mMediaFile, "/", PATH_MAX);
+ strlcat(mMediaFile, mPackages[i], PATH_MAX);
+ strlcat(mMediaFile, BOOT_SHUTDOWN_FILE[type][state], PATH_MAX);
+ if(access(mMediaFile, R_OK) == 0) {
+ if (kIsDebug) {
+ ALOGD("Environment::getMediaFile() = %s\n", mMediaFile);
+ }
+ return mMediaFile;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+const char* Environment::getOverlayDir(void)
+{
+ if (mPackagesCount != 0 && mStoragePos != NULL && mPackages != NULL) {
+ for (int i = mPackagesCount-1; i >= 0; i--) {
+ memset(mMediaFile, 0, PATH_MAX);
+ strlcpy(mOverlayDir, mStoragePos, PATH_MAX);
+ strlcat(mOverlayDir, "/", PATH_MAX);
+ strlcat(mOverlayDir, mPackages[i], PATH_MAX);
+ strlcat(mOverlayDir, OVERLAY_DIR, PATH_MAX);
+ if (kIsDebug) {
+ ALOGD("Environment::getOverlayDir() = %s\n", mOverlayDir);
+ }
+ // Check if PackageFrameworksRes dir exists.
+ char overlayFile[PATH_MAX];
+ memset(overlayFile, 0, PATH_MAX);
+ strlcpy(overlayFile, mOverlayDir, PATH_MAX);
+ strlcat(overlayFile, "/", PATH_MAX);
+ strlcat(overlayFile, mPackages[i], PATH_MAX);
+ strlcat(overlayFile, "FrameworksRes", PATH_MAX);
+ if (access(overlayFile, R_OK) == 0) {
+ if (kIsDebug) {
+ ALOGD("Environment::getOverlayDir() - overlayFile exists!\n");
+ }
+ return mOverlayDir;
+ }
+ }
+ }
+
+ return NULL;
+}
diff --git a/libs/storage/IMountService.cpp b/libs/storage/IMountService.cpp
index c643ed0..fc97886 100644
--- a/libs/storage/IMountService.cpp
+++ b/libs/storage/IMountService.cpp
@@ -50,6 +50,7 @@
TRANSACTION_isExternalStorageEmulated,
TRANSACTION_decryptStorage,
TRANSACTION_encryptStorage,
+ TRANSACTION_encryptWipeStorage = IBinder::FIRST_CALL_TRANSACTION + 72,
};
class BpMountService: public BpInterface<IMountService>
@@ -551,6 +552,23 @@
}
return reply.readInt32();
}
+
+ int32_t encryptWipeStorage(const String16& password)
+ {
+ Parcel data, reply;
+ data.writeInterfaceToken(IMountService::getInterfaceDescriptor());
+ data.writeString16(password);
+ if (remote()->transact(TRANSACTION_encryptWipeStorage, data, &reply) != NO_ERROR) {
+ ALOGD("encryptWipeStorage could not contact remote\n");
+ return -1;
+ }
+ int32_t err = reply.readExceptionCode();
+ if (err < 0) {
+ ALOGD("encryptWipeStorage caught exception %d\n", err);
+ return err;
+ }
+ return reply.readInt32();
+ }
};
IMPLEMENT_META_INTERFACE(MountService, "IMountService")
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index da0e515..1ad7618 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -463,6 +463,7 @@
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void requestLocationUpdates(String provider, long minTime, float minDistance,
LocationListener listener) {
+ android.util.SeempLog.record(47);
checkProvider(provider);
checkListener(listener);
@@ -495,6 +496,7 @@
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void requestLocationUpdates(String provider, long minTime, float minDistance,
LocationListener listener, Looper looper) {
+ android.util.SeempLog.record(47);
checkProvider(provider);
checkListener(listener);
@@ -528,6 +530,7 @@
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void requestLocationUpdates(long minTime, float minDistance, Criteria criteria,
LocationListener listener, Looper looper) {
+ android.util.SeempLog.record(47);
checkCriteria(criteria);
checkListener(listener);
@@ -556,6 +559,7 @@
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void requestLocationUpdates(String provider, long minTime, float minDistance,
PendingIntent intent) {
+ android.util.SeempLog.record(47);
checkProvider(provider);
checkPendingIntent(intent);
@@ -658,6 +662,7 @@
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void requestLocationUpdates(long minTime, float minDistance, Criteria criteria,
PendingIntent intent) {
+ android.util.SeempLog.record(47);
checkCriteria(criteria);
checkPendingIntent(intent);
@@ -687,6 +692,7 @@
*/
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void requestSingleUpdate(String provider, LocationListener listener, Looper looper) {
+ android.util.SeempLog.record(64);
checkProvider(provider);
checkListener(listener);
@@ -717,6 +723,7 @@
*/
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void requestSingleUpdate(Criteria criteria, LocationListener listener, Looper looper) {
+ android.util.SeempLog.record(64);
checkCriteria(criteria);
checkListener(listener);
@@ -740,6 +747,7 @@
*/
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void requestSingleUpdate(String provider, PendingIntent intent) {
+ android.util.SeempLog.record(64);
checkProvider(provider);
checkPendingIntent(intent);
@@ -764,6 +772,7 @@
*/
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void requestSingleUpdate(Criteria criteria, PendingIntent intent) {
+ android.util.SeempLog.record(64);
checkCriteria(criteria);
checkPendingIntent(intent);
@@ -832,6 +841,7 @@
@SystemApi
public void requestLocationUpdates(LocationRequest request, LocationListener listener,
Looper looper) {
+ android.util.SeempLog.record(47);
checkListener(listener);
requestLocationUpdates(request, listener, looper, null);
}
@@ -859,6 +869,7 @@
*/
@SystemApi
public void requestLocationUpdates(LocationRequest request, PendingIntent intent) {
+ android.util.SeempLog.record(47);
checkPendingIntent(intent);
requestLocationUpdates(request, null, null, intent);
}
@@ -877,6 +888,7 @@
private void requestLocationUpdates(LocationRequest request, LocationListener listener,
Looper looper, PendingIntent intent) {
+ android.util.SeempLog.record(47);
String packageName = mContext.getPackageName();
@@ -985,6 +997,7 @@
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public void addProximityAlert(double latitude, double longitude, float radius, long expiration,
PendingIntent intent) {
+ android.util.SeempLog.record(45);
checkPendingIntent(intent);
if (expiration < 0) expiration = Long.MAX_VALUE;
@@ -1196,6 +1209,7 @@
*/
@RequiresPermission(anyOf = {ACCESS_COARSE_LOCATION, ACCESS_FINE_LOCATION})
public Location getLastKnownLocation(String provider) {
+ android.util.SeempLog.record(46);
checkProvider(provider);
String packageName = mContext.getPackageName();
LocationRequest request = LocationRequest.createFromDeprecatedProvider(
@@ -1665,6 +1679,7 @@
@Deprecated
@RequiresPermission(ACCESS_FINE_LOCATION)
public boolean addGpsStatusListener(GpsStatus.Listener listener) {
+ android.util.SeempLog.record(43);
boolean result;
if (mGpsStatusListeners.get(listener) != null) {
@@ -1840,6 +1855,7 @@
@Deprecated
@RequiresPermission(ACCESS_FINE_LOCATION)
public boolean addNmeaListener(GpsStatus.NmeaListener listener) {
+ android.util.SeempLog.record(44);
boolean result;
if (mGpsNmeaListeners.get(listener) != null) {
@@ -2222,6 +2238,7 @@
* @return true if the command succeeds.
*/
public boolean sendExtraCommand(String provider, String command, Bundle extras) {
+ android.util.SeempLog.record(48);
try {
return mService.sendExtraCommand(provider, command, extras);
} catch (RemoteException e) {
diff --git a/media/java/android/media/AudioFormat.java b/media/java/android/media/AudioFormat.java
index 81cc93d..5c7986c 100644
--- a/media/java/android/media/AudioFormat.java
+++ b/media/java/android/media/AudioFormat.java
@@ -267,6 +267,30 @@
**/
public static final int ENCODING_DOLBY_TRUEHD = 14;
+ /** Audio data format: AMRNB
+ * @hide
+ * */
+ public static final int ENCODING_AMRNB = 100;
+ /** Audio data format: AMRWB
+ * @hide
+ * */
+ public static final int ENCODING_AMRWB = 101;
+ /** Audio data format: EVRC
+ * @hide
+ * */
+ public static final int ENCODING_EVRC = 102;
+ /** Audio data format: EVRCB
+ * @hide
+ * */
+ public static final int ENCODING_EVRCB = 103;
+ /** Audio data format: EVRCWB
+ * @hide
+ * */
+ public static final int ENCODING_EVRCWB = 104;
+ /** Audio data format: EVRCNW
+ * @hide
+ * */
+ public static final int ENCODING_EVRCNW = 105;
/** Invalid audio channel configuration */
/** @deprecated Use {@link #CHANNEL_INVALID} instead. */
@Deprecated public static final int CHANNEL_CONFIGURATION_INVALID = 0;
@@ -442,6 +466,11 @@
public static final int CHANNEL_IN_STEREO = (CHANNEL_IN_LEFT | CHANNEL_IN_RIGHT);
/** @hide */
public static final int CHANNEL_IN_FRONT_BACK = CHANNEL_IN_FRONT | CHANNEL_IN_BACK;
+ /** @hide */
+ public static final int CHANNEL_IN_5POINT1 = (CHANNEL_IN_LEFT |
+ CHANNEL_IN_RIGHT | CHANNEL_IN_FRONT | CHANNEL_IN_BACK |
+ CHANNEL_IN_LEFT_PROCESSED | CHANNEL_IN_RIGHT_PROCESSED);
+
// CHANNEL_IN_ALL is not yet defined; if added then it should match AUDIO_CHANNEL_IN_ALL
/** @hide */
@@ -456,6 +485,15 @@
return 2;
case ENCODING_PCM_FLOAT:
return 4;
+ case ENCODING_AMRNB:
+ return 32;
+ case ENCODING_AMRWB:
+ return 61;
+ case ENCODING_EVRC:
+ case ENCODING_EVRCB:
+ case ENCODING_EVRCWB:
+ case ENCODING_EVRCNW:
+ return 23;
case ENCODING_INVALID:
default:
throw new IllegalArgumentException("Bad audio format " + audioFormat);
@@ -478,6 +516,12 @@
case ENCODING_AAC_HE_V1:
case ENCODING_AAC_HE_V2:
case ENCODING_IEC61937:
+ case ENCODING_AMRNB:
+ case ENCODING_AMRWB:
+ case ENCODING_EVRC:
+ case ENCODING_EVRCB:
+ case ENCODING_EVRCWB:
+ case ENCODING_EVRCNW:
return true;
default:
return false;
@@ -520,6 +564,12 @@
case ENCODING_AAC_HE_V1:
case ENCODING_AAC_HE_V2:
case ENCODING_IEC61937: // wrapped in PCM but compressed
+ case ENCODING_AMRNB:
+ case ENCODING_AMRWB:
+ case ENCODING_EVRC:
+ case ENCODING_EVRCB:
+ case ENCODING_EVRCWB:
+ case ENCODING_EVRCNW:
return false;
case ENCODING_INVALID:
default:
@@ -776,6 +826,12 @@
case ENCODING_DTS:
case ENCODING_DTS_HD:
case ENCODING_IEC61937:
+ case ENCODING_AMRNB:
+ case ENCODING_AMRWB:
+ case ENCODING_EVRC:
+ case ENCODING_EVRCB:
+ case ENCODING_EVRCWB:
+ case ENCODING_EVRCNW:
mEncoding = encoding;
break;
case ENCODING_INVALID:
@@ -983,7 +1039,13 @@
ENCODING_E_AC3,
ENCODING_DTS,
ENCODING_DTS_HD,
- ENCODING_IEC61937
+ ENCODING_IEC61937,
+ ENCODING_AMRNB,
+ ENCODING_AMRWB,
+ ENCODING_EVRC,
+ ENCODING_EVRCB,
+ ENCODING_EVRCWB,
+ ENCODING_EVRCNW
})
@Retention(RetentionPolicy.SOURCE)
public @interface Encoding {}
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index bc8a1c2..f9af922 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -69,7 +69,6 @@
private final boolean mUseFixedVolume;
private static String TAG = "AudioManager";
private static final AudioPortEventHandler sAudioPortEventHandler = new AudioPortEventHandler();
-
/**
* Broadcast intent, a hint for applications that audio is about to become
* 'noisy' due to a change in audio outputs. For example, this intent may
@@ -312,6 +311,32 @@
*/
public static final String EXTRA_ENCODINGS = "android.media.extra.ENCODINGS";
+ /**
+ * @hide Broadcast intent when RemoteControlClient list is updated.
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String RCC_CHANGED_ACTION =
+ "org.codeaurora.bluetooth.RCC_CHANGED_ACTION";
+
+ /**
+ * @hide Used for sharing the calling package name
+ */
+ public static final String EXTRA_CALLING_PACKAGE_NAME =
+ "org.codeaurora.bluetooth.EXTRA_CALLING_PACKAGE_NAME";
+
+ /**
+ * @hide Used for sharing the focus changed value
+ */
+ public static final String EXTRA_FOCUS_CHANGED_VALUE =
+ "org.codeaurora.bluetooth.EXTRA_FOCUS_CHANGED_VALUE";
+
+ /**
+ * @hide Used for sharing the availability changed value
+ */
+ public static final String EXTRA_AVAILABLITY_CHANGED_VALUE =
+ "org.codeaurora.bluetooth.EXTRA_AVAILABLITY_CHANGED_VALUE";
+
+
/** The audio stream for phone calls */
public static final int STREAM_VOICE_CALL = AudioSystem.STREAM_VOICE_CALL;
/** The audio stream for system sounds */
@@ -2504,6 +2529,7 @@
//====================================================================
// Remote Control
+
/**
* Register a component to be the sole receiver of MEDIA_BUTTON intents.
* @param eventReceiver identifier of a {@link android.content.BroadcastReceiver}
@@ -2522,6 +2548,7 @@
"receiver and context package names don't match");
return;
}
+
// construct a PendingIntent for the media button and register it
Intent mediaButtonIntent = new Intent(Intent.ACTION_MEDIA_BUTTON);
// the associated intent will be handled by the component being registered
@@ -2531,6 +2558,7 @@
registerMediaButtonIntent(pi, eventReceiver);
}
+
/**
* Register a component to be the sole receiver of MEDIA_BUTTON intents. This is like
* {@link #registerMediaButtonEventReceiver(android.content.ComponentName)}, but allows
@@ -2660,6 +2688,13 @@
return false;
}
rctlr.startListeningToSessions();
+ IAudioService service = getService();
+ try {
+ service.updateRemoteControllerOnExistingMediaPlayers();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Error in calling Audio service interface" +
+ "updateRemoteControllerOnExistingMediaPlayers() due to " + e);
+ }
return true;
}
@@ -2681,6 +2716,24 @@
rctlr.stopListeningToSessions();
}
+ /**
+ * @hide
+ */
+ public void updateMediaPlayerList(String packageName, boolean toAdd) {
+ IAudioService service = getService();
+ try {
+ if (toAdd) {
+ Log.d(TAG, "updateMediaPlayerList: Add RCC " + packageName + " to List");
+ service.addMediaPlayerAndUpdateRemoteController(packageName);
+ } else {
+ Log.d(TAG, "updateMediaPlayerList: Remove RCC " + packageName + " from List");
+ service.removeMediaPlayerAndUpdateRemoteController(packageName);
+ }
+ } catch (RemoteException e) {
+ Log.e(TAG, "Exception while executing updateMediaPlayerList: " + e);
+ }
+ }
+
//====================================================================
// Audio policy
@@ -2734,7 +2787,6 @@
}
}
-
//====================================================================
// Recording configuration
/**
diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java
index 39184f1..4356296 100644
--- a/media/java/android/media/AudioRecord.java
+++ b/media/java/android/media/AudioRecord.java
@@ -700,6 +700,12 @@
case AudioFormat.ENCODING_PCM_FLOAT:
case AudioFormat.ENCODING_PCM_16BIT:
case AudioFormat.ENCODING_PCM_8BIT:
+ case AudioFormat.ENCODING_AMRNB:
+ case AudioFormat.ENCODING_AMRWB:
+ case AudioFormat.ENCODING_EVRC:
+ case AudioFormat.ENCODING_EVRCB:
+ case AudioFormat.ENCODING_EVRCWB:
+ case AudioFormat.ENCODING_EVRCNW:
mAudioFormat = audioFormat;
break;
default:
@@ -936,6 +942,9 @@
case (AudioFormat.CHANNEL_IN_FRONT | AudioFormat.CHANNEL_IN_BACK):
channelCount = 2;
break;
+ case AudioFormat.CHANNEL_IN_5POINT1:
+ channelCount = 6;
+ break;
case AudioFormat.CHANNEL_INVALID:
default:
loge("getMinBufferSize(): Invalid channel configuration.");
@@ -972,6 +981,7 @@
*/
public void startRecording()
throws IllegalStateException {
+ android.util.SeempLog.record(70);
if (mState != STATE_INITIALIZED) {
throw new IllegalStateException("startRecording() called on an "
+ "uninitialized AudioRecord.");
@@ -995,6 +1005,7 @@
*/
public void startRecording(MediaSyncEvent syncEvent)
throws IllegalStateException {
+ android.util.SeempLog.record(70);
if (mState != STATE_INITIALIZED) {
throw new IllegalStateException("startRecording() called on an "
+ "uninitialized AudioRecord.");
diff --git a/media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java
index f597440..e08c290 100644
--- a/media/java/android/media/AudioSystem.java
+++ b/media/java/android/media/AudioSystem.java
@@ -373,6 +373,7 @@
public static final int DEVICE_OUT_SPEAKER_SAFE = 0x400000;
public static final int DEVICE_OUT_IP = 0x800000;
public static final int DEVICE_OUT_BUS = 0x1000000;
+ public static final int DEVICE_OUT_PROXY = 0x2000000;
public static final int DEVICE_OUT_DEFAULT = DEVICE_BIT_DEFAULT;
@@ -401,6 +402,7 @@
DEVICE_OUT_SPEAKER_SAFE |
DEVICE_OUT_IP |
DEVICE_OUT_BUS |
+ DEVICE_OUT_PROXY |
DEVICE_OUT_DEFAULT);
public static final int DEVICE_OUT_ALL_A2DP = (DEVICE_OUT_BLUETOOTH_A2DP |
DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES |
@@ -441,6 +443,7 @@
public static final int DEVICE_IN_LOOPBACK = DEVICE_BIT_IN | 0x40000;
public static final int DEVICE_IN_IP = DEVICE_BIT_IN | 0x80000;
public static final int DEVICE_IN_BUS = DEVICE_BIT_IN | 0x100000;
+ public static final int DEVICE_IN_PROXY = DEVICE_BIT_IN | 0x2000000;
public static final int DEVICE_IN_DEFAULT = DEVICE_BIT_IN | DEVICE_BIT_DEFAULT;
public static final int DEVICE_IN_ALL = (DEVICE_IN_COMMUNICATION |
@@ -464,6 +467,7 @@
DEVICE_IN_LOOPBACK |
DEVICE_IN_IP |
DEVICE_IN_BUS |
+ DEVICE_IN_PROXY |
DEVICE_IN_DEFAULT);
public static final int DEVICE_IN_ALL_SCO = DEVICE_IN_BLUETOOTH_SCO_HEADSET;
public static final int DEVICE_IN_ALL_USB = (DEVICE_IN_USB_ACCESSORY |
@@ -500,6 +504,7 @@
public static final String DEVICE_OUT_SPEAKER_SAFE_NAME = "speaker_safe";
public static final String DEVICE_OUT_IP_NAME = "ip";
public static final String DEVICE_OUT_BUS_NAME = "bus";
+ public static final String DEVICE_OUT_PROXY_NAME = "proxy";
public static final String DEVICE_IN_COMMUNICATION_NAME = "communication";
public static final String DEVICE_IN_AMBIENT_NAME = "ambient";
@@ -576,6 +581,8 @@
return DEVICE_OUT_IP_NAME;
case DEVICE_OUT_BUS:
return DEVICE_OUT_BUS_NAME;
+ case DEVICE_OUT_PROXY:
+ return DEVICE_OUT_PROXY_NAME;
case DEVICE_OUT_DEFAULT:
default:
return Integer.toString(device);
diff --git a/media/java/android/media/CamcorderProfile.java b/media/java/android/media/CamcorderProfile.java
index d303a2e..6785670 100644
--- a/media/java/android/media/CamcorderProfile.java
+++ b/media/java/android/media/CamcorderProfile.java
@@ -206,6 +206,77 @@
private static final int QUALITY_HIGH_SPEED_LIST_START = QUALITY_HIGH_SPEED_LOW;
private static final int QUALITY_HIGH_SPEED_LIST_END = QUALITY_HIGH_SPEED_2160P;
+ // Vendor-specific quality profiles
+ /**
+ * Quality level corresponding to the VGA (640 x 480) resolution.
+ * @hide
+ */
+ public static final int QUALITY_VGA = 10000;
+
+ /**
+ * Quality level corresponding to the 4k-DCI (4096 x 2160) resolution.
+ * @hide
+ */
+ public static final int QUALITY_4KDCI = 10001;
+
+ /**
+ * Time lapse quality level corresponding to the VGA (640 x 480) resolution.
+ * @hide
+ */
+ public static final int QUALITY_TIME_LAPSE_VGA = 10002;
+
+ /**
+ * Time lapse quality level corresponding to the 4k-DCI (4096 x 2160) resolution.
+ * @hide
+ */
+ public static final int QUALITY_TIME_LAPSE_4KDCI = 10003;
+
+ /**
+ * High speed ( >= 100fps) quality level corresponding to the CIF (352 x 288)
+ * @hide
+ */
+ public static final int QUALITY_HIGH_SPEED_CIF = 10004;
+
+ /**
+ * High speed ( >= 100fps) quality level corresponding to the VGA (640 x 480)
+ * @hide
+ */
+ public static final int QUALITY_HIGH_SPEED_VGA = 10005;
+
+ /**
+ * High speed ( >= 100fps) quality level corresponding to the 4K-DCI (4096 x 2160)
+ * @hide
+ */
+ public static final int QUALITY_HIGH_SPEED_4KDCI = 10006;
+
+ /**
+ * Quality level corresponding to QHD resolution
+ * @hide
+ */
+ public static final int QUALITY_QHD = 10007;
+
+ /**
+ * Quality level corresponding to 2K resolution
+ * @hide
+ */
+ public static final int QUALITY_2k = 10008;
+
+ /**
+ * Time lapse quality level corresponding to the QHD resolution.
+ * @hide
+ */
+ public static final int QUALITY_TIME_LAPSE_QHD = 10009;
+
+ /**
+ * Time lapse quality level corresponding to the 2K resolution.
+ * @hide
+ */
+ public static final int QUALITY_TIME_LAPSE_2k = 10010;
+
+ // Start and end of vendor quality list
+ private static final int QUALITY_VENDOR_LIST_START = QUALITY_VGA;
+ private static final int QUALITY_VENDOR_LIST_END = QUALITY_TIME_LAPSE_2k;
+
/**
* Default recording duration in seconds before the session is terminated.
* This is useful for applications like MMS has limited file size requirement.
@@ -391,7 +462,9 @@
(quality >= QUALITY_TIME_LAPSE_LIST_START &&
quality <= QUALITY_TIME_LAPSE_LIST_END) ||
(quality >= QUALITY_HIGH_SPEED_LIST_START &&
- quality <= QUALITY_HIGH_SPEED_LIST_END))) {
+ quality <= QUALITY_HIGH_SPEED_LIST_END) ||
+ (quality >= QUALITY_VENDOR_LIST_START &&
+ quality <= QUALITY_VENDOR_LIST_END))) {
String errMessage = "Unsupported quality level: " + quality;
throw new IllegalArgumentException(errMessage);
}
diff --git a/media/java/android/media/IAudioService.aidl b/media/java/android/media/IAudioService.aidl
index c7931fc..425bb1c 100644
--- a/media/java/android/media/IAudioService.aidl
+++ b/media/java/android/media/IAudioService.aidl
@@ -165,4 +165,10 @@
oneway void unregisterRecordingCallback(in IRecordingConfigDispatcher rcdb);
List<AudioRecordingConfiguration> getActiveRecordingConfigurations();
+
+ void updateRemoteControllerOnExistingMediaPlayers();
+
+ void addMediaPlayerAndUpdateRemoteController(String packageName);
+
+ void removeMediaPlayerAndUpdateRemoteController(String packageName);
}
diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java
index 0bfeaed..feb986c 100644
--- a/media/java/android/media/MediaCodecInfo.java
+++ b/media/java/android/media/MediaCodecInfo.java
@@ -769,6 +769,13 @@
return mDefaultFormat;
}
+ /* Return the capabilities info, so the app can query custom settings
+ * like for VT. */
+ /** @hide */
+ public MediaFormat getCapabilitiesInfoFormat() {
+ return mCapabilitiesInfo;
+ }
+
/**
* Returns the mime type for which this codec-capability object was created.
*/
diff --git a/media/java/android/media/MediaFile.java b/media/java/android/media/MediaFile.java
index da490b9..150323b 100644
--- a/media/java/android/media/MediaFile.java
+++ b/media/java/android/media/MediaFile.java
@@ -46,6 +46,19 @@
private static final int FIRST_AUDIO_FILE_TYPE = FILE_TYPE_MP3;
private static final int LAST_AUDIO_FILE_TYPE = FILE_TYPE_FLAC;
+ // More audio file types
+ public static final int FILE_TYPE_DTS = 210;
+ public static final int FILE_TYPE_3GPA = 211;
+ public static final int FILE_TYPE_AC3 = 212;
+ public static final int FILE_TYPE_QCP = 213;
+ public static final int FILE_TYPE_PCM = 214;
+ public static final int FILE_TYPE_EC3 = 215;
+ public static final int FILE_TYPE_AIFF = 216;
+ public static final int FILE_TYPE_APE = 217;
+ public static final int FILE_TYPE_DSD = 218;
+ private static final int FIRST_AUDIO_FILE_TYPE_EXT = FILE_TYPE_DTS;
+ private static final int LAST_AUDIO_FILE_TYPE_EXT = FILE_TYPE_DSD;
+
// MIDI file types
public static final int FILE_TYPE_MID = 11;
public static final int FILE_TYPE_SMF = 12;
@@ -69,7 +82,9 @@
// More video file types
public static final int FILE_TYPE_MP2PS = 200;
- public static final int FILE_TYPE_QT = 201;
+ public static final int FILE_TYPE_DIVX = 201;
+ public static final int FILE_TYPE_FLV = 202;
+ public static final int FILE_TYPE_QT = 203;
private static final int FIRST_VIDEO_FILE_TYPE2 = FILE_TYPE_MP2PS;
private static final int LAST_VIDEO_FILE_TYPE2 = FILE_TYPE_QT;
@@ -102,14 +117,16 @@
public static final int FILE_TYPE_PLS = 42;
public static final int FILE_TYPE_WPL = 43;
public static final int FILE_TYPE_HTTPLIVE = 44;
+ public static final int FILE_TYPE_DASH = 45;
private static final int FIRST_PLAYLIST_FILE_TYPE = FILE_TYPE_M3U;
- private static final int LAST_PLAYLIST_FILE_TYPE = FILE_TYPE_HTTPLIVE;
+ private static final int LAST_PLAYLIST_FILE_TYPE = FILE_TYPE_DASH;
// Drm file types
public static final int FILE_TYPE_FL = 51;
+ public static final int FILE_TYPE_SD = 52;
private static final int FIRST_DRM_FILE_TYPE = FILE_TYPE_FL;
- private static final int LAST_DRM_FILE_TYPE = FILE_TYPE_FL;
+ private static final int LAST_DRM_FILE_TYPE = FILE_TYPE_SD;
// Other popular file types
public static final int FILE_TYPE_TEXT = 100;
@@ -256,6 +273,7 @@
addFileType("M3U8", FILE_TYPE_HTTPLIVE, "audio/x-mpegurl");
addFileType("FL", FILE_TYPE_FL, "application/x-android-drm-fl");
+ addFileType("DCF", FILE_TYPE_SD, "application/vnd.oma.drm.content");
addFileType("TXT", FILE_TYPE_TEXT, "text/plain", MtpConstants.FORMAT_TEXT);
addFileType("HTM", FILE_TYPE_HTML, "text/html", MtpConstants.FORMAT_HTML);
@@ -268,13 +286,27 @@
addFileType("ZIP", FILE_TYPE_ZIP, "application/zip");
addFileType("MPG", FILE_TYPE_MP2PS, "video/mp2p");
addFileType("MPEG", FILE_TYPE_MP2PS, "video/mp2p");
+ addFileType("DIVX", FILE_TYPE_DIVX, "video/divx");
+ addFileType("FLV", FILE_TYPE_FLV, "video/flv");
+ addFileType("MPD", FILE_TYPE_DASH, "application/dash+xml");
+ addFileType("QCP", FILE_TYPE_QCP, "audio/qcelp");
+ addFileType("AC3", FILE_TYPE_AC3, "audio/ac3");
+ addFileType("EC3", FILE_TYPE_EC3, "audio/eac3");
+ addFileType("AIF", FILE_TYPE_AIFF, "audio/x-aiff");
+ addFileType("AIFF", FILE_TYPE_AIFF, "audio/x-aiff");
+ addFileType("APE", FILE_TYPE_APE, "audio/x-ape");
+ addFileType("DSF", FILE_TYPE_DSD, "audio/x-dsf");
+ addFileType("DFF", FILE_TYPE_DSD, "audio/x-dff");
+ addFileType("DSD", FILE_TYPE_DSD, "audio/dsd");
}
public static boolean isAudioFileType(int fileType) {
return ((fileType >= FIRST_AUDIO_FILE_TYPE &&
fileType <= LAST_AUDIO_FILE_TYPE) ||
(fileType >= FIRST_MIDI_FILE_TYPE &&
- fileType <= LAST_MIDI_FILE_TYPE));
+ fileType <= LAST_MIDI_FILE_TYPE) ||
+ (fileType >= FIRST_AUDIO_FILE_TYPE_EXT &&
+ fileType <= LAST_AUDIO_FILE_TYPE_EXT));
}
public static boolean isVideoFileType(int fileType) {
diff --git a/media/java/android/media/MediaMetadataEditor.java b/media/java/android/media/MediaMetadataEditor.java
index 877c872..648ff24 100644
--- a/media/java/android/media/MediaMetadataEditor.java
+++ b/media/java/android/media/MediaMetadataEditor.java
@@ -440,7 +440,7 @@
protected static final SparseIntArray METADATA_KEYS_TYPE;
static {
- METADATA_KEYS_TYPE = new SparseIntArray(17);
+ METADATA_KEYS_TYPE = new SparseIntArray(18);
// NOTE: if adding to the list below, make sure you increment the array initialization size
// keys with long values
METADATA_KEYS_TYPE.put(
@@ -466,5 +466,7 @@
// keys with Rating values
METADATA_KEYS_TYPE.put(RATING_KEY_BY_OTHERS, METADATA_TYPE_RATING);
METADATA_KEYS_TYPE.put(RATING_KEY_BY_USER, METADATA_TYPE_RATING);
+ // Meta data for total number of tracks in Album
+ METADATA_KEYS_TYPE.put(MediaMetadataRetriever.METADATA_KEY_NUM_TRACKS, METADATA_TYPE_LONG);
}
}
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
old mode 100644
new mode 100755
index e65ba4c..c5a16c0
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -394,6 +394,13 @@
/** VP8/VORBIS data in a WEBM container */
public static final int WEBM = 9;
+
+ /** @hide QCP file format */
+ public static final int QCP = 20;
+
+ /** @hide WAVE media file format*/
+ public static final int WAVE = 21;
+
};
/**
@@ -418,6 +425,12 @@
public static final int AAC_ELD = 5;
/** Ogg Vorbis audio codec */
public static final int VORBIS = 6;
+ /** @hide EVRC audio codec */
+ public static final int EVRC = 10;
+ /** @hide QCELP audio codec */
+ public static final int QCELP = 11;
+ /** @hide Linear PCM audio codec */
+ public static final int LPCM = 12;
}
/**
@@ -486,8 +499,10 @@
setVideoSize(profile.videoFrameWidth, profile.videoFrameHeight);
setVideoEncodingBitRate(profile.videoBitRate);
setVideoEncoder(profile.videoCodec);
- if (profile.quality >= CamcorderProfile.QUALITY_TIME_LAPSE_LOW &&
- profile.quality <= CamcorderProfile.QUALITY_TIME_LAPSE_QVGA) {
+ if ((profile.quality >= CamcorderProfile.QUALITY_TIME_LAPSE_LOW &&
+ profile.quality <= CamcorderProfile.QUALITY_TIME_LAPSE_2160P) ||
+ (profile.quality >= CamcorderProfile.QUALITY_TIME_LAPSE_VGA &&
+ profile.quality <= CamcorderProfile.QUALITY_TIME_LAPSE_4KDCI)) {
// Nothing needs to be done. Call to setCaptureRate() enables
// time lapse video recording.
} else {
diff --git a/media/java/android/media/RemoteControlClient.java b/media/java/android/media/RemoteControlClient.java
index 6d32eff..87b156f 100644
--- a/media/java/android/media/RemoteControlClient.java
+++ b/media/java/android/media/RemoteControlClient.java
@@ -349,6 +349,16 @@
*/
public RemoteControlClient(PendingIntent mediaButtonIntent) {
mRcMediaIntent = mediaButtonIntent;
+
+ Looper looper;
+ if ((looper = Looper.myLooper()) != null) {
+ mEventHandler = new EventHandler(this, looper);
+ } else if ((looper = Looper.getMainLooper()) != null) {
+ mEventHandler = new EventHandler(this, looper);
+ } else {
+ mEventHandler = null;
+ Log.e(TAG, "RemoteControlClient() couldn't find main application thread");
+ }
}
/**
@@ -368,6 +378,8 @@
*/
public RemoteControlClient(PendingIntent mediaButtonIntent, Looper looper) {
mRcMediaIntent = mediaButtonIntent;
+
+ mEventHandler = new EventHandler(this, looper);
}
/**
@@ -696,6 +708,79 @@
}
/**
+ * @hide
+ */
+ public void playItemResponse(boolean success) {
+ Log.e(TAG, "playItemResponse");
+ playItemResponseInt(success);
+ }
+
+ private void playItemResponseInt(boolean success) {
+ Log.d(TAG, "playItemResponseInt");
+ Log.v(TAG, "success: " + success);
+
+ // USE_SESSIONS
+ if (mSession != null) {
+ mSession.playItemResponse(success);
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public void updateNowPlayingEntries(long[] playList) {
+ Log.e(TAG, "updateNowPlayingEntries: Item numbers: " + playList.length);
+ updateNowPlayingEntriesInt(playList);
+ }
+
+ private void updateNowPlayingEntriesInt(long[] playList) {
+ Log.d(TAG, "updateNowPlayingEntriesInt");
+
+ // USE_SESSIONS
+ if (mSession != null) {
+ mSession.updateNowPlayingEntries(playList);
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public void updateFolderInfoBrowsedPlayer(String stringUri) {
+ Log.e(TAG, "updateFolderInfoBrowsedPlayer");
+ synchronized(mCacheLock) {
+ updateFolderInfoBrowsedPlayerInt(stringUri);
+ }
+ }
+
+ private void updateFolderInfoBrowsedPlayerInt(String stringUri) {
+ Log.d(TAG, "updateFolderInfoBrowsedPlayerInt");
+
+ // USE_SESSIONS
+ if (mSession != null) {
+ mSession.updateFolderInfoBrowsedPlayer(stringUri);
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public void updateNowPlayingContentChange() {
+ Log.e(TAG, "updateNowPlayingContentChange");
+ synchronized(mCacheLock) {
+ updateNowPlayingContentChangeInt();
+ }
+ }
+
+ private void updateNowPlayingContentChangeInt() {
+ Log.d(TAG, "updateNowPlayingContentChangeInt");
+
+ // USE_SESSIONS
+ if (mSession != null) {
+ mSession.updateNowPlayingContentChange();
+ }
+ }
+
+ /**
* Sets the flags for the media transport control buttons that this client supports.
* @param transportControlFlags A combination of the following flags:
* {@link #FLAG_KEY_MEDIA_PREVIOUS},
@@ -753,6 +838,56 @@
}
}
+ /**
+ * @hide
+ */
+ public interface OnGetNowPlayingEntriesListener {
+ public abstract void onGetNowPlayingEntries();
+ }
+
+ /**
+ * @hide
+ */
+ public void setNowPlayingEntriesUpdateListener(OnGetNowPlayingEntriesListener l) {
+ Log.d(TAG, "setNowPlayingEntriesUpdateListener");
+ synchronized(mCacheLock) {
+ mGetNowPlayingEntriesListener = l;
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public interface OnSetBrowsedPlayerListener {
+ public abstract void onSetBrowsedPlayer();
+ }
+
+ /**
+ * @hide
+ */
+ public void setBrowsedPlayerUpdateListener(OnSetBrowsedPlayerListener l) {
+ Log.d(TAG, "setBrowsedPlayerUpdateListener");
+ synchronized(mCacheLock) {
+ mSetBrowsedPlayerListener = l;
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public interface OnSetPlayItemListener {
+ public abstract void onSetPlayItem(int scope, long uid);
+ }
+
+ /**
+ * @hide
+ */
+ public void setPlayItemListener(OnSetPlayItemListener l) {
+ Log.d(TAG, "setPlayItemListener");
+ synchronized(mCacheLock) {
+ mSetPlayItemListener = l;
+ }
+ }
/**
* Interface definition for a callback to be invoked when the media playback position is
@@ -893,6 +1028,13 @@
/**
* The current remote control client generation ID across the system, as known by this object
*/
+
+ private OnSetBrowsedPlayerListener mSetBrowsedPlayerListener;
+
+ private OnSetPlayItemListener mSetPlayItemListener;
+
+ private OnGetNowPlayingEntriesListener mGetNowPlayingEntriesListener;
+
private int mCurrentClientGenId = -1;
/**
@@ -946,8 +1088,67 @@
onUpdateMetadata(mCurrentClientGenId, MetadataEditor.RATING_KEY_BY_USER, rating);
}
}
+
+ @Override
+ public void setPlayItem(int scope, long uid) {
+ // only post messages, we can't block here
+ if (mEventHandler != null) {
+ mEventHandler.removeMessages(MSG_SET_PLAY_ITEM);
+ mEventHandler.sendMessage(mEventHandler.obtainMessage(
+ MSG_SET_PLAY_ITEM, 0 /* arg1 */, scope /* arg2, ignored */,
+ new Long(uid)));
+ }
+ }
+
+ @Override
+ public void getNowPlayingEntries() {
+ // only post messages, we can't block here
+ if (mEventHandler != null) {
+ mEventHandler.removeMessages(MSG_GET_NOW_PLAYING_ENTRIES);
+ mEventHandler.sendMessage(mEventHandler.obtainMessage(
+ MSG_GET_NOW_PLAYING_ENTRIES, 0, 0, null));
+ }
+ }
+
+ @Override
+ public void setBrowsedPlayer() {
+ Log.d(TAG, "setBrowsedPlayer in RemoteControlClient");
+ if (mEventHandler != null) {
+ mEventHandler.sendMessage(mEventHandler.obtainMessage(
+ MSG_SET_BROWSED_PLAYER, 0 /* arg1 */, 0 /* arg2*/, null));
+ }
+ }
};
+ private EventHandler mEventHandler;
+ private final static int MSG_SET_BROWSED_PLAYER = 12;
+ private final static int MSG_SET_PLAY_ITEM = 13;
+ private final static int MSG_GET_NOW_PLAYING_ENTRIES = 14;
+
+ private class EventHandler extends Handler {
+ public EventHandler(RemoteControlClient rcc, Looper looper) {
+ super(looper);
+ }
+
+ @Override
+ public void handleMessage(Message msg) {
+ switch(msg.what) {
+ case MSG_SET_BROWSED_PLAYER:
+ Log.d(TAG, "MSG_SET_BROWSED_PLAYER in RemoteControlClient");
+ onSetBrowsedPlayer();
+ break;
+ case MSG_SET_PLAY_ITEM:
+ onSetPlayItem(msg.arg2, ((Long)msg.obj).longValue());
+ break;
+ case MSG_GET_NOW_PLAYING_ENTRIES:
+ onGetNowPlayingEntries();
+ break;
+ default:
+ Log.e(TAG, "Unknown event " + msg.what + " in RemoteControlClient handler");
+ }
+ }
+ }
+
//===========================================================
// Message handlers
@@ -967,6 +1168,36 @@
}
}
+ private void onSetPlayItem(int scope, long uid) {
+ Log.d(TAG, "onSetPlayItem");
+ synchronized (mCacheLock) {
+ if (mSetPlayItemListener != null) {
+ Log.d(TAG, "mSetPlayItemListener.onSetPlayItem");
+ mSetPlayItemListener.onSetPlayItem(scope, uid);
+ }
+ }
+ }
+
+ private void onSetBrowsedPlayer() {
+ Log.d(TAG, "onSetBrowsedPlayer");
+ synchronized (mCacheLock) {
+ if (mSetBrowsedPlayerListener != null) {
+ Log.d(TAG, "mSetBrowsedPlayerListener.onSetBrowsedPlayer");
+ mSetBrowsedPlayerListener.onSetBrowsedPlayer();
+ }
+ }
+ }
+
+ private void onGetNowPlayingEntries() {
+ Log.d(TAG, "onGetNowPlayingEntries");
+ synchronized (mCacheLock) {
+ if (mGetNowPlayingEntriesListener != null) {
+ Log.d(TAG, "mGetNowPlayingEntriesListener.onGetNowPlayingEntries");
+ mGetNowPlayingEntriesListener.onGetNowPlayingEntries();
+ }
+ }
+ }
+
//===========================================================
// Internal utilities
diff --git a/media/java/android/media/RemoteController.java b/media/java/android/media/RemoteController.java
index 90f2163..9f2d545 100644
--- a/media/java/android/media/RemoteController.java
+++ b/media/java/android/media/RemoteController.java
@@ -69,11 +69,13 @@
private MediaSessionManager.OnActiveSessionsChangedListener mSessionListener;
private MediaController.Callback mSessionCb = new MediaControllerCallback();
+ private final AudioManager mAudioManager;
/**
* Synchronized on mInfoLock
*/
private boolean mIsRegistered = false;
private OnClientUpdateListener mOnClientUpdateListener;
+ private OnClientAvrcpUpdateListener mOnClientAvrcpUpdateListener;
private PlaybackInfo mLastPlaybackInfo;
private int mArtworkWidth = -1;
private int mArtworkHeight = -1;
@@ -124,6 +126,7 @@
mContext = context;
mSessionManager = (MediaSessionManager) context
.getSystemService(Context.MEDIA_SESSION_SERVICE);
+ mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
mSessionListener = new TopTransportSessionListener();
if (ActivityManager.isLowRamDeviceStatic()) {
@@ -134,6 +137,25 @@
}
}
+ /**
+ * @hide
+ */
+ public RemoteController(Context context, OnClientUpdateListener updateListener, Looper looper,
+ OnClientAvrcpUpdateListener avrcpUpdateListener) throws IllegalArgumentException {
+ this(context, updateListener, looper);
+ mOnClientAvrcpUpdateListener = avrcpUpdateListener;
+ }
+
+ /**
+ * @hide
+ */
+ public interface OnClientAvrcpUpdateListener {
+ public void onClientFolderInfoBrowsedPlayer(String stringUri);
+ public void onClientUpdateNowPlayingEntries(long[] playList);
+ public void onClientNowPlayingContentChange();
+ public void onClientPlayItemResponse(boolean success);
+ };
+
/**
* Interface definition for the callbacks to be invoked whenever media events, metadata
@@ -268,6 +290,7 @@
* @throws IllegalArgumentException
*/
public boolean seekTo(long timeMs) throws IllegalArgumentException {
+ Log.e(TAG, "seekTo() in RemoteController");
if (!mEnabled) {
Log.e(TAG, "Cannot use seekTo() from a disabled RemoteController");
return false;
@@ -283,6 +306,69 @@
return true;
}
+ /**
+ * @hide
+ * Request the user of a RemoteControlClient to play the requested item.
+ * @param generationId the RemoteControlClient generation counter for which this request is
+ * issued.
+ * @param uid uid of the song to be played.
+ * @scope scope of the file system to use
+ */
+ public void setRemoteControlClientPlayItem(long uid, int scope) {
+ Log.e(TAG, "setRemoteControlClientPlayItem()");
+ if (!mEnabled) {
+ Log.e(TAG, "Cannot use setRemoteControlClientPlayItem()" +
+ " from a disabled RemoteController");
+ return;
+ }
+ synchronized (mInfoLock) {
+ if (mCurrentSession != null) {
+ mCurrentSession.getTransportControls().setRemoteControlClientPlayItem(uid, scope);
+ }
+ }
+ return;
+ }
+
+ /**
+ * @hide
+ * Request the user of a RemoteControlClient to provide with the now playing list entries.
+ * @param generationId the RemoteControlClient generation counter for which this request is
+ * issued.
+ */
+ public void getRemoteControlClientNowPlayingEntries() {
+ Log.e(TAG, "getRemoteControlClientNowPlayingEntries()");
+ if (!mEnabled) {
+ Log.e(TAG, "Cannot use getRemoteControlClientNowPlayingEntries()" +
+ " from a disabled RemoteController");
+ return;
+ }
+ synchronized (mInfoLock) {
+ if (mCurrentSession != null) {
+ mCurrentSession.getTransportControls().getRemoteControlClientNowPlayingEntries();
+ }
+ }
+ return;
+ }
+
+ /**
+ * @hide
+ * Request the user of a RemoteControlClient to set the music player as current browsed player.
+ * @param packageName package name of the targeted media player.
+ */
+ public void setRemoteControlClientBrowsedPlayer() {
+ Log.e(TAG, "setRemoteControlClientBrowsedPlayer()");
+ if (!mEnabled) {
+ Log.e(TAG, "Cannot use setRemoteControlClientBrowsedPlayer()" +
+ " from a disabled RemoteController");
+ return;
+ }
+ synchronized (mInfoLock) {
+ if (mCurrentSession != null) {
+ mCurrentSession.getTransportControls().setRemoteControlClientBrowsedPlayer();
+ }
+ }
+ return;
+ }
/**
* @hide
@@ -468,6 +554,30 @@
public void onMetadataChanged(MediaMetadata metadata) {
onNewMediaMetadata(metadata);
}
+
+ @Override
+ public void onUpdateFolderInfoBrowsedPlayer(String stringUri) {
+ Log.d(TAG, "MediaControllerCallback: onUpdateFolderInfoBrowsedPlayer");
+ onFolderInfoBrowsedPlayer(stringUri);
+ }
+
+ @Override
+ public void onUpdateNowPlayingEntries(long[] playList) {
+ Log.d(TAG, "MediaControllerCallback: onUpdateNowPlayingEntries");
+ onNowPlayingEntriesUpdate(playList);
+ }
+
+ @Override
+ public void onUpdateNowPlayingContentChange() {
+ Log.d(TAG, "MediaControllerCallback: onUpdateNowPlayingContentChange");
+ onNowPlayingContentChange();
+ }
+
+ @Override
+ public void onPlayItemResponse(boolean success) {
+ Log.d(TAG, "MediaControllerCallback: onPlayItemResponse");
+ onSetPlayItemResponse(success);
+ }
}
/**
@@ -597,6 +707,8 @@
synchronized (mInfoLock) {
if (controller == null) {
if (mCurrentSession != null) {
+ Log.v(TAG, "Updating current controller as null");
+ mAudioManager.updateMediaPlayerList(mCurrentSession.getPackageName(), false);
mCurrentSession.unregisterCallback(mSessionCb);
mCurrentSession = null;
sendMsg(mEventHandler, MSG_CLIENT_CHANGE, SENDMSG_REPLACE,
@@ -606,13 +718,21 @@
|| !controller.getSessionToken()
.equals(mCurrentSession.getSessionToken())) {
if (mCurrentSession != null) {
+ Log.v(TAG, "Updating current controller package as " +
+ controller.getPackageName() + " from " + mCurrentSession.getPackageName());
mCurrentSession.unregisterCallback(mSessionCb);
+ } else {
+ Log.v(TAG, "Updating current controller package as " +
+ controller.getPackageName() + " from null");
}
+
sendMsg(mEventHandler, MSG_CLIENT_CHANGE, SENDMSG_REPLACE,
0 /* arg1 ignored */, 0 /* clearing */, null /* obj */, 0 /* delay */);
mCurrentSession = controller;
mCurrentSession.registerCallback(mSessionCb, mEventHandler);
+ mAudioManager.updateMediaPlayerList(mCurrentSession.getPackageName(), true);
+
PlaybackState state = controller.getPlaybackState();
sendMsg(mEventHandler, MSG_NEW_PLAYBACK_STATE, SENDMSG_REPLACE,
0 /* arg1 ignored */, 0 /* arg2 ignored */, state /* obj */, 0 /* delay */);
@@ -669,6 +789,74 @@
}
}
+ private void onFolderInfoBrowsedPlayer(String stringUri) {
+ Log.d(TAG, "RemoteController: onFolderInfoBrowsedPlayer");
+ final OnClientAvrcpUpdateListener l;
+
+ synchronized(mInfoLock) {
+ l = mOnClientAvrcpUpdateListener;
+ }
+
+ try {
+ if (l != null) {
+ l.onClientFolderInfoBrowsedPlayer(stringUri);
+ }
+ } catch (Exception e) {
+ Log.e(TAG, "Error Updating AVRCP on receiving Browsed player response", e);
+ }
+ }
+
+ private void onNowPlayingEntriesUpdate(long[] playList) {
+ Log.d(TAG, "RemoteController: onUpdateNowPlayingEntries");
+ final OnClientAvrcpUpdateListener l;
+
+ synchronized(mInfoLock) {
+ l = mOnClientAvrcpUpdateListener;
+ }
+
+ try {
+ if (l != null) {
+ l.onClientUpdateNowPlayingEntries(playList);
+ }
+ } catch (Exception e) {
+ Log.e(TAG, "Error Updating AVRCP on receiving Now Playing Entries", e);
+ }
+ }
+
+ private void onNowPlayingContentChange() {
+ Log.d(TAG, "RemoteController: onNowPlayingContentChange");
+ final OnClientAvrcpUpdateListener l;
+
+ synchronized(mInfoLock) {
+ l = mOnClientAvrcpUpdateListener;
+ }
+
+ try {
+ if (l != null) {
+ l.onClientNowPlayingContentChange();
+ }
+ } catch (Exception e) {
+ Log.e(TAG, "Error Updating AVRCP on Now Playing Content Change", e);
+ }
+ }
+
+ private void onSetPlayItemResponse(boolean success) {
+ Log.d(TAG, "RemoteController: onPlayItemResponse");
+ final OnClientAvrcpUpdateListener l;
+
+ synchronized(mInfoLock) {
+ l = mOnClientAvrcpUpdateListener;
+ }
+
+ try {
+ if (l != null) {
+ l.onClientPlayItemResponse(success);
+ }
+ } catch (Exception e) {
+ Log.e(TAG, "Error Updating AVRCP on receiving Play Item response", e);
+ }
+ }
+
//==================================================
private static class PlaybackInfo {
int mState;
diff --git a/media/java/android/media/ToneGenerator.java b/media/java/android/media/ToneGenerator.java
index 4661226..f2b2345 100644
--- a/media/java/android/media/ToneGenerator.java
+++ b/media/java/android/media/ToneGenerator.java
@@ -729,6 +729,13 @@
*/
public static final int TONE_CDMA_SIGNAL_OFF = 98;
+ /**
+ * HOLD_RECALL - 440Hz
+ *
+ * @hide #ToneGenerator(int, int)
+ */
+ public static final int TONE_HOLD_RECALL = 99;
+
/** Maximum volume, for use with {@link #ToneGenerator(int,int)} */
public static final int MAX_VOLUME = 100;
/** Minimum volume setting, for use with {@link #ToneGenerator(int,int)} */
diff --git a/media/java/android/media/session/ISession.aidl b/media/java/android/media/session/ISession.aidl
index 3affee5c0..477c778 100644
--- a/media/java/android/media/session/ISession.aidl
+++ b/media/java/android/media/session/ISession.aidl
@@ -45,6 +45,10 @@
void setQueueTitle(CharSequence title);
void setExtras(in Bundle extras);
void setRatingType(int type);
+ void playItemResponse(boolean success);
+ void updateNowPlayingEntries(in long[] playList);
+ void updateFolderInfoBrowsedPlayer(String stringUri);
+ void updateNowPlayingContentChange();
// These commands relate to volume handling
void setPlaybackToLocal(in AudioAttributes attributes);
diff --git a/media/java/android/media/session/ISessionCallback.aidl b/media/java/android/media/session/ISessionCallback.aidl
index 893bd3c..fabd71f 100644
--- a/media/java/android/media/session/ISessionCallback.aidl
+++ b/media/java/android/media/session/ISessionCallback.aidl
@@ -45,6 +45,9 @@
void onFastForward();
void onRewind();
void onSeekTo(long pos);
+ void setRemoteControlClientBrowsedPlayer();
+ void setRemoteControlClientPlayItem(long uid, int scope);
+ void getRemoteControlClientNowPlayingEntries();
void onRate(in Rating rating);
void onCustomAction(String action, in Bundle args);
diff --git a/media/java/android/media/session/ISessionController.aidl b/media/java/android/media/session/ISessionController.aidl
index 249bcdc..3d7c413 100644
--- a/media/java/android/media/session/ISessionController.aidl
+++ b/media/java/android/media/session/ISessionController.aidl
@@ -66,6 +66,9 @@
void fastForward();
void rewind();
void seekTo(long pos);
+ void setRemoteControlClientBrowsedPlayer();
+ void setRemoteControlClientPlayItem(long uid, int scope);
+ void getRemoteControlClientNowPlayingEntries();
void rate(in Rating rating);
void sendCustomAction(String action, in Bundle args);
MediaMetadata getMetadata();
diff --git a/media/java/android/media/session/ISessionControllerCallback.aidl b/media/java/android/media/session/ISessionControllerCallback.aidl
index cf31767..a5ad913 100644
--- a/media/java/android/media/session/ISessionControllerCallback.aidl
+++ b/media/java/android/media/session/ISessionControllerCallback.aidl
@@ -36,4 +36,8 @@
void onQueueTitleChanged(CharSequence title);
void onExtrasChanged(in Bundle extras);
void onVolumeInfoChanged(in ParcelableVolumeInfo info);
+ void onPlayItemResponse(boolean success);
+ void onUpdateNowPlayingEntries(in long[] playList);
+ void onUpdateFolderInfoBrowsedPlayer(String stringUri);
+ void onUpdateNowPlayingContentChange();
}
diff --git a/media/java/android/media/session/MediaController.java b/media/java/android/media/session/MediaController.java
index 622900f..670ff79 100644
--- a/media/java/android/media/session/MediaController.java
+++ b/media/java/android/media/session/MediaController.java
@@ -64,6 +64,10 @@
private static final int MSG_UPDATE_QUEUE_TITLE = 6;
private static final int MSG_UPDATE_EXTRAS = 7;
private static final int MSG_DESTROYED = 8;
+ private static final int MSG_FOLDER_INFO_BROWSED_PLAYER = 9;
+ private static final int MSG_UPDATE_NOWPLAYING_ENTRIES = 10;
+ private static final int MSG_UPDATE_NOWPLAYING_CONTENT_CHANGE = 11;
+ private static final int MSG_PLAY_ITEM_RESPONSE = 12;
private final ISessionController mSessionBinder;
@@ -579,6 +583,31 @@
*/
public void onAudioInfoChanged(PlaybackInfo info) {
}
+
+ /**
+ * @hide
+ */
+ public void onUpdateFolderInfoBrowsedPlayer(String stringUri) {
+ }
+
+ /**
+ * @hide
+ */
+ public void onUpdateNowPlayingEntries(long[] playList) {
+ }
+
+ /**
+ * @hide
+ */
+ public void onUpdateNowPlayingContentChange() {
+ }
+
+ /**
+ * @hide
+ */
+ public void onPlayItemResponse(boolean success) {
+ }
+
}
/**
@@ -793,6 +822,7 @@
* @param pos Position to move to, in milliseconds.
*/
public void seekTo(long pos) {
+ Log.d(TAG, "seekTo in TransportControls");
try {
mSessionBinder.seekTo(pos);
} catch (RemoteException e) {
@@ -801,6 +831,42 @@
}
/**
+ * @hide
+ */
+ public void setRemoteControlClientBrowsedPlayer() {
+ Log.d(TAG, "setRemoteControlClientBrowsedPlayer in TransportControls");
+ try {
+ mSessionBinder.setRemoteControlClientBrowsedPlayer();
+ } catch (RemoteException e) {
+ Log.wtf(TAG, "Error calling setRemoteControlClientBrowsedPlayer.", e);
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public void setRemoteControlClientPlayItem(long uid, int scope) {
+ Log.d(TAG, "setRemoteControlClientPlayItem in TransportControls");
+ try {
+ mSessionBinder.setRemoteControlClientPlayItem(uid, scope);
+ } catch (RemoteException e) {
+ Log.wtf(TAG, "Error calling setRemoteControlClientPlayItem.", e);
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public void getRemoteControlClientNowPlayingEntries() {
+ Log.d(TAG, "getRemoteControlClientNowPlayingEntries in TransportControls");
+ try {
+ mSessionBinder.getRemoteControlClientNowPlayingEntries();
+ } catch (RemoteException e) {
+ Log.wtf(TAG, "Error calling getRemoteControlClientNowPlayingEntries.", e);
+ }
+ }
+
+ /**
* Start fast forwarding. If playback is already fast forwarding this
* may increase the rate.
*/
@@ -1062,6 +1128,42 @@
}
}
+ @Override
+ public void onUpdateFolderInfoBrowsedPlayer(String stringUri) {
+ Log.d(TAG, "CallBackStub: onUpdateFolderInfoBrowsedPlayer");
+ MediaController controller = mController.get();
+ if (controller != null) {
+ controller.postMessage(MSG_FOLDER_INFO_BROWSED_PLAYER, stringUri, null);
+ }
+ }
+
+ @Override
+ public void onUpdateNowPlayingEntries(long[] playList) {
+ Log.d(TAG, "CallBackStub: onUpdateNowPlayingEntries");
+ MediaController controller = mController.get();
+ if (controller != null) {
+ controller.postMessage(MSG_UPDATE_NOWPLAYING_ENTRIES, playList, null);
+ }
+ }
+
+ @Override
+ public void onUpdateNowPlayingContentChange() {
+ Log.d(TAG, "CallBackStub: onUpdateNowPlayingContentChange");
+ MediaController controller = mController.get();
+ if (controller != null) {
+ controller.postMessage(MSG_UPDATE_NOWPLAYING_CONTENT_CHANGE, null, null);
+ }
+ }
+
+ @Override
+ public void onPlayItemResponse(boolean success) {
+ Log.d(TAG, "CallBackStub: onPlayItemResponse");
+ MediaController controller = mController.get();
+ if (controller != null) {
+ controller.postMessage(MSG_PLAY_ITEM_RESPONSE, new Boolean(success), null);
+ }
+ }
+
}
private final static class MessageHandler extends Handler {
@@ -1103,6 +1205,18 @@
case MSG_DESTROYED:
mCallback.onSessionDestroyed();
break;
+ case MSG_FOLDER_INFO_BROWSED_PLAYER:
+ mCallback.onUpdateFolderInfoBrowsedPlayer((String) msg.obj);
+ break;
+ case MSG_UPDATE_NOWPLAYING_ENTRIES:
+ mCallback.onUpdateNowPlayingEntries((long[]) msg.obj);
+ break;
+ case MSG_UPDATE_NOWPLAYING_CONTENT_CHANGE:
+ mCallback.onUpdateNowPlayingContentChange();
+ break;
+ case MSG_PLAY_ITEM_RESPONSE:
+ mCallback.onPlayItemResponse(((Boolean)(msg.obj)).booleanValue());
+ break;
}
}
diff --git a/media/java/android/media/session/MediaSession.java b/media/java/android/media/session/MediaSession.java
index 7f9653d..59b2f6f 100644
--- a/media/java/android/media/session/MediaSession.java
+++ b/media/java/android/media/session/MediaSession.java
@@ -493,6 +493,58 @@
}
/**
+ * @hide
+ */
+ public void playItemResponse(boolean success) {
+ Log.d(TAG, "MediaSession: playItemResponse");
+
+ try {
+ mBinder.playItemResponse(success);
+ } catch (RemoteException e) {
+ Log.wtf(TAG, "Dead object in playItemResponse.", e);
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public void updateNowPlayingEntries(long[] playList) {
+ Log.d(TAG, "MediaSession: updateNowPlayingEntries");
+
+ try {
+ mBinder.updateNowPlayingEntries(playList);
+ } catch (RemoteException e) {
+ Log.wtf(TAG, "Dead object in updateNowPlayingEntries.", e);
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public void updateFolderInfoBrowsedPlayer(String stringUri) {
+ Log.d(TAG, "MediaSession: updateFolderInfoBrowsedPlayer");
+
+ try {
+ mBinder.updateFolderInfoBrowsedPlayer(stringUri);
+ } catch (RemoteException e) {
+ Log.wtf(TAG, "Dead object in updateFolderInfoBrowsedPlayer.", e);
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public void updateNowPlayingContentChange() {
+ Log.d(TAG, "MediaSession: updateNowPlayingContentChange");
+
+ try {
+ mBinder.updateNowPlayingContentChange();
+ } catch (RemoteException e) {
+ Log.wtf(TAG, "Dead object in updateNowPlayingContentChange.", e);
+ }
+ }
+
+ /**
* Notify the system that the remote volume changed.
*
* @param provider The provider that is handling volume changes.
@@ -604,6 +656,34 @@
postToCallback(CallbackMessageHandler.MSG_MEDIA_BUTTON, mediaButtonIntent);
}
+ private void dispatchSetBrowsedPlayerCommand() {
+ postToCallback(CallbackMessageHandler.MSG_SET_BROWSED_PLAYER);
+ }
+
+ private void dispatchSetPlayItemCommand(long uid, int scope) {
+ PlayItemToken playItemToken = new PlayItemToken(uid, scope);
+ postToCallback(CallbackMessageHandler.MSG_SET_PLAY_ITEM, playItemToken);
+ }
+
+ private class PlayItemToken {
+ private long mUid;
+ private int mScope;
+ public PlayItemToken(long uid, int scope) {
+ mUid = uid;
+ mScope = scope;
+ }
+ public int getScope() {
+ return mScope;
+ }
+ public long getUid() {
+ return mUid;
+ }
+ }
+
+ private void dispatchGetNowPlayingItemsCommand() {
+ postToCallback(CallbackMessageHandler.MSG_GET_NOW_PLAYING_ITEMS);
+ }
+
private void dispatchAdjustVolume(int direction) {
postToCallback(CallbackMessageHandler.MSG_ADJUST_VOLUME, direction);
}
@@ -971,6 +1051,25 @@
*/
public void onCustomAction(@NonNull String action, @Nullable Bundle extras) {
}
+
+ /**
+ * @hide
+ */
+ public void setBrowsedPlayer() {
+ }
+
+ /**
+ * @hide
+ */
+ public void setPlayItem(int scope, long uid) {
+ }
+
+ /**
+ * @hide
+ */
+ public void getNowPlayingEntries() {
+ }
+
}
/**
@@ -1143,6 +1242,33 @@
}
@Override
+ public void setRemoteControlClientBrowsedPlayer() throws RemoteException {
+ Log.d(TAG, "setRemoteControlClientBrowsedPlayer in CallbackStub");
+ MediaSession session = mMediaSession.get();
+ if (session != null) {
+ session.dispatchSetBrowsedPlayerCommand();
+ }
+ }
+
+ @Override
+ public void setRemoteControlClientPlayItem(long uid, int scope) throws RemoteException {
+ Log.d(TAG, "setRemoteControlClientPlayItem in CallbackStub");
+ MediaSession session = mMediaSession.get();
+ if (session != null) {
+ session.dispatchSetPlayItemCommand(uid, scope);
+ }
+ }
+
+ @Override
+ public void getRemoteControlClientNowPlayingEntries() throws RemoteException {
+ Log.d(TAG, "getRemoteControlClientNowPlayingEntries in CallbackStub");
+ MediaSession session = mMediaSession.get();
+ if (session != null) {
+ session.dispatchGetNowPlayingItemsCommand();
+ }
+ }
+
+ @Override
public void onCustomAction(String action, Bundle args) {
MediaSession session = mMediaSession.get();
if (session != null) {
@@ -1286,6 +1412,9 @@
private static final int MSG_CUSTOM_ACTION = 20;
private static final int MSG_ADJUST_VOLUME = 21;
private static final int MSG_SET_VOLUME = 22;
+ private static final int MSG_SET_BROWSED_PLAYER = 23;
+ private static final int MSG_SET_PLAY_ITEM = 24;
+ private static final int MSG_GET_NOW_PLAYING_ITEMS = 25;
private MediaSession.Callback mCallback;
@@ -1392,6 +1521,18 @@
if (vp != null) {
vp.onSetVolumeTo((int) msg.obj);
}
+ case MSG_SET_BROWSED_PLAYER:
+ Log.d(TAG, "MSG_SET_BROWSED_PLAYER received in CallbackMessageHandler");
+ mCallback.setBrowsedPlayer();
+ break;
+ case MSG_SET_PLAY_ITEM:
+ Log.d(TAG, "MSG_SET_PLAY_ITEM received in CallbackMessageHandler");
+ PlayItemToken playItemToken = (PlayItemToken) msg.obj;
+ mCallback.setPlayItem(playItemToken.getScope(), playItemToken.getUid());
+ break;
+ case MSG_GET_NOW_PLAYING_ITEMS:
+ Log.d(TAG, "MSG_GET_NOW_PLAYING_ITEMS received in CallbackMessageHandler");
+ mCallback.getNowPlayingEntries();
break;
}
}
diff --git a/media/java/android/media/session/MediaSessionLegacyHelper.java b/media/java/android/media/session/MediaSessionLegacyHelper.java
index 95cb8ae..d1e9454 100644
--- a/media/java/android/media/session/MediaSessionLegacyHelper.java
+++ b/media/java/android/media/session/MediaSessionLegacyHelper.java
@@ -549,6 +549,27 @@
mRccListener.onSetRating(rating);
}
}
+
+ @Override
+ public void setBrowsedPlayer() {
+ if (mRccListener != null) {
+ mRccListener.setBrowsedPlayer();
+ }
+ }
+
+ @Override
+ public void setPlayItem(int scope, long uid) {
+ if (mRccListener != null) {
+ mRccListener.setPlayItem(scope, uid);
+ }
+ }
+
+ @Override
+ public void getNowPlayingEntries() {
+ if (mRccListener != null) {
+ mRccListener.getNowPlayingEntries();
+ }
+ }
}
}
}
diff --git a/media/jni/android_media_MediaPlayer.cpp b/media/jni/android_media_MediaPlayer.cpp
index 2fb1a3b..5bc45ff 100644
--- a/media/jni/android_media_MediaPlayer.cpp
+++ b/media/jni/android_media_MediaPlayer.cpp
@@ -49,6 +49,7 @@
#include <gui/Surface.h>
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
+#include <dlfcn.h>
#include "android_util_Binder.h"
// ----------------------------------------------------------------------------
@@ -137,6 +138,153 @@
}
}
+
+static const char *EXTMEDIAJNI_LIB_NAME = "libextmedia_jni.so";
+static const char *kCreateJNIExtMediaPlayerListener = "CreateJNIExtMediaPlayerListener";
+static const char *kCheckExtMedia = "checkExtMedia";
+static const char *kCreateNativeQCMediaPlayer = "CreateNativeQCMediaPlayer";
+typedef MediaPlayerListener* (*CreateJNIExtMediaPlayerListenerFn)(JNIEnv *, jobject, jobject, sp<MediaPlayerListener> listener);
+typedef bool (*CheckExtMediaFn)(JNIEnv *env, jobject);
+typedef MediaPlayer* (*CreateNativeQCMediaPlayerFn)();
+
+
+
+class JNIMediaPlayerFactory {
+ public:
+ JNIMediaPlayerFactory() {};
+ static bool CheckAndCreateExtMediaPlayer(JNIEnv *env, jobject thiz, jobject weak_this, sp<MediaPlayerListener> &listener, sp<MediaPlayer> &mp);
+ private:
+ static void *mLibHandle;
+ static void loadLib();
+
+ static CreateJNIExtMediaPlayerListenerFn loadJNIExtMediaPlayerListener();
+ static CreateJNIExtMediaPlayerListenerFn sExtDashListnerFnPtr;
+
+ static CheckExtMediaFn sExtMediaFn;
+ static CheckExtMediaFn loadExtMedia();
+
+ static CreateNativeQCMediaPlayerFn sNativeQCMediaPlayerFn;
+ static CreateNativeQCMediaPlayerFn loadNativeQCMediaPlayer();
+
+ static sp<MediaPlayerListener> createExtMediaPlayerListener(JNIEnv *env, jobject thiz, jobject weak_this, sp<MediaPlayerListener> listener);
+ static bool checkExtMedia(JNIEnv *env, jobject thiz);
+ static void CreateNativeQCMediaPlayer(sp<MediaPlayer> &mp);
+};
+
+void *JNIMediaPlayerFactory::mLibHandle = NULL;
+
+CreateJNIExtMediaPlayerListenerFn JNIMediaPlayerFactory::sExtDashListnerFnPtr =
+ JNIMediaPlayerFactory::loadJNIExtMediaPlayerListener();
+
+CheckExtMediaFn JNIMediaPlayerFactory::sExtMediaFn =
+ JNIMediaPlayerFactory::loadExtMedia();
+
+CreateNativeQCMediaPlayerFn JNIMediaPlayerFactory::sNativeQCMediaPlayerFn =
+ JNIMediaPlayerFactory::loadNativeQCMediaPlayer();
+
+
+void JNIMediaPlayerFactory::loadLib()
+{
+ if (!mLibHandle) {
+ mLibHandle = ::dlopen(EXTMEDIAJNI_LIB_NAME, RTLD_LAZY);
+ if (!mLibHandle) {
+ ALOGV("%s", dlerror());
+ return;
+ }
+ ALOGV("Opened %s", EXTMEDIAJNI_LIB_NAME);
+ }
+}
+
+CreateJNIExtMediaPlayerListenerFn JNIMediaPlayerFactory::loadJNIExtMediaPlayerListener()
+{
+ loadLib();
+ CreateJNIExtMediaPlayerListenerFn pCreateExtDashListnerFnPtr = NULL;
+ if (mLibHandle != NULL) {
+ pCreateExtDashListnerFnPtr = (CreateJNIExtMediaPlayerListenerFn)
+ dlsym(mLibHandle, kCreateJNIExtMediaPlayerListener);
+ if (pCreateExtDashListnerFnPtr == NULL) {
+ ALOGW("Failed to load symbol %s : %s", kCreateJNIExtMediaPlayerListener, dlerror());
+ }
+ }
+ return pCreateExtDashListnerFnPtr;
+}
+
+CheckExtMediaFn JNIMediaPlayerFactory::loadExtMedia()
+{
+ loadLib();
+ CheckExtMediaFn pCheckExtMediaFnPtr = NULL;
+ if (mLibHandle != NULL) {
+ pCheckExtMediaFnPtr = (CheckExtMediaFn)dlsym(mLibHandle, kCheckExtMedia);
+ if (pCheckExtMediaFnPtr == NULL) {
+ ALOGW("Failed to load symbol %s : %s", kCheckExtMedia, dlerror());
+ }
+ }
+ return pCheckExtMediaFnPtr;
+}
+
+CreateNativeQCMediaPlayerFn JNIMediaPlayerFactory::loadNativeQCMediaPlayer()
+{
+ loadLib();
+ CreateNativeQCMediaPlayerFn pCreateNativeQCMediaPlayerFnPtr = NULL;
+ if (mLibHandle != NULL) {
+ pCreateNativeQCMediaPlayerFnPtr = (CreateNativeQCMediaPlayerFn)
+ dlsym(mLibHandle, kCreateNativeQCMediaPlayer);
+ if (pCreateNativeQCMediaPlayerFnPtr == NULL) {
+ ALOGW("Failed to load symbol %s : %s", kCreateNativeQCMediaPlayer, dlerror());
+ }
+ }
+ return pCreateNativeQCMediaPlayerFnPtr;
+}
+
+
+sp<MediaPlayerListener> JNIMediaPlayerFactory::createExtMediaPlayerListener(JNIEnv *env, jobject thiz, jobject weak_this, sp<MediaPlayerListener> listener)
+{
+ if (checkExtMedia(env, thiz)) {
+ if (sExtDashListnerFnPtr ) {
+ listener = (*sExtDashListnerFnPtr)(env, thiz, weak_this, listener);
+ if (listener != NULL) {
+ ALOGE("JNIMediaPlayerFactory: createExtMediaPlayerListener : success");
+ }
+ }
+ }
+ return listener;
+}
+
+void JNIMediaPlayerFactory::CreateNativeQCMediaPlayer(sp<MediaPlayer> &mp)
+{
+ if (sNativeQCMediaPlayerFn) {
+ mp = (*sNativeQCMediaPlayerFn)();
+ if (mp != NULL) {
+ ALOGE("JNIMediaPlayerFactory: CreateNativeQCMediaPlayer : Success");
+ }
+ }
+}
+
+
+bool JNIMediaPlayerFactory::checkExtMedia(JNIEnv *env, jobject thiz)
+{
+ bool bIsQCMediaPlayerPresent = false;
+ if (sExtMediaFn) {
+ bIsQCMediaPlayerPresent = (*sExtMediaFn)(env, thiz);
+ }
+ ALOGE("JNIMediaPlayerFactory: bIsQCMediaPlayerPresent %d", bIsQCMediaPlayerPresent);
+ return bIsQCMediaPlayerPresent;
+}
+
+bool JNIMediaPlayerFactory::CheckAndCreateExtMediaPlayer(
+ JNIEnv *env, jobject thiz, jobject weak_this, sp<MediaPlayerListener> &listener, sp<MediaPlayer> &mp)
+{
+ bool bOk = false;
+ listener = createExtMediaPlayerListener(env, thiz, weak_this, listener);
+ if (listener != NULL && checkExtMedia(env,thiz)) {
+ CreateNativeQCMediaPlayer(mp);
+ if (mp != NULL) {
+ bOk = true;
+ }
+ }
+ return bOk;
+}
+
// ----------------------------------------------------------------------------
static sp<MediaPlayer> getMediaPlayer(JNIEnv* env, jobject thiz)
@@ -868,14 +1016,26 @@
android_media_MediaPlayer_native_setup(JNIEnv *env, jobject thiz, jobject weak_this)
{
ALOGV("native_setup");
- sp<MediaPlayer> mp = new MediaPlayer();
+
+ sp<MediaPlayer> mp = NULL;
+
+ bool bOk = false;
+ JNIMediaPlayerFactory *jniMediaPlayerFactory = new JNIMediaPlayerFactory();
+
+ sp<MediaPlayerListener> listener = new JNIMediaPlayerListener(env, thiz, weak_this);
+
+ if (jniMediaPlayerFactory) {
+ bOk = jniMediaPlayerFactory->CheckAndCreateExtMediaPlayer(env, thiz, weak_this, listener, mp);
+ delete(jniMediaPlayerFactory);
+ }
+
+ if (!bOk){
+ mp = new MediaPlayer();
+ }
if (mp == NULL) {
jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
return;
}
-
- // create new listener and give it to MediaPlayer
- sp<JNIMediaPlayerListener> listener = new JNIMediaPlayerListener(env, thiz, weak_this);
mp->setListener(listener);
// Stow our new C++ MediaPlayer in an opaque field in the Java object.
diff --git a/media/jni/android_media_MediaProfiles.cpp b/media/jni/android_media_MediaProfiles.cpp
index 5800043..c5ec2bc 100644
--- a/media/jni/android_media_MediaProfiles.cpp
+++ b/media/jni/android_media_MediaProfiles.cpp
@@ -170,7 +170,9 @@
(quality >= CAMCORDER_QUALITY_TIME_LAPSE_LIST_START &&
quality <= CAMCORDER_QUALITY_TIME_LAPSE_LIST_END) ||
(quality >= CAMCORDER_QUALITY_HIGH_SPEED_LIST_START &&
- quality <= CAMCORDER_QUALITY_HIGH_SPEED_LIST_END));
+ quality <= CAMCORDER_QUALITY_HIGH_SPEED_LIST_END) ||
+ (quality >= CAMCORDER_QUALITY_VENDOR_START &&
+ quality <= CAMCORDER_QUALITY_VENDOR_END));
}
static jobject
diff --git a/obex/javax/obex/ApplicationParameter.java b/obex/javax/obex/ApplicationParameter.java
index a62210f..16770a1a 100644
--- a/obex/javax/obex/ApplicationParameter.java
+++ b/obex/javax/obex/ApplicationParameter.java
@@ -55,7 +55,7 @@
public static final byte LISTSTARTOFFSET_TAGID = 0x05;
- public static final byte FILTER_TAGID = 0x06;
+ public static final byte PROPERTY_SELECTOR_TAGID = 0x06;
public static final byte FORMAT_TAGID = 0x07;
@@ -64,6 +64,20 @@
// only used in "mch" in response
public static final byte NEWMISSEDCALLS_TAGID = 0x09;
+
+ public static final byte SUPPORTEDFEATURE_TAGID = 0x10;
+
+ public static final byte PRIMARYVERSIONCOUNTER_TAGID = 0x0A;
+
+ public static final byte SECONDARYVERSIONCOUNTER_TAGID = 0x0B;
+
+ public static final byte VCARDSELECTOR_TAGID = 0x0C;
+
+ public static final byte DATABASEIDENTIFIER_TAGID = 0x0D;
+
+ public static final byte VCARDSELECTOROPERATOR_TAGID = 0x0E;
+
+ public static final byte RESET_NEW_MISSED_CALLS_TAGID = 0x0F;
}
public static class TRIPLET_VALUE {
@@ -99,13 +113,27 @@
public static final byte LISTSTARTOFFSET_LENGTH = 2;
- public static final byte FILTER_LENGTH = 8;
+ public static final byte PROPERTY_SELECTOR_LENGTH = 8;
public static final byte FORMAT_LENGTH = 1;
public static final byte PHONEBOOKSIZE_LENGTH = 2;
public static final byte NEWMISSEDCALLS_LENGTH = 1;
+
+ public static final byte SUPPORTEDFEATURE_LENGTH = 4;
+
+ public static final byte PRIMARYVERSIONCOUNTER_LENGTH = 16;
+
+ public static final byte SECONDARYVERSIONCOUNTER_LENGTH = 16;
+
+ public static final byte VCARDSELECTOR_LENGTH = 8;
+
+ public static final byte DATABASEIDENTIFIER_LENGTH = 16;
+
+ public static final byte VCARDSELECTOROPERATOR_LENGTH = 1;
+
+ public static final byte RESETNEWMISSEDCALLS_LENGTH = 1;
}
public ApplicationParameter() {
diff --git a/obex/javax/obex/ClientOperation.java b/obex/javax/obex/ClientOperation.java
old mode 100644
new mode 100755
index b65598c..509ff24
--- a/obex/javax/obex/ClientOperation.java
+++ b/obex/javax/obex/ClientOperation.java
@@ -52,7 +52,7 @@
private static final String TAG = "ClientOperation";
- private static final boolean V = ObexHelper.VDBG;
+ private static final boolean V = Log.isLoggable(ObexHelper.LOG_TAG, Log.VERBOSE);
private ClientSession mParent;
diff --git a/obex/javax/obex/ClientSession.java b/obex/javax/obex/ClientSession.java
old mode 100644
new mode 100755
index 272a920..111ab7f
--- a/obex/javax/obex/ClientSession.java
+++ b/obex/javax/obex/ClientSession.java
@@ -48,6 +48,7 @@
public final class ClientSession extends ObexSession {
private static final String TAG = "ClientSession";
+ private static final boolean V = Log.isLoggable(ObexHelper.LOG_TAG, Log.VERBOSE);
private boolean mOpen;
diff --git a/obex/javax/obex/ObexHelper.java b/obex/javax/obex/ObexHelper.java
index fa50943..febf365 100644
--- a/obex/javax/obex/ObexHelper.java
+++ b/obex/javax/obex/ObexHelper.java
@@ -52,7 +52,8 @@
public final class ObexHelper {
private static final String TAG = "ObexHelper";
- public static final boolean VDBG = false;
+ public static final String LOG_TAG = "BluetoothObex";
+ public static final boolean VDBG = Log.isLoggable(LOG_TAG, Log.VERBOSE);
/**
* Defines the basic packet length used by OBEX. Every OBEX packet has the
* same basic format:<BR>
@@ -80,12 +81,17 @@
// The minimum allowed max packet size is 255 according to the OBEX specification
public static final int LOWER_LIMIT_MAX_PACKET_SIZE = 255;
+ // The length of OBEX Byte Sequency Header Id according to the OBEX specification
+ public static final int OBEX_BYTE_SEQ_HEADER_LEN = 0x03;
+
/**
* Temporary workaround to be able to push files to Windows 7.
* TODO: Should be removed as soon as Microsoft updates their driver.
*/
public static final int MAX_CLIENT_PACKET_SIZE = 0xFC00;
+ public static final int A2DP_SCO_OBEX_MAX_CLIENT_PACKET_SIZE = 0x2000;
+
public static final int OBEX_OPCODE_FINAL_BIT_MASK = 0x80;
public static final int OBEX_OPCODE_CONNECT = 0x80;
@@ -190,6 +196,7 @@
try {
while (index < headerArray.length) {
headerID = 0xFF & headerArray[index];
+ if (VDBG) Log.v(TAG,"updateHeaderSet headerID = " + headerID);
switch (headerID & (0xC0)) {
/*
@@ -205,12 +212,15 @@
case 0x40:
boolean trimTail = true;
index++;
- length = 0xFF & headerArray[index];
- length = length << 8;
- index++;
- length += 0xFF & headerArray[index];
- length -= 3;
- index++;
+ length = ((0xFF & headerArray[index]) << 8) +
+ (0xFF & headerArray[index + 1]);
+ index += 2;
+ if (length <= OBEX_BYTE_SEQ_HEADER_LEN) {
+ Log.e(TAG, "Remote sent an OBEX packet with " +
+ "incorrect header length = " + length);
+ break;
+ }
+ length -= OBEX_BYTE_SEQ_HEADER_LEN;
value = new byte[length];
System.arraycopy(headerArray, index, value, 0, length);
if (length == 0 || (length > 0 && (value[length - 1] != 0))) {
@@ -375,8 +385,9 @@
* Determine if there is a connection ID to send. If there is,
* then it should be the first header in the packet.
*/
+ if (VDBG) Log.v(TAG,"createHeader = " + head);
if ((headImpl.mConnectionID != null) && (headImpl.getHeader(HeaderSet.TARGET) == null)) {
-
+ if (VDBG) Log.v(TAG," Add Header = " + HeaderSet.CONNECTION_ID);
out.write((byte)HeaderSet.CONNECTION_ID);
out.write(headImpl.mConnectionID);
}
@@ -384,6 +395,7 @@
// Count Header
intHeader = (Long)headImpl.getHeader(HeaderSet.COUNT);
if (intHeader != null) {
+ if (VDBG) Log.v(TAG," Add Header = " + HeaderSet.COUNT);
out.write((byte)HeaderSet.COUNT);
value = ObexHelper.convertToByteArray(intHeader.longValue());
out.write(value);
@@ -395,6 +407,7 @@
// Name Header
stringHeader = (String)headImpl.getHeader(HeaderSet.NAME);
if (stringHeader != null) {
+ if (VDBG) Log.v(TAG," Add Header = " + HeaderSet.NAME);
out.write((byte)HeaderSet.NAME);
value = ObexHelper.convertToUnicodeByteArray(stringHeader);
length = value.length + 3;
@@ -415,6 +428,7 @@
// Type Header
stringHeader = (String)headImpl.getHeader(HeaderSet.TYPE);
if (stringHeader != null) {
+ if (VDBG) Log.v(TAG," Add Header = " + HeaderSet.TYPE);
out.write((byte)HeaderSet.TYPE);
try {
value = stringHeader.getBytes("ISO8859_1");
@@ -436,6 +450,7 @@
// Length Header
intHeader = (Long)headImpl.getHeader(HeaderSet.LENGTH);
if (intHeader != null) {
+ if (VDBG) Log.v(TAG," Add Header = " + HeaderSet.LENGTH);
out.write((byte)HeaderSet.LENGTH);
value = ObexHelper.convertToByteArray(intHeader.longValue());
out.write(value);
@@ -447,7 +462,7 @@
// Time ISO Header
dateHeader = (Calendar)headImpl.getHeader(HeaderSet.TIME_ISO_8601);
if (dateHeader != null) {
-
+ if (VDBG) Log.v(TAG," Add dateHeader = " + HeaderSet.TIME_ISO_8601);
/*
* The ISO Header should take the form YYYYMMDDTHHMMSSZ. The
* 'Z' will only be included if it is a UTC time.
@@ -509,6 +524,7 @@
// Time 4 Byte Header
dateHeader = (Calendar)headImpl.getHeader(HeaderSet.TIME_4_BYTE);
if (dateHeader != null) {
+ if (VDBG) Log.v(TAG," Add dateHeader = " + HeaderSet.TIME_4_BYTE);
out.write(HeaderSet.TIME_4_BYTE);
/*
@@ -543,6 +559,7 @@
// Target Header
value = (byte[])headImpl.getHeader(HeaderSet.TARGET);
if (value != null) {
+ if (VDBG) Log.v(TAG," Add Header = " + HeaderSet.TARGET);
out.write((byte)HeaderSet.TARGET);
length = value.length + 3;
lengthArray[0] = (byte)(255 & (length >> 8));
@@ -571,6 +588,7 @@
// Who Header
value = (byte[])headImpl.getHeader(HeaderSet.WHO);
if (value != null) {
+ if (VDBG) Log.v(TAG," Add Header = " + HeaderSet.WHO);
out.write((byte)HeaderSet.WHO);
length = value.length + 3;
lengthArray[0] = (byte)(255 & (length >> 8));
@@ -582,9 +600,10 @@
}
}
- // Connection ID Header
+ // Application Parameter Header
value = (byte[])headImpl.getHeader(HeaderSet.APPLICATION_PARAMETER);
if (value != null) {
+ if (VDBG) Log.v(TAG," Add APP PARAM Header = " + HeaderSet.APPLICATION_PARAMETER);
out.write((byte)HeaderSet.APPLICATION_PARAMETER);
length = value.length + 3;
lengthArray[0] = (byte)(255 & (length >> 8));
@@ -623,6 +642,7 @@
lengthArray[1] = (byte)(255 & length);
out.write(lengthArray);
out.write(value);
+ if (VDBG) Log.v(TAG," Add Unicode String value = " + value);
if (nullOut) {
headImpl.setHeader(i + 0x30, null);
}
@@ -637,6 +657,7 @@
lengthArray[1] = (byte)(255 & length);
out.write(lengthArray);
out.write(value);
+ if (VDBG) Log.v(TAG," Add ByteSeq value = " + value);
if (nullOut) {
headImpl.setHeader(i + 0x70, null);
}
@@ -647,6 +668,7 @@
if (byteHeader != null) {
out.write((byte)i + 0xB0);
out.write(byteHeader.byteValue());
+ if (VDBG) Log.v(TAG," Add ByteHeader value = " + byteHeader.byteValue());
if (nullOut) {
headImpl.setHeader(i + 0xB0, null);
}
@@ -657,6 +679,7 @@
if (intHeader != null) {
out.write((byte)i + 0xF0);
out.write(ObexHelper.convertToByteArray(intHeader.longValue()));
+ if (VDBG) Log.v(TAG," Add Int value = " + intHeader.longValue());
if (nullOut) {
headImpl.setHeader(i + 0xF0, null);
}
@@ -671,6 +694,7 @@
lengthArray[1] = (byte)(255 & length);
out.write(lengthArray);
out.write(headImpl.mAuthChall);
+ if (VDBG) Log.v(TAG," Add mAuthChall value = " + headImpl.mAuthChall);
if (nullOut) {
headImpl.mAuthChall = null;
}
@@ -684,6 +708,7 @@
lengthArray[1] = (byte)(255 & length);
out.write(lengthArray);
out.write(headImpl.mAuthResp);
+ if (VDBG) Log.v(TAG," Add mAuthChall value = " + headImpl.mAuthResp);
if (nullOut) {
headImpl.mAuthResp = null;
}
@@ -699,8 +724,10 @@
// Add the SRM header
byteHeader = (Byte)headImpl.getHeader(HeaderSet.SINGLE_RESPONSE_MODE);
if (byteHeader != null) {
+ if (VDBG) Log.v(TAG," Add SRM Header = " + HeaderSet.SINGLE_RESPONSE_MODE);
out.write((byte)HeaderSet.SINGLE_RESPONSE_MODE);
out.write(byteHeader.byteValue());
+ if (VDBG) Log.v(TAG," Add SRM value = " + byteHeader.byteValue());
if (nullOut) {
headImpl.setHeader(HeaderSet.SINGLE_RESPONSE_MODE, null);
}
@@ -709,6 +736,7 @@
// Add the SRM parameter header
byteHeader = (Byte)headImpl.getHeader(HeaderSet.SINGLE_RESPONSE_MODE_PARAMETER);
if (byteHeader != null) {
+ if (VDBG) Log.v(TAG," Add Header = " + HeaderSet.SINGLE_RESPONSE_MODE_PARAMETER);
out.write((byte)HeaderSet.SINGLE_RESPONSE_MODE_PARAMETER);
out.write(byteHeader.byteValue());
if (nullOut) {
diff --git a/obex/javax/obex/ObexSession.java b/obex/javax/obex/ObexSession.java
old mode 100644
new mode 100755
index 542b9c8..f5e607c
--- a/obex/javax/obex/ObexSession.java
+++ b/obex/javax/obex/ObexSession.java
@@ -50,7 +50,7 @@
public class ObexSession {
private static final String TAG = "ObexSession";
- private static final boolean V = ObexHelper.VDBG;
+ private static final boolean V = Log.isLoggable(ObexHelper.LOG_TAG, Log.VERBOSE);
protected Authenticator mAuthenticator;
diff --git a/obex/javax/obex/ServerOperation.java b/obex/javax/obex/ServerOperation.java
old mode 100644
new mode 100755
index 56a675a..87943bf
--- a/obex/javax/obex/ServerOperation.java
+++ b/obex/javax/obex/ServerOperation.java
@@ -59,7 +59,7 @@
private static final String TAG = "ServerOperation";
- private static final boolean V = ObexHelper.VDBG; // Verbose debugging
+ private static final boolean V = Log.isLoggable(ObexHelper.LOG_TAG, Log.VERBOSE);
public boolean isAborted;
@@ -124,6 +124,7 @@
*/
public ServerOperation(ServerSession p, InputStream in, int request, int maxSize,
ServerRequestHandler listen) throws IOException {
+ if (V) Log.v(TAG, "ServerOperation");
isAborted = false;
mParent = p;
@@ -195,7 +196,12 @@
if(!handleObexPacket(packet)) {
return;
}
- if (!mHasBody) {
+ /* Don't Pre-Send continue when Remote requested for SRM
+ * Let the Application confirm.
+ */
+ if(V) Log.v(TAG, "Get App confirmation if SRM ENABLED case: " + mSrmEnabled
+ + " not hasBody case: " + mHasBody);
+ if (!mHasBody && !mSrmEnabled) {
while ((!mGetOperation) && (!finalBitSet)) {
sendReply(ResponseCodes.OBEX_HTTP_CONTINUE);
if (mPrivateInput.available() > 0) {
@@ -204,8 +210,13 @@
}
}
}
-
- while ((!mGetOperation) && (!finalBitSet) && (mPrivateInput.available() == 0)) {
+ /* Don't Pre-Send continue when Remote requested for SRM
+ * Let the Application confirm.
+ */
+ if(V) Log.v(TAG, "Get App confirmation if SRM ENABLED case: " + mSrmEnabled
+ + " not finalPacket: " + finalBitSet + " not GETOp Case: " + mGetOperation);
+ while ((!mSrmEnabled) && (!mGetOperation) && (!finalBitSet)
+ && (mPrivateInput.available() == 0)) {
sendReply(ResponseCodes.OBEX_HTTP_CONTINUE);
if (mPrivateInput.available() > 0) {
break;
@@ -330,14 +341,17 @@
*/
public synchronized boolean continueOperation(boolean sendEmpty, boolean inStream)
throws IOException {
+ if (V) Log.v(TAG, "continueOperation");
if (!mGetOperation) {
if (!finalBitSet) {
if (sendEmpty) {
sendReply(ResponseCodes.OBEX_HTTP_CONTINUE);
+ if (V) Log.v(TAG, "continueOperation:ServerSet SRM sendEmpty clause");
return true;
} else {
if ((mResponseSize > 3) || (mPrivateOutput.size() > 0)) {
sendReply(ResponseCodes.OBEX_HTTP_CONTINUE);
+ if (V) Log.v(TAG, "continueOperation: Server setting SRM");
return true;
} else {
return false;
@@ -347,6 +361,7 @@
return false;
}
} else {
+ if (V) Log.v(TAG, "Get continueOperation ");
sendReply(ResponseCodes.OBEX_HTTP_CONTINUE);
return true;
}
@@ -395,6 +410,8 @@
bodyLength = mPrivateOutput.size();
orginalBodyLength = bodyLength;
}
+ if(V)Log.v(TAG, "mMaxPcKLen : " + mMaxPacketLength);
+ if(V)Log.v(TAG, "headerArryLen : " + headerArray.length);
if ((ObexHelper.BASE_PACKET_LENGTH + headerArray.length) > mMaxPacketLength) {
diff --git a/obex/javax/obex/ServerSession.java b/obex/javax/obex/ServerSession.java
index acee5dd..cc54451 100644
--- a/obex/javax/obex/ServerSession.java
+++ b/obex/javax/obex/ServerSession.java
@@ -47,7 +47,7 @@
public final class ServerSession extends ObexSession implements Runnable {
private static final String TAG = "Obex ServerSession";
- private static final boolean V = ObexHelper.VDBG;
+ private static final boolean V = Log.isLoggable(ObexHelper.LOG_TAG, Log.VERBOSE);
private ObexTransport mTransport;
@@ -63,6 +63,12 @@
private boolean mClosed;
+ private boolean setMTU = false;
+
+ private boolean updateMtu = false;
+
+ private int updatedMtuSize = 0;
+
/**
* Creates new ServerSession.
* @param trans the connection to the client
@@ -85,6 +91,25 @@
mProcessThread.start();
}
+ public void setMaxPacketSize(int size) {
+ if (V) Log.v(TAG, "setMaxPacketSize" + size);
+ mMaxPacketLength = size;
+ }
+
+ public int getMaxPacketSize() {
+ return mMaxPacketLength;
+ }
+
+ public void reduceMTU(boolean enable) {
+ setMTU = enable;
+ }
+
+ public void updateMTU(int mtuSize) {
+ updateMtu = true;
+ updatedMtuSize = mtuSize;
+ Log.i(TAG,"updateMTU: " + mtuSize);
+ }
+
/**
* Processes requests made to the server and forwards them to the
* appropriate event listener.
@@ -104,7 +129,6 @@
case ObexHelper.OBEX_OPCODE_DISCONNECT:
handleDisconnectRequest();
- done = true;
break;
case ObexHelper.OBEX_OPCODE_GET:
@@ -125,6 +149,7 @@
break;
case -1:
+ Log.v(TAG, "Read request returned -1, exiting from loop");
done = true;
break;
@@ -175,7 +200,7 @@
mInput.read();
}
code = mListener.onAbort(request, reply);
- Log.v(TAG, "onAbort request handler return value- " + code);
+ Log.d(TAG, "onAbort request handler return value- " + code);
code = validateResponseCode(code);
}
sendResponse(code, null);
@@ -195,6 +220,7 @@
* @throws IOException if an error occurred at the transport layer
*/
private void handlePutRequest(int type) throws IOException {
+ if (V) Log.v(TAG, "handlePutRequest");
ServerOperation op = new ServerOperation(this, mInput, type, mMaxPacketLength, mListener);
try {
int response = -1;
@@ -206,10 +232,12 @@
response = validateResponseCode(mListener.onPut(op));
}
if (response != ResponseCodes.OBEX_HTTP_OK && !op.isAborted) {
+ if (V) Log.v(TAG, "handlePutRequest pre != HTTP_OK sendReply");
op.sendReply(response);
} else if (!op.isAborted) {
// wait for the final bit
while (!op.finalBitSet) {
+ if (V) Log.v(TAG, "handlePutRequest pre looped sendReply");
op.sendReply(ResponseCodes.OBEX_HTTP_CONTINUE);
}
op.sendReply(response);
@@ -220,7 +248,7 @@
*internal error should not be sent because server has already replied with
*OK response in "sendReply")
*/
- if(V) Log.d(TAG,"Exception occured - sending OBEX_HTTP_INTERNAL_ERROR reply",e);
+ if(V) Log.w(TAG,"Exception occured - sending OBEX_HTTP_INTERNAL_ERROR reply",e);
if (!op.isAborted) {
sendResponse(ResponseCodes.OBEX_HTTP_INTERNAL_ERROR, null);
}
@@ -241,6 +269,7 @@
* @throws IOException if an error occurred at the transport layer
*/
private void handleGetRequest(int type) throws IOException {
+ if (V) Log.v(TAG, "handleGetRequest");
ServerOperation op = new ServerOperation(this, mInput, type, mMaxPacketLength, mListener);
try {
int response = validateResponseCode(mListener.onGet(op));
@@ -263,6 +292,7 @@
public void sendResponse(int code, byte[] header) throws IOException {
int totalLength = 3;
byte[] data = null;
+ if (V) Log.v(TAG,"sendResponse code " + code + " header : " + header);
OutputStream op = mOutput;
if (op == null) {
return;
@@ -270,6 +300,7 @@
if (header != null) {
totalLength += header.length;
+ if (V) Log.v(TAG, "header != null totalLength = " + totalLength);
data = new byte[totalLength];
data[0] = (byte)code;
data[1] = (byte)(totalLength >> 8);
@@ -559,9 +590,16 @@
+ " MaxLength: " + mMaxPacketLength + " flags: " + flags);
// should we check it?
- if (mMaxPacketLength > ObexHelper.MAX_PACKET_SIZE_INT) {
+ if (setMTU) {
+ mMaxPacketLength = ObexHelper.A2DP_SCO_OBEX_MAX_CLIENT_PACKET_SIZE;
+ setMTU = false;
+ } else if (updateMtu) {
+ mMaxPacketLength = updatedMtuSize;
+ updateMtu = false;
+ } else if (mMaxPacketLength > ObexHelper.MAX_PACKET_SIZE_INT) {
mMaxPacketLength = ObexHelper.MAX_PACKET_SIZE_INT;
}
+ Log.d(TAG,"handleConnectRequest() - Updated MaxPacketLengh: " + mMaxPacketLength);
if(mMaxPacketLength > ObexHelper.getMaxTxPacketSize(mTransport)) {
Log.w(TAG, "Requested MaxObexPacketSize " + mMaxPacketLength
@@ -658,6 +696,12 @@
*/
byte[] sendData = new byte[totalLength];
int maxRxLength = ObexHelper.getMaxRxPacketSize(mTransport);
+ //PTS expects least of maxPacketLen
+ if(maxRxLength > mMaxPacketLength) {
+ if(V) Log.v(TAG,"Set maxRxLength to min of maxRxServrLen:" + maxRxLength +
+ " and MaxNegotiated from Client: " + mMaxPacketLength);
+ maxRxLength = mMaxPacketLength;
+ }
sendData[0] = (byte)code;
sendData[1] = length[2];
sendData[2] = length[3];
diff --git a/packages/BackupRestoreConfirmation/AndroidManifest.xml b/packages/BackupRestoreConfirmation/AndroidManifest.xml
old mode 100644
new mode 100755
index 8141fa7..db8ebc1
--- a/packages/BackupRestoreConfirmation/AndroidManifest.xml
+++ b/packages/BackupRestoreConfirmation/AndroidManifest.xml
@@ -21,6 +21,7 @@
<uses-permission android:name="android.permission.BACKUP" />
<uses-permission android:name="android.permission.CRYPT_KEEPER" />
+ <uses-permission android:name="android.permission.STORAGE_INTERNAL"/>
<application android:allowClearUserData="false"
android:allowBackup="false"
diff --git a/packages/DocumentsUI/src/com/android/documentsui/NavigationView.java b/packages/DocumentsUI/src/com/android/documentsui/NavigationView.java
index 3373c23..4b8325f 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/NavigationView.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/NavigationView.java
@@ -180,6 +180,9 @@
@Override
public DocumentInfo getItem(int position) {
+ if((mState.stack.size() - position - 1) < 0) {
+ return null;
+ }
return mState.stack.get(mState.stack.size() - position - 1);
}
@@ -202,7 +205,9 @@
final RootInfo root = mEnv.getCurrentRoot();
title.setText(root.title);
} else {
- title.setText(doc.displayName);
+ if (doc != null) {
+ title.setText(doc.displayName);
+ }
}
return convertView;
diff --git a/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java b/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
index 8a6723f..b333e45 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/dirlist/DirectoryFragment.java
@@ -846,7 +846,9 @@
private void deleteDocuments(final Selection selected) {
Metrics.logUserAction(getContext(), Metrics.USER_ACTION_DELETE);
- assert(!selected.isEmpty());
+ if (selected.isEmpty()) {
+ return;
+ }
final DocumentInfo srcParent = getDisplayState().stack.peek();
diff --git a/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java b/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java
index f274df3..5a80194 100644
--- a/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java
+++ b/packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java
@@ -307,7 +307,11 @@
}
}
});
- mView.smoothScrollToPosition(pos);
+ try {
+ mView.smoothScrollToPosition(pos);
+ } catch(IllegalArgumentException e) {
+ Log.w(TAG, "Invalid target position :" + pos, e);
+ }
}
}
diff --git a/packages/Keyguard/res/drawable/ic_battery.xml b/packages/Keyguard/res/drawable/ic_battery.xml
new file mode 100644
index 0000000..c8c454b
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<level-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:drawable="@drawable/ic_battery_critical"
+ android:maxLevel="5" />
+ <item
+ android:drawable="@drawable/ic_battery_low"
+ android:maxLevel="15" />
+ <item
+ android:drawable="@drawable/ic_battery_20"
+ android:maxLevel="25" />
+ <item
+ android:drawable="@drawable/ic_battery_30"
+ android:maxLevel="40" />
+ <item
+ android:drawable="@drawable/ic_battery_50"
+ android:maxLevel="55" />
+ <item
+ android:drawable="@drawable/ic_battery_60"
+ android:maxLevel="70" />
+ <item
+ android:drawable="@drawable/ic_battery_80"
+ android:maxLevel="85" />
+ <item
+ android:drawable="@drawable/ic_battery_90"
+ android:maxLevel="95" />
+ <item
+ android:drawable="@drawable/ic_battery_100"
+ android:maxLevel="100" />
+</level-list>
diff --git a/packages/Keyguard/res/drawable/ic_battery_100.xml b/packages/Keyguard/res/drawable/ic_battery_100.xml
new file mode 100644
index 0000000..ade37cf
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_100.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.985,4.305l0,-2.305l-5.971,0l0,2.305l-2.987,0l0,17.695l11.945,0l0,-17.695z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_20.xml b/packages/Keyguard/res/drawable/ic_battery_20.xml
new file mode 100644
index 0000000..817c0a3
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_20.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.985,4.305l0,-2.305l-5.971,0l0,2.305l-2.987,0l0,17.695l11.945,0l0,-17.695z" />
+ <path
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M6.027,18.2h11.944v3.8h-11.944z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_30.xml b/packages/Keyguard/res/drawable/ic_battery_30.xml
new file mode 100644
index 0000000..8a7429fb
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_30.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.985,4.305l0,-2.305l-5.971,0l0,2.305l-2.987,0l0,17.695l11.945,0l0,-17.695z" />
+ <path
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M6.027,16.3h11.944v5.7h-11.944z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_50.xml b/packages/Keyguard/res/drawable/ic_battery_50.xml
new file mode 100644
index 0000000..b7e1c35
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_50.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.985,4.305l0,-2.305l-5.971,0l0,2.305l-2.987,0l0,17.695l11.945,0l0,-17.695z" />
+ <path
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M6.027,12.5h11.944v9.5h-11.944z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_60.xml b/packages/Keyguard/res/drawable/ic_battery_60.xml
new file mode 100644
index 0000000..811a02a
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_60.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.985,4.305l0,-2.305l-5.971,0l0,2.305l-2.987,0l0,17.695l11.945,0l0,-17.695z" />
+ <path
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M6.027,10.6h11.944v11.4h-11.944z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_80.xml b/packages/Keyguard/res/drawable/ic_battery_80.xml
new file mode 100644
index 0000000..a97dff5
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_80.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.985,4.305l0,-2.305l-5.971,0l0,2.305l-2.987,0l0,17.695l11.945,0l0,-17.695z" />
+ <path
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M6.027,6.8h11.944v15.2h-11.944z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_90.xml b/packages/Keyguard/res/drawable/ic_battery_90.xml
new file mode 100644
index 0000000..69fdcad
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_90.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.985,4.305l0,-2.305l-5.971,0l0,2.305l-2.987,0l0,17.695l11.945,0l0,-17.695z" />
+ <path
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M6.027,4.9h11.944v17.1h-11.944z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_charging.xml b/packages/Keyguard/res/drawable/ic_battery_charging.xml
new file mode 100644
index 0000000..61f76e1
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_charging.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<level-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:drawable="@drawable/ic_battery_charging_critical"
+ android:maxLevel="5" />
+ <item
+ android:drawable="@drawable/ic_battery_charging_low"
+ android:maxLevel="15" />
+ <item
+ android:drawable="@drawable/ic_battery_charging_20"
+ android:maxLevel="25" />
+ <item
+ android:drawable="@drawable/ic_battery_charging_30"
+ android:maxLevel="40" />
+ <item
+ android:drawable="@drawable/ic_battery_charging_50"
+ android:maxLevel="55" />
+ <item
+ android:drawable="@drawable/ic_battery_charging_60"
+ android:maxLevel="70" />
+ <item
+ android:drawable="@drawable/ic_battery_charging_80"
+ android:maxLevel="85" />
+ <item
+ android:drawable="@drawable/ic_battery_charging_90"
+ android:maxLevel="99" />
+ <item
+ android:drawable="@drawable/ic_battery_charging_100"
+ android:maxLevel="100" />
+</level-list>
diff --git a/packages/Keyguard/res/drawable/ic_battery_charging_100.xml b/packages/Keyguard/res/drawable/ic_battery_charging_100.xml
new file mode 100644
index 0000000..2ee8326
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_charging_100.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillColor="@color/battery_charged_fp"
+ android:pathData="M14.985,4.305l0,-2.305l-5.971,0l0,2.305l-2.987,0l0,17.695l11.945,0l0,-17.695zM10.049,16.906l-2.59,-2.59 1.352,-1.352 1.238,1.24 5.24,-5.238 1.352,1.352 -6.592,6.588z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_charging_20.xml b/packages/Keyguard/res/drawable/ic_battery_charging_20.xml
new file mode 100644
index 0000000..c850572
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_charging_20.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.984,4.305l0,-2.305l-5.97,0l0,2.305l-2.987,0l0,13.895l4.483,0l1.129,-4.274l-3.482,0l5.657,-8.179l-1.626,6.17l3.481,0l-4.347,6.283l6.649,0l0.002,-13.895z" />
+ <path
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M11.322,18.2l-1.313,1.898l0.501,-1.898l-4.483,0l0,3.8l11.944,0l0,-3.8z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_charging_30.xml b/packages/Keyguard/res/drawable/ic_battery_charging_30.xml
new file mode 100644
index 0000000..ced14d49
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_charging_30.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.984,4.305l0,-2.305l-5.97,0l0,2.305l-2.987,0l0,11.995l4.985,0l0.627,-2.374l-3.482,0l5.657,-8.179l-1.626,6.17l3.481,0l-3.032,4.383l5.334,0l0.002,-11.995z" />
+ <path
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M12.637,16.3l-2.628,3.798l1.003,-3.798l-4.985,0l0,5.7l11.944,0l0,-5.7z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_charging_50.xml b/packages/Keyguard/res/drawable/ic_battery_charging_50.xml
new file mode 100644
index 0000000..d8aec48
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_charging_50.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.984,4.305l0,-2.305l-5.97,0l0,2.305l-2.987,0l0,8.195l3.117,0l4.67,-6.753l-1.626,6.17l3.481,0l-0.403,0.583l2.705,0l0.002,-8.195z" />
+ <path
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M15.266,12.5l-5.257,7.598l1.63,-6.172l-3.482,0l0.987,-1.426l-3.117,0l0,9.5l11.944,0l0,-9.5z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_charging_60.xml b/packages/Keyguard/res/drawable/ic_battery_charging_60.xml
new file mode 100644
index 0000000..9255473
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_charging_60.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.984,4.305l0,-2.305l-5.97,0l0,2.305l-2.987,0l0,6.295l4.431,0l3.356,-4.853l-1.279,4.853l5.436,0l0.002,-6.295z" />
+ <path
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M12.535,10.6l-0.347,1.317l3.481,0l-5.66,8.181l1.63,-6.172l-3.482,0l2.301,-3.326l-4.431,0l0,11.4l11.944,0l0,-11.4z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_charging_80.xml b/packages/Keyguard/res/drawable/ic_battery_charging_80.xml
new file mode 100644
index 0000000..7d164b6
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_charging_80.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.984,4.305l0,-2.305l-5.97,0l0,2.305l-2.987,0l0,2.495l7.06,0l0.727,-1.053l-0.277,1.053l4.434,0l0.002,-2.495z" />
+ <path
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M13.537,6.8l-1.349,5.117l3.481,0l-5.66,8.181l1.63,-6.172l-3.482,0l4.93,-7.126l-7.06,0l0,15.2l11.944,0l0,-15.2z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_charging_90.xml b/packages/Keyguard/res/drawable/ic_battery_charging_90.xml
new file mode 100644
index 0000000..951a9041
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_charging_90.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.984,4.305l0,-2.305l-5.97,0l0,2.305l-2.987,0l0,0.595l11.944,0l0.002,-0.595z" />
+ <path
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="m6.027,4.9v17.1h11.944v-17.1h-11.944zM10.009,20.098l1.63,-6.172h-3.482l5.657,-8.179 -1.627,6.171h3.481l-5.659,8.18z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_charging_critical.xml b/packages/Keyguard/res/drawable/ic_battery_charging_critical.xml
new file mode 100644
index 0000000..7cffa2f
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_charging_critical.xml
@@ -0,0 +1,10 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="m6.028,20.1 l11.945,0 0,1.9 -11.945,0zM14.986,4.305l0,-2.305 -5.97,0 0,2.306 -2.988,0 0,15.794 11.945,0 0,-15.795 -2.987,0zM10.008,20.098 L11.639,13.926 8.156,13.926 13.814,5.747 12.188,11.918 15.668,11.918 10.008,20.098z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_charging_low.xml b/packages/Keyguard/res/drawable/ic_battery_charging_low.xml
new file mode 100644
index 0000000..26155ac
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_charging_low.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.985,4.305l0,-2.305l-5.971,0l0,2.305l-2.987,0l0,17.695l11.945,0l0,-17.695zM10.008,20.098l1.631,-6.172h-3.483l5.658,-8.179 -1.626,6.171h3.48l-5.66,8.18z" />
+ <path
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M6.028,20.1h11.945v1.9h-11.945z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_critical.xml b/packages/Keyguard/res/drawable/ic_battery_critical.xml
new file mode 100644
index 0000000..52ecb0d
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_critical.xml
@@ -0,0 +1,9 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillColor="@color/battery_critical_fp"
+ android:pathData="M14.985,4.305l0,-2.305l-5.971,0l0,2.305l-2.987,0l0,17.695l11.945,0l0,-17.695zM11.072,7.438h1.91l-0.002,6.586h-1.91l0.002,-6.586zM12.019,17.354c-0.543,0 -0.984,-0.442 -0.984,-0.99 0,-0.549 0.441,-0.992 0.984,-0.992 0.541,0 0.98,0.443 0.98,0.992 0.001,0.546 -0.439,0.99 -0.98,0.99z" />
+</vector>
diff --git a/packages/Keyguard/res/drawable/ic_battery_low.xml b/packages/Keyguard/res/drawable/ic_battery_low.xml
new file mode 100644
index 0000000..9f7f9fa
--- /dev/null
+++ b/packages/Keyguard/res/drawable/ic_battery_low.xml
@@ -0,0 +1,13 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0">
+ <path
+ android:fillAlpha="0.4"
+ android:fillColor="@color/battery_regular_fp"
+ android:pathData="M14.985,4.305l0,-2.305l-5.971,0l0,2.305l-2.987,0l0,17.695l11.945,0l0,-17.695z" />
+ <path
+ android:fillColor="@color/battery_low_fp"
+ android:pathData="M6.027,20.1h11.944v1.9h-11.944z" />
+</vector>
diff --git a/packages/Keyguard/res/layout/keyguard_status_area.xml b/packages/Keyguard/res/layout/keyguard_status_area.xml
index 8fe2835..e57206f 100644
--- a/packages/Keyguard/res/layout/keyguard_status_area.xml
+++ b/packages/Keyguard/res/layout/keyguard_status_area.xml
@@ -24,27 +24,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
- android:gravity="center">
+ android:gravity="start">
<TextClock android:id="@+id/date_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/clock_white"
- style="@style/widget_label"
- android:textAllCaps="true"
- android:letterSpacing="0.15"
- android:gravity="center"
- />
- <TextView android:id="@+id/alarm_status"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:drawablePadding="6dp"
- android:drawableStart="@drawable/ic_access_alarms_big"
- android:textColor="@color/clock_gray"
- android:letterSpacing="0.15"
- android:textAllCaps="true"
- style="@style/widget_label"
- android:layout_marginStart="6dp"
- android:gravity="center"
- android:visibility="gone"
- />
+ style="@style/widget_small_regular_fp"
+ android:textAllCaps="true" />
+
</LinearLayout>
diff --git a/packages/Keyguard/res/layout/keyguard_status_view.xml b/packages/Keyguard/res/layout/keyguard_status_view.xml
index fc0b568..bc40725 100644
--- a/packages/Keyguard/res/layout/keyguard_status_view.xml
+++ b/packages/Keyguard/res/layout/keyguard_status_view.xml
@@ -18,48 +18,127 @@
-->
<!-- This is a view that shows general status information in Keyguard. -->
-<com.android.keyguard.KeyguardStatusView
- xmlns:android="http://schemas.android.com/apk/res/android"
+<com.android.keyguard.KeyguardStatusView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/res-auto"
android:id="@+id/keyguard_status_view"
- android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- androidprv:layout_maxWidth="@dimen/keyguard_security_width"
+ android:gravity="center_horizontal|top"
+ android:orientation="vertical"
androidprv:layout_maxHeight="@dimen/keyguard_security_height"
- android:gravity="center_horizontal|top">
+ androidprv:layout_maxWidth="@dimen/keyguard_security_width">
+
<LinearLayout
android:id="@+id/keyguard_clock_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal|top"
- android:orientation="vertical" >
+ android:layout_gravity="start|top"
+ android:orientation="vertical"
+ android:paddingEnd="24dp"
+ android:paddingStart="24dp">
+
+ <TextView
+ android:id="@+id/alarm_status"
+ style="@style/widget_small_regular_fp"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="-10dp"
+ android:drawablePadding="6dp"
+ android:drawableStart="@drawable/ic_access_alarms_big"
+ android:letterSpacing="0.15"
+ android:paddingStart="4dp"
+ android:textColor="@color/widget_lighter_color_fp"
+ android:visibility="gone" />
+
<TextClock
android:id="@+id/clock_view"
+ style="@style/widget_big_thin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:textColor="@color/clock_white"
- android:singleLine="true"
- style="@style/widget_big_thin"
+ android:layout_marginBottom="@dimen/bottom_text_spacing_digital"
android:format12Hour="@string/keyguard_widget_12_hours_format"
android:format24Hour="@string/keyguard_widget_24_hours_format"
- android:layout_marginBottom="@dimen/bottom_text_spacing_digital" />
+ android:includeFontPadding="false"
+ android:maxLines="1" />
- <include layout="@layout/keyguard_status_area" />
- <TextView
- android:id="@+id/owner_info"
- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
+ <TextClock
+ android:id="@+id/date_view"
+ style="@style/widget_small_regular_fp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/date_owner_info_margin"
+ android:layout_marginBottom="10dp"
+ android:letterSpacing="0.15"
+ android:paddingStart="4dp"
+ android:textColor="@color/widget_lighter_color_fp" />
+
+ <com.fairphone.keyguard.BatteryStatusView
+ android:id="@+id/battery_status_fp"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="start|center_vertical"
+ android:orientation="horizontal"
+ android:paddingStart="2dp">
+
+ <ImageView
+ android:id="@+id/battery_icon_fp"
+ android:layout_width="@dimen/battery_status_width_fp"
+ android:layout_height="@dimen/battery_status_height_fp"
+ android:paddingStart="-8sp"
+ android:src="@drawable/ic_battery" />
+
+ <TextView
+ android:id="@+id/battery_indication_fp"
+ style="@style/widget_medium_regular_fp"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:includeFontPadding="false"
+ android:maxLines="1"
+ android:text="@string/keyguard_battery_level_fp" />
+
+ <LinearLayout
+ android:id="@+id/charging_status_fp"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="8dp"
+ android:gravity="start|center_vertical"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/charging_state_fp"
+ style="@style/widget_small_regular_fp"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:includeFontPadding="false"
+ android:maxLines="1"
+ android:text="@string/keyguard_charged"
+ android:visibility="gone" />
+
+ <TextView
+ android:id="@+id/charging_indication_fp"
+ style="@style/widget_small_regular_fp"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:includeFontPadding="false"
+ android:maxLines="1"
+ android:text="@string/keyguard_disconnect_from_power_source_fp"
+ android:textColor="@color/widget_lighter_color_fp"
+ android:visibility="gone" />
+
+ </LinearLayout>
+
+ </com.fairphone.keyguard.BatteryStatusView>
+
+ <TextView
+ android:id="@+id/owner_info"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
- android:textColor="@color/clock_gray"
- android:textSize="@dimen/widget_label_font_size"
- android:letterSpacing="0.05"
+ android:layout_marginTop="@dimen/date_owner_info_margin"
android:ellipsize="marquee"
- android:singleLine="true" />
+ android:letterSpacing="0.05"
+ android:singleLine="true"
+ android:textColor="@color/widget_lighter_color_fp"
+ android:textSize="@dimen/widget_label_font_size" />
</LinearLayout>
</com.android.keyguard.KeyguardStatusView>
diff --git a/packages/Keyguard/res/values-de/strings_fp.xml b/packages/Keyguard/res/values-de/strings_fp.xml
new file mode 100644
index 0000000..ca2b30b
--- /dev/null
+++ b/packages/Keyguard/res/values-de/strings_fp.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="keyguard_disconnect_from_power_source_fp">Ladegerät abstecken</string>
+</resources>
diff --git a/packages/Keyguard/res/values-es/strings_fp.xml b/packages/Keyguard/res/values-es/strings_fp.xml
new file mode 100644
index 0000000..07b5328
--- /dev/null
+++ b/packages/Keyguard/res/values-es/strings_fp.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="keyguard_disconnect_from_power_source_fp">Desenchufa tu cargador</string>
+</resources>
diff --git a/packages/Keyguard/res/values-fr/strings_fp.xml b/packages/Keyguard/res/values-fr/strings_fp.xml
new file mode 100644
index 0000000..f0190db
--- /dev/null
+++ b/packages/Keyguard/res/values-fr/strings_fp.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="keyguard_disconnect_from_power_source_fp">Débranchez votre chargeur</string>
+</resources>
diff --git a/packages/Keyguard/res/values-nl/strings_fp.xml b/packages/Keyguard/res/values-nl/strings_fp.xml
new file mode 100644
index 0000000..24a6425
--- /dev/null
+++ b/packages/Keyguard/res/values-nl/strings_fp.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="keyguard_disconnect_from_power_source_fp">Ontkoppel de oplader</string>
+</resources>
diff --git a/packages/Keyguard/res/values-pt/strings_fp.xml b/packages/Keyguard/res/values-pt/strings_fp.xml
new file mode 100644
index 0000000..1b900f2
--- /dev/null
+++ b/packages/Keyguard/res/values-pt/strings_fp.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="keyguard_disconnect_from_power_source_fp">Desligue o carregador</string>
+</resources>
diff --git a/packages/Keyguard/res/values-zh-rCN/strings.xml b/packages/Keyguard/res/values-zh-rCN/strings.xml
old mode 100644
new mode 100755
index e15950f..32d8045
--- a/packages/Keyguard/res/values-zh-rCN/strings.xml
+++ b/packages/Keyguard/res/values-zh-rCN/strings.xml
@@ -90,15 +90,21 @@
<string name="kg_failed_attempts_almost_at_login" product="tablet" msgid="3253575572118914370">"您已连续 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次画错解锁图案。如果再尝试 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次后仍不成功,系统就会要求您使用自己的电子邮件帐号解锁平板电脑。\n\n请在 <xliff:g id="NUMBER_2">%3$d</xliff:g> 秒后重试。"</string>
<string name="kg_failed_attempts_almost_at_login" product="default" msgid="1437638152015574839">"您已连续 <xliff:g id="NUMBER_0">%1$d</xliff:g> 次画错解锁图案。如果再尝试 <xliff:g id="NUMBER_1">%2$d</xliff:g> 次后仍不成功,系统就会要求您使用自己的电子邮件帐号解锁手机。\n\n请在 <xliff:g id="NUMBER_2">%3$d</xliff:g> 秒后重试。"</string>
<string name="kg_password_wrong_pin_code_pukked" msgid="30531039455764924">"SIM卡PIN码不正确,您现在必须联系运营商为您解锁设备。"</string>
- <plurals name="kg_password_wrong_pin_code" formatted="false" msgid="6721575017538162249">
- <item quantity="other">SIM 卡 PIN 码不正确,您还可尝试 <xliff:g id="NUMBER_1">%d</xliff:g> 次。</item>
- <item quantity="one">SIM 卡 PIN 码不正确,您还可尝试 <xliff:g id="NUMBER_0">%d</xliff:g> 次。如果仍不正确,则需要联系运营商帮您解锁设备。</item>
+ <plurals name="kg_password_wrong_pin_code">
+ <item quantity="one">SIM<xliff:g id="slotid">%d</xliff:g>卡 PIN 码不正确, 您还可尝试 <xliff:g id="number">%d</xliff:g>次。如果仍不正确,则需要联系运营商帮您解锁设备。</item>
+ <item quantity="other">SIM<xliff:g id="slotid">%d</xliff:g>卡 PIN 码不正确, 您还可尝试<xliff:g id="number">%d</xliff:g> 次。</item>
</plurals>
<string name="kg_password_wrong_puk_code_dead" msgid="7077536808291316208">"SIM卡无法使用,请与您的运营商联系。"</string>
<plurals name="kg_password_wrong_puk_code" formatted="false" msgid="7576227366999858780">
<item quantity="other">SIM 卡 PUK 码不正确,您还可尝试 <xliff:g id="NUMBER_1">%d</xliff:g> 次。如果仍不正确,SIM 卡将永远无法使用。</item>
<item quantity="one">SIM 卡 PUK 码不正确,您还可尝试 <xliff:g id="NUMBER_0">%d</xliff:g> 次。如果仍不正确,SIM 卡将永远无法使用。</item>
</plurals>
+ <string name="kg_remaining_attempts">剩余次数: <xliff:g id="number">%d</xliff:g></string>
+ <string name="kg_failed_pin_attempts_now_wiping">您输入了<xliff:g id="number">%d</xliff:g>次错误的PIN, 是否重启并恢复出厂设置?</string>
+ <string name="kg_failed_password_attempts_now_wiping">您输入了<xliff:g id="number">%d</xliff:g>次错误的密码, 是否重启并恢复出厂设置?</string>
+ <string name="kg_failed_pattern_attempts_now_wiping">您输入了<xliff:g id="number">%d</xliff:g>次错误图案, 是否重启并恢复出厂设置?</string>
+ <string name="kg_failed_attempts_now_wiping_confirm">将要清除您设备上的全部用户数据并且设备恢复成出厂设置。</string>
+
<string name="kg_password_pin_failed" msgid="6268288093558031564">"SIM卡PIN码操作失败!"</string>
<string name="kg_password_puk_failed" msgid="2838824369502455984">"SIM卡PUK码操作失败!"</string>
<string name="kg_pin_accepted" msgid="1448241673570020097">"代码正确!"</string>
@@ -129,4 +135,9 @@
<item quantity="one">设备已保持锁定状态达 <xliff:g id="NUMBER_0">%d</xliff:g> 小时。请确认密码。</item>
</plurals>
<string name="fingerprint_not_recognized" msgid="2690661881608146617">"无法识别"</string>
+ <!-- Instructions telling the user remaining times when enter SIM PIN view. -->
+ <plurals name="kg_password_default_pin_message">
+ <item quantity="one">"输入 SIM<xliff:g id="slotid">%d</xliff:g> PIN, 您还有 <xliff:g id="number">%d</xliff:g> 次尝试机会。如果仍然失败,则必须联系运营商帮您解锁设备。"</item>
+ <item quantity="other">"输入 SIM<xliff:g id="slotid">%d</xliff:g> PIN, 您还有 <xliff:g id="number">%d</xliff:g> 次尝试机会。"</item>
+ </plurals>
</resources>
diff --git a/packages/Keyguard/res/values/bools.xml b/packages/Keyguard/res/values/bools.xml
old mode 100644
new mode 100755
index 2b83787..abf4f00
--- a/packages/Keyguard/res/values/bools.xml
+++ b/packages/Keyguard/res/values/bools.xml
@@ -17,4 +17,5 @@
<resources>
<bool name="kg_show_ime_at_screen_on">true</bool>
<bool name="kg_use_all_caps">true</bool>
+ <bool name="kg_hide_emgcy_btn_when_oos">false</bool>
</resources>
diff --git a/packages/Keyguard/res/values/colors_fp.xml b/packages/Keyguard/res/values/colors_fp.xml
new file mode 100644
index 0000000..ebd18ea
--- /dev/null
+++ b/packages/Keyguard/res/values/colors_fp.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <!-- General -->
+
+ <!-- opaque white -->
+ <color name="widget_regular_color_fp">@android:color/white</color>
+ <!-- transparent white -->
+ <color name="widget_lighter_color_fp">@*android:color/secondary_text_default_material_dark</color>
+
+ <!-- Battery icon -->
+
+ <!-- light green a400 -->
+ <color name="battery_charged_fp">#76FF03</color>
+ <color name="battery_regular_fp">@android:color/white</color>
+ <!-- red 500 - SystemUI's system_critical_color -->
+ <color name="battery_critical_fp">#f44336</color>
+ <!-- deep orange 600 - SystemUI's system_warning_color -->
+ <color name="battery_low_fp">#f4511e</color>
+ <!--<color name="battery_low_fp">@*android:color/battery_saver_mode_color</color>-->
+
+</resources>
diff --git a/packages/Keyguard/res/values/config.xml b/packages/Keyguard/res/values/config.xml
index bde6ed5..4710dea 100644
--- a/packages/Keyguard/res/values/config.xml
+++ b/packages/Keyguard/res/values/config.xml
@@ -28,4 +28,16 @@
<!-- Threshold in micro watts above which a charger is rated as "fast"; 1.5A @ 5V -->
<integer name="config_chargingFastThreshold">7500000</integer>
+
+ <!-- Guide user to wipe data after fail to unlock for the max times -->
+ <integer name="config_max_unlock_countdown_times">0</integer>
+
+ <!-- config for showing AM/PM on lock screen in 12hour format -->
+ <bool name="config_showAmpm">true</bool>
+
+ <!-- whether to show emergency button in lock screen -->
+ <bool name="config_showEmergencyButton">true</bool>
+
+ <!-- Whether to show no sim on CarrierText for India RJIL -->
+ <bool name="config_carrier_display_no_sim">false</bool>
</resources>
diff --git a/packages/Keyguard/res/values/dimens_fp.xml b/packages/Keyguard/res/values/dimens_fp.xml
new file mode 100644
index 0000000..da0e870
--- /dev/null
+++ b/packages/Keyguard/res/values/dimens_fp.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <dimen name="widget_big_margin_start">24dp</dimen>
+ <dimen name="widget_any_magic_margin_start">29dp</dimen>
+
+ <dimen name="widget_medium_font_size_fp">28sp</dimen>
+
+ <!-- Battery icons are based in a square format. -->
+ <dimen name="battery_status_width_fp">32sp</dimen>
+ <dimen name="battery_status_height_fp">32sp</dimen>
+
+</resources>
diff --git a/packages/Keyguard/res/values/donottranslate.xml b/packages/Keyguard/res/values/donottranslate.xml
index a4d0ff7..55a99efe 100644
--- a/packages/Keyguard/res/values/donottranslate.xml
+++ b/packages/Keyguard/res/values/donottranslate.xml
@@ -26,4 +26,10 @@
<!-- Skeleton string format for displaying the time in 24-hour format. -->
<string name="clock_24hr_format">Hm</string>
+
+ <!-- Skeleton string format for displaying the next alarm in 12-hour format. -->
+ <string name="alarm_12hr_format">EEEEhma</string>
+
+ <!-- Skeleton string format for displaying the next alarm in 24-hour format. -->
+ <string name="alarm_24hr_format">EEEEHm</string>
</resources>
diff --git a/packages/Keyguard/res/values/strings.xml b/packages/Keyguard/res/values/strings.xml
old mode 100644
new mode 100755
index ff689aa..04cba48
--- a/packages/Keyguard/res/values/strings.xml
+++ b/packages/Keyguard/res/values/strings.xml
@@ -48,6 +48,9 @@
to unlock the keyguard. Displayed in one line in a large font. -->
<string name="keyguard_password_wrong_pin_code">Incorrect PIN code.</string>
+ <!-- Shown in the lock screen when there is SIM card IO error. -->
+ <string name="lockscreen_sim_error_message_short">Invalid Card.</string>
+
<!-- When the lock screen is showing, the phone is plugged in and the battery is fully
charged, say that it is charged. -->
<string name="keyguard_charged">Charged</string>
@@ -74,6 +77,8 @@
<!-- SIM messages --><skip />
<!-- When the user inserts a sim card from an unsupported network, it becomes network locked -->
<string name="keyguard_network_locked_message">Network locked</string>
+ <!-- Shown when there is no SIM card for India RJIL. -->
+ <string name="keyguard_missing_sim_message_RJIL">No SIM</string>
<!-- Shown when there is no SIM card. -->
<string name="keyguard_missing_sim_message_short">No SIM card</string>
<!-- Shown when there is no SIM card. -->
@@ -266,8 +271,8 @@
<!-- Instructions telling the user that they entered the wrong SIM PIN while trying
to unlock the keyguard. Displayed in a dialog box. -->
<plurals name="kg_password_wrong_pin_code">
- <item quantity="one">Incorrect SIM PIN code, 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">Incorrect SIM PIN code, you have <xliff:g id="number">%d</xliff:g> remaining attempts.</item>
+ <item quantity="one">Incorrect SIM<xliff:g id="slotid">%d</xliff:g> PIN code, 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">Incorrect SIM<xliff:g id="slotid">%d</xliff:g> PIN code, you have <xliff:g id="number">%d</xliff:g> remaining attempts.</item>
</plurals>
<!-- Instructions telling the user that they have exhausted SIM PUK retries and the SIM is now unusable.
@@ -292,6 +297,23 @@
This is displayed if the phone is not connected to a carrier.-->
<string name="keyguard_carrier_default">No service.</string>
+ <string name="kg_remaining_attempts">Remaining attempts: <xliff:g id="number">%d</xliff:g></string>
+ <string name="kg_failed_pin_attempts_now_wiping">
+ You entered the wrong PIN <xliff:g id="number">%d</xliff:g> times,
+ do you want to reset your phone to factory settings?
+ </string>
+ <string name="kg_failed_password_attempts_now_wiping">
+ You entered the wrong Password <xliff:g id="number">%d</xliff:g> times,
+ do you want to reset your phone to factory settings?
+ </string>
+ <string name="kg_failed_pattern_attempts_now_wiping">
+ You entered the wrong Pattern <xliff:g id="number">%d</xliff:g> times,
+ do you want to reset your phone to factory settings?
+ </string>
+ <string name="kg_failed_attempts_now_wiping_confirm">
+ This will erase all data from your device\'s internal storage and your device will be back to factory settings.
+ </string>
+
<!-- Content description of the switch input method button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_ime_switch_button" msgid="5032926134740456424">Switch input method</string>
@@ -354,4 +376,22 @@
<!-- Fingerprint hint message when finger was not recognized.-->
<string name="fingerprint_not_recognized">Not recognized</string>
+ <!-- Instructions telling the user remaining times when enter SIM PIN view. -->
+ <plurals name="kg_password_default_pin_message">
+ <item quantity="one">Enter SIM<xliff:g id="slotid">%d</xliff:g> 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<xliff:g id="slotid">%d</xliff:g> PIN, you have <xliff:g id="number">%d</xliff:g> remaining
+attempts.</item>
+ </plurals>
+
+ <!-- Instructions telling the user remaining times when enter SIM PUK view. -->
+ <plurals name="kg_password_default_puk_message">
+ <item quantity="one">SIM is now disabled. Enter PUK code to continue. You have <xliff:g id="
+number">%d</xliff:g> remaining attempt before SIM becomes permanently unusable. Contact carrier for details.</item>
+ <item quantity="other">SIM is now disabled. Enter PUK code to continue. You have <xliff:g id="
+number">%d</xliff:g> remaining attempts before SIM becomes permanently unusable. Contact carrier for details.</item>
+ </plurals>
+
+ <string name="button_lockscreen_emergency_call">Emergency call</string>
+ <string name="carrier_text_separator">" | "</string>
</resources>
diff --git a/packages/Keyguard/res/values/strings_fp.xml b/packages/Keyguard/res/values/strings_fp.xml
new file mode 100644
index 0000000..6fce375
--- /dev/null
+++ b/packages/Keyguard/res/values/strings_fp.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+
+ <!-- When the lock screen is displayed, the phone is plugged in, and the
+ battery is charged, ask to disconnect from the power source. -->
+ <string name="keyguard_disconnect_from_power_source_fp">Unplug your charger</string>
+
+ <!-- When the lock screen is displayed and the phone is not plugged in,
+ display the battery level. No translation should be needed. -->
+ <string name="keyguard_battery_level_fp"><xliff:g example="42%" id="battery_level">%1$d%%</xliff:g></string>
+
+</resources>
diff --git a/packages/Keyguard/res/values/styles_fp.xml b/packages/Keyguard/res/values/styles_fp.xml
new file mode 100644
index 0000000..f1753ac
--- /dev/null
+++ b/packages/Keyguard/res/values/styles_fp.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <style name="widget_fp">
+ <item name="android:fontFamily">sans-serif</item>
+ <item name="android:color">@color/widget_regular_color_fp</item>
+ </style>
+
+ <style name="widget_small_regular_fp" parent="widget_fp">
+ <item name="android:textSize">@dimen/widget_label_font_size</item>
+ </style>
+
+ <style name="widget_medium_regular_fp" parent="widget_fp">
+ <item name="android:textSize">@dimen/widget_medium_font_size_fp</item>
+ </style>
+
+</resources>
diff --git a/packages/Keyguard/src/com/android/keyguard/CarrierText.java b/packages/Keyguard/src/com/android/keyguard/CarrierText.java
old mode 100644
new mode 100755
index 159ac4c..9e8d68e0
--- a/packages/Keyguard/src/com/android/keyguard/CarrierText.java
+++ b/packages/Keyguard/src/com/android/keyguard/CarrierText.java
@@ -28,17 +28,22 @@
import android.net.wifi.WifiManager;
import android.telephony.ServiceState;
import android.telephony.SubscriptionInfo;
+import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.text.method.SingleLineTransformationMethod;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.TextView;
+import android.os.SystemProperties;
import com.android.internal.telephony.IccCardConstants;
import com.android.internal.telephony.IccCardConstants.State;
import com.android.internal.telephony.TelephonyIntents;
+import com.android.internal.telephony.PhoneConstants;
import com.android.settingslib.WirelessUtils;
+import android.telephony.TelephonyManager;
public class CarrierText extends TextView {
private static final boolean DEBUG = KeyguardConstants.DEBUG;
@@ -46,12 +51,20 @@
private static CharSequence mSeparator;
+ private static CharSequence mCarrierTextSeparator;
+
private final boolean mIsEmergencyCallCapable;
private KeyguardUpdateMonitor mKeyguardUpdateMonitor;
private WifiManager mWifiManager;
+ private boolean[] mSimErrorState = new boolean[TelephonyManager.getDefault().getPhoneCount()];
+
+ private boolean[] mSimMissingState = new boolean[TelephonyManager.getDefault().getPhoneCount()];
+
+ private final boolean mDisplayNoSim;
+
private KeyguardUpdateMonitorCallback mCallback = new KeyguardUpdateMonitorCallback() {
@Override
public void onRefreshCarrierInfo() {
@@ -65,6 +78,28 @@
public void onStartedWakingUp() {
setSelected(true);
};
+
+ public void onSimStateChanged(int subId, int slotId, IccCardConstants.State simState) {
+ if (slotId < 0) {
+ Log.d(TAG, "onSimStateChanged() - slotId invalid: " + slotId);
+ return;
+ }
+
+ Log.d(TAG,"onSimStateChanged: " + getStatusForIccState(simState));
+
+ if (getStatusForIccState(simState) == StatusMode.SimMissing) {
+ mSimMissingState[slotId] = true;
+ } else {
+ mSimMissingState[slotId] = false;
+ }
+ if (getStatusForIccState(simState) == StatusMode.SimIoError) {
+ mSimErrorState[slotId] = true;
+ updateCarrierText();
+ } else if (mSimErrorState[slotId]) {
+ mSimErrorState[slotId] = false;
+ updateCarrierText();
+ }
+ };
};
/**
* The status of this lock screen. Primarily used for widgets on LockScreen.
@@ -77,7 +112,8 @@
SimPukLocked, // SIM card is PUK locked because SIM entered wrong too many times
SimLocked, // SIM card is currently locked
SimPermDisabled, // SIM card is permanently disabled due to PUK unlock failure
- SimNotReady; // SIM is not ready yet. May never be on devices w/o a SIM.
+ SimNotReady, // SIM is not ready yet. May never be on devices w/o a SIM.
+ SimIoError; //The sim card is faulty
}
public CarrierText(Context context) {
@@ -88,6 +124,7 @@
super(context, attrs);
mIsEmergencyCallCapable = context.getResources().getBoolean(
com.android.internal.R.bool.config_voice_capable);
+ mDisplayNoSim = context.getResources().getBoolean(R.bool.config_carrier_display_no_sim);
boolean useAllCaps;
TypedArray a = context.getTheme().obtainStyledAttributes(
attrs, R.styleable.CarrierText, 0, 0);
@@ -101,18 +138,137 @@
mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
}
+ /**
+ * Checks if there are faulty cards. Adds the text depending on the slot of the card
+ * @param text: current carrier text based on the sim state
+ * @param noSims: whether a valid sim card is inserted
+ * @return text
+ */
+ private CharSequence updateCarrierTextWithSimIoError(CharSequence text, boolean noSims) {
+ final CharSequence carrier = "";
+ CharSequence carrierTextForSimState = getCarrierTextForSimState(
+ IccCardConstants.State.CARD_IO_ERROR, carrier);
+ for (int index = 0; index < mSimErrorState.length; index++) {
+ if (mSimErrorState[index]) {
+ // In the case when no sim cards are detected but a faulty card is inserted
+ // overwrite the text and only show "Invalid card"
+ if (noSims) {
+ return concatenate(carrierTextForSimState,
+ getContext().getText(com.android.internal.R.string.emergency_calls_only));
+ } else if (index == 0) {
+ // prepend "Invalid card" when faulty card is inserted in slot 0
+ text = concatenate(carrierTextForSimState, text);
+ } else {
+ // concatenate "Invalid card" when faulty card is inserted in slot 1
+ text = concatenate(text, carrierTextForSimState);
+ }
+ }
+ }
+ return text;
+ }
+
+ /**
+ * Checks if there are abscent cards. Adds the text depending on the slot of the card
+ * @param text: current carrier text based on the sim state
+ * @param noSims: whether all sim missing
+ * @return text
+ */
+ private CharSequence updateCarrierTextWithSimMissing(CharSequence text, boolean noSims) {
+ CharSequence simMissingText = getContext().getText(
+ R.string.keyguard_missing_sim_message_RJIL);
+ // when all sim are missing, don't overwrite the current carrier text
+ if (noSims) {
+ return text;
+ }
+ for (int index = 0; index < mSimMissingState.length; index++) {
+ if (mSimMissingState[index]) {
+ if (index == 0) {
+ // prepend "No Sim" when sim card is abscent in slot 0
+ text = concatenate(simMissingText, text);
+ } else {
+ // append "No Sim" when sim card is abscent in slot 1
+ text = concatenate(text, simMissingText);
+ }
+ }
+ }
+ return text;
+ }
+
protected void updateCarrierText() {
boolean allSimsMissing = true;
boolean anySimReadyAndInService = false;
+ boolean showLocale = getContext().getResources().getBoolean(
+ com.android.internal.R.bool.config_monitor_locale_change);
CharSequence displayText = null;
List<SubscriptionInfo> subs = mKeyguardUpdateMonitor.getSubscriptionInfo(false);
final int N = subs.size();
if (DEBUG) Log.d(TAG, "updateCarrierText(): " + N);
+ // If the Subscription Infos are not available and if any of the sims are not
+ // in SIM_STATE_ABSENT,set displayText as "NO SERVICE".
+ // displayText will be overrided after the Subscription infos are available and
+ // displayText is set according to the SIM Status.
+ if (N == 0) {
+ boolean isSimAbsent = false;
+ for (int i = 0; i < TelephonyManager.getDefault().getSimCount(); i++) {
+ if (TelephonyManager.getDefault().getSimState(i)
+ == TelephonyManager.SIM_STATE_ABSENT) {
+ isSimAbsent = true;
+ break;
+ }
+ }
+ if (!isSimAbsent) {
+ allSimsMissing = false;
+ displayText = getContext().getString(R.string.keyguard_carrier_default);
+ }
+ }
for (int i = 0; i < N; i++) {
+ CharSequence networkClass = "";
int subId = subs.get(i).getSubscriptionId();
+ int phoneId = SubscriptionManager.getPhoneId(subId);
State simState = mKeyguardUpdateMonitor.getSimState(subId);
+ boolean showRat = SubscriptionManager.getResourcesForSubId(mContext,
+ subId).getBoolean(com.android.internal.R.bool.config_display_rat);
+ if (showRat) {
+ ServiceState ss = mKeyguardUpdateMonitor.mServiceStates.get(phoneId);
+ if (ss != null && (ss.getDataRegState() == ServiceState.STATE_IN_SERVICE
+ || ss.getVoiceRegState() == ServiceState.STATE_IN_SERVICE)) {
+ int networkType = TelephonyManager.NETWORK_TYPE_UNKNOWN;
+ if (ss.getRilDataRadioTechnology() !=
+ ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) {
+ networkType = ss.getDataNetworkType();
+ } else if (ss.getRilVoiceRadioTechnology() !=
+ ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) {
+ networkType = ss.getVoiceNetworkType();
+ }
+ networkClass = networkClassToString(TelephonyManager
+ .getNetworkClass(networkType));
+ }
+ }
CharSequence carrierName = subs.get(i).getCarrierName();
+ if ((showLocale || showRat) && !TextUtils.isEmpty(carrierName)) {
+ String[] names = carrierName.toString().split(mSeparator.toString(), 2);
+ StringBuilder newCarrierName = new StringBuilder();
+ for (int j = 0; j < names.length; j++) {
+ if (showLocale) {
+ names[j] = android.util.NativeTextHelper.getLocalString(getContext(),
+ names[j], com.android.internal.R.array.origin_carrier_names,
+ com.android.internal.R.array.locale_carrier_names);
+ }
+ if (!TextUtils.isEmpty(names[j])) {
+ if (!TextUtils.isEmpty(networkClass) && showRat) {
+ names[j] = new StringBuilder().append(names[j]).append(" ")
+ .append(networkClass).toString();
+ }
+ if (j > 0 && names[j].equals(names[j-1])) {
+ continue;
+ }
+ if (j > 0) newCarrierName.append(mSeparator);
+ newCarrierName.append(names[j]);
+ }
+ }
+ carrierName = newCarrierName.toString();
+ }
CharSequence carrierTextForSimState = getCarrierTextForSimState(simState, carrierName);
if (DEBUG) {
Log.d(TAG, "Handling (subId=" + subId + "): " + simState + " " + carrierName);
@@ -122,7 +278,7 @@
displayText = concatenate(displayText, carrierTextForSimState);
}
if (simState == IccCardConstants.State.READY) {
- ServiceState ss = mKeyguardUpdateMonitor.mServiceStates.get(subId);
+ ServiceState ss = mKeyguardUpdateMonitor.mServiceStates.get(phoneId);
if (ss != null && ss.getDataRegState() == ServiceState.STATE_IN_SERVICE) {
// hack for WFC (IWLAN) not turning off immediately once
// Wi-Fi is disassociated or disabled
@@ -138,6 +294,38 @@
}
}
}
+ /*
+ * In the case where there is only one sim inserted in a multisim device, if
+ * the voice registration service state is reported as 12 (no service with emergency)
+ * for at least one of the sim concatenate the sim state with "Emergency calls only"
+ */
+ if (N < TelephonyManager.getDefault().getPhoneCount() &&
+ mKeyguardUpdateMonitor.isEmergencyOnly()) {
+ int presentSubId = mKeyguardUpdateMonitor.getPresentSubId();
+
+ if (DEBUG) {
+ Log.d(TAG, " Present sim - sub id: " + presentSubId);
+ }
+ if (presentSubId != -1) {
+ CharSequence text =
+ getContext().getText(com.android.internal.R.string.emergency_calls_only);
+ Intent spnUpdatedIntent = getContext().registerReceiver(null,
+ new IntentFilter(TelephonyIntents.SPN_STRINGS_UPDATED_ACTION));
+ if (spnUpdatedIntent != null) {
+ String spn = "";
+ if (spnUpdatedIntent.getBooleanExtra(TelephonyIntents.EXTRA_SHOW_SPN, false) &&
+ spnUpdatedIntent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, -1) ==
+ presentSubId) {
+ spn = spnUpdatedIntent.getStringExtra(TelephonyIntents.EXTRA_SPN);
+ if (!spn.equals(text.toString())) {
+ text = concatenate(text, spn);
+ }
+ }
+ }
+ displayText = getCarrierTextForSimState(
+ mKeyguardUpdateMonitor.getSimState(presentSubId), text);
+ }
+ }
if (allSimsMissing) {
if (N != 0) {
// Shows "No SIM card | Emergency calls only" on devices that are voice-capable.
@@ -179,6 +367,10 @@
}
}
+ displayText = updateCarrierTextWithSimIoError(displayText, allSimsMissing);
+ if (mDisplayNoSim) {
+ displayText = updateCarrierTextWithSimMissing(displayText, allSimsMissing);
+ }
// APM (airplane mode) != no carrier state. There are carrier services
// (e.g. WFC = Wi-Fi calling) which may operate in APM.
if (!anySimReadyAndInService && WirelessUtils.isAirplaneModeOn(mContext)) {
@@ -192,6 +384,7 @@
super.onFinishInflate();
mSeparator = getResources().getString(
com.android.internal.R.string.kg_text_message_separator);
+ mCarrierTextSeparator = getResources().getString(R.string.carrier_text_separator);
boolean shouldMarquee = KeyguardUpdateMonitor.getInstance(mContext).isDeviceInteractive();
setSelected(shouldMarquee); // Allow marquee to work.
}
@@ -270,6 +463,11 @@
getContext().getText(R.string.keyguard_sim_puk_locked_message),
text);
break;
+ case SimIoError:
+ carrierText = makeCarrierStringOnEmergencyCapable(
+ getContext().getText(R.string.lockscreen_sim_error_message_short),
+ text);
+ break;
}
return carrierText;
@@ -319,6 +517,8 @@
return StatusMode.SimPermDisabled;
case UNKNOWN:
return StatusMode.SimMissing;
+ case CARD_IO_ERROR:
+ return StatusMode.SimIoError;
}
return StatusMode.SimMissing;
}
@@ -327,7 +527,13 @@
final boolean plmnValid = !TextUtils.isEmpty(plmn);
final boolean spnValid = !TextUtils.isEmpty(spn);
if (plmnValid && spnValid) {
- return new StringBuilder().append(plmn).append(mSeparator).append(spn).toString();
+ if (isCarrierOneSupported()) {
+ return new StringBuilder().append(plmn)
+ .append(mCarrierTextSeparator).append(spn).toString();
+ } else {
+ return new StringBuilder().append(plmn)
+ .append(mSeparator).append(spn).toString();
+ }
} else if (plmnValid) {
return plmn;
} else if (spnValid) {
@@ -337,6 +543,11 @@
}
}
+ private static boolean isCarrierOneSupported() {
+ String property = SystemProperties.get("persist.radio.atel.carrier");
+ return "405854".equals(property);
+ }
+
private CharSequence getCarrierHelpTextForSimState(IccCardConstants.State simState,
String plmn, String spn) {
int carrierHelpTextId = 0;
@@ -387,4 +598,17 @@
return source;
}
}
+
+ private String networkClassToString (int networkClass) {
+ final int[] classIds =
+ {com.android.internal.R.string.config_rat_unknown,
+ com.android.internal.R.string.config_rat_2g,
+ com.android.internal.R.string.config_rat_3g,
+ com.android.internal.R.string.config_rat_4g };
+ String classString = null;
+ if (networkClass < classIds.length) {
+ classString = getContext().getResources().getString(classIds[networkClass]);
+ }
+ return (classString == null) ? "" : classString;
+ }
}
diff --git a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
old mode 100644
new mode 100755
index 0474df7..3a70d62
--- a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
+++ b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
@@ -24,8 +24,10 @@
import android.os.PowerManager;
import android.os.RemoteException;
import android.os.SystemClock;
+import android.os.SystemProperties;
import android.os.UserHandle;
import android.telecom.TelecomManager;
+import android.telephony.ServiceState;
import android.util.AttributeSet;
import android.util.Slog;
import android.view.MotionEvent;
@@ -69,6 +71,11 @@
public void onPhoneStateChanged(int phoneState) {
updateEmergencyCallButton();
}
+
+ @Override
+ public void onServiceStateChanged(int subId, ServiceState state) {
+ updateEmergencyCallButton();
+ }
};
private boolean mLongPressWasDragged;
@@ -82,6 +89,10 @@
private final boolean mIsVoiceCapable;
private final boolean mEnableEmergencyCallWhileSimLocked;
+ private final boolean mIsCarrierSupported = isCarrierOneSupported();
+
+ public static final String PROPERTY_RADIO_ATEL_CARRIER = "persist.radio.atel.carrier";
+ public static final String CARRIER_ONE_DEFAULT_MCC_MNC = "405854";
public EmergencyButton(Context context) {
this(context, null);
@@ -189,7 +200,7 @@
}
}
- private void updateEmergencyCallButton() {
+ public void updateEmergencyCallButton() {
boolean visible = false;
if (mIsVoiceCapable) {
// Emergency calling requires voice capability.
@@ -203,7 +214,13 @@
visible = mEnableEmergencyCallWhileSimLocked;
} else {
// Only show if there is a secure screen (pin/pattern/SIM pin/SIM puk);
- visible = mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser());
+ visible = mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser()) ||
+ mContext.getResources().getBoolean(R.bool.config_showEmergencyButton);
+ }
+
+ if (mContext.getResources().getBoolean(R.bool.kg_hide_emgcy_btn_when_oos)) {
+ KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext);
+ visible = visible && !monitor.isOOS();
}
}
}
@@ -214,7 +231,12 @@
if (isInCall()) {
textId = com.android.internal.R.string.lockscreen_return_to_call;
} else {
- textId = com.android.internal.R.string.lockscreen_emergency_call;
+ if (mIsCarrierSupported) {
+ // Text "Emergency call"
+ textId = R.string.button_lockscreen_emergency_call;
+ } else {
+ textId = com.android.internal.R.string.lockscreen_emergency_call;
+ }
}
setText(textId);
} else {
@@ -243,4 +265,12 @@
private TelecomManager getTelecommManager() {
return (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE);
}
+
+ /**
+ * Check is carrier one supported or not
+ */
+ public static boolean isCarrierOneSupported() {
+ String property = SystemProperties.get(PROPERTY_RADIO_ATEL_CARRIER);
+ return CARRIER_ONE_DEFAULT_MCC_MNC.equals(property);
+ }
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java
index 038e08d..9b85e13 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java
@@ -41,6 +41,7 @@
protected View mEcaView;
protected boolean mEnableHaptics;
private boolean mDismissing;
+ private int mMaxCountdownTimes = 0;
// To avoid accidental lockout due to events while the device in in the pocket, ignore
// any passwords with length less than or equal to this length.
@@ -94,6 +95,9 @@
mSecurityMessageDisplay = KeyguardMessageArea.findSecurityMessageDisplay(this);
mEcaView = findViewById(R.id.keyguard_selector_fade_container);
+ mMaxCountdownTimes = mContext.getResources()
+ .getInteger(R.integer.config_max_unlock_countdown_times);
+
EmergencyButton button = (EmergencyButton) findViewById(R.id.emergency_call_button);
if (button != null) {
button.setCallback(this);
@@ -160,6 +164,7 @@
boolean isValidPassword) {
boolean dismissKeyguard = KeyguardUpdateMonitor.getCurrentUser() == userId;
if (matched) {
+ mLockPatternUtils.sanitizePassword();
mCallback.reportUnlockAttempt(userId, true, 0);
if (dismissKeyguard) {
mDismissing = true;
@@ -168,14 +173,15 @@
} else {
if (isValidPassword) {
mCallback.reportUnlockAttempt(userId, false, timeoutMs);
- if (timeoutMs > 0) {
+ if (!(mMaxCountdownTimes > 0) && timeoutMs > 0) {
long deadline = mLockPatternUtils.setLockoutAttemptDeadline(
userId, timeoutMs);
handleAttemptLockout(deadline);
}
}
if (timeoutMs == 0) {
- mSecurityMessageDisplay.setMessage(getWrongPasswordStringId(), true);
+ String msg = getMessageWithCount(getWrongPasswordStringId());
+ mSecurityMessageDisplay.setMessage(msg, true);
}
}
resetPasswordText(true /* animate */, !matched /* announce deletion if no match */);
@@ -207,6 +213,18 @@
}.start();
}
+ protected String getMessageWithCount(int msgId) {
+ String msg = getContext().getString(msgId);
+ int remaining = mMaxCountdownTimes
+ - KeyguardUpdateMonitor.getInstance(mContext).getFailedUnlockAttempts(
+ KeyguardUpdateMonitor.getCurrentUser());
+ if (mMaxCountdownTimes > 0 && remaining > 0) {
+ msg += " - " + getContext().getResources().getString(
+ R.string.kg_remaining_attempts, remaining);
+ }
+ return msg;
+ }
+
protected void onUserInput() {
if (mCallback != null) {
mCallback.userActivity();
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardConstants.java b/packages/Keyguard/src/com/android/keyguard/KeyguardConstants.java
old mode 100644
new mode 100755
index 3927122..8125afd
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardConstants.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardConstants.java
@@ -25,7 +25,7 @@
* Turns on debugging information for the whole Keyguard. This is very verbose and should only
* be used temporarily for debugging.
*/
- public static final boolean DEBUG = false;
- public static final boolean DEBUG_SIM_STATES = false;
+ public static final boolean DEBUG = true;
+ public static final boolean DEBUG_SIM_STATES = true;
public static final boolean DEBUG_FP_WAKELOCK = true;
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
index 285b1ae..c593ab9 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
@@ -67,7 +67,7 @@
@Override
protected void resetState() {
super.resetState();
- mSecurityMessageDisplay.setMessage(R.string.kg_pin_instructions, false);
+ mSecurityMessageDisplay.setMessage(getMessageWithCount(R.string.kg_pin_instructions), false);
}
@Override
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
index ddccc14..66df2c3 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
@@ -79,7 +79,7 @@
@Override
protected void resetState() {
- mSecurityMessageDisplay.setMessage(R.string.kg_password_instructions, false);
+ mSecurityMessageDisplay.setMessage(getMessageWithCount(R.string.kg_password_instructions), false);
final boolean wasDisabled = mPasswordEntry.isEnabled();
setPasswordEntryEnabled(true);
setPasswordEntryInputEnabled(true);
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
index 506f77d..1ad960d 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardPatternView.java
@@ -89,6 +89,7 @@
private Rect mTempRect = new Rect();
private KeyguardMessageArea mSecurityMessageDisplay;
private View mEcaView;
+ private int mMaxCountdownTimes;
private ViewGroup mContainer;
private int mDisappearYTranslation;
@@ -134,6 +135,8 @@
@Override
protected void onFinishInflate() {
super.onFinishInflate();
+ mMaxCountdownTimes = mContext.getResources()
+ .getInteger(R.integer.config_max_unlock_countdown_times);
mLockPatternUtils = mLockPatternUtils == null
? new LockPatternUtils(mContext) : mLockPatternUtils;
@@ -197,7 +200,7 @@
}
private void displayDefaultSecurityMessage() {
- mSecurityMessageDisplay.setMessage(R.string.kg_pattern_instructions, false);
+ mSecurityMessageDisplay.setMessage(getMessageWithCount(R.string.kg_pattern_instructions), false);
}
@Override
@@ -273,6 +276,7 @@
boolean isValidPattern) {
boolean dismissKeyguard = KeyguardUpdateMonitor.getCurrentUser() == userId;
if (matched) {
+ mLockPatternUtils.sanitizePassword();
mCallback.reportUnlockAttempt(userId, true, 0);
if (dismissKeyguard) {
mLockPatternView.setDisplayMode(LockPatternView.DisplayMode.Correct);
@@ -282,20 +286,33 @@
mLockPatternView.setDisplayMode(LockPatternView.DisplayMode.Wrong);
if (isValidPattern) {
mCallback.reportUnlockAttempt(userId, false, timeoutMs);
- if (timeoutMs > 0) {
+ if (!(mMaxCountdownTimes > 0) && timeoutMs > 0) {
long deadline = mLockPatternUtils.setLockoutAttemptDeadline(
userId, timeoutMs);
handleAttemptLockout(deadline);
}
}
if (timeoutMs == 0) {
- mSecurityMessageDisplay.setMessage(R.string.kg_wrong_pattern, true);
+ mSecurityMessageDisplay.
+ setMessage(getMessageWithCount(R.string.kg_wrong_pattern),true);
mLockPatternView.postDelayed(mCancelPatternRunnable, PATTERN_CLEAR_TIMEOUT_MS);
}
}
}
}
+ private String getMessageWithCount(int msgId) {
+ String msg = getContext().getString(msgId);
+ int remaining = mMaxCountdownTimes
+ - KeyguardUpdateMonitor.getInstance(mContext).getFailedUnlockAttempts(
+ KeyguardUpdateMonitor.getCurrentUser());
+ if (mMaxCountdownTimes > 0 && remaining > 0) {
+ msg += " - " + getContext().getResources().getString(
+ R.string.kg_remaining_attempts, remaining);
+ }
+ return msg;
+ }
+
private void handleAttemptLockout(long elapsedRealtimeDeadline) {
mLockPatternView.clearPattern();
mLockPatternView.setEnabled(false);
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
index a7e4e12..aaff265 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java
@@ -17,8 +17,11 @@
import android.app.Activity;
import android.app.AlertDialog;
+import android.app.ActivityManager;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
import android.os.UserHandle;
import android.util.AttributeSet;
import android.util.Log;
@@ -49,6 +52,8 @@
private final KeyguardUpdateMonitor mUpdateMonitor;
+ private WipeConfirmListener mWipeConfirmListener = null;
+
// Used to notify the container when something interesting happens.
public interface SecurityCallback {
public boolean dismiss(boolean authenticated);
@@ -250,12 +255,71 @@
showDialog(null, message);
}
+ private void showCountdownWipeDialog(int attempts) {
+ int msgId = R.string.kg_failed_attempts_now_wiping;
+ switch (mSecurityModel.getSecurityMode()) {
+ case PIN:
+ msgId = R.string.kg_failed_pin_attempts_now_wiping;
+ break;
+ case Password:
+ msgId = R.string.kg_failed_password_attempts_now_wiping;
+ break;
+ case Pattern:
+ msgId = R.string.kg_failed_pattern_attempts_now_wiping;
+ break;
+ }
+ if (mWipeConfirmListener == null) {
+ mWipeConfirmListener = new WipeConfirmListener();
+ }
+ final AlertDialog dialog = new AlertDialog.Builder(mContext)
+ .setMessage(mContext.getString(msgId, attempts))
+ .setNegativeButton(com.android.internal.R.string.gpsVerifYes,// reuse public Yes/No
+ new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ showWipeConfirmDialog();
+ }
+ })
+ .setPositiveButton(com.android.internal.R.string.gpsVerifNo, mWipeConfirmListener)
+ .setCancelable(false)
+ .create();
+ if (!(mContext instanceof Activity)) {
+ dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
+ }
+ dialog.show();
+ }
+
+ private void showWipeConfirmDialog() {
+ final AlertDialog dialog = new AlertDialog.Builder(mContext)
+ .setMessage(R.string.kg_failed_attempts_now_wiping_confirm)
+ .setNegativeButton(com.android.internal.R.string.gpsVerifYes, mWipeConfirmListener)
+ .setPositiveButton(com.android.internal.R.string.gpsVerifNo, mWipeConfirmListener)
+ .setCancelable(false)
+ .create();
+ if (!(mContext instanceof Activity)) {
+ dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
+ }
+ dialog.show();
+ }
+
+ private class WipeConfirmListener implements DialogInterface.OnClickListener {
+ public void onClick(DialogInterface dialog, int which) {
+ if (DialogInterface.BUTTON_POSITIVE == which) {
+ KeyguardUpdateMonitor.getInstance(mContext).clearFailedUnlockAttempts();
+ } else {
+ if (ActivityManager.isUserAMonkey()) return;
+ Intent wipeIntent = new Intent(Intent.ACTION_MASTER_CLEAR);
+ mContext.sendBroadcast(wipeIntent);
+ }
+ }
+ }
+
private void reportFailedUnlockAttempt(int userId, int timeoutMs) {
final KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext);
final int failedAttempts = monitor.getFailedUnlockAttempts(userId) + 1; // +1 for this time
if (DEBUG) Log.d(TAG, "reportFailedPatternAttempt: #" + failedAttempts);
+ SecurityMode mode = mSecurityModel.getSecurityMode();
final DevicePolicyManager dpm = mLockPatternUtils.getDevicePolicyManager();
final int failedAttemptsBeforeWipe =
dpm.getMaximumFailedPasswordsForWipe(null, userId);
@@ -263,7 +327,18 @@
final int remainingBeforeWipe = failedAttemptsBeforeWipe > 0 ?
(failedAttemptsBeforeWipe - failedAttempts)
: Integer.MAX_VALUE; // because DPM returns 0 if no restriction
- if (remainingBeforeWipe < LockPatternUtils.FAILED_ATTEMPTS_BEFORE_WIPE_GRACE) {
+
+ final boolean usingPattern = mode == KeyguardSecurityModel.SecurityMode.Pattern;
+ final boolean usingPIN = mode == KeyguardSecurityModel.SecurityMode.PIN;
+ final boolean usingPassword = mode == KeyguardSecurityModel.SecurityMode.Password;
+ final int maxCountdownTimes = mContext.getResources()
+ .getInteger(R.integer.config_max_unlock_countdown_times);
+ final boolean enableTimesCounter = maxCountdownTimes > 0 && (usingPattern || usingPIN
+ || usingPassword);
+
+ if (enableTimesCounter && (failedAttempts >= maxCountdownTimes)) {
+ showCountdownWipeDialog(failedAttempts);
+ } else if (remainingBeforeWipe < LockPatternUtils.FAILED_ATTEMPTS_BEFORE_WIPE_GRACE) {
// The user has installed a DevicePolicyManager that requests a user/profile to be wiped
// N attempts. Once we get below the grace period, we post this dialog every time as a
// clear warning until the deletion fires.
@@ -288,7 +363,7 @@
}
monitor.reportFailedStrongAuthUnlockAttempt(userId);
mLockPatternUtils.reportFailedPasswordAttempt(userId);
- if (timeoutMs > 0) {
+ if (!enableTimesCounter && (timeoutMs > 0)) {
showTimeoutDialog(timeoutMs);
}
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java
old mode 100644
new mode 100755
index 2b549f1..2402d54
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java
@@ -57,16 +57,16 @@
SecurityMode getSecurityMode() {
KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext);
- if (SubscriptionManager.isValidSubscriptionId(
- monitor.getNextSubIdForState(IccCardConstants.State.PIN_REQUIRED))) {
- return SecurityMode.SimPin;
- }
-
if (mIsPukScreenAvailable && SubscriptionManager.isValidSubscriptionId(
monitor.getNextSubIdForState(IccCardConstants.State.PUK_REQUIRED))) {
return SecurityMode.SimPuk;
}
+ if (SubscriptionManager.isValidSubscriptionId(
+ monitor.getNextSubIdForState(IccCardConstants.State.PIN_REQUIRED))) {
+ return SecurityMode.SimPin;
+ }
+
final int security = mLockPatternUtils.getActivePasswordQuality(
KeyguardUpdateMonitor.getCurrentUser());
switch (security) {
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
old mode 100644
new mode 100755
index cfaf7b6..b9db3bc
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
@@ -50,9 +50,12 @@
private ProgressDialog mSimUnlockProgressDialog = null;
private CheckSimPin mCheckSimPinThread;
-
+ private boolean mShowDefaultMessage = true;
+ private int mRemainingAttempts = -1;
+ private int mResult = PhoneConstants.PIN_PASSWORD_INCORRECT;
private AlertDialog mRemainingAttemptsDialog;
- private int mSubId;
+ private int mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
+ private int mSlotId;
private ImageView mSimImageView;
KeyguardUpdateMonitorCallback mUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() {
@@ -75,25 +78,19 @@
public void resetState() {
super.resetState();
if (DEBUG) Log.v(TAG, "Resetting state");
+ handleSubInfoChangeIfNeeded();
+ if (mShowDefaultMessage) {
+ showDefaultMessage();
+ }
+ }
+
+ private void handleSubInfoChangeIfNeeded() {
KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext);
- mSubId = monitor.getNextSubIdForState(IccCardConstants.State.PIN_REQUIRED);
- if (SubscriptionManager.isValidSubscriptionId(mSubId)) {
- int count = TelephonyManager.getDefault().getSimCount();
- Resources rez = getResources();
- final String msg;
- int color = Color.WHITE;
- if (count < 2) {
- msg = rez.getString(R.string.kg_sim_pin_instructions);
- } else {
- SubscriptionInfo info = monitor.getSubscriptionInfoForSubId(mSubId);
- CharSequence displayName = info != null ? info.getDisplayName() : ""; // don't crash
- msg = rez.getString(R.string.kg_sim_pin_instructions_multi, displayName);
- if (info != null) {
- color = info.getIconTint();
- }
- }
- mSecurityMessageDisplay.setMessage(msg, true);
- mSimImageView.setImageTintList(ColorStateList.valueOf(color));
+ int subId = monitor.getNextSubIdForState(IccCardConstants.State.PIN_REQUIRED);
+ if (subId != mSubId && SubscriptionManager.isValidSubscriptionId(subId)) {
+ mSubId = subId;
+ mShowDefaultMessage = true;
+ mRemainingAttempts = -1;
}
}
@@ -109,17 +106,19 @@
return 0;
}
- private String getPinPasswordErrorMessage(int attemptsRemaining) {
+ private String getPinPasswordErrorMessage(int attemptsRemaining, boolean isDefault) {
String displayMessage;
-
+ int msgId;
if (attemptsRemaining == 0) {
displayMessage = getContext().getString(R.string.kg_password_wrong_pin_code_pukked);
} else if (attemptsRemaining > 0) {
+ msgId = isDefault ? R.plurals.kg_password_default_pin_message :
+ R.plurals.kg_password_wrong_pin_code;
displayMessage = getContext().getResources()
- .getQuantityString(R.plurals.kg_password_wrong_pin_code, attemptsRemaining,
- attemptsRemaining);
+ .getQuantityString(msgId, attemptsRemaining, mSlotId, attemptsRemaining);
} else {
- displayMessage = getContext().getString(R.string.kg_password_pin_failed);
+ msgId = isDefault ? R.string.kg_sim_pin_instructions : R.string.kg_password_pin_failed;
+ displayMessage = getContext().getString(msgId);
}
if (DEBUG) Log.d(LOG_TAG, "getPinPasswordErrorMessage:"
+ " attemptsRemaining=" + attemptsRemaining + " displayMessage=" + displayMessage);
@@ -151,6 +150,9 @@
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
+ if (mShowDefaultMessage) {
+ showDefaultMessage();
+ }
KeyguardUpdateMonitor.getInstance(mContext).registerCallback(mUpdateMonitorCallback);
}
@@ -231,7 +233,7 @@
}
private Dialog getSimRemainingAttemptsDialog(int remaining) {
- String msg = getPinPasswordErrorMessage(remaining);
+ String msg = getPinPasswordErrorMessage(remaining, false);
if (mRemainingAttemptsDialog == null) {
Builder builder = new AlertDialog.Builder(mContext);
builder.setMessage(msg);
@@ -267,6 +269,8 @@
post(new Runnable() {
@Override
public void run() {
+ mRemainingAttempts = attemptsRemaining;
+ mResult = result;
if (mSimUnlockProgressDialog != null) {
mSimUnlockProgressDialog.hide();
}
@@ -275,8 +279,14 @@
if (result == PhoneConstants.PIN_RESULT_SUCCESS) {
KeyguardUpdateMonitor.getInstance(getContext())
.reportSimUnlocked(mSubId);
- mCallback.dismiss(true);
+ mResult = PhoneConstants.PIN_PASSWORD_INCORRECT;
+ mRemainingAttempts = -1;
+ mShowDefaultMessage = true;
+ if (mCallback != null) {
+ mCallback.dismiss(true);
+ }
} else {
+ mShowDefaultMessage = false;
if (result == PhoneConstants.PIN_PASSWORD_INCORRECT) {
if (attemptsRemaining <= 2) {
// this is getting critical - show dialog
@@ -284,7 +294,8 @@
} else {
// show message
mSecurityMessageDisplay.setMessage(
- getPinPasswordErrorMessage(attemptsRemaining), true);
+ getPinPasswordErrorMessage(
+ attemptsRemaining, false), true);
}
} else {
// "PIN operation failed!" - no idea what this was and no way to
@@ -315,5 +326,47 @@
public boolean startDisappearAnimation(Runnable finishRunnable) {
return false;
}
+
+ private void showDefaultMessage() {
+ if (mRemainingAttempts >= 0) {
+ if (mResult != PhoneConstants.PIN_RESULT_SUCCESS)
+ mSecurityMessageDisplay.setMessage(
+ getPinPasswordErrorMessage(mRemainingAttempts, true),
+ true);
+ return;
+ }
+
+ mSlotId = SubscriptionManager.getSlotId(mSubId) + 1;
+ int count = TelephonyManager.getDefault().getSimCount();
+ Resources rez = getResources();
+ final String msg;
+ int color = Color.WHITE;
+ if (count < 2) {
+ msg = rez.getString(R.string.kg_sim_pin_instructions);
+ } else {
+ SubscriptionInfo info = KeyguardUpdateMonitor.getInstance(mContext).
+ getSubscriptionInfoForSubId(mSubId);
+ CharSequence displayName = info != null ? info.getDisplayName() : ""; // don't crash
+ msg = rez.getString(R.string.kg_sim_pin_instructions_multi, displayName);
+ if (info != null) {
+ color = info.getIconTint();
+ }
+ }
+ mSecurityMessageDisplay.setMessage(msg, true);
+ mSimImageView.setImageTintList(ColorStateList.valueOf(color));
+
+ new CheckSimPin("", mSubId) {
+ void onSimCheckResponse(final int result, final int attemptsRemaining) {
+ Log.d(LOG_TAG, "onSimCheckResponse " + " dummy One result" + result +
+ " attemptsRemaining=" + attemptsRemaining);
+ if (attemptsRemaining >= 0) {
+ mRemainingAttempts = attemptsRemaining;
+ mResult = result;
+ mSecurityMessageDisplay.setMessage(
+ getPinPasswordErrorMessage(attemptsRemaining, true), true);
+ }
+ }
+ }.start();
+ }
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java
index 59c01cf..0f0d000 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java
@@ -50,11 +50,13 @@
private ProgressDialog mSimUnlockProgressDialog = null;
private CheckSimPuk mCheckSimPukThread;
+ private boolean mShowDefaultMessage = true;
+ private int mRemainingAttempts = -1;
private String mPukText;
private String mPinText;
private StateMachine mStateMachine = new StateMachine();
private AlertDialog mRemainingAttemptsDialog;
- private int mSubId;
+ private int mSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
private ImageView mSimImageView;
KeyguardUpdateMonitorCallback mUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() {
@@ -116,47 +118,44 @@
mPinText="";
mPukText="";
state = ENTER_PUK;
- KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext);
- mSubId = monitor.getNextSubIdForState(IccCardConstants.State.PUK_REQUIRED);
- if (SubscriptionManager.isValidSubscriptionId(mSubId)) {
- int count = TelephonyManager.getDefault().getSimCount();
- Resources rez = getResources();
- final String msg;
- int color = Color.WHITE;
- if (count < 2) {
- msg = rez.getString(R.string.kg_puk_enter_puk_hint);
- } else {
- SubscriptionInfo info = monitor.getSubscriptionInfoForSubId(mSubId);
- CharSequence displayName = info != null ? info.getDisplayName() : "";
- msg = rez.getString(R.string.kg_puk_enter_puk_hint_multi, displayName);
- if (info != null) {
- color = info.getIconTint();
- }
- }
- mSecurityMessageDisplay.setMessage(msg, true);
- mSimImageView.setImageTintList(ColorStateList.valueOf(color));
+ handleSubInfoChangeIfNeeded();
+ if (mShowDefaultMessage) {
+ showDefaultMessage();
}
mPasswordEntry.requestFocus();
}
}
+ private void handleSubInfoChangeIfNeeded() {
+ KeyguardUpdateMonitor monitor = KeyguardUpdateMonitor.getInstance(mContext);
+ int subId = monitor.getNextSubIdForState(IccCardConstants.State.PUK_REQUIRED);
+ if (subId != mSubId && SubscriptionManager.isValidSubscriptionId(subId)) {
+ mSubId = subId;
+ mShowDefaultMessage = true;
+ mRemainingAttempts = -1;
+ }
+ }
+
@Override
protected int getPromtReasonStringRes(int reason) {
// No message on SIM Puk
return 0;
}
- private String getPukPasswordErrorMessage(int attemptsRemaining) {
+ private String getPukPasswordErrorMessage(int attemptsRemaining, boolean isDefault) {
String displayMessage;
if (attemptsRemaining == 0) {
displayMessage = getContext().getString(R.string.kg_password_wrong_puk_code_dead);
} else if (attemptsRemaining > 0) {
+ int msgId = isDefault ? R.plurals.kg_password_default_puk_message :
+ R.plurals.kg_password_wrong_puk_code;
displayMessage = getContext().getResources()
- .getQuantityString(R.plurals.kg_password_wrong_puk_code, attemptsRemaining,
- attemptsRemaining);
+ .getQuantityString(msgId, attemptsRemaining, attemptsRemaining);
} else {
- displayMessage = getContext().getString(R.string.kg_password_puk_failed);
+ int msgId = isDefault ? R.string.kg_puk_enter_puk_hint :
+ R.string.kg_password_puk_failed;
+ displayMessage = getContext().getString(msgId);
}
if (DEBUG) Log.d(LOG_TAG, "getPukPasswordErrorMessage:"
+ " attemptsRemaining=" + attemptsRemaining + " displayMessage=" + displayMessage);
@@ -194,6 +193,9 @@
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
+ if (mShowDefaultMessage) {
+ showDefaultMessage();
+ }
KeyguardUpdateMonitor.getInstance(mContext).registerCallback(mUpdateMonitorCallback);
}
@@ -276,7 +278,7 @@
}
private Dialog getPukRemainingAttemptsDialog(int remaining) {
- String msg = getPukPasswordErrorMessage(remaining);
+ String msg = getPukPasswordErrorMessage(remaining, false);
if (mRemainingAttemptsDialog == null) {
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
builder.setMessage(msg);
@@ -332,16 +334,25 @@
if (result == PhoneConstants.PIN_RESULT_SUCCESS) {
KeyguardUpdateMonitor.getInstance(getContext())
.reportSimUnlocked(mSubId);
- mCallback.dismiss(true);
+ mRemainingAttempts = -1;
+ mShowDefaultMessage = true;
+ if (mCallback != null) {
+ mCallback.dismiss(true);
+ }
} else {
+ mShowDefaultMessage = false;
if (result == PhoneConstants.PIN_PASSWORD_INCORRECT) {
+ // show message
+ mSecurityMessageDisplay.setMessage(getPukPasswordErrorMessage(
+ attemptsRemaining, false), true);
if (attemptsRemaining <= 2) {
// this is getting critical - show dialog
getPukRemainingAttemptsDialog(attemptsRemaining).show();
} else {
// show message
mSecurityMessageDisplay.setMessage(
- getPukPasswordErrorMessage(attemptsRemaining), true);
+ getPukPasswordErrorMessage(
+ attemptsRemaining, false), true);
}
} else {
mSecurityMessageDisplay.setMessage(getContext().getString(
@@ -375,6 +386,44 @@
public boolean startDisappearAnimation(Runnable finishRunnable) {
return false;
}
+
+ private void showDefaultMessage() {
+ if (mRemainingAttempts >= 0) {
+ mSecurityMessageDisplay.setMessage(getPukPasswordErrorMessage(
+ mRemainingAttempts, true), true);
+ return;
+ }
+
+ int count = TelephonyManager.getDefault().getSimCount();
+ Resources rez = getResources();
+ final String msg;
+ int color = Color.WHITE;
+ if (count < 2) {
+ msg = rez.getString(R.string.kg_puk_enter_puk_hint);
+ } else {
+ SubscriptionInfo info = KeyguardUpdateMonitor.getInstance(mContext).
+ getSubscriptionInfoForSubId(mSubId);
+ CharSequence displayName = info != null ? info.getDisplayName() : "";
+ msg = rez.getString(R.string.kg_puk_enter_puk_hint_multi, displayName);
+ if (info != null) {
+ color = info.getIconTint();
+ }
+ }
+ mSecurityMessageDisplay.setMessage(msg, true);
+ mSimImageView.setImageTintList(ColorStateList.valueOf(color));
+
+ new CheckSimPuk("", "", mSubId) {
+ void onSimLockChangedResponse(final int result, final int attemptsRemaining) {
+ Log.d(LOG_TAG, "onSimCheckResponse " + " dummy One result" + result +
+ " attemptsRemaining=" + attemptsRemaining);
+ if (attemptsRemaining >= 0) {
+ mRemainingAttempts = attemptsRemaining;
+ mSecurityMessageDisplay.setMessage(
+ getPukPasswordErrorMessage(attemptsRemaining, true), true);
+ }
+ }
+ }.start();
+ }
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java b/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
index e1657c7..c406db8 100644
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardStatusView.java
@@ -22,6 +22,7 @@
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;
@@ -171,10 +172,9 @@
if (info == null) {
return "";
}
- String skeleton = DateFormat.is24HourFormat(context, ActivityManager.getCurrentUser())
- ? "EHm"
- : "Ehma";
- String pattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), skeleton);
+ String pattern = DateFormat.is24HourFormat(context, ActivityManager.getCurrentUser())
+ ? Patterns.alarmView24
+ : Patterns.alarmView12;
return DateFormat.format(pattern, info.getTriggerTime()).toString();
}
@@ -229,33 +229,46 @@
static String dateView;
static String clockView12;
static String clockView24;
+ static String alarmView12;
+ static String alarmView24;
static String cacheKey;
static void update(Context context, boolean hasAlarm) {
final Locale locale = Locale.getDefault();
final Resources res = context.getResources();
- final String dateViewSkel = res.getString(hasAlarm
- ? R.string.abbrev_wday_month_day_no_year_alarm
- : R.string.abbrev_wday_month_day_no_year);
+ final String dateViewSkel = res.getString(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 alarmView12Skel = res.getString(R.string.alarm_12hr_format);
+ final String alarmView24Skel = res.getString(R.string.alarm_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.config_dateformat)) {
+ final String dateformat = Settings.System.getString(context.getContentResolver(),
+ Settings.System.DATE_FORMAT);
+ dateView = dateformat;
+ } else {
+ dateView = DateFormat.getBestDateTimePattern(locale, dateViewSkel);
+ }
clockView12 = DateFormat.getBestDateTimePattern(locale, clockView12Skel);
- // CLDR insists on adding an AM/PM indicator even though it wasn't in the skeleton
- // format. The following code removes the AM/PM indicator if we didn't want it.
- if (!clockView12Skel.contains("a")) {
- clockView12 = clockView12.replaceAll("a", "").trim();
+ if(!context.getResources().getBoolean(R.bool.config_showAmpm)){
+ // CLDR insists on adding an AM/PM indicator even though it wasn't in the skeleton
+ // format. The following code removes the AM/PM indicator if we didn't want it.
+ if (!clockView12Skel.contains("a")) {
+ clockView12 = clockView12.replaceAll("a", "").trim();
+ }
}
clockView24 = DateFormat.getBestDateTimePattern(locale, clockView24Skel);
+ alarmView12 = DateFormat.getBestDateTimePattern(locale, alarmView12Skel);
+ alarmView24 = DateFormat.getBestDateTimePattern(locale, alarmView24Skel);
// Use fancy colon.
clockView24 = clockView24.replace(':', '\uee01');
clockView12 = clockView12.replace(':', '\uee01');
+ alarmView24 = alarmView24.replace(':', '\uee01');
+ alarmView12 = alarmView12.replace(':', '\uee01');
cacheKey = key;
}
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
old mode 100644
new mode 100755
index a9f6dc9..584ffd4
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -136,6 +136,7 @@
private static final int MSG_SERVICE_STATE_CHANGE = 330;
private static final int MSG_SCREEN_TURNED_ON = 331;
private static final int MSG_SCREEN_TURNED_OFF = 332;
+ private static final int MSG_LOCALE_CHANGED = 500;
private static final int MSG_DREAMING_STATE_CHANGED = 333;
private static final int MSG_USER_UNLOCKED = 334;
@@ -280,7 +281,7 @@
handleAirplaneModeChanged();
break;
case MSG_SERVICE_STATE_CHANGE:
- handleServiceStateChange(msg.arg1, (ServiceState) msg.obj);
+ handleServiceStateChange(msg.arg1, msg.arg2, (ServiceState) msg.obj);
break;
case MSG_SCREEN_TURNED_ON:
handleScreenTurnedOn();
@@ -288,6 +289,8 @@
case MSG_SCREEN_TURNED_OFF:
Trace.beginSection("KeyguardUpdateMonitor#handler MSG_SCREEN_TURNED_ON");
handleScreenTurnedOff();
+ case MSG_LOCALE_CHANGED:
+ handleLocaleChanged();
Trace.endSection();
break;
case MSG_DREAMING_STATE_CHANGED:
@@ -403,6 +406,36 @@
return mSubscriptionInfo;
}
+ public boolean isEmergencyOnly() {
+ boolean isEmerg = false;
+ ServiceState state;
+ for (int slotId = 0; slotId < TelephonyManager.getDefault().getPhoneCount(); slotId++) {
+ state = null;
+ int[] subId = mSubscriptionManager.getSubId(slotId);
+ if (subId != null && subId.length > 0) {
+ state = mServiceStates.get(subId[0]);
+ }
+ if (state != null) {
+ if (state.getVoiceRegState() == ServiceState.STATE_IN_SERVICE)
+ return false;
+ else if (state.isEmergencyOnly()) {
+ isEmerg = true;
+ }
+ }
+ }
+ return isEmerg;
+ }
+
+ public int getPresentSubId() {
+ for (int slotId = 0; slotId < TelephonyManager.getDefault().getPhoneCount(); slotId++) {
+ int[] subId = mSubscriptionManager.getSubId(slotId);
+ if (subId != null && subId.length > 0 && getSimState(subId[0]) != State.ABSENT) {
+ return subId[0];
+ }
+ }
+ return -1;
+ }
+
@Override
public void onTrustManagedChanged(boolean managed, int userId) {
mUserTrustIsManaged.put(userId, managed);
@@ -697,12 +730,15 @@
ServiceState serviceState = ServiceState.newFromBundle(intent.getExtras());
int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY,
SubscriptionManager.INVALID_SUBSCRIPTION_ID);
+ int phoneId = intent.getIntExtra(PhoneConstants.SLOT_KEY, 0);
if (DEBUG) {
Log.v(TAG, "action " + action + " serviceState=" + serviceState + " subId="
- + subId);
+ + subId + " phoneId=" + phoneId);
}
- mHandler.sendMessage(
- mHandler.obtainMessage(MSG_SERVICE_STATE_CHANGE, subId, 0, serviceState));
+ mHandler.sendMessage(mHandler.obtainMessage(
+ MSG_SERVICE_STATE_CHANGE, subId, phoneId, serviceState));
+ } else if (Intent.ACTION_LOCALE_CHANGED.equals(action)) {
+ mHandler.sendEmptyMessage(MSG_LOCALE_CHANGED);
}
}
};
@@ -837,6 +873,8 @@
}
} else if (IccCardConstants.INTENT_VALUE_LOCKED_NETWORK.equals(stateExtra)) {
state = IccCardConstants.State.NETWORK_LOCKED;
+ } else if (IccCardConstants.INTENT_VALUE_ICC_CARD_IO_ERROR.equals(stateExtra)) {
+ state = IccCardConstants.State.CARD_IO_ERROR;
} else if (IccCardConstants.INTENT_VALUE_ICC_LOADED.equals(stateExtra)
|| IccCardConstants.INTENT_VALUE_ICC_IMSI.equals(stateExtra)) {
// This is required because telephony doesn't return to "READY" after
@@ -1065,6 +1103,7 @@
filter.addAction(Intent.ACTION_BATTERY_CHANGED);
filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED);
+ filter.addAction(Intent.ACTION_LOCALE_CHANGED);
filter.addAction(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
filter.addAction(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED);
filter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
@@ -1431,25 +1470,43 @@
}
/**
+ * Handle {@link #MSG_LOCALE_CHANGED}
+ */
+ private void handleLocaleChanged() {
+ for (int j = 0; j < mCallbacks.size(); j++) {
+ KeyguardUpdateMonitorCallback cb = mCallbacks.get(j).get();
+ if (cb != null) {
+ cb.onRefreshCarrierInfo();
+ }
+ }
+ }
+
+ /**
* Handle {@link #MSG_SERVICE_STATE_CHANGE}
*/
- private void handleServiceStateChange(int subId, ServiceState serviceState) {
+ private void handleServiceStateChange(int subId, int phoneId, ServiceState serviceState) {
if (DEBUG) {
Log.d(TAG,
- "handleServiceStateChange(subId=" + subId + ", serviceState=" + serviceState);
+ "handleServiceStateChange(subId=" + subId + ", phoneId=" + phoneId
+ + ", serviceState=" + serviceState);
}
if (!SubscriptionManager.isValidSubscriptionId(subId)) {
Log.w(TAG, "invalid subId in handleServiceStateChange()");
return;
}
+ if (!SubscriptionManager.isValidPhoneId(phoneId)) {
+ Log.w(TAG, "invalid phoneId in handleServiceStateChange()");
+ return;
+ }
- mServiceStates.put(subId, serviceState);
+ mServiceStates.put(phoneId, serviceState);
for (int j = 0; j < mCallbacks.size(); j++) {
KeyguardUpdateMonitorCallback cb = mCallbacks.get(j).get();
if (cb != null) {
cb.onRefreshCarrierInfo();
+ cb.onServiceStateChanged(subId, serviceState);
}
}
}
@@ -1561,7 +1618,7 @@
public void removeCallback(KeyguardUpdateMonitorCallback callback) {
if (DEBUG) Log.v(TAG, "*** unregister callback for " + callback);
for (int i = mCallbacks.size() - 1; i >= 0; i--) {
- if (mCallbacks.get(i).get() == callback) {
+ if (mCallbacks.get(i) != null && mCallbacks.get(i).get() == callback) {
mCallbacks.remove(i);
}
}
@@ -1690,6 +1747,33 @@
}
}
+ public boolean isOOS()
+ {
+ boolean ret = true;
+ int phoneCount = TelephonyManager.getDefault().getPhoneCount();
+
+ for (int phoneId = 0; phoneId < phoneCount; phoneId++) {
+ ServiceState state = mServiceStates.get(phoneId);
+ if (state != null) {
+ if (state.isEmergencyOnly())
+ ret = false;
+ if ((state.getVoiceRegState() != ServiceState.STATE_OUT_OF_SERVICE)
+ && (state.getVoiceRegState() != ServiceState.STATE_POWER_OFF))
+ ret = false;
+ if (DEBUG) {
+ Log.d(TAG, "phoneId: " + phoneId + ", is emergency: "
+ + state.isEmergencyOnly() + ", voice state: "
+ + state.getVoiceRegState());
+ }
+ } else {
+ if (DEBUG) Log.d(TAG, "phoneId: " + phoneId + ", state is NULL");
+ }
+ }
+
+ if (DEBUG) Log.d(TAG, "is Emergency supported: " + !ret);
+ return ret;
+ }
+
/**
* @return true if and only if the state has changed for the specified {@code slotId}
*/
@@ -1825,8 +1909,8 @@
}
}
pw.println(" Service states:");
- for (int subId : mServiceStates.keySet()) {
- pw.println(" " + subId + "=" + mServiceStates.get(subId));
+ for (int phoneId : mServiceStates.keySet()) {
+ pw.println(" " + phoneId + "=" + mServiceStates.get(phoneId));
}
if (mFpm != null && mFpm.isHardwareDetected()) {
final int userId = ActivityManager.getCurrentUser();
diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java
old mode 100644
new mode 100755
index 14d6b59..1dcef16
--- a/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java
+++ b/packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java
@@ -20,6 +20,7 @@
import android.media.AudioManager;
import android.os.SystemClock;
import android.hardware.fingerprint.FingerprintManager;
+import android.telephony.ServiceState;
import android.telephony.TelephonyManager;
import android.view.WindowManagerPolicy;
@@ -123,6 +124,13 @@
public void onSimStateChanged(int subId, int slotId, IccCardConstants.State simState) { }
/**
+ * Called when the sevice state changes.
+ * @param subId
+ * @param serviceState
+ */
+ public void onServiceStateChanged(int subId, ServiceState state) { }
+
+ /**
* Called when the user's info changed.
*/
public void onUserInfoChanged(int userId) { }
diff --git a/packages/Keyguard/src/com/fairphone/keyguard/BatteryStatusView.java b/packages/Keyguard/src/com/fairphone/keyguard/BatteryStatusView.java
new file mode 100644
index 0000000..aad82c1
--- /dev/null
+++ b/packages/Keyguard/src/com/fairphone/keyguard/BatteryStatusView.java
@@ -0,0 +1,376 @@
+package com.fairphone.keyguard;
+
+import android.annotation.TargetApi;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.graphics.drawable.Drawable;
+import android.os.BatteryManager;
+import android.os.Build;
+import android.util.AttributeSet;
+import android.util.Log;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.android.keyguard.R;
+
+/**
+ * A #LinearLayout that features a battery level (icon + text) and a charging
+ * indication similar to what is displayed on the lock-screen.
+ * <p>
+ * The battery status monitoring is done locally. Furthermore, it is expected
+ * that a callback to {@link #setChargingIndication(String)} is hooked to
+ * define the current charging indication (i.e. from the
+ * {@link #com.android.systemui.statusbar.KeyguardIndicationController}).
+ * The rationale is that the SystemUI is already computing a nice charging
+ * indication text, and we don't want to duplicate the code too much. So we
+ * expect a hook installed from there.
+ * <p>
+ * Once the children views have been inflated, the current battery status is
+ * retrieved to initialise the widgets.
+ */
+public class BatteryStatusView extends LinearLayout {
+
+ private static final String LOG_TAG = "BatteryStatusView";
+ private static final boolean DBG = false;
+ private static final String ACTION_LEVEL_TEST = "com.android.systemui.BATTERY_LEVEL_TEST";
+
+ private ImageView mBatteryIconView;
+ private TextView mBatteryIndicationView;
+ private View mChargingStatusView;
+ private TextView mChargingStateView;
+ private TextView mChargingIndicationView;
+
+ private final int mLighterWidgetTextColor;
+ private final int mRegularWidgetTextColor;
+ private final Drawable mBatteryDrawable;
+ private final Drawable mBatteryChargingDrawable;
+
+ private String mChargingIndication;
+ private boolean mDemoMode = false;
+ private BatteryTracker mBatteryTracker = new BatteryTracker();
+ private BatteryTracker mDemoTracker = new BatteryTracker();
+
+ /*
+ * Battery tracker (roughly) copied from the SystemUI's
+ * com.android.systemui.BatteryMeterView class.
+ */
+ private final class BatteryTracker extends BroadcastReceiver {
+ public static final int UNKNOWN_LEVEL = -1;
+
+ public int level = UNKNOWN_LEVEL;
+ public boolean plugged;
+ public int status;
+ public boolean testMode = false;
+
+ /* Irrelevant while in demo mode. */
+ public int plugType;
+
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ final String action = intent.getAction();
+ if (action.equals(Intent.ACTION_BATTERY_CHANGED)) {
+ if (testMode && !intent.getBooleanExtra("testmode", false)) return;
+
+ plugType = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0);
+ plugged = plugType != 0;
+ status = intent.getIntExtra(BatteryManager.EXTRA_STATUS,
+ BatteryManager.BATTERY_STATUS_UNKNOWN);
+
+ /*
+ * Make sure the level is set to 100% if the battery is charged.
+ */
+ if (status == BatteryManager.BATTERY_STATUS_FULL) {
+ level = 100;
+ } else {
+ level = (int) (100f
+ * intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0)
+ / intent.getIntExtra(BatteryManager.EXTRA_SCALE, 100));
+ }
+
+ postInvalidate();
+ } else if (action.equals(ACTION_LEVEL_TEST)) {
+ testMode = true;
+ post(new Runnable() {
+ int curLevel = 0;
+ int incr = 1;
+ int saveLevel = level;
+ int savePlugged = plugType;
+ final Intent dummy = new Intent(Intent.ACTION_BATTERY_CHANGED);
+
+ @Override
+ public void run() {
+ if (curLevel < 0) {
+ testMode = false;
+ dummy.putExtra("level", saveLevel);
+ dummy.putExtra("plugged", savePlugged);
+ dummy.putExtra("testmode", false);
+ } else {
+ dummy.putExtra("level", curLevel);
+ dummy.putExtra("plugged", incr > 0 ? BatteryManager.BATTERY_PLUGGED_AC
+ : 0);
+ dummy.putExtra("testmode", true);
+ }
+ getContext().sendBroadcast(dummy);
+
+ if (!testMode) return;
+
+ curLevel += incr;
+ if (curLevel == 100) {
+ incr *= -1;
+ }
+ postDelayed(this, 200);
+ }
+ });
+ }
+ }
+ }
+
+ public BatteryStatusView(Context context) {
+ this(context, null);
+ }
+
+ public BatteryStatusView(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ @TargetApi(Build.VERSION_CODES.HONEYCOMB)
+ public BatteryStatusView(Context context, AttributeSet attrs, int defStyleAttr) {
+ this(context, attrs, defStyleAttr, 0);
+ }
+
+ @TargetApi(Build.VERSION_CODES.LOLLIPOP)
+ public BatteryStatusView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+ super(context, attrs, defStyleAttr, defStyleRes);
+
+ mLighterWidgetTextColor = context.getColor(R.color.widget_lighter_color_fp);
+ mRegularWidgetTextColor = context.getColor(R.color.widget_regular_color_fp);
+
+ mBatteryDrawable = context.getDrawable(R.drawable.ic_battery);
+ mBatteryChargingDrawable = context.getDrawable(R.drawable.ic_battery_charging);
+ }
+
+ @Override
+ protected void onFinishInflate() {
+ if (DBG)
+ Log.d(LOG_TAG, "onFinishInflate:+");
+
+ super.onFinishInflate();
+
+ mBatteryIconView = (ImageView) findViewById(R.id.battery_icon_fp);
+ mBatteryIndicationView = (TextView) findViewById(R.id.battery_indication_fp);
+ mChargingStatusView = findViewById(R.id.charging_status_fp);
+ mChargingStateView = (TextView) findViewById(R.id.charging_state_fp);
+ mChargingIndicationView = (TextView) findViewById(R.id.charging_indication_fp);
+
+ if (DBG) Log.d(LOG_TAG, "onFinishInflate:-");
+ }
+
+ @Override
+ public void onAttachedToWindow() {
+ if (DBG)
+ Log.d(LOG_TAG, "onAttachedToWindow:+");
+
+ super.onAttachedToWindow();
+
+ /*
+ * Get the battery status sticky broadcast so that we have the current
+ * values to initialise the children with.
+ */
+ final IntentFilter intentFilter = new IntentFilter();
+ intentFilter.addAction(Intent.ACTION_BATTERY_CHANGED);
+ intentFilter.addAction(ACTION_LEVEL_TEST);
+ final Intent stickyIntent = getContext().registerReceiver(mBatteryTracker, intentFilter);
+ if (stickyIntent != null) {
+ mBatteryTracker.onReceive(getContext(), stickyIntent);
+ } else if (DBG)
+ Log.d(LOG_TAG, "onAttachedToWindow: no battery status is available");
+
+ if (DBG)
+ Log.d(LOG_TAG, "onAttachedToWindow:-");
+ }
+
+ @Override
+ public void invalidate() {
+ if (DBG)
+ Log.d(LOG_TAG, "invalidate:+");
+
+ final BatteryTracker tracker = mDemoMode ? mDemoTracker : mBatteryTracker;
+
+ if (DBG)
+ Log.d(LOG_TAG, "invalidate: battery status=" + getBatteryStatus(tracker));
+
+ updateBatteryIcon(tracker);
+ updateIndication(tracker);
+
+ super.invalidate();
+
+ if (DBG)
+ Log.d(LOG_TAG, "invalidate:-");
+ }
+
+ public void setChargingIndication(String chargingIndication) {
+ if (DBG) {
+ Log.d(LOG_TAG, "setChargingIndication:+");
+ Log.d(LOG_TAG, "setChargingIndication:"
+ + " was '" + mChargingIndication + "'"
+ + " now '" + chargingIndication + "'");
+ }
+
+ mChargingIndication = chargingIndication;
+
+ // Force refresh the layout
+ invalidate();
+
+ if (DBG)
+ Log.d(LOG_TAG, "setChargingIndication:-");
+ }
+
+ private void updateBatteryIcon(BatteryTracker tracker) {
+ mBatteryIconView.setImageDrawable(tracker.plugged ? mBatteryChargingDrawable : mBatteryDrawable);
+ mBatteryIconView.setImageLevel(tracker.level);
+ }
+
+ private void updateIndication(BatteryTracker tracker) {
+ if (tracker.plugged) {
+ /*
+ * The charging indication will eventually be set by a call to
+ * #setChargingIndication(String).
+ * In the mean time, use a simple version.
+ */
+ if (mChargingIndication == null) {
+ mChargingIndication = getContext().getString(R.string.keyguard_plugged_in);
+
+ if (DBG)
+ Log.d(LOG_TAG, "updateIndication: no charging indication, falling back to default value:"
+ + mChargingIndication);
+ }
+
+ if (tracker.level == 100) {
+ /*
+ * The device is fully charged.
+ */
+ if (DBG)
+ Log.d(LOG_TAG, "updateIndication: device is fully charged");
+
+ mChargingStateView.setText(mChargingIndication);
+ mChargingStateView.setTextColor(mRegularWidgetTextColor);
+ mChargingIndicationView.setText(getContext().getString(R.string.keyguard_disconnect_from_power_source_fp));
+ mChargingIndicationView.setTextColor(mRegularWidgetTextColor);
+
+ mBatteryIndicationView.setVisibility(View.GONE);
+ mChargingStateView.setVisibility(View.VISIBLE);
+ mChargingIndicationView.setVisibility(View.VISIBLE);
+ } else {
+ final int beginPar = mChargingIndication.indexOf('(');
+
+ if (beginPar == -1) {
+ /*
+ * The device is charging but there is no indication on
+ * the duration remaining.
+ */
+ if (DBG)
+ Log.d(LOG_TAG, "updateIndication: device is charging, no estimated duration");
+
+ mChargingStateView.setText(mChargingIndication);
+ mChargingStateView.setTextColor(mLighterWidgetTextColor);
+
+ mBatteryIndicationView.setVisibility(View.GONE);
+ mChargingStateView.setVisibility(View.VISIBLE);
+ mChargingIndicationView.setVisibility(View.GONE);
+ } else {
+ /*
+ * The device is charging and there is an indication on
+ * the duration remaining.
+ */
+ if (DBG)
+ Log.d(LOG_TAG, "updateIndication: device is charging, available estimation");
+
+ mChargingStateView.setText(mChargingIndication.substring(0, beginPar).trim());
+ mChargingStateView.setTextColor(mLighterWidgetTextColor);
+ mChargingIndicationView.setText(mChargingIndication.substring(beginPar + 1, mChargingIndication.lastIndexOf(')')).trim());
+ mChargingIndicationView.setTextColor(mLighterWidgetTextColor);
+
+ mBatteryIndicationView.setVisibility(View.GONE);
+ mChargingStateView.setVisibility(View.VISIBLE);
+ mChargingIndicationView.setVisibility(View.VISIBLE);
+ }
+ }
+ } else {
+ /*
+ * The device is discharging.
+ */
+ if (DBG)
+ Log.d(LOG_TAG, "updateIndication: device is discharging");
+
+ // Force the charging indication to be reset
+ mChargingIndication = null;
+
+ mBatteryIndicationView.setText(getContext().getString(R.string.keyguard_battery_level_fp, tracker.level));
+
+ mBatteryIndicationView.setVisibility(View.VISIBLE);
+ mChargingStateView.setVisibility(View.GONE);
+ mChargingIndicationView.setVisibility(View.GONE);
+ }
+ }
+
+ private static String getBatteryStatus(BatteryTracker tracker) {
+ final StringBuilder builder = new StringBuilder("{");
+
+ builder.append("status:");
+ switch (tracker.status) {
+ case android.os.BatteryManager.BATTERY_STATUS_FULL:
+ builder.append("full");
+ break;
+ case android.os.BatteryManager.BATTERY_STATUS_CHARGING:
+ builder.append("charging");
+ break;
+ case android.os.BatteryManager.BATTERY_STATUS_DISCHARGING:
+ builder.append("discharging");
+ break;
+ case android.os.BatteryManager.BATTERY_STATUS_NOT_CHARGING:
+ builder.append("not charging");
+ break;
+ case android.os.BatteryManager.BATTERY_STATUS_UNKNOWN:
+ default:
+ builder.append("unknown");
+ break;
+ }
+
+ builder.append(",level:");
+ builder.append(tracker.level);
+
+ builder.append(",plugged:");
+ builder.append(tracker.plugged);
+
+ builder.append(",plugType:");
+ switch (tracker.plugType) {
+ case 0:
+ builder.append("battery");
+ break;
+ case android.os.BatteryManager.BATTERY_PLUGGED_AC:
+ builder.append("A/C");
+ break;
+ case android.os.BatteryManager.BATTERY_PLUGGED_USB:
+ builder.append("USB");
+ break;
+ case android.os.BatteryManager.BATTERY_PLUGGED_WIRELESS:
+ builder.append("wireless");
+ break;
+ default:
+ builder.append("unknown");
+ break;
+ }
+
+ builder.append(",test mode:");
+ builder.append(tracker.testMode);
+
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+}
diff --git a/packages/SettingsLib/res/values/strings.xml b/packages/SettingsLib/res/values/strings.xml
index 072fe68..f9bd24b 100644
--- a/packages/SettingsLib/res/values/strings.xml
+++ b/packages/SettingsLib/res/values/strings.xml
@@ -85,6 +85,9 @@
<!-- Summary for Connected wifi network without internet -->
<string name="wifi_connected_no_internet">Connected, no Internet</string>
+ <!-- Text when wrong password entered for psk networks -->
+ <string name="wifi_auth_password_wrong">Password may be incorrect</string>
+
<!-- Bluetooth settings. Message when a device is disconnected -->
<string name="bluetooth_disconnected">Disconnected</string>
<!-- Bluetooth settings. Message when disconnecting from a device -->
@@ -125,6 +128,8 @@
<string name="bluetooth_profile_map">Message Access</string>
<!-- Bluetooth settings. The user-visible string that is used whenever referring to the SAP profile (sharing SIM card). -->
<string name="bluetooth_profile_sap">SIM Access</string>
+ <!-- Bluetooth settings. The user-visible string that is used whenever referring to the dun profile. -->
+ <string name="bluetooth_profile_dun">Dial-up Network Access</string>
<!-- Bluetooth settings. Connection options screen. The summary for the A2DP checkbox preference when A2DP is connected. -->
<string name="bluetooth_a2dp_profile_summary_connected">Connected to media audio</string>
@@ -144,6 +149,8 @@
<string name="bluetooth_pan_user_profile_summary_connected">Connected to device for Internet access</string>
<!-- Bluetooth settings. Connection options screen. The summary for the checkbox preference when PAN is connected (NAP role). [CHAR LIMIT=25]-->
<string name="bluetooth_pan_nap_profile_summary_connected">Sharing local Internet connection with device</string>
+ <!-- Bluetooth settings. Connection options screen. The summary for the DUN checkbox preference when DUN is connected. -->
+ <string name="bluetooth_dun_profile_summary_connected">Connected to Dun Server</string>
<!-- Bluetooth settings. Connection options screen. The summary
for the PAN checkbox preference that describes how checking it
@@ -163,6 +170,8 @@
for the HID checkbox preference that describes how checking it
will set the HID profile as preferred. -->
<string name="bluetooth_hid_profile_summary_use_for">Use for input</string>
+ <!-- Bluetooth settings. Connection options screen. The summary for the dun checkbox preference that describes how checking it will set the dun profile as preferred. -->
+ <string name="bluetooth_dun_profile_summary_use_for">Use for Dial-up Network access</string>
<!-- Button text for accepting an incoming pairing request. [CHAR LIMIT=20] -->
<string name="bluetooth_pairing_accept">Pair</string>
diff --git a/packages/SettingsLib/src/com/android/settingslib/BatteryInfo.java b/packages/SettingsLib/src/com/android/settingslib/BatteryInfo.java
index fa1f91f..0edd1c6 100644
--- a/packages/SettingsLib/src/com/android/settingslib/BatteryInfo.java
+++ b/packages/SettingsLib/src/com/android/settingslib/BatteryInfo.java
@@ -86,7 +86,7 @@
parse(mStats, remainingTimeUs, parserList);
final Context context = view.getContext();
String timeString = context.getString(R.string.charge_length_format,
- Formatter.formatShortElapsedTime(context, timePeriod));
+ Formatter.formatShortElapsedTime(context, Math.abs(timePeriod)));
String remaining = "";
if (remainingTimeUs != 0) {
remaining = context.getString(R.string.remaining_length_format,
diff --git a/packages/SettingsLib/src/com/android/settingslib/DeviceInfoUtils.java b/packages/SettingsLib/src/com/android/settingslib/DeviceInfoUtils.java
index b04948b..2c03859 100644
--- a/packages/SettingsLib/src/com/android/settingslib/DeviceInfoUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/DeviceInfoUtils.java
@@ -102,6 +102,32 @@
m.group(4); // Thu Jun 28 11:02:39 PDT 2012
}
+ public static String customizeFormatKernelVersion(boolean hideVersionName){
+ if (hideVersionName) {
+ try {
+ String strVersion = readLine(FILENAME_PROC_VERSION);
+ final String PROC_VERSION_REGEX = "Linux version (\\S+) " + "\\((\\S+?)\\) "
+ + "(?:\\(gcc.+? \\)) " + "(#\\d+) " + "(?:.*?)?"
+ + "((Sun|Mon|Tue|Wed|Thu|Fri|Sat).+)";
+ Matcher m = Pattern.compile(PROC_VERSION_REGEX).matcher(strVersion);
+ if (!m.matches()) {
+ Log.e(TAG, "Regex did not match on /proc/version: " + strVersion);
+ return "Unavailable";
+ } else if (m.groupCount() < 4) {
+ Log.e(TAG, "Regex match on /proc/version only returned "
+ + m.groupCount() + " groups");
+ return "Unavailable";
+ }
+ return m.group(1) + "\n" + m.group(4);
+ } catch (IOException e) {
+ Log.e(TAG, "IO Exception when getting kernel version for Device Info screen", e);
+ return "Unavailable";
+ }
+ } else {
+ return getFormattedKernelVersion();
+ }
+ }
+
/**
* Returns " (ENGINEERING)" if the msv file has a zero value, else returns "".
* @return a string to append to the model number description.
diff --git a/packages/SettingsLib/src/com/android/settingslib/TetherUtil.java b/packages/SettingsLib/src/com/android/settingslib/TetherUtil.java
index 151e0ea..d368de9 100644
--- a/packages/SettingsLib/src/com/android/settingslib/TetherUtil.java
+++ b/packages/SettingsLib/src/com/android/settingslib/TetherUtil.java
@@ -16,11 +16,18 @@
package com.android.settingslib;
import android.content.Context;
+import android.net.wifi.WifiManager;
import android.os.SystemProperties;
import android.telephony.CarrierConfigManager;
public class TetherUtil {
+ public static boolean setWifiTethering(boolean enable, Context context) {
+ final WifiManager wifiManager =
+ (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
+ return wifiManager.setWifiApEnabled(null, enable);
+ }
+
private static boolean isEntitlementCheckRequired(Context context) {
final CarrierConfigManager configManager = (CarrierConfigManager) context
.getSystemService(Context.CARRIER_CONFIG_SERVICE);
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
old mode 100755
new mode 100644
index 9608daa..873d392
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java
@@ -116,7 +116,11 @@
List<BluetoothDevice> sinks = getConnectedDevices();
if (sinks != null) {
for (BluetoothDevice sink : sinks) {
- mService.disconnect(sink);
+ if (sink.equals(device)) {
+ // Connect to same device, Ignore it
+ Log.d(TAG,"Not disconnecting device = " + sink);
+ return true;
+ }
}
}
return mService.connect(device);
@@ -124,18 +128,36 @@
public boolean disconnect(BluetoothDevice device) {
if (mService == null) return false;
- // Downgrade priority as user is disconnecting the headset.
- if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON){
- mService.setPriority(device, BluetoothProfile.PRIORITY_ON);
+ List<BluetoothDevice> deviceList = mService.getConnectedDevices();
+ if (!deviceList.isEmpty()) {
+ for (BluetoothDevice dev : deviceList) {
+ if (dev.equals(device)) {
+ if (V) Log.d(TAG,"Downgrade priority as user" +
+ "is disconnecting the headset");
+ // Downgrade priority as user is disconnecting the headset.
+ if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON) {
+ mService.setPriority(device, BluetoothProfile.PRIORITY_ON);
+ }
+ return mService.disconnect(device);
+ }
+ }
}
- return mService.disconnect(device);
+ return false;
}
public int getConnectionStatus(BluetoothDevice device) {
if (mService == null) {
return BluetoothProfile.STATE_DISCONNECTED;
}
- return mService.getConnectionState(device);
+ List<BluetoothDevice> deviceList = mService.getConnectedDevices();
+ if (!deviceList.isEmpty()) {
+ for (BluetoothDevice dev : deviceList) {
+ if (dev.equals(device)) {
+ return mService.getConnectionState(device);
+ }
+ }
+ }
+ return BluetoothProfile.STATE_DISCONNECTED;
}
public boolean isPreferred(BluetoothDevice device) {
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
old mode 100755
new mode 100644
index a332332..9f90004
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/BluetoothEventManager.java
@@ -23,6 +23,9 @@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
+import android.content.SharedPreferences;
+import android.preference.PreferenceManager;
+import android.text.TextUtils;
import android.util.Log;
import com.android.settingslib.R;
@@ -107,19 +110,31 @@
addHandler(Intent.ACTION_DOCK_EVENT, new DockEventHandler());
mContext.registerReceiver(mBroadcastReceiver, mAdapterIntentFilter, null, mReceiverHandler);
+ mContext.registerReceiver(mProfileBroadcastReceiver, mProfileIntentFilter, null, mReceiverHandler);
}
void registerProfileIntentReceiver() {
- mContext.registerReceiver(mBroadcastReceiver, mProfileIntentFilter, null, mReceiverHandler);
+ mContext.registerReceiver(mProfileBroadcastReceiver, mProfileIntentFilter, null, mReceiverHandler);
}
public void setReceiverHandler(android.os.Handler handler) {
mContext.unregisterReceiver(mBroadcastReceiver);
+ mContext.unregisterReceiver(mProfileBroadcastReceiver);
mReceiverHandler = handler;
mContext.registerReceiver(mBroadcastReceiver, mAdapterIntentFilter, null, mReceiverHandler);
registerProfileIntentReceiver();
}
+ // set bluetooth default name
+ private void setDefaultBtName() {
+ String name = mContext.getResources().getString(
+ com.android.internal.R.string.def_custom_bt_defname);
+ Log.d(TAG, "custom bluetooth name: " + name);
+ if (!TextUtils.isEmpty(name)) {
+ mLocalAdapter.setName(name);
+ }
+ }
+
/** Register to start receiving callbacks for Bluetooth events. */
public void registerCallback(BluetoothCallback callback) {
synchronized (mCallbacks) {
@@ -148,13 +163,42 @@
}
};
+ private final BroadcastReceiver mProfileBroadcastReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ String action = intent.getAction();
+ BluetoothDevice device = intent
+ .getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
+
+ Handler handler = mHandlerMap.get(action);
+ if (handler != null) {
+ handler.onReceive(context, intent, device);
+ }
+ }
+ };
+
private class AdapterStateChangedHandler implements Handler {
public void onReceive(Context context, Intent intent,
BluetoothDevice device) {
int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE,
BluetoothAdapter.ERROR);
+ // Reregister Profile Broadcast Receiver as part of TURN OFF
+ if (state == BluetoothAdapter.STATE_OFF)
+ {
+ context.unregisterReceiver(mProfileBroadcastReceiver);
+ registerProfileIntentReceiver();
+ }
// update local profiles and get paired devices
mLocalAdapter.setBluetoothStateInt(state);
+ SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(mContext);
+ boolean isFirstBoot = preferences.getBoolean("is_first_boot", true);
+ Log.d(TAG,"isFirstBoot: " +isFirstBoot + " state: " + state);
+ if (isFirstBoot && state == BluetoothAdapter.STATE_ON) {
+ setDefaultBtName();
+ SharedPreferences.Editor edit = preferences.edit();
+ edit.putBoolean("is_first_boot", false);
+ edit.apply();
+ }
// send callback to update UI and possibly start scanning
synchronized (mCallbacks) {
for (BluetoothCallback callback : mCallbacks) {
@@ -196,6 +240,8 @@
cachedDevice = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, device);
Log.d(TAG, "DeviceFoundHandler created new CachedBluetoothDevice: "
+ cachedDevice);
+ // callback to UI to create Preference for new device
+ dispatchDeviceAdded(cachedDevice);
}
cachedDevice.setRssi(rssi);
cachedDevice.setBtClass(btClass);
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
index a879d16f..44223e0 100644
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDevice.java
@@ -126,7 +126,9 @@
Log.d(TAG, "onProfileStateChanged: profile " + profile +
" newProfileState " + newProfileState);
}
- if (mLocalAdapter.getBluetoothState() == BluetoothAdapter.STATE_TURNING_OFF)
+ int bluetoothState = mLocalAdapter.getBluetoothState();
+ if (bluetoothState == BluetoothAdapter.STATE_TURNING_OFF ||
+ bluetoothState == BluetoothAdapter.STATE_OFF)
{
if (Utils.D) Log.d(TAG, " BT Turninig Off...Profile conn state change ignored...");
return;
@@ -135,6 +137,8 @@
if (newProfileState == BluetoothProfile.STATE_CONNECTED) {
if (profile instanceof MapProfile) {
profile.setPreferred(mDevice, true);
+ mRemovedProfiles.remove(profile);
+ mProfiles.add(profile);
} else if (!mProfiles.contains(profile)) {
mRemovedProfiles.remove(profile);
mProfiles.add(profile);
@@ -521,7 +525,29 @@
* Refreshes the UI when framework alerts us of a UUID change.
*/
void onUuidChanged() {
+ Log.d(TAG, " onUuidChanged, mProfile Size " + mProfiles.size());
+ List<LocalBluetoothProfile> mPrevProfiles =
+ new ArrayList<LocalBluetoothProfile>();
+ mPrevProfiles.clear();
+ mPrevProfiles.addAll(mProfiles);
updateProfiles();
+ /*
+ * Check if new profiles are added
+ */
+ if ((mPrevProfiles.containsAll(mProfiles)) && (!mPrevProfiles.isEmpty())) {
+ Log.d(TAG,"UUID not udpated, returning");
+ mProfiles.clear();
+ mProfiles.addAll(mPrevProfiles);
+ return;
+ }
+ for (int i = 0; i<mProfiles.size(); ++i) {
+ if (!mPrevProfiles.contains(mProfiles.get(i))) {
+ mPrevProfiles.add(mProfiles.get(i));
+ }
+ }
+ mProfiles.clear();
+ mProfiles.addAll(mPrevProfiles);
+
ParcelUuid[] uuids = mDevice.getUuids();
long timeout = MAX_UUID_DELAY_FOR_AUTO_CONNECT;
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
index a9f4bd3..409f32b 100755
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/CachedBluetoothDeviceManager.java
@@ -118,7 +118,7 @@
public synchronized void clearNonBondedDevices() {
for (int i = mCachedDevices.size() - 1; i >= 0; i--) {
CachedBluetoothDevice cachedDevice = mCachedDevices.get(i);
- if (cachedDevice.getBondState() != BluetoothDevice.BOND_BONDED) {
+ if (cachedDevice.getBondState() == BluetoothDevice.BOND_NONE) {
mCachedDevices.remove(i);
}
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/DunServerProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/DunServerProfile.java
new file mode 100644
index 0000000..3c72927
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/DunServerProfile.java
@@ -0,0 +1,162 @@
+/*
+*Copyright (c) 2013, 2015, 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.
+*/
+
+package com.android.settingslib.bluetooth;
+
+import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothClass;
+import android.bluetooth.BluetoothDevice;
+import android.bluetooth.BluetoothDun;
+import android.bluetooth.BluetoothProfile;
+import android.content.Context;
+import android.util.Log;
+import java.util.HashMap;
+import java.util.List;
+
+import com.android.settingslib.R;
+
+/**
+ * DunServerProfile handles Bluetooth DUN server profile.
+ */
+final class DunServerProfile implements LocalBluetoothProfile {
+ private static final String TAG = "DunServerProfile";
+ private static boolean V = true;
+
+ private BluetoothDun mService;
+ private boolean mIsProfileReady;
+
+ static final String NAME = "DUN Server";
+
+ // Order of this profile in device profiles list
+ private static final int ORDINAL = 11;
+
+ // These callbacks run on the main thread.
+ private final class DunServiceListener
+ implements BluetoothProfile.ServiceListener {
+
+ public void onServiceConnected(int profile, BluetoothProfile proxy) {
+ if (V) Log.d(TAG,"Bluetooth service connected");
+ mService = (BluetoothDun) proxy;
+ mIsProfileReady = true;
+ }
+
+ public void onServiceDisconnected(int profile) {
+ if (V) Log.d(TAG,"Bluetooth service disconnected");
+ mIsProfileReady = false;
+ }
+ }
+
+ public boolean isProfileReady() {
+ return mIsProfileReady;
+ }
+
+ DunServerProfile(Context context) {
+ BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
+ adapter.getProfileProxy(context, new DunServiceListener(),
+ BluetoothProfile.DUN);
+ }
+
+ public boolean isConnectable() {
+ return true;
+ }
+
+ public boolean isAutoConnectable() {
+ return false;
+ }
+
+ public boolean connect(BluetoothDevice device) {
+ return false;
+ }
+
+ public boolean disconnect(BluetoothDevice device) {
+ if (mService == null) return false;
+ return mService.disconnect(device);
+ }
+
+ public int getConnectionStatus(BluetoothDevice device) {
+ if (mService == null) {
+ return BluetoothProfile.STATE_DISCONNECTED;
+ }
+ return mService.getConnectionState(device);
+ }
+
+ public boolean isPreferred(BluetoothDevice device) {
+ return true;
+ }
+
+ public int getPreferred(BluetoothDevice device) {
+ return -1;
+ }
+
+ public void setPreferred(BluetoothDevice device, boolean preferred) {
+ // ignore: isPreferred is always true for DUN
+ }
+
+ public String toString() {
+ return NAME;
+ }
+
+ public int getOrdinal() {
+ return ORDINAL;
+ }
+
+ public int getNameResource(BluetoothDevice device) {
+ return R.string.bluetooth_profile_dun;
+ }
+
+ public int getSummaryResourceForDevice(BluetoothDevice device) {
+ int state = getConnectionStatus(device);
+ switch (state) {
+ case BluetoothProfile.STATE_DISCONNECTED:
+ return R.string.bluetooth_dun_profile_summary_use_for;
+
+ case BluetoothProfile.STATE_CONNECTED:
+ return R.string.bluetooth_dun_profile_summary_connected;
+ default:
+ return Utils.getConnectionStateSummary(state);
+ }
+ }
+
+ public int getDrawableResource(BluetoothClass btClass) {
+ return R.drawable.ic_bt_network_pan;
+ }
+
+ protected void finalize() {
+ if (V) Log.d(TAG, "finalize()");
+ if (mService != null) {
+ try {
+ BluetoothAdapter.getDefaultAdapter().closeProfileProxy
+ (BluetoothProfile.DUN, mService);
+ mService = null;
+ } catch (Throwable t) {
+ Log.w(TAG, "Error cleaning up DUN proxy", t);
+ }
+ }
+ }
+}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java
index 5529866..6e1d4f0 100755
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/HeadsetProfile.java
@@ -115,7 +115,11 @@
List<BluetoothDevice> sinks = mService.getConnectedDevices();
if (sinks != null) {
for (BluetoothDevice sink : sinks) {
- Log.d(TAG,"Not disconnecting device = " + sink);
+ if (sink.equals(device)) {
+ // Connect to same device, Ignore it
+ Log.d(TAG,"Not disconnecting device = " + sink);
+ return true;
+ }
}
}
return mService.connect(device);
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java
old mode 100755
new mode 100644
index 2683609..da615c8
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothAdapter.java
@@ -186,8 +186,13 @@
return mState;
}
- synchronized void setBluetoothStateInt(int state) {
- mState = state;
+ void setBluetoothStateInt(int state) {
+ synchronized(this) {
+ if(mState == state){
+ return;
+ }
+ mState = state;
+ }
if (state == BluetoothAdapter.STATE_ON) {
// if mProfileManager hasn't been constructed yet, it will
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
old mode 100755
new mode 100644
index 7f0e27a..fb74850
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothProfileManager.java
@@ -25,6 +25,8 @@
import android.bluetooth.BluetoothInputDevice;
import android.bluetooth.BluetoothPan;
import android.bluetooth.BluetoothPbapClient;
+import android.bluetooth.BluetoothDun;
+import android.bluetooth.BluetoothPbap;
import android.bluetooth.BluetoothProfile;
import android.bluetooth.BluetoothUuid;
import android.content.Context;
@@ -36,6 +38,7 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
+import android.os.SystemProperties;
/**
* LocalBluetoothProfileManager provides access to the LocalBluetoothProfile
@@ -85,6 +88,7 @@
private OppProfile mOppProfile;
private final PanProfile mPanProfile;
private PbapClientProfile mPbapClientProfile;
+ private DunServerProfile mDunProfile;
private final PbapServerProfile mPbapProfile;
private final boolean mUsePbapPce;
@@ -130,9 +134,17 @@
addProfile(mMapProfile, MapProfile.NAME,
BluetoothMap.ACTION_CONNECTION_STATE_CHANGED);
- //Create PBAP server profile, but do not add it to list of profiles
- // as we do not need to monitor the profile as part of profile list
+ // enable DUN only if the property is set
+ if (SystemProperties.getBoolean("ro.bluetooth.dun", false) == true) {
+ mDunProfile = new DunServerProfile(context);
+ addProfile(mDunProfile, DunServerProfile.NAME,
+ BluetoothDun.ACTION_CONNECTION_STATE_CHANGED);
+ }
+
+ //Create PBAP server profile
mPbapProfile = new PbapServerProfile(context);
+ addProfile(mPbapProfile, PbapServerProfile.NAME,
+ BluetoothPbap.PBAP_STATE_CHANGED_ACTION);
if (DEBUG) Log.d(TAG, "LocalBluetoothProfileManager construction complete");
}
@@ -472,6 +484,13 @@
removedProfiles.add(mPbapProfile);
}
+ if ((mPbapProfile != null) &&
+ (mPbapProfile.getConnectionStatus(device) == BluetoothProfile.STATE_CONNECTED)) {
+ profiles.add(mPbapProfile);
+ removedProfiles.remove(mPbapProfile);
+ mPbapProfile.setPreferred(device, true);
+ }
+
if (DEBUG) {
Log.d(TAG,"New Profiles" + profiles.toString());
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapServerProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapServerProfile.java
index 9e76933..fea7b34 100755
--- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapServerProfile.java
+++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/PbapServerProfile.java
@@ -88,8 +88,13 @@
}
public boolean disconnect(BluetoothDevice device) {
- if (mService == null) return false;
- return mService.disconnect();
+ if (mService == null || device == null) return false;
+
+ if (getConnectionStatus(device) == BluetoothProfile.STATE_CONNECTED)
+ return mService.disconnect();
+
+ Log.d(TAG, "pbap server not connected to " + device.getAddress());
+ return false;
}
public int getConnectionStatus(BluetoothDevice device) {
diff --git a/packages/SettingsLib/src/com/android/settingslib/drawer/SettingsDrawerActivity.java b/packages/SettingsLib/src/com/android/settingslib/drawer/SettingsDrawerActivity.java
index e6e0243..9c0114e 100644
--- a/packages/SettingsLib/src/com/android/settingslib/drawer/SettingsDrawerActivity.java
+++ b/packages/SettingsLib/src/com/android/settingslib/drawer/SettingsDrawerActivity.java
@@ -264,9 +264,11 @@
public void showMenuIcon() {
mShowingMenu = true;
- getActionBar().setHomeAsUpIndicator(R.drawable.ic_menu);
- getActionBar().setHomeActionContentDescription(R.string.content_description_menu_button);
- getActionBar().setDisplayHomeAsUpEnabled(true);
+ if(getActionBar() != null){
+ getActionBar().setHomeAsUpIndicator(R.drawable.ic_menu);
+ getActionBar().setHomeActionContentDescription(R.string.content_description_menu_button);
+ getActionBar().setDisplayHomeAsUpEnabled(true);
+ }
}
public List<DashboardCategory> getDashboardCategories() {
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
index 28575a9..43c8914 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java
@@ -91,6 +91,7 @@
private static final String KEY_PSKTYPE = "key_psktype";
private static final String KEY_SCANRESULTCACHE = "key_scanresultcache";
private static final String KEY_CONFIG = "key_config";
+ private static final String KEY_ACTIVE = "key_active";
/**
* These values are matched in string arrays -- changes must be kept in sync
@@ -126,6 +127,7 @@
private AccessPointListener mAccessPointListener;
private Object mTag;
+ private boolean isCurrentConnected = false;
public AccessPoint(Context context, Bundle savedState) {
mContext = context;
@@ -154,6 +156,9 @@
mScanResultCache.put(result.BSSID, result);
}
}
+ if (savedState.containsKey(KEY_ACTIVE)) {
+ isCurrentConnected = (savedState.getInt(KEY_ACTIVE) == 1);
+ }
update(mConfig, mInfo, mNetworkInfo);
mRssi = getRssi();
mSeen = getSeen();
@@ -239,7 +244,7 @@
public boolean matches(WifiConfiguration config) {
if (config.isPasspoint() && mConfig != null && mConfig.isPasspoint()) {
- return config.FQDN.equals(mConfig.providerFriendlyName);
+ return config.FQDN.equals(mConfig.FQDN);
} else {
return ssid.equals(removeDoubleQuotes(config.SSID))
&& security == getSecurity(config)
@@ -256,6 +261,28 @@
networkId = WifiConfiguration.INVALID_NETWORK_ID;
}
+ public boolean isFils256Supported() {
+ Map<String, ScanResult> list = mScanResultCache.snapshot();
+ for (ScanResult result : list.values()) {
+ if (result.capabilities.contains("FILS-SHA256-CCMP") ||
+ result.capabilities.contains("FILS-SHA256")) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public boolean isFils384Supported() {
+ Map<String, ScanResult> list = mScanResultCache.snapshot();
+ for (ScanResult result : list.values()) {
+ if (result.capabilities.contains("FILS-SHA384-CCMP") ||
+ result.capabilities.contains("FILS-SHA384")) {
+ return true;
+ }
+ }
+ return false;
+ }
+
public WifiInfo getInfo() {
return mInfo;
}
@@ -356,7 +383,7 @@
}
public DetailedState getDetailedState() {
- if (mNetworkInfo != null) {
+ if (mNetworkInfo != null && isCurrentConnected) {
return mNetworkInfo.getDetailedState();
}
Log.w(TAG, "NetworkInfo is null, cannot return detailed state");
@@ -443,7 +470,7 @@
if (WifiTracker.sVerboseLogging > 0) {
// Add RSSI/band information for this config, what was seen up to 6 seconds ago
// verbose WiFi Logging is only turned on thru developers settings
- if (mInfo != null && mNetworkInfo != null) { // This is the active connection
+ if (mInfo != null && mNetworkInfo != null && isCurrentConnected) { // This is the active connection
summary.append(" f=" + Integer.toString(mInfo.getFrequency()));
}
summary.append(" " + getVisibilityStatus());
@@ -606,8 +633,8 @@
*/
public boolean isActive() {
return mNetworkInfo != null &&
- (networkId != WifiConfiguration.INVALID_NETWORK_ID ||
- mNetworkInfo.getState() != State.DISCONNECTED);
+ ((networkId != WifiConfiguration.INVALID_NETWORK_ID ||
+ mNetworkInfo.getState() != State.DISCONNECTED) && isCurrentConnected);
}
public boolean isConnectable() {
@@ -616,7 +643,8 @@
public boolean isEphemeral() {
return mInfo != null && mInfo.isEphemeral() &&
- mNetworkInfo != null && mNetworkInfo.getState() != State.DISCONNECTED;
+ mNetworkInfo != null && isCurrentConnected &&
+ mNetworkInfo.getState() != State.DISCONNECTED;
}
public boolean isPasspoint() {
@@ -701,6 +729,7 @@
if (mNetworkInfo != null) {
savedState.putParcelable(KEY_NETWORKINFO, mNetworkInfo);
}
+ savedState.putInt(KEY_ACTIVE, (isCurrentConnected ? 1 : 0));
}
public void setListener(AccessPointListener listener) {
@@ -717,9 +746,10 @@
int oldLevel = getLevel();
int oldRssi = getRssi();
+ int newRssi = result.level;
mSeen = getSeen();
- mRssi = (getRssi() + oldRssi)/2;
- int newLevel = getLevel();
+ mRssi = (newRssi + oldRssi)/2;
+ int newLevel = WifiManager.calculateSignalLevel(mRssi, SIGNAL_LEVELS);
if (newLevel > 0 && newLevel != oldLevel && mAccessPointListener != null) {
mAccessPointListener.onLevelChanged(this);
@@ -741,17 +771,19 @@
boolean update(WifiConfiguration config, WifiInfo info, NetworkInfo networkInfo) {
boolean reorder = false;
if (info != null && isInfoForThisAccessPoint(config, info)) {
- reorder = (mInfo == null);
+ reorder = !isCurrentConnected;
mRssi = info.getRssi();
mInfo = info;
mNetworkInfo = networkInfo;
+ isCurrentConnected = true;
if (mAccessPointListener != null) {
mAccessPointListener.onAccessPointChanged(this);
}
} else if (mInfo != null) {
reorder = true;
- mInfo = null;
- mNetworkInfo = null;
+ if (isCurrentConnected) {
+ isCurrentConnected = false;
+ }
if (mAccessPointListener != null) {
mAccessPointListener.onAccessPointChanged(this);
}
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
index 7d279eb..dd167d8 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiTracker.java
@@ -149,6 +149,7 @@
mFilter.addAction(WifiManager.CONFIGURED_NETWORKS_CHANGED_ACTION);
mFilter.addAction(WifiManager.LINK_CONFIGURATION_CHANGED_ACTION);
mFilter.addAction(WifiManager.NETWORK_STATE_CHANGED_ACTION);
+ mFilter.addAction(WifiManager.ACTION_AUTH_PASSWORD_WRONG);
mNetworkRequest = new NetworkRequest.Builder()
.clearCapabilities()
@@ -353,7 +354,7 @@
// If saved network not present in scan result then set its Rssi to MAX_VALUE
boolean apFound = false;
for (ScanResult result : results) {
- if (result.SSID.equals(accessPoint.getSsidStr())) {
+ if (accessPoint.matches(result)) {
apFound = true;
break;
}
@@ -398,7 +399,7 @@
if (result.isPasspointNetwork()) {
WifiConfiguration config = mWifiManager.getMatchingWifiConfig(result);
- if (config != null) {
+ if (config != null && config.SSID.equals(result.SSID)) {
accessPoint.update(config);
}
}
@@ -537,7 +538,11 @@
mWorkHandler.sendEmptyMessage(WorkHandler.MSG_UPDATE_ACCESS_POINTS);
mWorkHandler.obtainMessage(WorkHandler.MSG_UPDATE_NETWORK_INFO, info)
.sendToTarget();
+ } else if (WifiManager.ACTION_AUTH_PASSWORD_WRONG.equals(action)) {
+ Toast.makeText(context, R.string.wifi_auth_password_wrong,
+ Toast.LENGTH_SHORT).show();
}
+
}
};
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index a536874..9b50dc0 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -36,7 +36,7 @@
<fraction name="def_window_transition_scale">100%</fraction>
<bool name="def_haptic_feedback">true</bool>
- <bool name="def_bluetooth_on">true</bool>
+ <bool name="def_bluetooth_on">false</bool>
<bool name="def_wifi_display_on">false</bool>
<bool name="def_install_non_market_apps">false</bool>
<bool name="def_package_verifier_enable">true</bool>
@@ -49,6 +49,8 @@
<bool name="def_netstats_enabled">true</bool>
<bool name="def_usb_mass_storage_enabled">true</bool>
<bool name="def_wifi_on">false</bool>
+ <bool name="def_show_password_on">true</bool>
+ <bool name="config_show_password_on">false</bool>
<!-- 0 == never, 1 == only when plugged in, 2 == always -->
<integer name="def_wifi_sleep_policy">2</integer>
<bool name="def_networks_available_notification_on">true</bool>
@@ -220,4 +222,81 @@
<!-- Default setting for ability to add users from the lock screen -->
<bool name="def_add_users_from_lockscreen">false</bool>
+
+ <!-- custom system sound or not -->
+ <bool name="def_custom_sys_volume">false</bool>
+
+ <!-- Ringtone Volume,its value is from 0 to 7,default value is 5 -->
+ <integer name="def_ringtone_volume" translatable="false">5</integer>
+
+ <!-- Music Volume,its value is from 0 to 15,default value is 11 -->
+ <integer name="def_music_volume" translatable="false">11</integer>
+
+ <!-- Voice Call Volume,its value is from 0 to 5,default value is 4 -->
+ <integer name="def_voice_call_volume" translatable="false">4</integer>
+
+ <!-- Alarm Volume,its value is from 0 to 7,default value is 6 -->
+ <integer name="def_alarm_volume" translatable="false">6</integer>
+
+ <!-- Notification Volume,its value is from 0 to 7,default value is 5 -->
+ <integer name="def_notification_volume" translatable="false">5</integer>
+
+ <!-- Ringtone headset Volume,its value is from 0 to 7,default value is 5 -->
+ <integer name="def_ringtone_headset_volume" translatable="false">5</integer>
+
+ <!-- Music headset Volume,its value is from 0 to 15,default value is 11 -->
+ <integer name="def_music_headset_volume" translatable="false">11</integer>
+
+ <!-- Voice Call headset Volume,its value is from 0 to 5,default value is 4 -->
+ <integer name="def_voice_call_headset_volume" translatable="false">4</integer>
+
+ <!-- Alarm headset Volume,its value is from 0 to 7,default value is 6 -->
+ <integer name="def_alarm_headset_volume" translatable="false">6</integer>
+
+ <!-- Notification headset Volume,its value is from 0 to 7,default value is 5 -->
+ <integer name="def_notification_headset_volume" translatable="false">5</integer>
+
+ <!-- Ringtone speaker Volume,its value is from 0 to 7,default value is 5 -->
+ <integer name="def_ringtone_speaker_volume" translatable="false">5</integer>
+
+ <!-- Music speaker Volume,its value is from 0 to 15,default value is 11 -->
+ <integer name="def_music_speaker_volume" translatable="false">11</integer>
+
+ <!-- Voice Call speaker Volume,its value is from 0 to 5,default value is 4 -->
+ <integer name="def_voice_call_speaker_volume" translatable="false">4</integer>
+
+ <!-- Alarm speaker Volume,its value is from 0 to 7,default value is 6 -->
+ <integer name="def_alarm_speaker_volume" translatable="false">6</integer>
+
+ <!-- Notification speaker Volume,its value is from 0 to 7,default value is 5 -->
+ <integer name="def_notification_speaker_volume" translatable="false">5</integer>
+
+ <!-- Voice Call earpiece Volume,its value is from 0 to 5,default value is 4 -->
+ <integer name="def_voice_call_earpiece_volume" translatable="false">4</integer>
+
+ <!-- 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"></string>
+
+ <!-- Time format,default value is 24 : 24 format,other value is 12 format -->
+ <string name="def_time_format" translatable="false"></string>
+
+ <!-- enable accessibility or not,1:enable;0:disable -->
+ <integer name="def_enable_accessibility">0</integer>
+
+ <!-- for enable accessibility services,split by ":" ,
+ example "com.google.android.marvin.talkback/
+ com.google.android.marvin.talkback.TalkBackService" -->
+ <string name="def_enable_accessibility_services" translatable="false"></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 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>
+ <!-- Default for Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED -->
+ <integer name="def_captive_portal_detection_enabled" translatable="false">1</integer>
</resources>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index d55bb4f..998efd9c 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -40,6 +40,7 @@
import android.provider.Settings;
import android.provider.Settings.Global;
import android.provider.Settings.Secure;
+import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
@@ -1406,6 +1407,7 @@
if (upgradeVersion == 88) {
if (mUserHandle == UserHandle.USER_SYSTEM) {
db.beginTransaction();
+ SQLiteStatement stmt = null;
try {
String[] settingsToMove = {
Settings.Global.BATTERY_DISCHARGE_DURATION_THRESHOLD,
@@ -1425,7 +1427,6 @@
Settings.Global.SYS_STORAGE_FULL_THRESHOLD_BYTES,
Settings.Global.SYNC_MAX_RETRY_DELAY_IN_SECONDS,
Settings.Global.CONNECTIVITY_CHANGE_DELAY,
- Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED,
Settings.Global.CAPTIVE_PORTAL_SERVER,
Settings.Global.NSD_ON,
Settings.Global.SET_INSTALL_LOCATION,
@@ -1441,9 +1442,16 @@
Settings.Global.DEFAULT_DNS_SERVER,
};
moveSettingsToNewTable(db, TABLE_SECURE, TABLE_GLOBAL, settingsToMove, true);
+
+ stmt = db.compileStatement("INSERT OR REPLACE INTO global(name,value)"
+ + " VALUES(?,?);");
+ loadIntegerSetting(stmt, Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED,
+ R.integer.def_captive_portal_detection_enabled);
+ stmt.close();
db.setTransactionSuccessful();
} finally {
db.endTransaction();
+ if (stmt != null) stmt.close();
}
}
upgradeVersion = 89;
@@ -2389,6 +2397,14 @@
loadBooleanSetting(stmt, Settings.System.NOTIFICATION_LIGHT_PULSE,
R.bool.def_notification_pulse);
+ final boolean isShowPassword =
+ mContext.getResources().getBoolean(R.bool.config_show_password_on);
+ if (isShowPassword) {
+ loadBooleanSetting(stmt, Settings.System.TEXT_SHOW_PASSWORD,
+ R.bool.def_show_password_on);
+ }
+
+
loadUISoundEffectsSettings(stmt);
loadIntegerSetting(stmt, Settings.System.POINTER_SPEED,
@@ -2615,6 +2631,13 @@
SystemProperties.get("ro.com.android.dataroaming",
"false")) ? 1 : 0);
+ int phoneCount = TelephonyManager.getDefault().getPhoneCount();
+ for (int phoneId = 0; phoneId < phoneCount; phoneId++) {
+ loadSetting(stmt, Settings.Global.DATA_ROAMING + phoneId,
+ "true".equalsIgnoreCase(SystemProperties.get(
+ "ro.com.android.dataroaming", "true")) ? 1 : 0);
+ }
+
loadBooleanSetting(stmt, Settings.Global.DEVICE_PROVISIONED,
R.bool.def_device_provisioned);
@@ -2638,6 +2661,14 @@
SystemProperties.get("ro.com.android.mobiledata",
"true")) ? 1 : 0);
+ // SUB specific flags for Multisim devices
+ for (int phoneId = 0; phoneId < phoneCount; phoneId++) {
+ // Mobile Data default, based on build
+ loadSetting(stmt, Settings.Global.MOBILE_DATA + phoneId,
+ "true".equalsIgnoreCase(SystemProperties.get(
+ "ro.com.android.mobiledata", "true")) ? 1 : 0);
+ }
+
loadBooleanSetting(stmt, Settings.Global.NETSTATS_ENABLED,
R.bool.def_netstats_enabled);
@@ -2689,13 +2720,24 @@
loadSetting(stmt, Settings.Global.CALL_AUTO_RETRY, 0);
// Set the preferred network mode to target desired value or Default
- // value defined in RILConstants
- int type;
- type = RILConstants.PREFERRED_NETWORK_MODE;
- loadSetting(stmt, Settings.Global.PREFERRED_NETWORK_MODE, type);
+ // value defined in system property
+ String val = "";
+ String mode = "";
+ for (int phoneId = 0; phoneId < phoneCount; phoneId++) {
+ mode = TelephonyManager.getTelephonyProperty(phoneId,
+ "ro.telephony.default_network",
+ Integer.toString(RILConstants.NETWORK_MODE_GSM_ONLY));
+ if (phoneId == 0) {
+ val = mode;
+ } else {
+ val = val + "," + mode;
+ }
+ }
+ loadSetting(stmt, Settings.Global.PREFERRED_NETWORK_MODE, val);
// Set the preferred cdma subscription source to target desired value or default
// value defined in CdmaSubscriptionSourceManager
+ int type;
type = SystemProperties.getInt("ro.telephony.default_cdma_sub",
CdmaSubscriptionSourceManager.PREFERRED_CDMA_SUBSCRIPTION);
loadSetting(stmt, Settings.Global.CDMA_SUBSCRIPTION_MODE, type);
@@ -2713,7 +2755,6 @@
loadSetting(stmt, Settings.Global.ENHANCED_4G_MODE_ENABLED,
ImsConfig.FeatureValueConstants.ON);
-
/*
* IMPORTANT: Do not add any more upgrade steps here as the global,
* secure, and system settings are no longer stored in a database
@@ -2721,6 +2762,8 @@
*
* See: SettingsProvider.UpgradeController#onUpgradeLocked
*/
+ loadIntegerSetting(stmt, Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED,
+ R.integer.def_captive_portal_detection_enabled);
} finally {
if (stmt != null) stmt.close();
}
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
index fec33a2..faf1807 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
@@ -129,6 +129,11 @@
private static final String TABLE_BOOKMARKS = "bookmarks";
private static final String TABLE_ANDROID_METADATA = "android_metadata";
+ private static final String HEADSET = "_headset";
+ private static final String HEADPHONE = "_headphone";
+ private static final String SPEAKER = "_speaker";
+ private static final String EARPIECE = "_earpiece";
+
// The set of removed legacy tables.
private static final Set<String> REMOVED_LEGACY_TABLES = new ArraySet<>();
static {
@@ -2178,6 +2183,139 @@
return getSettingsLocked(SETTINGS_TYPE_SYSTEM, userId);
}
+ private void loadCustomizedVolumeLevels(SettingsState systemSettings) {
+
+ systemSettings.updateSettingLocked(Settings.System.VOLUME_MUSIC,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_music_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.updateSettingLocked(Settings.System.VOLUME_RING,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_ringtone_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.updateSettingLocked(Settings.System.VOLUME_VOICE,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_voice_call_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.updateSettingLocked(Settings.System.VOLUME_ALARM,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_alarm_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.updateSettingLocked(Settings.System.VOLUME_NOTIFICATION,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_notification_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ // set headset default volume
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_MUSIC + HEADSET,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_music_headset_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_RING + HEADSET,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_ringtone_headset_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_VOICE + HEADSET,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_voice_call_headset_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_ALARM + HEADSET,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_alarm_headset_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_NOTIFICATION + HEADSET,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_notification_headset_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ // set headphone default volume
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_MUSIC + HEADPHONE,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_music_headset_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_RING + HEADPHONE,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_ringtone_headset_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_VOICE + HEADPHONE,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_voice_call_headset_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_ALARM + HEADPHONE,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_alarm_headset_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_NOTIFICATION + HEADPHONE,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_notification_headset_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ // set speaker default volume
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_MUSIC + SPEAKER,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_music_speaker_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_RING + SPEAKER,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_ringtone_speaker_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_VOICE + SPEAKER,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_voice_call_speaker_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_ALARM + SPEAKER,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_alarm_speaker_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_NOTIFICATION + SPEAKER,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_notification_speaker_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+
+ // set earpiece default volume
+ systemSettings.insertSettingLocked(Settings.System.VOLUME_VOICE + EARPIECE,
+ Integer.toString(
+ getContext().getResources().getInteger(
+ R.integer.def_voice_call_earpiece_volume)),
+ SettingsState.SYSTEM_PACKAGE_NAME);
+ }
+
/**
* You must perform all necessary mutations to bring the settings
* for this user from the old to the new version. When you add a new
@@ -2258,6 +2396,60 @@
defaultComponent,
SettingsState.SYSTEM_PACKAGE_NAME);
}
+
+ // Allow OEMs to set volumes in resources.
+ if (getContext().getResources().getBoolean(R.bool.def_custom_sys_volume)) {
+ final SettingsState systemSettings = getSystemSettingsLocked(userId);
+ loadCustomizedVolumeLevels(systemSettings);
+ }
+ // Allow OEMs to set date format, time format and enable/disable accessibility
+ // services in resource.
+ final SettingsState dateAndTimeSettings = getSystemSettingsLocked(userId);
+ String defaultStringComponent;
+ int defaultIntComponent;
+ defaultStringComponent = getContext().getResources().getString(
+ R.string.def_date_format);
+ if (!TextUtils.isEmpty(defaultStringComponent)) {
+ dateAndTimeSettings.insertSettingLocked(Settings.System.DATE_FORMAT,
+ defaultStringComponent,SettingsState.SYSTEM_PACKAGE_NAME);
+ }
+ defaultStringComponent = getContext().getResources().getString(
+ R.string.def_time_format);
+ if (!TextUtils.isEmpty(defaultStringComponent)) {
+ dateAndTimeSettings.insertSettingLocked(Settings.System.TIME_12_24,
+ defaultStringComponent,SettingsState.SYSTEM_PACKAGE_NAME);
+ }
+ defaultIntComponent = getContext().getResources().getInteger(
+ R.integer.def_enable_accessibility);
+ if (defaultIntComponent != 0) {
+ secureSettings.insertSettingLocked(Settings.Secure.ACCESSIBILITY_ENABLED,
+ String.valueOf(defaultIntComponent), SettingsState.SYSTEM_PACKAGE_NAME);
+ }
+ defaultStringComponent = getContext().getResources().getString(
+ R.string.def_enable_accessibility_services);
+ if (!TextUtils.isEmpty(defaultStringComponent)) {
+ secureSettings.insertSettingLocked(Settings.Secure.
+ ENABLED_ACCESSIBILITY_SERVICES,defaultStringComponent,
+ SettingsState.SYSTEM_PACKAGE_NAME);
+ }
+ // Allow openmarket OEMs to set default customized
+ defaultComponent
+ = getContext().getResources().getString(R.string.def_input_method);
+ if (!TextUtils.isEmpty(defaultComponent)) {
+ secureSettings.insertSettingLocked(
+ Settings.Secure.DEFAULT_INPUT_METHOD,
+ defaultComponent,
+ SettingsState.SYSTEM_PACKAGE_NAME);
+ }
+
+ defaultComponent = getContext().getResources()
+ .getString(R.string.def_enable_input_methods);
+ if (!TextUtils.isEmpty(defaultComponent)) {
+ secureSettings.insertSettingLocked(
+ Settings.Secure.ENABLED_INPUT_METHODS,
+ defaultComponent,
+ SettingsState.SYSTEM_PACKAGE_NAME);
+ }
currentVersion = 122;
}
diff --git a/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java b/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java
old mode 100644
new mode 100755
index e453cf5..2713e54
--- a/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java
+++ b/packages/SharedStorageBackup/src/com/android/sharedstoragebackup/SharedStorageAgent.java
@@ -13,6 +13,9 @@
import java.io.File;
import java.io.IOException;
+import android.os.SystemProperties;
+import android.content.Intent;
+import android.net.Uri;
public class SharedStorageAgent extends FullBackupAgent {
static final String TAG = "SharedStorageAgent";
@@ -93,5 +96,13 @@
}
FullBackup.restoreFile(data, size, type, -1, mtime, outFile);
+ if (isStrictOpEnable()) {
+ getApplicationContext().sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE,
+ Uri.fromFile(outFile)));
+ }
+ }
+
+ private boolean isStrictOpEnable() {
+ return SystemProperties.getBoolean("persist.sys.strict_op_enable", false);
}
}
diff --git a/packages/SystemUI/Android.mk b/packages/SystemUI/Android.mk
index ad3c26b..ae5bdd0 100644
--- a/packages/SystemUI/Android.mk
+++ b/packages/SystemUI/Android.mk
@@ -30,7 +30,7 @@
framework-protos \
SystemUI-proto-tags
-LOCAL_JAVA_LIBRARIES := telephony-common
+LOCAL_JAVA_LIBRARIES := telephony-common telephony-ext
LOCAL_PACKAGE_NAME := SystemUI
LOCAL_CERTIFICATE := platform
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_1x.png
new file mode 100755
index 0000000..551c672
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_3g.png
new file mode 100755
index 0000000..aee2cf2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_4g.png
new file mode 100755
index 0000000..28bdabb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_e.png
new file mode 100755
index 0000000..a6d4672
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_g.png
new file mode 100755
index 0000000..c9a6c8e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_h.png
new file mode 100755
index 0000000..83aa3c7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_hp.png
new file mode 100755
index 0000000..7f86ac3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_connected_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_hp.png
new file mode 100755
index 0000000..46dc18b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_fully_connected_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_1x.png
new file mode 100644
index 0000000..818e292
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_3g.png
new file mode 100644
index 0000000..95866b1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_4g.png
new file mode 100644
index 0000000..1aea612
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_4g_plus.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_4g_plus.png
new file mode 100755
index 0000000..6412f33
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_4g_plus.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_e.png
new file mode 100644
index 0000000..016b30b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_g.png
new file mode 100644
index 0000000..ec672eb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_h.png
new file mode 100644
index 0000000..27bab73
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_idle_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_1x.png
new file mode 100644
index 0000000..66fb60e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_3g.png
new file mode 100644
index 0000000..07ea499
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_4g.png
new file mode 100644
index 0000000..879c703
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_4g_plus.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_4g_plus.png
new file mode 100755
index 0000000..239bcf7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_4g_plus.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_e.png
new file mode 100644
index 0000000..e39767a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_g.png
new file mode 100644
index 0000000..47c1fca
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_h.png
new file mode 100644
index 0000000..ac80dce
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_in_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_4g.png
new file mode 100644
index 0000000..c5edf2c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_4g_plus.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_4g_plus.png
new file mode 100755
index 0000000..7ccb9dca
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_4g_plus.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_e.png
new file mode 100644
index 0000000..0ef4701
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_h.png
new file mode 100644
index 0000000..ed02984
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inandout_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inout_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inout_1x.png
new file mode 100644
index 0000000..f88091b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inout_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inout_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inout_3g.png
new file mode 100644
index 0000000..95bb3cd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inout_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inout_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inout_g.png
new file mode 100644
index 0000000..31b926b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_inout_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_1x.png
new file mode 100644
index 0000000..0ee5b08
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_3g.png
new file mode 100644
index 0000000..cac7802
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_4g.png
new file mode 100644
index 0000000..ddf88be
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_4g_plus.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_4g_plus.png
new file mode 100755
index 0000000..214dd07
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_4g_plus.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_e.png
new file mode 100644
index 0000000..df6e195
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_g.png
new file mode 100644
index 0000000..4a2f867
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_h.png
new file mode 100644
index 0000000..2b4628f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_data_out_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_no_sim1_new.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_no_sim1_new.png
new file mode 100644
index 0000000..16f8254
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_no_sim1_new.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_no_sim2_new.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_no_sim2_new.png
new file mode 100644
index 0000000..f9ddcd7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_no_sim2_new.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_no_sim_1.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_no_sim_1.png
new file mode 100644
index 0000000..fbcf293
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_no_sim_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_3g.png
new file mode 100644
index 0000000..453cffb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_4g.png
new file mode 100644
index 0000000..ec1a23e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_g.png
new file mode 100644
index 0000000..a43d883
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_h.png
new file mode 100644
index 0000000..8b2c611
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_hp.png
new file mode 100644
index 0000000..badc93d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_3g.png
new file mode 100644
index 0000000..af71600
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_4g.png
new file mode 100644
index 0000000..24be336
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_g.png
new file mode 100644
index 0000000..3e5bb79
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_h.png
new file mode 100644
index 0000000..a1102d6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_hp.png
new file mode 100644
index 0000000..cee81b3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_3g.png
new file mode 100644
index 0000000..453cffb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_4g.png
new file mode 100644
index 0000000..76bf51c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_g.png
new file mode 100644
index 0000000..a43d883
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_h.png
new file mode 100644
index 0000000..8b2c611
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_hp.png
new file mode 100644
index 0000000..8f536d9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_3g.png
new file mode 100644
index 0000000..af71600
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_4g.png
new file mode 100644
index 0000000..222a65f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_g.png
new file mode 100644
index 0000000..3e5bb79
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_h.png
new file mode 100644
index 0000000..a1102d6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_hp.png
new file mode 100644
index 0000000..42c2b3c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_0_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_3g.png
new file mode 100644
index 0000000..6a34d7c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_4g.png
new file mode 100644
index 0000000..4dc30ee
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_g.png
new file mode 100644
index 0000000..9b6ff77
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_h.png
new file mode 100644
index 0000000..477dd57
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_hp.png
new file mode 100644
index 0000000..94dfff0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_3g.png
new file mode 100644
index 0000000..d1bfb5e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_4g.png
new file mode 100644
index 0000000..40c0972
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_g.png
new file mode 100644
index 0000000..52c01e0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_h.png
new file mode 100644
index 0000000..13e1dad
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_hp.png
new file mode 100644
index 0000000..ab40c2f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_3g.png
new file mode 100644
index 0000000..f9adf5e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_4g.png
new file mode 100644
index 0000000..74c614ccf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_g.png
new file mode 100644
index 0000000..5cb8c27
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_h.png
new file mode 100644
index 0000000..a47d44d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_hp.png
new file mode 100644
index 0000000..3130da3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_3g.png
new file mode 100644
index 0000000..70b639a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_4g.png
new file mode 100644
index 0000000..8a267f0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_g.png
new file mode 100644
index 0000000..5ed5310
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_h.png
new file mode 100644
index 0000000..7f919e9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_hp.png
new file mode 100644
index 0000000..b3f07ba
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_1_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_3g.png
new file mode 100644
index 0000000..3de1d95
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_4g.png
new file mode 100644
index 0000000..046714b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_g.png
new file mode 100644
index 0000000..8330577
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_h.png
new file mode 100644
index 0000000..261644a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_hp.png
new file mode 100644
index 0000000..acf7cfe
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_3g.png
new file mode 100644
index 0000000..f84cd0a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_4g.png
new file mode 100644
index 0000000..55f57d6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_g.png
new file mode 100644
index 0000000..0f67463
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_h.png
new file mode 100644
index 0000000..9ab998b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_hp.png
new file mode 100644
index 0000000..659efb4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_3g.png
new file mode 100644
index 0000000..f7bfe98
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_4g.png
new file mode 100644
index 0000000..2135915
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_g.png
new file mode 100644
index 0000000..69e649f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_h.png
new file mode 100644
index 0000000..30fc05b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_hp.png
new file mode 100644
index 0000000..aed8179
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_3g.png
new file mode 100644
index 0000000..617af25
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_4g.png
new file mode 100644
index 0000000..33c4abd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_g.png
new file mode 100644
index 0000000..6eee465
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_h.png
new file mode 100644
index 0000000..4fea813b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_hp.png
new file mode 100644
index 0000000..e76c53f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_2_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_3g.png
new file mode 100644
index 0000000..bb7bc97
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_4g.png
new file mode 100644
index 0000000..97120a9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_g.png
new file mode 100644
index 0000000..7e1c061
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_h.png
new file mode 100644
index 0000000..2992e5c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_hp.png
new file mode 100644
index 0000000..ceb1c2c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_3g.png
new file mode 100644
index 0000000..e98751c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_4g.png
new file mode 100644
index 0000000..f3419fd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_g.png
new file mode 100644
index 0000000..262eda9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_h.png
new file mode 100644
index 0000000..cda6d0a0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_hp.png
new file mode 100644
index 0000000..c5a0a60
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_3g.png
new file mode 100644
index 0000000..e9fd96a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_4g.png
new file mode 100644
index 0000000..ca418ca
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_g.png
new file mode 100644
index 0000000..3a21521
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_h.png
new file mode 100644
index 0000000..ad3f81c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_hp.png
new file mode 100644
index 0000000..a9a7191
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_3g.png
new file mode 100644
index 0000000..44284d8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_4g.png
new file mode 100644
index 0000000..a8c6c32
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_g.png
new file mode 100644
index 0000000..4292538
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_h.png
new file mode 100644
index 0000000..65c0e2d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_hp.png
new file mode 100644
index 0000000..bdf6790
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_3_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_3g.png
new file mode 100644
index 0000000..7993fc2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_4g.png
new file mode 100644
index 0000000..849796a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_g.png
new file mode 100644
index 0000000..0eae5ef
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_h.png
new file mode 100644
index 0000000..e7894dc
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_hp.png
new file mode 100644
index 0000000..0d55f93c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_3g.png
new file mode 100644
index 0000000..a21eb1d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_4g.png
new file mode 100644
index 0000000..012eb8a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_g.png
new file mode 100644
index 0000000..cd37c32
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_h.png
new file mode 100644
index 0000000..1d77c30
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_hp.png
new file mode 100644
index 0000000..978c284
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_3g.png
new file mode 100644
index 0000000..aba3a69
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_4g.png
new file mode 100644
index 0000000..7ee0c63
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_g.png
new file mode 100644
index 0000000..ad17c61
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_h.png
new file mode 100644
index 0000000..9d710b1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_hp.png
new file mode 100644
index 0000000..73c369f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_3g.png
new file mode 100644
index 0000000..06416c3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_4g.png
new file mode 100644
index 0000000..2479783
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_g.png
new file mode 100644
index 0000000..61f6a88
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_h.png
new file mode 100644
index 0000000..e4441e3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_hp.png
new file mode 100644
index 0000000..8503fbf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_r_signal_4_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x.png
new file mode 100644
index 0000000..e75b98f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_fully.png
new file mode 100644
index 0000000..e75b98f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_fully_roam.png
new file mode 100644
index 0000000..5b07468
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_only.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_only.png
new file mode 100644
index 0000000..b93b0a0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_only.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_only_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_only_fully.png
new file mode 100644
index 0000000..b93b0a0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_only_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_only_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_only_fully_roam.png
new file mode 100644
index 0000000..5103f77
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_only_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_only_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_only_roam.png
new file mode 100644
index 0000000..5103f77
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_only_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_roam.png
new file mode 100644
index 0000000..5b07468
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_1x_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g.png
new file mode 100644
index 0000000..79aabb7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_default.png
new file mode 100644
index 0000000..750b8db
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_default_fully.png
new file mode 100644
index 0000000..e9236b0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_default_fully_roam.png
new file mode 100755
index 0000000..3cf236d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_default_roam.png
new file mode 100755
index 0000000..9550ab5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_fully.png
new file mode 100644
index 0000000..6339bc3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_2g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g.png
new file mode 100644
index 0000000..e11d0b1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_default.png
new file mode 100644
index 0000000..bb68877
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_default_fully.png
new file mode 100644
index 0000000..bb68877
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_default_fully_roam.png
new file mode 100644
index 0000000..917f6cf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_default_roam.png
new file mode 100644
index 0000000..917f6cf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_fully.png
new file mode 100644
index 0000000..e11d0b1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_fully_roam.png
new file mode 100644
index 0000000..bd76da8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_roam.png
new file mode 100644
index 0000000..bd76da8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_3g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g.png
new file mode 100755
index 0000000..f5f74f9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_default.png
new file mode 100755
index 0000000..a33ac2e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_default_fully.png
new file mode 100755
index 0000000..f572200
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_default_fully_roam.png
new file mode 100755
index 0000000..44736da
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_default_roam.png
new file mode 100755
index 0000000..c09a1c0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_fully.png
new file mode 100755
index 0000000..d5c25b3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_default_fully_roam.png
new file mode 100755
index 0000000..fb6cd9d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_default_roam.png
new file mode 100755
index 0000000..fb6cd9d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_e.png
new file mode 100755
index 0000000..651b1ad
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_e_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_e_fully.png
new file mode 100755
index 0000000..71059aa
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_e_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_e_fully_roam.png
new file mode 100755
index 0000000..ac814fd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_e_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_e_roam.png
new file mode 100755
index 0000000..e8826aa
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim.png
new file mode 100755
index 0000000..0fd09d7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_3g.png
new file mode 100644
index 0000000..8276cc9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_4g.png
new file mode 100644
index 0000000..68c871a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_g.png
new file mode 100644
index 0000000..189c78a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_h.png
new file mode 100644
index 0000000..c6f889b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_hp.png
new file mode 100644
index 0000000..11e32c0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_3g.png
new file mode 100644
index 0000000..15edf67
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_4g.png
new file mode 100644
index 0000000..e17d458
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_g.png
new file mode 100644
index 0000000..36b847e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_h.png
new file mode 100644
index 0000000..7e43f76
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_hp.png
new file mode 100644
index 0000000..63fe13d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_g.png
new file mode 100644
index 0000000..3145814
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_g_fully.png
new file mode 100644
index 0000000..3145814
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_g_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_g_fully_roam.png
new file mode 100644
index 0000000..106e546
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_g_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_g_roam.png
new file mode 100644
index 0000000..106e546
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_gsm.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_gsm.png
new file mode 100755
index 0000000..2a56bce
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_gsm_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_gsm_fully.png
new file mode 100755
index 0000000..415658b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim.png
new file mode 100755
index 0000000..da941c8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_3g.png
new file mode 100644
index 0000000..8276cc9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_4g.png
new file mode 100644
index 0000000..80dcbe2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_g.png
new file mode 100644
index 0000000..189c78a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_h.png
new file mode 100644
index 0000000..c6f889b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_hp.png
new file mode 100644
index 0000000..abd7f92
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_3g.png
new file mode 100644
index 0000000..15edf67
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_4g.png
new file mode 100644
index 0000000..386a1ac
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_g.png
new file mode 100644
index 0000000..36b847e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_h.png
new file mode 100644
index 0000000..7e43f76
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_hp.png
new file mode 100644
index 0000000..c9daf03
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_0_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x.png
new file mode 100644
index 0000000..cb12346
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_fully.png
new file mode 100644
index 0000000..5714b95
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_fully_roam.png
new file mode 100644
index 0000000..5a8271c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_only.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_only.png
new file mode 100644
index 0000000..e40825e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_only.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_only_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_only_fully.png
new file mode 100644
index 0000000..a69eca4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_only_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_only_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_only_fully_roam.png
new file mode 100644
index 0000000..022ec4a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_only_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_only_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_only_roam.png
new file mode 100644
index 0000000..1bbf432
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_only_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_roam.png
new file mode 100644
index 0000000..9e4ce76
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_1x_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g.png
new file mode 100644
index 0000000..8784452
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_default.png
new file mode 100644
index 0000000..8bd6786
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_default_fully.png
new file mode 100644
index 0000000..38f5704
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_default_fully_roam.png
new file mode 100755
index 0000000..48f1af9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_default_roam.png
new file mode 100755
index 0000000..d821549
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_fully.png
new file mode 100644
index 0000000..e201a00
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_2g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g.png
new file mode 100644
index 0000000..368ada3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_default.png
new file mode 100644
index 0000000..4bd8efb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_default_fully.png
new file mode 100644
index 0000000..f36be76
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_default_fully_roam.png
new file mode 100644
index 0000000..55a7b40
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_default_roam.png
new file mode 100644
index 0000000..daed782
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_fully.png
new file mode 100644
index 0000000..bf644de
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_fully_roam.png
new file mode 100644
index 0000000..a0004f0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_roam.png
new file mode 100644
index 0000000..eed77ab
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_3g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g.png
new file mode 100755
index 0000000..c7d855e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_default.png
new file mode 100755
index 0000000..42ba3f9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_default_fully.png
new file mode 100755
index 0000000..009fd7d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_default_fully_roam.png
new file mode 100755
index 0000000..d58b9a3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_default_roam.png
new file mode 100755
index 0000000..3ae325b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_fully.png
new file mode 100755
index 0000000..4ca959f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_default_fully_roam.png
new file mode 100755
index 0000000..cce1bb4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_default_roam.png
new file mode 100755
index 0000000..41791cb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_e.png
new file mode 100755
index 0000000..660842f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_e_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_e_fully.png
new file mode 100755
index 0000000..da72330
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_e_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_e_fully_roam.png
new file mode 100755
index 0000000..be05ea6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_e_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_e_roam.png
new file mode 100755
index 0000000..cb3ec07
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim.png
new file mode 100755
index 0000000..fe71893
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_3g.png
new file mode 100644
index 0000000..ec4e72b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_4g.png
new file mode 100644
index 0000000..f4327b8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_g.png
new file mode 100644
index 0000000..3b4e528
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_h.png
new file mode 100644
index 0000000..939ae38
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_hp.png
new file mode 100644
index 0000000..0cb531e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_3g.png
new file mode 100644
index 0000000..3ee5d1e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_4g.png
new file mode 100644
index 0000000..ca4769a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_g.png
new file mode 100644
index 0000000..6bc60e8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_h.png
new file mode 100644
index 0000000..1d4949d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_hp.png
new file mode 100644
index 0000000..950b936
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_g.png
new file mode 100644
index 0000000..d05e974
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_g_fully.png
new file mode 100644
index 0000000..f0656f3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_g_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_g_fully_roam.png
new file mode 100644
index 0000000..49dee6d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_g_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_g_roam.png
new file mode 100644
index 0000000..dab2dc7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_gsm.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_gsm.png
new file mode 100755
index 0000000..1628632
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_gsm_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_gsm_fully.png
new file mode 100755
index 0000000..7526746
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim.png
new file mode 100755
index 0000000..fd8d2f2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_3g.png
new file mode 100644
index 0000000..8771fa0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_4g.png
new file mode 100644
index 0000000..c8bdad7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_g.png
new file mode 100644
index 0000000..57038ec
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_h.png
new file mode 100644
index 0000000..9f6a514
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_hp.png
new file mode 100644
index 0000000..3e27781
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_3g.png
new file mode 100644
index 0000000..ce788e6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_4g.png
new file mode 100644
index 0000000..e917bfd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_g.png
new file mode 100644
index 0000000..99edb6a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_h.png
new file mode 100644
index 0000000..9660fae
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_hp.png
new file mode 100644
index 0000000..6eaa344
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1x_in.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1x_in.png
new file mode 100644
index 0000000..6a16578
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1x_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1x_inout.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1x_inout.png
new file mode 100644
index 0000000..17237930
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1x_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1x_no.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1x_no.png
new file mode 100644
index 0000000..893033a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1x_no.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1x_out.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1x_out.png
new file mode 100644
index 0000000..bef5211
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_1x_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x.png
new file mode 100644
index 0000000..f5b898e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_fully.png
new file mode 100644
index 0000000..363a1a9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_fully_roam.png
new file mode 100644
index 0000000..acd014d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_only.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_only.png
new file mode 100644
index 0000000..825eef4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_only.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_only_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_only_fully.png
new file mode 100644
index 0000000..0696fea
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_only_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_only_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_only_fully_roam.png
new file mode 100644
index 0000000..887c6c6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_only_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_only_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_only_roam.png
new file mode 100644
index 0000000..8921687
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_only_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_roam.png
new file mode 100644
index 0000000..ce372b7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_1x_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g.png
new file mode 100644
index 0000000..7f18a2e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_default.png
new file mode 100644
index 0000000..66842551
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_default_fully.png
new file mode 100644
index 0000000..d9b7c80
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_default_fully_roam.png
new file mode 100755
index 0000000..37d6b53
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_default_roam.png
new file mode 100755
index 0000000..b971b3c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_fully.png
new file mode 100644
index 0000000..5f41237
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_2g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g.png
new file mode 100644
index 0000000..e327167
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_default.png
new file mode 100644
index 0000000..9cdff01
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_default_fully.png
new file mode 100644
index 0000000..b7b21d3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_default_fully_roam.png
new file mode 100644
index 0000000..05068b2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_default_roam.png
new file mode 100644
index 0000000..c352e4f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_fully.png
new file mode 100644
index 0000000..4f22987
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_fully_roam.png
new file mode 100644
index 0000000..b5760f0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_roam.png
new file mode 100644
index 0000000..ee1b26f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_3g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g.png
new file mode 100755
index 0000000..2d574bf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_default.png
new file mode 100755
index 0000000..588b5a99
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_default_fully.png
new file mode 100755
index 0000000..3cb4ee0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_default_fully_roam.png
new file mode 100755
index 0000000..4ea7ff2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_default_roam.png
new file mode 100755
index 0000000..e4e842c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_fully.png
new file mode 100755
index 0000000..758fc22
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_default_fully_roam.png
new file mode 100755
index 0000000..a1f78ef
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_default_roam.png
new file mode 100755
index 0000000..74d45b6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_e.png
new file mode 100755
index 0000000..f314c15
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_e_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_e_fully.png
new file mode 100755
index 0000000..b5cbd09
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_e_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_e_fully_roam.png
new file mode 100755
index 0000000..20c7362
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_e_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_e_roam.png
new file mode 100755
index 0000000..aee5871
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim.png
new file mode 100755
index 0000000..a6c61ff
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_3g.png
new file mode 100644
index 0000000..0ca7ff3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_4g.png
new file mode 100644
index 0000000..58be4c9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_g.png
new file mode 100644
index 0000000..cf39dd5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_h.png
new file mode 100644
index 0000000..e5a5461
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_hp.png
new file mode 100644
index 0000000..5594991
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_3g.png
new file mode 100644
index 0000000..d90ca35
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_4g.png
new file mode 100644
index 0000000..deea9b4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_g.png
new file mode 100644
index 0000000..3e5de5b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_h.png
new file mode 100644
index 0000000..f30da37
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_hp.png
new file mode 100644
index 0000000..7af7fe7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_g.png
new file mode 100644
index 0000000..54a55c6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_g_fully.png
new file mode 100644
index 0000000..91cbc677
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_g_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_g_fully_roam.png
new file mode 100644
index 0000000..4820651
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_g_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_g_roam.png
new file mode 100644
index 0000000..736d41c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_gsm.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_gsm.png
new file mode 100755
index 0000000..2b82165
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_gsm_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_gsm_fully.png
new file mode 100755
index 0000000..91aba68
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim.png
new file mode 100755
index 0000000..3b4aaa1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_3g.png
new file mode 100644
index 0000000..6c20e8b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_4g.png
new file mode 100644
index 0000000..e4fa22e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_g.png
new file mode 100644
index 0000000..8f0c5f5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_h.png
new file mode 100644
index 0000000..dd0ee24
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_hp.png
new file mode 100644
index 0000000..5a90d1f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_3g.png
new file mode 100644
index 0000000..51074be
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_4g.png
new file mode 100644
index 0000000..a3bf393
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_g.png
new file mode 100644
index 0000000..31e0894
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_h.png
new file mode 100644
index 0000000..330aa08
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_hp.png
new file mode 100644
index 0000000..ed316f0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_in.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_in.png
new file mode 100644
index 0000000..bce78ac
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_inout.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_inout.png
new file mode 100644
index 0000000..3a90366
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_no.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_no.png
new file mode 100644
index 0000000..49e4f07
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_no.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_out.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_out.png
new file mode 100644
index 0000000..9e45681
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_2g_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x.png
new file mode 100644
index 0000000..a7d7d75
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_fully.png
new file mode 100644
index 0000000..7b34688
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_fully_roam.png
new file mode 100644
index 0000000..08940ce
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_only.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_only.png
new file mode 100644
index 0000000..ec12d28
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_only.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_only_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_only_fully.png
new file mode 100644
index 0000000..5235b7d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_only_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_only_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_only_fully_roam.png
new file mode 100644
index 0000000..6f5beb4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_only_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_only_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_only_roam.png
new file mode 100644
index 0000000..f6c6f29
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_only_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_roam.png
new file mode 100644
index 0000000..1362fa3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_1x_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g.png
new file mode 100644
index 0000000..53552e4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_default.png
new file mode 100644
index 0000000..e3e8eb4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_default_fully.png
new file mode 100644
index 0000000..4291595
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_default_fully_roam.png
new file mode 100755
index 0000000..19c9a3d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_default_roam.png
new file mode 100755
index 0000000..6119135
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_fully.png
new file mode 100644
index 0000000..6d08ace
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_2g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g.png
new file mode 100644
index 0000000..ddb640d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_default.png
new file mode 100644
index 0000000..3910203
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_default_fully.png
new file mode 100644
index 0000000..b6b440b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_default_fully_roam.png
new file mode 100644
index 0000000..1ce09dd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_default_roam.png
new file mode 100644
index 0000000..9a0aabf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_fully.png
new file mode 100644
index 0000000..fd571a0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_fully_roam.png
new file mode 100644
index 0000000..94c60c3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_roam.png
new file mode 100644
index 0000000..9d18bf7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_3g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g.png
new file mode 100755
index 0000000..5090082
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_default.png
new file mode 100755
index 0000000..112011b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_default_fully.png
new file mode 100755
index 0000000..34d6635
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_default_fully_roam.png
new file mode 100755
index 0000000..7334cb6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_default_roam.png
new file mode 100755
index 0000000..c6e4917b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_fully.png
new file mode 100755
index 0000000..5eaae02
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_default_fully_roam.png
new file mode 100755
index 0000000..ca4db23
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_default_roam.png
new file mode 100755
index 0000000..135a412
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_e.png
new file mode 100755
index 0000000..9ea742c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_e_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_e_fully.png
new file mode 100755
index 0000000..d708edc
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_e_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_e_fully_roam.png
new file mode 100755
index 0000000..6ffb032
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_e_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_e_roam.png
new file mode 100755
index 0000000..61c7e2ae
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim.png
new file mode 100755
index 0000000..ba4a9d9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_3g.png
new file mode 100644
index 0000000..b5e83d4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_4g.png
new file mode 100644
index 0000000..e49c37c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_g.png
new file mode 100644
index 0000000..2e0fd9a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_h.png
new file mode 100644
index 0000000..d77d3b65
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_hp.png
new file mode 100644
index 0000000..52e9bb8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_3g.png
new file mode 100644
index 0000000..9ab6e83
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_4g.png
new file mode 100644
index 0000000..e4ea116
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_g.png
new file mode 100644
index 0000000..e9e8737
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_h.png
new file mode 100644
index 0000000..550e424
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_hp.png
new file mode 100644
index 0000000..65d87bf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_g.png
new file mode 100644
index 0000000..05f62dc
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_g_fully.png
new file mode 100644
index 0000000..5a3e1fe
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_g_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_g_fully_roam.png
new file mode 100644
index 0000000..9fb6209
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_g_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_g_roam.png
new file mode 100644
index 0000000..02e6059
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_gsm.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_gsm.png
new file mode 100755
index 0000000..84ae508
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_gsm_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_gsm_fully.png
new file mode 100755
index 0000000..a141e80
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim.png
new file mode 100755
index 0000000..873a317
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_3g.png
new file mode 100644
index 0000000..79964b37
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_4g.png
new file mode 100644
index 0000000..1efc1e6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_g.png
new file mode 100644
index 0000000..1238d36
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_h.png
new file mode 100644
index 0000000..128e994
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_hp.png
new file mode 100644
index 0000000..d737b59
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_3g.png
new file mode 100644
index 0000000..596d4c7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_4g.png
new file mode 100644
index 0000000..1095985
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_g.png
new file mode 100644
index 0000000..fb62ca9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_h.png
new file mode 100644
index 0000000..edc3d67
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_hp.png
new file mode 100644
index 0000000..7da7832
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_in.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_in.png
new file mode 100755
index 0000000..fe25c2c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_inout.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_inout.png
new file mode 100755
index 0000000..316de05
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_no.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_no.png
new file mode 100755
index 0000000..5e6b817
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_no.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_out.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_out.png
new file mode 100755
index 0000000..f001a11
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_3g_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x.png
new file mode 100644
index 0000000..bf9cbf7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_fully.png
new file mode 100644
index 0000000..c8d6f50
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_fully_roam.png
new file mode 100644
index 0000000..3421cfa
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_only.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_only.png
new file mode 100644
index 0000000..f9a9508
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_only.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_only_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_only_fully.png
new file mode 100644
index 0000000..6a27527
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_only_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_only_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_only_fully_roam.png
new file mode 100644
index 0000000..6c8fcfd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_only_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_only_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_only_roam.png
new file mode 100644
index 0000000..b5ab01b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_only_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_roam.png
new file mode 100644
index 0000000..633e933
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_1x_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g.png
new file mode 100644
index 0000000..29d6f9d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_default.png
new file mode 100644
index 0000000..761685d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_default_fully.png
new file mode 100644
index 0000000..7f37ccf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_default_fully_roam.png
new file mode 100755
index 0000000..dbde94f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_default_roam.png
new file mode 100755
index 0000000..77bf21f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_fully.png
new file mode 100644
index 0000000..1f4076c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_2g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g.png
new file mode 100644
index 0000000..df37519
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_default.png
new file mode 100644
index 0000000..a203298
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_default_fully.png
new file mode 100644
index 0000000..caa4a4d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_default_fully_roam.png
new file mode 100644
index 0000000..d4c907e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_default_roam.png
new file mode 100644
index 0000000..43fe719
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_fully.png
new file mode 100644
index 0000000..12be96a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_fully_roam.png
new file mode 100644
index 0000000..69bc103
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_roam.png
new file mode 100644
index 0000000..5c5863d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_3g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g.png
new file mode 100755
index 0000000..a381225
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_default.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_default.png
new file mode 100755
index 0000000..b3df2c9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_default_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_default_fully.png
new file mode 100755
index 0000000..468c0f7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_default_fully_roam.png
new file mode 100755
index 0000000..7332ddf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_default_roam.png
new file mode 100755
index 0000000..dcce912
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_fully.png
new file mode 100755
index 0000000..6d4f357
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_default_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_default_fully_roam.png
new file mode 100755
index 0000000..76a1301
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_default_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_default_roam.png
new file mode 100755
index 0000000..03ff3b6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_e.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_e.png
new file mode 100755
index 0000000..7d5bbfd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_e_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_e_fully.png
new file mode 100755
index 0000000..c6657fb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_e_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_e_fully_roam.png
new file mode 100755
index 0000000..c1e71a5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_e_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_e_roam.png
new file mode 100755
index 0000000..64485e5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim.png
new file mode 100755
index 0000000..79c2ec1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_3g.png
new file mode 100644
index 0000000..76fd989
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_4g.png
new file mode 100644
index 0000000..6dd8a68
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_g.png
new file mode 100644
index 0000000..ffb5d50
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_h.png
new file mode 100644
index 0000000..f1a36a3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_hp.png
new file mode 100644
index 0000000..d33b99b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_3g.png
new file mode 100644
index 0000000..f0a6621
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_4g.png
new file mode 100644
index 0000000..df1395d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_g.png
new file mode 100644
index 0000000..36f7b33
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_h.png
new file mode 100644
index 0000000..07d5e2eb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_hp.png
new file mode 100644
index 0000000..51ed57e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_g.png
new file mode 100644
index 0000000..8ce7eeb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_g_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_g_fully.png
new file mode 100644
index 0000000..abc5155
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_g_fully_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_g_fully_roam.png
new file mode 100644
index 0000000..4665f01
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_g_roam.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_g_roam.png
new file mode 100644
index 0000000..4c496a7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_gsm.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_gsm.png
new file mode 100755
index 0000000..eaa6a53
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_gsm_fully.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_gsm_fully.png
new file mode 100755
index 0000000..c97f738
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim.png
new file mode 100755
index 0000000..d2381fcc
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_3g.png
new file mode 100644
index 0000000..a4a217b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_4g.png
new file mode 100644
index 0000000..2585797
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_g.png
new file mode 100644
index 0000000..1e5f672
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_h.png
new file mode 100644
index 0000000..d166694
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_hp.png
new file mode 100644
index 0000000..1ece322
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_3g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_3g.png
new file mode 100644
index 0000000..9d13891
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_4g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_4g.png
new file mode 100644
index 0000000..4ee5031
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_g.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_g.png
new file mode 100644
index 0000000..d2058d2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_h.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_h.png
new file mode 100644
index 0000000..b6695bf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_hp.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_hp.png
new file mode 100644
index 0000000..ff9ba0b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_in.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_in.png
new file mode 100755
index 0000000..7ccf35c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_inout.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_inout.png
new file mode 100755
index 0000000..ad68409
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_no.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_no.png
new file mode 100755
index 0000000..854f9e3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_no.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_out.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_out.png
new file mode 100755
index 0000000..abe5cef
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_plus_in.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_plus_in.png
new file mode 100755
index 0000000..c85c7b2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_plus_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_plus_inout.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_plus_inout.png
new file mode 100755
index 0000000..cb4214d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_plus_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_plus_no.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_plus_no.png
new file mode 100755
index 0000000..c5c9b2d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_plus_no.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_plus_out.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_plus_out.png
new file mode 100755
index 0000000..9af3c47
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_4g_plus_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_e_in.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_e_in.png
new file mode 100644
index 0000000..a037253
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_e_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_e_inout.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_e_inout.png
new file mode 100644
index 0000000..1c71f83
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_e_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_e_no.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_e_no.png
new file mode 100644
index 0000000..cd94520
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_e_no.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_e_out.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_e_out.png
new file mode 100644
index 0000000..0d73b0f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_e_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_g_in.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_g_in.png
new file mode 100644
index 0000000..1a1342c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_g_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_g_inout.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_g_inout.png
new file mode 100644
index 0000000..54f349d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_g_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_g_no.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_g_no.png
new file mode 100644
index 0000000..008f13c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_g_no.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_g_out.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_g_out.png
new file mode 100644
index 0000000..d887334
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_g_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_h_in.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_h_in.png
new file mode 100644
index 0000000..59b33c1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_h_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_h_inout.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_h_inout.png
new file mode 100644
index 0000000..31a27e9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_h_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_h_no.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_h_no.png
new file mode 100644
index 0000000..14443bb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_h_no.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_h_out.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_h_out.png
new file mode 100644
index 0000000..d0cda18
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_h_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_hp_in.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_hp_in.png
new file mode 100644
index 0000000..2a484a7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_hp_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_hp_inout.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_hp_inout.png
new file mode 100644
index 0000000..e1847b2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_hp_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_hp_no.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_hp_no.png
new file mode 100644
index 0000000..25d1042
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_hp_no.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_hp_out.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_hp_out.png
new file mode 100644
index 0000000..1deef41f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_hp_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_in.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_in.png
new file mode 100644
index 0000000..6e84546
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null_1.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null_1.png
new file mode 100644
index 0000000..cb3e630
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null_sim1.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null_sim1.png
new file mode 100644
index 0000000..2ba7fd2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null_sim1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null_sim2.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null_sim2.png
new file mode 100644
index 0000000..834c80a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_null_sim2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_out.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_out.png
new file mode 100644
index 0000000..11ffbde
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_r_in.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_r_in.png
new file mode 100644
index 0000000..cc59f7c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_r_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_r_inout.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_r_inout.png
new file mode 100644
index 0000000..8ba3dd2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_r_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_r_no.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_r_no.png
new file mode 100644
index 0000000..29d4e60
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_r_no.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_r_out.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_r_out.png
new file mode 100644
index 0000000..db3889b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_r_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_in.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_in.png
new file mode 100644
index 0000000..2bb923e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_inout.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_inout.png
new file mode 100644
index 0000000..783ad175
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_out.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_out.png
new file mode 100644
index 0000000..e499f9d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/stat_sys_wifi_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_2g.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_2g.png
new file mode 100644
index 0000000..29ff6fe
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_2g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_2g.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_2g.png
new file mode 100644
index 0000000..5bbfa6f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_2g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_hp.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_hp.png
new file mode 100644
index 0000000..6e88bf9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_full_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_hp.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_hp.png
new file mode 100644
index 0000000..59c0e9f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_qs_signal_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_1x.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_1x.png
new file mode 100755
index 0000000..5076cf9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_3g.png
new file mode 100755
index 0000000..3ab8470
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_4g.png
new file mode 100755
index 0000000..83538d4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_e.png
new file mode 100755
index 0000000..aa011ca
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_g.png
new file mode 100755
index 0000000..4cebc43
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_h.png
new file mode 100755
index 0000000..bd2b4ed
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_hp.png
new file mode 100755
index 0000000..dd99d03
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_connected_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_hp.png
new file mode 100755
index 0000000..eca6000
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_data_fully_connected_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_no_sim1_new.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_no_sim1_new.png
new file mode 100644
index 0000000..f4d4685
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_no_sim1_new.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_no_sim2_new.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_no_sim2_new.png
new file mode 100644
index 0000000..929c1f4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_no_sim2_new.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_no_sim_1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_no_sim_1.png
new file mode 100644
index 0000000..5dc627c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_no_sim_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_3g.png
new file mode 100644
index 0000000..ff5c6af
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_4g.png
new file mode 100644
index 0000000..68bfaa9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_g.png
new file mode 100644
index 0000000..3af557f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_h.png
new file mode 100644
index 0000000..162393f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_hp.png
new file mode 100644
index 0000000..f1163cb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_3g.png
new file mode 100644
index 0000000..fe2607f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_4g.png
new file mode 100644
index 0000000..42b9889
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_g.png
new file mode 100644
index 0000000..65c1f29
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_h.png
new file mode 100644
index 0000000..e4485b9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_hp.png
new file mode 100644
index 0000000..669a65d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_3g.png
new file mode 100644
index 0000000..ff5c6af
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_4g.png
new file mode 100644
index 0000000..4dac80f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_g.png
new file mode 100644
index 0000000..3af557f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_h.png
new file mode 100644
index 0000000..162393f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_hp.png
new file mode 100644
index 0000000..dc9deb1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_3g.png
new file mode 100644
index 0000000..fe2607f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_4g.png
new file mode 100644
index 0000000..d598aea
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_g.png
new file mode 100644
index 0000000..65c1f29
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_h.png
new file mode 100644
index 0000000..e4485b9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_hp.png
new file mode 100644
index 0000000..3a449e5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_0_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_3g.png
new file mode 100644
index 0000000..5c730cb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_4g.png
new file mode 100644
index 0000000..61bc6cd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_g.png
new file mode 100644
index 0000000..7c6f6df
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_h.png
new file mode 100644
index 0000000..ba81c49
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_hp.png
new file mode 100644
index 0000000..b82719c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_3g.png
new file mode 100644
index 0000000..243737d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_4g.png
new file mode 100644
index 0000000..36f76c4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_g.png
new file mode 100644
index 0000000..b1254cb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_h.png
new file mode 100644
index 0000000..bcdc841
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_hp.png
new file mode 100644
index 0000000..8128273
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_3g.png
new file mode 100644
index 0000000..31bc62c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_4g.png
new file mode 100644
index 0000000..b34834c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_g.png
new file mode 100644
index 0000000..b988e00
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_h.png
new file mode 100644
index 0000000..70243b1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_hp.png
new file mode 100644
index 0000000..b951e16
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_3g.png
new file mode 100644
index 0000000..ad1f04c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_4g.png
new file mode 100644
index 0000000..601cdb1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_g.png
new file mode 100644
index 0000000..61b14bb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_h.png
new file mode 100644
index 0000000..063458f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_hp.png
new file mode 100644
index 0000000..ab7b1a1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_1_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_3g.png
new file mode 100644
index 0000000..82d26a3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_4g.png
new file mode 100644
index 0000000..1a6ee0e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_g.png
new file mode 100644
index 0000000..83aff3d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_h.png
new file mode 100644
index 0000000..ac04312
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_hp.png
new file mode 100644
index 0000000..cac2e1b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_3g.png
new file mode 100644
index 0000000..5faca75
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_4g.png
new file mode 100644
index 0000000..67b074f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_g.png
new file mode 100644
index 0000000..95c2e06
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_h.png
new file mode 100644
index 0000000..891f9f4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_hp.png
new file mode 100644
index 0000000..647006e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_3g.png
new file mode 100644
index 0000000..db43481
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_4g.png
new file mode 100644
index 0000000..7a9dba2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_g.png
new file mode 100644
index 0000000..8bf18d3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_h.png
new file mode 100644
index 0000000..e172e18
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_hp.png
new file mode 100644
index 0000000..8347aa0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_3g.png
new file mode 100644
index 0000000..f8ab958
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_4g.png
new file mode 100644
index 0000000..097cfc4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_g.png
new file mode 100644
index 0000000..3546860
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_h.png
new file mode 100644
index 0000000..53b74b1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_hp.png
new file mode 100644
index 0000000..b7aca12
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_2_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_3g.png
new file mode 100644
index 0000000..bea4818
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_4g.png
new file mode 100644
index 0000000..5370205
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_g.png
new file mode 100644
index 0000000..f9ec919
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_h.png
new file mode 100644
index 0000000..28bb4c4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_hp.png
new file mode 100644
index 0000000..9fb2ffb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_3g.png
new file mode 100644
index 0000000..173188c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_4g.png
new file mode 100644
index 0000000..221fae0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_g.png
new file mode 100644
index 0000000..ed3c6b3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_h.png
new file mode 100644
index 0000000..6568316
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_hp.png
new file mode 100644
index 0000000..b61f127
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_3g.png
new file mode 100644
index 0000000..57929b3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_4g.png
new file mode 100644
index 0000000..f24da09
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_g.png
new file mode 100644
index 0000000..7f68dda
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_h.png
new file mode 100644
index 0000000..35b004d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_hp.png
new file mode 100644
index 0000000..b1f29bb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_3g.png
new file mode 100644
index 0000000..9e14317
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_4g.png
new file mode 100644
index 0000000..aadbdb3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_g.png
new file mode 100644
index 0000000..c8ad010
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_h.png
new file mode 100644
index 0000000..79b1450
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_hp.png
new file mode 100644
index 0000000..48a57c8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_3_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_3g.png
new file mode 100644
index 0000000..1ab2b2c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_4g.png
new file mode 100644
index 0000000..671914f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_g.png
new file mode 100644
index 0000000..b8df5ce
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_h.png
new file mode 100644
index 0000000..69d8678
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_hp.png
new file mode 100644
index 0000000..0b18b6d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_3g.png
new file mode 100644
index 0000000..982a93e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_4g.png
new file mode 100644
index 0000000..3fa66a2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_g.png
new file mode 100644
index 0000000..64b3ecd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_h.png
new file mode 100644
index 0000000..02004e7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_hp.png
new file mode 100644
index 0000000..ffe7e3a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_3g.png
new file mode 100644
index 0000000..71463be
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_4g.png
new file mode 100644
index 0000000..d61ff7e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_g.png
new file mode 100644
index 0000000..ef30e43
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_h.png
new file mode 100644
index 0000000..2504ed7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_hp.png
new file mode 100644
index 0000000..07bd8b1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_3g.png
new file mode 100644
index 0000000..1d813ef
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_4g.png
new file mode 100644
index 0000000..39309df
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_g.png
new file mode 100644
index 0000000..c86df18
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_h.png
new file mode 100644
index 0000000..1c492e1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_hp.png
new file mode 100644
index 0000000..95a3964
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_r_signal_4_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g.png
new file mode 100755
index 0000000..f11b84e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_default.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_default.png
new file mode 100755
index 0000000..005b3a4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_default_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_default_fully.png
new file mode 100755
index 0000000..6be2156
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_default_fully_roam.png
new file mode 100755
index 0000000..738ddec
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_default_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_default_roam.png
new file mode 100755
index 0000000..6045011
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_fully.png
new file mode 100755
index 0000000..24cbdae
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g.png
new file mode 100755
index 0000000..0a71f59
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_default.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_default.png
new file mode 100755
index 0000000..3a4bd3c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_default_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_default_fully.png
new file mode 100755
index 0000000..2608bc1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_default_fully_roam.png
new file mode 100755
index 0000000..ae85f93
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_default_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_default_roam.png
new file mode 100755
index 0000000..ea320f9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_fully.png
new file mode 100755
index 0000000..7dbba7d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_e.png
new file mode 100755
index 0000000..55521f5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_e_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_e_fully.png
new file mode 100755
index 0000000..b88661d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_e_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_e_fully_roam.png
new file mode 100755
index 0000000..ad8a117
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_e_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_e_roam.png
new file mode 100755
index 0000000..7358b66
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_3g.png
new file mode 100644
index 0000000..5226341
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_4g.png
new file mode 100644
index 0000000..b0b9581
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_g.png
new file mode 100644
index 0000000..429a149
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_h.png
new file mode 100644
index 0000000..49b6554
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_hp.png
new file mode 100644
index 0000000..4b61681
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_3g.png
new file mode 100644
index 0000000..c7385f0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_4g.png
new file mode 100644
index 0000000..08f7b49
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_g.png
new file mode 100644
index 0000000..9296499
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_h.png
new file mode 100644
index 0000000..8eeaca8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_hp.png
new file mode 100644
index 0000000..e29348a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_g.png
new file mode 100755
index 0000000..4fca6a3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_g_fully.png
new file mode 100755
index 0000000..e77a91a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_g_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_g_fully_roam.png
new file mode 100755
index 0000000..7d0d206
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_g_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_g_roam.png
new file mode 100755
index 0000000..e77a626
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_gsm.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_gsm.png
new file mode 100755
index 0000000..b581f5d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_gsm_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_gsm_fully.png
new file mode 100755
index 0000000..370fa88
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_3g.png
new file mode 100644
index 0000000..5226341
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_4g.png
new file mode 100644
index 0000000..85c241e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_g.png
new file mode 100644
index 0000000..429a149
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_h.png
new file mode 100644
index 0000000..49b6554
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_hp.png
new file mode 100644
index 0000000..6158001
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_3g.png
new file mode 100644
index 0000000..c7385f0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_4g.png
new file mode 100644
index 0000000..e3446dd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_g.png
new file mode 100644
index 0000000..9296499
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_h.png
new file mode 100644
index 0000000..8eeaca8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_hp.png
new file mode 100644
index 0000000..67ae589
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_0_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png
new file mode 100755
index 0000000..4305351
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g.png
new file mode 100755
index 0000000..c5dd2c5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_default.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_default.png
new file mode 100755
index 0000000..39218a0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_default_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_default_fully.png
new file mode 100755
index 0000000..eebe87d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_default_fully_roam.png
new file mode 100755
index 0000000..946e832
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_default_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_default_roam.png
new file mode 100755
index 0000000..9c8d910
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_fully.png
new file mode 100755
index 0000000..25d9d06
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g.png
new file mode 100755
index 0000000..7dbe663
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_default.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_default.png
new file mode 100755
index 0000000..16d093d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_default_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_default_fully.png
new file mode 100755
index 0000000..187e0af
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_default_fully_roam.png
new file mode 100755
index 0000000..652cdb0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_default_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_default_roam.png
new file mode 100755
index 0000000..eaf6a27
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_fully.png
new file mode 100755
index 0000000..c591c85
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_e.png
new file mode 100755
index 0000000..d79900c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_e_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_e_fully.png
new file mode 100755
index 0000000..7360d59
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_e_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_e_fully_roam.png
new file mode 100755
index 0000000..05af68e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_e_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_e_roam.png
new file mode 100755
index 0000000..f085372
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_3g.png
new file mode 100644
index 0000000..a314723
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_4g.png
new file mode 100644
index 0000000..2131949
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_g.png
new file mode 100644
index 0000000..ec6ce88
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_h.png
new file mode 100644
index 0000000..f9f00f7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_hp.png
new file mode 100644
index 0000000..41eaea0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_3g.png
new file mode 100644
index 0000000..86ec690
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_4g.png
new file mode 100644
index 0000000..ffa6b71
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_g.png
new file mode 100644
index 0000000..77ee8e4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_h.png
new file mode 100644
index 0000000..bead621
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_hp.png
new file mode 100644
index 0000000..0d34340
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_g.png
new file mode 100755
index 0000000..7c6ef45
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_g_fully.png
new file mode 100755
index 0000000..795f722
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_g_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_g_fully_roam.png
new file mode 100755
index 0000000..b09dd9a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_g_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_g_roam.png
new file mode 100755
index 0000000..2bd02be
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_gsm.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_gsm.png
new file mode 100755
index 0000000..9b068c1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_gsm_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_gsm_fully.png
new file mode 100755
index 0000000..3a0f4f45
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_3g.png
new file mode 100644
index 0000000..9ab76e8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_4g.png
new file mode 100644
index 0000000..eadf888
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_g.png
new file mode 100644
index 0000000..00b9a24
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_h.png
new file mode 100644
index 0000000..9620a0f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_hp.png
new file mode 100644
index 0000000..487cd1f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_3g.png
new file mode 100644
index 0000000..dbfd021
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_4g.png
new file mode 100644
index 0000000..c955503
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_g.png
new file mode 100644
index 0000000..ced6d85
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_h.png
new file mode 100644
index 0000000..b5ad7ca
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_hp.png
new file mode 100644
index 0000000..254211d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_1_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png
new file mode 100755
index 0000000..beb641b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g.png
new file mode 100755
index 0000000..c715e53
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_default.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_default.png
new file mode 100755
index 0000000..6a6a34dd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_default_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_default_fully.png
new file mode 100755
index 0000000..2c2ee21
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_default_fully_roam.png
new file mode 100755
index 0000000..e2cd61e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_default_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_default_roam.png
new file mode 100755
index 0000000..331e52f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_fully.png
new file mode 100755
index 0000000..01b7358
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g.png
new file mode 100755
index 0000000..a79913f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_default.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_default.png
new file mode 100755
index 0000000..89a8720
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_default_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_default_fully.png
new file mode 100755
index 0000000..de92e6d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_default_fully_roam.png
new file mode 100755
index 0000000..b95eb22
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_default_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_default_roam.png
new file mode 100755
index 0000000..9ddf429
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_fully.png
new file mode 100755
index 0000000..06f5ec9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_e.png
new file mode 100755
index 0000000..06638f3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_e_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_e_fully.png
new file mode 100755
index 0000000..6076075
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_e_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_e_fully_roam.png
new file mode 100755
index 0000000..d040a2b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_e_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_e_roam.png
new file mode 100755
index 0000000..fe9f905
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_3g.png
new file mode 100644
index 0000000..e322672
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_4g.png
new file mode 100644
index 0000000..946ae17
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_g.png
new file mode 100644
index 0000000..6756017
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_h.png
new file mode 100644
index 0000000..7f8f8a4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_hp.png
new file mode 100644
index 0000000..b9304e7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_3g.png
new file mode 100644
index 0000000..dfde6ca
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_4g.png
new file mode 100644
index 0000000..180eec9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_g.png
new file mode 100644
index 0000000..4316eff
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_h.png
new file mode 100644
index 0000000..91c9a03
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_hp.png
new file mode 100644
index 0000000..1f6145e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_g.png
new file mode 100755
index 0000000..ba1ff45
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_g_fully.png
new file mode 100755
index 0000000..f7fa38c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_g_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_g_fully_roam.png
new file mode 100755
index 0000000..8355a4a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_g_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_g_roam.png
new file mode 100755
index 0000000..91769b9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_gsm.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_gsm.png
new file mode 100755
index 0000000..2e6bc18
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_gsm_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_gsm_fully.png
new file mode 100755
index 0000000..68c68fc
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_3g.png
new file mode 100644
index 0000000..3763388
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_4g.png
new file mode 100644
index 0000000..88645bc
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_g.png
new file mode 100644
index 0000000..1ef1e120
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_h.png
new file mode 100644
index 0000000..266fa29
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_hp.png
new file mode 100644
index 0000000..fec6ead
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_3g.png
new file mode 100644
index 0000000..f92c9c2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_4g.png
new file mode 100644
index 0000000..5d6645b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_g.png
new file mode 100644
index 0000000..fe80330
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_h.png
new file mode 100644
index 0000000..019e382
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_hp.png
new file mode 100644
index 0000000..003737d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_2_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png
new file mode 100755
index 0000000..a4028cd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g.png
new file mode 100755
index 0000000..6875565
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_default.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_default.png
new file mode 100755
index 0000000..56f83dd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_default_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_default_fully.png
new file mode 100755
index 0000000..42935b6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_default_fully_roam.png
new file mode 100755
index 0000000..b8742a0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_default_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_default_roam.png
new file mode 100755
index 0000000..cf04633
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_fully.png
new file mode 100755
index 0000000..b0073c2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g.png
new file mode 100755
index 0000000..0d93580
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_default.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_default.png
new file mode 100755
index 0000000..bdbce47
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_default_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_default_fully.png
new file mode 100755
index 0000000..347ea6b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_default_fully_roam.png
new file mode 100755
index 0000000..0ade758
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_default_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_default_roam.png
new file mode 100755
index 0000000..69d763d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_fully.png
new file mode 100755
index 0000000..841da56
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_e.png
new file mode 100755
index 0000000..c684a5a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_e_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_e_fully.png
new file mode 100755
index 0000000..d71f85f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_e_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_e_fully_roam.png
new file mode 100755
index 0000000..0e3d718
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_e_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_e_roam.png
new file mode 100755
index 0000000..39fb603
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_3g.png
new file mode 100644
index 0000000..77c354a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_4g.png
new file mode 100644
index 0000000..14926a3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_g.png
new file mode 100644
index 0000000..4bcdc7ba
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_h.png
new file mode 100644
index 0000000..1107844
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_hp.png
new file mode 100644
index 0000000..47ff33d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_3g.png
new file mode 100644
index 0000000..04e45dc
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_4g.png
new file mode 100644
index 0000000..d6078c6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_g.png
new file mode 100644
index 0000000..3c3a6b3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_h.png
new file mode 100644
index 0000000..9871304
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_hp.png
new file mode 100644
index 0000000..7272c32
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_g.png
new file mode 100755
index 0000000..d6e3cac
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_g_fully.png
new file mode 100755
index 0000000..949d58a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_g_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_g_fully_roam.png
new file mode 100755
index 0000000..407e5c1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_g_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_g_roam.png
new file mode 100755
index 0000000..5f05448
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_gsm.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_gsm.png
new file mode 100755
index 0000000..9284534
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_gsm_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_gsm_fully.png
new file mode 100755
index 0000000..f7e1a13
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_3g.png
new file mode 100644
index 0000000..4a894f1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_4g.png
new file mode 100644
index 0000000..51a0f3c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_g.png
new file mode 100644
index 0000000..6fa75b1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_h.png
new file mode 100644
index 0000000..aed1222
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_hp.png
new file mode 100644
index 0000000..49c02b3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_3g.png
new file mode 100644
index 0000000..358eab9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_4g.png
new file mode 100644
index 0000000..a9ba830
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_g.png
new file mode 100644
index 0000000..9235558
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_h.png
new file mode 100644
index 0000000..bc260de
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_hp.png
new file mode 100644
index 0000000..8ad18f0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_3_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png
new file mode 100755
index 0000000..b5ed22b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g.png
new file mode 100755
index 0000000..86fc340
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_default.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_default.png
new file mode 100755
index 0000000..84c4699
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_default_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_default_fully.png
new file mode 100755
index 0000000..8e7ac74
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_default_fully_roam.png
new file mode 100755
index 0000000..fe492fd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_default_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_default_roam.png
new file mode 100755
index 0000000..3ec684e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_fully.png
new file mode 100755
index 0000000..96bbc46
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g.png
new file mode 100755
index 0000000..5c4a61e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_default.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_default.png
new file mode 100755
index 0000000..86b9a88
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_default_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_default_fully.png
new file mode 100755
index 0000000..adcd352
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_default_fully_roam.png
new file mode 100755
index 0000000..f545efe
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_default_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_default_roam.png
new file mode 100755
index 0000000..c2d055a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_fully.png
new file mode 100755
index 0000000..716581f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_e.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_e.png
new file mode 100755
index 0000000..de3917d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_e_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_e_fully.png
new file mode 100755
index 0000000..f5e5958
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_e_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_e_fully_roam.png
new file mode 100755
index 0000000..de44dea
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_e_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_e_roam.png
new file mode 100755
index 0000000..cb068da
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_3g.png
new file mode 100644
index 0000000..c9eb96f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_4g.png
new file mode 100644
index 0000000..72eadc0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_g.png
new file mode 100644
index 0000000..fb4d39e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_h.png
new file mode 100644
index 0000000..e1e215e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_hp.png
new file mode 100644
index 0000000..b47d04f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_3g.png
new file mode 100644
index 0000000..f80b324
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_4g.png
new file mode 100644
index 0000000..63ca13c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_g.png
new file mode 100644
index 0000000..421e8cb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_h.png
new file mode 100644
index 0000000..86748c3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_hp.png
new file mode 100644
index 0000000..3bbc885
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_fully_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_g.png
new file mode 100755
index 0000000..f54d21f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_g_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_g_fully.png
new file mode 100755
index 0000000..474f075
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_g_fully_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_g_fully_roam.png
new file mode 100755
index 0000000..5c7eaae
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_g_roam.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_g_roam.png
new file mode 100755
index 0000000..c65123d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_gsm.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_gsm.png
new file mode 100755
index 0000000..2a86141
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_gsm_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_gsm_fully.png
new file mode 100755
index 0000000..02f3b83
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_3g.png
new file mode 100644
index 0000000..ffd689d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_4g.png
new file mode 100644
index 0000000..b3eb6d9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_g.png
new file mode 100644
index 0000000..1abe466
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_h.png
new file mode 100644
index 0000000..e36e6f2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_hp.png
new file mode 100644
index 0000000..ef872fd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim1_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_3g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_3g.png
new file mode 100644
index 0000000..ccbcfa0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_4g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_4g.png
new file mode 100644
index 0000000..02d8244
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_g.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_g.png
new file mode 100644
index 0000000..83296a5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_h.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_h.png
new file mode 100644
index 0000000..1bf107d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_hp.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_hp.png
new file mode 100644
index 0000000..6c34eab
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_4_sim2_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_in.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_in.png
new file mode 100644
index 0000000..31c0936
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_inout.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_inout.png
new file mode 100644
index 0000000..7e9b752
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null_1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null_1.png
new file mode 100644
index 0000000..ade1828
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null_sim1.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null_sim1.png
new file mode 100644
index 0000000..782d590
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null_sim1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null_sim2.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null_sim2.png
new file mode 100644
index 0000000..61317a6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_null_sim2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_out.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_out.png
new file mode 100644
index 0000000..3209234d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_in.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_in.png
new file mode 100644
index 0000000..95c56ed
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_inout.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_inout.png
new file mode 100644
index 0000000..11b9a93
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_out.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_out.png
new file mode 100644
index 0000000..0f85ca0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_1x.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_1x.png
new file mode 100755
index 0000000..bd31253
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_1x.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_3g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_3g.png
new file mode 100755
index 0000000..5ed365c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_4g.png
new file mode 100755
index 0000000..5b22d20
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_e.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_e.png
new file mode 100755
index 0000000..b156b06
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_g.png
new file mode 100755
index 0000000..f850477
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_h.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_h.png
new file mode 100755
index 0000000..b261c1e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_h.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_hp.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_hp.png
new file mode 100755
index 0000000..6577365
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_connected_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_fully_connected_hp.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_fully_connected_hp.png
new file mode 100755
index 0000000..4172082
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_data_fully_connected_hp.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_0_fully_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_0_fully_sim1_4g.png
new file mode 100644
index 0000000..52569ed
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_0_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_0_fully_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_0_fully_sim2_4g.png
new file mode 100644
index 0000000..034a682
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_0_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_0_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_0_sim1_4g.png
new file mode 100644
index 0000000..1ed366e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_0_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_0_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_0_sim2_4g.png
new file mode 100644
index 0000000..18fe2a2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_0_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_1_fully_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_1_fully_sim1_4g.png
new file mode 100644
index 0000000..175020c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_1_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_1_fully_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_1_fully_sim2_4g.png
new file mode 100644
index 0000000..10e733a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_1_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_1_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_1_sim1_4g.png
new file mode 100644
index 0000000..295e678
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_1_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_1_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_1_sim2_4g.png
new file mode 100644
index 0000000..d36720a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_1_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_2_fully_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_2_fully_sim1_4g.png
new file mode 100644
index 0000000..8044a22
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_2_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_2_fully_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_2_fully_sim2_4g.png
new file mode 100644
index 0000000..256c8d3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_2_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_2_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_2_sim1_4g.png
new file mode 100644
index 0000000..0b4d9cf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_2_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_2_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_2_sim2_4g.png
new file mode 100644
index 0000000..d347e53
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_2_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_3_fully_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_3_fully_sim1_4g.png
new file mode 100644
index 0000000..1b4e28e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_3_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_3_fully_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_3_fully_sim2_4g.png
new file mode 100644
index 0000000..c046535
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_3_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_3_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_3_sim1_4g.png
new file mode 100644
index 0000000..976d87e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_3_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_3_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_3_sim2_4g.png
new file mode 100644
index 0000000..ae2c1b0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_3_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_4_fully_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_4_fully_sim1_4g.png
new file mode 100644
index 0000000..a7b3408
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_4_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_4_fully_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_4_fully_sim2_4g.png
new file mode 100644
index 0000000..8cf9fcf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_4_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_4_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_4_sim1_4g.png
new file mode 100644
index 0000000..92d6840
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_4_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_4_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_4_sim2_4g.png
new file mode 100644
index 0000000..bca3ef6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_r_signal_4_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g.png
new file mode 100755
index 0000000..ec1d104
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_default.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_default.png
new file mode 100755
index 0000000..9f1de41
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_default_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_default_fully.png
new file mode 100755
index 0000000..b5222fc
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_default_fully_roam.png
new file mode 100755
index 0000000..b12b0ed
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_default_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_default_roam.png
new file mode 100755
index 0000000..f333138
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_fully.png
new file mode 100755
index 0000000..12f8875
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g.png
new file mode 100755
index 0000000..9b03d18
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_default.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_default.png
new file mode 100755
index 0000000..ffdc80f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_default_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_default_fully.png
new file mode 100755
index 0000000..ae3d75a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_default_fully_roam.png
new file mode 100755
index 0000000..c67bfe7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_default_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_default_roam.png
new file mode 100755
index 0000000..66019f8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_fully.png
new file mode 100755
index 0000000..d14e689
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_e.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_e.png
new file mode 100755
index 0000000..281afe0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_e_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_e_fully.png
new file mode 100755
index 0000000..083889e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_e_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_e_fully_roam.png
new file mode 100755
index 0000000..c3efed1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_e_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_e_roam.png
new file mode 100755
index 0000000..3fab702
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_fully_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_fully_sim1_4g.png
new file mode 100644
index 0000000..1fc6d0e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_fully_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_fully_sim2_4g.png
new file mode 100644
index 0000000..e28b6f0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_g.png
new file mode 100755
index 0000000..651ea7b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_g_fully.png
new file mode 100755
index 0000000..5942471
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_g_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_g_fully_roam.png
new file mode 100755
index 0000000..9699a3a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_g_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_g_roam.png
new file mode 100755
index 0000000..d976f3d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_gsm.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_gsm.png
new file mode 100755
index 0000000..1422d93
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_gsm_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_gsm_fully.png
new file mode 100755
index 0000000..0ef879b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_sim1_4g.png
new file mode 100644
index 0000000..dfc663d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_sim2_4g.png
new file mode 100644
index 0000000..27be3f8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_0_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1.png
new file mode 100755
index 0000000..9943613
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g.png
new file mode 100755
index 0000000..8ff5ac8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_default.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_default.png
new file mode 100755
index 0000000..655edc3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_default_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_default_fully.png
new file mode 100755
index 0000000..e151a7e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_default_fully_roam.png
new file mode 100755
index 0000000..9dc081b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_default_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_default_roam.png
new file mode 100755
index 0000000..5176104
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_fully.png
new file mode 100755
index 0000000..1c92928
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g.png
new file mode 100755
index 0000000..7ebf56c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_default.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_default.png
new file mode 100755
index 0000000..d781934
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_default_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_default_fully.png
new file mode 100755
index 0000000..71aa042
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_default_fully_roam.png
new file mode 100755
index 0000000..3091f56
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_default_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_default_roam.png
new file mode 100755
index 0000000..60344dd
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_fully.png
new file mode 100755
index 0000000..b6689b5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_e.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_e.png
new file mode 100755
index 0000000..79ca14f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_e_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_e_fully.png
new file mode 100755
index 0000000..e049773
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_e_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_e_fully_roam.png
new file mode 100755
index 0000000..3d5e598
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_e_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_e_roam.png
new file mode 100755
index 0000000..5bec840
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_fully_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_fully_sim1_4g.png
new file mode 100644
index 0000000..3c33f6d
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_fully_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_fully_sim2_4g.png
new file mode 100644
index 0000000..7fc774b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_g.png
new file mode 100755
index 0000000..51187f9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_g_fully.png
new file mode 100755
index 0000000..ea5baa1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_g_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_g_fully_roam.png
new file mode 100755
index 0000000..b3a322c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_g_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_g_roam.png
new file mode 100755
index 0000000..5ac30c8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_gsm.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_gsm.png
new file mode 100755
index 0000000..b5b3611
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_gsm_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_gsm_fully.png
new file mode 100755
index 0000000..7f3f307
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_sim1_4g.png
new file mode 100644
index 0000000..40096e8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_sim2_4g.png
new file mode 100644
index 0000000..5a04863
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_1_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2.png
new file mode 100755
index 0000000..1fc1775
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g.png
new file mode 100755
index 0000000..12a75c69
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_default.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_default.png
new file mode 100755
index 0000000..078f837
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_default_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_default_fully.png
new file mode 100755
index 0000000..f4a0cc2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_default_fully_roam.png
new file mode 100755
index 0000000..20581f7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_default_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_default_roam.png
new file mode 100755
index 0000000..b03871f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_fully.png
new file mode 100755
index 0000000..9583d93
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g.png
new file mode 100755
index 0000000..e9313ec
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_default.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_default.png
new file mode 100755
index 0000000..5a2000b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_default_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_default_fully.png
new file mode 100755
index 0000000..91460b2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_default_fully_roam.png
new file mode 100755
index 0000000..b9d5228
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_default_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_default_roam.png
new file mode 100755
index 0000000..6f6e6f8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_fully.png
new file mode 100755
index 0000000..50cd5b4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_e.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_e.png
new file mode 100755
index 0000000..8439cef
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_e_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_e_fully.png
new file mode 100755
index 0000000..77931bce1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_e_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_e_fully_roam.png
new file mode 100755
index 0000000..2e662e6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_e_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_e_roam.png
new file mode 100755
index 0000000..31f52ac
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_fully_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_fully_sim1_4g.png
new file mode 100644
index 0000000..a9b3b19
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_fully_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_fully_sim2_4g.png
new file mode 100644
index 0000000..736c191
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_g.png
new file mode 100755
index 0000000..f3ffb3b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_g_fully.png
new file mode 100755
index 0000000..6360202
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_g_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_g_fully_roam.png
new file mode 100755
index 0000000..6097971
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_g_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_g_roam.png
new file mode 100755
index 0000000..64cdc95
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_gsm.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_gsm.png
new file mode 100755
index 0000000..6486bbf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_gsm_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_gsm_fully.png
new file mode 100755
index 0000000..95eb1f2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_sim1_4g.png
new file mode 100644
index 0000000..ed09e62
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_sim2_4g.png
new file mode 100644
index 0000000..ca24721
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_2_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3.png
new file mode 100755
index 0000000..82b9741
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g.png
new file mode 100755
index 0000000..61d2d85
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_default.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_default.png
new file mode 100755
index 0000000..69fdc62
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_default_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_default_fully.png
new file mode 100755
index 0000000..13e6090
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_default_fully_roam.png
new file mode 100755
index 0000000..a3310a0
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_default_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_default_roam.png
new file mode 100755
index 0000000..a26b083
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_fully.png
new file mode 100755
index 0000000..fd3dd30
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g.png
new file mode 100755
index 0000000..eb38bbc
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_default.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_default.png
new file mode 100755
index 0000000..cb8fc4f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_default_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_default_fully.png
new file mode 100755
index 0000000..fe055c7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_default_fully_roam.png
new file mode 100755
index 0000000..dcfa904
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_default_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_default_roam.png
new file mode 100755
index 0000000..e7ef1df
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_fully.png
new file mode 100755
index 0000000..e16de169
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_e.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_e.png
new file mode 100755
index 0000000..87e96cc
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_e_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_e_fully.png
new file mode 100755
index 0000000..a2d0faa
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_e_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_e_fully_roam.png
new file mode 100755
index 0000000..6b52c5f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_e_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_e_roam.png
new file mode 100755
index 0000000..477a5fe8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_fully_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_fully_sim1_4g.png
new file mode 100644
index 0000000..52726fe
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_fully_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_fully_sim2_4g.png
new file mode 100644
index 0000000..47422b3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_g.png
new file mode 100755
index 0000000..b29d75e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_g_fully.png
new file mode 100755
index 0000000..8920122
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_g_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_g_fully_roam.png
new file mode 100755
index 0000000..5769b58
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_g_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_g_roam.png
new file mode 100755
index 0000000..1487ca7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_gsm.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_gsm.png
new file mode 100755
index 0000000..e0f48e1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_gsm_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_gsm_fully.png
new file mode 100755
index 0000000..11b6c41e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_sim1_4g.png
new file mode 100644
index 0000000..542884b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_sim2_4g.png
new file mode 100644
index 0000000..8e5f608
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_3_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4.png
new file mode 100755
index 0000000..9f4979c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g.png
new file mode 100755
index 0000000..76893c3
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_default.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_default.png
new file mode 100755
index 0000000..fe5ea01
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_default_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_default_fully.png
new file mode 100755
index 0000000..7576cddab
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_default_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_default_fully_roam.png
new file mode 100755
index 0000000..7cdb571
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_default_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_default_roam.png
new file mode 100755
index 0000000..0799418
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_fully.png
new file mode 100755
index 0000000..82577be
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_3g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g.png
new file mode 100755
index 0000000..4f3494c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_default.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_default.png
new file mode 100755
index 0000000..39d3bee
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_default.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_default_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_default_fully.png
new file mode 100755
index 0000000..38c1a01
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_default_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_default_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_default_fully_roam.png
new file mode 100755
index 0000000..c2452a9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_default_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_default_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_default_roam.png
new file mode 100755
index 0000000..77770e4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_default_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_fully.png
new file mode 100755
index 0000000..24c5910
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_4g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_e.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_e.png
new file mode 100755
index 0000000..cd10b05
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_e.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_e_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_e_fully.png
new file mode 100755
index 0000000..d24e199
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_e_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_e_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_e_fully_roam.png
new file mode 100755
index 0000000..59da70a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_e_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_e_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_e_roam.png
new file mode 100755
index 0000000..ac30d5e
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_e_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_fully_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_fully_sim1_4g.png
new file mode 100644
index 0000000..0338d28
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_fully_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_fully_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_fully_sim2_4g.png
new file mode 100644
index 0000000..231d3c5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_fully_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_g.png
new file mode 100755
index 0000000..5b03544
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_g_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_g_fully.png
new file mode 100755
index 0000000..3ad515c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_g_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_g_fully_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_g_fully_roam.png
new file mode 100755
index 0000000..21d7c38
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_g_fully_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_g_roam.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_g_roam.png
new file mode 100755
index 0000000..5f1dd07
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_g_roam.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_gsm.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_gsm.png
new file mode 100755
index 0000000..2e929d8
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_gsm.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_gsm_fully.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_gsm_fully.png
new file mode 100755
index 0000000..c8aad28
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_gsm_fully.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_sim1_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_sim1_4g.png
new file mode 100644
index 0000000..185e477
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_sim1_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_sim2_4g.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_sim2_4g.png
new file mode 100644
index 0000000..6fac79f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_4_sim2_4g.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_in.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_in.png
new file mode 100644
index 0000000..cc9c49f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_inout.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_inout.png
new file mode 100644
index 0000000..5a313c5
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_out.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_out.png
new file mode 100644
index 0000000..373a4a4
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_wifi_in.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_wifi_in.png
new file mode 100644
index 0000000..d299daf
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_wifi_in.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_wifi_inout.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_wifi_inout.png
new file mode 100644
index 0000000..dcfdb7b
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_wifi_inout.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_wifi_out.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_wifi_out.png
new file mode 100644
index 0000000..fb8125a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xhdpi/stat_sys_wifi_out.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable/ic_qs_signal_3g_plus.xml b/packages/SystemUI/res/drawable/ic_qs_signal_3g_plus.xml
new file mode 100644
index 0000000..198b6f3
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_qs_signal_3g_plus.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015, 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="30dp"
+ android:height="27dp"
+ android:viewportWidth="30"
+ android:viewportHeight="27">
+
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M4.306,7.479h1.003c0.381,0,0.66-0.133,0.84-0.398c0.178-0.267,0.267-0.622,0.267-1.066
+c0-0.195-0.021-0.374-0.062-0.538C6.311,5.313,6.248,5.172,6.162,5.052C6.076,4.933,5.971,4.838,5.844,4.77
+C5.717,4.702,5.57,4.667,5.404,4.667c-0.132,0-0.258,0.027-0.377,0.081C4.907,4.802,4.804,4.88,4.716,4.982
+C4.628,5.084,4.557,5.209,4.504,5.355C4.449,5.502,4.423,5.668,4.423,5.854H2.35c0-0.439,0.078-0.838,0.234-1.197
+C2.74,4.298,2.953,3.992,3.222,3.741C3.49,3.489,3.807,3.294,4.17,3.155c0.363-0.14,0.756-0.209,1.176-0.209
+c0.464,0,0.889,0.064,1.274,0.194c0.386,0.13,0.716,0.323,0.993,0.579c0.275,0.257,0.49,0.574,0.645,0.952
+c0.152,0.379,0.23,0.816,0.23,1.314c0,0.234-0.031,0.463-0.092,0.686c-0.062,0.222-0.15,0.432-0.268,0.63
+C8.012,7.498,7.869,7.682,7.701,7.85c-0.17,0.169-0.363,0.312-0.583,0.429c0.503,0.215,0.878,0.537,1.124,0.967
+c0.246,0.43,0.37,0.938,0.37,1.523c0,0.498-0.085,0.942-0.253,1.333s-0.398,0.719-0.691,0.985s-0.641,0.469-1.041,0.607
+c-0.4,0.14-0.832,0.209-1.296,0.209c-0.391,0-0.771-0.062-1.14-0.184c-0.368-0.122-0.695-0.31-0.98-0.563
+c-0.285-0.253-0.517-0.572-0.692-0.956c-0.176-0.383-0.264-0.839-0.264-1.366h2.073c0,0.195,0.026,0.375,0.08,0.539
+c0.054,0.163,0.127,0.305,0.22,0.425c0.093,0.119,0.204,0.213,0.333,0.281c0.129,0.068,0.272,0.103,0.429,0.103
+c0.181,0,0.342-0.034,0.483-0.103c0.141-0.069,0.262-0.166,0.363-0.293c0.1-0.127,0.176-0.279,0.23-0.457
+c0.053-0.179,0.08-0.378,0.08-0.598c0-0.562-0.109-0.965-0.326-1.212c-0.217-0.246-0.521-0.37-0.912-0.37H4.306V7.479z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M17.459,12.548c-0.111,0.122-0.264,0.262-0.453,0.418c-0.191,0.156-0.428,0.304-0.715,0.443
+c-0.285,0.139-0.621,0.256-1.006,0.352c-0.387,0.095-0.83,0.143-1.334,0.143c-0.596,0-1.133-0.093-1.611-0.278
+s-0.889-0.467-1.23-0.843c-0.341-0.376-0.604-0.851-0.787-1.424c-0.184-0.574-0.274-1.249-0.274-2.025V7.531
+c0-0.776,0.088-1.451,0.264-2.025c0.176-0.573,0.426-1.051,0.751-1.432c0.324-0.381,0.72-0.664,1.186-0.85
+c0.467-0.186,0.99-0.278,1.572-0.278c0.605,0,1.127,0.075,1.566,0.227c0.439,0.152,0.807,0.378,1.1,0.678
+c0.293,0.301,0.518,0.672,0.674,1.113c0.156,0.442,0.256,0.951,0.299,1.527h-2.094c-0.029-0.337-0.076-0.618-0.143-0.843
+s-0.159-0.403-0.279-0.538c-0.119-0.134-0.266-0.23-0.439-0.289c-0.173-0.059-0.379-0.088-0.618-0.088
+c-0.283,0-0.53,0.05-0.739,0.15c-0.211,0.1-0.385,0.261-0.523,0.483c-0.141,0.222-0.244,0.51-0.313,0.864
+c-0.068,0.354-0.102,0.782-0.102,1.285v1.816c0,0.508,0.037,0.938,0.113,1.289c0.075,0.352,0.189,0.639,0.344,0.86
+c0.154,0.223,0.348,0.384,0.582,0.483c0.234,0.101,0.511,0.15,0.828,0.15c0.19,0,0.353-0.015,0.486-0.044
+c0.135-0.029,0.25-0.064,0.346-0.106c0.094-0.041,0.172-0.084,0.234-0.128c0.061-0.044,0.113-0.081,0.156-0.11V9.772h-1.508V8.146
+h3.668L17.459,12.548L17.459,12.548z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M25.234,7.498h2.969v1.734h-2.969v3.383h-1.844V9.232h-2.984V7.498h2.984V4.334h1.844V7.498z" />
+</vector>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/ic_qs_signal_4g_lte.xml b/packages/SystemUI/res/drawable/ic_qs_signal_4g_lte.xml
new file mode 100644
index 0000000..450e4c4
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_qs_signal_4g_lte.xml
@@ -0,0 +1,59 @@
+<!-- Copyright (c) 2015, 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="8dp"
+ android:height="12dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:fillColor="#ffffff"
+ android:pathData="M 9.731,10.4 h 1.349 v 1.437 H 9.731 v 2.37 H 7.956 v -2.37 H 3.49 L
+3.446,10.744 7.905,3.53 h 1.826 v 6.87 z m -4.547,0 H 7.956 V 6.044 L
+7.912,6.038 7.744,6.448 5.184,10.4 z" />
+ <path
+ android:fillColor="#ffffff"
+ android:pathData="M 20.454,12.763 c -0.295,0.414 -0.762,0.785 -1.405,1.11 -0.642,0.326
+-1.472,0.487 -2.49,0.487 -1.259,0 -2.299,-0.406 -3.111,-1.22 -0.815,-0.814
+-1.222,-1.867 -1.222,-3.157 v -2.23 c 0,-1.291 0.396,-2.343 1.182,-3.157
+0.786,-0.814 1.799,-1.221 3.033,-1.221 1.245,0 2.212,0.312 2.905,0.938
+0.695,0.626 1.032,1.442 1.012,2.45 l -0.021,0.043 h -1.694 c 0,-0.601
+-0.187,-1.085 -0.561,-1.452 -0.375,-0.367 -0.91,-0.55 -1.61,-0.55 -0.739,0
+-1.333,0.276 -1.786,0.829 -0.451,0.553 -0.676,1.254 -0.676,2.104 v 2.245 c
+0,0.859 0.234,1.567 0.708,2.123 0.469,0.554 1.086,0.832 1.842,0.832 0.573,0
+1.024,-0.065 1.357,-0.195 0.331,-0.129 0.584,-0.287 0.754,-0.473 V 10.062 H
+16.436 V 8.729 h 4.02 v 4.034 z" />
+ <path
+ android:fillColor="#ffffff"
+ android:pathData="M 17.328,14.854 H 6.574 c -1.904,0 -3.448,1.513 -3.448,3.379 0,1.866 1.544,3.379
+3.448,3.379 h 10.754 c 1.904,0 3.447,-1.513 3.447,-3.379 0,-1.866 -1.543,-3.379
+-3.447,-3.379 z M 6.399,15.538 H 7.65 v 4.427 h 2.313 v 0.962 H 6.399 M
+13.623,16.5 h -1.424 v 4.427 H 10.948 V 16.5 H 9.549 v -0.962 h 4.074 V 16.5 z m
+4.038,0 h -2.279 v 1.159 h 1.898 v 0.962 h -1.898 v 1.344 h 2.275 v 0.962 h
+-3.526 v -5.389 h 3.53 V 16.5 z" />
+</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_signal_4g_plus.xml b/packages/SystemUI/res/drawable/ic_qs_signal_4g_plus.xml
index 4d7f325..8783cc1 100644
--- a/packages/SystemUI/res/drawable/ic_qs_signal_4g_plus.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_signal_4g_plus.xml
@@ -1,4 +1,5 @@
<!--
+
Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/packages/SystemUI/res/drawable/ic_qs_signal_h_plus.xml b/packages/SystemUI/res/drawable/ic_qs_signal_h_plus.xml
new file mode 100755
index 0000000..10912f4
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_qs_signal_h_plus.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015, 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="11dp"
+ android:height="9.9dp"
+ android:viewportWidth="30"
+ android:viewportHeight="27">
+
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M10.099,13.902H7.953V9.339H4.774v4.563H2.621V3.238h2.153v4.313h3.179V3.238h2.146V13.902z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M18.684,7.645h2.969v1.734h-2.969v3.383h-1.845V9.379h-2.984V7.645h2.984V4.48h1.845V7.645z" />
+</vector>
diff --git a/packages/SystemUI/res/drawable/lte_embms_services_all_brackets.xml b/packages/SystemUI/res/drawable/lte_embms_services_all_brackets.xml
new file mode 100644
index 0000000..6fed25b
--- /dev/null
+++ b/packages/SystemUI/res/drawable/lte_embms_services_all_brackets.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2016, 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.
+-->
+<vector android:autoMirrored="true" android:height="17dp"
+ android:viewportHeight="25.0" android:viewportWidth="25.0"
+ android:width="17dp" xmlns:android="http://schemas.android.com/apk/res/android">
+ <path android:fillColor="#FFFFFF" android:pathData="M7.6,13.5h2.5v1H6.4V8.7h1.2V13.5z"/>
+ <path android:fillColor="#FFFFFF" android:pathData="M14.4,9.6h-1.8v4.8h-1.2V9.6H9.7v-1h4.7V9.6z"/>
+ <path android:fillColor="#FFFFFF" android:pathData="M18.5,11.9h-2.3v1.5h2.7v1H15V8.7h3.9v1h-2.7V11h2.3V11.9z"/>
+ <path android:fillColor="#00000000"
+ android:pathData="M2.7,16.1c-1.2,-1.2 -1.8,-2.7 -1.8,-4.4c0,-1.7 0.7,-3.2 1.9,-4.4"
+ android:strokeColor="#FFFFFF" android:strokeLineCap="round" android:strokeWidth="1"/>
+ <path android:fillColor="#00000000"
+ android:pathData="M4.3,14.5c-0.7,-0.7 -1.2,-1.7 -1.2,-2.8c0,-1.1 0.5,-2.1 1.2,-2.9"
+ android:strokeColor="#FFFFFF" android:strokeLineCap="round" android:strokeWidth="1"/>
+ <path android:fillColor="#00000000"
+ android:pathData="M22.3,16.1c1.2,-1.2 1.8,-2.7 1.8,-4.4c0,-1.7 -0.7,-3.2 -1.9,-4.4"
+ android:strokeColor="#FFFFFF" android:strokeLineCap="round" android:strokeWidth="1"/>
+ <path android:fillColor="#00000000"
+ android:pathData="M20.7,14.5c0.7,-0.7 1.2,-1.7 1.2,-2.8c0,-1.1 -0.5,-2.1 -1.2,-2.9"
+ android:strokeColor="#FFFFFF" android:strokeLineCap="round" android:strokeWidth="1"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/rounded_button_shape.xml b/packages/SystemUI/res/drawable/rounded_button_shape.xml
new file mode 100644
index 0000000..c0d4431
--- /dev/null
+++ b/packages/SystemUI/res/drawable/rounded_button_shape.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2016, 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.
+-->
+
+ <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:padding="10dp">
+ <solid android:color="#6E6E6E"/> <!-- this one is ths color of the Rounded Button -->
+ <corners
+ android:bottomRightRadius="10dp"
+ android:bottomLeftRadius="10dp"
+ android:topLeftRadius="10dp"
+ android:topRightRadius="10dp"/>
+ </shape>
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_3g_plus.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_3g_plus.xml
new file mode 100644
index 0000000..c1d8a90
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_3g_plus.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015, 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="15dp"
+ android:height="13.5dp"
+ android:viewportWidth="30"
+ android:viewportHeight="27">
+
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M4.306,7.479h1.003c0.381,0,0.66-0.133,0.84-0.398c0.178-0.267,0.267-0.622,0.267-1.066
+c0-0.195-0.021-0.374-0.062-0.538C6.311,5.313,6.248,5.172,6.162,5.052C6.076,4.933,5.971,4.838,5.844,4.77
+C5.717,4.702,5.57,4.667,5.404,4.667c-0.132,0-0.258,0.027-0.377,0.081C4.907,4.802,4.804,4.88,4.716,4.982
+C4.628,5.084,4.557,5.209,4.504,5.355C4.449,5.502,4.423,5.668,4.423,5.854H2.35c0-0.439,0.078-0.838,0.234-1.197
+C2.74,4.298,2.953,3.992,3.222,3.741C3.49,3.489,3.807,3.294,4.17,3.155c0.363-0.14,0.756-0.209,1.176-0.209
+c0.464,0,0.889,0.064,1.274,0.194c0.386,0.13,0.716,0.323,0.993,0.579c0.275,0.257,0.49,0.574,0.645,0.952
+c0.152,0.379,0.23,0.816,0.23,1.314c0,0.234-0.031,0.463-0.092,0.686c-0.062,0.222-0.15,0.432-0.268,0.63
+C8.012,7.498,7.869,7.682,7.701,7.85c-0.17,0.169-0.363,0.312-0.583,0.429c0.503,0.215,0.878,0.537,1.124,0.967
+c0.246,0.43,0.37,0.938,0.37,1.523c0,0.498-0.085,0.942-0.253,1.333s-0.398,0.719-0.691,0.985s-0.641,0.469-1.041,0.607
+c-0.4,0.14-0.832,0.209-1.296,0.209c-0.391,0-0.771-0.062-1.14-0.184c-0.368-0.122-0.695-0.31-0.98-0.563
+c-0.285-0.253-0.517-0.572-0.692-0.956c-0.176-0.383-0.264-0.839-0.264-1.366h2.073c0,0.195,0.026,0.375,0.08,0.539
+c0.054,0.163,0.127,0.305,0.22,0.425c0.093,0.119,0.204,0.213,0.333,0.281c0.129,0.068,0.272,0.103,0.429,0.103
+c0.181,0,0.342-0.034,0.483-0.103c0.141-0.069,0.262-0.166,0.363-0.293c0.1-0.127,0.176-0.279,0.23-0.457
+c0.053-0.179,0.08-0.378,0.08-0.598c0-0.562-0.109-0.965-0.326-1.212c-0.217-0.246-0.521-0.37-0.912-0.37H4.306V7.479z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M17.459,12.548c-0.111,0.122-0.264,0.262-0.453,0.418c-0.191,0.156-0.428,0.304-0.715,0.443
+c-0.285,0.139-0.621,0.256-1.006,0.352c-0.387,0.095-0.83,0.143-1.334,0.143c-0.596,0-1.133-0.093-1.611-0.278
+s-0.889-0.467-1.23-0.843c-0.341-0.376-0.604-0.851-0.787-1.424c-0.184-0.574-0.274-1.249-0.274-2.025V7.531
+c0-0.776,0.088-1.451,0.264-2.025c0.176-0.573,0.426-1.051,0.751-1.432c0.324-0.381,0.72-0.664,1.186-0.85
+c0.467-0.186,0.99-0.278,1.572-0.278c0.605,0,1.127,0.075,1.566,0.227c0.439,0.152,0.807,0.378,1.1,0.678
+c0.293,0.301,0.518,0.672,0.674,1.113c0.156,0.442,0.256,0.951,0.299,1.527h-2.094c-0.029-0.337-0.076-0.618-0.143-0.843
+s-0.159-0.403-0.279-0.538c-0.119-0.134-0.266-0.23-0.439-0.289c-0.173-0.059-0.379-0.088-0.618-0.088
+c-0.283,0-0.53,0.05-0.739,0.15c-0.211,0.1-0.385,0.261-0.523,0.483c-0.141,0.222-0.244,0.51-0.313,0.864
+c-0.068,0.354-0.102,0.782-0.102,1.285v1.816c0,0.508,0.037,0.938,0.113,1.289c0.075,0.352,0.189,0.639,0.344,0.86
+c0.154,0.223,0.348,0.384,0.582,0.483c0.234,0.101,0.511,0.15,0.828,0.15c0.19,0,0.353-0.015,0.486-0.044
+c0.135-0.029,0.25-0.064,0.346-0.106c0.094-0.041,0.172-0.084,0.234-0.128c0.061-0.044,0.113-0.081,0.156-0.11V9.772h-1.508V8.146
+h3.668L17.459,12.548L17.459,12.548z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M25.234,7.498h2.969v1.734h-2.969v3.383h-1.844V9.232h-2.984V7.498h2.984V4.334h1.844V7.498z" />
+</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g_lte.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g_lte.xml
new file mode 100644
index 0000000..450e4c4
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g_lte.xml
@@ -0,0 +1,59 @@
+<!-- Copyright (c) 2015, 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="8dp"
+ android:height="12dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+ <path
+ android:fillColor="#ffffff"
+ android:pathData="M 9.731,10.4 h 1.349 v 1.437 H 9.731 v 2.37 H 7.956 v -2.37 H 3.49 L
+3.446,10.744 7.905,3.53 h 1.826 v 6.87 z m -4.547,0 H 7.956 V 6.044 L
+7.912,6.038 7.744,6.448 5.184,10.4 z" />
+ <path
+ android:fillColor="#ffffff"
+ android:pathData="M 20.454,12.763 c -0.295,0.414 -0.762,0.785 -1.405,1.11 -0.642,0.326
+-1.472,0.487 -2.49,0.487 -1.259,0 -2.299,-0.406 -3.111,-1.22 -0.815,-0.814
+-1.222,-1.867 -1.222,-3.157 v -2.23 c 0,-1.291 0.396,-2.343 1.182,-3.157
+0.786,-0.814 1.799,-1.221 3.033,-1.221 1.245,0 2.212,0.312 2.905,0.938
+0.695,0.626 1.032,1.442 1.012,2.45 l -0.021,0.043 h -1.694 c 0,-0.601
+-0.187,-1.085 -0.561,-1.452 -0.375,-0.367 -0.91,-0.55 -1.61,-0.55 -0.739,0
+-1.333,0.276 -1.786,0.829 -0.451,0.553 -0.676,1.254 -0.676,2.104 v 2.245 c
+0,0.859 0.234,1.567 0.708,2.123 0.469,0.554 1.086,0.832 1.842,0.832 0.573,0
+1.024,-0.065 1.357,-0.195 0.331,-0.129 0.584,-0.287 0.754,-0.473 V 10.062 H
+16.436 V 8.729 h 4.02 v 4.034 z" />
+ <path
+ android:fillColor="#ffffff"
+ android:pathData="M 17.328,14.854 H 6.574 c -1.904,0 -3.448,1.513 -3.448,3.379 0,1.866 1.544,3.379
+3.448,3.379 h 10.754 c 1.904,0 3.447,-1.513 3.447,-3.379 0,-1.866 -1.543,-3.379
+-3.447,-3.379 z M 6.399,15.538 H 7.65 v 4.427 h 2.313 v 0.962 H 6.399 M
+13.623,16.5 h -1.424 v 4.427 H 10.948 V 16.5 H 9.549 v -0.962 h 4.074 V 16.5 z m
+4.038,0 h -2.279 v 1.159 h 1.898 v 0.962 h -1.898 v 1.344 h 2.275 v 0.962 h
+-3.526 v -5.389 h 3.53 V 16.5 z" />
+</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_h_plus.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_h_plus.xml
new file mode 100644
index 0000000..50e07c2
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_h_plus.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (c) 2015, 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="15dp"
+ android:height="13.5dp"
+ android:viewportWidth="30"
+ android:viewportHeight="27">
+
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M10.099,13.902H7.953V9.339H4.774v4.563H2.621V3.238h2.153v4.313h3.179V3.238h2.146V13.902z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M18.684,7.645h2.969v1.734h-2.969v3.383h-1.845V9.379h-2.984V7.645h2.984V4.48h1.845V7.645z" />
+</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte.xml
index c08ff20..6e6cef2 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte.xml
@@ -14,10 +14,10 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="9.208dp"
- android:height="17dp"
- android:viewportWidth="13.0"
- android:viewportHeight="24.0">
+ android:height="17dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="13.0"
+ android:width="8dp" >
<path
android:fillColor="#FFFFFFFF"
android:pathData="M2.000000,9.700000l2.000000,0.000000L4.000000,11.000000L0.300000,11.000000L0.300000,2.500000L2.000000,2.500000L2.000000,9.700000z"/>
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte_networktype_in_roam.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte_networktype_in_roam.xml
new file mode 100644
index 0000000..390fa13
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte_networktype_in_roam.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2016, 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.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="9.208dp"
+ android:height="17dp"
+ android:viewportWidth="13.0"
+ android:viewportHeight="24.0" >
+
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M2.000000,9.700000l2.000000,0.000000L4.000000,11.000000L0.300000,11.000000L0.300000,2.500000L2.000000,2.500000L2.000000,9.700000z" />
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M8.300000,3.800000L7.000000,3.800000L7.000000,11.000000L5.300000,11.000000L5.300000,3.800000L4.000000,3.800000L4.000000,2.500000l4.300000,0.000000L8.300000,3.800000z" />
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M12.400000,7.300000l-1.700000,0.000000l0.000000,2.400000l2.100000,0.000000L12.799999,11.000000L9.000000,11.000000L9.000000,2.500000l3.700000,0.000000l0.000000,1.300000l-2.100000,0.000000l0.000000,2.100000l1.700000,0.000000L12.300000,7.300000z" />
+
+</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte_plus_networktype_in_roam.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte_plus_networktype_in_roam.xml
new file mode 100644
index 0000000..93ae7bb
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte_plus_networktype_in_roam.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2016, 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.
+-->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="15dp"
+ android:height="13.5dp"
+ android:viewportWidth="30"
+ android:viewportHeight="27">
+
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M3.889,11.969h3.325v1.787h-5.22V3.092h1.895V11.969z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M13.064,4.887h-2.319v8.869H8.844V4.887h-2.28V3.092h6.501V4.887z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M18.999,9.143h-2.951v2.826h3.492v1.787h-5.387V3.092h5.374v1.795h-3.479v2.52h2.951V9.143z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M25.863,7.498h2.969v1.734h-2.969v3.383H24.02V9.232h-2.984V7.498h2.984V4.334h1.844V7.498z" />
+</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_in_auto_mirrored.xml b/packages/SystemUI/res/drawable/stat_sys_signal_in_auto_mirrored.xml
new file mode 100644
index 0000000..90ca731
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_in_auto_mirrored.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015-2016, 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.
+-->
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/stat_sys_signal_in"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_inout_auto_mirrored.xml b/packages/SystemUI/res/drawable/stat_sys_signal_inout_auto_mirrored.xml
new file mode 100644
index 0000000..c428114
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_inout_auto_mirrored.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015-2016, 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.
+-->
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/stat_sys_signal_inout"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_out_auto_mirrored.xml b/packages/SystemUI/res/drawable/stat_sys_signal_out_auto_mirrored.xml
new file mode 100644
index 0000000..ce58d6c
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_out_auto_mirrored.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015-2016, 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.
+-->
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/stat_sys_signal_out"
+ android:autoMirrored="true">
+</bitmap>
diff --git a/packages/SystemUI/res/drawable/volte.xml b/packages/SystemUI/res/drawable/volte.xml
new file mode 100644
index 0000000..e3fd8c5
--- /dev/null
+++ b/packages/SystemUI/res/drawable/volte.xml
@@ -0,0 +1,41 @@
+<!--
+ Copyright (c) 2016, 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.
+-->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="28.0">
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M9.26,11.671c-0.206,0 -0.377,0.086 -0.511,0.259c-0.135,0.172 -0.202,0.434 -0.202,0.785c0,0.357 0.066,0.621 0.2,0.791c0.133,0.172 0.301,0.256 0.503,0.256c0.203,0 0.371,-0.084 0.502,-0.252s0.196,-0.438 0.196,-0.811c0,-0.345 -0.065,-0.604 -0.198,-0.773C9.62,11.756 9.457,11.671 9.26,11.671z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M26.369,7.708H1.63c-0.552,0 -1,0.448 -1,1v6.583c0,0.553 0.448,1 1,1h24.739c0.553,0 1,-0.447 1,-1V8.708C27.369,8.157 26.922,7.708 26.369,7.708zM3.643,14.709L1.716,9.184h1.647L4.51,13.16l1.133,-3.976h1.6L5.35,14.709H3.643zM10.807,14.209c-0.377,0.393 -0.897,0.59 -1.563,0.59c-0.593,0 -1.073,-0.164 -1.439,-0.49c-0.45,-0.404 -0.675,-0.934 -0.675,-1.59c0,-0.611 0.19,-1.113 0.57,-1.509c0.38,-0.395 0.894,-0.594 1.541,-0.594c0.739,0 1.298,0.232 1.676,0.697c0.305,0.375 0.456,0.836 0.456,1.382C11.373,13.313 11.184,13.816 10.807,14.209zM16.182,14.709h-4.034V9.184h1.576v4.164h2.458V14.709L16.182,14.709zM20.969,10.549h-1.607v4.16h-1.573v-4.16H16.18V9.184h4.791v1.365H20.969zM25.977,14.709h-4.299V9.184h4.221v1.18h-2.643v0.878h2.451v1.127h-2.451v1.088h2.721V14.709z" />
+</vector>
diff --git a/packages/SystemUI/res/drawable/vowifi.xml b/packages/SystemUI/res/drawable/vowifi.xml
new file mode 100644
index 0000000..ef83691
--- /dev/null
+++ b/packages/SystemUI/res/drawable/vowifi.xml
@@ -0,0 +1,41 @@
+<!--
+ Copyright (c) 2016, 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.
+-->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="30.0">
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M9.372,11.68c-0.208,0 -0.381,0.086 -0.517,0.258c-0.136,0.173 -0.203,0.435 -0.203,0.787c0,0.355 0.066,0.619 0.201,0.789c0.135,0.172 0.305,0.258 0.508,0.258c0.206,0 0.376,-0.086 0.508,-0.254c0.133,-0.168 0.198,-0.438 0.198,-0.81c0,-0.347 -0.066,-0.604 -0.2,-0.773C9.734,11.765 9.569,11.68 9.372,11.68z" />
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M28.307,7.708H1.752c-0.623,0 -1.129,0.448 -1.129,1v6.583c0,0.553 0.506,1 1.129,1h26.555c0.623,0 1.129,-0.447 1.129,-1V8.708C29.436,8.157 28.93,7.708 28.307,7.708zM3.696,14.717L1.752,9.193h1.663l1.159,3.975l1.145,-3.975h1.615l-1.912,5.523L3.696,14.717L3.696,14.717zM10.934,14.217c-0.381,0.393 -0.907,0.59 -1.579,0.59c-0.6,0 -1.084,-0.164 -1.454,-0.49c-0.455,-0.403 -0.682,-0.934 -0.682,-1.588c0,-0.61 0.191,-1.114 0.576,-1.511c0.384,-0.396 0.902,-0.593 1.556,-0.593c0.748,0 1.313,0.232 1.694,0.697c0.307,0.374 0.46,0.835 0.46,1.383C11.505,13.32 11.314,13.824 10.934,14.217zM17.828,14.717h-1.561l-0.905,-3.478l-0.899,3.478h-1.561l-1.146,-5.523h1.512l0.545,3.092l0.796,-3.092h1.507l0.798,3.088l0.545,-3.088h1.504L17.828,14.717zM21.109,14.717h-1.43V10.94h1.432v3.777H21.109zM20.396,10.482c-0.396,0 -0.717,-0.288 -0.717,-0.645S20,9.193 20.396,9.193c0.395,0 0.715,0.288 0.715,0.645S20.79,10.482 20.396,10.482zM26.061,10.38h-2.336v0.965h1.996v1.115h-1.996v2.257h-1.599V9.193h3.935V10.38zM28.307,14.717h-1.432V10.94h1.432V14.717zM27.591,10.482c-0.396,0 -0.716,-0.288 -0.716,-0.645s0.32,-0.645 0.716,-0.645s0.716,0.288 0.716,0.645S27.984,10.482 27.591,10.482z" />
+</vector>
diff --git a/packages/SystemUI/res/layout/keyguard_bottom_area.xml b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
index 444f0f0..de73538 100644
--- a/packages/SystemUI/res/layout/keyguard_bottom_area.xml
+++ b/packages/SystemUI/res/layout/keyguard_bottom_area.xml
@@ -36,6 +36,15 @@
android:textAppearance="?android:attr/textAppearanceSmall"
android:accessibilityLiveRegion="polite" />
+ <include layout="@layout/keyguard_eca"
+ android:id="@+id/keyguard_selector_fade_container"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="36dp"
+ android:orientation="vertical"
+ android:layout_gravity="bottom|center_horizontal"
+ android:gravity="center_horizontal" />
+
<FrameLayout
android:id="@+id/preview_container"
android:layout_width="match_parent"
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
index a2dfc0d..19e037b5 100644
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -52,7 +52,7 @@
>
<include layout="@layout/system_icons" />
</FrameLayout>
- <TextView android:id="@+id/battery_level"
+ <com.android.systemui.BatteryLevelTextView android:id="@+id/battery_level"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
diff --git a/packages/SystemUI/res/layout/mobile_signal_group.xml b/packages/SystemUI/res/layout/mobile_signal_group.xml
old mode 100644
new mode 100755
index 8b10074..36d659e
--- a/packages/SystemUI/res/layout/mobile_signal_group.xml
+++ b/packages/SystemUI/res/layout/mobile_signal_group.xml
@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
+/*
+ * Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+*/
+/*
**
** Copyright 2011, The Android Open Source Project
**
@@ -16,42 +21,98 @@
** limitations under the License.
*/
-->
-<FrameLayout
+<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res-auto"
android:id="@+id/mobile_combo"
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"
+ <ImageView
+ android:id="@+id/embms"
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"
+ android:layout_marginStart="2dp"
+ android:layout_marginEnd="4dp"
+ android:visibility="gone"
/>
<ImageView
- android:id="@+id/mobile_type"
+ android:id="@+id/dataNetwork_type"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:layout_marginEnd="2dp"
+ android:visibility="gone"
/>
<ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="2dp"
+ android:id="@+id/data_inout"
+ android:visibility="gone"
+ />
+ <FrameLayout
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ >
+
+ <FrameLayout
+ android:id="@+id/mobile_signal_single"
+ 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"
+ />
+ <ImageView
+ android:id="@+id/mobile_type"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ />
+ <ImageView
+ android:id="@+id/mobile_inout"
+ android:layout_height="17dp"
+ android:layout_width="17dp"
+ android:layout_gravity="end|bottom"
+ />
+ </FrameLayout>
+ <LinearLayout
+ android:id="@+id/mobile_signal_stacked"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:visibility="gone"
+ >
+ <ImageView
+ android:id="@+id/mobile_signal_data"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ />
+ <ImageView
+ android:id="@+id/mobile_signal_voice"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ />
+ </LinearLayout>
+ </FrameLayout>
+ <ImageView
android:id="@+id/mobile_roaming"
android:layout_width="wrap_content"
- android:layout_height="17dp"
- android:paddingStart="22dp"
- android:paddingTop="1.5dp"
- android:paddingBottom="3dp"
- android:scaleType="fitCenter"
+ android:layout_height="wrap_content"
android:src="@drawable/stat_sys_roaming"
android:contentDescription="@string/accessibility_data_connection_roaming"
- android:visibility="gone" />
-</FrameLayout>
+ android:visibility="gone"
+ />
+</LinearLayout>
diff --git a/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml b/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml
index 5cbe635..b51b944 100644
--- a/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml
+++ b/packages/SystemUI/res/layout/quick_settings_brightness_dialog.xml
@@ -40,5 +40,12 @@
android:contentDescription="@string/accessibility_brightness"
android:importantForAccessibility="no"
systemui:text="@string/status_bar_settings_auto_brightness_label" />
+ <CheckBox
+ android:id="@+id/brightness_auto"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:text="@string/status_bar_settings_auto_brightness_label"
+ android:visibility="gone"/>
</LinearLayout>
diff --git a/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml b/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
old mode 100644
new mode 100755
index 6673d6e..d322625
--- a/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
+++ b/packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
@@ -97,7 +97,7 @@
android:clipToPadding="false"
android:clickable="true"
android:focusable="true"
- android:background="?android:attr/selectableItemBackgroundBorderless"
+ android:background="@drawable/ripple_drawable"
android:contentDescription="@string/accessibility_quick_settings_expand"
android:padding="12dp" />
diff --git a/packages/SystemUI/res/layout/signal_cluster_view.xml b/packages/SystemUI/res/layout/signal_cluster_view.xml
old mode 100644
new mode 100755
index d17601c..16bddbf
--- a/packages/SystemUI/res/layout/signal_cluster_view.xml
+++ b/packages/SystemUI/res/layout/signal_cluster_view.xml
@@ -52,6 +52,13 @@
android:alpha="0.0"
/>
</FrameLayout>
+ <ImageView android:id="@+id/ims_over_wifi"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_marginLeft="2dp"
+ android:layout_marginRight="2dp"
+ android:src="@drawable/vowifi"
+ />
<FrameLayout
android:id="@+id/wifi_combo"
android:layout_height="wrap_content"
@@ -70,6 +77,13 @@
android:layout_width="wrap_content"
android:alpha="0.0"
/>
+ <com.android.systemui.statusbar.AlphaOptimizedImageView
+ android:theme="@style/DualToneLightTheme"
+ android:id="@+id/wifi_inout"
+ android:layout_height="17dp"
+ android:layout_width="18.41dp"
+ android:layout_gravity="center|bottom"
+ />
</FrameLayout>
<View
android:id="@+id/wifi_signal_spacer"
@@ -77,6 +91,15 @@
android:layout_height="4dp"
android:visibility="gone"
/>
+ <ImageView
+ android:id="@+id/ims_hd"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="2dp"
+ android:layout_marginEnd="2dp"
+ android:src="@drawable/volte"
+ android:visibility="gone"
+ />
<LinearLayout
android:id="@+id/mobile_signal_group"
android:layout_height="wrap_content"
diff --git a/packages/SystemUI/res/layout/sim_switcher.xml b/packages/SystemUI/res/layout/sim_switcher.xml
new file mode 100644
index 0000000..f78e92f
--- /dev/null
+++ b/packages/SystemUI/res/layout/sim_switcher.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2016, 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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:systemui="http://schemas.android.com/apk/res-auto"
+ android:layout_width="match_parent"
+ android:paddingStart="24dp"
+ android:paddingEnd="16dp"
+ android:orientation="horizontal"
+ style="@style/BrightnessDialogContainer">
+
+ <LinearLayout android:layout_width="wrap_content"
+ android:layout_weight="1"
+ android:gravity="center"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <LinearLayout android:layout_width="120dp"
+ android:layout_height="35dp"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ android:id="@+id/sim_switch_slot1_layout"
+ android:background="@drawable/rounded_button_shape">
+
+ <ImageView android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:id="@+id/sim_switch_slot1_icon"/>
+
+ <TextView
+ android:id="@+id/sim_switch_slot_1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:layout_gravity="center"
+ android:layout_marginStart="8dp"
+ android:text="@string/sim1" />
+ </LinearLayout>
+
+ <TextView android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textColor="#ffffff"
+ android:gravity="center"
+ android:singleLine="true"
+ android:ellipsize="end"
+ android:id="@+id/slot1name"/>
+ </LinearLayout>
+
+ <LinearLayout android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:orientation="vertical"
+ android:gravity="center">
+
+ <LinearLayout android:layout_width="120dp"
+ android:layout_height="35dp"
+ android:orientation="horizontal"
+ android:gravity="center_vertical"
+ android:id="@+id/sim_switch_slot2_layout"
+ android:background="@drawable/rounded_button_shape">
+
+ <ImageView android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:id="@+id/sim_switch_slot2_icon"/>
+
+ <TextView
+ android:id="@+id/sim_switch_slot_2"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:layout_gravity="center"
+ android:layout_marginStart="8dp"
+ android:text="@string/sim2" />
+ </LinearLayout>
+
+ <TextView android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textColor="#ffffff"
+ android:gravity="center"
+ android:singleLine="true"
+ android:ellipsize="end"
+ android:id="@+id/slot2name"/>
+ </LinearLayout>
+
+</LinearLayout>
diff --git a/packages/SystemUI/res/layout/status_bar.xml b/packages/SystemUI/res/layout/status_bar.xml
index 63af3e0..82119a3 100644
--- a/packages/SystemUI/res/layout/status_bar.xml
+++ b/packages/SystemUI/res/layout/status_bar.xml
@@ -46,7 +46,15 @@
android:paddingEnd="8dp"
android:orientation="horizontal"
>
-
+ <TextView android:id="@+id/network_label"
+ android:textSize="14dp"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:maxLength="@integer/config_operatorNameMaxLength"
+ android:gravity="center_vertical"
+ android:singleLine="true"
+ android:visibility="gone"
+ />
<!-- The alpha of this area is controlled from both PhoneStatusBarTransitions and
PhoneStatusBar (DISABLE_NOTIFICATION_ICONS). -->
<com.android.systemui.statusbar.AlphaOptimizedFrameLayout
@@ -64,6 +72,15 @@
<include layout="@layout/system_icons" />
+ <com.android.systemui.BatteryLevelTextView android:id="@+id/battery_level_text"
+ android:layout_height="match_parent"
+ android:layout_width="wrap_content"
+ android:gravity="center"
+ android:layout_gravity="center_vertical"
+ android:textColor="#ffffff"
+ android:textSize="@dimen/battery_level_text_size"
+ android:layout_marginStart="7dp"/>
+
<com.android.systemui.statusbar.policy.Clock
android:id="@+id/clock"
android:textAppearance="@style/TextAppearance.StatusBar.Clock"
diff --git a/packages/SystemUI/res/layout/status_bar_expanded.xml b/packages/SystemUI/res/layout/status_bar_expanded.xml
index 3d70969..166cb35 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded.xml
@@ -19,6 +19,7 @@
<com.android.systemui.statusbar.phone.NotificationPanelView
xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:androidprv="http://schemas.android.com/apk/res-auto"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
android:id="@+id/notification_panel"
android:layout_width="match_parent"
@@ -26,6 +27,19 @@
android:background="@android:color/transparent"
>
+ <com.android.keyguard.CarrierText
+ android:id="@+id/carrier_label"
+ android:layout_height="@dimen/carrier_label_height"
+ android:layout_width="match_parent"
+ android:layout_marginBottom="@dimen/close_handle_height"
+ android:layout_gravity="bottom"
+ android:gravity="center"
+ android:ellipsize="marquee"
+ android:singleLine="true"
+ android:visibility="invisible"
+ android:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="#999999" />
+
<include
layout="@layout/keyguard_status_view"
android:layout_height="wrap_content"
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index edf438b..b6bf307 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -147,7 +147,7 @@
<string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
<string name="accessibility_data_connection_lte_plus" msgid="361876866906946007">"LTE+"</string>
<string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
- <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"漫游中"</string>
+ <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"数据漫游"</string>
<string name="accessibility_data_connection_edge" msgid="4477457051631979278">"EDGE"</string>
<string name="accessibility_data_connection_wifi" msgid="2324496756590645221">"WLAN"</string>
<string name="accessibility_no_sim" msgid="8274017118472455155">"无 SIM 卡。"</string>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 0c8b514..3f24c8d 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -147,7 +147,7 @@
<string name="accessibility_data_connection_lte" msgid="5413468808637540658">"LTE"</string>
<string name="accessibility_data_connection_lte_plus" msgid="361876866906946007">"LTE+"</string>
<string name="accessibility_data_connection_cdma" msgid="6132648193978823023">"CDMA"</string>
- <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"漫遊中"</string>
+ <string name="accessibility_data_connection_roaming" msgid="5977362333466556094">"數據漫遊"</string>
<string name="accessibility_data_connection_edge" msgid="4477457051631979278">"Edge"</string>
<string name="accessibility_data_connection_wifi" msgid="2324496756590645221">"Wi-Fi"</string>
<string name="accessibility_no_sim" msgid="8274017118472455155">"沒有 SIM 卡。"</string>
diff --git a/packages/SystemUI/res/values/arrays.xml b/packages/SystemUI/res/values/arrays.xml
old mode 100644
new mode 100755
index bf0cba2..b03701f
--- a/packages/SystemUI/res/values/arrays.xml
+++ b/packages/SystemUI/res/values/arrays.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
+/*
+ * Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
+ * Not a Contribution.
/* //device/apps/common/assets/res/any/colors.xml
**
** Copyright 2012, The Android Open Source Project
@@ -37,6 +40,7 @@
<item>157</item><item>334</item>
<item>0</item> <item>334</item>
</array>
+
<array name="batterymeter_plus_points">
<item>3</item><item>0</item>
<item>5</item><item>0</item>
@@ -51,4 +55,1125 @@
<item>0</item><item>3</item>
<item>3</item><item>3</item>
</array>
+
+ <!-- added for customized status bar -->
+ <!--data type-->
+ <!--Add three items to support TSTS-->
+ <string-array name="multi_data_type">
+ <item>array/telephony_data_type_sim1</item>
+ <item>array/telephony_data_type_sim1</item>
+ <item>array/telephony_data_type_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_data_type_sim1">
+ <!--NETWORK_TYPE_UNKNOWN-->
+ <item>0</item>
+ <!--NETWORK_TYPE_GPRS-->
+ <item>drawable/stat_sys_data_fully_connected_g</item>
+ <!--NETWORK_TYPE_EDGE-->
+ <item>drawable/stat_sys_data_fully_connected_e</item>
+ <!--NETWORK_TYPE_UMTS-->
+ <item>drawable/stat_sys_data_fully_connected_3g</item>
+ <!--NETWORK_TYPE_CDMA-->
+ <item>drawable/stat_sys_data_fully_connected_1x</item>
+ <!--NETWORK_TYPE_EVDO_0-->
+ <item>drawable/stat_sys_data_fully_connected_3g</item>
+ <!--NETWORK_TYPE_EVDO_A-->
+ <item>drawable/stat_sys_data_fully_connected_3g</item>
+ <!--NETWORK_TYPE_1xRTT-->
+ <item>drawable/stat_sys_data_fully_connected_1x</item>
+ <!--NETWORK_TYPE_HSDPA-->
+ <item>drawable/stat_sys_data_fully_connected_h</item>
+ <!--NETWORK_TYPE_HSUPA-->
+ <item>drawable/stat_sys_data_fully_connected_h</item>
+ <!--NETWORK_TYPE_HSPA-->
+ <item>drawable/stat_sys_data_fully_connected_h</item>
+ <!--NETWORK_TYPE_IDEN-->
+ <item>0</item>
+ <!--NETWORK_TYPE_EVDO_B-->
+ <item>drawable/stat_sys_data_fully_connected_3g</item>
+ <!--NETWORK_TYPE_LTE-->
+ <item>drawable/stat_sys_data_fully_connected_lte</item>
+ <!--NETWORK_TYPE_EHRPD-->
+ <item>drawable/stat_sys_data_fully_connected_3g</item>
+ <!--NETWORK_TYPE_HSPAP-->
+ <item>drawable/stat_sys_data_fully_connected_h_plus</item>
+ <!--NETWORK_TYPE_GSM-->
+ <item>drawable/stat_sys_data_fully_connected_g</item>
+ <!--NETWORK_TYPE_TD_SCDMA-->
+ <item>drawable/stat_sys_data_fully_connected_3g</item>
+ <!--NETWORK_TYPE_IWLAN-->
+ <item>0</item>
+ <!--NETWORK_TYPE_LTE_CA-->
+ <item>drawable/stat_sys_data_fully_connected_lte_plus</item>
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_type_sim2">
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_type_sim3">
+ </string-array>
+
+ <string-array name="telephony_data_type_generation">
+ <!--3G-->
+ <item>drawable/stat_sys_data_fully_connected_3g</item>
+ <!--4G-->
+ <item>drawable/stat_sys_data_fully_connected_4g</item>
+ <!--4G+-->
+ <item>drawable/stat_sys_data_fully_connected_4g_plus</item>
+ </string-array>
+
+ <!--data type description-->
+ <string-array name="telephony_data_type_description">
+ <!--NETWORK_TYPE_UNKNOWN-->
+ <item>0</item>
+ <!--NETWORK_TYPE_GPRS-->
+ <item>string/accessibility_data_connection_gprs</item>
+ <!--NETWORK_TYPE_EDGE-->
+ <item>string/accessibility_data_connection_edge</item>
+ <!--NETWORK_TYPE_UMTS-->
+ <item>string/accessibility_data_connection_3g</item>
+ <!--NETWORK_TYPE_CDMA-->
+ <item>string/accessibility_data_connection_cdma</item>
+ <!--NETWORK_TYPE_EVDO_0-->
+ <item>string/accessibility_data_connection_3g</item>
+ <!--NETWORK_TYPE_EVDO_A-->
+ <item>string/accessibility_data_connection_3g</item>
+ <!--NETWORK_TYPE_1xRTT-->
+ <item>string/accessibility_data_connection_cdma</item>
+ <!--NETWORK_TYPE_HSDPA-->
+ <item>string/accessibility_data_connection_3.5g</item>
+ <!--NETWORK_TYPE_HSUPA-->
+ <item>string/accessibility_data_connection_3.5g</item>
+ <!--NETWORK_TYPE_HSPA-->
+ <item>string/accessibility_data_connection_3.5g</item>
+ <!--NETWORK_TYPE_IDEN-->
+ <item>0</item>
+ <!--NETWORK_TYPE_EVDO_B-->
+ <item>string/accessibility_data_connection_3g</item>
+ <!--NETWORK_TYPE_LTE-->
+ <item>string/accessibility_data_connection_lte</item>
+ <!--NETWORK_TYPE_EHRPD-->
+ <item>string/accessibility_data_connection_3g</item>
+ <!--NETWORK_TYPE_HSPAP-->
+ <item>string/accessibility_data_connection_3.5g</item>
+ <!--NETWORK_TYPE_GSM-->
+ <item>string/accessibility_data_connection_gprs</item>
+ <!--NETWORK_TYPE_TD_SCDMA-->
+ <item>string/accessibility_data_connection_3g</item>
+ <!--NETWORK_TYPE_IWLAN-->
+ <item>0</item>
+ <!--NETWORK_TYPE_LTE_CA-->
+ <item>string/accessibility_data_connection_lte_plus</item>
+ </string-array>
+
+ <string-array name="telephony_data_type_generation_description">
+ <!--3G-->
+ <item>string/accessibility_data_connection_3g</item>
+ <!--4G-->
+ <item>string/accessibility_data_connection_4g</item>
+ </string-array>
+
+ <!--data activity-->
+ <!--Add three items to support TSTS-->
+ <string-array name="multi_data_activity">
+ <item>array/data_activity_sim1</item>
+ <item>array/data_activity_sim1</item>
+ <item>array/data_activity_sim1</item>
+ </string-array>
+
+ <string-array name="data_activity_sim1">
+ <item>array/telephony_data_activity_unknown_sim1</item>
+ <item>array/telephony_data_activity_g_sim1</item>
+ <item>array/telephony_data_activity_e_sim1</item>
+ <item>array/telephony_data_activity_2g_sim1</item>
+ <item>array/telephony_data_activity_3g_sim1</item>
+ <item>array/telephony_data_activity_4g_sim1</item>
+ <item>array/telephony_data_activity_h_sim1</item>
+ <item>array/telephony_data_activity_hp_sim1</item>
+ <item>array/telephony_data_activity_1x_sim1</item>
+ <item>array/telephony_data_activity_lte_sim1</item>
+ <item>array/telephony_data_activity_4g_plus_sim1</item>
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="data_activity_sim2">
+ </string-array>
+ <!--reserved for overlay-->
+ <string-array name="data_activity_sim3">
+ </string-array>
+
+ <string-array name="telephony_data_activity_unknown_sim1">
+ <item>0</item><!--none-->
+ <item>0</item><!--in-->
+ <item>0</item><!--out-->
+ <item>0</item><!--inout-->
+ <item>0</item><!--dormant-->
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_unknown_sim2">
+ </string-array>
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_unknown_sim3">
+ </string-array>
+
+ <string-array name="telephony_data_activity_g_sim1">
+ <item>0</item>
+ <item>drawable/stat_sys_signal_in_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_out_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_inout_auto_mirrored</item>
+ <item>0</item>
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_g_sim2">
+ </string-array>
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_g_sim3">
+ </string-array>
+
+ <string-array name="telephony_data_activity_e_sim1">
+ <item>0</item>
+ <item>drawable/stat_sys_signal_in_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_out_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_inout_auto_mirrored</item>
+ <item>0</item>
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_e_sim2">
+ </string-array>
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_e_sim3">
+ </string-array>
+
+ <string-array name="telephony_data_activity_2g_sim1">
+ <item>0</item>
+ <item>drawable/stat_sys_signal_in_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_out_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_inout_auto_mirrored</item>
+ <item>0</item>
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_2g_sim2">
+ </string-array>
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_2g_sim3">
+ </string-array>
+
+ <string-array name="telephony_data_activity_3g_sim1">
+ <item>0</item>
+ <item>drawable/stat_sys_signal_in_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_out_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_inout_auto_mirrored</item>
+ <item>0</item>
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_3g_sim2">
+ </string-array>
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_3g_sim3">
+ </string-array>
+
+ <string-array name="telephony_data_activity_4g_sim1">
+ <item>0</item>
+ <item>drawable/stat_sys_signal_in_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_out_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_inout_auto_mirrored</item>
+ <item>0</item>
+ </string-array>
+
+ <string-array name="telephony_data_activity_4g_plus_sim1">
+ <item>0</item>
+ <item>drawable/stat_sys_signal_in_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_out_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_inout_auto_mirrored</item>
+ <item>0</item>
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_4g_sim2">
+ </string-array>
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_4g_sim3">
+ </string-array>
+
+ <string-array name="telephony_data_activity_h_sim1">
+ <item>0</item>
+ <item>drawable/stat_sys_signal_in_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_out_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_inout_auto_mirrored</item>
+ <item>0</item>
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_h_sim2">
+ </string-array>
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_h_sim3">
+ </string-array>
+
+ <string-array name="telephony_data_activity_hp_sim1">
+ <item>0</item>
+ <item>drawable/stat_sys_signal_in_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_out_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_inout_auto_mirrored</item>
+ <item>0</item>
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_hp_sim2">
+ </string-array>
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_hp_sim3">
+ </string-array>
+
+ <string-array name="telephony_data_activity_1x_sim1">
+ <item>0</item>
+ <item>drawable/stat_sys_signal_in_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_out_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_inout_auto_mirrored</item>
+ <item>0</item>
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_1x_sim2">
+ </string-array>
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_1x_sim3">
+ </string-array>
+
+ <string-array name="telephony_data_activity_lte_sim1">
+ <item>0</item>
+ <item>drawable/stat_sys_signal_in_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_out_auto_mirrored</item>
+ <item>drawable/stat_sys_signal_inout_auto_mirrored</item>
+ <item>0</item>
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_lte_sim2">
+ </string-array>
+ <!--reserved for overlay-->
+ <string-array name="telephony_data_activity_lte_sim3">
+ </string-array>
+
+ <!-- Array to show forbidden icons -->
+ <string-array name="telephony_data_type_forbidden">
+ <item>array/telephony_data_type_forbidden_icons</item>
+ <item>array/telephony_data_type_forbidden_icons</item>
+ <item>array/telephony_data_type_forbidden_icons</item>
+ </string-array>
+
+ <string-array name="telephony_data_type_forbidden_icons">
+ </string-array>
+
+ <!--Array to show greyed icons -->
+ <string-array name="telephony_data_type_disconnected">
+ <item>array/telephony_data_type_disconnected_icons</item>
+ <item>array/telephony_data_type_disconnected_icons</item>
+ <item>array/telephony_data_type_disconnected_icons</item>
+ </string-array>
+
+ <string-array name="telephony_data_type_disconnected_icons">
+ </string-array>
+
+ <!--signal strength-->
+ <!--Add three items to support TSTS-->
+ <string-array name="multi_signal_strength">
+ <item>array/telephony_siganl_strength_sim1</item>
+ <item>array/telephony_siganl_strength_sim1</item>
+ <item>array/telephony_siganl_strength_sim1</item>
+ </string-array>
+
+ <!--Add three items to support TSTS-->
+ <string-array name="multi_signal_strength_roaming">
+ <item>array/telephony_siganl_strength_roaming_sim1</item>
+ <item>array/telephony_siganl_strength_roaming_sim1</item>
+ <item>array/telephony_siganl_strength_roaming_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_siganl_strength_sim1">
+ <item>array/telephony_signal_strength_g_sim1</item>
+ <item>array/telephony_signal_strength_e_sim1</item>
+ <item>array/telephony_signal_strength_3g_sim1</item>
+ <item>array/telephony_signal_strength_4g_sim1</item>
+ <item>array/telephony_signal_strength_h_sim1</item>
+ <item>array/telephony_signal_strength_hp_sim1</item>
+ <item>array/telephony_signal_strength_1x_sim1</item>
+ <item>array/telephony_signal_strength_cdma_sim1</item>
+ <item>array/telephony_signal_strength_umts_sim1</item>
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_siganl_strength_sim2">
+ </string-array>
+ <string-array name="telephony_siganl_strength_sim3">
+ </string-array>
+
+ <string-array name="telephony_siganl_strength_roaming_sim1">
+ <item>array/telephony_signal_strength_g_roaming_sim1</item>
+ <item>array/telephony_signal_strength_e_roaming_sim1</item>
+ <item>array/telephony_signal_strength_3g_roaming_sim1</item>
+ <item>array/telephony_signal_strength_4g_roaming_sim1</item>
+ <item>array/telephony_signal_strength_h_roaming_sim1</item>
+ <item>array/telephony_signal_strength_hp_roaming_sim1</item>
+ <item>array/telephony_signal_strength_1x_roaming_sim1</item>
+ <item>array/telephony_signal_strength_cdma_roaming_sim1</item>
+ <item>array/telephony_signal_strength_umts_roaming_sim1</item>
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_siganl_strength_roaming_sim2">
+ </string-array>
+ <string-array name="telephony_siganl_strength_roaming_sim3">
+ </string-array>
+
+ <string-array name="telephony_signal_strength_g_sim1">
+ <item>array/signal_strength_g_normal_sim1</item>
+ <item>array/signal_strength_g_fully_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_g_roaming_sim1">
+ <item>array/signal_strength_g_normal_roaming_sim1</item>
+ <item>array/signal_strength_g_fully_roaming_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_e_sim1">
+ <item>array/signal_strength_e_normal_sim1</item>
+ <item>array/signal_strength_e_fully_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_e_roaming_sim1">
+ <item>array/signal_strength_e_normal_roaming_sim1</item>
+ <item>array/signal_strength_e_fully_roaming_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_3g_sim1">
+ <item>array/signal_strength_3g_normal_sim1</item>
+ <item>array/signal_strength_3g_fully_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_3g_roaming_sim1">
+ <item>array/signal_strength_3g_normal_roaming_sim1</item>
+ <item>array/signal_strength_3g_fully_roaming_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_4g_sim1">
+ <item>array/signal_strength_4g_normal_sim1</item>
+ <item>array/signal_strength_4g_fully_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_4g_roaming_sim1">
+ <item>array/signal_strength_4g_normal_roaming_sim1</item>
+ <item>array/signal_strength_4g_fully_roaming_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_h_sim1">
+ <item>array/signal_strength_h_normal_sim1</item>
+ <item>array/signal_strength_h_fully_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_h_roaming_sim1">
+ <item>array/signal_strength_h_normal_roaming_sim1</item>
+ <item>array/signal_strength_h_fully_roaming_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_hp_sim1">
+ <item>array/signal_strength_hp_normal_sim1</item>
+ <item>array/signal_strength_hp_fully_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_hp_roaming_sim1">
+ <item>array/signal_strength_hp_normal_roaming_sim1</item>
+ <item>array/signal_strength_hp_fully_roaming_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_1x_sim1">
+ <item>array/signal_strength_1x_normal_sim1</item>
+ <item>array/signal_strength_1x_fully_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_1x_roaming_sim1">
+ <item>array/signal_strength_1x_normal_roaming_sim1</item>
+ <item>array/signal_strength_1x_fully_roaming_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_cdma_sim1">
+ <item>array/signal_strength_cdma_normal_sim1</item>
+ <item>array/signal_strength_cdma_fully_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_cdma_roaming_sim1">
+ <item>array/signal_strength_cdma_normal_roaming_sim1</item>
+ <item>array/signal_strength_cdma_fully_roaming_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_umts_sim1">
+ <item>array/signal_strength_umts_normal_sim1</item>
+ <item>array/signal_strength_umts_fully_sim1</item>
+ </string-array>
+
+ <string-array name="telephony_signal_strength_umts_roaming_sim1">
+ <item>array/signal_strength_umts_normal_roaming_sim1</item>
+ <item>array/signal_strength_umts_fully_roaming_sim1</item>
+ </string-array>
+
+ <string-array name="signal_strength_g_normal_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_g_fully_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_g_normal_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_g_fully_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_e_normal_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_e_fully_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_e_normal_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_e_fully_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_3g_normal_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_3g_fully_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_3g_normal_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_3g_fully_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_4g_normal_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_4g_fully_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_4g_normal_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_4g_fully_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_h_normal_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_h_fully_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_h_normal_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_h_fully_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_hp_normal_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_hp_fully_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_hp_normal_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_hp_fully_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_1x_normal_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_1x_fully_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_1x_normal_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_1x_fully_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_cdma_normal_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_cdma_fully_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_cdma_normal_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_cdma_fully_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_umts_normal_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_umts_fully_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_umts_normal_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <string-array name="signal_strength_umts_fully_roaming_sim1">
+ <item>drawable/stat_sys_signal_0_fully</item>
+ <item>drawable/stat_sys_signal_1_fully</item>
+ <item>drawable/stat_sys_signal_2_fully</item>
+ <item>drawable/stat_sys_signal_3_fully</item>
+ <item>drawable/stat_sys_signal_4_fully</item>
+ </string-array>
+
+ <!--signal strength description-->
+ <string-array name="signal_strength_description">
+ <item>string/accessibility_no_phone</item>
+ <item>string/accessibility_phone_one_bar</item>
+ <item>string/accessibility_phone_two_bars</item>
+ <item>string/accessibility_phone_three_bars</item>
+ <item>string/accessibility_phone_signal_full</item>
+ </string-array>
+
+ <!--null signal-->
+ <!--Add three items to support TSTS-->
+ <string-array name="multi_signal_null">
+ <item>drawable/stat_sys_signal_null</item>
+ <item>drawable/stat_sys_signal_null</item>
+ <item>drawable/stat_sys_signal_null</item>
+ </string-array>
+
+ <!--no sim-->
+ <!--Add three items to support TSTS-->
+ <string-array name="multi_no_sim">
+ <item>drawable/stat_sys_no_sims</item>
+ <item>drawable/stat_sys_no_sims</item>
+ <item>drawable/stat_sys_no_sims</item>
+ </string-array>
+
+ <!--reserved for overlay-->
+ <string-array name="telephony_signal_strength_g_sim2">
+ <item>array/signal_strength_g_normal_sim2</item>
+ <item>array/signal_strength_g_fully_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_g_roaming_sim2">
+ <item>array/signal_strength_g_normal_roaming_sim2</item>
+ <item>array/signal_strength_g_fully_roaming_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_e_sim2">
+ <item>array/signal_strength_e_normal_sim2</item>
+ <item>array/signal_strength_e_fully_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_e_roaming_sim2">
+ <item>array/signal_strength_e_normal_roaming_sim2</item>
+ <item>array/signal_strength_e_fully_roaming_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_3g_sim2">
+ <item>array/signal_strength_3g_normal_sim2</item>
+ <item>array/signal_strength_3g_fully_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_3g_roaming_sim2">
+ <item>array/signal_strength_3g_normal_roaming_sim2</item>
+ <item>array/signal_strength_3g_fully_roaming_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_4g_sim2">
+ <item>array/signal_strength_4g_normal_sim2</item>
+ <item>array/signal_strength_4g_fully_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_4g_roaming_sim2">
+ <item>array/signal_strength_4g_normal_roaming_sim2</item>
+ <item>array/signal_strength_4g_fully_roaming_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_h_sim2">
+ <item>array/signal_strength_h_normal_sim2</item>
+ <item>array/signal_strength_h_fully_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_h_roaming_sim2">
+ <item>array/signal_strength_h_normal_roaming_sim2</item>
+ <item>array/signal_strength_h_fully_roaming_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_hp_sim2">
+ <item>array/signal_strength_hp_normal_sim2</item>
+ <item>array/signal_strength_hp_fully_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_hp_roaming_sim2">
+ <item>array/signal_strength_hp_normal_roaming_sim2</item>
+ <item>array/signal_strength_hp_fully_roaming_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_1x_sim2">
+ <item>array/signal_strength_1x_normal_sim2</item>
+ <item>array/signal_strength_1x_fully_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_1x_roaming_sim2">
+ <item>array/signal_strength_1x_normal_roaming_sim2</item>
+ <item>array/signal_strength_1x_fully_roaming_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_cdma_sim2">
+ <item>array/signal_strength_cdma_normal_sim2</item>
+ <item>array/signal_strength_cdma_fully_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_cdma_roaming_sim2">
+ <item>array/signal_strength_cdma_normal_roaming_sim2</item>
+ <item>array/signal_strength_cdma_fully_roaming_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_umts_sim2">
+ <item>array/signal_strength_umts_normal_sim2</item>
+ <item>array/signal_strength_umts_fully_sim2</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_umts_roaming_sim2">
+ <item>array/signal_strength_umts_normal_roaming_sim2</item>
+ <item>array/signal_strength_umts_fully_roaming_sim2</item>
+ </string-array>
+ <!--reserved for overlay-->
+ <string-array name="signal_strength_g_normal_sim2">
+ </string-array>
+ <string-array name="signal_strength_g_fully_sim2">
+ </string-array>
+ <string-array name="signal_strength_g_normal_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_g_fully_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_e_normal_sim2">
+ </string-array>
+ <string-array name="signal_strength_e_fully_sim2">
+ </string-array>
+ <string-array name="signal_strength_e_normal_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_e_fully_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_3g_normal_sim2">
+ </string-array>
+ <string-array name="signal_strength_3g_fully_sim2">
+ </string-array>
+ <string-array name="signal_strength_3g_normal_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_3g_fully_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_4g_normal_sim2">
+ </string-array>
+ <string-array name="signal_strength_4g_fully_sim2">
+ </string-array>
+ <string-array name="signal_strength_4g_normal_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_4g_fully_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_h_normal_sim2">
+ </string-array>
+ <string-array name="signal_strength_h_fully_sim2">
+ </string-array>
+ <string-array name="signal_strength_h_normal_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_h_fully_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_hp_normal_sim2">
+ </string-array>
+ <string-array name="signal_strength_hp_fully_sim2">
+ </string-array>
+ <string-array name="signal_strength_hp_normal_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_hp_fully_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_1x_normal_sim2">
+ </string-array>
+ <string-array name="signal_strength_1x_fully_sim2">
+ </string-array>
+ <string-array name="signal_strength_1x_normal_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_1x_fully_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_cdma_normal_sim2">
+ </string-array>
+ <string-array name="signal_strength_cdma_fully_sim2">
+ </string-array>
+ <string-array name="signal_strength_cdma_normal_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_cdma_fully_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_umts_normal_sim2">
+ </string-array>
+ <string-array name="signal_strength_umts_fully_sim2">
+ </string-array>
+ <string-array name="signal_strength_umts_normal_roaming_sim2">
+ </string-array>
+ <string-array name="signal_strength_umts_fully_roaming_sim2">
+ </string-array>
+
+ <string-array name="telephony_signal_strength_g_sim3">
+ <item>array/signal_strength_g_normal_sim3</item>
+ <item>array/signal_strength_g_fully_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_g_roaming_sim3">
+ <item>array/signal_strength_g_normal_roaming_sim3</item>
+ <item>array/signal_strength_g_fully_roaming_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_e_sim3">
+ <item>array/signal_strength_e_normal_sim3</item>
+ <item>array/signal_strength_e_fully_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_e_roaming_sim3">
+ <item>array/signal_strength_e_normal_roaming_sim3</item>
+ <item>array/signal_strength_e_fully_roaming_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_3g_sim3">
+ <item>array/signal_strength_3g_normal_sim3</item>
+ <item>array/signal_strength_3g_fully_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_3g_roaming_sim3">
+ <item>array/signal_strength_3g_normal_roaming_sim3</item>
+ <item>array/signal_strength_3g_fully_roaming_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_4g_sim3">
+ <item>array/signal_strength_4g_normal_sim3</item>
+ <item>array/signal_strength_4g_fully_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_4g_roaming_sim3">
+ <item>array/signal_strength_4g_normal_roaming_sim3</item>
+ <item>array/signal_strength_4g_fully_roaming_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_h_sim3">
+ <item>array/signal_strength_h_normal_sim3</item>
+ <item>array/signal_strength_h_fully_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_h_roaming_sim3">
+ <item>array/signal_strength_h_normal_roaming_sim3</item>
+ <item>array/signal_strength_h_fully_roaming_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_hp_sim3">
+ <item>array/signal_strength_hp_normal_sim3</item>
+ <item>array/signal_strength_hp_fully_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_hp_roaming_sim3">
+ <item>array/signal_strength_hp_normal_roaming_sim3</item>
+ <item>array/signal_strength_hp_fully_roaming_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_1x_sim3">
+ <item>array/signal_strength_1x_normal_sim3</item>
+ <item>array/signal_strength_1x_fully_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_1x_roaming_sim3">
+ <item>array/signal_strength_1x_normal_roaming_sim3</item>
+ <item>array/signal_strength_1x_fully_roaming_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_cdma_sim3">
+ <item>array/signal_strength_cdma_normal_sim3</item>
+ <item>array/signal_strength_cdma_fully_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_cdma_roaming_sim3">
+ <item>array/signal_strength_cdma_normal_roaming_sim3</item>
+ <item>array/signal_strength_cdma_fully_roaming_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_umts_sim3">
+ <item>array/signal_strength_umts_normal_sim3</item>
+ <item>array/signal_strength_umts_fully_sim3</item>
+ </string-array>
+ <string-array name="telephony_signal_strength_umts_roaming_sim3">
+ <item>array/signal_strength_umts_normal_roaming_sim3</item>
+ <item>array/signal_strength_umts_fully_roaming_sim3</item>
+ </string-array>
+ <!--reserved for overlay-->
+ <string-array name="signal_strength_g_normal_sim3">
+ </string-array>
+ <string-array name="signal_strength_g_fully_sim3">
+ </string-array>
+ <string-array name="signal_strength_g_normal_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_g_fully_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_e_normal_sim3">
+ </string-array>
+ <string-array name="signal_strength_e_fully_sim3">
+ </string-array>
+ <string-array name="signal_strength_e_normal_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_e_fully_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_3g_normal_sim3">
+ </string-array>
+ <string-array name="signal_strength_3g_fully_sim3">
+ </string-array>
+ <string-array name="signal_strength_3g_normal_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_3g_fully_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_4g_normal_sim3">
+ </string-array>
+ <string-array name="signal_strength_4g_fully_sim3">
+ </string-array>
+ <string-array name="signal_strength_4g_normal_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_4g_fully_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_h_normal_sim3">
+ </string-array>
+ <string-array name="signal_strength_h_fully_sim3">
+ </string-array>
+ <string-array name="signal_strength_h_normal_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_h_fully_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_hp_normal_sim3">
+ </string-array>
+ <string-array name="signal_strength_hp_fully_sim3">
+ </string-array>
+ <string-array name="signal_strength_hp_normal_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_hp_fully_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_1x_normal_sim3">
+ </string-array>
+ <string-array name="signal_strength_1x_fully_sim3">
+ </string-array>
+ <string-array name="signal_strength_1x_normal_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_1x_fully_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_cdma_normal_sim3">
+ </string-array>
+ <string-array name="signal_strength_cdma_fully_sim3">
+ </string-array>
+ <string-array name="signal_strength_cdma_normal_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_cdma_fully_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_umts_normal_sim3">
+ </string-array>
+ <string-array name="signal_strength_umts_fully_sim3">
+ </string-array>
+ <string-array name="signal_strength_umts_normal_roaming_sim3">
+ </string-array>
+ <string-array name="signal_strength_umts_fully_roaming_sim3">
+ </string-array>
+
+ <!--convert stacked icons to single icons-->
+ <array name="stacked_signal_icons">
+ <item>@drawable/stat_sys_signal_0_3g</item>
+ <item>@drawable/stat_sys_signal_0_4g</item>
+ <item>@drawable/stat_sys_signal_1_3g</item>
+ <item>@drawable/stat_sys_signal_1_4g</item>
+ <item>@drawable/stat_sys_signal_2_3g</item>
+ <item>@drawable/stat_sys_signal_2_4g</item>
+ <item>@drawable/stat_sys_signal_3_3g</item>
+ <item>@drawable/stat_sys_signal_3_4g</item>
+ <item>@drawable/stat_sys_signal_4_3g</item>
+ <item>@drawable/stat_sys_signal_4_4g</item>
+ <item>@drawable/stat_sys_signal_0_3g_fully</item>
+ <item>@drawable/stat_sys_signal_0_4g_fully</item>
+ <item>@drawable/stat_sys_signal_1_3g_fully</item>
+ <item>@drawable/stat_sys_signal_1_4g_fully</item>
+ <item>@drawable/stat_sys_signal_2_3g_fully</item>
+ <item>@drawable/stat_sys_signal_2_4g_fully</item>
+ <item>@drawable/stat_sys_signal_3_3g_fully</item>
+ <item>@drawable/stat_sys_signal_3_4g_fully</item>
+ <item>@drawable/stat_sys_signal_4_3g_fully</item>
+ <item>@drawable/stat_sys_signal_4_4g_fully</item>
+ </array>
+
+ <array name="single_signal_icons">
+ <item>@drawable/stat_sys_signal_0_3g_default</item>
+ <item>@drawable/stat_sys_signal_0_4g_default</item>
+ <item>@drawable/stat_sys_signal_1_3g_default</item>
+ <item>@drawable/stat_sys_signal_1_4g_default</item>
+ <item>@drawable/stat_sys_signal_2_3g_default</item>
+ <item>@drawable/stat_sys_signal_2_4g_default</item>
+ <item>@drawable/stat_sys_signal_3_3g_default</item>
+ <item>@drawable/stat_sys_signal_3_4g_default</item>
+ <item>@drawable/stat_sys_signal_4_3g_default</item>
+ <item>@drawable/stat_sys_signal_4_4g_default</item>
+ <item>@drawable/stat_sys_signal_0_3g_default_fully</item>
+ <item>@drawable/stat_sys_signal_0_4g_default_fully</item>
+ <item>@drawable/stat_sys_signal_1_3g_default_fully</item>
+ <item>@drawable/stat_sys_signal_1_4g_default_fully</item>
+ <item>@drawable/stat_sys_signal_2_3g_default_fully</item>
+ <item>@drawable/stat_sys_signal_2_4g_default_fully</item>
+ <item>@drawable/stat_sys_signal_3_3g_default_fully</item>
+ <item>@drawable/stat_sys_signal_3_4g_default_fully</item>
+ <item>@drawable/stat_sys_signal_4_3g_default_fully</item>
+ <item>@drawable/stat_sys_signal_4_4g_default_fully</item>
+ </array>
</resources>
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 0fa9a85..af5c87e 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -70,6 +70,9 @@
<!-- Show camera affordance on Keyguard -->
<bool name="config_keyguardShowCameraAffordance">true</bool>
+ <!-- Show voice affordance on Keyguard -->
+ <bool name="config_keyguardShowVoiceAffordance">true</bool>
+
<!-- Whether we should use SRC drawing mode when drawing the scrim behind. If this flag is set,
we change the canvas opacity so libhwui doesn't call glClear on our surface, and then we
draw the scrim with SRC to overwrite the whole buffer, which saves us a layer of overdraw.
@@ -126,6 +129,37 @@
<!-- Should "4G" be shown instead of "LTE" when the network is NETWORK_TYPE_LTE? -->
<bool name="config_show4GForLTE">true</bool>
+ <!-- Whether or not we also show rsrp level for LTE. -->
+ <bool name="config_showRsrpSignalLevelforLTE">false</bool>
+
+ <!-- Whether or not we show carrier label in notification panel. -->
+ <bool name="config_showCarrierLabel">false</bool>
+
+ <!-- Whether or not we also show wifi activity in status bar. -->
+ <bool name="config_showWifiActivity">false</bool>
+
+ <!-- Show indicator for Wifi on but not connected. -->
+ <bool name="config_showWifiIndicatorWhenEnabled">false</bool>
+
+ <!-- style of status bar:
+ 0: Default Android style
+ 1: Show data activity with data type at the left side of
+ signal icon, and signal icon may be two icons
+ stacked, the upper one is to show 3G, and the lower one
+ is to show 2G.
+ 2: Do not show data activity besides signal icon, instead,
+ it shows data activity within signal view.
+ 3: Show data activity with data type at the left side
+ of signal icon, and do not show two stacked icon on
+ one slot.
+ 4: Show LTE, LTE+ symbols on top of signal icon,
+ and shows IMS and embms icons on the left side
+ of the signal icon.
+ -->
+ <integer name="status_bar_style">0</integer>
+
+ <!-- Control whether status bar should fetch mobile signal icons from xml file dynamically -->
+ <bool name="config_read_icons_from_xml">false</bool>
<!-- Should "LTE"/"4G" be shown instead of "LTE+"/"4G+" when on NETWORK_TYPE_LTE_CA? -->
<bool name="config_hideLtePlus">false</bool>
@@ -284,6 +318,46 @@
<bool name="quick_settings_show_full_alarm">false</bool>
+ <!-- Show 4G for HSPAP -->
+ <bool name="config_show4gForHspap">false</bool>
+
+ <!-- Maximum length of operator name to be shown in status bar -->
+ <integer name="config_operatorNameMaxLength">20</integer>
+ <!-- show different network indicators -->
+ <bool name="show_network_indicators">false</bool>
+ <!-- Show roaming and network icons -->
+ <bool name="show_roaming_and_network_icons">false</bool>
+
+ <!-- Show 4GLTE for LTE -->
+ <bool name="show_4glte_icon_for_lte">false</bool>
+
+ <!-- When true, show charging animation -->
+ <bool name="config_show_battery_charging_anim">true</bool>
+
+ <!-- Whether or not to show battery level text. -->
+ <bool name="config_showBatteryPercentage">false</bool>
+
+ <bool name="config_show4gForIWlan">false</bool>
+ <bool name="config_showSignalForIWlan">false</bool>
+
+ <bool name="config_show_long_operator_name">false</bool>
+ <bool name="config_show_long_operator_name_when_roaming">false</bool>
+
+ <!-- Show forbidden and greyed data icon when data is disabled -->
+ <bool name="config_data_signal_control">false</bool>
+
+ <bool name="config_always_hide_roaming_indicator">false</bool>
+
+ <!-- List of Carrier one mcc mncs-->
+ <string-array name="config_carrier_one_networks" translatable="false">
+ </string-array>
+
+ <integer-array name="carrier_one_strength_threshold_values">
+ </integer-array>
+
+ <!-- When true,show the AutoBrightness checkbox -->
+ <bool name="config_show_auto_brightness">false</bool>
+
<!-- Whether to show a warning notification when the device reaches a certain temperature. -->
<integer name="config_showTemperatureWarning">0</integer>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index e6194a9..551664e 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -441,7 +441,7 @@
<dimen name="keyguard_affordance_icon_height">24dp</dimen>
<dimen name="keyguard_affordance_icon_width">24dp</dimen>
- <dimen name="keyguard_indication_margin_bottom">65dp</dimen>
+ <dimen name="keyguard_indication_margin_bottom">90dp</dimen>
<!-- The text size for battery level -->
<dimen name="battery_level_text_size">12sp</dimen>
@@ -486,7 +486,10 @@
<!-- Extra padding between the mobile data type icon and the strength indicator when the data
type icon is wide for the tile in quick settings. -->
- <dimen name="wide_type_icon_start_padding_qs">3dp</dimen>
+ <dimen name="wide_type_icon_start_padding_qs">8dp</dimen>
+
+ <!-- Height for wide data type icon when the data type icon is wide for the tile in quick settings. -->
+ <dimen name="wide_type_icon_height_qs">20dp</dimen>
<!-- The maximum width of the navigation bar ripples. -->
<dimen name="key_button_ripple_max_width">95dp</dimen>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 1ba90c3..1cdb860b 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -342,13 +342,22 @@
<!-- Content description of the data connection type 3G for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_data_connection_3g">3G</string>
+ <!-- Content description of the data connection type 3G+ for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+ <string name="accessibility_data_connection_3g_plus">3G+</string>
+
<!-- Content description of the data connection type 3.5G for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_data_connection_3.5g">3.5G</string>
+ <!-- Content description of the data connection type 3.5G+ for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+ <string name="accessibility_data_connection_3.5g_plus">3.5G+</string>
+
<!-- Content description of the data connection type 4G for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_data_connection_4g">4G</string>
<!-- Content description of the data connection type 4G for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+ <string name="accessibility_data_connection_4g_lte">4GLTE</string>
+
+ <!-- Content description of the data connection type 4G for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
<string name="accessibility_data_connection_4g_plus">4G+</string>
<!-- Content description of the data connection type LTE for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
@@ -1690,6 +1699,11 @@
<!-- accessibility label for paging indicator in quick settings [CHAR LIMIT=NONE] -->
<string name="accessibility_quick_settings_page">Page <xliff:g name="current_page" example="1">%1$d</xliff:g> of <xliff:g name="num_pages" example="2">%2$d</xliff:g></string>
+ <string name="sim1">SIM 1</string>
+ <string name="sim2">SIM 2</string>
+ <!-- Battery level for expanded quick settings [CHAR LIMIT=2] -->
+ <string name="battery_level_template"><xliff:g id="level" example="45">%d</xliff:g>%%</string>
+
<!-- Label that replaces other notification controls when the notification is from the system
and cannot be silenced (see @string/show_silently) or blocked (see @string/block) -->
<string name="cant_silence_or_block">Notifications can\'t be silenced or blocked</string>
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryLevelTextView.java b/packages/SystemUI/src/com/android/systemui/BatteryLevelTextView.java
new file mode 100755
index 0000000..76ac1fe
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/BatteryLevelTextView.java
@@ -0,0 +1,136 @@
+/*
+Copyright (c) 2016, 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.
+*/
+package com.android.systemui;
+
+import android.app.ActivityManager;
+import android.content.Context;
+import android.os.Handler;
+import android.os.UserHandle;
+import android.provider.Settings;
+import android.util.AttributeSet;
+import android.util.ArraySet;
+import android.view.View;
+import android.widget.TextView;
+import com.android.systemui.statusbar.policy.BatteryController;
+import com.android.systemui.tuner.TunerService;
+import com.android.systemui.statusbar.phone.StatusBarIconController;
+import android.database.ContentObserver;
+import android.net.Uri;
+import android.util.Log;
+
+public class BatteryLevelTextView extends TextView implements
+ BatteryController.BatteryStateChangeCallback, TunerService.Tunable{
+
+ private static final String STATUS_BAR_SHOW_BATTERY_PERCENT = "status_bar_show_battery_percent";
+
+ private BatteryController mBatteryController;
+ private boolean mShow;
+ private boolean mBatteryCharging = false;
+ private boolean mBatteryEnabled;
+ private boolean mBatteryPct;
+ private final String mSlotBattery;
+
+
+ private ContentObserver mObserver = new ContentObserver(new Handler()) {
+ public void onChange(boolean selfChange, Uri uri) {
+ loadShowBatteryTextSetting();
+ setBatteryVisibility();
+ }
+ };
+
+ public BatteryLevelTextView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+
+ mSlotBattery = context.getString(
+ com.android.internal.R.string.status_bar_battery);
+ mBatteryPct = context.getResources().getBoolean(
+ R.bool.config_showBatteryPercentage);
+ loadShowBatteryTextSetting();
+ setBatteryVisibility();
+ }
+
+ private void loadShowBatteryTextSetting() {
+ mShow = 0 != Settings.System.getInt(getContext().getContentResolver(),
+ STATUS_BAR_SHOW_BATTERY_PERCENT, 0);
+ }
+
+ private void setBatteryVisibility() {
+ setVisibility( mBatteryEnabled
+ && (mBatteryCharging || (mBatteryPct && mShow)) ? View.VISIBLE : View.GONE);
+ }
+
+ public void setBatteryCharging(boolean isCharging){
+ mBatteryCharging = isCharging;
+ setBatteryVisibility();
+ }
+
+ @Override
+ public void onBatteryLevelChanged(int level, boolean pluggedIn, boolean charging) {
+ setText(getResources().getString(R.string.battery_level_template, level));
+ }
+
+ public void setBatteryController(BatteryController batteryController) {
+ if(batteryController != null){
+ mBatteryController = batteryController;
+ mBatteryController.addStateChangedCallback(this);
+ }
+ }
+
+ @Override
+ public void onPowerSaveChanged(boolean isPowerSave) {
+
+ }
+
+ @Override
+ public void onTuningChanged(String key, String newValue) {
+ if (StatusBarIconController.ICON_BLACKLIST.equals(key)) {
+ ArraySet<String> icons = StatusBarIconController.getIconBlacklist(newValue);
+ mBatteryEnabled = !icons.contains(mSlotBattery);
+ setBatteryVisibility();
+ }
+ }
+
+ @Override
+ public void onAttachedToWindow() {
+ super.onAttachedToWindow();
+ getContext().getContentResolver().registerContentObserver(Settings.System.getUriFor(
+ STATUS_BAR_SHOW_BATTERY_PERCENT), false, mObserver);
+ TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST);
+ }
+
+ @Override
+ public void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+
+ if (mBatteryController != null) {
+ mBatteryController.removeStateChangedCallback(this);
+ }
+ TunerService.get(getContext()).removeTunable(this);
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterDrawable.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterDrawable.java
index 076b5bc..0d3a242 100755
--- a/packages/SystemUI/src/com/android/systemui/BatteryMeterDrawable.java
+++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterDrawable.java
@@ -100,6 +100,18 @@
private int mLevel = -1;
private boolean mPluggedIn;
private boolean mListening;
+ private static final int ADD_LEVEL = 10;
+ private static final int ANIM_DURATION = 500;
+ private int mAnimOffset;
+ private boolean mCharging;
+ private boolean mBatteryPct;
+
+ private final Runnable mInvalidate = new Runnable() {
+ @Override
+ public void run() {
+ invalidateSelf();
+ }
+ };
public BatteryMeterDrawable(Context context, Handler handler, int frameColor) {
mContext = context;
@@ -116,6 +128,7 @@
}
levels.recycle();
colors.recycle();
+ mBatteryPct = context.getResources().getBoolean(R.bool.config_showBatteryPercentage);
updateShowPercent();
mWarningString = context.getString(R.string.battery_meter_very_low_overlay_symbol);
mCriticalLevel = mContext.getResources().getInteger(
@@ -199,12 +212,7 @@
}
private void postInvalidate() {
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- invalidateSelf();
- }
- });
+ mHandler.post(mInvalidate);
}
public void setBatteryController(BatteryController batteryController) {
@@ -216,7 +224,7 @@
public void onBatteryLevelChanged(int level, boolean pluggedIn, boolean charging) {
mLevel = level;
mPluggedIn = pluggedIn;
-
+ mCharging = charging;
postInvalidate();
}
@@ -226,6 +234,26 @@
invalidateSelf();
}
+ private int updateChargingAnimLevel() {
+ int curLevel = mLevel;
+ if (!mCharging) {
+ mAnimOffset = 0;
+ mHandler.removeCallbacks(mInvalidate);
+ } else {
+ curLevel += mAnimOffset;
+ if (curLevel >= FULL) {
+ curLevel = 100;
+ mAnimOffset = 0;
+ } else {
+ mAnimOffset += ADD_LEVEL;
+ }
+
+ mHandler.removeCallbacks(mInvalidate);
+ mHandler.postDelayed(mInvalidate, ANIM_DURATION);
+ }
+ return curLevel;
+ }
+
private static float[] loadBoltPoints(Resources res) {
final int[] pts = res.getIntArray(R.array.batterymeter_bolt_points);
int maxX = 0, maxY = 0;
@@ -266,8 +294,8 @@
}
private void updateShowPercent() {
- mShowPercent = 0 != Settings.System.getInt(mContext.getContentResolver(),
- SHOW_PERCENT_SETTING, 0);
+ mShowPercent = (0 != Settings.System.getInt(mContext.getContentResolver(),
+ SHOW_PERCENT_SETTING, 0)) && !mBatteryPct;
}
private int getColorForLevel(int percent) {
@@ -323,7 +351,11 @@
@Override
public void draw(Canvas c) {
- final int level = mLevel;
+ final boolean showChargingAnim
+ = mContext.getResources().getBoolean(R.bool.config_show_battery_charging_anim);
+ final int level = showChargingAnim
+ ? updateChargingAnimLevel()
+ : mLevel;
if (level == -1) return;
@@ -517,5 +549,4 @@
postInvalidate();
}
}
-
}
diff --git a/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java
old mode 100644
new mode 100755
index c96506712..f96a8c4
--- a/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java
+++ b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java
@@ -246,6 +246,9 @@
}
private void maybeSwapSearchIcon(@NonNull ComponentName assistComponent, boolean isService) {
+ if(mView == null) {
+ onConfigurationChanged();
+ }
replaceDrawable(mView.getOrb().getLogo(), assistComponent, ASSIST_ICON_METADATA_NAME,
isService);
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSIconView.java b/packages/SystemUI/src/com/android/systemui/qs/QSIconView.java
index 9c4a149..95325b4 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSIconView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSIconView.java
@@ -25,6 +25,7 @@
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import com.android.systemui.R;
+import com.android.systemui.statusbar.policy.MobileSignalController;
import java.util.Objects;
@@ -35,9 +36,19 @@
protected final int mTilePaddingBelowIconPx;
private boolean mAnimationEnabled = true;
+ private final int STATUS_BAR_STYLE_ANDROID_DEFAULT = 0;
+ protected final int STATUS_BAR_STYLE_EXTENDED = 4;
+
+ protected int mStyle = STATUS_BAR_STYLE_ANDROID_DEFAULT;
+
public QSIconView(Context context) {
super(context);
+ if (MobileSignalController.isCarrierOneSupported()) {
+ mStyle = STATUS_BAR_STYLE_EXTENDED;
+ } else {
+ mStyle = mContext.getResources().getInteger(R.integer.status_bar_style);
+ }
final Resources res = context.getResources();
mIconSizePx = res.getDimensionPixelSize(R.dimen.qs_tile_icon_size);
mTilePaddingBelowIconPx = res.getDimensionPixelSize(R.dimen.qs_tile_padding_below_icon);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 61812b6..b17d2f4 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -25,6 +25,7 @@
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
+import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.android.internal.logging.MetricsLogger;
@@ -35,9 +36,11 @@
import com.android.systemui.qs.customize.QSCustomizer;
import com.android.systemui.qs.external.CustomTile;
import com.android.systemui.settings.BrightnessController;
+import com.android.systemui.settings.SimSwitchController;
import com.android.systemui.settings.ToggleSlider;
import com.android.systemui.statusbar.phone.QSTileHost;
import com.android.systemui.statusbar.policy.BrightnessMirrorController;
+import com.android.systemui.statusbar.policy.MobileSignalController;
import com.android.systemui.tuner.TunerService;
import com.android.systemui.tuner.TunerService.Tunable;
@@ -52,6 +55,7 @@
protected final Context mContext;
protected final ArrayList<TileRecord> mRecords = new ArrayList<TileRecord>();
protected final View mBrightnessView;
+ protected View mSimSwitcherView = null;
private final H mHandler = new H();
private int mPanelPaddingBottom;
@@ -61,6 +65,7 @@
private Callback mCallback;
private BrightnessController mBrightnessController;
+ private SimSwitchController mSimSwitchController;
protected QSTileHost mHost;
protected QSFooter mFooter;
@@ -82,6 +87,12 @@
mContext = context;
setOrientation(VERTICAL);
+ if(MobileSignalController.isCarrierOneSupported()) {
+ mSimSwitcherView = LayoutInflater.from(context).inflate(
+ R.layout.sim_switcher, this, false);
+ addView(mSimSwitcherView);
+ mSimSwitchController = new SimSwitchController(getContext(), mSimSwitcherView, this);
+ }
mBrightnessView = LayoutInflater.from(context).inflate(
R.layout.quick_settings_brightness_dialog, this, false);
@@ -96,8 +107,8 @@
mBrightnessController = new BrightnessController(getContext(),
(ImageView) findViewById(R.id.brightness_icon),
- (ToggleSlider) findViewById(R.id.brightness_slider));
-
+ (ToggleSlider) findViewById(R.id.brightness_slider),
+ (CheckBox) findViewById(R.id.brightness_auto));
}
protected void setupTileLayout() {
@@ -105,6 +116,9 @@
R.layout.qs_paged_tile_layout, this, false);
mTileLayout.setListening(mListening);
addView((View) mTileLayout);
+ if (getResources().getBoolean(R.bool.config_show_auto_brightness)) {
+ ((CheckBox) findViewById(R.id.brightness_auto)).setVisibility(View.VISIBLE);
+ }
}
public boolean isShowingCustomize() {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
index f743a4b..e2bb710 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java
@@ -663,6 +663,8 @@
public int overlayIconId;
public boolean filter;
public boolean isOverlayIconWide;
+ public boolean isShowRoaming;
+ public int subId;
@Override
public boolean copyTo(State other) {
@@ -670,13 +672,18 @@
final boolean changed = o.connected != connected || o.activityIn != activityIn
|| o.activityOut != activityOut
|| o.overlayIconId != overlayIconId
- || o.isOverlayIconWide != isOverlayIconWide;
+ || o.isOverlayIconWide != isOverlayIconWide
+ || o.isShowRoaming != isShowRoaming
+ || o.subId != subId;
+
o.connected = connected;
o.activityIn = activityIn;
o.activityOut = activityOut;
o.overlayIconId = overlayIconId;
o.filter = filter;
o.isOverlayIconWide = isOverlayIconWide;
+ o.isShowRoaming = isShowRoaming;
+ o.subId = subId;
return super.copyTo(other) || changed;
}
@@ -689,6 +696,8 @@
rt.insert(rt.length() - 1, ",overlayIconId=" + overlayIconId);
rt.insert(rt.length() - 1, ",filter=" + filter);
rt.insert(rt.length() - 1, ",wideOverlayIcon=" + isOverlayIconWide);
+ rt.insert(rt.length() - 1, ",isShowRoaming=" + isShowRoaming);
+ rt.insert(rt.length() - 1, ",subId=" + subId);
return rt;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/SignalTileView.java b/packages/SystemUI/src/com/android/systemui/qs/SignalTileView.java
old mode 100644
new mode 100755
index b2bfa06..ee22316
--- a/packages/SystemUI/src/com/android/systemui/qs/SignalTileView.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/SignalTileView.java
@@ -19,9 +19,11 @@
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.drawable.Drawable;
+import android.telephony.TelephonyManager;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
+import android.widget.LinearLayout;
import com.android.systemui.R;
import com.android.systemui.qs.QSTile.SignalState;
@@ -36,8 +38,10 @@
private ImageView mOverlay;
private ImageView mIn;
private ImageView mOut;
+ private ImageView mRoaming;
private int mWideOverlayIconStartPadding;
+ private int mIconLayoutHeight;
public SignalTileView(Context context) {
super(context);
@@ -63,7 +67,22 @@
mSignal = new ImageView(mContext);
mIconFrame.addView(mSignal);
mOverlay = new ImageView(mContext);
- mIconFrame.addView(mOverlay, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
+ mIconLayoutHeight = getContext().getResources().getDimensionPixelSize(
+ R.dimen.wide_type_icon_height_qs);
+
+ mRoaming = new ImageView(mContext);
+ mRoaming.setPivotX(0);
+ mRoaming.setPivotY(0);
+ mRoaming.setScaleX(0.4f);
+ mRoaming.setScaleY(0.4f);
+ mRoaming.setVisibility(View.GONE);
+ LinearLayout iconLayout = new LinearLayout(mContext);
+
+ iconLayout.addView(mOverlay, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
+ iconLayout.addView(mRoaming, LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
+
+ mIconFrame.addView(iconLayout, LayoutParams.WRAP_CONTENT, mIconLayoutHeight);
+
return mIconFrame;
}
@@ -127,6 +146,13 @@
final boolean shown = isShown();
setVisibility(mIn, shown, s.activityIn);
setVisibility(mOut, shown, s.activityOut);
+ if(mRoaming != null) {
+ TelephonyManager tm =
+ (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
+ mRoaming.setImageResource(R.drawable.stat_sys_roaming);
+ mRoaming.setVisibility(
+ tm.isNetworkRoaming(s.subId) && s.isShowRoaming ? View.VISIBLE : View.GONE);
+ }
}
private void setVisibility(View view, boolean shown, boolean visible) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
index f1e8749..d1ff20c 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java
@@ -112,6 +112,9 @@
state.autoMirrorDrawable = false;
state.minimalContentDescription =
mContext.getString(R.string.accessibility_quick_settings_bluetooth);
+ if (mController.getBluetoothState() == BluetoothAdapter.STATE_ON) {
+ fireToggleStateChanged(true);
+ }
if (enabled) {
state.label = null;
if (connected) {
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 b34e881..89cafb6 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
@@ -113,6 +113,10 @@
: R.drawable.ic_qs_signal_no_signal;
state.icon = ResourceIcon.get(iconId);
state.isOverlayIconWide = cb.isDataTypeIconWide;
+ state.isShowRoaming = (!(cb.noSim || !cb.enabled || cb.airplaneModeEnabled)
+ && cb.mobileSignalIconId > 0)
+ && !r.getBoolean(R.bool.config_always_hide_roaming_indicator);
+ state.subId = cb.subId;
state.autoMirrorDrawable = !cb.noSim;
state.overlayIconId = cb.enabled && (cb.dataTypeIconId > 0) ? cb.dataTypeIconId : 0;
state.filter = iconId != R.drawable.ic_qs_no_sim;
@@ -183,6 +187,7 @@
String enabledDesc;
boolean noSim;
boolean isDataTypeIconWide;
+ int subId;
boolean roaming;
}
@@ -197,8 +202,10 @@
@Override
public void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
- int qsType, boolean activityIn, boolean activityOut, String typeContentDescription,
- String description, boolean isWide, int subId, boolean roaming) {
+ int qsType, boolean activityIn, boolean activityOut, int dataActivityId,
+ int mobileActivityId, int stackedDataIcon, int stackedVoiceIcon,
+ String typeContentDescription, String description, boolean isWide, int subId,
+ boolean roaming) {
if (qsIcon == null) {
// Not data sim, don't display.
return;
@@ -212,6 +219,7 @@
mInfo.activityOut = activityOut;
mInfo.enabledDesc = description;
mInfo.isDataTypeIconWide = qsType != 0 && isWide;
+ mInfo.subId = subId;
mInfo.roaming = roaming;
refreshState(mInfo);
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/IntentTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/IntentTile.java
index 2a2cc46..8bc7bcf 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/IntentTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/IntentTile.java
@@ -43,6 +43,9 @@
private String mOnClickUri;
private PendingIntent mOnLongClick;
private String mOnLongClickUri;
+ private PendingIntent mOnLaunch;
+ private String mOnLaunchUri;
+
private int mCurrentUserId;
private String mIntentPackage;
@@ -72,6 +75,9 @@
@Override
public void setListening(boolean listening) {
+ if (listening){
+ sendIntent("onLaunch", mOnLaunch, mOnLaunchUri);
+ }
}
@Override
@@ -160,6 +166,8 @@
mOnClickUri = intent.getStringExtra("onClickUri");
mOnLongClick = intent.getParcelableExtra("onLongClick");
mOnLongClickUri = intent.getStringExtra("onLongClickUri");
+ mOnLaunch = intent.getParcelableExtra("onLaunch");
+ mOnLaunchUri = intent.getStringExtra("onLaunchUri");
mIntentPackage = intent.getStringExtra("package");
mIntentPackage = mIntentPackage == null ? "" : mIntentPackage;
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java b/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java
index ba31e3e..41c3623 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoader.java
@@ -233,7 +233,9 @@
synchronized(mLoadQueue) {
try {
mWaitingOnLoadQueue = true;
- mLoadQueue.wait();
+ while(mLoadQueue.isEmpty()) {
+ mLoadQueue.wait();
+ }
mWaitingOnLoadQueue = false;
} catch (InterruptedException ie) {
ie.printStackTrace();
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
old mode 100644
new mode 100755
index 3c5a141..f3ea0bc
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
@@ -714,6 +714,10 @@
}
int taskIndex = mStack.indexOfStackTask(task);
+
+ if(taskIndex < 0 || taskIndex >= mCurrentTaskTransforms.size())
+ continue;
+
TaskViewTransform transform = mCurrentTaskTransforms.get(taskIndex);
if (animationOverrides != null && animationOverrides.containsKey(task)) {
animation = animationOverrides.get(task);
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
index e7960bd..4a8a5db 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
@@ -388,7 +388,11 @@
Uri screenshotUri = params[0];
ContentResolver resolver = mContext.getContentResolver();
- resolver.delete(screenshotUri, null, null);
+ try{
+ resolver.delete(screenshotUri, null, null);
+ } catch (UnsupportedOperationException e) {
+ e.printStackTrace();
+ }
return null;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java b/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java
index 14c4161..a42105e 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java
@@ -30,11 +30,19 @@
import android.os.ServiceManager;
import android.os.UserHandle;
import android.provider.Settings;
+import android.view.View;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.CompoundButton.OnCheckedChangeListener;
import android.service.vr.IVrManager;
import android.service.vr.IVrStateCallbacks;
import android.util.Log;
import android.widget.ImageView;
+import static android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE;
+import static android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC;
+import static android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL;
+
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.MetricsProto.MetricsEvent;
@@ -65,6 +73,7 @@
private final Context mContext;
private final ImageView mIcon;
private final ToggleSlider mControl;
+ private CheckBox mAutoBrightness;
private final boolean mAutomaticAvailable;
private final IPowerManager mPower;
private final CurrentUserTracker mUserTracker;
@@ -276,6 +285,7 @@
mContext = context;
mIcon = icon;
mControl = control;
+ mAutoBrightness = null;
mBackgroundHandler = new Handler(Looper.getMainLooper());
mUserTracker = new CurrentUserTracker(mContext) {
@Override
@@ -298,6 +308,25 @@
mVrManager = IVrManager.Stub.asInterface(ServiceManager.getService("vrmanager"));
}
+ public BrightnessController(Context context, ImageView icon,
+ ToggleSlider control, CheckBox autoBrightness) {
+ this(context, icon, control);
+ mAutoBrightness = autoBrightness;
+ mAutoBrightness.setChecked(Settings.System.getInt(
+ mContext.getContentResolver(), SCREEN_BRIGHTNESS_MODE,
+ SCREEN_BRIGHTNESS_MODE_MANUAL) != SCREEN_BRIGHTNESS_MODE_MANUAL);
+ mAutoBrightness.setOnCheckedChangeListener(new OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView,
+ boolean isChecked) {
+ Settings.System.putInt(mContext.getContentResolver(),
+ SCREEN_BRIGHTNESS_MODE,
+ isChecked ? SCREEN_BRIGHTNESS_MODE_AUTOMATIC :
+ SCREEN_BRIGHTNESS_MODE_MANUAL);
+ }
+ });
+ }
+
public void setBackgroundLooper(Looper backgroundLooper) {
mBackgroundHandler = new Handler(backgroundLooper);
}
diff --git a/packages/SystemUI/src/com/android/systemui/settings/SimSwitchController.java b/packages/SystemUI/src/com/android/systemui/settings/SimSwitchController.java
new file mode 100644
index 0000000..4db20b5
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/settings/SimSwitchController.java
@@ -0,0 +1,338 @@
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+package com.android.systemui.settings;
+
+
+import android.content.Context;
+import android.content.BroadcastReceiver;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.widget.TextView;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.view.View;
+import android.content.res.ColorStateList;
+import android.graphics.Color;
+import android.graphics.drawable.GradientDrawable;
+
+import android.content.ActivityNotFoundException;
+import android.os.RemoteException;
+import com.android.systemui.statusbar.phone.QSTileHost;
+import com.android.systemui.qs.QSPanel;
+
+
+import android.telephony.SubscriptionInfo;
+import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.PhoneAccount;
+import android.telecom.TelecomManager;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Iterator;
+import android.util.Log;
+
+import com.android.systemui.R;
+
+import org.codeaurora.internal.IExtTelephony;
+import android.os.ServiceManager;
+import com.android.systemui.qs.QuickQSPanel;
+
+public class SimSwitchController implements View.OnClickListener, View.OnLongClickListener {
+ private static final String TAG = "SimSwitchController";
+ private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
+
+ private LinearLayout mSlot1Layout, mSlot2Layout;
+ private TextView mSlot1Name, mSlot2Name;
+ private ImageView mSimSlot1Icon, mSimSlot2Icon;
+ private final Context mContext;
+ private final View mSimSwitcherView;
+ private SubscriptionManager mSubscriptionManager;
+ private final int mPhoneCount = TelephonyManager.getDefault().getPhoneCount();
+ private QSPanel mQSPanel = null;
+ private List<SubscriptionInfo> mSubInfoList = null;
+ private int[] mUiccProvisionStatus = new int[mPhoneCount];
+
+ private static final int PROVISIONED = 1;
+ private static final String ACTION_OUTGOING_PHONE_ACCOUNT_CHANGED =
+ "codeaurora.intent.action.DEFAULT_PHONE_ACCOUNT_CHANGED";
+
+
+ private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ String action = intent.getAction();
+ Log.d(TAG, "Intent received: " + action);
+ if (ACTION_OUTGOING_PHONE_ACCOUNT_CHANGED.equals(action)) {
+ int voicePrefSlot = getVoicePrefSlot();
+ updateViews(voicePrefSlot);
+ }
+ }
+ };
+
+ public SimSwitchController(Context context, View simSwitcherView, QSPanel qsPanel) {
+ mContext = context;
+ mSimSwitcherView = simSwitcherView;
+ mQSPanel = qsPanel;
+ mSlot1Name = (TextView)mSimSwitcherView.findViewById(R.id.slot1name);
+ mSlot2Name = (TextView)mSimSwitcherView.findViewById(R.id.slot2name);
+ mSimSlot1Icon = (ImageView)mSimSwitcherView.findViewById(R.id.sim_switch_slot1_icon);
+ mSimSlot2Icon = (ImageView)mSimSwitcherView.findViewById(R.id.sim_switch_slot2_icon);
+ mSlot1Layout = (LinearLayout)mSimSwitcherView.findViewById(R.id.sim_switch_slot1_layout);
+ mSlot2Layout = (LinearLayout)mSimSwitcherView.findViewById(R.id.sim_switch_slot2_layout);
+ mSlot1Layout.setOnClickListener(this);
+ mSlot2Layout.setOnClickListener(this);
+ mSlot1Layout.setOnLongClickListener(this);
+ mSlot2Layout.setOnLongClickListener(this);
+
+ mSubscriptionManager = SubscriptionManager.from(mContext);
+ mSubscriptionManager.addOnSubscriptionsChangedListener(mOnSubscriptionsChangeListener);
+
+ logd(" In constructor ");
+ updateSubscriptions();
+
+ IntentFilter intentFilter = new IntentFilter(ACTION_OUTGOING_PHONE_ACCOUNT_CHANGED);
+ mContext.registerReceiver(mReceiver, intentFilter);
+ }
+
+ synchronized public void updateViews(int voiceSlotId) {
+ logd("voice preferred slot " + voiceSlotId);
+ // If mQSPanel is a instanceonf QuickQSPanel,do not display
+ // Is there are no valid subscription info list present (or)
+ // if there is only one SIM present on device, do not display
+ // voice preference selection option in quick settings panel.
+ if (mQSPanel instanceof QuickQSPanel || mSubInfoList == null ||
+ mSubInfoList.size() <= 1 || getProvisionCount() <= 1) {
+ logd("There are not subscription present or only one present ");
+
+ mSimSwitcherView.setVisibility(View.GONE);
+ return;
+ }
+ mSimSwitcherView.setVisibility(View.VISIBLE);
+
+ for (SubscriptionInfo sir : mSubInfoList) {
+ if (sir != null) {
+ int color = sir.getIconTint();
+ switch(sir.getSimSlotIndex()) {
+ case 0:
+ mSlot1Name.setText(sir.getDisplayName().toString());
+ mSimSlot1Icon.setImageBitmap(sir.createIconBitmap(mContext));
+ GradientDrawable drawable = (GradientDrawable)mSlot1Layout.getBackground();
+ if (voiceSlotId == 0) {
+ drawable.setColor(Color.argb(180,
+ Color.red(color), Color.green(color), Color.blue(color)));
+ } else {
+ drawable.setColor(Color.GRAY);
+ }
+ break;
+ case 1:
+ mSlot2Name.setText(sir.getDisplayName().toString());
+ mSimSlot2Icon.setImageBitmap(sir.createIconBitmap(mContext));
+ GradientDrawable drawable1 = (GradientDrawable)mSlot2Layout.getBackground();
+ if (voiceSlotId == 1) {
+ drawable1.setColor(Color.argb(180,
+ Color.red(color), Color.green(color), Color.blue(color)));
+ } else {
+ drawable1.setColor(Color.GRAY);
+ }
+ break;
+ default:
+ break;
+ }
+ logd("Update, slotId " + sir.getSimSlotIndex()
+ + " display name " + sir.getDisplayName());
+ }
+ }
+ }
+
+
+ public void onClick(View v) {
+ int viewId = v.getId();
+ logd(" OnClick slotId id = " + viewId);
+
+ switch(viewId) {
+ case R.id.sim_switch_slot1_layout:
+ setVoicePref(0);
+ break;
+
+ case R.id.sim_switch_slot2_layout:
+ setVoicePref(1);
+ break;
+
+ default:
+ Log.w(TAG, "Invalid switch case " + viewId);
+ break;
+ }
+ }
+
+ public boolean onLongClick(View v) {
+ QSTileHost tileHost = mQSPanel.getHost();
+
+ logd("launching SimSettings activity " + tileHost);
+ if (tileHost != null) {
+ // Launch SimSettings activity
+ Intent intent = new Intent("com.android.settings.sim.SIM_SUB_INFO_SETTINGS");
+ intent.setFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+
+ tileHost.startActivityDismissingKeyguard(intent);
+ }
+ return true;
+ }
+
+ private final SubscriptionManager.OnSubscriptionsChangedListener mOnSubscriptionsChangeListener
+ = new SubscriptionManager.OnSubscriptionsChangedListener() {
+ @Override
+ public void onSubscriptionsChanged() {
+ logd("onSubscriptionsChanged:");
+ updateSubscriptions();
+ }
+ };
+
+ private void updateSubscriptions() {
+ int voicePrefSlot = -1;
+ IExtTelephony extTelephony =
+ IExtTelephony.Stub.asInterface(ServiceManager.getService("extphone"));
+
+ mSubInfoList = mSubscriptionManager.getActiveSubscriptionInfoList();
+ if (mSubInfoList != null) {
+ for (SubscriptionInfo subInfo : mSubInfoList) {
+ int slotId = subInfo.getSimSlotIndex();
+ if (SubscriptionManager.isValidSlotId(slotId)) {
+ try {
+ mUiccProvisionStatus[slotId] =
+ extTelephony.getCurrentUiccCardProvisioningStatus(slotId);
+ } catch (RemoteException ex) {
+ logd("Activate sub failed phoneId " + subInfo.getSimSlotIndex());
+ } catch (NullPointerException ex) {
+ logd("Failed to activate sub Exception: " + ex);
+ }
+ }
+ }
+ voicePrefSlot = getVoicePrefSlot();
+ }
+
+ updateViews(voicePrefSlot);
+ }
+
+ private int getVoicePrefSlot() {
+ final TelecomManager telecomManager = TelecomManager.from(mContext);
+ final PhoneAccountHandle phoneAccount =
+ telecomManager.getUserSelectedOutgoingPhoneAccount();
+ final TelephonyManager telephonyManager = TelephonyManager.from(mContext);
+ int slotId = -1;
+
+ if (phoneAccount == null) {
+ logd("Get voice pref slotId " + slotId);
+ return slotId;
+ }
+
+ PhoneAccount phoneaccount = telecomManager.getPhoneAccount(phoneAccount);
+ if (phoneaccount != null && (mSubInfoList != null)) {
+ int subId = telephonyManager.getSubIdForPhoneAccount(phoneaccount);
+ int subInfoLength = mSubInfoList.size();
+
+ for (int i = 0; i < subInfoLength; ++i) {
+ final SubscriptionInfo sir = mSubInfoList.get(i);
+ if (sir != null && sir.getSubscriptionId() == subId) {
+ slotId = sir.getSimSlotIndex();
+ break;
+ }
+ }
+ }
+ logd("Get voice pref slotId " + slotId);
+ return slotId;
+ }
+
+ private void setVoicePref(int slotId) {
+ final TelecomManager telecomManager = TelecomManager.from(mContext);
+ int subId = -1;
+
+ logd("Setting voice pref slotId " + slotId);
+ if (mSubInfoList != null) {
+ int subInfoLength = mSubInfoList.size();
+
+ for (int i = 0; i < subInfoLength; ++i) {
+ final SubscriptionInfo sir = mSubInfoList.get(i);
+ if (sir != null && sir.getSimSlotIndex() == slotId) {
+ subId = sir.getSubscriptionId();
+ logd("Setting voice pref slotId " + slotId + " subId " + subId);
+ PhoneAccountHandle phoneAccountHandle =
+ subscriptionIdToPhoneAccountHandle(subId);
+ telecomManager.setUserSelectedOutgoingPhoneAccount(phoneAccountHandle);
+ break;
+ }
+ }
+ }
+
+ updateViews(slotId);
+ }
+
+ private PhoneAccountHandle subscriptionIdToPhoneAccountHandle(final int subId) {
+ final TelecomManager telecomManager = TelecomManager.from(mContext);
+ final TelephonyManager telephonyManager = TelephonyManager.from(mContext);
+ final Iterator<PhoneAccountHandle> phoneAccounts =
+ telecomManager.getCallCapablePhoneAccounts().listIterator();
+
+ while (phoneAccounts.hasNext()) {
+ final PhoneAccountHandle phoneAccountHandle = phoneAccounts.next();
+ final PhoneAccount phoneAccount = telecomManager.getPhoneAccount(phoneAccountHandle);
+ if (subId == telephonyManager.getSubIdForPhoneAccount(phoneAccount)) {
+ return phoneAccountHandle;
+ }
+ }
+
+ return null;
+ }
+
+ // Internal utility, returns true if Uicc card
+ // corresponds to given slotId is provisioned.
+ private boolean isSubProvisioned(int slotId) {
+ boolean retVal = false;
+
+ if (mUiccProvisionStatus[slotId] == PROVISIONED) retVal = true;
+ return retVal;
+ }
+
+ private int getProvisionCount() {
+ int count = 0;
+ for (int i = 0; i < mPhoneCount; i++) {
+ if (isSubProvisioned(i)) {
+ count++;
+ }
+ }
+ return count;
+ }
+
+ private void logd(String msg) {
+ Log.d(TAG, msg);
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
index 0ef97152..916c4c7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyguardIndicationController.java
@@ -45,6 +45,8 @@
import com.android.systemui.statusbar.phone.LockIcon;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
+import com.fairphone.keyguard.BatteryStatusView;
+
/**
* Controls the indications and error messages shown on the Keyguard
*/
@@ -62,6 +64,8 @@
private final UserManager mUserManager;
private final IBatteryStats mBatteryInfo;
+ private final BatteryStatusView mBatteryStatusView;
+
private final int mSlowThreshold;
private final int mFastThreshold;
private final LockIcon mLockIcon;
@@ -88,6 +92,8 @@
mSlowThreshold = res.getInteger(R.integer.config_chargingSlowlyThreshold);
mFastThreshold = res.getInteger(R.integer.config_chargingFastThreshold);
+ mBatteryStatusView = (BatteryStatusView) textView.getRootView().findViewById(R.id.battery_status_fp);
+
mUserManager = context.getSystemService(UserManager.class);
mBatteryInfo = IBatteryStats.Stub.asInterface(
ServiceManager.getService(BatteryStats.SERVICE_NAME));
@@ -169,11 +175,9 @@
mTextView.switchIndication(mTransientIndication);
mTextView.setTextColor(mTransientTextColor);
- } else if (mPowerPluggedIn) {
+ } else if (mPowerPluggedIn && DEBUG_CHARGING_SPEED) {
String indication = computePowerIndication();
- if (DEBUG_CHARGING_SPEED) {
- indication += ", " + (mChargingWattage / 1000) + " mW";
- }
+ indication += ", " + (mChargingWattage / 1000) + " mW";
mTextView.switchIndication(indication);
mTextView.setTextColor(Color.WHITE);
@@ -181,6 +185,14 @@
mTextView.switchIndication(mRestingIndication);
mTextView.setTextColor(Color.WHITE);
}
+
+ if (mPowerPluggedIn) {
+ /*
+ * Refresh more often than after a battery event so that we
+ * can also catch "system refresh", such as language change.
+ */
+ mBatteryStatusView.setChargingIndication(computePowerIndication());
+ }
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
index 13253b4..ee5bc03 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
@@ -26,6 +26,8 @@
import android.graphics.drawable.AnimatedVectorDrawable;
import android.graphics.drawable.Drawable;
import android.telephony.SubscriptionInfo;
+import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
import android.util.ArraySet;
import android.util.AttributeSet;
import android.util.Log;
@@ -51,7 +53,7 @@
// Intimately tied to the design of res/layout/signal_cluster_view.xml
public class SignalClusterView
extends LinearLayout
- implements NetworkControllerImpl.SignalCallback,
+ implements NetworkControllerImpl.SignalCallbackExtended,
SecurityController.SecurityControllerCallback, Tunable {
static final String TAG = "SignalClusterView";
@@ -73,8 +75,10 @@
private int mEthernetIconId = 0;
private int mLastEthernetIconId = -1;
private boolean mWifiVisible = false;
- private int mWifiStrengthId = 0;
- private int mLastWifiStrengthId = -1;
+ private boolean mImsOverWifi = false;
+ private boolean mMobileIms = false;
+ private int mWifiStrengthId = 0, mWifiActivityId = 0;
+ private int mLastWifiStrengthId = -1, mLastWifiActivityId = -1;
private boolean mIsAirplaneMode = false;
private int mAirplaneIconId = 0;
private int mLastAirplaneIconId = -1;
@@ -85,10 +89,14 @@
private int mIconTint = Color.WHITE;
private float mDarkIntensity;
private final Rect mTintArea = new Rect();
+ private int mNoSimsIcon;
ViewGroup mEthernetGroup, mWifiGroup;
View mNoSimsCombo;
- ImageView mVpn, mEthernet, mWifi, mAirplane, mNoSims, mEthernetDark, mWifiDark, mNoSimsDark;
+ ImageView mVpn, mEthernet, mWifi, mAirplane,
+ mNoSims, mEthernetDark, mWifiDark, mNoSimsDark, mImsOverWifiImageView,
+ mMobileImsImageView;
+ ImageView mWifiActivity;
View mWifiAirplaneSpacer;
View mWifiSignalSpacer;
LinearLayout mMobileSignalGroup;
@@ -105,6 +113,7 @@
private boolean mBlockMobile;
private boolean mBlockWifi;
private boolean mBlockEthernet;
+ private TelephonyManager mTelephonyManager;
public SignalClusterView(Context context) {
this(context, null);
@@ -131,6 +140,7 @@
TypedValue typedValue = new TypedValue();
res.getValue(R.dimen.status_bar_icon_scale_factor, typedValue, true);
mIconScaleFactor = typedValue.getFloat();
+ mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
}
@Override
@@ -180,9 +190,12 @@
mWifiGroup = (ViewGroup) findViewById(R.id.wifi_combo);
mWifi = (ImageView) findViewById(R.id.wifi_signal);
mWifiDark = (ImageView) findViewById(R.id.wifi_signal_dark);
+ mWifiActivity = (ImageView) findViewById(R.id.wifi_inout);
mAirplane = (ImageView) findViewById(R.id.airplane);
mNoSims = (ImageView) findViewById(R.id.no_sims);
mNoSimsDark = (ImageView) findViewById(R.id.no_sims_dark);
+ mImsOverWifiImageView = (ImageView) findViewById(R.id.ims_over_wifi);
+ mMobileImsImageView = (ImageView) findViewById(R.id.ims_hd);
mNoSimsCombo = findViewById(R.id.no_sims_combo);
mWifiAirplaneSpacer = findViewById(R.id.wifi_airplane_spacer);
mWifiSignalSpacer = findViewById(R.id.wifi_signal_spacer);
@@ -229,6 +242,15 @@
@Override
protected void onDetachedFromWindow() {
+ mVpn = null;
+ mEthernetGroup = null;
+ mEthernet = null;
+ mWifiGroup = null;
+ mWifi = null;
+ mWifiActivity = null;
+ mAirplane = null;
+ mImsOverWifiImageView = null;
+ mMobileImsImageView = null;
mMobileSignalGroup.removeAllViews();
TunerService.get(mContext).removeTunable(this);
mSC.removeCallback(this);
@@ -263,6 +285,7 @@
boolean activityIn, boolean activityOut, String description) {
mWifiVisible = statusIcon.visible && !mBlockWifi;
mWifiStrengthId = statusIcon.icon;
+ mWifiActivityId = getWifiActivityId(activityIn, activityOut);
mWifiDescription = statusIcon.contentDescription;
apply();
@@ -270,8 +293,10 @@
@Override
public void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
- int qsType, boolean activityIn, boolean activityOut, String typeContentDescription,
- String description, boolean isWide, int subId, boolean roaming) {
+ int qsType, boolean activityIn, boolean activityOut, int dataActivityId,
+ int mobileActivityId, int stackedDataId, int stackedVoiceId,
+ String typeContentDescription, String description, boolean isWide, int subId,
+ boolean roaming) {
PhoneState state = getState(subId);
if (state == null) {
return;
@@ -282,12 +307,36 @@
state.mMobileDescription = statusIcon.contentDescription;
state.mMobileTypeDescription = typeContentDescription;
state.mIsMobileTypeIconWide = statusType != 0 && isWide;
+ state.mDataActivityId = dataActivityId;
+ state.mMobileActivityId = mobileActivityId;
+ state.mStackedDataId = stackedDataId;
+ state.mStackedVoiceId = stackedVoiceId;
state.mRoaming = roaming;
apply();
}
@Override
+ public void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
+ int qsType, boolean activityIn, boolean activityOut, int dataActivityId,
+ int mobileActivityId, int stackedDataId, int stackedVoiceId,
+ String typeContentDescription, String description, boolean isWide, int subId,
+ int dataNetworkTypeId, int embmsIconId, boolean isMobileIms, boolean isImsOverWifi,
+ boolean roaming) {
+ PhoneState state = getState(subId);
+ if (state == null) {
+ return;
+ }
+ state.mDataNetworkTypeId = dataNetworkTypeId;
+ state.mMobileEmbmsId = embmsIconId;
+ mImsOverWifi = isImsOverWifi;
+ mMobileIms = isMobileIms;
+ this.setMobileDataIndicators(statusIcon, qsIcon, statusType, qsType, activityIn,
+ activityOut, dataActivityId, mobileActivityId, stackedDataId,
+ stackedVoiceId, typeContentDescription, description, isWide, subId, roaming);
+ }
+
+ @Override
public void setEthernetIndicators(IconState state) {
mEthernetVisible = state.visible && !mBlockEthernet;
mEthernetIconId = state.icon;
@@ -296,9 +345,21 @@
apply();
}
+ private boolean getImsOverWifiStatus(int subId) {
+ TelephonyManager tm =
+ (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
+ if (tm != null
+ && (tm.isVoWifiCallingAvailableForSubscriber(subId)
+ || tm.isVideoTelephonyWifiCallingAvailableForSubscriber(subId))) {
+ return true;
+ }
+ return false;
+ }
+
@Override
public void setNoSims(boolean show) {
mNoSimsVisible = show && !mBlockMobile;
+ mMobileIms = !mNoSimsVisible && mMobileIms;
apply();
}
@@ -321,9 +382,12 @@
mMobileSignalGroup.removeAllViews();
}
final int n = subs.size();
+ boolean imsOverWiFi = false;
for (int i = 0; i < n; i++) {
inflatePhoneState(subs.get(i).getSubscriptionId());
+ imsOverWiFi |= getImsOverWifiStatus(subs.get(i).getSubscriptionId());
}
+ mImsOverWifi = imsOverWiFi;
if (isAttachedToWindow()) {
applyIconTint();
}
@@ -352,6 +416,43 @@
return null;
}
+
+ private int getWifiActivityId(boolean activityIn, boolean activityOut) {
+ if (!getContext().getResources().getBoolean(R.bool.config_showWifiActivity)) {
+ return 0;
+ }
+ int activityId = 0;
+ if (activityIn && activityOut) {
+ activityId = R.drawable.stat_sys_wifi_inout;
+ } else if (activityIn) {
+ activityId = R.drawable.stat_sys_wifi_in;
+ } else if (activityOut) {
+ activityId = R.drawable.stat_sys_wifi_out;
+ }
+ return activityId;
+ }
+
+ private int getNoSimIcon() {
+ int resId = 0;
+ final String[] noSimArray;
+ Resources res = getContext().getResources();
+
+ if (!res.getBoolean(R.bool.config_read_icons_from_xml)) return resId;
+
+ try {
+ noSimArray = res.getStringArray(R.array.multi_no_sim);
+ } catch (android.content.res.Resources.NotFoundException e) {
+ return resId;
+ }
+
+ if (noSimArray == null) return resId;
+
+ String resName = noSimArray[0];
+ resId = res.getIdentifier(resName, null, getContext().getPackageName());
+ if (DEBUG) Log.d(TAG, "getNoSimIcon resId = " + resId + " resName = " + resName);
+ return resId;
+ }
+
private PhoneState inflatePhoneState(int subId) {
PhoneState state = new PhoneState(subId, mContext);
if (mMobileSignalGroup != null) {
@@ -406,6 +507,11 @@
mLastWifiStrengthId = -1;
}
+ if (mWifiActivity != null) {
+ mWifiActivity.setImageDrawable(null);
+ mLastWifiActivityId = -1;
+ }
+
for (PhoneState state : mPhoneStates) {
if (state.mMobile != null) {
state.maybeStopAnimatableDrawable(state.mMobile);
@@ -474,6 +580,10 @@
setIconForView(mWifiDark, mWifiStrengthId);
mLastWifiStrengthId = mWifiStrengthId;
}
+ if (mWifiActivityId != mLastWifiActivityId) {
+ mWifiActivity.setImageResource(mWifiActivityId);
+ mLastWifiActivityId = mWifiActivityId;
+ }
mWifiGroup.setContentDescription(mWifiDescription);
mWifiGroup.setVisibility(View.VISIBLE);
} else {
@@ -481,9 +591,9 @@
}
if (DEBUG) Log.d(TAG,
- String.format("wifi: %s sig=%d",
+ String.format("wifi: %s sig=%d act=%d",
(mWifiVisible ? "VISIBLE" : "GONE"),
- mWifiStrengthId));
+ mWifiStrengthId, mWifiActivityId));
boolean anyMobileVisible = false;
int firstMobileTypeId = 0;
@@ -507,6 +617,18 @@
mAirplane.setVisibility(View.GONE);
}
+ if (mImsOverWifi){
+ mImsOverWifiImageView.setVisibility(View.VISIBLE);
+ } else {
+ mImsOverWifiImageView.setVisibility(View.GONE);
+ }
+
+ if (mMobileIms){
+ mMobileImsImageView.setVisibility(View.VISIBLE);
+ } else {
+ mMobileImsImageView.setVisibility(View.GONE);
+ }
+
if (mIsAirplaneMode && mWifiVisible) {
mWifiAirplaneSpacer.setVisibility(View.VISIBLE);
} else {
@@ -519,6 +641,13 @@
mWifiSignalSpacer.setVisibility(View.GONE);
}
+ if (mNoSimsVisible && mNoSims != null && mNoSimsDark != null) {
+ if (mNoSimsIcon == 0) mNoSimsIcon = getNoSimIcon();
+ if (mNoSimsIcon != 0) {
+ mNoSims.setImageResource(mNoSimsIcon);
+ mNoSimsDark.setImageResource(mNoSimsIcon);
+ }
+ }
mNoSimsCombo.setVisibility(mNoSimsVisible ? View.VISIBLE : View.GONE);
boolean anythingVisible = mNoSimsVisible || mWifiVisible || mIsAirplaneMode
@@ -555,6 +684,10 @@
private void applyIconTint() {
setTint(mVpn, StatusBarIconController.getTint(mTintArea, mVpn, mIconTint));
setTint(mAirplane, StatusBarIconController.getTint(mTintArea, mAirplane, mIconTint));
+ setTint(mImsOverWifiImageView, StatusBarIconController.getTint(
+ mTintArea, mImsOverWifiImageView, mIconTint));
+ setTint(mMobileImsImageView, StatusBarIconController.getTint(
+ mTintArea, mMobileImsImageView, mIconTint));
applyDarkIntensity(
StatusBarIconController.getDarkIntensity(mTintArea, mNoSims, mDarkIntensity),
mNoSims, mNoSimsDark);
@@ -592,7 +725,15 @@
private String mMobileDescription, mMobileTypeDescription;
private ViewGroup mMobileGroup;
- private ImageView mMobile, mMobileDark, mMobileType, mMobileRoaming;
+ private ImageView mMobile, mMobileDark, mMobileType, mMobileRoaming, mDataNetworkType,
+ mMobileEmbms;
+
+ private int mDataActivityId = 0, mMobileActivityId = 0, mDataNetworkTypeId =0,
+ mMobileEmbmsId = 0;
+
+ private int mStackedDataId = 0, mStackedVoiceId = 0;
+ private ImageView mDataActivity, mMobileActivity, mStackedData, mStackedVoice;
+ private ViewGroup mMobileSingleGroup, mMobileStackedGroup;
public boolean mRoaming;
public PhoneState(int subId, Context context) {
@@ -607,6 +748,15 @@
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);
+ mMobileActivity = (ImageView) root.findViewById(R.id.mobile_inout);
+ mDataNetworkType = (ImageView) root.findViewById(R.id.dataNetwork_type);
+ mMobileEmbms = (ImageView) root.findViewById(R.id.embms);
+ mDataActivity = (ImageView) root.findViewById(R.id.data_inout);
+ mStackedData = (ImageView) root.findViewById(R.id.mobile_signal_data);
+ mStackedVoice = (ImageView) root.findViewById(R.id.mobile_signal_voice);
+
+ mMobileSingleGroup = (ViewGroup) root.findViewById(R.id.mobile_signal_single);
+ mMobileStackedGroup = (ViewGroup) root.findViewById(R.id.mobile_signal_stacked);
mMobileRoaming = (ImageView) root.findViewById(R.id.mobile_roaming);
}
@@ -622,6 +772,41 @@
mMobileType.setImageResource(mMobileTypeId);
mLastMobileTypeId = mMobileTypeId;
}
+
+ mDataActivity.setImageResource(mDataActivityId);
+ Drawable dataActivityDrawable = mDataActivity.getDrawable();
+ if (dataActivityDrawable instanceof Animatable) {
+ Animatable ad = (Animatable) dataActivityDrawable;
+ if (!ad.isRunning()) {
+ ad.start();
+ }
+ }
+
+ mMobileActivity.setImageResource(mMobileActivityId);
+ Drawable mobileActivityDrawable = mMobileActivity.getDrawable();
+ if (mobileActivityDrawable instanceof Animatable) {
+ Animatable ad = (Animatable) mobileActivityDrawable;
+ if (!ad.isRunning()) {
+ ad.start();
+ }
+ }
+
+ mMobileEmbms.setImageResource(mMobileEmbmsId);
+
+ mDataNetworkType.setImageResource(mDataNetworkTypeId);
+
+ if (mStackedDataId != 0 && mStackedVoiceId != 0) {
+ mStackedData.setImageResource(mStackedDataId);
+ mStackedVoice.setImageResource(mStackedVoiceId);
+ mMobileSingleGroup.setVisibility(View.GONE);
+ mMobileStackedGroup.setVisibility(View.VISIBLE);
+ } else {
+ mStackedData.setImageResource(0);
+ mStackedVoice.setImageResource(0);
+ mMobileSingleGroup.setVisibility(View.VISIBLE);
+ mMobileStackedGroup.setVisibility(View.GONE);
+ }
+
mMobileGroup.setContentDescription(mMobileTypeDescription
+ " " + mMobileDescription);
mMobileGroup.setVisibility(View.VISIBLE);
@@ -643,6 +828,11 @@
(mMobileVisible ? "VISIBLE" : "GONE"), mMobileStrengthId, mMobileTypeId));
mMobileType.setVisibility(mMobileTypeId != 0 ? View.VISIBLE : View.GONE);
+ mDataActivity.setVisibility(mDataActivityId != 0 ? View.VISIBLE : View.GONE);
+ mMobileActivity.setVisibility(mMobileActivityId != 0 ? View.VISIBLE : View.GONE);
+ mDataNetworkType.setVisibility(mDataNetworkTypeId != 0 ? View.VISIBLE
+ : View.GONE);
+ mMobileEmbms.setVisibility(mMobileEmbmsId != 0 ? View.VISIBLE : View.GONE);
mMobileRoaming.setVisibility(mRoaming ? View.VISIBLE : View.GONE);
return mMobileVisible;
@@ -703,6 +893,8 @@
StatusBarIconController.getDarkIntensity(tintArea, mMobile, darkIntensity),
mMobile, mMobileDark);
setTint(mMobileType, StatusBarIconController.getTint(tintArea, mMobileType, tint));
+ setTint(mDataNetworkType, StatusBarIconController.getTint(tintArea,
+ mDataNetworkType, tint));
setTint(mMobileRoaming, StatusBarIconController.getTint(tintArea, mMobileRoaming,
tint));
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
index c674a82..2ec576d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
@@ -39,6 +39,7 @@
import android.os.Message;
import android.os.Messenger;
import android.os.RemoteException;
+import android.os.SystemProperties;
import android.os.UserHandle;
import android.provider.MediaStore;
import android.service.media.CameraPrewarmService;
@@ -54,6 +55,7 @@
import android.widget.TextView;
import com.android.internal.widget.LockPatternUtils;
+import com.android.keyguard.EmergencyButton;
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.keyguard.KeyguardUpdateMonitorCallback;
import com.android.systemui.EventLogConstants;
@@ -94,6 +96,7 @@
private static final int DOZE_ANIMATION_STAGGER_DELAY = 48;
private static final int DOZE_ANIMATION_ELEMENT_DURATION = 250;
+ private EmergencyButton mEmergencyButton;
private KeyguardAffordanceView mCameraImageView;
private KeyguardAffordanceView mLeftAffordanceView;
private LockIcon mLockIcon;
@@ -192,6 +195,7 @@
super.onFinishInflate();
mLockPatternUtils = new LockPatternUtils(mContext);
mPreviewContainer = (ViewGroup) findViewById(R.id.preview_container);
+ mEmergencyButton = (EmergencyButton) findViewById(R.id.emergency_call_button);
mCameraImageView = (KeyguardAffordanceView) findViewById(R.id.camera_button);
mLeftAffordanceView = (KeyguardAffordanceView) findViewById(R.id.left_button);
mLockIcon = (LockIcon) findViewById(R.id.lock_icon);
@@ -201,6 +205,7 @@
mUnlockMethodCache = UnlockMethodCache.getInstance(getContext());
mUnlockMethodCache.addListener(this);
mLockIcon.update();
+ updateEmergencyButton();
setClipChildren(false);
setClipToPadding(false);
mPreviewInflater = new PreviewInflater(mContext, new LockPatternUtils(mContext));
@@ -251,6 +256,7 @@
lp.height = getResources().getDimensionPixelSize(R.dimen.keyguard_affordance_height);
mLeftAffordanceView.setLayoutParams(lp);
updateLeftAffordanceIcon();
+ updateEmergencyButton();
}
public void setActivityStarter(ActivityStarter activityStarter) {
@@ -517,7 +523,8 @@
}
private boolean canLaunchVoiceAssist() {
- return mAssistManager.canVoiceAssistBeLaunchedFromKeyguard();
+ return mAssistManager.canVoiceAssistBeLaunchedFromKeyguard()
+ && getResources().getBoolean(R.bool.config_keyguardShowVoiceAffordance);
}
private void launchPhone() {
@@ -722,6 +729,14 @@
updateLeftPreview();
}
+ private void updateEmergencyButton() {
+ if(mContext.getResources().getBoolean(R.bool.config_showEmergencyButton)){
+ if (mEmergencyButton != null) {
+ mEmergencyButton.updateEmergencyCallButton();
+ }
+ }
+ }
+
public void onKeyguardShowingChanged() {
updateLeftAffordance();
inflateCameraPreview();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
index 41b0bb2..4131370 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
@@ -36,6 +36,7 @@
import com.android.systemui.statusbar.policy.KeyguardUserSwitcher;
import com.android.systemui.statusbar.policy.UserInfoController;
import com.android.systemui.statusbar.policy.UserSwitcherController;
+import com.android.systemui.BatteryLevelTextView;
import java.text.NumberFormat;
@@ -53,7 +54,7 @@
private View mSystemIconsSuperContainer;
private MultiUserSwitch mMultiUserSwitch;
private ImageView mMultiUserAvatar;
- private TextView mBatteryLevel;
+ private BatteryLevelTextView mBatteryLevel;
private BatteryController mBatteryController;
private KeyguardUserSwitcher mKeyguardUserSwitcher;
@@ -74,7 +75,7 @@
mSystemIconsContainer = findViewById(R.id.system_icons_container);
mMultiUserSwitch = (MultiUserSwitch) findViewById(R.id.multi_user_switch);
mMultiUserAvatar = (ImageView) findViewById(R.id.multi_user_avatar);
- mBatteryLevel = (TextView) findViewById(R.id.battery_level);
+ mBatteryLevel = (BatteryLevelTextView) findViewById(R.id.battery_level);
mCarrierLabel = (TextView) findViewById(R.id.keyguard_carrier_text);
loadDimens();
updateUserSwitcher();
@@ -155,6 +156,7 @@
} else if (mMultiUserSwitch.getParent() == this && mKeyguardUserSwitcherShowing) {
removeView(mMultiUserSwitch);
}
+
if (mKeyguardUserSwitcher == null) {
// If we have no keyguard switcher, the screen width is under 600dp. In this case,
// we don't show the multi-user avatar unless there is more than 1 user on the device.
@@ -165,7 +167,8 @@
mMultiUserSwitch.setVisibility(View.GONE);
}
}
- mBatteryLevel.setVisibility(mBatteryCharging ? View.VISIBLE : View.GONE);
+
+ mBatteryLevel.setBatteryCharging(mBatteryCharging);
}
private void updateSystemIconsLayoutParams() {
@@ -206,6 +209,7 @@
public void setBatteryController(BatteryController batteryController) {
mBatteryController = batteryController;
((BatteryMeterView) findViewById(R.id.battery)).setBatteryController(batteryController);
+ ((BatteryLevelTextView) findViewById(R.id.battery_level)).setBatteryController(batteryController);
}
public void setUserSwitcherController(UserSwitcherController controller) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
old mode 100644
new mode 100755
index 245d4da..f7be70f
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -65,6 +65,7 @@
View mCurrentView = null;
View[] mRotatedViews = new View[4];
+ int mBarSize;
boolean mVertical;
boolean mScreenOn;
private int mCurrentRotation = -1;
@@ -189,6 +190,7 @@
mDisplay = ((WindowManager) context.getSystemService(
Context.WINDOW_SERVICE)).getDefaultDisplay();
+ mBarSize = context.getResources().getDimensionPixelSize(R.dimen.navigation_bar_size);
mVertical = false;
mShowMenu = false;
mGestureHelper = new NavigationBarGestureHelper(context);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
index a6a5742..5e7b3e6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
@@ -41,6 +41,7 @@
import com.android.systemui.statusbar.FlingAnimationUtils;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.policy.HeadsUpManager;
+import android.util.BoostFramework;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -89,6 +90,12 @@
private FalsingManager mFalsingManager;
/**
+ * For PanelView fling perflock call
+ */
+ private BoostFramework mPerf = null;
+ private int mBoostParamVal[];
+
+ /**
* Whether an instant expand request is currently pending and we are just waiting for layout.
*/
private boolean mInstantExpanding;
@@ -188,6 +195,14 @@
mFlingAnimationUtils = new FlingAnimationUtils(context, 0.6f);
mBounceInterpolator = new BounceInterpolator();
mFalsingManager = FalsingManager.getInstance(context);
+
+ boolean lIsPerfBoostEnabled = context.getResources().getBoolean(
+ com.android.internal.R.bool.config_enableCpuBoostForPanelViewFling);
+ if (lIsPerfBoostEnabled) {
+ mBoostParamVal = context.getResources().getIntArray(
+ com.android.internal.R.array.panelview_flingboost_param_value);
+ mPerf = new BoostFramework();
+ }
}
protected void loadDimens() {
@@ -671,16 +686,25 @@
/ collapseSpeedUpFactor));
}
}
+ if (mPerf != null) {
+ mPerf.perfLockAcquire(0, mBoostParamVal);
+ }
animator.addListener(new AnimatorListenerAdapter() {
private boolean mCancelled;
@Override
public void onAnimationCancel(Animator animation) {
+ if (mPerf != null) {
+ mPerf.perfLockRelease();
+ }
mCancelled = true;
}
@Override
public void onAnimationEnd(Animator animation) {
+ if (mPerf != null) {
+ mPerf.perfLockRelease();
+ }
if (clearAllExpandHack && !mCancelled) {
setExpandedHeightInternal(getMaxPanelHeight());
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
old mode 100644
new mode 100755
index 6cbb5e1..4b694a0
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -94,6 +94,7 @@
import android.service.notification.NotificationListenerService;
import android.service.notification.NotificationListenerService.RankingMap;
import android.service.notification.StatusBarNotification;
+import android.telephony.TelephonyManager;
import android.telecom.TelecomManager;
import android.util.ArraySet;
import android.util.DisplayMetrics;
@@ -108,6 +109,7 @@
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
+import android.view.ViewGroup.MarginLayoutParams;
import android.view.ViewParent;
import android.view.ViewStub;
import android.view.ViewTreeObserver;
@@ -130,6 +132,7 @@
import com.android.systemui.AutoReinflateContainer;
import com.android.systemui.AutoReinflateContainer.InflateListener;
import com.android.systemui.BatteryMeterView;
+import com.android.systemui.BatteryLevelTextView;
import com.android.systemui.DemoMode;
import com.android.systemui.EventLogConstants;
import com.android.systemui.EventLogTags;
@@ -266,6 +269,13 @@
/** Allow some time inbetween the long press for back and recents. */
private static final int LOCK_TO_APP_GESTURE_TOLERENCE = 200;
+ /**
+ * A key that is used to retrieve the value of the checkbox
+ * in Settings application that allows a user to add or remove
+ * the operator name in statusbar.
+ */
+ protected static final String SHOW_OPERATOR_NAME = "show_network_name_mode";
+
/** If true, the system is in the half-boot-to-decryption-screen state.
* Prudently disable QS and notifications. */
private static final boolean ONLY_CORE_APPS;
@@ -386,6 +396,9 @@
int mMaxAllowedKeyguardNotifications;
+ // carrier label
+ private TextView mCarrierLabel;
+ private boolean mShowCarrierInPanel = false;
boolean mExpandedVisible;
private int mNavigationBarWindowState = WINDOW_STATE_SHOWING;
@@ -474,6 +487,13 @@
}
};
+ private final ContentObserver mShowOperatorNameObserver = new ContentObserver(new Handler()) {
+ @Override
+ public void onChange(boolean selfChange) {
+ showOperatorName();
+ }
+ };
+
private int mInteractingWindows;
private boolean mAutohideSuspended;
private int mStatusBarMode;
@@ -691,6 +711,20 @@
// TODO: use MediaSessionManager.SessionListener to hook us up to future updates
// in session state
+ // If the phone is configured to show the operator name
+ // then register the observer.
+ // Phones without simcard should not show
+ // operatorname in statusbar.
+ final boolean enableOperatorName = (mContext.getResources().
+ getBoolean(com.android.internal.R.bool.config_showOperatorNameInStatusBar));
+ if (enableOperatorName) {
+ mContext.getContentResolver().unregisterContentObserver(mShowOperatorNameObserver);
+ mShowOperatorNameObserver.onChange(false); // setup
+ mContext.getContentResolver().registerContentObserver(
+ Settings.System.getUriFor(SHOW_OPERATOR_NAME), true,
+ mShowOperatorNameObserver);
+ }
+
addNavigationBar();
// Lastly, call to the icon policy to install/update all the icons.
@@ -904,6 +938,23 @@
initSignalCluster(mKeyguardStatusBar);
initEmergencyCryptkeeperText();
+ mCarrierLabel = (TextView)mStatusBarWindow.findViewById(R.id.carrier_label);
+ final boolean showCarrierLabel = mContext.getResources().getBoolean(
+ R.bool.config_showCarrierLabel);
+ mShowCarrierInPanel = showCarrierLabel && (mCarrierLabel != null);
+ if (DEBUG) Log.v(TAG, "carrierlabel=" + mCarrierLabel + " show=" + mShowCarrierInPanel);
+ if (mShowCarrierInPanel) {
+ mCarrierLabel.setVisibility(mShowCarrierInPanel ? View.VISIBLE : View.INVISIBLE);
+ }
+
+ // make sure carrier label is not covered by navigation bar
+ if (mCarrierLabel != null && mNavigationBarView != null) {
+ MarginLayoutParams mlp = (MarginLayoutParams) mCarrierLabel.getLayoutParams();
+ if (mlp != null && mlp.bottomMargin < mNavigationBarView.mBarSize) {
+ mlp.bottomMargin = mNavigationBarView.mBarSize;
+ mCarrierLabel.setLayoutParams(mlp);
+ }
+ }
mFlashlightController = new FlashlightController(mContext);
mKeyguardBottomArea.setFlashlightController(mFlashlightController);
mKeyguardBottomArea.setPhoneStatusBar(this);
@@ -955,6 +1006,8 @@
((BatteryMeterView) mStatusBarView.findViewById(R.id.battery)).setBatteryController(
mBatteryController);
+ ((BatteryLevelTextView) mStatusBarView.findViewById(R.id.battery_level_text))
+ .setBatteryController(mBatteryController);
mKeyguardStatusBar.setBatteryController(mBatteryController);
mReportRejectedTouch = mStatusBarWindow.findViewById(R.id.report_rejected_touch);
@@ -1018,6 +1071,7 @@
// Private API call to make the shadows look better for Recents
ThreadedRenderer.overrideProperty("ambientRatio", String.valueOf(1.5f));
+ showOperatorName();
return mStatusBarView;
}
@@ -2023,6 +2077,21 @@
updateNotifications();
}
+ protected void updateCarrierLabelVisibility() {
+ if (!mShowCarrierInPanel) return;
+
+ final boolean makeVisible = mStackScroller.getVisibility() == View.VISIBLE
+ && mState != StatusBarState.KEYGUARD;
+
+ if ((mCarrierLabel.getVisibility() == View.VISIBLE) != makeVisible) {
+ if (DEBUG) {
+ Log.d(TAG, "making carrier label " + (makeVisible?"visible":"invisible"));
+ }
+
+ mCarrierLabel.setVisibility(makeVisible ? View.VISIBLE : View.INVISIBLE);
+ }
+ }
+
@Override
protected void setAreThereNotifications() {
@@ -2491,6 +2560,7 @@
if ((diff2 & StatusBarManager.DISABLE2_QUICK_SETTINGS) != 0) {
updateQsExpansionEnabled();
}
+ showOperatorName();
}
/**
@@ -2797,8 +2867,9 @@
// Expand the window to encompass the full screen in anticipation of the drag.
// This is only possible to do atomically because the status bar is at the top of the screen!
mStatusBarWindowManager.setPanelVisible(true);
-
- visibilityChanged(true);
+ if(!force){
+ visibilityChanged(true);
+ }
mWaitingForKeyguardExit = false;
recomputeDisableFlags(!force /* animate */);
setInteracting(StatusBarManager.WINDOW_STATUS_BAR, true);
@@ -4387,6 +4458,7 @@
updateStackScrollerState(goingToFullShade, fromShadeLocked);
updateNotifications();
checkBarModes();
+ updateCarrierLabelVisibility();
updateMediaMetaData(false, mState != StatusBarState.KEYGUARD);
mKeyguardMonitor.notifyKeyguardState(mStatusBarKeyguardViewManager.isShowing(),
mStatusBarKeyguardViewManager.isSecure(),
@@ -4540,6 +4612,23 @@
updateDozing();
}
+ private void showOperatorName() {
+ boolean showOperatorName = (0 != Settings.System.getInt(
+ mContext.getContentResolver(), SHOW_OPERATOR_NAME, 1));
+ final boolean enableOperatorName = (mContext.getResources().
+ getBoolean(com.android.internal.R.bool.config_showOperatorNameInStatusBar));
+
+ TextView networkLabel = (TextView)mStatusBarWindow.findViewById(R.id.network_label);
+ if (networkLabel != null) {
+ if (!enableOperatorName || !showOperatorName || mState != StatusBarState.SHADE) {
+ mNetworkController.removeNetworkLabelView();
+ networkLabel.setVisibility(View.GONE);
+ } else {
+ mNetworkController.addNetworkLabelView(networkLabel);
+ }
+ }
+ }
+
@Override
public void onActivationReset(ActivatableNotificationView view) {
if (view == mStackScroller.getActivatedChild()) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
old mode 100644
new mode 100755
index a13138d..ca3e60a
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -175,11 +175,13 @@
mCast.addCallback(mCastCallback);
// hotspot
- mIconController.setIcon(mSlotHotspot, R.drawable.stat_sys_hotspot,
- mContext.getString(R.string.accessibility_status_bar_hotspot));
- mIconController.setIconVisibility(mSlotHotspot, mHotspot.isHotspotEnabled());
- mHotspot.addCallback(mHotspotCallback);
-
+ if (!mContext.getResources().getBoolean(com.android.internal.R.bool
+ .config_regional_hotspot_show_notification_when_turn_on)) {
+ mIconController.setIcon(mSlotHotspot, R.drawable.stat_sys_hotspot,
+ mContext.getString(R.string.accessibility_status_bar_hotspot));
+ mIconController.setIconVisibility(mSlotHotspot, mHotspot.isHotspotEnabled());
+ mHotspot.addCallback(mHotspotCallback);
+ }
// managed profile
mIconController.setIcon(mSlotManagedProfile, R.drawable.stat_sys_managed_profile_status,
mContext.getString(R.string.accessibility_managed_profile));
@@ -452,6 +454,8 @@
private final HotspotController.Callback mHotspotCallback = new HotspotController.Callback() {
@Override
public void onHotspotChanged(boolean enabled) {
+ mIconController.setIcon(mSlotHotspot, R.drawable.stat_sys_hotspot,
+ mContext.getString(R.string.accessibility_status_bar_hotspot));
mIconController.setIconVisibility(mSlotHotspot, enabled);
}
};
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
old mode 100644
new mode 100755
index da698d8..32f6f3d
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java
@@ -449,6 +449,13 @@
tileList = res.getString(R.string.quick_settings_tiles);
if (DEBUG) Log.d(TAG, "Loaded tile specs from config: " + tileList);
} else {
+ for (String tile : res.getString(R.string.quick_settings_tiles).split(",")) {
+ tile = tile.trim();
+ if (tile.isEmpty()) continue;
+ if(tile.startsWith(IntentTile.PREFIX)){
+ tileList = tileList.concat(",").concat(tile);
+ }
+ }
if (DEBUG) Log.d(TAG, "Loaded tile specs from setting: " + tileList);
}
final ArrayList<String> tiles = new ArrayList<String>();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
index cbef76c..d7499e1 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
@@ -399,8 +399,10 @@
@Override
public void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
- int qsType, boolean activityIn, boolean activityOut, String typeContentDescription,
- String description, boolean isWide, int subId, boolean roaming) {
+ int qsType, boolean activityIn, boolean activityOut, int dataActivityId,
+ int mobileActivityId, int stackedDataIcon, int stackedVoiceIcon,
+ String typeContentDescription, String description, boolean isWide, int subId,
+ boolean roaming) {
mRoamingsBySubId.put(subId, roaming);
boolean isRoaming = calculateRoaming();
if (mIsRoaming != isRoaming) {
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 3326736..490626b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
@@ -39,6 +39,7 @@
import android.widget.TextView;
import com.android.internal.statusbar.StatusBarIcon;
import com.android.systemui.BatteryMeterView;
+import com.android.systemui.BatteryLevelTextView;
import com.android.systemui.FontSizeUtils;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
@@ -76,6 +77,7 @@
private View mNotificationIconAreaInner;
private BatteryMeterView mBatteryMeterView;
+ private BatteryLevelTextView mBatteryLevelTextView;
private BatteryMeterView mBatteryMeterViewKeyguard;
private TextView mClock;
@@ -132,6 +134,8 @@
mStatusIconsKeyguard = (LinearLayout) keyguardStatusBar.findViewById(R.id.statusIcons);
mBatteryMeterView = (BatteryMeterView) statusBar.findViewById(R.id.battery);
+ mBatteryLevelTextView =
+ (BatteryLevelTextView) statusBar.findViewById(R.id.battery_level_text);
mBatteryMeterViewKeyguard = (BatteryMeterView) keyguardStatusBar.findViewById(R.id.battery);
scaleBatteryMeterViews(context);
@@ -527,6 +531,7 @@
mBatteryMeterView.setDarkIntensity(
isInArea(mTintArea, mBatteryMeterView) ? mDarkIntensity : 0);
mClock.setTextColor(getTint(mTintArea, mClock, mIconTint));
+ mBatteryLevelTextView.setTextColor(getTint(mTintArea, mClock, mIconTint));
}
public void appTransitionPending() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconList.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconList.java
old mode 100644
new mode 100755
index 660672d..00465db
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconList.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconList.java
@@ -40,10 +40,10 @@
return i;
}
}
- // Auto insert new items at the beginning.
- mSlots.add(0, slot);
- mIcons.add(0, null);
- return 0;
+ // Auto insert new items at the end.
+ mSlots.add(slot);
+ mIcons.add(null);
+ return N;
}
public int size() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessPointControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessPointControllerImpl.java
index d1e4963..b452111 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessPointControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AccessPointControllerImpl.java
@@ -30,6 +30,7 @@
import com.android.settingslib.wifi.WifiTracker;
import com.android.settingslib.wifi.WifiTracker.WifiListener;
import com.android.systemui.R;
+import android.net.wifi.WifiManager;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -103,7 +104,7 @@
@Override
public int getIcon(AccessPoint ap) {
- int level = ap.getLevel();
+ int level = WifiManager.calculateSignalLevel(ap.getRssi(), WifiManager.RSSI_LEVELS);
return ICONS[level >= 0 ? level : 0];
}
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 616d210..4b85442 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CallbackHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CallbackHandler.java
@@ -23,6 +23,7 @@
import com.android.systemui.statusbar.policy.NetworkController.EmergencyListener;
import com.android.systemui.statusbar.policy.NetworkController.IconState;
import com.android.systemui.statusbar.policy.NetworkController.SignalCallback;
+import com.android.systemui.statusbar.policy.NetworkController.SignalCallbackExtended;
import java.util.ArrayList;
import java.util.List;
@@ -32,7 +33,7 @@
* Implements network listeners and forwards the calls along onto other listeners but on
* the current or specified Looper.
*/
-public class CallbackHandler extends Handler implements EmergencyListener, SignalCallback {
+public class CallbackHandler extends Handler implements EmergencyListener, SignalCallbackExtended {
private static final int MSG_EMERGENCE_CHANGED = 0;
private static final int MSG_SUBS_CHANGED = 1;
private static final int MSG_NO_SIM_VISIBLE_CHANGED = 2;
@@ -123,16 +124,49 @@
@Override
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, boolean roaming) {
+ final int statusType, final int qsType, final boolean activityIn,
+ final boolean activityOut, final int dataActivityId, final int mobileActivityId,
+ final int stackedDataIcon, final int stackedVoiceIcon,
+ final String typeContentDescription, final String description, final boolean isWide,
+ final int subId, boolean roaming) {
post(new Runnable() {
@Override
public void run() {
for (SignalCallback signalCluster : mSignalCallbacks) {
signalCluster.setMobileDataIndicators(statusIcon, qsIcon, statusType, qsType,
- activityIn, activityOut, typeContentDescription, description, isWide,
- subId, roaming);
+ activityIn, activityOut, dataActivityId, mobileActivityId,
+ stackedDataIcon, stackedVoiceIcon,
+ typeContentDescription, description, isWide, subId, roaming);
+ }
+ }
+ });
+ }
+
+ @Override
+ public void setMobileDataIndicators(final IconState statusIcon, final IconState qsIcon,
+ final int statusType, final int qsType, final boolean activityIn,
+ final boolean activityOut, final int dataActivityId, final int mobileActivityId,
+ final int stackedDataIcon, final int stackedVoiceIcon,
+ final String typeContentDescription, final String description, final boolean isWide,
+ final int subId, final int dataNetworkTypeId, final int embmsIconId,
+ final boolean isMobileIms, final boolean isImsOverWifi, boolean roaming) {
+ post(new Runnable() {
+ @Override
+ public void run() {
+ for (SignalCallback signalCluster : mSignalCallbacks) {
+ if (signalCluster instanceof SignalCallbackExtended) {
+ ((SignalCallbackExtended)signalCluster).setMobileDataIndicators(
+ statusIcon, qsIcon, statusType, qsType, activityIn,
+ activityOut, dataActivityId, mobileActivityId,
+ stackedDataIcon, stackedVoiceIcon, typeContentDescription,
+ description, isWide, subId, dataNetworkTypeId,
+ embmsIconId, isMobileIms, isImsOverWifi, roaming);
+ } else {
+ signalCluster.setMobileDataIndicators(statusIcon, qsIcon, statusType,
+ qsType, activityIn, activityOut, dataActivityId,
+ mobileActivityId, stackedDataIcon, stackedVoiceIcon,
+ typeContentDescription, description, isWide, subId, roaming);
+ }
}
}
});
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
index 66152fc..3e57d48 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
@@ -87,7 +87,7 @@
R.styleable.Clock,
0, 0);
try {
- mAmPmStyle = a.getInt(R.styleable.Clock_amPmStyle, AM_PM_STYLE_GONE);
+ mAmPmStyle = a.getInt(R.styleable.Clock_amPmStyle, AM_PM_STYLE_NORMAL);
} finally {
a.recycle();
}
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 a92422a..45a508c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
@@ -25,6 +25,7 @@
import android.icu.text.DisplayContext;
import android.util.AttributeSet;
import android.widget.TextView;
+import android.provider.Settings;
import com.android.systemui.R;
@@ -108,10 +109,20 @@
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.config_dateformat)) {
+ String dateformat = Settings.System.getString(getContext().getContentResolver(),
+ Settings.System.DATE_FORMAT);
+ return android.text.format.DateFormat.format(dateformat, mCurrentTime).toString();
+ } else {
+ return mDateFormat.format(mCurrentTime);
+ }
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
old mode 100644
new mode 100755
index 03c46e8..a89122d
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java
@@ -15,10 +15,18 @@
*/
package com.android.systemui.statusbar.policy;
+import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
+import android.content.res.Resources;
+import android.database.ContentObserver;
import android.net.NetworkCapabilities;
+import android.os.Handler;
import android.os.Looper;
+import android.os.SystemProperties;
+import android.provider.Settings;
+import android.telephony.CellLocation;
+import android.telephony.gsm.GsmCellLocation;
import android.telephony.PhoneStateListener;
import android.telephony.ServiceState;
import android.telephony.SignalStrength;
@@ -35,12 +43,14 @@
import com.android.systemui.R;
import com.android.systemui.statusbar.policy.NetworkController.IconState;
import com.android.systemui.statusbar.policy.NetworkController.SignalCallback;
+import com.android.systemui.statusbar.policy.NetworkController.SignalCallbackExtended;
import com.android.systemui.statusbar.policy.NetworkControllerImpl.Config;
import com.android.systemui.statusbar.policy.NetworkControllerImpl.SubscriptionDefaults;
import java.io.PrintWriter;
import java.util.BitSet;
import java.util.Objects;
+import java.util.List;
public class MobileSignalController extends SignalController<
@@ -57,6 +67,14 @@
// @VisibleForDemoMode
final SparseArray<MobileIconGroup> mNetworkToIconLookup;
+ private boolean mLastShowSpn;
+ private String mLastSpn;
+ private String mLastDataSpn;
+ private boolean mLastShowPlmn;
+ private String mLastPlmn;
+ private boolean mIsDataSignalControlEnabled;
+
+
// Since some pieces of the phone state are interdependent we store it locally,
// this could potentially become part of MobileState for simplification/complication
// of code.
@@ -66,6 +84,20 @@
private SignalStrength mSignalStrength;
private MobileIconGroup mDefaultIcons;
private Config mConfig;
+ private int mNewCellIdentity = Integer.MAX_VALUE;
+ private CallbackHandler mCallbackHandler;
+
+ private final int STATUS_BAR_STYLE_ANDROID_DEFAULT = 0;
+ private final int STATUS_BAR_STYLE_CDMA_1X_COMBINED = 1;
+ private final int STATUS_BAR_STYLE_DEFAULT_DATA = 2;
+ private final int STATUS_BAR_STYLE_DATA_VOICE = 3;
+ private final int STATUS_BAR_STYLE_EXTENDED = 4;
+ private int mStyle = STATUS_BAR_STYLE_ANDROID_DEFAULT;
+ private DataEnabledSettingObserver mDataEnabledSettingObserver;
+
+ private int[] mCarrierOneThresholdValues = null;
+ private boolean mIsCarrierOneNetwork = false;
+ private String[] mCarrieroneMccMncs = null;
// TODO: Reduce number of vars passed in, if we have the NetworkController, probably don't
// need listener lists anymore.
@@ -76,6 +108,8 @@
super("MobileSignalController(" + info.getSubscriptionId() + ")", context,
NetworkCapabilities.TRANSPORT_CELLULAR, callbackHandler,
networkController);
+
+ mCallbackHandler = callbackHandler;
mNetworkToIconLookup = new SparseArray<>();
mConfig = config;
mPhone = phone;
@@ -86,8 +120,27 @@
mNetworkNameSeparator = getStringIfExists(R.string.status_bar_network_name_separator);
mNetworkNameDefault = getStringIfExists(
com.android.internal.R.string.lockscreen_carrier_default);
+ mIsDataSignalControlEnabled = mContext.getResources()
+ .getBoolean(R.bool.config_data_signal_control);
+ if (mIsDataSignalControlEnabled) {
+ mDataEnabledSettingObserver =
+ new DataEnabledSettingObserver(new Handler(), context);
+ mLastState.isForbidden = mCurrentState.isForbidden =
+ !(isMobileDataEnabled(mSubscriptionInfo.getSubscriptionId()));
+ }
- mapIconSets();
+ if (config.readIconsFromXml) {
+ TelephonyIcons.readIconsFromXml(context);
+ mDefaultIcons = !mConfig.showAtLeast3G ? TelephonyIcons.G : TelephonyIcons.THREE_G;
+ } else {
+ mapIconSets();
+ }
+
+ mStyle = context.getResources().getInteger(R.integer.status_bar_style);
+ //TODO - Remove this when status_bar_style is set to 4 for carrier one in carrier config
+ if (isCarrierOneSupported()) {
+ mStyle = STATUS_BAR_STYLE_EXTENDED;
+ }
String networkName = info.getCarrierName() != null ? info.getCarrierName().toString()
: mNetworkNameDefault;
@@ -97,11 +150,23 @@
mLastState.iconGroup = mCurrentState.iconGroup = mDefaultIcons;
// Get initial data sim state.
updateDataSim();
+ mCarrieroneMccMncs = mContext.getResources().getStringArray(
+ R.array.config_carrier_one_networks);
+ mCarrierOneThresholdValues = mContext.getResources().getIntArray(
+ R.array.carrier_one_strength_threshold_values);
+ }
+
+ //TODO - Remove this when carrier pack is enabled for carrier one
+ public static boolean isCarrierOneSupported() {
+ String property = SystemProperties.get("persist.radio.atel.carrier");
+ return "405854".equals(property);
}
public void setConfiguration(Config config) {
mConfig = config;
- mapIconSets();
+ if (!config.readIconsFromXml) {
+ mapIconSets();
+ }
updateTelephony();
}
@@ -109,6 +174,11 @@
return getIcons().mDataContentDescription;
}
+ public void setForbiddenState(boolean isForbidden) {
+ mCurrentState.isForbidden = isForbidden;
+ notifyListenersIfNecessary();
+ }
+
public void setAirplaneMode(boolean airplaneMode) {
mCurrentState.airplaneMode = airplaneMode;
notifyListenersIfNecessary();
@@ -144,6 +214,9 @@
| PhoneStateListener.LISTEN_DATA_CONNECTION_STATE
| PhoneStateListener.LISTEN_DATA_ACTIVITY
| PhoneStateListener.LISTEN_CARRIER_NETWORK_CHANGE);
+ if (mIsDataSignalControlEnabled) {
+ mDataEnabledSettingObserver.register();
+ }
}
/**
@@ -151,8 +224,10 @@
*/
public void unregisterListener() {
mPhone.listen(mPhoneStateListener, 0);
+ if (mIsDataSignalControlEnabled) {
+ mDataEnabledSettingObserver.unregister();
+ }
}
-
/**
* Produce a mapping of data network types to icon groups for simple and quick use in
* updateTelephony.
@@ -165,6 +240,7 @@
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_EVDO_B, TelephonyIcons.THREE_G);
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_EHRPD, TelephonyIcons.THREE_G);
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_UMTS, TelephonyIcons.THREE_G);
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_TD_SCDMA, TelephonyIcons.THREE_G);
if (!mConfig.showAtLeast3G) {
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_UNKNOWN,
@@ -185,7 +261,9 @@
TelephonyIcons.THREE_G);
mDefaultIcons = TelephonyIcons.THREE_G;
}
-
+ if (mContext.getResources().getBoolean(R.bool.show_network_indicators)) {
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_EDGE, TelephonyIcons.E);
+ }
MobileIconGroup hGroup = TelephonyIcons.THREE_G;
if (mConfig.hspaDataDistinguishable) {
hGroup = TelephonyIcons.H;
@@ -194,24 +272,52 @@
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSUPA, hGroup);
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSPA, hGroup);
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSPAP, hGroup);
+ if (mContext.getResources().getBoolean(R.bool.config_show4gForHspap)) {
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSPAP, TelephonyIcons.FOUR_G);
+ } else {
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSPAP, hGroup);
+ }
+ if (mContext.getResources().getBoolean(R.bool.show_network_indicators)) {
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSDPA,
+ TelephonyIcons.THREE_G_PLUS);
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSUPA,
+ TelephonyIcons.THREE_G_PLUS);
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSPA,
+ TelephonyIcons.THREE_G_PLUS);
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_HSPAP, TelephonyIcons.H_PLUS);
+ }
if (mConfig.show4gForLte) {
- mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE, TelephonyIcons.FOUR_G);
- if (mConfig.hideLtePlus) {
- mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
- TelephonyIcons.FOUR_G);
+ if (mContext.getResources().getBoolean(R.bool.show_4glte_icon_for_lte)) {
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE,
+ TelephonyIcons.FOUR_G_LTE);
+ } else if (mContext.getResources().getBoolean(R.bool.show_network_indicators)) {
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE, TelephonyIcons.LTE);
} else {
- mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
- TelephonyIcons.FOUR_G_PLUS);
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE, TelephonyIcons.FOUR_G);
+ if (mConfig.hideLtePlus) {
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
+ TelephonyIcons.FOUR_G);
+ } else {
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
+ TelephonyIcons.FOUR_G_PLUS);
+ }
}
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
+ TelephonyIcons.FOUR_G_PLUS);
} else {
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE, TelephonyIcons.LTE);
- if (mConfig.hideLtePlus) {
+ if (mContext.getResources().getBoolean(R.bool.show_network_indicators)){
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
- TelephonyIcons.LTE);
+ TelephonyIcons.FOUR_G_PLUS);
} else {
- mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
+ if (mConfig.hideLtePlus) {
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
+ TelephonyIcons.LTE);
+ } else {
+ mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_LTE_CA,
TelephonyIcons.LTE_PLUS);
+ }
}
}
mNetworkToIconLookup.put(TelephonyManager.NETWORK_TYPE_IWLAN, TelephonyIcons.WFC);
@@ -219,6 +325,9 @@
@Override
public void notifyListeners(SignalCallback callback) {
+ if (mConfig.readIconsFromXml) {
+ generateIconGroup();
+ }
MobileIconGroup icons = getIcons();
String contentDescription = getStringIfExists(getContentDescription());
@@ -227,7 +336,11 @@
&& mCurrentState.userSetup;
// Show icon in QS when we are connected or data is disabled.
- boolean showDataIcon = mCurrentState.dataConnected || dataDisabled;
+ boolean showDataIcon = false;
+
+ showDataIcon = mCurrentState.dataConnected
+ || dataDisabled;
+
IconState statusIcon = new IconState(mCurrentState.enabled && !mCurrentState.airplaneMode,
getCurrentIconId(), contentDescription);
@@ -247,11 +360,97 @@
boolean activityOut = mCurrentState.dataConnected
&& !mCurrentState.carrierNetworkChangeMode
&& mCurrentState.activityOut;
- showDataIcon &= mCurrentState.isDefault || dataDisabled;
+ showDataIcon &= mCurrentState.isDefault
+ || dataDisabled;
+
+ showDataIcon &= (mStyle == STATUS_BAR_STYLE_ANDROID_DEFAULT
+ || mStyle == STATUS_BAR_STYLE_EXTENDED);
int typeIcon = showDataIcon ? icons.mDataType : 0;
- callback.setMobileDataIndicators(statusIcon, qsIcon, typeIcon, qsTypeIcon,
- activityIn, activityOut, dataContentDescription, description, icons.mIsWide,
- mSubscriptionInfo.getSubscriptionId(), mCurrentState.roaming);
+ int dataActivityId = showMobileActivity() ? 0 : icons.mActivityId;
+ int mobileActivityId = showMobileActivity() ? icons.mActivityId : 0;
+ int dataNetworkTypeId = 0;
+ if (mStyle == STATUS_BAR_STYLE_EXTENDED) {
+ dataNetworkTypeId = showDataIcon ? icons.mDataType : 0;
+ typeIcon = 0;
+ }
+ if( callback instanceof SignalCallbackExtended ) {
+ ((SignalCallbackExtended)callback).setMobileDataIndicators(statusIcon, qsIcon, typeIcon,
+ qsTypeIcon, activityIn, activityOut, dataActivityId, mobileActivityId,
+ icons.mStackedDataIcon, icons.mStackedVoiceIcon,
+ dataContentDescription, description, icons.mIsWide,
+ mSubscriptionInfo.getSubscriptionId(), dataNetworkTypeId,
+ getEmbmsIconId(), isMobileIms(), isImsRegisteredInWifi(), mCurrentState.roaming);
+ } else {
+ callback.setMobileDataIndicators(statusIcon, qsIcon, typeIcon, qsTypeIcon,
+ activityIn, activityOut, dataActivityId, mobileActivityId,
+ icons.mStackedDataIcon, icons.mStackedVoiceIcon,
+ dataContentDescription, description, icons.mIsWide,
+ mSubscriptionInfo.getSubscriptionId(), mCurrentState.roaming);
+ }
+ mCallbackHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ mNetworkController.updateNetworkLabelView();
+ }
+ });
+ }
+
+ private int getEmbmsIconId() {
+ if (mStyle == STATUS_BAR_STYLE_EXTENDED
+ && isEmbmsActiveOnDataSim()) {
+ return R.drawable.lte_embms_services_all_brackets;
+ } else {
+ return 0;
+ }
+ }
+
+ private boolean isEmbmsActiveOnDataSim() {
+ return mNetworkController.isEmbmsActive()
+ && mCurrentState.dataSim;
+ }
+
+ private boolean isImsRegisteredInWifi() {
+ if (mStyle != STATUS_BAR_STYLE_EXTENDED) {
+ return false;
+ }
+
+ List<SubscriptionInfo> subInfos = SubscriptionManager.from(mContext)
+ .getActiveSubscriptionInfoList();
+ if (subInfos != null) {
+ for (SubscriptionInfo subInfo: subInfos) {
+ int subId = subInfo.getSubscriptionId();
+ if (mPhone != null
+ && (mPhone.isVoWifiCallingAvailableForSubscriber(subId)
+ || mPhone.isVideoTelephonyWifiCallingAvailableForSubscriber(subId))) {
+ return true;
+ }
+ }
+ } else {
+ Log.e(mTag, "Invalid SubscriptionInfo");
+ }
+ return false;
+ }
+
+ private boolean isMobileIms() {
+ if (mStyle != STATUS_BAR_STYLE_EXTENDED) {
+ return false;
+ }
+
+ List<SubscriptionInfo> subInfos = SubscriptionManager.from(mContext)
+ .getActiveSubscriptionInfoList();
+ if (subInfos != null) {
+ for (SubscriptionInfo subInfo: subInfos) {
+ int subId = subInfo.getSubscriptionId();
+ if (mPhone != null
+ && mPhone.isImsRegisteredForSubscriber(subId)
+ && (!(isImsRegisteredInWifi()))) {
+ return true;
+ }
+ }
+ } else {
+ Log.e(mTag, "Invalid SubscriptionInfo");
+ }
+ return false;
}
@Override
@@ -259,6 +458,15 @@
return new MobileState();
}
+ @Override
+ public int getCurrentIconId() {
+ if (mConfig.readIconsFromXml && mCurrentState.connected) {
+ return getIcons().mSingleSignalIcon;
+ } else {
+ return super.getCurrentIconId();
+ }
+ }
+
private boolean hasService() {
if (mServiceState != null) {
// Consider the device to be in service if either voice or data
@@ -270,9 +478,25 @@
switch (mServiceState.getVoiceRegState()) {
case ServiceState.STATE_POWER_OFF:
return false;
+ case ServiceState.STATE_IN_SERVICE:
+ if (mServiceState.getVoiceNetworkType() == TelephonyManager.NETWORK_TYPE_IWLAN
+ && (mServiceState.getDataNetworkType() ==
+ TelephonyManager.NETWORK_TYPE_IWLAN ||
+ mServiceState.getDataRegState() != ServiceState.STATE_IN_SERVICE)) {
+ return false;
+ } else {
+ return true;
+ }
case ServiceState.STATE_OUT_OF_SERVICE:
case ServiceState.STATE_EMERGENCY_ONLY:
- return mServiceState.getDataRegState() == ServiceState.STATE_IN_SERVICE;
+ if (mContext.getResources().getBoolean(R.bool.config_showSignalForIWlan)) {
+ return mServiceState.getDataRegState() == ServiceState.STATE_IN_SERVICE;
+ } else {
+ return ((mServiceState.getDataRegState() ==
+ ServiceState.STATE_IN_SERVICE)&&
+ (mServiceState.getDataNetworkType() !=
+ TelephonyManager.NETWORK_TYPE_IWLAN));
+ }
default:
return true;
}
@@ -316,6 +540,11 @@
} else if (action.equals(TelephonyIntents.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED)) {
updateDataSim();
notifyListenersIfNecessary();
+ } else if (action.equals(Intent.ACTION_LOCALE_CHANGED)) {
+ if (mConfig.showLocale) {
+ updateNetworkName(mLastShowSpn, mLastSpn, mLastDataSpn, mLastShowPlmn, mLastPlmn);
+ notifyListenersIfNecessary();
+ }
}
}
@@ -335,27 +564,94 @@
}
}
+ private String getLocalString(String originalString) {
+ return android.util.NativeTextHelper.getLocalString(mContext, originalString,
+ com.android.internal.R.array.origin_carrier_names,
+ com.android.internal.R.array.locale_carrier_names);
+ }
+
+ private String getNetworkClassString(ServiceState state) {
+ if (state != null && (state.getDataRegState() == ServiceState.STATE_IN_SERVICE ||
+ state.getVoiceRegState() == ServiceState.STATE_IN_SERVICE)) {
+ int voiceNetType = state.getVoiceNetworkType();
+ int dataNetType = state.getDataNetworkType();
+ int chosenNetType =
+ ((dataNetType == TelephonyManager.NETWORK_TYPE_UNKNOWN)
+ ? voiceNetType : dataNetType);
+ return networkClassToString(TelephonyManager.getNetworkClass(chosenNetType));
+ } else {
+ return "";
+ }
+ }
+
+ private String networkClassToString (int networkClass) {
+ final int[] classIds =
+ {com.android.internal.R.string.config_rat_unknown, // TelephonyManager.NETWORK_CLASS_UNKNOWN
+ com.android.internal.R.string.config_rat_2g,
+ com.android.internal.R.string.config_rat_3g,
+ com.android.internal.R.string.config_rat_4g };
+ String classString = null;
+ if (networkClass < classIds.length) {
+ classString = mContext.getResources().getString(classIds[networkClass]);
+ }
+ return (classString == null) ? "" : classString;
+ }
+
/**
* Updates the network's name based on incoming spn and plmn.
*/
void updateNetworkName(boolean showSpn, String spn, String dataSpn,
boolean showPlmn, String plmn) {
+ mLastShowSpn = showSpn;
+ mLastSpn = spn;
+ mLastDataSpn = dataSpn;
+ mLastShowPlmn = showPlmn;
+ mLastPlmn = plmn;
if (CHATTY) {
Log.d("CarrierLabel", "updateNetworkName showSpn=" + showSpn
+ " spn=" + spn + " dataSpn=" + dataSpn
+ " showPlmn=" + showPlmn + " plmn=" + plmn);
}
+ if (mConfig.showLocale) {
+ if (showSpn && !TextUtils.isEmpty(spn)) {
+ spn = getLocalString(spn);
+ }
+ if (showSpn && !TextUtils.isEmpty(dataSpn)) {
+ dataSpn = getLocalString(dataSpn);
+ }
+ if (showPlmn && !TextUtils.isEmpty(plmn)) {
+ plmn = getLocalString(plmn);
+ }
+ }
+ if (showPlmn && showSpn && !TextUtils.isEmpty(spn) && !TextUtils.isEmpty(plmn)
+ && plmn.equals(spn)) {
+ showSpn = false;
+ }
+ boolean showRat = mConfig.showRat;
+ int[] subId = SubscriptionManager.getSubId(getSimSlotIndex());
+ if (subId != null && subId.length >= 1) {
+ showRat = SubscriptionManager.getResourcesForSubId(mContext,
+ subId[0]).getBoolean(com.android.internal.R.bool.config_display_rat);
+ }
+ String networkClass = getNetworkClassString(mServiceState);
+ Log.d(mTag, "networkClass=" + networkClass + " showRat=" + showRat +
+ " slot=" + getSimSlotIndex());
StringBuilder str = new StringBuilder();
StringBuilder strData = new StringBuilder();
if (showPlmn && plmn != null) {
str.append(plmn);
strData.append(plmn);
+ if (showRat) {
+ str.append(" ").append(networkClass);
+ strData.append(" ").append(networkClass);
+ }
}
if (showSpn && spn != null) {
if (str.length() != 0) {
str.append(mNetworkNameSeparator);
}
str.append(spn);
+ if (showRat) str.append(" ").append(networkClass);
}
if (str.length() != 0) {
mCurrentState.networkName = str.toString();
@@ -367,6 +663,7 @@
strData.append(mNetworkNameSeparator);
}
strData.append(dataSpn);
+ if (showRat) strData.append(" ").append(networkClass);
}
if (strData.length() != 0) {
mCurrentState.networkNameData = strData.toString();
@@ -382,7 +679,7 @@
*/
private final void updateTelephony() {
if (DEBUG) {
- Log.d(mTag, "updateTelephonySignalStrength: hasService=" + hasService()
+ Log.d(mTag, "updateTelephony: hasService=" + hasService()
+ " ss=" + mSignalStrength);
}
mCurrentState.connected = hasService() && mSignalStrength != null;
@@ -391,6 +688,13 @@
mCurrentState.level = mSignalStrength.getCdmaLevel();
} else {
mCurrentState.level = mSignalStrength.getLevel();
+ if (mConfig.showRsrpSignalLevelforLTE) {
+ int dataType = mServiceState.getDataNetworkType();
+ if (dataType == TelephonyManager.NETWORK_TYPE_LTE ||
+ dataType == TelephonyManager.NETWORK_TYPE_LTE_CA) {
+ mCurrentState.level = getAlternateLteLevel(mSignalStrength);
+ }
+ }
}
}
if (mNetworkToIconLookup.indexOfKey(mDataNetType) >= 0) {
@@ -400,8 +704,9 @@
}
mCurrentState.dataConnected = mCurrentState.connected
&& mDataState == TelephonyManager.DATA_CONNECTED;
-
+
mCurrentState.roaming = isRoaming();
+
if (isCarrierNetworkChangeActive()) {
mCurrentState.iconGroup = TelephonyIcons.CARRIER_NETWORK_CHANGE;
} else if (isDataDisabled()) {
@@ -417,6 +722,26 @@
mCurrentState.networkName = mServiceState.getOperatorAlphaShort();
}
+ if (!showLongOperatorName() && mServiceState != null && !TextUtils.isEmpty(
+ mServiceState.getOperatorAlphaShort())) {
+ mCurrentState.networkNameData = mServiceState.getOperatorAlphaShort()
+ + " " + getNetworkClassString(mServiceState);
+ }
+
+ if (mConfig.readIconsFromXml) {
+ mCurrentState.voiceLevel = getVoiceSignalLevel();
+ }
+
+ if (mStyle == STATUS_BAR_STYLE_EXTENDED) {
+ mCurrentState.imsRadioTechnology = getImsRadioTechnology();
+ }
+
+ mCurrentState.dataNetType = getDataNetworkType();
+
+ if (getDataRegState() != mCurrentState.dataRegState){
+ mCurrentState.dataRegState = getDataRegState();
+ }
+
notifyListenersIfNecessary();
}
@@ -424,12 +749,267 @@
return !mPhone.getDataEnabled(mSubscriptionInfo.getSubscriptionId());
}
+ private boolean showLongOperatorName() {
+ if (mContext.getResources().getBoolean(R.bool.config_show_long_operator_name) || (mContext.
+ getResources().getBoolean(R.bool.config_show_long_operator_name_when_roaming) &&
+ isRoaming())) {
+ return true;
+ }
+ return false;
+ }
+
+ private void generateIconGroup() {
+ final int level = mCurrentState.level;
+ final int voiceLevel = mCurrentState.voiceLevel;
+ final int inet = mCurrentState.inetCondition;
+ final boolean dataConnected = mCurrentState.dataConnected;
+ final boolean roaming = isRoaming();
+ final int voiceType = getVoiceNetworkType();
+ final int dataType = mDataNetType;
+ int[][] sbIcons = TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH;
+ int[][] qsIcons = TelephonyIcons.QS_TELEPHONY_SIGNAL_STRENGTH;
+ int[] contentDesc = AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH;
+ int sbDiscState = TelephonyIcons.TELEPHONY_NO_NETWORK;
+ int qsDiscState = TelephonyIcons.QS_TELEPHONY_NO_NETWORK;
+ int discContentDesc = AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0];
+ int dataContentDesc, dataTypeIcon, qsDataTypeIcon, dataActivityId;
+ int singleSignalIcon, stackedDataIcon = 0, stackedVoiceIcon = 0;
+
+ final int slotId = getSimSlotIndex();
+ if (slotId < 0 || slotId > mPhone.getPhoneCount()) {
+ Log.e(mTag, "generateIconGroup invalid slotId:" + slotId);
+ return;
+ }
+
+ if (DEBUG) Log.d(mTag, "generateIconGroup slot:" + slotId + " style:" + mStyle
+ + " connected:" + mCurrentState.connected + " inetCondition:" + inet
+ + " roaming:" + roaming + " level:" + level + " voiceLevel:" + voiceLevel
+ + " dataConnected:" + dataConnected
+ + " dataActivity:" + mCurrentState.dataActivity
+ + " CS:" + voiceType
+ + "/" + TelephonyManager.getNetworkTypeName(voiceType)
+ + ", PS:" + dataType
+ + "/" + TelephonyManager.getNetworkTypeName(dataType));
+
+ // Update data icon set
+ int chosenNetworkType = ((dataType == TelephonyManager.NETWORK_TYPE_UNKNOWN)
+ ? voiceType : dataType);
+ TelephonyIcons.updateDataType(slotId, chosenNetworkType, mConfig.showAtLeast3G,
+ mConfig.show4gForLte, mConfig.hspaDataDistinguishable, inet);
+
+ // Update signal strength icons
+ singleSignalIcon = TelephonyIcons.getSignalStrengthIcon(slotId, inet, level, roaming);
+ if (DEBUG) {
+ Log.d(mTag, "singleSignalIcon:" + getResourceName(singleSignalIcon));
+ }
+
+ if (mIsDataSignalControlEnabled) {
+ dataActivityId = (mCurrentState.dataConnected && slotId >= 0) ?
+ TelephonyIcons.getDataActivity(slotId, mCurrentState.dataActivity) :
+ getCustomStatusBarIcon(slotId);
+ } else {
+ dataActivityId = (mCurrentState.dataConnected && slotId >= 0) ?
+ TelephonyIcons.getDataActivity(slotId, mCurrentState.dataActivity) : 0;
+ }
+ // Convert the icon to unstacked if necessary.
+ int unstackedSignalIcon = TelephonyIcons.convertMobileStrengthIcon(singleSignalIcon);
+ if (DEBUG) {
+ Log.d(mTag, "unstackedSignalIcon:" + getResourceName(unstackedSignalIcon));
+ }
+ if (singleSignalIcon != unstackedSignalIcon) {
+ stackedDataIcon = singleSignalIcon;
+ singleSignalIcon = unstackedSignalIcon;
+ }
+
+ if (mStyle == STATUS_BAR_STYLE_CDMA_1X_COMBINED) {
+ if (!roaming && showDataAndVoice()) {
+ stackedVoiceIcon = TelephonyIcons.getStackedVoiceIcon(voiceLevel);
+ } else if (roaming && dataActivityId != 0) {
+ // Remove data type indicator if already shown in data activity icon.
+ singleSignalIcon = TelephonyIcons.getRoamingSignalIconId(level, inet);
+ }
+ }
+
+ // Clear satcked data icon if no satcked voice icon.
+ if (stackedVoiceIcon == 0) stackedDataIcon = 0;
+
+ contentDesc = TelephonyIcons.getSignalStrengthDes(slotId);
+ sbDiscState = TelephonyIcons.getSignalNullIcon(slotId);
+ if (DEBUG) {
+ Log.d(mTag, "singleSignalIcon=" + getResourceName(singleSignalIcon)
+ + " dataActivityId=" + getResourceName(dataActivityId)
+ + " stackedDataIcon=" + getResourceName(stackedDataIcon)
+ + " stackedVoiceIcon=" + getResourceName(stackedVoiceIcon));
+ }
+
+ // Update data net type icons
+ if (dataType == TelephonyManager.NETWORK_TYPE_IWLAN &&
+ mContext.getResources().getBoolean(R.bool.config_show4gForIWlan)) {
+ // wimax is a special 4g network not handled by telephony
+ dataTypeIcon = TelephonyIcons.ICON_4G;
+ qsDataTypeIcon = TelephonyIcons.QS_DATA_4G;
+ dataContentDesc = R.string.accessibility_data_connection_4g;
+ } else {
+ dataTypeIcon = TelephonyIcons.getDataTypeIcon(slotId);
+ dataContentDesc = TelephonyIcons.getDataTypeDesc(slotId);
+ qsDataTypeIcon = TelephonyIcons.getQSDataTypeIcon(slotId);
+ }
+
+ if (DEBUG) {
+ Log.d(mTag, "updateDataNetType, dataTypeIcon=" + getResourceName(dataTypeIcon)
+ + " qsDataTypeIcon=" + getResourceName(qsDataTypeIcon)
+ + " dataContentDesc=" + dataContentDesc);
+ }
+ boolean isWide = roaming && mStyle == STATUS_BAR_STYLE_EXTENDED;
+ mCurrentState.iconGroup = new MobileIconGroup(
+ TelephonyManager.getNetworkTypeName(dataType),
+ sbIcons, qsIcons, contentDesc, 0, 0, sbDiscState, qsDiscState, discContentDesc,
+ dataContentDesc, dataTypeIcon, isWide, qsDataTypeIcon,
+ singleSignalIcon, stackedDataIcon, stackedVoiceIcon, dataActivityId);
+ }
+
+ private boolean isMobileDataEnabled(int subId) {
+ //Checks for data enabled or not from the given subId.
+ return TelephonyManager.getDefault().getDataEnabled(subId);
+ }
+
+ private int getCustomStatusBarIcon(int slotId) {
+ int dataTypeIcon = 0 ;
+ if (!mCurrentState.dataConnected && mCurrentState.isForbidden) {
+ // Show Forbidden icon incase both data is Disabled and
+ // disconnected
+ dataTypeIcon = TelephonyIcons.getForbiddenDataIcon(slotId);
+ } else {
+ // Show greyed icon incase data is enabled and not preferred
+ dataTypeIcon = TelephonyIcons.getDataDisconnectedIcon(slotId);
+ }
+ return dataTypeIcon;
+ }
+
+ private int getSimSlotIndex() {
+ int slotId = -1;
+ if (mSubscriptionInfo != null) {
+ slotId = mSubscriptionInfo.getSimSlotIndex();
+ }
+ if (DEBUG) Log.d(mTag, "getSimSlotIndex, slotId: " + slotId);
+ return slotId;
+ }
+
+ private boolean showMobileActivity() {
+ return (mStyle == STATUS_BAR_STYLE_DEFAULT_DATA)
+ || (mStyle == STATUS_BAR_STYLE_ANDROID_DEFAULT)
+ || (mStyle == STATUS_BAR_STYLE_EXTENDED);
+ }
+
+ private int getVoiceNetworkType() {
+ if (mServiceState == null) {
+ return TelephonyManager.NETWORK_TYPE_UNKNOWN;
+ }
+ return mServiceState.getVoiceNetworkType();
+ }
+
+ private int getDataNetworkType() {
+ if (mServiceState == null) {
+ return TelephonyManager.NETWORK_TYPE_UNKNOWN;
+ }
+ return mServiceState.getDataNetworkType();
+ }
+
+ private int getImsRadioTechnology() {
+ if (mServiceState == null || (mServiceState.getVoiceRegState() !=
+ ServiceState.STATE_IN_SERVICE)) {
+ return ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN;
+ }
+ return mServiceState.getRilImsRadioTechnology();
+ }
+
+ private int getVoiceSignalLevel() {
+ if (mSignalStrength == null) {
+ return SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+ }
+ boolean isCdma = TelephonyManager.PHONE_TYPE_CDMA == TelephonyManager.getDefault()
+ .getCurrentPhoneType(mSubscriptionInfo.getSubscriptionId());
+ return isCdma ? mSignalStrength.getCdmaLevel() : mSignalStrength.getGsmLevel();
+ }
+
+ private boolean showDataAndVoice() {
+ if (mStyle != STATUS_BAR_STYLE_CDMA_1X_COMBINED) {
+ return false;
+ }
+ int dataType = getDataNetworkType();
+ int voiceType = getVoiceNetworkType();
+ if ((dataType == TelephonyManager.NETWORK_TYPE_EVDO_0
+ || dataType == TelephonyManager.NETWORK_TYPE_EVDO_0
+ || dataType == TelephonyManager.NETWORK_TYPE_EVDO_A
+ || dataType == TelephonyManager.NETWORK_TYPE_EVDO_B
+ || dataType == TelephonyManager.NETWORK_TYPE_EHRPD
+ || dataType == TelephonyManager.NETWORK_TYPE_LTE
+ || dataType == TelephonyManager.NETWORK_TYPE_LTE_CA)
+ && (voiceType == TelephonyManager.NETWORK_TYPE_GSM
+ || voiceType == TelephonyManager.NETWORK_TYPE_1xRTT
+ || voiceType == TelephonyManager.NETWORK_TYPE_CDMA)) {
+ return true;
+ }
+ return false;
+ }
+
+ private boolean show1xOnly() {
+ int dataType = getDataNetworkType();
+ int voiceType = getVoiceNetworkType();
+ if (dataType == TelephonyManager.NETWORK_TYPE_1xRTT
+ || dataType == TelephonyManager.NETWORK_TYPE_CDMA) {
+ return true;
+ }
+ return false;
+ }
+
+ private int getAlternateLteLevel(SignalStrength signalStrength) {
+ int lteRsrp = signalStrength.getLteDbm();
+ int rsrpLevel = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+ if (lteRsrp > -44) rsrpLevel = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+ else if (lteRsrp >= -97) rsrpLevel = SignalStrength.SIGNAL_STRENGTH_GREAT;
+ else if (lteRsrp >= -105) rsrpLevel = SignalStrength.SIGNAL_STRENGTH_GOOD;
+ else if (lteRsrp >= -113) rsrpLevel = SignalStrength.SIGNAL_STRENGTH_MODERATE;
+ else if (lteRsrp >= -120) rsrpLevel = SignalStrength.SIGNAL_STRENGTH_POOR;
+ else if (lteRsrp >= -140) rsrpLevel = SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+ if (DEBUG) {
+ Log.d(mTag, "getAlternateLteLevel lteRsrp:" + lteRsrp + " rsrpLevel = " + rsrpLevel);
+ }
+ return rsrpLevel;
+ }
+
+ protected String getResourceName(int resId) {
+ if (resId != 0) {
+ final Resources res = mContext.getResources();
+ try {
+ return res.getResourceName(resId);
+ } catch (android.content.res.Resources.NotFoundException ex) {
+ return "(unknown)";
+ }
+ } else {
+ return "(null)";
+ }
+ }
+
+ private int getDataRegState() {
+ if (mServiceState == null) {
+ if (DEBUG) {
+ Log.d(mTag, "getDataRegState dataRegState:STATE_OUT_OF_SERVICE");
+ }
+ return ServiceState.STATE_OUT_OF_SERVICE;
+ }
+ return mServiceState.getDataRegState();
+ }
+
@VisibleForTesting
void setActivity(int activity) {
mCurrentState.activityIn = activity == TelephonyManager.DATA_ACTIVITY_INOUT
|| activity == TelephonyManager.DATA_ACTIVITY_IN;
mCurrentState.activityOut = activity == TelephonyManager.DATA_ACTIVITY_INOUT
|| activity == TelephonyManager.DATA_ACTIVITY_OUT;
+ if (mConfig.readIconsFromXml) {
+ mCurrentState.dataActivity = activity;
+ }
notifyListenersIfNecessary();
}
@@ -455,9 +1035,28 @@
((signalStrength == null) ? "" : (" level=" + signalStrength.getLevel())));
}
mSignalStrength = signalStrength;
+
+ if (mIsCarrierOneNetwork && mSignalStrength != null &&
+ mCarrierOneThresholdValues != null) {
+ mSignalStrength.setThreshRsrp(mCarrierOneThresholdValues);
+ }
updateTelephony();
}
+ private boolean isCarrierOneOperatorRegistered(ServiceState state) {
+ String operatornumeric = state.getOperatorNumeric();
+ if (mCarrieroneMccMncs == null || mCarrieroneMccMncs.length == 0 ||
+ TextUtils.isEmpty(operatornumeric)) {
+ return false;
+ }
+ for (String numeric : mCarrieroneMccMncs) {
+ if (operatornumeric.equals(numeric)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
@Override
public void onServiceStateChanged(ServiceState state) {
if (DEBUG) {
@@ -466,10 +1065,18 @@
}
mServiceState = state;
mDataNetType = state.getDataNetworkType();
+
+ mIsCarrierOneNetwork = isCarrierOneOperatorRegistered(mServiceState);
+ Log.d(mTag, "onServiceStateChanged mIsCarrierOneNetwork =" +
+ mIsCarrierOneNetwork);
+
+ updateNetworkName(mLastShowSpn, mLastSpn, mLastDataSpn, mLastShowPlmn, mLastPlmn);
+
if (mDataNetType == TelephonyManager.NETWORK_TYPE_LTE && mServiceState != null &&
mServiceState.isUsingCarrierAggregation()) {
mDataNetType = TelephonyManager.NETWORK_TYPE_LTE_CA;
}
+
updateTelephony();
}
@@ -479,13 +1086,36 @@
Log.d(mTag, "onDataConnectionStateChanged: state=" + state
+ " type=" + networkType);
}
- mDataState = state;
- mDataNetType = networkType;
- if (mDataNetType == TelephonyManager.NETWORK_TYPE_LTE && mServiceState != null &&
- mServiceState.isUsingCarrierAggregation()) {
- mDataNetType = TelephonyManager.NETWORK_TYPE_LTE_CA;
+ if (mContext.getResources().getBoolean(R.bool.show_network_indicators)) {
+ CellLocation cl = mPhone.getCellLocation();
+ if (cl instanceof GsmCellLocation) {
+ GsmCellLocation cellLocation = (GsmCellLocation)cl;
+ mNewCellIdentity = cellLocation.getCid();
+ Log.d(mTag, "onDataConnectionStateChanged, mNewCellIdentity = "
+ + mNewCellIdentity);
+ }
+ Log.d(mTag, "onDataConnectionStateChanged "
+ + ", mNewCellIdentity = " + mNewCellIdentity
+ + ", mDataNetType = " + mDataNetType
+ + ", networkType = " + networkType);
+ if (Integer.MAX_VALUE != mNewCellIdentity) {
+ mDataNetType = networkType;
+ } else {
+ if (networkType > mDataNetType) {
+ mDataNetType = networkType;
+ }
+ }
+ mDataState = state;
+ updateTelephony();
+ } else {
+ mDataState = state;
+ mDataNetType = networkType;
+ if (mDataNetType == TelephonyManager.NETWORK_TYPE_LTE && mServiceState != null &&
+ mServiceState.isUsingCarrierAggregation()) {
+ mDataNetType = TelephonyManager.NETWORK_TYPE_LTE_CA;
+ }
+ updateTelephony();
}
- updateTelephony();
}
@Override
@@ -512,17 +1142,35 @@
final int mDataType;
final boolean mIsWide;
final int mQsDataType;
+ final int mSingleSignalIcon;
+ final int mStackedDataIcon;
+ final int mStackedVoiceIcon;
+ final int mActivityId;
public MobileIconGroup(String name, int[][] sbIcons, int[][] qsIcons, int[] contentDesc,
int sbNullState, int qsNullState, int sbDiscState, int qsDiscState,
int discContentDesc, int dataContentDesc, int dataType, boolean isWide,
int qsDataType) {
+ this(name, sbIcons, qsIcons, contentDesc, sbNullState, qsNullState, sbDiscState,
+ qsDiscState, discContentDesc, dataContentDesc, dataType, isWide,
+ qsDataType, 0, 0, 0, 0);
+ }
+
+ public MobileIconGroup(String name, int[][] sbIcons, int[][] qsIcons, int[] contentDesc,
+ int sbNullState, int qsNullState, int sbDiscState, int qsDiscState,
+ int discContentDesc, int dataContentDesc, int dataType, boolean isWide,
+ int qsDataType, int singleSignalIcon, int stackedDataIcon,
+ int stackedVoicelIcon, int activityId) {
super(name, sbIcons, qsIcons, contentDesc, sbNullState, qsNullState, sbDiscState,
qsDiscState, discContentDesc);
mDataContentDescription = dataContentDesc;
mDataType = dataType;
mIsWide = isWide;
mQsDataType = qsDataType;
+ mSingleSignalIcon = singleSignalIcon;
+ mStackedDataIcon = stackedDataIcon;
+ mStackedVoiceIcon = stackedVoicelIcon;
+ mActivityId = activityId;
}
}
@@ -535,7 +1183,13 @@
boolean airplaneMode;
boolean carrierNetworkChangeMode;
boolean isDefault;
+ boolean isForbidden;
boolean userSetup;
+ int dataActivity;
+ int voiceLevel;
+ int imsRadioTechnology;
+ int dataNetType;
+ int dataRegState;
boolean roaming;
@Override
@@ -548,9 +1202,15 @@
dataConnected = state.dataConnected;
isDefault = state.isDefault;
isEmergency = state.isEmergency;
+ isForbidden = state.isForbidden;
airplaneMode = state.airplaneMode;
carrierNetworkChangeMode = state.carrierNetworkChangeMode;
userSetup = state.userSetup;
+ dataActivity = state.dataActivity;
+ voiceLevel = state.voiceLevel;
+ imsRadioTechnology = state.imsRadioTechnology;
+ dataNetType = state.dataNetType;
+ dataRegState = state.dataRegState;
roaming = state.roaming;
}
@@ -565,10 +1225,16 @@
builder.append("roaming=").append(roaming).append(',');
builder.append("isDefault=").append(isDefault).append(',');
builder.append("isEmergency=").append(isEmergency).append(',');
+ builder.append("isForbidden= ").append(isForbidden).append(',');
builder.append("airplaneMode=").append(airplaneMode).append(',');
builder.append("carrierNetworkChangeMode=").append(carrierNetworkChangeMode)
.append(',');
builder.append("userSetup=").append(userSetup);
+ builder.append("voiceLevel=").append(voiceLevel).append(',');
+ builder.append("carrierNetworkChangeMode=").append(carrierNetworkChangeMode);
+ builder.append("imsRadioTechnology=").append(imsRadioTechnology);
+ builder.append("dataNetType=").append(dataNetType);
+ builder.append("dataRegState=").append(dataRegState);
}
@Override
@@ -579,11 +1245,44 @@
&& ((MobileState) o).dataSim == dataSim
&& ((MobileState) o).dataConnected == dataConnected
&& ((MobileState) o).isEmergency == isEmergency
+ && ((MobileState) o).isForbidden == isForbidden
&& ((MobileState) o).airplaneMode == airplaneMode
&& ((MobileState) o).carrierNetworkChangeMode == carrierNetworkChangeMode
&& ((MobileState) o).userSetup == userSetup
+ && ((MobileState) o).voiceLevel == voiceLevel
&& ((MobileState) o).isDefault == isDefault
+ && ((MobileState) o).imsRadioTechnology == imsRadioTechnology
+ && ((MobileState) o).dataNetType == dataNetType
+ && ((MobileState) o).dataRegState == dataRegState
&& ((MobileState) o).roaming == roaming;
}
}
+
+ //Observer to moniter enabling and disabling of MobileData
+ private class DataEnabledSettingObserver extends ContentObserver {
+ ContentResolver mResolver;
+ public DataEnabledSettingObserver(Handler handler, Context context) {
+ super(handler);
+ mResolver = context.getContentResolver();
+ }
+
+ public void register() {
+ String contentUri;
+ if (TelephonyManager.getDefault().getSimCount() == 1) {
+ contentUri = Settings.Global.MOBILE_DATA;
+ } else {
+ contentUri = Settings.Global.MOBILE_DATA + mSubscriptionInfo.getSubscriptionId();
+ }
+ mResolver.registerContentObserver(Settings.Global.getUriFor(contentUri), false, this);
+ }
+
+ public void unregister() {
+ mResolver.unregisterContentObserver(this);
+ }
+
+ @Override
+ public void onChange(boolean selfChange) {
+ setForbiddenState(!isMobileDataEnabled(mSubscriptionInfo.getSubscriptionId()));
+ }
+ }
}
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 ad5f24b..45650a7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -45,8 +45,10 @@
boolean activityIn, boolean activityOut, String description) {}
default void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
- int qsType, boolean activityIn, boolean activityOut, String typeContentDescription,
- String description, boolean isWide, int subId, boolean roaming) {}
+ int qsType, boolean activityIn, boolean activityOut, int dataActivityId,
+ int mobileActivityId, int stackedDataIcon, int stackedVoiceIcon,
+ String typeContentDescription, String description,
+ boolean isWide, int subId, boolean roaming) {}
default void setSubs(List<SubscriptionInfo> subs) {}
default void setNoSims(boolean show) {}
@@ -57,6 +59,15 @@
default void setMobileDataEnabled(boolean enabled) {}
}
+ public interface SignalCallbackExtended extends SignalCallback {
+ void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
+ int qsType, boolean activityIn, boolean activityOut, int dataActivityId,
+ int mobileActivityId, int stackedDataIcon, int stackedVoiceIcon,
+ String typeContentDescription, String description, boolean isWide,
+ int subId, int dataNetworkTypeId, int embmsIconId,
+ boolean isMobileIms, boolean isImsOverWifi, boolean roaming);
+ }
+
public interface EmergencyListener {
void setEmergencyCallsOnly(boolean emergencyOnly);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
index 622595f..99937fa 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -37,6 +37,8 @@
import android.text.TextUtils;
import android.util.Log;
import android.util.MathUtils;
+import android.view.View;
+import android.widget.TextView;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telephony.PhoneConstants;
@@ -57,6 +59,7 @@
import java.util.Map;
import static android.net.NetworkCapabilities.NET_CAPABILITY_VALIDATED;
+import static android.net.ConnectivityManager.TETHERING_WIFI;
/** Platform implementation of the network controller. **/
public class NetworkControllerImpl extends BroadcastReceiver
@@ -71,6 +74,7 @@
private static final int EMERGENCY_FIRST_CONTROLLER = 100;
private static final int EMERGENCY_VOICE_CONTROLLER = 200;
private static final int EMERGENCY_NO_SUB = 300;
+ private static final String ACTION_EMBMS_STATUS = "com.qualcomm.intent.EMBMS_STATUS";
private final Context mContext;
private final TelephonyManager mPhone;
@@ -118,6 +122,8 @@
// The current user ID.
private int mCurrentUserId;
+ private TextView mNetWorkNameLabelView;
+
private OnSubscriptionsChangedListener mSubscriptionListener;
// Handler that all broadcasts are received on.
@@ -131,6 +137,7 @@
@VisibleForTesting
ServiceState mLastServiceState;
private boolean mUserSetup;
+ private boolean mIsEmbmsActive;
/**
* Construct this controller object and register for updates.
@@ -218,7 +225,12 @@
filter.addAction(TelephonyIntents.SPN_STRINGS_UPDATED_ACTION);
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
filter.addAction(ConnectivityManager.INET_CONDITION_ACTION);
+ filter.addAction(Intent.ACTION_LOCALE_CHANGED);
filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED);
+ //TODO:Replace this check when regional specific config is added
+ if (MobileSignalController.isCarrierOneSupported()) {
+ filter.addAction(ACTION_EMBMS_STATUS);
+ }
mContext.registerReceiver(this, filter, null, mReceiverHandler);
mListening = true;
@@ -347,9 +359,10 @@
protected Void doInBackground(Void... args) {
// Disable tethering if enabling Wifi
final int wifiApState = mWifiManager.getWifiApState();
- if (enabled && ((wifiApState == WifiManager.WIFI_AP_STATE_ENABLING) ||
+ if (enabled && (!mWifiManager.getWifiStaSapConcurrency()) &&
+ ((wifiApState == WifiManager.WIFI_AP_STATE_ENABLING) ||
(wifiApState == WifiManager.WIFI_AP_STATE_ENABLED))) {
- mWifiManager.setWifiApEnabled(null, false);
+ mConnectivityManager.stopTethering(TETHERING_WIFI);
}
mWifiManager.setWifiEnabled(enabled);
@@ -389,6 +402,10 @@
} else if (action.equals(TelephonyIntents.ACTION_SIM_STATE_CHANGED)) {
// Might have different subscriptions now.
updateMobileControllers();
+ } else if (action.equals(Intent.ACTION_LOCALE_CHANGED)) {
+ for (MobileSignalController controller : mMobileSignalControllers.values()) {
+ controller.handleBroadcast(intent);
+ }
} else if (action.equals(TelephonyIntents.ACTION_SERVICE_STATE_CHANGED)) {
mLastServiceState = ServiceState.newFromBundle(intent.getExtras());
if (mMobileSignalControllers.size() == 0) {
@@ -396,7 +413,13 @@
// emergency state.
recalculateEmergency();
}
- } else {
+ } else if (action.equals(ACTION_EMBMS_STATUS)) {
+ mIsEmbmsActive = intent.getBooleanExtra("ACTIVE", false);
+ Log.d(TAG,"EMBMS_STATUS On Receive:isEmbmsactive=" + mIsEmbmsActive);
+ for (MobileSignalController controller : mMobileSignalControllers.values()) {
+ controller.notifyListeners();
+ }
+ } else {
int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY,
SubscriptionManager.INVALID_SUBSCRIPTION_ID);
if (SubscriptionManager.isValidSubscriptionId(subId)) {
@@ -431,6 +454,10 @@
refreshLocale();
}
+ public boolean isEmbmsActive() {
+ return mIsEmbmsActive;
+ }
+
private void updateMobileControllers() {
if (!mListening) {
return;
@@ -630,6 +657,37 @@
mEthernetSignalController.updateConnectivity(mConnectedTransports, mValidatedTransports);
}
+ private void setTextViewVisibility(TextView v) {
+ String networkName = getMobileDataNetworkName();
+ if (networkName.equals(mContext.getString(
+ com.android.internal.R.string.lockscreen_carrier_default))
+ || networkName.equals(mContext.getString(
+ com.android.internal.R.string.emergency_calls_only))) {
+ v.setVisibility(View.GONE);
+ } else {
+ v.setVisibility(View.VISIBLE);
+ }
+ }
+
+ public void addNetworkLabelView(TextView v) {
+ if (v != null) {
+ mNetWorkNameLabelView = v;
+ mNetWorkNameLabelView.setText(getMobileDataNetworkName());
+ setTextViewVisibility(mNetWorkNameLabelView);
+ }
+ }
+
+ public void removeNetworkLabelView() {
+ mNetWorkNameLabelView = null;
+ }
+
+ public void updateNetworkLabelView() {
+ if (mNetWorkNameLabelView != null) {
+ mNetWorkNameLabelView.setText(getMobileDataNetworkName());
+ setTextViewVisibility(mNetWorkNameLabelView);
+ }
+ }
+
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
pw.println("NetworkController state:");
@@ -868,6 +926,10 @@
boolean show4gForLte = false;
boolean hideLtePlus = false;
boolean hspaDataDistinguishable;
+ boolean readIconsFromXml;
+ boolean showRsrpSignalLevelforLTE;
+ boolean showLocale;
+ boolean showRat;
static Config readConfig(Context context) {
Config config = new Config();
@@ -879,6 +941,14 @@
config.show4gForLte = res.getBoolean(R.bool.config_show4GForLTE);
config.hspaDataDistinguishable =
res.getBoolean(R.bool.config_hspa_data_distinguishable);
+ config.readIconsFromXml = res.getBoolean(R.bool.config_read_icons_from_xml);
+ config.showRsrpSignalLevelforLTE =
+ res.getBoolean(R.bool.config_showRsrpSignalLevelforLTE);
+ config.showLocale =
+ res.getBoolean(com.android.internal.R.bool.config_monitor_locale_change);
+ config.showRat =
+ res.getBoolean(com.android.internal.R.bool.config_display_rat);
+
config.hideLtePlus = res.getBoolean(R.bool.config_hideLtePlus);
return config;
}
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 4cfd1c7..c55cbb7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SignalController.java
@@ -98,11 +98,11 @@
* needs to trigger callbacks related to it.
*/
public boolean isDirty() {
- if (!mLastState.equals(mCurrentState)) {
- if (DEBUG) {
- Log.d(mTag, "Change in state from: " + mLastState + "\n"
+ if (DEBUG) {
+ Log.d(mTag, "Change in state from: " + mLastState + "\n"
+ "\tto: " + mCurrentState);
}
+ if (!mLastState.equals(mCurrentState)) {
return true;
}
return false;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
old mode 100644
new mode 100755
index 6b2361e..7b284fe
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/TelephonyIcons.java
@@ -1,4 +1,6 @@
/*
+ * Copyright (c) 2015-2016, 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");
@@ -16,6 +18,14 @@
package com.android.systemui.statusbar.policy;
+import android.content.Context;
+import android.content.res.Resources;
+import android.content.res.TypedArray;
+import android.telephony.SignalStrength;
+import android.telephony.TelephonyManager;
+import android.util.Log;
+import android.util.SparseArray;
+
import com.android.systemui.R;
import com.android.systemui.statusbar.policy.MobileSignalController.MobileIconGroup;
@@ -43,11 +53,11 @@
static final int QS_TELEPHONY_NO_NETWORK = R.drawable.ic_qs_signal_no_signal;
static final int[][] QS_TELEPHONY_SIGNAL_STRENGTH = {
- { R.drawable.ic_qs_signal_0,
- R.drawable.ic_qs_signal_1,
- R.drawable.ic_qs_signal_2,
- R.drawable.ic_qs_signal_3,
- R.drawable.ic_qs_signal_4 },
+ { R.drawable.ic_qs_signal_full_0,
+ R.drawable.ic_qs_signal_full_1,
+ R.drawable.ic_qs_signal_full_2,
+ R.drawable.ic_qs_signal_full_3,
+ R.drawable.ic_qs_signal_full_4 },
{ R.drawable.ic_qs_signal_full_0,
R.drawable.ic_qs_signal_full_1,
R.drawable.ic_qs_signal_full_2,
@@ -68,6 +78,20 @@
R.drawable.stat_sys_signal_4_fully }
};
+ //Default roaming icons with R indicator
+ static final int[][] TELEPHONY_SIGNAL_STRENGTH_ROAMING_R = {
+ { R.drawable.stat_sys_signal_0_default_roam,
+ R.drawable.stat_sys_signal_1_default_roam,
+ R.drawable.stat_sys_signal_2_default_roam,
+ R.drawable.stat_sys_signal_3_default_roam,
+ R.drawable.stat_sys_signal_4_default_roam },
+ { R.drawable.stat_sys_signal_0_default_fully_roam,
+ R.drawable.stat_sys_signal_1_default_fully_roam,
+ R.drawable.stat_sys_signal_2_default_fully_roam,
+ R.drawable.stat_sys_signal_3_default_fully_roam,
+ R.drawable.stat_sys_signal_4_default_fully_roam }
+ };
+
//CarrierNetworkChange
static final int[][] TELEPHONY_CARRIER_NETWORK_CHANGE = {
{ R.drawable.stat_sys_signal_carrier_network_change_animation,
@@ -123,6 +147,7 @@
};
static final int QS_DATA_3G = R.drawable.ic_qs_signal_3g;
+ static final int QS_DATA_3G_PLUS = R.drawable.ic_qs_signal_3g_plus;
static final int[][] DATA_E = {
{ R.drawable.stat_sys_data_fully_connected_e,
@@ -150,6 +175,7 @@
};
static final int QS_DATA_H = R.drawable.ic_qs_signal_h;
+ static final int QS_DATA_H_PLUS = R.drawable.ic_qs_signal_h_plus;
//CDMA
// Use 3G icons for EVDO data and 1x icons for 1XRTT data
@@ -191,6 +217,8 @@
R.drawable.stat_sys_data_fully_connected_4g_plus }
};
+ static final int QS_DATA_4G_LTE = R.drawable.ic_qs_signal_4g_lte;
+
static final int QS_DATA_4G_PLUS = R.drawable.ic_qs_signal_4g_plus;
// LTE branded "LTE"
@@ -215,8 +243,11 @@
static final int ICON_G = R.drawable.stat_sys_data_fully_connected_g;
static final int ICON_E = R.drawable.stat_sys_data_fully_connected_e;
static final int ICON_H = R.drawable.stat_sys_data_fully_connected_h;
+ static final int ICON_H_PLUS = R.drawable.stat_sys_data_fully_connected_h_plus;
static final int ICON_3G = R.drawable.stat_sys_data_fully_connected_3g;
+ static final int ICON_3G_PLUS = R.drawable.stat_sys_data_fully_connected_3g_plus;
static final int ICON_4G = R.drawable.stat_sys_data_fully_connected_4g;
+ static final int ICON_4G_LTE = R.drawable.stat_sys_data_fully_connected_4g_lte;
static final int ICON_4G_PLUS = R.drawable.stat_sys_data_fully_connected_4g_plus;
static final int ICON_1X = R.drawable.stat_sys_data_fully_connected_1x;
static final int ICON_CARRIER_NETWORK_CHANGE =
@@ -227,10 +258,475 @@
static final int QS_ICON_LTE = R.drawable.ic_qs_signal_lte;
static final int QS_ICON_3G = R.drawable.ic_qs_signal_3g;
static final int QS_ICON_4G = R.drawable.ic_qs_signal_4g;
+ static final int QS_ICON_4G_LTE = R.drawable.ic_qs_signal_4g_lte;
static final int QS_ICON_4G_PLUS = R.drawable.ic_qs_signal_4g_plus;
static final int QS_ICON_1X = R.drawable.ic_qs_signal_1x;
static final int QS_ICON_CARRIER_NETWORK_CHANGE =
R.drawable.ic_qs_signal_carrier_network_change_animation;
+ static final int DATA_TYPE_UNKNOWN = 0;
+ static final int DATA_TYPE_G = 1;
+ static final int DATA_TYPE_E = 2;
+ static final int DATA_TYPE_2G = 3;
+ static final int DATA_TYPE_3G = 4;
+ static final int DATA_TYPE_4G = 5;
+ static final int DATA_TYPE_H = 6;
+ static final int DATA_TYPE_HP = 7;
+ static final int DATA_TYPE_1X = 8;
+ static final int DATA_TYPE_LTE = 9;
+ static final int DATA_TYPE_4G_PLUS = 10;
+
+ static final int SIGNAL_STRENGTH_TYPE_G = 0;
+ static final int SIGNAL_STRENGTH_TYPE_E = 1;
+ static final int SIGNAL_STRENGTH_TYPE_3G = 2;
+ static final int SIGNAL_STRENGTH_TYPE_4G = 3;
+ static final int SIGNAL_STRENGTH_TYPE_H = 4;
+ static final int SIGNAL_STRENGTH_TYPE_HP = 5;
+ static final int SIGNAL_STRENGTH_TYPE_1X = 6;
+ static final int SIGNAL_STRENGTH_TYPE_CDMA = 7;
+ static final int SIGNAL_STRENGTH_TYPE_UMTS = 8;
+
+ static final boolean DEBUG = true;
+ static final int DEFAULT_SUB = 0;
+ static final int INET_TYPE_NUM = 2;
+ static final int SIGNAL_LEVEL_NUM = SignalStrength.NUM_SIGNAL_STRENGTH_BINS;
+ static final String TAG = "TelephonyIcons";
+ static final String NS = "com.android.systemui";
+
+ static String[] mDataTypeArray, mDataTypeGenerationArray;
+ static String[] mForbiddenDataArray, mDataDisconnectedArray;
+ static String[] mDataTypeDescriptionArray, mDataTypeGenerationDescArray;
+ static String[] mDataActivityArray;
+ static String[] mSignalStrengthArray, mSignalStrengthRoamingArray;
+ static String[] mSignalNullArray;
+ static String[] mSignalStrengthDesc;
+
+ static int[] mSelectedDataTypeIcon;
+ static int[] mForbiddenDataTypeIcon;
+ static int[] mDataDisconnectedTypeIcon;
+ static int[] mSelectedQSDataTypeIcon;
+ static String[] mSelectedDataTypeDesc;
+ static int[] mSelectedDataActivityIndex;
+ static int[] mSelectedSignalStreagthIndex;
+ static SparseArray<Integer> mStacked2SingleIconLookup;
+
+ private static Resources mRes;
+ private static boolean isInitiated = false;
+
+ static void readIconsFromXml(Context context) {
+ if (isInitiated) {
+ log(TAG, "readIconsFromXml, already read!");
+ return;
+ }
+
+ mRes = context.getResources();
+ try {
+ mForbiddenDataArray = mRes.getStringArray(R.array.telephony_data_type_forbidden);
+ mDataDisconnectedArray = mRes.getStringArray(R.array.telephony_data_type_disconnected);
+ mDataTypeArray = mRes.getStringArray(R.array.multi_data_type);
+ mDataTypeDescriptionArray = mRes.getStringArray(
+ R.array.telephony_data_type_description);
+ mDataTypeGenerationArray = mRes.getStringArray(
+ R.array.telephony_data_type_generation);
+ mDataTypeGenerationDescArray = mRes.getStringArray(
+ R.array.telephony_data_type_generation_description);
+ mDataActivityArray = mRes.getStringArray(R.array.multi_data_activity);
+ mSignalStrengthArray = mRes.getStringArray(R.array.multi_signal_strength);
+ mSignalStrengthRoamingArray = mRes.getStringArray(
+ R.array.multi_signal_strength_roaming);
+ mSignalNullArray = mRes.getStringArray(R.array.multi_signal_null);
+ mSignalStrengthDesc = mRes.getStringArray(R.array.signal_strength_description);
+ initStacked2SingleIconLookup();
+ } catch (android.content.res.Resources.NotFoundException e) {
+ isInitiated = false;
+ log(TAG, "readIconsFromXml, exception happened: " + e);
+ return;
+ }
+
+ if (mSelectedDataTypeIcon == null
+ && mDataTypeArray.length != 0) {
+ mSelectedDataTypeIcon = new int[mDataTypeArray.length];
+ }
+ if (mForbiddenDataTypeIcon == null
+ && mForbiddenDataArray.length != 0) {
+ mForbiddenDataTypeIcon = new int[mForbiddenDataArray.length];
+ }
+ if (mDataDisconnectedTypeIcon == null
+ && mDataDisconnectedArray.length != 0) {
+ mDataDisconnectedTypeIcon = new int[mDataDisconnectedArray.length];
+ }
+ if (mSelectedQSDataTypeIcon == null
+ && mDataTypeArray.length != 0) {
+ mSelectedQSDataTypeIcon = new int[mDataTypeArray.length];
+ }
+ if (mSelectedDataTypeDesc == null
+ && mDataTypeArray.length != 0) {
+ mSelectedDataTypeDesc = new String[mDataTypeArray.length];
+ }
+ if (mSelectedDataActivityIndex == null
+ && mDataActivityArray.length != 0) {
+ mSelectedDataActivityIndex = new int[mDataActivityArray.length];
+ }
+ if (mSelectedSignalStreagthIndex == null
+ && mSignalStrengthArray.length != 0) {
+ mSelectedSignalStreagthIndex = new int[mSignalStrengthArray.length];
+ }
+ isInitiated = true;
+ }
+
+ static void initStacked2SingleIconLookup() {
+ mStacked2SingleIconLookup = new SparseArray<>();
+ TypedArray stackedIcons = mRes.obtainTypedArray(R.array.stacked_signal_icons);
+ TypedArray singleIcons = mRes.obtainTypedArray(R.array.single_signal_icons);
+
+ mStacked2SingleIconLookup.clear();
+ for (int i = 0; i < stackedIcons.length() && i < singleIcons.length(); i++) {
+ mStacked2SingleIconLookup.put(stackedIcons.getResourceId(i,0),
+ singleIcons.getResourceId(i,0));
+ }
+ stackedIcons.recycle();
+ singleIcons.recycle();
+ log(TAG, "initStacked2SingleIconLookup: size=" + mStacked2SingleIconLookup.size());
+ }
+
+ static int getSignalNullIcon(int slot) {
+ if (mSignalNullArray == null) {
+ return 0;
+ }
+ String resName = mSignalNullArray[slot];
+ log(TAG, "null signal icon name: " + resName);
+ int resId = mRes.getIdentifier(resName, null, NS);
+ return resId;
+ }
+
+ static void updateDataType(int slot, int type, boolean showAtLeast3G,
+ boolean show4GforLte, boolean hspaDistinguishable, int inet) {
+ log(TAG, "updateDataType "
+ + String.format("slot=%d, type=%d, inetCondition=%d",
+ slot, type, inet)
+ + " showAtLeast3G=" + String.valueOf(showAtLeast3G)
+ + " show4GforLte=" + String.valueOf(show4GforLte)
+ + " hspaDistinguishable=" + String.valueOf(hspaDistinguishable));
+
+ String resName = mDataTypeArray[slot];
+ int resId = mRes.getIdentifier(resName, null, NS);
+ String[] dataTypeArray = mRes.getStringArray(resId);
+ if (mRes.getBoolean(R.bool.config_data_signal_control)) {
+ String forbiddenresName = mForbiddenDataArray[slot];
+ String dataDisconnectedResName = mDataDisconnectedArray[slot];
+ int forbiddenresId = mRes.getIdentifier(forbiddenresName, null, NS);
+ int dataDisconnectedResId = mRes.getIdentifier(dataDisconnectedResName , null, NS);
+ String[] forbiddenTypeArray = mRes.getStringArray(forbiddenresId);
+ String[] dataDisconnectedTypeArray = mRes.getStringArray(dataDisconnectedResId);
+ setForbiddenResource(slot, type, forbiddenTypeArray);
+ setDataDisconnectedResource(slot, type, dataDisconnectedTypeArray);
+ }
+ log(TAG, "data type item name: " + resName + " id:" + resId);
+
+ switch (type) {
+ case TelephonyManager.NETWORK_TYPE_UNKNOWN:
+ if (!showAtLeast3G) {
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ dataTypeArray[type], null, NS);
+ mSelectedQSDataTypeIcon[slot] = 0;
+ mSelectedDataTypeDesc[slot] = mDataTypeDescriptionArray[type];
+ mSelectedDataActivityIndex[slot] = 0;
+ mSelectedSignalStreagthIndex[slot] = 0;
+ break;
+ } else {
+ // fall through
+ }
+ case TelephonyManager.NETWORK_TYPE_EDGE:
+ if (!showAtLeast3G) {
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ dataTypeArray[type], null, NS);
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_E;
+ mSelectedDataTypeDesc[slot] = mDataTypeDescriptionArray[type];
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_E;
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_E;
+ break;
+ } else {
+ // fall through
+ }
+ case TelephonyManager.NETWORK_TYPE_UMTS:
+ case TelephonyManager.NETWORK_TYPE_TD_SCDMA:
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_3G;
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ dataTypeArray[type], null, NS);
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_3G;
+ mSelectedDataTypeDesc[slot] = mDataTypeDescriptionArray[type];
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_UMTS;
+ break;
+ case TelephonyManager.NETWORK_TYPE_HSDPA:
+ case TelephonyManager.NETWORK_TYPE_HSUPA:
+ case TelephonyManager.NETWORK_TYPE_HSPA:
+ if (hspaDistinguishable || MobileSignalController.isCarrierOneSupported()) {
+ mSelectedDataTypeDesc[slot] = mDataTypeDescriptionArray[type];
+ if (type == TelephonyManager.NETWORK_TYPE_HSPA &&
+ MobileSignalController.isCarrierOneSupported()) {
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_HP;
+ mSelectedDataTypeIcon[slot] = ICON_H_PLUS;
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_H_PLUS;
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_HP;
+ } else {
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_H;
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ dataTypeArray[type], null, NS);
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_H;
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_H;
+ }
+ } else {
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_3G;
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ mDataTypeGenerationArray[0], null, NS);
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_3G;
+ mSelectedDataTypeDesc[slot] = mDataTypeGenerationDescArray[0];
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_3G;
+
+ }
+ break;
+ case TelephonyManager.NETWORK_TYPE_HSPAP:
+ if (hspaDistinguishable || MobileSignalController.
+ isCarrierOneSupported()) {
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_HP;
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ dataTypeArray[type], null, NS);
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_H_PLUS;
+ mSelectedDataTypeDesc[slot] = mDataTypeDescriptionArray[type];
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_HP;
+ } else {
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_3G;
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ mDataTypeGenerationArray[0], null, NS);
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_3G;
+ if(mRes.getBoolean(R.bool.config_show4gForHspap) ||
+ mRes.getBoolean(R.bool.show_network_indicators)){
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_4G;
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ mDataTypeGenerationArray[3], null, NS);
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_4G;
+ }
+ mSelectedDataTypeDesc[slot] = mDataTypeGenerationDescArray[0];
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_3G;
+ }
+ break;
+ case TelephonyManager.NETWORK_TYPE_CDMA:
+ if (!showAtLeast3G) {
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_1X;
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ dataTypeArray[type], null, NS);
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_1X;
+ mSelectedDataTypeDesc[slot] = mDataTypeDescriptionArray[type];
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_CDMA;
+ break;
+ } else {
+ // fall through
+ }
+ case TelephonyManager.NETWORK_TYPE_1xRTT:
+ if (!showAtLeast3G) {
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_1X;
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ dataTypeArray[type], null, NS);
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_1X;
+ mSelectedDataTypeDesc[slot] = mDataTypeDescriptionArray[type];
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_1X;
+ break;
+ } else {
+ // fall through
+ }
+ case TelephonyManager.NETWORK_TYPE_EVDO_0: //fall through
+ case TelephonyManager.NETWORK_TYPE_EVDO_A:
+ case TelephonyManager.NETWORK_TYPE_EVDO_B:
+ case TelephonyManager.NETWORK_TYPE_EHRPD:
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_3G;
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ dataTypeArray[type], null, NS);
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_3G;
+ mSelectedDataTypeDesc[slot] = mDataTypeDescriptionArray[type];
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_3G;
+ break;
+ case TelephonyManager.NETWORK_TYPE_LTE:
+ case TelephonyManager.NETWORK_TYPE_LTE_CA:
+ case TelephonyManager.NETWORK_TYPE_IWLAN:
+ if (!show4GforLte || MobileSignalController.isCarrierOneSupported()) {
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_LTE;
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ dataTypeArray[type], null, NS);
+ if ( type == TelephonyManager.NETWORK_TYPE_LTE_CA) {
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_LTE_PLUS;
+ } else {
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_LTE;
+ }
+ mSelectedDataTypeDesc[slot] = mDataTypeDescriptionArray[type];
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_4G;
+ } else {
+ if ( type == TelephonyManager.NETWORK_TYPE_LTE_CA) {
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_4G_PLUS;
+ //Select 4G+ icon.
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ mDataTypeGenerationArray[2], null, NS);
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_4G_PLUS;
+ } else {
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_4G;
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ mDataTypeGenerationArray[1], null, NS);
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_4G;
+ }
+ mSelectedDataTypeDesc[slot] = mDataTypeGenerationDescArray[1];
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_4G;
+ }
+ break;
+ case TelephonyManager.NETWORK_TYPE_GPRS:
+ case TelephonyManager.NETWORK_TYPE_GSM:
+ if (!showAtLeast3G) {
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_G;
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ dataTypeArray[type], null, NS);
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_G;
+ mSelectedDataTypeDesc[slot] = mDataTypeDescriptionArray[type];
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_G;
+ } else {
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_3G;
+ mSelectedDataTypeIcon[slot] = mRes.getIdentifier(
+ mDataTypeGenerationArray[0], null, NS);
+ mSelectedQSDataTypeIcon[slot] = QS_DATA_3G;
+ mSelectedDataTypeDesc[slot] = mDataTypeGenerationDescArray[0];;
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_3G;
+ }
+ break;
+ default:
+ mSelectedDataActivityIndex[slot] = DATA_TYPE_UNKNOWN;
+ mSelectedDataTypeIcon[slot] = 0;
+ mSelectedQSDataTypeIcon[slot] = 0;
+ mSelectedDataTypeDesc[slot] = "";
+ mSelectedSignalStreagthIndex[slot] = SIGNAL_STRENGTH_TYPE_G;
+ break;
+ }
+ log(TAG, "updateDataType " + String.format(
+ "mSelectedDataTypeIcon[%d]=%d, mSelectedDataActivityIndex=%d",
+ slot, mSelectedDataTypeIcon[slot], mSelectedDataActivityIndex[slot]));
+ }
+
+
+ static int getQSDataTypeIcon(int slot) {
+ return mSelectedQSDataTypeIcon[slot];
+ }
+
+ static int getDataTypeIcon(int slot) {
+ log(TAG, "getDataTypeIcon " + String.format("sub=%d", slot));
+ return mSelectedDataTypeIcon[slot];
+ }
+
+ private static void setForbiddenResource(int slot, int type,
+ String[] forbiddenTypeArray) {
+ mForbiddenDataTypeIcon[slot] = mRes.getIdentifier(forbiddenTypeArray[type], null, NS);
+ }
+
+ private static void setDataDisconnectedResource(int slot, int type,
+ String[] disconnectedTypeArray) {
+ mDataDisconnectedTypeIcon[slot] = mRes.getIdentifier(disconnectedTypeArray[type], null, NS);
+ }
+
+ public static int getForbiddenDataIcon(int slot) {
+ log(TAG, "getForbiddenDataIcon " + String.format("sub=%d", slot));
+ return mForbiddenDataTypeIcon[slot];
+ }
+
+ public static int getDataDisconnectedIcon(int slot) {
+ log(TAG, "getDisconnectedDataIcon " + String.format("sub=%d", slot));
+ return mDataDisconnectedTypeIcon[slot];
+ }
+
+ static int getDataTypeDesc(int slot) {
+ return mRes.getIdentifier(mSelectedDataTypeDesc[slot], null, NS);
+ }
+
+ static int getDataActivity(int slot, int activity) {
+ log(TAG, String.format("getDataActivity, slot=%d, activity=%d",
+ slot, activity));
+
+ String[] dataActivityArray = mRes.getStringArray(
+ mRes.getIdentifier(mDataActivityArray[slot], null, NS));
+ String[] selectedTypeArray = mRes.getStringArray(mRes.getIdentifier(
+ dataActivityArray[mSelectedDataActivityIndex[slot]], null, NS));
+
+ return mRes.getIdentifier(selectedTypeArray[activity], null, NS);
+ }
+
+ static int getSignalStrengthIcon(int slot, int inet, int level, boolean roaming) {
+ log(TAG, "getSignalStrengthIcon: " + String.format(
+ "slot=%d, inetCondition=%d, level=%d, roaming=%b", slot, inet, level, roaming));
+
+ String[] signalStrengthArray, selectedTypeArray;
+
+ signalStrengthArray = mRes.getStringArray(mRes.getIdentifier(!roaming ?
+ mSignalStrengthArray[slot] : mSignalStrengthRoamingArray[slot], null, NS));
+ log(TAG, String.format("signalStrengthArray.length=%d", signalStrengthArray.length));
+
+ selectedTypeArray = mRes.getStringArray(mRes.getIdentifier(
+ signalStrengthArray[mSelectedSignalStreagthIndex[slot]], null, NS));
+ log(TAG, String.format("selectedTypeArray.length=%d", selectedTypeArray.length));
+
+ String[] inetArray = mRes.getStringArray(
+ mRes.getIdentifier(selectedTypeArray[inet], null, NS));
+ log(TAG, String.format("inetArray.length=%d", inetArray.length));
+
+ return mRes.getIdentifier(inetArray[level], null, NS);
+ }
+
+
+ static int convertMobileStrengthIcon(int stackedIcon) {
+ if (mStacked2SingleIconLookup == null) {
+ return stackedIcon;
+ }
+ int index = mStacked2SingleIconLookup.indexOfKey(stackedIcon);
+ if (index >= 0) {
+ return mStacked2SingleIconLookup.get(stackedIcon);
+ }
+ return stackedIcon;
+ }
+
+ static int getStackedVoiceIcon(int level) {
+ int retValue = 0;
+ switch(level){
+ case SignalStrength.SIGNAL_STRENGTH_NONE_OR_UNKNOWN:
+ retValue = R.drawable.stat_sys_signal_0_2g;
+ break;
+ case SignalStrength.SIGNAL_STRENGTH_POOR:
+ retValue = R.drawable.stat_sys_signal_1_2g;
+ break;
+ case SignalStrength.SIGNAL_STRENGTH_MODERATE:
+ retValue = R.drawable.stat_sys_signal_2_2g;
+ break;
+ case SignalStrength.SIGNAL_STRENGTH_GOOD:
+ retValue = R.drawable.stat_sys_signal_3_2g;
+ break;
+ case SignalStrength.SIGNAL_STRENGTH_GREAT:
+ retValue = R.drawable.stat_sys_signal_4_2g;
+ break;
+ default:
+ break;
+ }
+ return retValue;
+ }
+
+ static int getRoamingSignalIconId(int level, int inet){
+ return TELEPHONY_SIGNAL_STRENGTH_ROAMING_R[inet][level];
+ }
+
+ static int[] getSignalStrengthDes(int slot) {
+ int[] resId = new int[SIGNAL_LEVEL_NUM];
+ for (int i = 0; i < SIGNAL_LEVEL_NUM; i++) {
+ resId[i] = mRes.getIdentifier(mSignalStrengthDesc[i], null, NS);
+ }
+ return resId;
+ }
+
+ private static void log(String tag, String str){
+ if (DEBUG) {
+ Log.d(tag, str);
+ }
+ }
+
static final int QS_ICON_DATA_DISABLED = R.drawable.ic_qs_data_disabled;
@@ -264,6 +760,21 @@
TelephonyIcons.QS_DATA_3G
);
+ static final MobileIconGroup THREE_G_PLUS = new MobileIconGroup(
+ "3G+",
+ TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH,
+ TelephonyIcons.QS_TELEPHONY_SIGNAL_STRENGTH,
+ AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH,
+ 0, 0,
+ TelephonyIcons.TELEPHONY_NO_NETWORK,
+ TelephonyIcons.QS_TELEPHONY_NO_NETWORK,
+ AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0],
+ R.string.accessibility_data_connection_3g_plus,
+ TelephonyIcons.ICON_3G_PLUS,
+ true,
+ TelephonyIcons.QS_DATA_3G_PLUS
+ );
+
static final MobileIconGroup WFC = new MobileIconGroup(
"WFC",
TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH,
@@ -348,6 +859,21 @@
TelephonyIcons.QS_DATA_H
);
+ static final MobileIconGroup H_PLUS = new MobileIconGroup(
+ "H+",
+ TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH,
+ TelephonyIcons.QS_TELEPHONY_SIGNAL_STRENGTH,
+ AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH,
+ 0, 0,
+ TelephonyIcons.TELEPHONY_NO_NETWORK,
+ TelephonyIcons.QS_TELEPHONY_NO_NETWORK,
+ AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0],
+ R.string.accessibility_data_connection_3_5g_plus,
+ TelephonyIcons.ICON_H_PLUS,
+ false,
+ TelephonyIcons.QS_DATA_H_PLUS
+ );
+
static final MobileIconGroup FOUR_G = new MobileIconGroup(
"4G",
TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH,
@@ -363,6 +889,21 @@
TelephonyIcons.QS_DATA_4G
);
+ static final MobileIconGroup FOUR_G_LTE = new MobileIconGroup(
+ "4GLTE",
+ TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH,
+ TelephonyIcons.QS_TELEPHONY_SIGNAL_STRENGTH,
+ AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH,
+ 0, 0,
+ TelephonyIcons.TELEPHONY_NO_NETWORK,
+ TelephonyIcons.QS_TELEPHONY_NO_NETWORK,
+ AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[0],
+ R.string.accessibility_data_connection_4g_lte,
+ TelephonyIcons.ICON_4G_LTE,
+ true,
+ TelephonyIcons.QS_DATA_4G_LTE
+ );
+
static final MobileIconGroup FOUR_G_PLUS = new MobileIconGroup(
"4G+",
TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java
index b890a30..bb5e74c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiSignalController.java
@@ -27,6 +27,7 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.AsyncChannel;
import com.android.settingslib.wifi.WifiStatusTracker;
+import com.android.systemui.R;
import com.android.systemui.statusbar.policy.NetworkController.IconState;
import com.android.systemui.statusbar.policy.NetworkController.SignalCallback;
@@ -77,8 +78,10 @@
@Override
public void notifyListeners(SignalCallback callback) {
// only show wifi in the cluster if connected or if wifi-only
+ boolean visibleWhenEnabled = mContext.getResources().getBoolean(
+ R.bool.config_showWifiIndicatorWhenEnabled);
boolean wifiVisible = mCurrentState.enabled
- && (mCurrentState.connected || !mHasMobileData);
+ && (mCurrentState.connected || !mHasMobileData || visibleWhenEnabled);
String wifiDesc = wifiVisible ? mCurrentState.ssid : null;
boolean ssidPresent = wifiVisible && mCurrentState.ssid != null;
String contentDescription = getStringIfExists(getContentDescription());
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
old mode 100644
new mode 100755
index 96efea1..f49987c
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
@@ -202,8 +202,12 @@
}
private void fireConfigChanged(ZenModeConfig config) {
- for (Callback cb : mCallbacks) {
- cb.onConfigChanged(config);
+ try {
+ for (Callback cb : mCallbacks) {
+ cb.onConfigChanged(config);
+ }
+ } catch (Exception e) {
+ Log.d("TAG", "Caught exception" + e);
}
}
diff --git a/packages/SystemUI/tests/Android.mk b/packages/SystemUI/tests/Android.mk
index d122ccc..4a6898a 100644
--- a/packages/SystemUI/tests/Android.mk
+++ b/packages/SystemUI/tests/Android.mk
@@ -40,7 +40,7 @@
frameworks/base/packages/SystemUI/res \
frameworks/base/packages/Keyguard/res
-LOCAL_JAVA_LIBRARIES := android.test.runner telephony-common
+LOCAL_JAVA_LIBRARIES := android.test.runner telephony-common telephony-ext
LOCAL_PACKAGE_NAME := SystemUITests
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 d01ecb1..ea5ae1a 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
@@ -105,8 +105,8 @@
boolean wide = true;
int subId = 5;
boolean roaming = true;
- mHandler.setMobileDataIndicators(status, qs, type, qsType, in, out, typeDescription,
- description, wide, subId, roaming);
+ mHandler.setMobileDataIndicators(status, qs, type, qsType, in, out, 0, 0, 0, 0,
+ typeDescription, description, wide, subId, roaming);
waitForCallbacks();
ArgumentCaptor<IconState> statusArg = ArgumentCaptor.forClass(IconState.class);
@@ -121,7 +121,11 @@
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(),
+ outArg.capture(), ArgumentCaptor.forClass(Integer.class).capture(),
+ ArgumentCaptor.forClass(Integer.class).capture(),
+ ArgumentCaptor.forClass(Integer.class).capture(),
+ ArgumentCaptor.forClass(Integer.class).capture(),
+ typeContentArg.capture(), descArg.capture(), wideArg.capture(),
subIdArg.capture(), eq(roaming));
assertEquals(status, statusArg.getValue());
assertEquals(qs, qsArg.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 29b6976..26af34d 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
@@ -286,7 +286,15 @@
iconArg.capture(),
ArgumentCaptor.forClass(Integer.class).capture(),
typeIconArg.capture(), dataInArg.capture(), dataOutArg.capture(),
- anyString(), anyString(), anyBoolean(), anyInt(), anyBoolean());
+ ArgumentCaptor.forClass(Integer.class).capture(),
+ ArgumentCaptor.forClass(Integer.class).capture(),
+ ArgumentCaptor.forClass(Integer.class).capture(),
+ ArgumentCaptor.forClass(Integer.class).capture(),
+ ArgumentCaptor.forClass(String.class).capture(),
+ ArgumentCaptor.forClass(String.class).capture(),
+ ArgumentCaptor.forClass(Boolean.class).capture(),
+ ArgumentCaptor.forClass(Integer.class).capture(),
+ ArgumentCaptor.forClass(Boolean.class).capture());
IconState iconState = iconArg.getValue();
assertEquals("Visibility in, quick settings", visible, iconState.visible);
assertEquals("Signal icon in, quick settings", icon, iconState.icon);
@@ -310,9 +318,8 @@
Mockito.verify(mCallbackHandler, Mockito.atLeastOnce()).setMobileDataIndicators(
iconArg.capture(),
any(),
- typeIconArg.capture(),
- anyInt(), anyBoolean(), anyBoolean(), anyString(), anyString(), anyBoolean(),
- anyInt(), eq(roaming));
+ anyInt(), anyInt(), anyBoolean(), anyBoolean(), anyInt(), anyInt(), anyInt(),
+ anyInt(), anyString(), anyString(), anyBoolean(), anyInt(), eq(roaming));
IconState iconState = iconArg.getValue();
assertEquals("Signal icon in status bar", icon, iconState.icon);
@@ -333,11 +340,18 @@
iconArg.capture(),
qsIconArg.capture(),
typeIconArg.capture(),
- qsTypeIconArg.capture(),
- dataInArg.capture(),
- dataOutArg.capture(),
- anyString(), anyString(), anyBoolean(), anyInt(), anyBoolean());
-
+ ArgumentCaptor.forClass(Integer.class).capture(),
+ ArgumentCaptor.forClass(Boolean.class).capture(),
+ ArgumentCaptor.forClass(Boolean.class).capture(),
+ ArgumentCaptor.forClass(Integer.class).capture(),
+ ArgumentCaptor.forClass(Integer.class).capture(),
+ ArgumentCaptor.forClass(Integer.class).capture(),
+ ArgumentCaptor.forClass(Integer.class).capture(),
+ ArgumentCaptor.forClass(String.class).capture(),
+ ArgumentCaptor.forClass(String.class).capture(),
+ ArgumentCaptor.forClass(Boolean.class).capture(),
+ ArgumentCaptor.forClass(Integer.class).capture(),
+ ArgumentCaptor.forClass(Boolean.class).capture());
IconState iconState = iconArg.getValue();
assertEquals("Data icon in status bar", typeIcon, (int) typeIconArg.getValue());
diff --git a/proto/src/metrics_constants.proto b/proto/src/metrics_constants.proto
index ff3a9c5..bd54143 100644
--- a/proto/src/metrics_constants.proto
+++ b/proto/src/metrics_constants.proto
@@ -2249,5 +2249,17 @@
// Add new aosp constants above this line.
// END OF AOSP CONSTANTS
+
+ // ------- Begin Fairphone Constants -----
+
+ // OPEN: Settings > Maintenance
+ // CATEGORY: SETTINGS
+ FP_MAINTENANCE = 800;
+
+ // OPEN: Settings > Developer options -> Root access
+ // CATEGORY: SETTINGS
+ FP_SUPERUSER = 801;
+
+ // ---- End Fairphone Constants, all Fairphone constants go above this line ----
}
}
diff --git a/services/core/java/com/android/server/AlarmManagerService.java b/services/core/java/com/android/server/AlarmManagerService.java
index 20cca16..fecd484 100644
--- a/services/core/java/com/android/server/AlarmManagerService.java
+++ b/services/core/java/com/android/server/AlarmManagerService.java
@@ -28,6 +28,7 @@
import android.app.IUidObserver;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
+import android.content.ContentUris;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
@@ -80,6 +81,7 @@
import static android.app.AlarmManager.RTC;
import static android.app.AlarmManager.ELAPSED_REALTIME_WAKEUP;
import static android.app.AlarmManager.ELAPSED_REALTIME;
+import static android.app.AlarmManager.RTC_POWEROFF_WAKEUP;
import com.android.internal.util.LocalLog;
@@ -88,8 +90,10 @@
private static final int RTC_MASK = 1 << RTC;
private static final int ELAPSED_REALTIME_WAKEUP_MASK = 1 << ELAPSED_REALTIME_WAKEUP;
private static final int ELAPSED_REALTIME_MASK = 1 << ELAPSED_REALTIME;
+ private static final int RTC_POWEROFF_WAKEUP_MASK = 1 << RTC_POWEROFF_WAKEUP;
static final int TIME_CHANGED_MASK = 1 << 16;
- static final int IS_WAKEUP_MASK = RTC_WAKEUP_MASK|ELAPSED_REALTIME_WAKEUP_MASK;
+ static final int IS_WAKEUP_MASK = RTC_WAKEUP_MASK|ELAPSED_REALTIME_WAKEUP_MASK
+ |RTC_POWEROFF_WAKEUP_MASK;
// Mask for testing whether a given alarm type is wakeup vs non-wakeup
static final int TYPE_NONWAKEUP_MASK = 0x1; // low bit => non-wakeup
@@ -117,6 +121,11 @@
final LocalLog mLog = new LocalLog(TAG);
+ private static final String DESKCLOCK_PACKAGE_NAME = "com.android.deskclock";
+
+ private static final String ENCRYPTING_STATE = "trigger_restart_min_framework";
+ private static final String ENCRYPTED_STATE = "1";
+
AppOpsManager mAppOps;
DeviceIdleController.LocalService mLocalDeviceIdleController;
@@ -124,11 +133,13 @@
long mNativeData;
private long mNextWakeup;
+ private long mNextRtcWakeup;
private long mNextNonWakeup;
private long mLastWakeupSet;
private long mLastWakeup;
int mBroadcastRefCount = 0;
PowerManager.WakeLock mWakeLock;
+ private QCNsrmAlarmExtension qcNsrmExt = new QCNsrmAlarmExtension(this);
boolean mLastWakeLockUnimportantForLogging;
ArrayList<Alarm> mPendingNonWakeupAlarms = new ArrayList<>();
ArrayList<InFlight> mInFlight = new ArrayList<>();
@@ -388,6 +399,16 @@
return alarms.get(index);
}
+ Alarm getAlarmByElapsedTime(long whenElapsed) {
+ Alarm alarm = null;
+ for(int i=0;i< alarms.size();i++) {
+ if(alarms.get(i).whenElapsed == whenElapsed) {
+ alarm = alarms.get(i);
+ }
+ }
+ return alarm;
+ }
+
boolean canHold(long whenElapsed, long maxWhen) {
return (end >= whenElapsed) && (start <= maxWhen);
}
@@ -586,6 +607,17 @@
return false;
}
+ boolean isRtcPowerOffWakeup() {
+ final int N = alarms.size();
+ for (int i = 0; i < N; i++) {
+ Alarm a = alarms.get(i);
+ if (a.type == RTC_POWEROFF_WAKEUP) {
+ return true;
+ }
+ }
+ return false;
+ }
+
@Override
public String toString() {
StringBuilder b = new StringBuilder(40);
@@ -696,7 +728,8 @@
}
static long convertToElapsed(long when, int type) {
- final boolean isRtc = (type == RTC || type == RTC_WAKEUP);
+ final boolean isRtc = (type == RTC || type == RTC_WAKEUP
+ || type == RTC_POWEROFF_WAKEUP);
if (isRtc) {
when -= System.currentTimeMillis() - SystemClock.elapsedRealtime();
}
@@ -900,14 +933,31 @@
long mTotalDelayTime = 0;
long mMaxDelayTime = 0;
+ boolean mIsEncryptStatus = false;
+ boolean mIsPowerOffAlarmSet = false;
@Override
public void onStart() {
mNativeData = init();
- mNextWakeup = mNextNonWakeup = 0;
+ mNextWakeup = mNextRtcWakeup = mNextNonWakeup = 0;
+
+ AlarmManager.writePowerOffAlarmFile(AlarmManager.POWER_OFF_ALARM_SET_FILE,
+ AlarmManager.POWER_OFF_ALARM_NOT_SET);
// We have to set current TimeZone info to kernel
// because kernel doesn't keep this after reboot
- setTimeZoneImpl(SystemProperties.get(TIMEZONE_PROPERTY));
+
+ String cryptState = SystemProperties.get("vold.decrypt");
+ if (ENCRYPTING_STATE.equals(cryptState) || ENCRYPTED_STATE.equals(cryptState)) {
+ mIsEncryptStatus = true;
+ }
+
+ if (mIsEncryptStatus) {
+ String tz = AlarmManager
+ .readPowerOffAlarmFile(AlarmManager.POWER_OFF_ALARM_TIMEZONE_FILE);
+ setTimeZoneImpl(tz);
+ } else {
+ setTimeZoneImpl(SystemProperties.get(TIMEZONE_PROPERTY));
+ }
PowerManager pm = (PowerManager) getContext().getSystemService(Context.POWER_SERVICE);
mWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "*alarm*");
@@ -993,7 +1043,7 @@
TimeZone.setDefault(null);
- if (timeZoneWasChanged) {
+ if (timeZoneWasChanged && !mIsEncryptStatus) {
Intent intent = new Intent(Intent.ACTION_TIMEZONE_CHANGED);
intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
intent.putExtra("time-zone", zone.getID());
@@ -1041,7 +1091,7 @@
interval = minInterval;
}
- if (type < RTC_WAKEUP || type > ELAPSED_REALTIME) {
+ if (type < RTC_WAKEUP || type > RTC_POWEROFF_WAKEUP) {
throw new IllegalArgumentException("Invalid alarm type " + type);
}
@@ -1353,6 +1403,16 @@
dumpImpl(pw);
}
+
+ @Override
+ /* updates the blocked uids, so if a wake lock is acquired to only fire
+ * alarm for it, it can be released.
+ */
+ public void updateBlockedUids(int uid, boolean isBlocked) {
+ synchronized(mLock) {
+ qcNsrmExt.processBlockedUids(uid, isBlocked, mWakeLock);
+ }
+ }
};
public final class LocalService {
@@ -1693,6 +1753,17 @@
return null;
}
+ private Batch findFirstRtcWakeupBatchLocked() {
+ final int N = mAlarmBatches.size();
+ for (int i = 0; i < N; i++) {
+ Batch b = mAlarmBatches.get(i);
+ if (b.isRtcPowerOffWakeup()) {
+ return b;
+ }
+ }
+ return null;
+ }
+
long getNextWakeFromIdleTimeImpl() {
synchronized (mLock) {
return mNextWakeFromIdle != null ? mNextWakeFromIdle.whenElapsed : Long.MAX_VALUE;
@@ -1846,11 +1917,41 @@
if (mAlarmBatches.size() > 0) {
final Batch firstWakeup = findFirstWakeupBatchLocked();
final Batch firstBatch = mAlarmBatches.get(0);
+ final Batch firstRtcWakeup = findFirstRtcWakeupBatchLocked();
if (firstWakeup != null && mNextWakeup != firstWakeup.start) {
mNextWakeup = firstWakeup.start;
mLastWakeupSet = SystemClock.elapsedRealtime();
setLocked(ELAPSED_REALTIME_WAKEUP, firstWakeup.start);
}
+
+ // Set RTC_POWEROFF type alarm to kernel
+ if (firstRtcWakeup != null && mNextRtcWakeup != firstRtcWakeup.start) {
+ mNextRtcWakeup = firstRtcWakeup.start;
+ Alarm alarm = firstRtcWakeup.getAlarmByElapsedTime(mNextRtcWakeup);
+ if (alarm != null) {
+ // use packageName to check if the alarm is set from deskclock app
+ // (power off alarm)
+ String packageName = alarm.packageName;
+ if (DESKCLOCK_PACKAGE_NAME.equals(packageName)) {
+ mIsPowerOffAlarmSet = true;
+ AlarmManager.writePowerOffAlarmFile(AlarmManager.POWER_OFF_ALARM_SET_FILE,
+ AlarmManager.POWER_OFF_ALARM_SET);
+ if (!mIsEncryptStatus) {
+ AlarmManager.writePowerOffAlarmFile(
+ AlarmManager.POWER_OFF_ALARM_INSTANCE_FILE, "" + alarm.when);
+ }
+ } else if (mIsPowerOffAlarmSet){
+ mIsPowerOffAlarmSet = false;
+ AlarmManager.writePowerOffAlarmFile(AlarmManager.POWER_OFF_ALARM_SET_FILE,
+ AlarmManager.POWER_OFF_ALARM_NOT_SET);
+ }
+ setLocked(RTC_POWEROFF_WAKEUP, alarm.when);
+ }
+ } else if (firstRtcWakeup == null && mIsPowerOffAlarmSet){
+ mIsPowerOffAlarmSet = false;
+ AlarmManager.writePowerOffAlarmFile(AlarmManager.POWER_OFF_ALARM_SET_FILE,
+ AlarmManager.POWER_OFF_ALARM_NOT_SET);
+ }
if (firstBatch != firstWakeup) {
nextNonWakeup = firstBatch.start;
}
@@ -1870,6 +1971,18 @@
boolean didRemove = false;
for (int i = mAlarmBatches.size() - 1; i >= 0; i--) {
Batch b = mAlarmBatches.get(i);
+ ArrayList<Alarm> alarmList = b.alarms;
+ Alarm alarm = null;
+ for (int j = alarmList.size() - 1; j >= 0; j--) {
+ alarm = alarmList.get(j);
+ if (alarm.type == RTC_POWEROFF_WAKEUP && alarm.operation.equals(operation)) {
+ long alarmSeconds, alarmNanoseconds;
+ alarmSeconds = alarm.when / 1000;
+ alarmNanoseconds = (alarm.when % 1000) * 1000 * 1000;
+ clear(mNativeData, alarm.type, alarmSeconds, alarmNanoseconds);
+ mNextRtcWakeup = 0;
+ }
+ }
didRemove |= b.remove(operation, directReceiver);
if (b.size() == 0) {
mAlarmBatches.remove(i);
@@ -2073,6 +2186,7 @@
case RTC_WAKEUP : return "RTC_WAKEUP";
case ELAPSED_REALTIME : return "ELAPSED";
case ELAPSED_REALTIME_WAKEUP: return "ELAPSED_WAKEUP";
+ case RTC_POWEROFF_WAKEUP : return "RTC_POWEROFF_WAKEUP";
default:
break;
}
@@ -2093,6 +2207,7 @@
private native long init();
private native void close(long nativeData);
private native void set(long nativeData, int type, long seconds, long nanoseconds);
+ private native void clear(long nativeData, int type, long seconds, long nanoseconds);
private native int waitForAlarm(long nativeData);
private native int setKernelTime(long nativeData, long millis);
private native int setKernelTimezone(long nativeData, int minuteswest);
@@ -2250,7 +2365,8 @@
type = _type;
origWhen = _when;
wakeup = _type == AlarmManager.ELAPSED_REALTIME_WAKEUP
- || _type == AlarmManager.RTC_WAKEUP;
+ || _type == AlarmManager.RTC_WAKEUP
+ || _type == AlarmManager.RTC_POWEROFF_WAKEUP;
when = _when;
whenElapsed = _whenElapsed;
windowLength = _windowLength;
@@ -2271,7 +2387,7 @@
public static String makeTag(PendingIntent pi, String tag, int type) {
final String alarmString = type == ELAPSED_REALTIME_WAKEUP || type == RTC_WAKEUP
- ? "*walarm*:" : "*alarm*:";
+ || type == RTC_POWEROFF_WAKEUP? "*walarm*:" : "*alarm*:";
return (pi != null) ? pi.getTag(alarmString) : (alarmString + tag);
}
@@ -2316,7 +2432,8 @@
public void dump(PrintWriter pw, String prefix, long nowRTC, long nowELAPSED,
SimpleDateFormat sdf) {
- final boolean isRtc = (type == RTC || type == RTC_WAKEUP);
+ final boolean isRtc = (type == RTC || type == RTC_WAKEUP
+ || type == RTC_POWEROFF_WAKEUP);
pw.print(prefix); pw.print("tag="); pw.println(statsTag);
pw.print(prefix); pw.print("type="); pw.print(type);
pw.print(" whenElapsed="); TimeUtils.formatDuration(whenElapsed,
@@ -2552,9 +2669,9 @@
}
} else {
- // Just in case -- even though no wakeup flag was set, make sure
- // we have updated the kernel to the next alarm time.
synchronized (mLock) {
+ // Just in case -- even though no wakeup flag was set, make sure
+ // we have updated the kernel to the next alarm time.
rescheduleKernelAlarmsLocked();
}
}
@@ -2591,11 +2708,10 @@
mWakeLock.setWorkSource(new WorkSource(uid));
return;
}
+ // Something went wrong; fall back to attributing the lock to the OS
+ mWakeLock.setWorkSource(null);
} catch (Exception e) {
}
-
- // Something went wrong; fall back to attributing the lock to the OS
- mWakeLock.setWorkSource(null);
}
private class AlarmHandler extends Handler {
@@ -2891,11 +3007,15 @@
private void updateTrackingLocked(InFlight inflight) {
if (inflight != null) {
updateStatsLocked(inflight);
+ qcNsrmExt.removeTriggeredUid(inflight.mUid);
}
mBroadcastRefCount--;
+
if (mBroadcastRefCount == 0) {
mHandler.obtainMessage(AlarmHandler.REPORT_ALARMS_ACTIVE, 0).sendToTarget();
- mWakeLock.release();
+ if (mWakeLock.isHeld()) {
+ mWakeLock.release();
+ }
if (mInFlight.size() > 0) {
mLog.w("Finished all dispatches with " + mInFlight.size()
+ " remaining inflights");
@@ -3037,7 +3157,9 @@
setWakelockWorkSource(alarm.operation, alarm.workSource,
alarm.type, alarm.statsTag, (alarm.operation == null) ? alarm.uid : -1,
true);
+ if (!mWakeLock.isHeld()) {
mWakeLock.acquire();
+ }
mHandler.obtainMessage(AlarmHandler.REPORT_ALARMS_ACTIVE, 1).sendToTarget();
}
final InFlight inflight = new InFlight(AlarmManagerService.this,
@@ -3045,6 +3167,9 @@
alarm.packageName, alarm.type, alarm.statsTag, nowELAPSED);
mInFlight.add(inflight);
mBroadcastRefCount++;
+ qcNsrmExt.addTriggeredUid((alarm.operation != null) ?
+ alarm.operation.getCreatorUid() :
+ alarm.uid);
if (allowWhileIdle) {
// Record the last time this uid handled an ALLOW_WHILE_IDLE alarm.
@@ -3077,7 +3202,7 @@
fs.nesting++;
}
if (alarm.type == ELAPSED_REALTIME_WAKEUP
- || alarm.type == RTC_WAKEUP) {
+ || alarm.type == RTC_WAKEUP || alarm.type == RTC_POWEROFF_WAKEUP) {
bs.numWakeup++;
fs.numWakeup++;
if (alarm.workSource != null && alarm.workSource.size() > 0) {
diff --git a/services/core/java/com/android/server/AppOpsPolicy.java b/services/core/java/com/android/server/AppOpsPolicy.java
new file mode 100644
index 0000000..75bca05
--- /dev/null
+++ b/services/core/java/com/android/server/AppOpsPolicy.java
@@ -0,0 +1,441 @@
+/* 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.
+ */
+
+package com.android.server;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import android.app.AppOpsManager;
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.util.Slog;
+import android.util.SparseArray;
+import android.util.Xml;
+
+import com.android.internal.util.XmlUtils;
+
+public class AppOpsPolicy {
+ static final String TAG = "AppOpsPolicy";
+ static final boolean DEBUG = false;
+ final File mFile;
+ final Context mContext;
+ public static final int CONTROL_SHOW = 0;
+
+ public static final int CONTROL_NOSHOW = 1;
+
+ public static final int CONTROL_UNKNOWN = 2;
+
+ public static int stringToControl(String show) {
+ if ("true".equalsIgnoreCase(show)) {
+ return CONTROL_SHOW;
+ } else if ("false".equalsIgnoreCase(show)) {
+ return CONTROL_NOSHOW;
+ }
+ return CONTROL_UNKNOWN;
+ }
+
+ HashMap<String, PolicyPkg> mPolicy = new HashMap<String, PolicyPkg>();
+
+ public AppOpsPolicy(File file, Context context) {
+ super();
+ mFile = file;
+ mContext = context;
+ }
+
+ public final static class PolicyPkg extends SparseArray<PolicyOp> {
+ public String packageName;
+ public int mode;
+ public int show;
+ public String type;
+
+ public PolicyPkg(String packageName, int mode, int show, String type) {
+ this.packageName = packageName;
+ this.mode = mode;
+ this.show = show;
+ this.type = type;
+ }
+
+ @Override
+ public String toString() {
+ return "PolicyPkg [packageName=" + packageName + ", mode=" + mode
+ + ", show=" + show + ", type=" + type + "]";
+ }
+
+ }
+
+ public final static class PolicyOp {
+ public int op;
+ public int mode;
+ public int show;
+
+ public PolicyOp(int op, int mode, int show) {
+ this.op = op;
+ this.mode = mode;
+ this.show = show;
+ }
+
+ @Override
+ public String toString() {
+ return "PolicyOp [op=" + op + ", mode=" + mode + ", show=" + show
+ + "]";
+ }
+ }
+
+ void readPolicy() {
+ FileInputStream stream;
+ synchronized (mFile) {
+ try {
+ stream = new FileInputStream(mFile);
+ } catch (FileNotFoundException e) {
+ Slog.i(TAG, "App ops policy file (" + mFile.getPath()
+ + ") not found; Skipping.");
+ return;
+ }
+ boolean success = false;
+ try {
+ XmlPullParser parser = Xml.newPullParser();
+ parser.setInput(stream, null);
+ int type;
+ success = true;
+ while ((type = parser.next()) != XmlPullParser.START_TAG
+ && type != XmlPullParser.END_DOCUMENT) {
+ ;
+ }
+ if (type != XmlPullParser.START_TAG) {
+ throw new IllegalStateException("no start tag found");
+ }
+
+ int outerDepth = parser.getDepth();
+ while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
+ && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
+ if (type == XmlPullParser.END_TAG
+ || type == XmlPullParser.TEXT) {
+ continue;
+ }
+
+ String tagName = parser.getName();
+ if (tagName.equals("user-app")
+ || tagName.equals("system-app")) {
+ readDefaultPolicy(parser, tagName);
+ } else if (tagName.equals("application")) {
+ readApplicationPolicy(parser);
+ } else {
+ Slog.w(TAG, "Unknown element under <appops-policy>: "
+ + parser.getName());
+ XmlUtils.skipCurrentTag(parser);
+ }
+ }
+ } catch (IllegalStateException e) {
+ Slog.w(TAG, "Failed parsing " + e);
+ } catch (NullPointerException e) {
+ Slog.w(TAG, "Failed parsing " + e);
+ } catch (NumberFormatException e) {
+ Slog.w(TAG, "Failed parsing " + e);
+ } catch (XmlPullParserException e) {
+ Slog.w(TAG, "Failed parsing " + e);
+ } catch (IOException e) {
+ Slog.w(TAG, "Failed parsing " + e);
+ } catch (IndexOutOfBoundsException e) {
+ Slog.w(TAG, "Failed parsing " + e);
+ } finally {
+ if (!success) {
+ mPolicy.clear();
+ }
+ try {
+ stream.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+ }
+
+ private void readDefaultPolicy(XmlPullParser parser, String packageName)
+ throws NumberFormatException, XmlPullParserException, IOException {
+ if (!"user-app".equalsIgnoreCase(packageName)
+ && !"system-app".equalsIgnoreCase(packageName)) {
+ return;
+ }
+ int mode = AppOpsManager.stringToMode(parser.getAttributeValue(null,
+ "permission"));
+ int show = stringToControl(parser.getAttributeValue(null, "show"));
+ if (mode == AppOpsManager.MODE_ERRORED && show == CONTROL_UNKNOWN) {
+ return;
+ }
+ PolicyPkg pkg = this.mPolicy.get(packageName);
+ if (pkg == null) {
+ pkg = new PolicyPkg(packageName, mode, show, packageName);
+ this.mPolicy.put(packageName, pkg);
+ } else {
+ Slog.w(TAG, "Duplicate policy found for package: " + packageName
+ + " of type: " + packageName);
+ pkg.mode = mode;
+ pkg.show = show;
+ }
+ }
+
+ private void readApplicationPolicy(XmlPullParser parser)
+ throws NumberFormatException, XmlPullParserException, IOException {
+ int outerDepth = parser.getDepth();
+ int type;
+ while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
+ && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
+ if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
+ continue;
+ }
+ String tagName = parser.getName();
+ if (tagName.equals("pkg")) {
+ readPkgPolicy(parser);
+ } else {
+ Slog.w(TAG,
+ "Unknown element under <application>: "
+ + parser.getName());
+ XmlUtils.skipCurrentTag(parser);
+ }
+ }
+ }
+
+ private void readPkgPolicy(XmlPullParser parser)
+ throws NumberFormatException, XmlPullParserException, IOException {
+ String packageName = parser.getAttributeValue(null, "name");
+ if (packageName == null)
+ return;
+ String appType = parser.getAttributeValue(null, "type");
+ if (appType == null)
+ return;
+ int mode = AppOpsManager.stringToMode(parser.getAttributeValue(null,
+ "permission"));
+ int show = stringToControl(parser.getAttributeValue(null, "show"));
+ String key = packageName + "." + appType;
+ PolicyPkg pkg = this.mPolicy.get(key);
+ if (pkg == null) {
+ pkg = new PolicyPkg(packageName, mode, show, appType);
+ this.mPolicy.put(key, pkg);
+ } else {
+ Slog.w(TAG, "Duplicate policy found for package: " + packageName
+ + " of type: " + appType);
+ pkg.mode = mode;
+ pkg.show = show;
+ }
+
+ int outerDepth = parser.getDepth();
+ int type;
+ while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
+ && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
+ if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
+ continue;
+ }
+ String tagName = parser.getName();
+ if (tagName.equals("op")) {
+ readOpPolicy(parser, pkg);
+ } else {
+ Slog.w(TAG, "Unknown element under <pkg>: " + parser.getName());
+ XmlUtils.skipCurrentTag(parser);
+ }
+ }
+ }
+
+ private void readOpPolicy(XmlPullParser parser, PolicyPkg pkg)
+ throws NumberFormatException, XmlPullParserException, IOException {
+ if (pkg == null) {
+ return;
+ }
+ String opName = parser.getAttributeValue(null, "name");
+ if (opName == null) {
+ Slog.w(TAG, "Op name is null");
+ return;
+ }
+ int code = AppOpsManager.stringOpToOp(opName);
+ if (code == AppOpsManager.OP_NONE) {
+ Slog.w(TAG, "Unknown Op: " + opName);
+ return;
+ }
+ int mode = AppOpsManager.stringToMode(parser.getAttributeValue(null,
+ "permission"));
+ int show = stringToControl(parser.getAttributeValue(null, "show"));
+ if (mode == AppOpsManager.MODE_ERRORED && show == CONTROL_UNKNOWN) {
+ return;
+ }
+ PolicyOp op = pkg.get(code);
+ if (op == null) {
+ op = new PolicyOp(code, mode, show);
+ pkg.put(code, op);
+ } else {
+ Slog.w(TAG, "Duplicate policy found for package: "
+ + pkg.packageName + " type: " + pkg.type + " op: " + op.op);
+ op.mode = mode;
+ op.show = show;
+ }
+ }
+
+ void debugPoilcy() {
+ Iterator<Map.Entry<String, PolicyPkg>> iterator = mPolicy.entrySet()
+ .iterator();
+ while (iterator.hasNext()) {
+ String key = iterator.next().getKey();
+ if (DEBUG)
+ Slog.d(TAG, "Key: " + key);
+ PolicyPkg pkg = mPolicy.get(key);
+ if (pkg == null) {
+ if (DEBUG)
+ Slog.d(TAG, "Pkg is null for key: " + key);
+ continue;
+ }
+ if (DEBUG)
+ Slog.d(TAG, pkg.toString());
+ for (int i = 0; i < pkg.size(); i++) {
+ PolicyOp op = pkg.valueAt(i);
+ if (DEBUG)
+ Slog.d(TAG, op.toString());
+ }
+ }
+ }
+
+ private String getAppType(String packageName) {
+ String appType = null;
+ ApplicationInfo appInfo = null;
+ if (mContext != null) {
+ try {
+ appInfo = mContext.getPackageManager().getApplicationInfo(
+ packageName, 0);
+ } catch (NameNotFoundException e) {
+ appInfo = null;
+ }
+ if (appInfo != null) {
+ if ((appInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
+ appType = "system-app";
+ } else {
+ appType = "user-app";
+ }
+ }
+ } else {
+ Slog.e(TAG, "Context is null");
+ }
+ return appType;
+ }
+
+ public boolean isControlAllowed(int code, String packageName) {
+ boolean isShow = true;
+ int show = CONTROL_UNKNOWN;
+ PolicyPkg pkg;
+ String key;
+ String type;
+
+ if (mPolicy == null) {
+ return isShow;
+ }
+
+ type = getAppType(packageName);
+ if (type != null) {
+ key = type;
+ pkg = mPolicy.get(key);
+ if (pkg != null && pkg.show != CONTROL_UNKNOWN) {
+ show = pkg.show;
+ }
+ }
+ key = packageName;
+ if (type != null) {
+ key = key + "." + type;
+ }
+ pkg = mPolicy.get(key);
+ if (pkg != null) {
+ if (pkg.show != CONTROL_UNKNOWN) {
+ show = pkg.show;
+ }
+ PolicyOp op = pkg.get(code);
+ if (op != null) {
+ if (op.show != CONTROL_UNKNOWN) {
+ show = op.show;
+ }
+ }
+ }
+ if (show == CONTROL_NOSHOW) {
+ isShow = false;
+ }
+ return isShow;
+ }
+
+ public int getDefualtMode(int code, String packageName) {
+ int mode = AppOpsManager.MODE_ERRORED;
+ PolicyPkg pkg;
+ String key;
+ String type;
+
+ if (mPolicy == null) {
+ return mode;
+ }
+ if (DEBUG)
+ Slog.d(TAG, "Default mode requested for op=" + code + " package="
+ + packageName);
+ type = getAppType(packageName);
+ if (type != null) {
+ // Get value based on 'type'
+ key = type;
+ pkg = mPolicy.get(key);
+ if (pkg != null && pkg.mode != AppOpsManager.MODE_ERRORED) {
+ if (DEBUG)
+ Slog.d(TAG, "Setting value based on type: " + pkg);
+ mode = pkg.mode;
+ }
+ }
+ // Get value based on 'pkg'.
+ key = packageName;
+ if (type != null) {
+ key = key + "." + type;
+ }
+ pkg = mPolicy.get(key);
+ if (pkg != null) {
+ if (pkg.mode != AppOpsManager.MODE_ERRORED) {
+ if (DEBUG)
+ Slog.d(TAG, "Setting value based on packageName: " + pkg);
+ mode = pkg.mode;
+ }
+ // Get value base on 'op'
+ PolicyOp op = pkg.get(code);
+ if (op != null) {
+ if (op.mode != AppOpsManager.MODE_ERRORED) {
+ if (DEBUG)
+ Slog.d(TAG, "Setting value based on op: " + op);
+ mode = op.mode;
+ }
+ }
+ }
+ if (DEBUG)
+ Slog.d(TAG, "Returning mode=" + mode);
+ return mode;
+ }
+}
\ No newline at end of file
diff --git a/services/core/java/com/android/server/AppOpsService.java b/services/core/java/com/android/server/AppOpsService.java
index 4caeba8..351264c 100644
--- a/services/core/java/com/android/server/AppOpsService.java
+++ b/services/core/java/com/android/server/AppOpsService.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");
@@ -37,6 +40,7 @@
import android.app.ActivityThread;
import android.app.AppGlobals;
import android.app.AppOpsManager;
+import android.app.Dialog;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageManager;
@@ -47,6 +51,7 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
+import android.os.Looper;
import android.os.Process;
import android.os.RemoteException;
import android.os.ResultReceiver;
@@ -71,6 +76,7 @@
import com.android.internal.util.FastXmlSerializer;
import com.android.internal.util.Preconditions;
import com.android.internal.util.XmlUtils;
+import com.android.server.PermissionDialogReqQueue.PermissionDialogReq;
import libcore.util.EmptyArray;
import org.xmlpull.v1.XmlPullParser;
@@ -84,9 +90,15 @@
// Write at most every 30 minutes.
static final long WRITE_DELAY = DEBUG ? 1000 : 30*60*1000;
+ // Location of policy file.
+ static final String DEFAULT_POLICY_FILE = "/system/etc/appops_policy.xml";
+
Context mContext;
final AtomicFile mFile;
final Handler mHandler;
+ final Looper mLooper;
+ final boolean mStrictEnable;
+ AppOpsPolicy mPolicy;
boolean mWriteScheduled;
boolean mFastWriteScheduled;
@@ -156,12 +168,18 @@
public long time;
public long rejectTime;
public int nesting;
+ public int noteOpCount;
+ public int startOpCount;
+ public PermissionDialogReqQueue dialogReqQueue;
+ final ArrayList<IBinder> clientTokens;
- public Op(int _uid, String _packageName, int _op) {
+ public Op(int _uid, String _packageName, int _op, int _mode) {
uid = _uid;
packageName = _packageName;
op = _op;
- mode = AppOpsManager.opToDefaultMode(op);
+ mode = _mode;
+ dialogReqQueue = new PermissionDialogReqQueue();
+ clientTokens = new ArrayList<IBinder>();
}
}
@@ -239,11 +257,14 @@
public AppOpsService(File storagePath, Handler handler) {
mFile = new AtomicFile(storagePath);
mHandler = handler;
+ mLooper = Looper.myLooper();
+ mStrictEnable = AppOpsManager.isStrictEnable();
readState();
}
public void publish(Context context) {
mContext = context;
+ readPolicy();
ServiceManager.addService(Context.APP_OPS_SERVICE, asBinder());
}
@@ -486,7 +507,8 @@
code = AppOpsManager.opToSwitch(code);
synchronized (this) {
- final int defaultMode = AppOpsManager.opToDefaultMode(code);
+ final int defaultMode = AppOpsManager.opToDefaultMode(code,
+ AppOpsManager.isStrictOp(code));
UidState uidState = getUidStateLocked(uid, false);
if (uidState == null) {
@@ -616,7 +638,7 @@
}
repCbs.addAll(cbs);
}
- if (mode == AppOpsManager.opToDefaultMode(op.op)) {
+ if (mode == getDefaultMode(code, uid, packageName)) {
// If going into the default mode, prune this op
// if there is nothing else interesting in it.
pruneOp(op, uid, packageName);
@@ -755,9 +777,11 @@
Ops pkgOps = ent.getValue();
for (int j=pkgOps.size()-1; j>=0; j--) {
Op curOp = pkgOps.valueAt(j);
+ int defaultMode = getDefaultMode(curOp.op, curOp.uid,
+ curOp.packageName);
if (AppOpsManager.opAllowsReset(curOp.op)
- && curOp.mode != AppOpsManager.opToDefaultMode(curOp.op)) {
- curOp.mode = AppOpsManager.opToDefaultMode(curOp.op);
+ && curOp.mode != defaultMode) {
+ curOp.mode = defaultMode;
changed = true;
callbacks = addCallbacks(callbacks, curOp.op, curOp.uid, packageName,
mOpModeWatchers.get(curOp.op));
@@ -888,7 +912,7 @@
}
Op op = getOpLocked(code, uid, resolvedPackageName, false);
if (op == null) {
- return AppOpsManager.opToDefaultMode(code);
+ return getDefaultMode(code, uid, packageName);
}
return op.mode;
}
@@ -1016,6 +1040,7 @@
private int noteOperationUnchecked(int code, int uid, String packageName,
int proxyUid, String proxyPackageName) {
+ PermissionDialogReq req = null;
synchronized (this) {
Ops ops = getOpsRawLocked(uid, packageName, true);
if (ops == null) {
@@ -1047,26 +1072,46 @@
}
} else {
final Op switchOp = switchCode != code ? getOpLocked(ops, switchCode, true) : op;
- if (switchOp.mode != AppOpsManager.MODE_ALLOWED) {
- if (DEBUG) Log.d(TAG, "noteOperation: reject #" + op.mode + " for code "
- + switchCode + " (" + code + ") uid " + uid + " package "
- + packageName);
+ if (switchOp.mode != AppOpsManager.MODE_ALLOWED
+ && switchOp.mode != AppOpsManager.MODE_ASK) {
+ if (DEBUG)
+ Log.d(TAG, "noteOperation: reject #" + op.mode
+ + " for code " + switchCode + " (" + code
+ + ") uid " + uid + " package " + packageName);
op.rejectTime = System.currentTimeMillis();
return switchOp.mode;
+ } else if (switchOp.mode == AppOpsManager.MODE_ASK) {
+ if (Looper.myLooper() == mLooper) {
+ Log.e(TAG,
+ "noteOperation: This method will deadlock if called from the main thread. (Code: "
+ + code
+ + " uid: "
+ + uid
+ + " package: "
+ + packageName + ")");
+ return switchOp.mode;
+ }
+ op.noteOpCount++;
+ req = askOperationLocked(code, uid, packageName, switchOp);
}
}
- if (DEBUG) Log.d(TAG, "noteOperation: allowing code " + code + " uid " + uid
- + " package " + packageName);
- op.time = System.currentTimeMillis();
- op.rejectTime = 0;
- op.proxyUid = proxyUid;
- op.proxyPackageName = proxyPackageName;
- return AppOpsManager.MODE_ALLOWED;
+ if (req == null) {
+ if (DEBUG) Log.d(TAG, "noteOperation: allowing code " + code + " uid " + uid
+ + " package " + packageName);
+ op.time = System.currentTimeMillis();
+ op.rejectTime = 0;
+ op.proxyUid = proxyUid;
+ op.proxyPackageName = proxyPackageName;
+ return AppOpsManager.MODE_ALLOWED;
+ }
}
+ return req.get();
}
@Override
- public int startOperation(IBinder token, int code, int uid, String packageName) {
+ public int startOperation(IBinder token, int code, int uid,
+ String packageName) {
+ final PermissionDialogReq req;
verifyIncomingUid(uid);
verifyIncomingOp(code);
String resolvedPackageName = resolvePackageName(uid, packageName);
@@ -1098,26 +1143,46 @@
}
}
final Op switchOp = switchCode != code ? getOpLocked(ops, switchCode, true) : op;
- if (switchOp.mode != AppOpsManager.MODE_ALLOWED) {
- if (DEBUG) Log.d(TAG, "startOperation: reject #" + op.mode + " for code "
- + switchCode + " (" + code + ") uid " + uid + " package "
- + resolvedPackageName);
+ if (switchOp.mode != AppOpsManager.MODE_ALLOWED
+ && switchOp.mode != AppOpsManager.MODE_ASK) {
+ if (DEBUG)
+ Log.d(TAG, "startOperation: reject #" + op.mode
+ + " for code " + switchCode + " (" + code
+ + ") uid " + uid + " package " + resolvedPackageName);
op.rejectTime = System.currentTimeMillis();
return switchOp.mode;
+ } else if (switchOp.mode == AppOpsManager.MODE_ALLOWED) {
+ if (DEBUG)
+ Log.d(TAG, "startOperation: allowing code " + code
+ + " uid " + uid + " package " + resolvedPackageName);
+ if (op.nesting == 0) {
+ op.time = System.currentTimeMillis();
+ op.rejectTime = 0;
+ op.duration = -1;
+ }
+ op.nesting++;
+ if (client.mStartedOps != null) {
+ client.mStartedOps.add(op);
+ }
+ return AppOpsManager.MODE_ALLOWED;
+ } else {
+ if (Looper.myLooper() == mLooper) {
+ Log.e(TAG,
+ "startOperation: This method will deadlock if called from the main thread. (Code: "
+ + code
+ + " uid: "
+ + uid
+ + " package: "
+ + resolvedPackageName + ")");
+ return switchOp.mode;
+ }
+ op.startOpCount++;
+ IBinder clientToken = client.mAppToken;
+ op.clientTokens.add(clientToken);
+ req = askOperationLocked(code, uid, resolvedPackageName, switchOp);
}
- if (DEBUG) Log.d(TAG, "startOperation: allowing code " + code + " uid " + uid
- + " package " + resolvedPackageName);
- if (op.nesting == 0) {
- op.time = System.currentTimeMillis();
- op.rejectTime = 0;
- op.duration = -1;
- }
- op.nesting++;
- if (client.mStartedOps != null) {
- client.mStartedOps.add(op);
- }
- return AppOpsManager.MODE_ALLOWED;
}
+ return req.get();
}
@Override
@@ -1172,6 +1237,10 @@
}
private void verifyIncomingUid(int uid) {
+ if (Binder.getCallingUid() == 0) {
+ // Allow root to delegate uid operations.
+ return;
+ }
if (uid == Binder.getCallingUid()) {
return;
}
@@ -1294,12 +1363,14 @@
}
private Op getOpLocked(Ops ops, int code, boolean edit) {
+ int mode;
Op op = ops.get(code);
if (op == null) {
if (!edit) {
return null;
}
- op = new Op(ops.uidState.uid, ops.packageName, code);
+ mode = getDefaultMode(code, ops.uidState.uid, ops.packageName);
+ op = new Op(ops.uidState.uid, ops.packageName, code, mode);
ops.put(code, op);
}
if (edit) {
@@ -1486,10 +1557,32 @@
String tagName = parser.getName();
if (tagName.equals("op")) {
- Op op = new Op(uid, pkgName, Integer.parseInt(parser.getAttributeValue(null, "n")));
+ int code = Integer
+ .parseInt(parser.getAttributeValue(null, "n"));
+ // use op name string if it exists
+ String codeNameStr = parser.getAttributeValue(null, "ns");
+ if (codeNameStr != null) {
+ // returns OP_NONE if it could not be mapped
+ code = AppOpsManager.nameToOp(codeNameStr);
+ }
+ // skip op codes that are out of bounds
+ if (code == AppOpsManager.OP_NONE
+ || code >= AppOpsManager._NUM_OP) {
+ continue;
+ }
+ Op op = new Op(uid, pkgName, code, AppOpsManager.MODE_ERRORED);
String mode = parser.getAttributeValue(null, "m");
if (mode != null) {
op.mode = Integer.parseInt(mode);
+ } else {
+ String sDefualtMode = parser.getAttributeValue(null, "dm");
+ int defaultMode;
+ if (sDefualtMode != null) {
+ defaultMode = Integer.parseInt(sDefualtMode);
+ } else {
+ defaultMode = getDefaultMode(code, uid, pkgName);
+ }
+ op.mode = defaultMode;
}
String time = parser.getAttributeValue(null, "t");
if (time != null) {
@@ -1598,8 +1691,13 @@
AppOpsManager.OpEntry op = ops.get(j);
out.startTag(null, "op");
out.attribute(null, "n", Integer.toString(op.getOp()));
- if (op.getMode() != AppOpsManager.opToDefaultMode(op.getOp())) {
+ out.attribute(null, "ns", AppOpsManager.opToName(op.getOp()));
+ int defaultMode = getDefaultMode(op.getOp(),
+ pkg.getUid(), pkg.getPackageName());
+ if (op.getMode() != defaultMode) {
out.attribute(null, "m", Integer.toString(op.getMode()));
+ } else {
+ out.attribute(null, "dm", Integer.toString(defaultMode));
}
long time = op.getTime();
if (time != 0) {
@@ -2283,7 +2381,171 @@
private void checkSystemUid(String function) {
int uid = Binder.getCallingUid();
if (uid != Process.SYSTEM_UID) {
- throw new SecurityException(function + " must by called by the system");
+ throw new SecurityException(function
+ + " must by called by the system");
+ }
+ }
+
+ final class AskRunnable implements Runnable {
+ final int code;
+ final int uid;
+ final String packageName;
+ final Op op;
+ final PermissionDialogReq request;
+
+ public AskRunnable(int code, int uid, String packageName, Op op,
+ PermissionDialogReq request) {
+ super();
+ this.code = code;
+ this.uid = uid;
+ this.packageName = packageName;
+ this.op = op;
+ this.request = request;
+ }
+
+ @Override
+ public void run() {
+ synchronized (AppOpsService.this) {
+ Log.e(TAG, "Creating dialog box");
+ op.dialogReqQueue.register(request);
+ if (op.dialogReqQueue.getDialog() == null) {
+ Dialog d = new PermissionDialog(mContext,
+ AppOpsService.this, code, uid, packageName);
+ op.dialogReqQueue.setDialog((PermissionDialog)d);
+ d.show();
+ }
+ }
+ }
+ }
+
+ private PermissionDialogReq askOperationLocked(int code, int uid,
+ String packageName, Op op) {
+ PermissionDialogReq request = new PermissionDialogReq();
+ mHandler.post(new AskRunnable(code, uid, packageName, op, request));
+ return request;
+ }
+
+ private int getDefaultMode(int code, int uid, String packageName) {
+ int mode = AppOpsManager.opToDefaultMode(code,
+ isStrict(code, uid, packageName));
+ if (AppOpsManager.isStrictOp(code) && mPolicy != null) {
+ int policyMode = mPolicy.getDefualtMode(code, packageName);
+ if (policyMode != AppOpsManager.MODE_ERRORED) {
+ mode = policyMode;
+ }
+ }
+ return mode;
+ }
+
+ private boolean isStrict(int code, int uid, String packageName) {
+ if (!mStrictEnable)
+ return false;
+
+ return UserHandle.isApp(uid);
+ }
+
+ private void printOperationLocked(Op op, int mode, String operation) {
+ if(op != null) {
+ int switchCode = AppOpsManager.opToSwitch(op.op);
+ if (mode == AppOpsManager.MODE_IGNORED) {
+ if (DEBUG) Log.d(TAG, operation + ": reject #" + mode + " for code "
+ + switchCode + " (" + op.op + ") uid " + op.uid + " package "
+ + op.packageName);
+ } else if (mode == AppOpsManager.MODE_ALLOWED) {
+ if (DEBUG) Log.d(TAG, operation + ": allowing code " + op.op + " uid "
+ + op.uid
+ + " package " + op.packageName);
+ }
+ }
+ }
+
+ private void recordOperationLocked(int code, int uid, String packageName,
+ int mode) {
+ Op op = getOpLocked(code, uid, packageName, false);
+ if(op != null) {
+ if(op.noteOpCount != 0)
+ printOperationLocked(op, mode, "noteOperartion");
+ if(op.startOpCount != 0)
+ printOperationLocked(op, mode, "startOperation");
+ if (mode == AppOpsManager.MODE_IGNORED) {
+ op.rejectTime = System.currentTimeMillis();
+ } else if (mode == AppOpsManager.MODE_ALLOWED) {
+ if(op.noteOpCount != 0) {
+ op.time = System.currentTimeMillis();
+ op.rejectTime = 0;
+ }
+ if(op.startOpCount != 0) {
+ if(op.nesting == 0) {
+ op.time = System.currentTimeMillis();
+ op.rejectTime = 0;
+ op.duration = -1;
+ }
+ op.nesting = op.nesting + op.startOpCount;
+ while(op.clientTokens.size() != 0) {
+ IBinder clientToken = op.clientTokens.get(0);
+ ClientState client = mClients.get(clientToken);
+ if (client != null) {
+ if (client.mStartedOps != null) {
+ client.mStartedOps.add(op);
+ }
+ }
+ op.clientTokens.remove(0);
+ }
+ }
+ }
+ op.clientTokens.clear();
+ op.startOpCount = 0;
+ op.noteOpCount = 0;
+ }
+ }
+
+ public void notifyOperation(int code, int uid, String packageName,
+ int mode, boolean remember) {
+ verifyIncomingUid(uid);
+ verifyIncomingOp(code);
+ ArrayList<Callback> repCbs = null;
+ int switchCode = AppOpsManager.opToSwitch(code);
+ synchronized (this) {
+ recordOperationLocked(code, uid, packageName, mode);
+ Op op = getOpLocked(switchCode, uid, packageName, true);
+ if (op != null) {
+ // Send result to all waiting client
+ if (op.dialogReqQueue.getDialog() != null) {
+ op.dialogReqQueue.notifyAll(mode);
+ op.dialogReqQueue.setDialog(null);
+ }
+ if (remember && op.mode != mode) {
+ op.mode = mode;
+ ArrayList<Callback> cbs = mOpModeWatchers.get(switchCode);
+ if (cbs != null) {
+ if (repCbs == null) {
+ repCbs = new ArrayList<Callback>();
+ }
+ repCbs.addAll(cbs);
+ }
+ cbs = mPackageModeWatchers.get(packageName);
+ if (cbs != null) {
+ if (repCbs == null) {
+ repCbs = new ArrayList<Callback>();
+ }
+ repCbs.addAll(cbs);
+ }
+ if (mode == getDefaultMode(op.op, op.uid, op.packageName)) {
+ // If going into the default mode, prune this op
+ // if there is nothing else interesting in it.
+ pruneOp(op, uid, packageName);
+ }
+ scheduleWriteLocked();
+ }
+ }
+ }
+ if (repCbs != null) {
+ for (int i = 0; i < repCbs.size(); i++) {
+ try {
+ repCbs.get(i).mCallback.opChanged(switchCode, uid, packageName);
+ } catch (RemoteException e) {
+ }
+ }
}
}
@@ -2311,6 +2573,24 @@
return packageNames;
}
+ private void readPolicy() {
+ if (mStrictEnable) {
+ mPolicy = new AppOpsPolicy(new File(DEFAULT_POLICY_FILE), mContext);
+ mPolicy.readPolicy();
+ mPolicy.debugPoilcy();
+ } else {
+ mPolicy = null;
+ }
+ }
+
+ public boolean isControlAllowed(int code, String packageName) {
+ boolean isShow = true;
+ if (mPolicy != null) {
+ isShow = mPolicy.isControlAllowed(code, packageName);
+ }
+ return isShow;
+ }
+
private final class ClientRestrictionState implements DeathRecipient {
private final IBinder token;
SparseArray<boolean[]> perUserRestrictions;
diff --git a/services/core/java/com/android/server/BasePermissionDialog.java b/services/core/java/com/android/server/BasePermissionDialog.java
new file mode 100644
index 0000000..e3dbcda
--- /dev/null
+++ b/services/core/java/com/android/server/BasePermissionDialog.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+ *
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.os.Handler;
+import android.os.Message;
+import android.view.KeyEvent;
+import android.view.WindowManager;
+import android.widget.Button;
+
+import com.android.internal.R;
+
+public class BasePermissionDialog extends AlertDialog {
+ public BasePermissionDialog(Context context) {
+ super(context, com.android.internal.R.style.Theme_Dialog_AppError);
+ getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
+ getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
+ WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
+ WindowManager.LayoutParams attrs = getWindow().getAttributes();
+ attrs.setTitle("Permission Dialog");
+ getWindow().setAttributes(attrs);
+ setIconAttribute(R.attr.alertDialogIcon);
+ }
+
+ public void onStart() {
+ super.onStart();
+ setEnabled(false);
+ mHandler.sendMessage(mHandler.obtainMessage(0));
+ }
+
+ public boolean dispatchKeyEvent(KeyEvent event) {
+ if (mConsuming) {
+ // Slog.i(TAG, "Consuming: " + event);
+ return true;
+ }
+ // Slog.i(TAG, "Dispatching: " + event);
+ return super.dispatchKeyEvent(event);
+ }
+
+ private void setEnabled(boolean enabled) {
+ Button b = (Button) findViewById(R.id.button1);
+ if (b != null) {
+ b.setEnabled(enabled);
+ }
+ b = (Button) findViewById(R.id.button2);
+ if (b != null) {
+ b.setEnabled(enabled);
+ }
+ b = (Button) findViewById(R.id.button3);
+ if (b != null) {
+ b.setEnabled(enabled);
+ }
+ }
+
+ private Handler mHandler = new Handler() {
+ public void handleMessage(Message msg) {
+ if (msg.what == 0) {
+ mConsuming = false;
+ setEnabled(true);
+ }
+ }
+ };
+
+ private boolean mConsuming = true;
+}
diff --git a/services/core/java/com/android/server/BatteryService.java b/services/core/java/com/android/server/BatteryService.java
index 6b51721..0bdfd6c 100644
--- a/services/core/java/com/android/server/BatteryService.java
+++ b/services/core/java/com/android/server/BatteryService.java
@@ -18,6 +18,7 @@
import android.database.ContentObserver;
import android.os.BatteryStats;
+import android.os.SystemProperties;
import android.os.ResultReceiver;
import android.os.ShellCommand;
@@ -31,6 +32,7 @@
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
+import android.content.BroadcastReceiver;
import android.os.BatteryManager;
import android.os.BatteryManagerInternal;
import android.os.BatteryProperties;
@@ -53,6 +55,11 @@
import java.io.File;
import java.io.FileDescriptor;
import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.BufferedInputStream;
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintWriter;
@@ -147,6 +154,29 @@
private boolean mSentLowBatteryBroadcast = false;
+ private final int mVbattSamplingIntervalMsec = 30000; /* sampling frequency - 30 seconds */
+ private final int mWeakChgCutoffVoltageMv;
+ private static int mWeakChgSocCheckStarted = 0;
+ /*
+ * Default shutdown interval in case voltage_now file is not present:
+ * In case of weak charger shutdown feature is enabled and
+ * voltage_now file absent shutdown aftet 5 minutes if SOC continues
+ * to remain at 0 level.
+ */
+ private final int mWeakChgMaxShutdownIntervalMsecs = 300000;
+ private boolean mInitiateShutdown = false;
+ private File mVoltageNowFile = null;
+ private Runnable runnable = new Runnable() {
+ public void run() {
+ synchronized (mLock) {
+ if(mVoltageNowFile.exists())
+ shutdownIfWeakChargerVoltageCheckLocked();
+ else
+ shutdownIfWeakChargerEmptySOCLocked();
+ }
+ }
+ };
+
public BatteryService(Context context) {
super(context);
@@ -155,6 +185,16 @@
mLed = new Led(context, getLocalService(LightsManager.class));
mBatteryStats = BatteryStatsService.getService();
+ /*
+ * Calculate cut-off voltage from 'ro.cutoff_voltage_mv'
+ * or default to 3200mV.
+ * if 'ro.cutoff_voltage_mv' <= 0, ignore shutdown logic.
+ */
+ mWeakChgCutoffVoltageMv = SystemProperties.getInt("ro.cutoff_voltage_mv", 0);
+ /* 2700mV UVLO voltage */
+ if (mWeakChgCutoffVoltageMv > 2700)
+ mVoltageNowFile = new File("/sys/class/power_supply/battery/voltage_now");
+
mCriticalBatteryLevel = mContext.getResources().getInteger(
com.android.internal.R.integer.config_criticalBatteryWarningLevel);
mLowBatteryWarningLevel = mContext.getResources().getInteger(
@@ -271,6 +311,67 @@
&& (oldPlugged || mLastBatteryLevel > mLowBatteryWarningLevel);
}
+ private void shutdownIfWeakChargerEmptySOCLocked() {
+
+ if (mBatteryProps.batteryLevel == 0) {
+ if (mInitiateShutdown) {
+ if (ActivityManagerNative.isSystemReady()) {
+ Slog.e(TAG, "silent_reboot shutdownIfWeakChargerEmptySOCLocked");
+
+ Intent intent = new Intent(Intent.ACTION_REQUEST_SHUTDOWN);
+ intent.putExtra(Intent.EXTRA_KEY_CONFIRM, false);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ mContext.startActivityAsUser(intent, UserHandle.CURRENT);
+ }
+ } else {
+ mInitiateShutdown = true;
+ mHandler.removeCallbacks(runnable);
+ mHandler.postDelayed(runnable, mWeakChgMaxShutdownIntervalMsecs);
+ }
+ } else {
+ mInitiateShutdown = false;
+ mWeakChgSocCheckStarted = 0;
+ }
+ }
+
+ private void shutdownIfWeakChargerVoltageCheckLocked() {
+ int vbattNow = 0;
+ FileReader fileReader;
+ BufferedReader br;
+
+ try {
+ fileReader = new FileReader(mVoltageNowFile);
+ br = new BufferedReader(fileReader);
+ vbattNow = Integer.parseInt(br.readLine());
+ /* convert battery voltage from uV to mV */
+ vbattNow = vbattNow / 1000;
+ br.close();
+ fileReader.close();
+ } catch (FileNotFoundException e) {
+ Slog.e(TAG, "Failure in reading battery voltage", e);
+ } catch (IOException e) {
+ Slog.e(TAG, "Failure in reading battery voltage", e);
+ }
+
+ if (mBatteryProps.batteryLevel == 0) {
+ if (vbattNow <= mWeakChgCutoffVoltageMv) {
+ if (ActivityManagerNative.isSystemReady()) {
+ Slog.e(TAG, "silent_reboot shutdownIfWeakChargerVoltageCheckLocked");
+
+ Intent intent = new Intent(Intent.ACTION_REQUEST_SHUTDOWN);
+ intent.putExtra(Intent.EXTRA_KEY_CONFIRM, false);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ mContext.startActivityAsUser(intent, UserHandle.CURRENT);
+ }
+ } else {
+ mHandler.removeCallbacks(runnable);
+ mHandler.postDelayed(runnable, mVbattSamplingIntervalMsec);
+ }
+ } else {
+ mWeakChgSocCheckStarted = 0;
+ }
+ }
+
private void shutdownIfNoPowerLocked() {
// shut down gracefully if our battery is critically low and we are not powered.
// wait until the system has booted before attempting to display the shutdown dialog.
@@ -363,6 +464,20 @@
// Should never happen.
}
+ /*
+ * Schedule Weak Charger shutdown thread if:
+ * Battery level = 0, Charger is pluggedin and cutoff voltage is valid.
+ */
+ if ((mBatteryProps.batteryLevel == 0)
+ && (mWeakChgSocCheckStarted == 0)
+ && (mWeakChgCutoffVoltageMv > 0)
+ && (mPlugType != BATTERY_PLUGGED_NONE)) {
+
+ mWeakChgSocCheckStarted = 1;
+ mHandler.removeCallbacks(runnable);
+ mHandler.postDelayed(runnable, mVbattSamplingIntervalMsec);
+ }
+
shutdownIfNoPowerLocked();
shutdownIfOverTempLocked();
@@ -818,6 +933,34 @@
com.android.internal.R.integer.config_notificationsBatteryLedOff);
}
+ private boolean isHvdcpPresent() {
+ File mChargerTypeFile = new File("/sys/class/power_supply/usb/type");
+ FileReader fileReader;
+ BufferedReader br;
+ String type;
+ boolean ret;
+
+ try {
+ fileReader = new FileReader(mChargerTypeFile);
+ br = new BufferedReader(fileReader);
+ type = br.readLine();
+ if (type.regionMatches(true, 0, "USB_HVDCP", 0, 9))
+ ret = true;
+ else
+ ret = false;
+ br.close();
+ fileReader.close();
+ } catch (FileNotFoundException e) {
+ ret = false;
+ Slog.e(TAG, "Failure in reading charger type", e);
+ } catch (IOException e) {
+ ret = false;
+ Slog.e(TAG, "Failure in reading charger type", e);
+ }
+
+ return ret;
+ }
+
/**
* Synchronize on BatteryService.
*/
@@ -835,12 +978,18 @@
}
} else if (status == BatteryManager.BATTERY_STATUS_CHARGING
|| status == BatteryManager.BATTERY_STATUS_FULL) {
- if (status == BatteryManager.BATTERY_STATUS_FULL || level >= 90) {
+ if (status == BatteryManager.BATTERY_STATUS_FULL || level >= 95) {
// Solid green when full or charging and nearly full
mBatteryLight.setColor(mBatteryFullARGB);
} else {
- // Solid orange when charging and halfway full
- mBatteryLight.setColor(mBatteryMediumARGB);
+ if (isHvdcpPresent()) {
+ // Blinking orange if HVDCP charger
+ mBatteryLight.setFlashing(mBatteryMediumARGB, Light.LIGHT_FLASH_TIMED,
+ mBatteryLedOn, mBatteryLedOn);
+ } else {
+ // Solid orange when charging and halfway full
+ mBatteryLight.setColor(mBatteryMediumARGB);
+ }
}
} else {
// No lights if not charging and not low
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java
index 2a6f9d2..34c01cc 100644
--- a/services/core/java/com/android/server/BluetoothManagerService.java
+++ b/services/core/java/com/android/server/BluetoothManagerService.java
@@ -19,6 +19,7 @@
import android.Manifest;
import android.app.ActivityManager;
import android.bluetooth.BluetoothAdapter;
+import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
import android.bluetooth.IBluetooth;
import android.bluetooth.IBluetoothCallback;
@@ -63,6 +64,8 @@
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
+import java.util.List;
+import java.util.Vector;
class BluetoothManagerService extends IBluetoothManager.Stub {
@@ -141,6 +144,7 @@
// used inside handler thread
private boolean mQuietEnable = false;
private boolean mEnable;
+ private boolean mEnableBrEdr = false;
/**
* Used for tracking apps that enabled / disabled Bluetooth.
@@ -181,6 +185,7 @@
private final BluetoothHandler mHandler;
private int mErrorRecoveryRetryCounter;
private final int mSystemUiUid;
+ private boolean mIntentPending = false;
// Save a ProfileServiceConnections object for each of the bound
// bluetooth profile services
@@ -264,11 +269,13 @@
// disable without persisting the setting
Slog.d(TAG, "Calling disable");
sendDisableMsg("airplane mode");
+ mEnableBrEdr = false;
}
} else if (mEnableExternal) {
// enable without persisting the setting
Slog.d(TAG, "Calling enable");
sendEnableMsg(mQuietEnableExternal, "airplane mode");
+ mEnableBrEdr = true;
}
}
}
@@ -310,6 +317,7 @@
if (isBluetoothPersistedStateOn()) {
if (DBG) Slog.d(TAG, "Startup: Bluetooth persisted state is ON.");
mEnableExternal = true;
+ mEnableBrEdr = true;
}
int systemUiUid = -1;
@@ -577,7 +585,7 @@
private void disableBleScanMode() {
try {
mBluetoothLock.writeLock().lock();
- if (mBluetooth != null && (mBluetooth.getState() != BluetoothAdapter.STATE_ON)) {
+ if (mBluetooth != null && (mBluetooth.getState() != BluetoothAdapter.STATE_ON) && (!isBluetoothPersistedStateOnBluetooth())) {
if (DBG) Slog.d(TAG, "Reseting the mEnable flag for clean disable");
mEnable = false;
}
@@ -607,8 +615,25 @@
}
int appCount = mBleApps.size();
if (DBG) Slog.d(TAG, appCount + " registered Ble Apps");
- if (appCount == 0 && mEnable) {
- disableBleScanMode();
+ if (appCount == 0) {
+ int st;
+ if(mEnable) {
+ disableBleScanMode();
+ }
+ try {
+ mBluetoothLock.readLock().lock();
+ if (mBluetooth != null) {
+ st = mBluetooth.getState();
+ if(st == BluetoothAdapter.STATE_BLE_ON) {
+ if (DBG) Slog.d(TAG, "Move to State Off");
+ mBluetooth.onBrEdrDown();
+ }
+ }
+ } catch (RemoteException e) {
+ Slog.e(TAG, "", e);
+ } finally {
+ mBluetoothLock.readLock().unlock();
+ }
}
return appCount;
}
@@ -641,7 +666,7 @@
BluetoothAdapter.nameForState(st));
return;
}
- if (isBluetoothPersistedStateOnBluetooth() || !isBleAppPresent()) {
+ if (isBluetoothPersistedStateOnBluetooth() || mEnableBrEdr) {
// This triggers transition to STATE_ON
mBluetooth.onLeServiceUp();
persistBluetoothSetting(BLUETOOTH_ON_BLUETOOTH);
@@ -727,6 +752,11 @@
}
}
+ if((packageName == null || packageName.isEmpty()) && !isBleAppPresent()) {
+ Slog.w(TAG, "Set mEnableBrEdr for script enable request");
+ mEnableBrEdr = true;
+ }
+
if (DBG) {
Slog.d(TAG,"enable(" + packageName + "): mBluetooth =" + mBluetooth +
" mBinding = " + mBinding + " mState = " +
@@ -771,9 +801,33 @@
synchronized(mReceiver) {
if (persist) {
persistBluetoothSetting(BLUETOOTH_OFF);
+ /*Binder.restoreCallingIdentity(callingIdentity);*/
+ mEnableExternal = false;
+ sendDisableMsg(packageName);
+ } else {
+ /* It means disable is called by shutdown thread */
+ synchronized (this) {
+ /*mBleAppCount = 0;*/
+ mBleApps.clear();
+ }
+
+ try {
+ mBluetoothLock.readLock().lock();
+ mEnableExternal = false;
+ if (mBluetooth != null) {
+ if(mBluetooth.getState() == BluetoothAdapter.STATE_BLE_ON) {
+ mEnable = false;
+ mBluetooth.onBrEdrDown();
+ } else {
+ sendDisableMsg(packageName);
+ }
+ }
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Unable to initiate disable", e);
+ } finally {
+ mBluetoothLock.readLock().unlock();
+ }
}
- mEnableExternal = false;
- sendDisableMsg(packageName);
}
return true;
}
@@ -863,13 +917,10 @@
Slog.d(TAG, "Creating new ProfileServiceConnections object for"
+ " profile: " + bluetoothProfile);
}
-
if (bluetoothProfile != BluetoothProfile.HEADSET) return false;
-
Intent intent = new Intent(IBluetoothHeadset.class.getName());
psc = new ProfileServiceConnections(intent);
if (!psc.bindService()) return false;
-
mProfileServices.put(new Integer(bluetoothProfile), psc);
}
}
@@ -1019,18 +1070,16 @@
} catch (RemoteException e) {
Slog.e(TAG, "Unable to linkToDeath", e);
}
-
if (mInvokingProxyCallbacks) {
Slog.e(TAG, "Proxy callbacks already in progress.");
return;
}
mInvokingProxyCallbacks = true;
-
final int n = mProxies.beginBroadcast();
try {
for (int i = 0; i < n; i++) {
try {
- mProxies.getBroadcastItem(i).onServiceConnected(className, service);
+ mProxies.getBroadcastItem(i).onServiceConnected(className, service);
} catch (RemoteException e) {
Slog.e(TAG, "Unable to connect to proxy", e);
}
@@ -1047,13 +1096,11 @@
mService.unlinkToDeath(this, 0);
mService = null;
mClassName = null;
-
if (mInvokingProxyCallbacks) {
Slog.e(TAG, "Proxy callbacks already in progress.");
return;
}
mInvokingProxyCallbacks = true;
-
final int n = mProxies.beginBroadcast();
try {
for (int i = 0; i < n; i++) {
@@ -1286,7 +1333,11 @@
if (state == BluetoothAdapter.STATE_BLE_ON) {
Slog.w(TAG, "BT Enable in BLE_ON State, going to ON");
mBluetooth.onLeServiceUp();
+
+ // waive WRITE_SECURE_SETTINGS permission check
+ long callingIdentity = Binder.clearCallingIdentity();
persistBluetoothSetting(BLUETOOTH_ON_BLUETOOTH);
+ Binder.restoreCallingIdentity(callingIdentity);
break;
}
}
@@ -1305,7 +1356,7 @@
// the previous Bluetooth process has exited. The
// waiting period has three components:
// (a) Wait until the local state is STATE_OFF. This
- // is accomplished by "waitForOnOff(false, true)".
+ // is accomplished by "waitForMonitoredOnOff(false, true)".
// (b) Wait until the STATE_OFF state is updated to
// all components.
// (c) Wait until the Bluetooth process exits, and
@@ -1315,7 +1366,17 @@
// message. On slower devices, that delay needs to be
// on the order of (2 * SERVICE_RESTART_TIME_MS).
//
- waitForOnOff(false, true);
+ // Wait for (a) is required only when Bluetooth is being
+ // turned off.
+ int state;
+ try {
+ state = mBluetooth.getState();
+ } catch (RemoteException e) {
+ Slog.e(TAG, "getState()", e);
+ break;
+ }
+ if(state == BluetoothAdapter.STATE_TURNING_OFF || state == BluetoothAdapter.STATE_BLE_TURNING_OFF)
+ waitForMonitoredOnOff(false, true);
Message restartMsg = mHandler.obtainMessage(
MESSAGE_RESTART_BLUETOOTH_SERVICE);
mHandler.sendMessageDelayed(restartMsg,
@@ -1327,10 +1388,10 @@
if (DBG) Slog.d(TAG, "MESSAGE_DISABLE: mBluetooth = " + mBluetooth);
mHandler.removeMessages(MESSAGE_RESTART_BLUETOOTH_SERVICE);
if (mEnable && mBluetooth != null) {
- waitForOnOff(true, false);
+ waitForMonitoredOnOff(true, false);
mEnable = false;
handleDisable();
- waitForOnOff(false, false);
+ waitForMonitoredOnOff(false, false);
} else {
mEnable = false;
handleDisable();
@@ -1447,9 +1508,9 @@
}
if (!mEnable) {
- waitForOnOff(true, false);
+ waitForMonitoredOnOff(true, false);
handleDisable();
- waitForOnOff(false, false);
+ waitForMonitoredOnOff(false, false);
}
break;
}
@@ -1471,8 +1532,13 @@
recoverBluetoothServiceFromError(false);
}
if ((prevState == BluetoothAdapter.STATE_TURNING_ON) &&
- (newState == BluetoothAdapter.STATE_BLE_ON) &&
+ (newState == BluetoothAdapter.STATE_OFF) &&
(mBluetooth != null) && mEnable) {
+ persistBluetoothSetting(BLUETOOTH_OFF);
+ }
+ if ((prevState == BluetoothAdapter.STATE_TURNING_ON) &&
+ (newState == BluetoothAdapter.STATE_BLE_ON) &&
+ (mBluetooth != null) && mEnable) {
recoverBluetoothServiceFromError(true);
}
// If we tried to enable BT while BT was in the process of shutting down,
@@ -1482,7 +1548,7 @@
(newState == BluetoothAdapter.STATE_OFF)) {
if (mEnable) {
Slog.d(TAG, "Entering STATE_OFF but mEnabled is true; restarting.");
- waitForOnOff(false, true);
+ waitForMonitoredOnOff(false, true);
Message restartMsg = mHandler.obtainMessage(
MESSAGE_RESTART_BLUETOOTH_SERVICE);
mHandler.sendMessageDelayed(restartMsg, 2 * SERVICE_RESTART_TIME_MS);
@@ -1599,7 +1665,7 @@
mState = BluetoothAdapter.STATE_TURNING_ON;
}
- waitForOnOff(true, false);
+ waitForMonitoredOnOff(true, false);
if (mState == BluetoothAdapter.STATE_TURNING_ON) {
bluetoothStateChangeHandler(mState, BluetoothAdapter.STATE_ON);
@@ -1607,27 +1673,30 @@
unbindAllBluetoothProfileServices();
// disable
+ clearBleApps();
handleDisable();
// Pbap service need receive STATE_TURNING_OFF intent to close
bluetoothStateChangeHandler(BluetoothAdapter.STATE_ON,
BluetoothAdapter.STATE_TURNING_OFF);
- boolean didDisableTimeout = !waitForOnOff(false, true);
+ boolean didDisableTimeout = !waitForMonitoredOnOff(false, true);
bluetoothStateChangeHandler(BluetoothAdapter.STATE_TURNING_OFF,
BluetoothAdapter.STATE_OFF);
sendBluetoothServiceDownCallback();
- try {
- mBluetoothLock.writeLock().lock();
- if (mBluetooth != null) {
- mBluetooth = null;
- // Unbind
- mContext.unbindService(mConnection);
+ if(!didDisableTimeout) {
+ try {
+ mBluetoothLock.writeLock().lock();
+ if (mBluetooth != null) {
+ mBluetooth = null;
+ // Unbind
+ mContext.unbindService(mConnection);
+ }
+ mBluetoothGatt = null;
+ } finally {
+ mBluetoothLock.writeLock().unlock();
}
- mBluetoothGatt = null;
- } finally {
- mBluetoothLock.writeLock().unlock();
}
//
@@ -1637,6 +1706,7 @@
//
if (didDisableTimeout) {
SystemClock.sleep(3000);
+ mHandler.removeMessages(MESSAGE_BLUETOOTH_SERVICE_DISCONNECTED);
} else {
SystemClock.sleep(100);
}
@@ -1644,6 +1714,7 @@
mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE);
mState = BluetoothAdapter.STATE_OFF;
// enable
+ mEnable = true;
handleEnable(mQuietEnable);
} else if (mBinding || mBluetooth != null) {
Message userMsg = mHandler.obtainMessage(MESSAGE_USER_SWITCHED);
@@ -1772,81 +1843,100 @@
intent.putExtra(BluetoothAdapter.EXTRA_PREVIOUS_STATE, prevState);
intent.putExtra(BluetoothAdapter.EXTRA_STATE, newState);
intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
+ intent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND);
mContext.sendBroadcastAsUser(intent, UserHandle.ALL, BLUETOOTH_PERM);
}
private void bluetoothStateChangeHandler(int prevState, int newState) {
boolean isStandardBroadcast = true;
+ if (DBG) Slog.d(TAG, "bluetoothStateChangeHandler: " + prevState + " -> " + newState);
if (prevState == newState) { // No change. Nothing to do.
return;
}
- // Notify all proxy objects first of adapter state change
- if (newState == BluetoothAdapter.STATE_BLE_ON ||
- newState == BluetoothAdapter.STATE_OFF) {
- boolean intermediate_off = (prevState == BluetoothAdapter.STATE_TURNING_OFF
- && newState == BluetoothAdapter.STATE_BLE_ON);
+ if (prevState != newState) {
+ //Notify all proxy objects first of adapter state change
+ if (newState == BluetoothAdapter.STATE_BLE_ON ||
+ newState == BluetoothAdapter.STATE_OFF) {
+ boolean intermediate_off = (prevState == BluetoothAdapter.STATE_TURNING_OFF
+ && newState == BluetoothAdapter.STATE_BLE_ON);
- if (newState == BluetoothAdapter.STATE_OFF) {
- // If Bluetooth is off, send service down event to proxy objects, and unbind
- if (DBG) Slog.d(TAG, "Bluetooth is complete send Service Down");
- sendBluetoothServiceDownCallback();
- unbindAndFinish();
- sendBleStateChanged(prevState, newState);
- // Don't broadcast as it has already been broadcast before
- isStandardBroadcast = false;
+ if (newState == BluetoothAdapter.STATE_OFF) {
+ // If Bluetooth is off, send service down event to proxy objects, and unbind
+ if (DBG) Slog.d(TAG, "Bluetooth is complete turn off");
+ sendBluetoothServiceDownCallback();
+ unbindAndFinish();
+ sendBleStateChanged(prevState, newState);
+ // Don't broadcast as it has already been broadcast before
+ if(!mIntentPending)
+ isStandardBroadcast = false;
+ else
+ mIntentPending = false;
- } else if (!intermediate_off) {
- // connect to GattService
- if (DBG) Slog.d(TAG, "Bluetooth is in LE only mode");
- if (mBluetoothGatt != null) {
- if (DBG) Slog.d(TAG, "Calling BluetoothGattServiceUp");
- onBluetoothGattServiceUp();
- } else {
- if (DBG) Slog.d(TAG, "Binding Bluetooth GATT service");
- if (mContext.getPackageManager().hasSystemFeature(
- PackageManager.FEATURE_BLUETOOTH_LE)) {
- Intent i = new Intent(IBluetoothGatt.class.getName());
- doBind(i, mConnection, Context.BIND_AUTO_CREATE | Context.BIND_IMPORTANT, UserHandle.CURRENT);
+ } else if (!intermediate_off) {
+ // connect to GattService
+ if (DBG) Slog.d(TAG, "Bluetooth is in LE only mode");
+ if (mBluetoothGatt != null) {
+ if (DBG) Slog.d(TAG, "Calling BluetoothGattServiceUp");
+ onBluetoothGattServiceUp();
+ } else {
+ if (DBG) Slog.d(TAG, "Binding Bluetooth GATT service");
+ if (mContext.getPackageManager().hasSystemFeature(
+ PackageManager.FEATURE_BLUETOOTH_LE)) {
+ Intent i = new Intent(IBluetoothGatt.class.getName());
+ doBind(i, mConnection, Context.BIND_AUTO_CREATE | Context.BIND_IMPORTANT, UserHandle.CURRENT);
+ }
+ }
+ sendBleStateChanged(prevState, newState);
+ //Don't broadcase this as std intent
+ isStandardBroadcast = false;
+
+ } else if (intermediate_off){
+ if (DBG) Slog.d(TAG, "Intermediate off, back to LE only mode");
+ // For LE only mode, broadcast as is
+ sendBleStateChanged(prevState, newState);
+ sendBluetoothStateCallback(false); // BT is OFF for general users
+ // Broadcast as STATE_OFF
+ newState = BluetoothAdapter.STATE_OFF;
+ sendBrEdrDownCallback();
+ if(!isBleAppPresent()){
+ isStandardBroadcast = false;
+ mIntentPending = true;
+ } else {
+ mIntentPending = false;
+ isStandardBroadcast = true;
}
}
+ } else if (newState == BluetoothAdapter.STATE_ON) {
+ boolean isUp = (newState == BluetoothAdapter.STATE_ON);
+ sendBluetoothStateCallback(isUp);
sendBleStateChanged(prevState, newState);
- //Don't broadcase this as std intent
+
+ } else if (newState == BluetoothAdapter.STATE_BLE_TURNING_ON ||
+ newState == BluetoothAdapter.STATE_BLE_TURNING_OFF ) {
+ sendBleStateChanged(prevState, newState);
isStandardBroadcast = false;
- } else if (intermediate_off) {
- if (DBG) Slog.d(TAG, "Intermediate off, back to LE only mode");
- // For LE only mode, broadcast as is
+ } else if (newState == BluetoothAdapter.STATE_TURNING_ON ||
+ newState == BluetoothAdapter.STATE_TURNING_OFF) {
sendBleStateChanged(prevState, newState);
- sendBluetoothStateCallback(false); // BT is OFF for general users
- // Broadcast as STATE_OFF
- newState = BluetoothAdapter.STATE_OFF;
- sendBrEdrDownCallback();
}
- } else if (newState == BluetoothAdapter.STATE_ON) {
- boolean isUp = (newState == BluetoothAdapter.STATE_ON);
- sendBluetoothStateCallback(isUp);
- sendBleStateChanged(prevState, newState);
- } else if (newState == BluetoothAdapter.STATE_BLE_TURNING_ON ||
- newState == BluetoothAdapter.STATE_BLE_TURNING_OFF ) {
- sendBleStateChanged(prevState, newState);
- isStandardBroadcast = false;
-
- } else if (newState == BluetoothAdapter.STATE_TURNING_ON ||
- newState == BluetoothAdapter.STATE_TURNING_OFF) {
- sendBleStateChanged(prevState, newState);
- }
-
- if (isStandardBroadcast) {
- if (prevState == BluetoothAdapter.STATE_BLE_ON) {
- // Show prevState of BLE_ON as OFF to standard users
- prevState = BluetoothAdapter.STATE_OFF;
+ if (isStandardBroadcast) {
+ if (prevState == BluetoothAdapter.STATE_BLE_ON) {
+ // Show prevState of BLE_ON as OFF to standard users
+ prevState = BluetoothAdapter.STATE_OFF;
+ }
+ else if (prevState == BluetoothAdapter.STATE_BLE_TURNING_OFF) {
+ // show prevState to TURNING_OFF
+ prevState = BluetoothAdapter.STATE_TURNING_OFF;
+ }
+ Intent intent = new Intent(BluetoothAdapter.ACTION_STATE_CHANGED);
+ intent.putExtra(BluetoothAdapter.EXTRA_PREVIOUS_STATE, prevState);
+ intent.putExtra(BluetoothAdapter.EXTRA_STATE, newState);
+ intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
+ intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
+ mContext.sendBroadcastAsUser(intent, UserHandle.ALL, BLUETOOTH_PERM);
}
- Intent intent = new Intent(BluetoothAdapter.ACTION_STATE_CHANGED);
- intent.putExtra(BluetoothAdapter.EXTRA_PREVIOUS_STATE, prevState);
- intent.putExtra(BluetoothAdapter.EXTRA_STATE, newState);
- intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
- mContext.sendBroadcastAsUser(intent, UserHandle.ALL, BLUETOOTH_PERM);
}
}
@@ -1857,7 +1947,7 @@
*/
private boolean waitForOnOff(boolean on, boolean off) {
int i = 0;
- while (i < 10) {
+ while (i < 16) {
try {
mBluetoothLock.readLock().lock();
if (mBluetooth == null) break;
@@ -1875,13 +1965,59 @@
mBluetoothLock.readLock().unlock();
}
if (on || off) {
+ SystemClock.sleep(500);
+ } else {
+ SystemClock.sleep(30);
+ }
+ i++;
+ }
+ Slog.e(TAG,"waitForOnOff time out");
+ return false;
+ }
+
+ /**
+ * if on is true, wait for state become ON
+ * if off is true, wait for state become OFF
+ * if both on and off are false, wait for state not ON
+ */
+ private boolean waitForMonitoredOnOff(boolean on, boolean off) {
+ int i = 0;
+ while (i < 10) {
+ synchronized(mConnection) {
+ try {
+ if (mBluetooth == null) break;
+ if (on) {
+ if (mBluetooth.getState() == BluetoothAdapter.STATE_ON) return true;
+ if (mBluetooth.getState() == BluetoothAdapter.STATE_BLE_ON) {
+ bluetoothStateChangeHandler(BluetoothAdapter.STATE_BLE_TURNING_ON,
+ BluetoothAdapter.STATE_BLE_ON);
+ boolean ret = waitForOnOff(on, off);
+ return ret;
+ }
+ } else if (off) {
+ if (mBluetooth.getState() == BluetoothAdapter.STATE_OFF) return true;
+ if (mBluetooth.getState() == BluetoothAdapter.STATE_BLE_ON) {
+ bluetoothStateChangeHandler(BluetoothAdapter.STATE_TURNING_OFF,
+ BluetoothAdapter.STATE_BLE_ON);
+ boolean ret = waitForOnOff(on, off);
+ return ret;
+ }
+ } else {
+ if (mBluetooth.getState() != BluetoothAdapter.STATE_ON) return true;
+ }
+ } catch (RemoteException e) {
+ Slog.e(TAG, "getState()", e);
+ break;
+ }
+ }
+ if (on || off) {
SystemClock.sleep(300);
} else {
SystemClock.sleep(50);
}
i++;
}
- Slog.e(TAG,"waitForOnOff time out");
+ Slog.e(TAG,"waitForMonitoredOnOff time out");
return false;
}
@@ -1905,6 +2041,11 @@
}
}
+
+ public void setBrEdrEnableStatus(boolean status) {
+ mEnableBrEdr = status;
+ }
+
private void recoverBluetoothServiceFromError(boolean clearBle) {
Slog.e(TAG,"recoverBluetoothServiceFromError");
try {
@@ -1919,27 +2060,10 @@
mBluetoothLock.readLock().unlock();
}
- SystemClock.sleep(500);
-
- // disable
- handleDisable();
-
- waitForOnOff(false, true);
+ waitForMonitoredOnOff(false, true);
sendBluetoothServiceDownCallback();
- try {
- mBluetoothLock.writeLock().lock();
- if (mBluetooth != null) {
- mBluetooth = null;
- // Unbind
- mContext.unbindService(mConnection);
- }
- mBluetoothGatt = null;
- } finally {
- mBluetoothLock.writeLock().unlock();
- }
-
mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE);
mState = BluetoothAdapter.STATE_OFF;
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 2693272..4384ff8 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -78,6 +78,7 @@
import android.net.metrics.DefaultNetworkEvent;
import android.net.metrics.IpConnectivityLog;
import android.net.metrics.NetworkEvent;
+import android.net.wifi.WifiDevice;
import android.net.util.AvoidBadWifiTracker;
import android.os.Binder;
import android.os.Build;
@@ -102,6 +103,7 @@
import android.provider.Settings;
import android.security.Credentials;
import android.security.KeyStore;
+import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.ArraySet;
@@ -3001,6 +3003,14 @@
}
}
+ public List<WifiDevice> getTetherConnectedSta() {
+ if (isTetheringSupported()) {
+ return mTethering.getTetherConnectedSta();
+ } else {
+ return null;
+ }
+ }
+
// javadoc from interface
@Override
public int tether(String iface) {
diff --git a/services/core/java/com/android/server/DeviceIdleController.java b/services/core/java/com/android/server/DeviceIdleController.java
index 6041ae00..b169573 100644
--- a/services/core/java/com/android/server/DeviceIdleController.java
+++ b/services/core/java/com/android/server/DeviceIdleController.java
@@ -1199,6 +1199,18 @@
return isPowerSaveWhitelistAppInternal(name);
}
+ @Override public int getIdleStateDetailed() {
+ getContext().enforceCallingOrSelfPermission(android.Manifest.permission.DEVICE_POWER,
+ null);
+ return mState;
+ }
+
+ @Override public int getLightIdleStateDetailed() {
+ getContext().enforceCallingOrSelfPermission(android.Manifest.permission.DEVICE_POWER,
+ null);
+ return mLightState;
+ }
+
@Override public void addPowerSaveTempWhitelistApp(String packageName, long duration,
int userId, String reason) throws RemoteException {
addPowerSaveTempWhitelistAppChecked(packageName, duration, userId, reason);
diff --git a/services/core/java/com/android/server/GestureLauncherService.java b/services/core/java/com/android/server/GestureLauncherService.java
index 553cb07..fcd6a91 100644
--- a/services/core/java/com/android/server/GestureLauncherService.java
+++ b/services/core/java/com/android/server/GestureLauncherService.java
@@ -28,6 +28,7 @@
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
+import android.net.Uri;
import android.os.Handler;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
@@ -35,6 +36,7 @@
import android.os.SystemProperties;
import android.os.UserHandle;
import android.provider.Settings;
+import android.text.TextUtils;
import android.util.MutableBoolean;
import android.util.Slog;
import android.view.KeyEvent;
@@ -43,6 +45,8 @@
import com.android.internal.logging.MetricsProto.MetricsEvent;
import com.android.server.statusbar.StatusBarManagerInternal;
+import java.util.Arrays;
+
/**
* The service that listens for gestures detected in sensor firmware and starts the intent
* accordingly.
@@ -107,6 +111,20 @@
private boolean mCameraDoubleTapPowerEnabled;
private long mLastPowerDown;
+ /**
+ * Whether EmergencyCall on power button tap gesture is currently enabled;
+ */
+ private boolean mIsEmergencyOnPowerKeyTapEnabled;
+ private long[] mHits;
+ private long mDuration;
+ private String mEmergencyNumber;
+
+ /**
+ * Time in milliseconds in which interval power tap must be pressed to make
+ * an emergency call.
+ */
+ private static final long EMERGENCY_CALL_POWER_KEY_TAP_INTERVAL = 400;
+
public GestureLauncherService(Context context) {
super(context);
mContext = context;
@@ -130,7 +148,7 @@
"GestureLauncherService");
updateCameraRegistered();
updateCameraDoubleTapPowerEnabled();
-
+ updateEmergencyCallTapPowerEnabled();
mUserId = ActivityManager.getCurrentUser();
mContext.registerReceiver(mUserReceiver, new IntentFilter(Intent.ACTION_USER_SWITCHED));
registerContentObservers();
@@ -245,11 +263,33 @@
com.android.internal.R.bool.config_cameraDoubleTapPowerGestureEnabled);
}
+ public static boolean isEmergencyOnpowerButtonTapEnabled(Resources resources) {
+ return SystemProperties.getBoolean(
+ "persist.sys.ecall_pwr_key_press", false) ||
+ resources.getBoolean(
+ com.android.internal.R.bool.config_emergencyCallOnPowerkeyTapGestureEnabled);
+ }
+
/**
* Whether GestureLauncherService should be enabled according to system properties.
*/
public static boolean isGestureLauncherEnabled(Resources resources) {
- return isCameraLaunchEnabled(resources) || isCameraDoubleTapPowerEnabled(resources);
+ return isCameraLaunchEnabled(resources) || isCameraDoubleTapPowerEnabled(resources) ||
+ isEmergencyOnpowerButtonTapEnabled(resources);
+ }
+
+ private void updateEmergencyCallTapPowerEnabled() {
+ Resources resources = mContext.getResources();
+ mIsEmergencyOnPowerKeyTapEnabled =
+ isEmergencyOnpowerButtonTapEnabled(resources);
+ mEmergencyNumber = resources.getString(
+ com.android.internal.R.string.power_key_emergency_number);
+ int hits = resources.getInteger(
+ com.android.internal.R.integer.power_key_hits_emergency);
+ mDuration = hits * EMERGENCY_CALL_POWER_KEY_TAP_INTERVAL;
+ mHits = new long[hits];
+ Slog.d(TAG, "Gesture launcher mEmergencyNumber = " +
+ mEmergencyNumber + " hits = " + hits);
}
public boolean interceptPowerKeyDown(KeyEvent event, boolean interactive,
@@ -259,7 +299,19 @@
long doubleTapInterval;
synchronized (this) {
doubleTapInterval = event.getEventTime() - mLastPowerDown;
- if (mCameraDoubleTapPowerEnabled
+ if (mIsEmergencyOnPowerKeyTapEnabled) {
+ System.arraycopy(mHits, 1, mHits, 0, mHits.length-1);
+ mHits[mHits.length-1] = SystemClock.uptimeMillis();
+ for (int i = 0 ; i < mHits.length ; i++) {
+ Slog.i(TAG, "mHits[" + i + "] = " + mHits[i] + "ms");
+ }
+ if (mHits[0] >=
+ (SystemClock.uptimeMillis()-mDuration)) {
+ launched = true;
+ intercept = interactive;
+ Arrays.fill(mHits,0);
+ }
+ } else if (mCameraDoubleTapPowerEnabled
&& doubleTapInterval < CAMERA_POWER_DOUBLE_TAP_MAX_TIME_MS) {
launched = true;
intercept = interactive;
@@ -267,13 +319,23 @@
mLastPowerDown = event.getEventTime();
}
if (launched) {
- Slog.i(TAG, "Power button double tap gesture detected, launching camera. Interval="
- + doubleTapInterval + "ms");
- launched = handleCameraLaunchGesture(false /* useWakelock */,
- StatusBarManager.CAMERA_LAUNCH_SOURCE_POWER_DOUBLE_TAP);
- if (launched) {
- MetricsLogger.action(mContext, MetricsEvent.ACTION_DOUBLE_TAP_POWER_CAMERA_GESTURE,
- (int) doubleTapInterval);
+ if (mIsEmergencyOnPowerKeyTapEnabled &&
+ !TextUtils.isEmpty(mEmergencyNumber)) {
+ Slog.i(TAG, "Power button Triple tap gesture detected, launching Emergency Call");
+ Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
+ Uri.fromParts("tel", mEmergencyNumber, null));
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ getContext().startActivityAsUser(intent, UserHandle.CURRENT);
+ } else {
+ Slog.i(TAG, "Power button double tap gesture detected, launching camera. Interval="
+ + doubleTapInterval + "ms");
+ launched = handleCameraLaunchGesture(false /* useWakelock */,
+ StatusBarManager.CAMERA_LAUNCH_SOURCE_POWER_DOUBLE_TAP);
+ if (launched) {
+ MetricsLogger.action(mContext,
+ MetricsEvent.ACTION_DOUBLE_TAP_POWER_CAMERA_GESTURE,
+ (int) doubleTapInterval);
+ }
}
}
MetricsLogger.histogram(mContext, "power_double_tap_interval", (int) doubleTapInterval);
diff --git a/services/core/java/com/android/server/LocationManagerService.java b/services/core/java/com/android/server/LocationManagerService.java
index c9b59ade..6066156 100644
--- a/services/core/java/com/android/server/LocationManagerService.java
+++ b/services/core/java/com/android/server/LocationManagerService.java
@@ -156,6 +156,9 @@
private LocationFudger mLocationFudger;
private GeofenceManager mGeofenceManager;
private PackageManager mPackageManager;
+ private String mComboNlpPackageName;
+ private String mComboNlpReadyMarker;
+ private String mComboNlpScreenMarker;
private PowerManager mPowerManager;
private UserManager mUserManager;
private GeocoderProxy mGeocodeProvider;
@@ -591,6 +594,13 @@
Slog.d(TAG, "Unable to bind ActivityRecognitionProxy.");
}
+ mComboNlpPackageName = resources.getString(
+ com.android.internal.R.string.config_comboNetworkLocationProvider);
+ if (mComboNlpPackageName != null) {
+ mComboNlpReadyMarker = mComboNlpPackageName + ".nlp:ready";
+ mComboNlpScreenMarker = mComboNlpPackageName + ".nlp:screen";
+ }
+
String[] testProviderStrings = resources.getStringArray(
com.android.internal.R.array.config_testLocationProviders);
for (String testProviderString : testProviderStrings) {
@@ -1373,7 +1383,8 @@
final int N = records.size();
for (int i = 0; i < N; i++) {
UpdateRecord record = records.get(i);
- if (isCurrentProfile(UserHandle.getUserId(record.mReceiver.mUid))) {
+ if (record != null && record.mReceiver != null &&
+ isCurrentProfile(UserHandle.getUserId(record.mReceiver.mUid))) {
// Sends a notification message to the receiver
if (!record.mReceiver.callProviderEnabledLocked(provider, enabled)) {
if (deadReceivers == null) {
@@ -1412,7 +1423,8 @@
if (records != null) {
for (UpdateRecord record : records) {
- if (isCurrentProfile(UserHandle.getUserId(record.mReceiver.mUid))) {
+ if (record != null && record.mReceiver != null &&
+ isCurrentProfile(UserHandle.getUserId(record.mReceiver.mUid))) {
if (checkLocationAccess(
record.mReceiver.mPid,
record.mReceiver.mUid,
@@ -1436,7 +1448,8 @@
// under that threshold.
long thresholdInterval = (providerRequest.interval + 1000) * 3 / 2;
for (UpdateRecord record : records) {
- if (isCurrentProfile(UserHandle.getUserId(record.mReceiver.mUid))) {
+ if (record != null && record.mReceiver != null &&
+ isCurrentProfile(UserHandle.getUserId(record.mReceiver.mUid))) {
LocationRequest locationRequest = record.mRequest;
// Don't assign battery blame for update records whose
@@ -2381,6 +2394,71 @@
synchronized (mLock) {
return mMockProviders.containsKey(provider);
}
+
+ }
+
+ private Location screenLocationLocked(Location location, String provider) {
+ if (isMockProvider(LocationManager.NETWORK_PROVIDER)) {
+ return location;
+ }
+ LocationProviderProxy providerProxy =
+ (LocationProviderProxy)mProvidersByName.get(LocationManager.NETWORK_PROVIDER);
+ if (mComboNlpPackageName == null || providerProxy == null ||
+ false == provider.equals(LocationManager.NETWORK_PROVIDER) ||
+ isMockProvider(LocationManager.NETWORK_PROVIDER)) {
+ return location;
+ }
+
+ String connectedNlpPackage = providerProxy.getConnectedPackageName();
+ if (connectedNlpPackage == null || !connectedNlpPackage.equals(mComboNlpPackageName)) {
+ return location;
+ }
+
+ Bundle extras = location.getExtras();
+ boolean isBeingScreened = false;
+
+ if (extras == null || !extras.containsKey(mComboNlpReadyMarker)) {
+ // see if Combo Nlp is a passive listener
+ ArrayList<UpdateRecord> records =
+ mRecordsByProvider.get(LocationManager.PASSIVE_PROVIDER);
+ if (records != null) {
+ for (UpdateRecord r : records) {
+ if (r.mReceiver.mPackageName.equals(mComboNlpPackageName)) {
+ if (!isBeingScreened) {
+ isBeingScreened = true;
+ if (extras == null) {
+ location.setExtras(new Bundle());
+ extras = location.getExtras();
+ }
+ extras.putBoolean(mComboNlpScreenMarker, true);
+ }
+ // send location to Combo Nlp for screening
+ if (!r.mReceiver.callLocationChangedLocked(location)) {
+ Slog.w(TAG, "RemoteException calling onLocationChanged on "
+ + r.mReceiver);
+ } else {
+ if (D) {
+ Log.d(TAG, "Sending location for screening");
+ }
+ }
+ }
+ }
+ }
+ if (isBeingScreened) {
+ return null;
+ }
+ if (D) {
+ Log.d(TAG, "Not screening locations");
+ }
+ } else {
+ if (D) {
+ Log.d(TAG, "This location is marked as ready for broadcast");
+ }
+ // clear the ready marker
+ extras.remove(mComboNlpReadyMarker);
+ }
+
+ return location;
}
private void handleLocationChanged(Location location, boolean passive) {
@@ -2399,6 +2477,10 @@
synchronized (mLock) {
if (isAllowedByCurrentUserSettingsLocked(provider)) {
if (!passive) {
+ location = screenLocationLocked(location, provider);
+ if (location == null) {
+ return;
+ }
// notify passive provider of the new location
mPassiveProvider.updateLocation(myLocation);
}
diff --git a/services/core/java/com/android/server/LockSettingsService.java b/services/core/java/com/android/server/LockSettingsService.java
index fbcb62a..8db9604 100644
--- a/services/core/java/com/android/server/LockSettingsService.java
+++ b/services/core/java/com/android/server/LockSettingsService.java
@@ -118,6 +118,7 @@
private static final int PROFILE_KEY_IV_SIZE = 12;
private static final String SEPARATE_PROFILE_CHALLENGE_KEY = "lockscreen.profilechallenge";
private final Object mSeparateChallengeLock = new Object();
+ private static final String DEFAULT_PASSWORD = "default_password";
private final Context mContext;
private final Handler mHandler;
@@ -130,6 +131,7 @@
private IGateKeeperService mGateKeeperService;
private NotificationManager mNotificationManager;
private UserManager mUserManager;
+ private static String mSavePassword = DEFAULT_PASSWORD;
private final KeyStore mKeyStore = KeyStore.getInstance();
@@ -744,6 +746,45 @@
return mStorage.hasPattern(userId);
}
+ public void retainPassword(String password) {
+ if (LockPatternUtils.isDeviceEncryptionEnabled()) {
+ if (password != null)
+ mSavePassword = password;
+ else
+ mSavePassword = DEFAULT_PASSWORD;
+ }
+ }
+
+ public void sanitizePassword() {
+ if (LockPatternUtils.isDeviceEncryptionEnabled()) {
+ mSavePassword = DEFAULT_PASSWORD;
+ }
+ }
+
+ private boolean checkCryptKeeperPermissions() {
+ boolean permission_err = false;
+ try {
+ mContext.enforceCallingOrSelfPermission(
+ android.Manifest.permission.CRYPT_KEEPER,
+ "no permission to get the password");
+ } catch (SecurityException e) {
+ permission_err = true;
+ }
+ return permission_err;
+ }
+
+ public String getPassword() {
+ /** if calling process does't have crypt keeper or admin permissions,
+ * throw the exception.
+ */
+ if (checkCryptKeeperPermissions())
+ mContext.enforceCallingOrSelfPermission(
+ android.Manifest.permission.MANAGE_DEVICE_ADMINS,
+ "no crypt_keeper or admin permission to get the password");
+
+ return mSavePassword;
+ }
+
private void setKeystorePassword(String password, int userHandle) {
final KeyStore ks = KeyStore.getInstance();
ks.onUserPasswordChanged(userHandle, password);
@@ -1238,7 +1279,10 @@
@Override
public VerifyCredentialResponse checkPattern(String pattern, int userId,
ICheckCredentialProgressCallback progressCallback) throws RemoteException {
- return doVerifyPattern(pattern, false, 0, userId, progressCallback);
+ VerifyCredentialResponse response = doVerifyPattern(pattern, false, 0, userId, progressCallback);
+ if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK)
+ retainPassword(pattern);
+ return response;
}
@Override
@@ -1309,7 +1353,10 @@
@Override
public VerifyCredentialResponse checkPassword(String password, int userId,
ICheckCredentialProgressCallback progressCallback) throws RemoteException {
- return doVerifyPassword(password, false, 0, userId, progressCallback);
+ VerifyCredentialResponse response = doVerifyPassword(password, false, 0, userId, progressCallback);
+ if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK)
+ retainPassword(password);
+ return response;
}
@Override
diff --git a/services/core/java/com/android/server/MountService.java b/services/core/java/com/android/server/MountService.java
index 8430a0b..18fc532 100644
--- a/services/core/java/com/android/server/MountService.java
+++ b/services/core/java/com/android/server/MountService.java
@@ -103,6 +103,7 @@
import com.android.server.NativeDaemonConnector.Command;
import com.android.server.NativeDaemonConnector.SensitiveArg;
import com.android.server.pm.PackageManagerService;
+import com.android.internal.widget.ILockSettings;
import libcore.io.IoUtils;
import libcore.util.EmptyArray;
@@ -1259,7 +1260,10 @@
}
private void onVolumeCreatedLocked(VolumeInfo vol) {
- if (mPms.isOnlyCoreApps()) {
+ // power off alarm need the access to external storage for audio files.
+ // So in power off alarm mode, primary storage need to be mounted.
+ boolean isAlarmBoot = SystemProperties.getBoolean("ro.alarm_boot", false);
+ if (mPms.isOnlyCoreApps() && !isAlarmBoot) {
Slog.d(TAG, "System booted in core-only mode; ignoring volume " + vol.getId());
return;
}
@@ -2584,7 +2588,7 @@
}
}
- public int encryptStorage(int type, String password) {
+ private int encryptStorageExtended(int type, String password, boolean wipe) {
if (TextUtils.isEmpty(password) && type != StorageManager.CRYPT_TYPE_DEFAULT) {
throw new IllegalArgumentException("password cannot be empty");
}
@@ -2600,10 +2604,10 @@
try {
if (type == StorageManager.CRYPT_TYPE_DEFAULT) {
- mCryptConnector.execute("cryptfs", "enablecrypto", "inplace",
+ mCryptConnector.execute("cryptfs", "enablecrypto", wipe ? "wipe" : "inplace",
CRYPTO_TYPES[type]);
} else {
- mCryptConnector.execute("cryptfs", "enablecrypto", "inplace",
+ mCryptConnector.execute("cryptfs", "enablecrypto", wipe ? "wipe" : "inplace",
CRYPTO_TYPES[type], new SensitiveArg(password));
}
} catch (NativeDaemonConnectorException e) {
@@ -2614,6 +2618,22 @@
return 0;
}
+ /** Encrypt Storage given a password.
+ * @param type The password type.
+ * @param password The password to be used in encryption.
+ */
+ public int encryptStorage(int type, String password) {
+ return encryptStorageExtended(type, password, false);
+ }
+
+ /** Encrypt Storage given a password after wiping it.
+ * @param type The password type.
+ * @param password The password to be used in encryption.
+ */
+ public int encryptWipeStorage(int type, String password) {
+ return encryptStorageExtended(type, password, true);
+ }
+
/** Set the password for encrypting the master key.
* @param type One of the CRYPTO_TYPE_XXX consts defined in StorageManager.
* @param password The password to set.
@@ -2628,9 +2648,24 @@
Slog.i(TAG, "changing encryption password...");
}
+ ILockSettings lockSettings = ILockSettings.Stub.asInterface(
+ ServiceManager.getService("lock_settings"));
+ String currentPassword="default_password";
+ try {
+ currentPassword = lockSettings.getPassword();
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Couldn't get password" + e);
+ }
+
try {
NativeDaemonEvent event = mCryptConnector.execute("cryptfs", "changepw", CRYPTO_TYPES[type],
- new SensitiveArg(password));
+ new SensitiveArg(currentPassword), new SensitiveArg(password));
+ try {
+ lockSettings.sanitizePassword();
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Couldn't sanitize password" + e);
+ }
+
return Integer.parseInt(event.getMessage());
} catch (NativeDaemonConnectorException e) {
// Encryption failed
diff --git a/services/core/java/com/android/server/NativeDaemonConnector.java b/services/core/java/com/android/server/NativeDaemonConnector.java
index f5f7732..8b52e7c 100644
--- a/services/core/java/com/android/server/NativeDaemonConnector.java
+++ b/services/core/java/com/android/server/NativeDaemonConnector.java
@@ -131,12 +131,26 @@
public void run() {
mCallbackHandler = new Handler(mLooper, this);
+ long startTime = 0;
while (true) {
try {
listenToSocket();
} catch (Exception e) {
- loge("Error in NativeDaemonConnector: " + e);
- SystemClock.sleep(5000);
+ /*
+ * logcat only at 5 seconds interval.
+ */
+ long currentTime = SystemClock.uptimeMillis();
+ long elapsedTime = currentTime - startTime;
+
+ if (elapsedTime >= 5000 && startTime > 0) {
+ loge("Error in NativeDaemonConnector: " + e);
+ startTime = 0;
+ }
+
+ if (startTime == 0)
+ startTime = currentTime;
+
+ SystemClock.sleep(100);
}
}
}
@@ -267,7 +281,6 @@
}
}
} catch (IOException ex) {
- loge("Communications error: " + ex);
throw ex;
} finally {
synchronized (mDaemonLock) {
diff --git a/services/core/java/com/android/server/NetPluginDelegate.java b/services/core/java/com/android/server/NetPluginDelegate.java
new file mode 100644
index 0000000..0e327478
--- /dev/null
+++ b/services/core/java/com/android/server/NetPluginDelegate.java
@@ -0,0 +1,187 @@
+/*
+ *Copyright (c) 2015-2016, 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.
+ */
+
+package com.android.server;
+
+import dalvik.system.PathClassLoader;
+
+import java.io.File;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+
+import android.net.Network;
+import android.net.NetworkStats;
+import android.os.Environment;
+import android.util.Slog;
+import android.util.Log;
+
+public class NetPluginDelegate {
+
+ private static final String TAG = "ConnectivityExtension";
+ private static final boolean LOGV = false;
+
+ private static Class tetherExtensionClass = null;
+ private static Object tetherExtensionObj = null;
+
+ public static void getTetherStats(NetworkStats uidStats, NetworkStats devStats,
+ NetworkStats xtStats) {
+ if (LOGV) Slog.v(TAG, "getTetherStats() E");
+ if(!loadTetherExtJar()) return;
+ try {
+ tetherExtensionClass.getMethod("getTetherStats", NetworkStats.class,
+ NetworkStats.class, NetworkStats.class).invoke(tetherExtensionObj, uidStats,
+ devStats, xtStats);
+ } catch (InvocationTargetException | SecurityException | NoSuchMethodException e) {
+ e.printStackTrace();
+ Log.w(TAG, "Failed to invoke getTetherStats()");
+ } catch (Exception e) {
+ e.printStackTrace();
+ Log.w(TAG, "Error calling getTetherStats Method on extension jar");
+ }
+ if (LOGV) Slog.v(TAG, "getTetherStats() X");
+ }
+
+ public static NetworkStats peekTetherStats() {
+ if (LOGV) Slog.v(TAG, "peekTetherStats() E");
+ NetworkStats ret_val = null;
+ if(!loadTetherExtJar()) return ret_val;
+ try {
+ ret_val = (NetworkStats) tetherExtensionClass.getMethod("peekTetherStats")
+ .invoke(tetherExtensionObj);
+ } catch (InvocationTargetException | SecurityException | NoSuchMethodException e) {
+ e.printStackTrace();
+ Log.w(TAG, "Failed to invoke peekTetherStats()");
+ } catch (Exception e) {
+ e.printStackTrace();
+ Log.w(TAG, "Error calling peekTetherStats Method on extension jar");
+ }
+ if (LOGV) Slog.v(TAG, "peekTetherStats() X");
+ return ret_val;
+ }
+
+ public static void natStarted(String intIface, String extIface) {
+ if (LOGV) Slog.v(TAG, "natStarted() E");
+ if(!loadTetherExtJar()) return;
+ try {
+ tetherExtensionClass.getMethod("natStarted", String.class, String.class).invoke(
+ tetherExtensionObj, intIface, extIface);
+ } catch (InvocationTargetException | SecurityException | NoSuchMethodException e) {
+ e.printStackTrace();
+ Log.w(TAG, "Failed to invoke natStarted()");
+ } catch (Exception e) {
+ e.printStackTrace();
+ Log.w(TAG, "Error calling natStarted Method on extension jar");
+ }
+ if (LOGV) Slog.v(TAG, "natStarted() X");
+ }
+
+ public static void natStopped(String intIface, String extIface) {
+ if (LOGV) Slog.v(TAG, "natStopped() E");
+ if(!loadTetherExtJar()) return;
+ try {
+ tetherExtensionClass.getMethod("natStopped", String.class, String.class).invoke(
+ tetherExtensionObj, intIface, extIface);
+ } catch (InvocationTargetException | SecurityException | NoSuchMethodException e) {
+ e.printStackTrace();
+ Log.w(TAG, "Failed to invoke natStopped()");
+ } catch (Exception e) {
+ e.printStackTrace();
+ Log.w(TAG, "Error calling natStopped Method on extension jar");
+ }
+ if (LOGV) Slog.v(TAG, "natStopped() X");
+ }
+
+ public static void setQuota(String iface, long quota) {
+ if (LOGV) Slog.v(TAG, "setQuota(" + iface + ", " + quota + ") E");
+ if(!loadTetherExtJar()) return;
+ try {
+ tetherExtensionClass.getMethod("setQuota", String.class, long.class).invoke(
+ tetherExtensionObj, iface, quota);
+ } catch (InvocationTargetException | SecurityException | NoSuchMethodException e) {
+ e.printStackTrace();
+ Log.w(TAG, "Failed to invoke setQuota()");
+ } catch (Exception e) {
+ e.printStackTrace();
+ Log.w(TAG, "Error calling setQuota Method on extension jar");
+ }
+ if (LOGV) Slog.v(TAG, "setQuota(" + iface + ", " + quota + ") X");
+ }
+
+ public static void setUpstream(Network net) {
+ if (LOGV) Slog.v(TAG, "setUpstream(" + net + ") E");
+ if(!loadTetherExtJar()) return;
+ try {
+ tetherExtensionClass.getMethod("setUpstream", Network.class).invoke(
+ tetherExtensionObj, net);
+ } catch (InvocationTargetException | SecurityException | NoSuchMethodException e) {
+ e.printStackTrace();
+ Log.w(TAG, "Failed to invoke setUpstream()");
+ } catch (Exception e) {
+ e.printStackTrace();
+ Log.w(TAG, "Error calling setUpstream Method on extension jar");
+ }
+ if (LOGV) Slog.v(TAG, "setUpstream(" + net + ") X");
+ }
+
+
+ private static synchronized boolean loadTetherExtJar() {
+ final String realProvider = "com.qualcomm.qti.tetherstatsextension.TetherStatsReporting";
+ final String realProviderPath = Environment.getRootDirectory().getAbsolutePath()
+ + "/framework/ConnectivityExt.jar";
+ if (tetherExtensionClass != null && tetherExtensionObj != null) {
+ return true;
+ }
+ boolean pathExists = new File(realProviderPath).exists();
+ if (!pathExists) {
+ Log.w(TAG, "ConnectivityExt jar file not present");
+ return false;
+ }
+
+ if (tetherExtensionClass == null && tetherExtensionObj == null) {
+ if (LOGV) Slog.v(TAG, "loading ConnectivityExt jar");
+ try {
+ PathClassLoader classLoader = new PathClassLoader(realProviderPath,
+ ClassLoader.getSystemClassLoader());
+
+ tetherExtensionClass = classLoader.loadClass(realProvider);
+ tetherExtensionObj = tetherExtensionClass.newInstance();
+ if (LOGV) Slog.v(TAG, "ConnectivityExt jar loaded");
+ } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
+ e.printStackTrace();
+ Log.w(TAG, "Failed to find, instantiate or access ConnectivityExt jar ");
+ return false;
+ } catch (Exception e) {
+ e.printStackTrace();
+ Log.w(TAG, "unable to load ConnectivityExt jar");
+ return false;
+ }
+ }
+ return true;
+ }
+}
diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java
index 44031cf..e7bcc2c 100644
--- a/services/core/java/com/android/server/NetworkManagementService.java
+++ b/services/core/java/com/android/server/NetworkManagementService.java
@@ -47,8 +47,11 @@
import static com.android.server.NetworkManagementSocketTagger.PROP_QTAGUID_ENABLED;
import android.annotation.NonNull;
import android.app.ActivityManagerNative;
+import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
import android.net.ConnectivityManager;
import android.net.INetd;
import android.net.INetworkManagementEventObserver;
@@ -90,10 +93,12 @@
import com.android.internal.annotations.GuardedBy;
import com.android.internal.app.IBatteryStats;
import com.android.internal.net.NetworkStatsFactory;
+import com.android.internal.R;
import com.android.internal.util.HexDump;
import com.android.internal.util.Preconditions;
import com.android.server.NativeDaemonConnector.Command;
import com.android.server.NativeDaemonConnector.SensitiveArg;
+import com.android.server.NetPluginDelegate;
import com.android.server.net.LockdownVpnTracker;
import com.google.android.collect.Maps;
@@ -175,6 +180,7 @@
public static final int InterfaceDnsServerInfo = 615;
public static final int RouteChange = 616;
public static final int StrictCleartext = 617;
+ public static final int InterfaceMessage = 618;
}
/* Defaults for resolver parameters. */
@@ -348,6 +354,13 @@
} else {
prepareNativeDaemon();
}
+ //Registering the receiver for Zerobalance blocking/unblocking
+ if (mContext.getResources().getBoolean(R.bool.config_zero_balance_operator)) {
+ final IntentFilter restrictFilter = new IntentFilter();
+ restrictFilter.addAction("org.codeaurora.restrictData");
+ mContext.registerReceiver(mZeroBalanceReceiver, restrictFilter);
+ }
+ if (DBG) Slog.d(TAG, "ZeroBalance registering receiver");
}
private IBatteryStats getBatteryStats() {
@@ -573,6 +586,21 @@
}
/**
+ * Notify our observers of a change in the data activity state of the interface
+ */
+ private void notifyInterfaceMessage(String message) {
+ final int length = mObservers.beginBroadcast();
+ for (int i = 0; i < length; i++) {
+ try {
+ mObservers.getBroadcastItem(i).interfaceMessageRecevied(message);
+ } catch (RemoteException e) {
+ } catch (RuntimeException e) {
+ }
+ }
+ mObservers.finishBroadcast();
+ }
+
+ /**
* Prepare native daemon once connected, enabling modules and pushing any
* existing in-memory rules.
*/
@@ -836,6 +864,22 @@
}
throw new IllegalStateException(errorMessage);
// break;
+ case NetdResponseCode.InterfaceMessage:
+ /*
+ * An message arrived in network interface.
+ * Format: "NNN IfaceMessage <3>AP-STA-CONNECTED 00:08:22:64:9d:84
+ */
+ if (cooked.length < 3 || !cooked[2].equals("IfaceMessage")) {
+ throw new IllegalStateException(errorMessage);
+ }
+ Slog.d(TAG, "onEvent: "+ raw);
+ if(cooked[5] != null) {
+ notifyInterfaceMessage(cooked[4] + " " + cooked[5]);
+ } else {
+ notifyInterfaceMessage(cooked[4]);
+ }
+ return true;
+ // break;
case NetdResponseCode.InterfaceClassActivity:
/*
* An network interface class state changed (active/idle)
@@ -1245,6 +1289,26 @@
}
@Override
+ public void createSoftApInterface(String wlanIface) {
+ mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
+ try {
+ mConnector.execute("softap", "create", wlanIface);
+ } catch (NativeDaemonConnectorException e) {
+ throw e.rethrowAsParcelableException();
+ }
+ }
+
+ @Override
+ public void deleteSoftApInterface(String wlanIface) {
+ mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
+ try {
+ mConnector.execute("softap", "remove", wlanIface);
+ } catch (NativeDaemonConnectorException e) {
+ throw e.rethrowAsParcelableException();
+ }
+ }
+
+ @Override
public void startTethering(String[] dhcpRange) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
// cmd is "tether start first_start first_stop second_start second_stop ..."
@@ -1422,6 +1486,7 @@
} catch (SocketException e) {
throw new IllegalStateException(e);
}
+ NetPluginDelegate.natStarted(internalInterface,externalInterface);
}
@Override
@@ -1432,6 +1497,7 @@
} catch (SocketException e) {
throw new IllegalStateException(e);
}
+ NetPluginDelegate.natStopped(internalInterface,externalInterface);
}
@Override
@@ -1501,15 +1567,34 @@
if (wifiConfig == null) {
args = new Object[] {"set", wlanIface};
} else {
- args = new Object[] {"set", wlanIface, wifiConfig.SSID,
- "broadcast", Integer.toString(wifiConfig.apChannel),
- getSecurityType(wifiConfig), new SensitiveArg(wifiConfig.preSharedKey)};
+ String ssid_mode = "broadcast";
+ if (mContext.getResources().getBoolean(
+ com.android.internal.R.bool
+ .config_regional_hotspot_show_broadcast_ssid_checkbox)
+ && wifiConfig.hiddenSSID) {
+ ssid_mode = "hidden";
+ }
+ if (mContext.getResources().getBoolean(
+ com.android.internal.R.bool
+ .config_regional_hotspot_show_maximum_connection_enable)) {
+ int clientNum = Settings.System.getInt(mContext.getContentResolver(),
+ "WIFI_HOTSPOT_MAX_CLIENT_NUM", 8);
+ if (DBG) Slog.d(TAG, "clientNum: " + clientNum);
+ args = new Object[] {"set", wlanIface, wifiConfig.SSID,
+ ssid_mode, Integer.toString(wifiConfig.apChannel),
+ getSecurityType(wifiConfig),
+ new SensitiveArg(wifiConfig.preSharedKey), clientNum};
+ } else {
+ args = new Object[] {"set", wlanIface, wifiConfig.SSID,
+ ssid_mode, Integer.toString(wifiConfig.apChannel),
+ getSecurityType(wifiConfig), new SensitiveArg(wifiConfig.preSharedKey)};
+ }
}
executeOrLogWithMessage(SOFT_AP_COMMAND, args, NetdResponseCode.SoftapStatusResult,
SOFT_AP_COMMAND_SUCCESS, logMsg);
logMsg = "startAccessPoint Error starting softap";
- args = new Object[] {"startap"};
+ args = new Object[] {"startap", wlanIface};
executeOrLogWithMessage(SOFT_AP_COMMAND, args, NetdResponseCode.SoftapStatusResult,
SOFT_AP_COMMAND_SUCCESS, logMsg);
} catch (NativeDaemonConnectorException e) {
@@ -1517,6 +1602,16 @@
}
}
+ @Override
+ public void startWigigAccessPoint() {
+ mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
+ try {
+ mConnector.execute("softap", "qccmd", "set", "enable_wigig_softap=1");
+ } catch (NativeDaemonConnectorException e) {
+ throw e.rethrowAsParcelableException();
+ }
+ }
+
private static String getSecurityType(WifiConfiguration wifiConfig) {
switch (wifiConfig.getAuthType()) {
case KeyMgmt.WPA_PSK:
@@ -1564,6 +1659,16 @@
}
@Override
+ public void stopWigigAccessPoint() {
+ mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
+ try {
+ mConnector.execute("softap", "qccmd", "set", "enable_wigig_softap=0");
+ } catch (NativeDaemonConnectorException e) {
+ throw e.rethrowAsParcelableException();
+ }
+ }
+
+ @Override
public void setAccessPoint(WifiConfiguration wifiConfig, String wlanIface) {
mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
Object[] args;
@@ -2778,6 +2883,31 @@
modifyInterfaceInNetwork("remove", "local", iface);
}
+ private BroadcastReceiver mZeroBalanceReceiver = new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ boolean isBlockAllData = false;
+ if(intent != null
+ && intent.getAction().equals("org.codeaurora.restrictData")) {
+ isBlockAllData = intent.getBooleanExtra("Restrict",false);
+ Log.wtf("ZeroBalance", "Intent value to block unblock data"+isBlockAllData);
+ }
+ mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);
+
+ // silently discard when control disabled
+ // TODO: eventually migrate to be always enabled
+ if (!mBandwidthControlEnabled) return;
+ try {
+ Log.wtf("ZeroBalance", "before calling connector Intent"
+ +"value to block unblock data"+isBlockAllData);
+ mConnector.execute("bandwidth",
+ isBlockAllData ? "blockAllData" : "unblockAllData");
+ } catch (NativeDaemonConnectorException e) {
+ throw e.rethrowAsParcelableException();
+ }
+ }
+ };
+
@Override
public int removeRoutesFromLocalNetwork(List<RouteInfo> routes) {
int failures = 0;
diff --git a/services/core/java/com/android/server/PermissionDialog.java b/services/core/java/com/android/server/PermissionDialog.java
new file mode 100644
index 0000000..b40cec3
--- /dev/null
+++ b/services/core/java/com/android/server/PermissionDialog.java
@@ -0,0 +1,140 @@
+/*
+ * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+ *
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server;
+
+import android.app.AppOpsManager;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.res.Resources;
+import android.os.Handler;
+import android.os.Message;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.CheckBox;
+import android.widget.TextView;
+
+public class PermissionDialog extends BasePermissionDialog {
+ private final static String TAG = "PermissionDialog";
+
+ private final AppOpsService mService;
+ private final String mPackageName;
+ private final int mCode;
+ private View mView;
+ private CheckBox mChoice;
+ private int mUid;
+ final CharSequence[] mOpLabels;
+ private Context mContext;
+
+ // Event 'what' codes
+ static final int ACTION_ALLOWED = 0x2;
+ static final int ACTION_IGNORED = 0x4;
+ static final int ACTION_IGNORED_TIMEOUT = 0x8;
+
+ // 15s timeout, then we automatically dismiss the permission
+ // dialog. Otherwise, it may cause watchdog timeout sometimes.
+ static final long DISMISS_TIMEOUT = 1000 * 15 * 1;
+
+ public PermissionDialog(Context context, AppOpsService service,
+ int code, int uid, String packageName) {
+ super(context);
+
+ mContext = context;
+ Resources res = context.getResources();
+
+ mService = service;
+ mCode = code;
+ mPackageName = packageName;
+ mUid = uid;
+ mOpLabels = res.getTextArray(
+ com.android.internal.R.array.app_ops_labels);
+
+ setCancelable(false);
+
+ setButton(DialogInterface.BUTTON_POSITIVE,
+ res.getString(com.android.internal.R.string.allow), mHandler.obtainMessage(ACTION_ALLOWED));
+
+ setButton(DialogInterface.BUTTON_NEGATIVE,
+ res.getString(com.android.internal.R.string.deny), mHandler.obtainMessage(ACTION_IGNORED));
+
+ setTitle(res.getString(com.android.internal.R.string.permission));
+ WindowManager.LayoutParams attrs = getWindow().getAttributes();
+ attrs.setTitle("Permission info: " + getAppName(mPackageName));
+ attrs.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SYSTEM_ERROR
+ | WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
+ getWindow().setAttributes(attrs);
+
+ mView = getLayoutInflater().inflate(
+ com.android.internal.R.layout.permission_confirmation_dialog,
+ null);
+ TextView tv = (TextView) mView.findViewById(
+ com.android.internal.R.id.permission_text);
+ mChoice = (CheckBox) mView.findViewById(
+ com.android.internal.R.id.permission_remember_choice_checkbox);
+ String name = getAppName(mPackageName);
+ if(name == null)
+ name = mPackageName;
+ tv.setText(name + ": " + mOpLabels[mCode]);
+ setView(mView);
+
+ // After the timeout, pretend the user clicked the quit button
+ mHandler.sendMessageDelayed(
+ mHandler.obtainMessage(ACTION_IGNORED_TIMEOUT), DISMISS_TIMEOUT);
+ }
+
+ private String getAppName(String packageName) {
+ ApplicationInfo appInfo = null;
+ PackageManager pm = mContext.getPackageManager();
+ try {
+ appInfo = pm.getApplicationInfo(packageName,
+ PackageManager.GET_DISABLED_COMPONENTS
+ | PackageManager.GET_UNINSTALLED_PACKAGES);
+ } catch (final NameNotFoundException e) {
+ return null;
+ }
+ if(appInfo != null) {
+ return (String)pm.getApplicationLabel(appInfo);
+ }
+ return null;
+ }
+
+ private final Handler mHandler = new Handler() {
+ public void handleMessage(Message msg) {
+ int mode;
+ boolean remember = mChoice.isChecked();
+ switch(msg.what) {
+ case ACTION_ALLOWED:
+ mode = AppOpsManager.MODE_ALLOWED;
+ break;
+ case ACTION_IGNORED:
+ mode = AppOpsManager.MODE_IGNORED;
+ break;
+ default:
+ mode = AppOpsManager.MODE_IGNORED;
+ remember = false;
+ }
+ mService.notifyOperation(mCode, mUid, mPackageName, mode,
+ remember);
+ dismiss();
+ }
+ };
+}
diff --git a/services/core/java/com/android/server/PermissionDialogReqQueue.java b/services/core/java/com/android/server/PermissionDialogReqQueue.java
new file mode 100644
index 0000000..ee94427
--- /dev/null
+++ b/services/core/java/com/android/server/PermissionDialogReqQueue.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+ *
+ * Copyright (C) 2006 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class PermissionDialogReqQueue {
+ public PermissionDialog getDialog() {
+ return mDialog;
+ }
+
+ public void setDialog(PermissionDialog mDialog) {
+ this.mDialog = mDialog;
+ }
+
+ public final static class PermissionDialogReq {
+ public void set(int res) {
+ synchronized (this) {
+ mHasResult = true;
+ mResult = res;
+ notifyAll();
+ }
+ }
+
+ public int get() {
+ synchronized (this) {
+ while (!mHasResult) {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+ return mResult;
+ }
+
+ boolean mHasResult = false;
+ int mResult;
+ }
+
+ private PermissionDialog mDialog;
+ private List<PermissionDialogReq> resultList;
+
+ public PermissionDialogReqQueue() {
+ mDialog = null;
+ resultList = new ArrayList<PermissionDialogReq>();
+ }
+
+ public void register(PermissionDialogReq res) {
+ synchronized (this) {
+ resultList.add(res);
+ }
+ }
+
+ public void notifyAll(int mode) {
+ synchronized (this) {
+ while (resultList.size() != 0) {
+ PermissionDialogReq res = resultList.get(0);
+ res.set(mode);
+ resultList.remove(0);
+ }
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/QCNsrmAlarmExtension.java b/services/core/java/com/android/server/QCNsrmAlarmExtension.java
new file mode 100644
index 0000000..a042f72
--- /dev/null
+++ b/services/core/java/com/android/server/QCNsrmAlarmExtension.java
@@ -0,0 +1,120 @@
+/*
+ *Copyright (c) 2016, 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.
+ */
+
+package com.android.server;
+
+import android.os.Binder;
+import android.os.PowerManager;
+import android.os.Process;
+import android.util.Slog;
+
+import java.util.ArrayList;
+import java.util.Timer;
+import java.util.TimerTask;
+
+public final class QCNsrmAlarmExtension {
+ static final String TAG = "QCNsrmAlarmExtn";
+ static final boolean localLOGV = false;
+ private AlarmManagerService almHandle;
+
+ //track the blocked and triggered uids in AlarmManagerService
+ private static final ArrayList<Integer> mTriggeredUids = new ArrayList<Integer>();
+ private static final ArrayList<Integer> mBlockedUids = new ArrayList<Integer>();
+ private static final int BLOCKED_UID_CHECK_INTERVAL = 1000; // 1 sec.
+
+ public QCNsrmAlarmExtension(AlarmManagerService handle) {
+ almHandle = handle;
+ }
+
+ //AlarmManagerService extension Methods
+ protected void processBlockedUids(int uid, boolean isBlocked, PowerManager.WakeLock mWakeLock ){
+ if (localLOGV) Slog.v(TAG, "UpdateBlockedUids: uid = " + uid +
+ " isBlocked = " + isBlocked);
+ if (Binder.getCallingUid() != Process.SYSTEM_UID) {
+ if (localLOGV) Slog.v(TAG, "UpdateBlockedUids is not allowed");
+ return;
+ }
+
+ if(isBlocked) {
+ if (localLOGV) Slog.v(TAG, "updating alarmMgr mBlockedUids "+
+ "with uid " + uid);
+ mBlockedUids.add(new Integer(uid));
+ Timer checkBlockedUidTimer = new Timer();
+ checkBlockedUidTimer.schedule( new CheckBlockedUidTimerTask(
+ uid,
+ mWakeLock),
+ BLOCKED_UID_CHECK_INTERVAL);
+ } else {
+ if (localLOGV) Slog.v(TAG, "clearing alarmMgr mBlockedUids ");
+ mBlockedUids.clear();
+ }
+ }
+
+ protected void addTriggeredUid (int uid){
+ if (localLOGV) Slog.v(TAG, "adding uid to mTriggeredUids uid=" + uid);
+ mTriggeredUids.add(new Integer(uid));
+
+ }
+
+ protected void removeTriggeredUid (int uid) {
+ if (localLOGV) Slog.v(TAG, "removing uid from mTriggeredUids uid= " + uid);
+ mTriggeredUids.remove(new Integer(uid));
+ }
+
+ protected boolean hasBlockedUid (int uid) {
+
+ return mBlockedUids.contains(uid);
+
+ }
+
+ class CheckBlockedUidTimerTask extends TimerTask {
+ private int mUid;
+ PowerManager.WakeLock mWakeLock;
+
+ CheckBlockedUidTimerTask(int uid, PowerManager.WakeLock lWakeLock) {
+ mUid = uid;
+ mWakeLock = lWakeLock;
+ }
+
+ @Override
+ public void run(){
+ if (mBlockedUids.contains(mUid) && mTriggeredUids.contains(mUid)) {
+ synchronized(almHandle.mLock) {
+ if (mWakeLock.isHeld()) {
+ mWakeLock.release();
+ if (localLOGV)
+ Slog.v(TAG, "CheckBlockedUidTimerTask: AM "+
+ "WakeLock Released Internally!!");
+ }
+ }
+ return;
+ }
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/ServiceWatcher.java b/services/core/java/com/android/server/ServiceWatcher.java
index 2ff036b..9141db2 100644
--- a/services/core/java/com/android/server/ServiceWatcher.java
+++ b/services/core/java/com/android/server/ServiceWatcher.java
@@ -92,8 +92,7 @@
String pkg = initialPackageNames.get(i);
try {
HashSet<Signature> set = new HashSet<Signature>();
- Signature[] sigs = pm.getPackageInfo(pkg, PackageManager.MATCH_SYSTEM_ONLY
- | PackageManager.GET_SIGNATURES).signatures;
+ Signature[] sigs = pm.getPackageInfo(pkg, PackageManager.GET_SIGNATURES).signatures;
set.addAll(Arrays.asList(sigs));
sigSets.add(set);
} catch (NameNotFoundException e) {
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index 9602bf6..35c32ca 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -158,7 +158,7 @@
private String[] mDataConnectionApn;
- private ArrayList<String> mConnectedApns;
+ private ArrayList<String>[] mConnectedApns;
private LinkProperties[] mDataConnectionLinkProperties;
@@ -290,11 +290,11 @@
mContext = context;
mBatteryStats = BatteryStatsService.getService();
- mConnectedApns = new ArrayList<String>();
int numPhones = TelephonyManager.getDefault().getPhoneCount();
if (DBG) log("TelephonyRegistor: ctor numPhones=" + numPhones);
mNumPhones = numPhones;
+ mConnectedApns = new ArrayList[numPhones];
mCallState = new int[numPhones];
mDataActivity = new int[numPhones];
mDataConnectionState = new int[numPhones];
@@ -312,6 +312,7 @@
mDataConnectionNetworkCapabilities = new NetworkCapabilities[numPhones];
mCellInfo = new ArrayList<List<CellInfo>>();
for (int i = 0; i < numPhones; i++) {
+ mConnectedApns[i] = new ArrayList<String>();
mCallState[i] = TelephonyManager.CALL_STATE_IDLE;
mDataActivity[i] = TelephonyManager.DATA_ACTIVITY_NONE;
mDataConnectionState[i] = TelephonyManager.DATA_UNKNOWN;
@@ -334,7 +335,6 @@
location.fillInNotifierBundle(mCellLocation[i]);
}
}
- mConnectedApns = new ArrayList<String>();
mAppOps = mContext.getSystemService(AppOpsManager.class);
}
@@ -985,7 +985,8 @@
if (validatePhoneId(phoneId)) {
mDataActivity[phoneId] = state;
for (Record r : mRecords) {
- if (r.matchPhoneStateListenerEvent(PhoneStateListener.LISTEN_DATA_ACTIVITY)) {
+ if (r.matchPhoneStateListenerEvent(PhoneStateListener.LISTEN_DATA_ACTIVITY)
+ && idMatch(r.subId, subId, phoneId)) {
try {
r.callback.onDataActivity(state);
} catch (RemoteException ex) {
@@ -1023,18 +1024,22 @@
synchronized (mRecords) {
int phoneId = SubscriptionManager.getPhoneId(subId);
if (validatePhoneId(phoneId)) {
+ if (VDBG) {
+ log(" mConnectedApns[" + phoneId + "]=" + mConnectedApns[phoneId].toString());
+ }
boolean modified = false;
if (state == TelephonyManager.DATA_CONNECTED) {
- if (!mConnectedApns.contains(apnType)) {
- mConnectedApns.add(apnType);
+ if (!mConnectedApns[phoneId].contains(apnType)
+ && !apnType.equals(PhoneConstants.APN_TYPE_IMS)) {
+ mConnectedApns[phoneId].add(apnType);
if (mDataConnectionState[phoneId] != state) {
mDataConnectionState[phoneId] = state;
modified = true;
}
}
} else {
- if (mConnectedApns.remove(apnType)) {
- if (mConnectedApns.isEmpty()) {
+ if (mConnectedApns[phoneId].remove(apnType)) {
+ if (mConnectedApns[phoneId].isEmpty()) {
mDataConnectionState[phoneId] = state;
modified = true;
} else {
diff --git a/services/core/java/com/android/server/Watchdog.java b/services/core/java/com/android/server/Watchdog.java
index be021ea..6e4cf48 100644
--- a/services/core/java/com/android/server/Watchdog.java
+++ b/services/core/java/com/android/server/Watchdog.java
@@ -42,6 +42,8 @@
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Date;
+import java.text.SimpleDateFormat;
/** This class calls its monitor every minute. Killing this process if they don't return **/
public class Watchdog extends Thread {
@@ -87,6 +89,7 @@
int mPhonePid;
IActivityController mController;
boolean mAllowRestart = true;
+ SimpleDateFormat mTraceDateFormat = new SimpleDateFormat("dd_MMM_HH_mm_ss.SSS");
/**
* Used for checking status of handle threads and scheduling monitor callbacks.
@@ -435,9 +438,22 @@
dumpKernelStackTraces();
}
- // Trigger the kernel to dump all blocked threads, and backtraces on all CPUs to the kernel log
- doSysRq('w');
- doSysRq('l');
+ String tracesPath = SystemProperties.get("dalvik.vm.stack-trace-file", null);
+ String traceFileNameAmendment = "_SystemServer_WDT" + mTraceDateFormat.format(new Date());
+
+ if (tracesPath != null && tracesPath.length() != 0) {
+ File traceRenameFile = new File(tracesPath);
+ String newTracesPath;
+ int lpos = tracesPath.lastIndexOf (".");
+ if (-1 != lpos)
+ newTracesPath = tracesPath.substring (0, lpos) + traceFileNameAmendment + tracesPath.substring (lpos);
+ else
+ newTracesPath = tracesPath + traceFileNameAmendment;
+ traceRenameFile.renameTo(new File(newTracesPath));
+ tracesPath = newTracesPath;
+ }
+
+ final File newFd = new File(tracesPath);
// Try to add the error to the dropbox, but assuming that the ActivityManager
// itself may be deadlocked. (which has happened, causing this statement to
@@ -446,7 +462,7 @@
public void run() {
mActivity.addErrorToDropBox(
"watchdog", null, "system_server", null, null,
- subject, null, stack, null);
+ subject, null, newFd, null);
}
};
dropboxThread.start();
@@ -454,6 +470,26 @@
dropboxThread.join(2000); // wait up to 2 seconds for it to return.
} catch (InterruptedException ignored) {}
+
+ // At times, when user space watchdog traces don't give an indication on
+ // which component held a lock, because of which other threads are blocked,
+ // (thereby causing Watchdog), crash the device to analyze RAM dumps
+ boolean crashOnWatchdog = SystemProperties
+ .getBoolean("persist.sys.crashOnWatchdog", false);
+ if (crashOnWatchdog) {
+ // Trigger the kernel to dump all blocked threads, and backtraces
+ // on all CPUs to the kernel log
+ Slog.e(TAG, "Triggering SysRq for system_server watchdog");
+ doSysRq('w');
+ doSysRq('l');
+
+ // wait until the above blocked threads be dumped into kernel log
+ SystemClock.sleep(3000);
+
+ // now try to crash the target
+ doSysRq('c');
+ }
+
IActivityController controller;
synchronized (this) {
controller = mController;
diff --git a/services/core/java/com/android/server/accounts/AccountManagerService.java b/services/core/java/com/android/server/accounts/AccountManagerService.java
index a085b71..126955a 100644
--- a/services/core/java/com/android/server/accounts/AccountManagerService.java
+++ b/services/core/java/com/android/server/accounts/AccountManagerService.java
@@ -83,6 +83,7 @@
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
+import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
import android.os.storage.StorageManager;
@@ -551,6 +552,16 @@
+ " userLocked=" + mLocalUnlockedUsers.get(accounts.userId));
}
+ // When OnUserUnlocked or onServiceChanged, this function will be
+ // called. It is not necessary to validate accounts during alarm boot as
+ // only power off alarm apps are installed. The applications with
+ // sync accounts may not be installed during alarm boot. If the applications
+ // are not installed, the AccountAuthenticators of these applications
+ // will not exist. Then the accounts of the applications will be removed.
+ if (SystemProperties.getBoolean("ro.alarm_boot", false)) {
+ return;
+ }
+
if (invalidateAuthenticatorCache) {
mAuthenticatorCache.invalidateCache(accounts.userId);
}
@@ -901,6 +912,7 @@
@Override
public String getPassword(Account account) {
+ android.util.SeempLog.record(14);
int callingUid = Binder.getCallingUid();
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "getPassword: " + account
@@ -995,6 +1007,7 @@
@Override
public String getUserData(Account account, String key) {
+ android.util.SeempLog.record(15);
final int callingUid = Binder.getCallingUid();
if (Log.isLoggable(TAG, Log.VERBOSE)) {
String msg = String.format("getUserData( account: %s, key: %s, callerUid: %s, pid: %s",
@@ -1612,6 +1625,7 @@
@Override
public void removeAccount(IAccountManagerResponse response, Account account,
boolean expectActivityLaunch) {
+ android.util.SeempLog.record(17);
removeAccountAsUser(
response,
account,
@@ -2062,6 +2076,7 @@
@Override
public void setPassword(Account account, String password) {
+ android.util.SeempLog.record(18);
final int callingUid = Binder.getCallingUid();
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "setAuthToken: " + account
@@ -2135,6 +2150,7 @@
@Override
public void clearPassword(Account account) {
+ android.util.SeempLog.record(19);
final int callingUid = Binder.getCallingUid();
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "clearPassword: " + account
@@ -2161,6 +2177,7 @@
@Override
public void setUserData(Account account, String key, String value) {
+ android.util.SeempLog.record(20);
final int callingUid = Binder.getCallingUid();
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "setUserData: " + account
@@ -2635,6 +2652,7 @@
public void addAccount(final IAccountManagerResponse response, final String accountType,
final String authTokenType, final String[] requiredFeatures,
final boolean expectActivityLaunch, final Bundle optionsIn) {
+ android.util.SeempLog.record(16);
Bundle.setDefusable(optionsIn, true);
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "addAccount: accountType " + accountType
@@ -3404,6 +3422,7 @@
@Override
public void editProperties(IAccountManagerResponse response, final String accountType,
final boolean expectActivityLaunch) {
+ android.util.SeempLog.record(21);
final int callingUid = Binder.getCallingUid();
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "editProperties: accountType " + accountType
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index 3f6a83f..60b8623 100755
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -125,6 +125,10 @@
// at the same time.
final int mMaxStartingBackground;
+ // Flag to reschedule the services during app launch. Disable by default.
+ private static final boolean SERVICE_RESCHEDULE
+ = SystemProperties.getBoolean("ro.am.reschedule_service", false);
+
final SparseArray<ServiceMap> mServiceMap = new SparseArray<>();
/**
@@ -1513,6 +1517,14 @@
r.pendingStarts.add(0, si);
long dur = SystemClock.uptimeMillis() - si.deliveredTime;
dur *= 2;
+ if (SERVICE_RESCHEDULE && DEBUG_DELAYED_SERVICE) {
+ Slog.w(TAG,"Can add more delay !!!"
+ +" si.deliveredTime "+si.deliveredTime
+ +" dur "+dur
+ +" si.deliveryCount "+si.deliveryCount
+ +" si.doneExecutingCount "+si.doneExecutingCount
+ +" allowCancel "+allowCancel);
+ }
if (minDuration < dur) minDuration = dur;
if (resetTime < dur) resetTime = dur;
} else {
@@ -1525,6 +1537,13 @@
}
r.totalRestartCount++;
+ if (SERVICE_RESCHEDULE && DEBUG_DELAYED_SERVICE) {
+ Slog.w(TAG,"r.name "+r.name+" N "+N+" minDuration "+minDuration
+ +" resetTime "+resetTime+" now "+now
+ +" r.restartDelay "+r.restartDelay
+ +" r.restartTime+resetTime "+(r.restartTime+resetTime)
+ +" allowCancel "+allowCancel);
+ }
if (r.restartDelay == 0) {
r.restartCount++;
r.restartDelay = minDuration;
@@ -1546,6 +1565,14 @@
}
r.nextRestartTime = now + r.restartDelay;
+ if (SERVICE_RESCHEDULE && DEBUG_DELAYED_SERVICE) {
+ Slog.w(TAG,"r.name "+r.name+" N "+N+" minDuration "+minDuration
+ +" resetTime "+resetTime+" now "+now
+ +" r.restartDelay "+r.restartDelay
+ +" r.restartTime+resetTime "+(r.restartTime+resetTime)
+ +" r.nextRestartTime "+r.nextRestartTime
+ +" allowCancel "+allowCancel);
+ }
// Make sure that we don't end up restarting a bunch of services
// all at the same time.
@@ -1588,6 +1615,15 @@
r.nextRestartTime = SystemClock.uptimeMillis() + r.restartDelay;
Slog.w(TAG, "Scheduling restart of crashed service "
+ r.shortName + " in " + r.restartDelay + "ms");
+
+ if (SERVICE_RESCHEDULE && DEBUG_DELAYED_SERVICE) {
+ for (int i=mRestartingServices.size()-1; i>=0; i--) {
+ ServiceRecord r2 = mRestartingServices.get(i);
+ Slog.w(TAG,"Restarting list - i "+i+" r2.nextRestartTime "
+ +r2.nextRestartTime+" r2.name "+r2.name);
+ }
+ }
+
EventLog.writeEvent(EventLogTags.AM_SCHEDULE_SERVICE_RESTART,
r.userId, r.shortName, r.restartDelay);
@@ -1608,7 +1644,31 @@
return;
}
try {
- bringUpServiceLocked(r, r.intent.getIntent().getFlags(), r.createdFromFg, true, false);
+ if(SERVICE_RESCHEDULE == true) {
+ boolean shouldDelay = false;
+ ActivityRecord top_rc = null;
+ ActivityStack stack = mAm.getFocusedStack();
+ if(stack != null) {
+ top_rc = stack.topRunningActivityLocked();
+ }
+ if(top_rc != null) {
+ if(!top_rc.nowVisible && !r.shortName.contains(top_rc.packageName)) {
+ shouldDelay = true;
+ }
+ }
+ if(!shouldDelay) {
+ bringUpServiceLocked(r, r.intent.getIntent().getFlags(), r.createdFromFg, true, false);
+ } else {
+ if (DEBUG_DELAYED_SERVICE) {
+ Slog.v(TAG, "Reschedule service restart due to app launch"
+ +" r.shortName "+r.shortName+" r.app = "+r.app);
+ }
+ r.resetRestartCounter();
+ scheduleServiceRestartLocked(r, true);
+ }
+ } else {
+ bringUpServiceLocked(r, r.intent.getIntent().getFlags(), r.createdFromFg, true, false);
+ }
} catch (TransactionTooLargeException e) {
// Ignore, it's been logged and nothing upstack cares.
}
@@ -1833,6 +1893,11 @@
if (newService) {
app.services.remove(r);
r.app = null;
+ if (SERVICE_RESCHEDULE && DEBUG_DELAYED_SERVICE) {
+ Slog.w(TAG, " Failed to create Service !!!! ."
+ +"This will introduce huge delay... "
+ +r.shortName + " in " + r.restartDelay + "ms");
+ }
}
// Retry.
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
old mode 100644
new mode 100755
index 91c4571..89eba60
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -29,6 +29,7 @@
import com.android.internal.app.ProcessMap;
import com.android.internal.app.SystemUserHomeActivity;
import com.android.internal.app.procstats.ProcessStats;
+import com.android.internal.app.ActivityTrigger;
import com.android.internal.os.BackgroundThread;
import com.android.internal.os.BatteryStatsImpl;
import com.android.internal.os.IResultReceiver;
@@ -150,6 +151,8 @@
import android.graphics.Point;
import android.graphics.Rect;
import android.location.LocationManager;
+import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
import android.net.Proxy;
import android.net.ProxyInfo;
import android.net.Uri;
@@ -215,6 +218,7 @@
import android.util.SparseArray;
import android.util.TimeUtils;
import android.util.Xml;
+import android.util.BoostFramework;
import android.view.Display;
import android.view.Gravity;
import android.view.LayoutInflater;
@@ -523,10 +527,17 @@
private static final int PERSISTENT_MASK =
ApplicationInfo.FLAG_SYSTEM|ApplicationInfo.FLAG_PERSISTENT;
+ // Start home process as an empty app
+ private boolean mHomeKilled = false;
+ private String mHomeProcessName = null;
+
// Intent sent when remote bugreport collection has been completed
private static final String INTENT_REMOTE_BUGREPORT_FINISHED =
"android.intent.action.REMOTE_BUGREPORT_FINISHED";
+ private static final String ACTION_POWER_OFF_ALARM =
+ "org.codeaurora.alarm.action.POWER_OFF_ALARM";
+
// Delay to disable app launch boost
static final int APP_BOOST_MESSAGE_DELAY = 3000;
// Lower delay than APP_BOOST_MESSAGE_DELAY to disable the boost
@@ -546,6 +557,30 @@
private boolean mIsBoosted = false;
private long mBoostStartTime = 0;
+ /* Freq Aggr boost objects */
+ public static BoostFramework sFreqAggr_init = null;
+ public static BoostFramework sFreqAggr = null;
+ public static boolean sIsFreqAggrBoostSet = false;
+ private boolean mIsFreqAggrEnabled = false;
+ private int lFreqAggr_TimeOut = 0;
+ private int lFreqAggr_Init_ParamVal[];
+ private int lFreqAggr_ParamVal[];
+
+ /* Launch boost v2 objects */
+ public static BoostFramework sPerfBoost_v2 = null;
+ public static boolean sIsLaunchBoostv2_set = false;
+ private boolean mIsLaunchBoostv2_enabled = false;
+ private int lBoost_v2_TimeOut = 0;
+ private int lBoost_v2_ParamVal[];
+
+ /*define misc. activty trigger function*/
+ static final int START_PROCESS = 1;
+ static final int NETWORK_OPTS = 2;
+ static final int ANIMATION_SCALE = 3;
+ int mActiveNetType = -1;
+ Object mNetLock = new Object();
+ ConnectivityManager mConnectivityManager;
+
/** All system services */
SystemServiceManager mSystemServiceManager;
@@ -1548,6 +1583,7 @@
static final int NOTIFY_ACTIVITY_DISMISSING_DOCKED_STACK_MSG = 68;
static final int SHOW_UNSUPPORTED_DISPLAY_SIZE_DIALOG_MSG = 69;
static final int NOTIFY_VR_SLEEPING_MSG = 70;
+ static final int NETWORK_OPTS_CHECK_MSG = 71;
static final int FIRST_ACTIVITY_STACK_MSG = 100;
static final int FIRST_BROADCAST_QUEUE_MSG = 200;
@@ -1556,11 +1592,25 @@
static ServiceThread sKillThread = null;
static KillHandler sKillHandler = null;
+ static final ActivityTrigger mActivityTrigger = new ActivityTrigger();
CompatModeDialog mCompatModeDialog;
UnsupportedDisplaySizeDialog mUnsupportedDisplaySizeDialog;
long mLastMemUsageReportTime = 0;
+ // Min aging threshold in milliseconds to consider a B-service
+ int mMinBServiceAgingTime =
+ SystemProperties.getInt("ro.sys.fw.bservice_age", 5000);
+ // Threshold for B-services when in memory pressure
+ int mBServiceAppThreshold =
+ SystemProperties.getInt("ro.sys.fw.bservice_limit", 5);
+ // Enable B-service aging propagation on memory pressure.
+ boolean mEnableBServicePropagation =
+ SystemProperties.getBoolean("ro.sys.fw.bservice_enable", false);
+
+ static final boolean mEnableNetOpts =
+ SystemProperties.getBoolean("persist.netopts.enable",false);
+
/**
* Flag whether the current user is a "monkey", i.e. whether
* the UI is driven by a UI automation tool.
@@ -2366,6 +2416,23 @@
} case NOTIFY_VR_SLEEPING_MSG: {
notifyVrManagerOfSleepState(msg.arg1 != 0);
} break;
+ case NETWORK_OPTS_CHECK_MSG: {
+ int flag = msg.arg1;
+ String packageName = (String)msg.obj;
+ if (flag == 0) {
+ if (mActivityTrigger != null) {
+ synchronized (mNetLock) {
+ if (mActiveNetType >= 0) {
+ mActivityTrigger.activityMiscTrigger(NETWORK_OPTS, packageName, mActiveNetType, 0);
+ return;
+ }
+ }
+ }
+ }
+ if (mActivityTrigger != null) {
+ mActivityTrigger.activityMiscTrigger(NETWORK_OPTS, packageName, ConnectivityManager.TYPE_NONE, 1);
+ }
+ } break;
}
}
};
@@ -2739,6 +2806,28 @@
Watchdog.getInstance().addMonitor(this);
Watchdog.getInstance().addThread(mHandler);
+
+ mIsFreqAggrEnabled = mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_enableFreqAggr);
+
+ if(mIsFreqAggrEnabled) {
+ lFreqAggr_TimeOut = mContext.getResources().getInteger(
+ com.android.internal.R.integer.freqaggr_timeout_param);
+ lFreqAggr_Init_ParamVal = mContext.getResources().getIntArray(
+ com.android.internal.R.array.freqaggr_init_param_value);
+ lFreqAggr_ParamVal = mContext.getResources().getIntArray(
+ com.android.internal.R.array.freqaggr_param_value);
+ }
+
+ mIsLaunchBoostv2_enabled = mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_enableLaunchBoostv2);
+
+ if(mIsLaunchBoostv2_enabled) {
+ lBoost_v2_TimeOut = mContext.getResources().getInteger(
+ com.android.internal.R.integer.lboostv2_timeout_param);
+ lBoost_v2_ParamVal = mContext.getResources().getIntArray(
+ com.android.internal.R.array.lboostv2_param_value);
+ }
}
public void setSystemServiceManager(SystemServiceManager mgr) {
@@ -2937,9 +3026,11 @@
@Override
public void batterySendBroadcast(Intent intent) {
- broadcastIntentLocked(null, null, intent, null, null, 0, null, null, null,
- AppOpsManager.OP_NONE, null, false, false,
- -1, Process.SYSTEM_UID, UserHandle.USER_ALL);
+ synchronized (this) {
+ broadcastIntentLocked(null, null, intent, null, null, 0, null, null, null,
+ AppOpsManager.OP_NONE, null, false, false,
+ -1, Process.SYSTEM_UID, UserHandle.USER_ALL);
+ }
}
/**
@@ -2970,6 +3061,11 @@
return mAppBindArgs;
}
+ private final void networkOptsCheck(int flag, String packageName) {
+ mHandler.sendMessage(
+ mHandler.obtainMessage(NETWORK_OPTS_CHECK_MSG, flag, 0, packageName));
+ }
+
boolean setFocusedActivityLocked(ActivityRecord r, String reason) {
if (r == null || mFocusedActivity == r) {
return false;
@@ -2989,6 +3085,10 @@
final ActivityRecord last = mFocusedActivity;
mFocusedActivity = r;
+ if (mEnableNetOpts) {
+ networkOptsCheck(0, r.processName);
+ }
+
if (r.task.isApplicationTask()) {
if (mCurAppTimeTracker != r.appTimeTracker) {
// We are switching app tracking. Complete the current one.
@@ -3850,6 +3950,45 @@
buf.append(hostingNameStr);
}
Slog.i(TAG, buf.toString());
+
+ if(hostingType.equals("activity")) {
+ BoostFramework perf = new BoostFramework();
+
+ if (perf != null) {
+ perf.perfIOPrefetchStart(startResult.pid,app.processName);
+ }
+
+ // Start Freq Aggregation boost
+ if (mIsFreqAggrEnabled == true && sFreqAggr_init == null
+ && sFreqAggr == null) {
+ sFreqAggr_init = new BoostFramework();
+ sFreqAggr = new BoostFramework();
+ }
+ if (sFreqAggr_init != null && sFreqAggr != null) {
+ sFreqAggr_init.perfLockAcquire(lFreqAggr_TimeOut, lFreqAggr_Init_ParamVal);
+ sIsFreqAggrBoostSet = true;
+ // Frequency Aggr perflock can only be passed one opcode-pair
+ if (lFreqAggr_ParamVal.length == 2) {
+ lFreqAggr_ParamVal[1] = startResult.pid;
+ sFreqAggr.perfLockAcquire(lFreqAggr_TimeOut, lFreqAggr_ParamVal);
+ } else {
+ //Opcodes improperly defined. Disable Perflock FA support.
+ sFreqAggr = null;
+ sFreqAggr_init.perfLockRelease();
+ sIsFreqAggrBoostSet = false;
+ }
+ }
+
+ // Start launch boost v2
+ if (mIsLaunchBoostv2_enabled == true && sPerfBoost_v2 == null) {
+ sPerfBoost_v2 = new BoostFramework();
+ }
+ if (sPerfBoost_v2 != null) {
+ sPerfBoost_v2.perfLockAcquire(lBoost_v2_TimeOut, lBoost_v2_ParamVal);
+ sIsLaunchBoostv2_set = true;
+ }
+ }
+
app.setPid(startResult.pid);
app.usingWrapper = startResult.usingWrapper;
app.removed = false;
@@ -3878,6 +4017,9 @@
}
}
checkTime(startTime, "startProcess: done updating pids map");
+ if ("activity".equals(hostingType) || "service".equals(hostingType)) {
+ mActivityTrigger.activityMiscTrigger(START_PROCESS, app.processName, startResult.pid, 0);
+ }
} catch (RuntimeException e) {
Slog.e(TAG, "Failure starting process " + app.processName, e);
@@ -5234,10 +5376,18 @@
app.thread.asBinder() == thread.asBinder()) {
boolean doLowMem = app.instrumentationClass == null;
boolean doOomAdj = doLowMem;
+ boolean homeRestart = false;
if (!app.killedByAm) {
+ if (mHomeProcessName != null && app.processName.equals(mHomeProcessName)) {
+ mHomeKilled = true;
+ homeRestart = true;
+ }
Slog.i(TAG, "Process " + app.processName + " (pid " + pid
+ ") has died");
mAllowLowerMemLevel = true;
+ if (mEnableNetOpts) {
+ networkOptsCheck(1, app.processName);
+ }
} else {
// Note that we always want to do oom adj to update our state with the
// new number of procs.
@@ -5255,6 +5405,13 @@
if (doLowMem) {
doLowMemReportIfNeededLocked(app);
}
+ if (mHomeKilled && homeRestart) {
+ Intent intent = getHomeIntent();
+ ActivityInfo aInfo = mStackSupervisor.resolveActivity(intent, null, 0, null, 0);
+ startProcessLocked(aInfo.processName, aInfo.applicationInfo, true, 0,
+ "activity", null, false, false, true);
+ homeRestart = false;
+ }
} else if (app.pid != pid) {
// A new process has already been started.
Slog.i(TAG, "Process " + app.processName + " (pid " + pid
@@ -6844,6 +7001,42 @@
}
}, dumpheapFilter);
+ if (mEnableNetOpts) {
+ IntentFilter netInfoFilter = new IntentFilter();
+ netInfoFilter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
+ mContext.registerReceiver(new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if (mConnectivityManager != null) {
+ NetworkInfo netInfo = mConnectivityManager.getActiveNetworkInfo();
+ synchronized(mNetLock) {
+ mActiveNetType = (netInfo != null) ? netInfo.getType() : -1;
+ }
+ }
+ ActivityStack stack = mStackSupervisor.getLastStack();
+ if (stack != null) {
+ ActivityRecord r = stack.topRunningActivityLocked();
+ if (r != null) {
+ PowerManager powerManager =
+ (PowerManager)mContext.getSystemService(Context.POWER_SERVICE);
+ if (powerManager != null && powerManager.isInteractive()) {
+ networkOptsCheck(0, r.processName);
+ }
+ }
+ }
+ }
+ }, netInfoFilter);
+ mConnectivityManager = (ConnectivityManager)mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
+ if (mConnectivityManager != null) {
+ NetworkInfo netInfo = mConnectivityManager.getActiveNetworkInfo();
+ if (netInfo != null) {
+ synchronized (mNetLock) {
+ mActiveNetType = netInfo.getType();
+ }
+ }
+ }
+ }
+
// Let system services know.
mSystemServiceManager.startBootPhase(SystemService.PHASE_BOOT_COMPLETED);
@@ -17093,6 +17286,7 @@
mProcessesOnHold.remove(app);
if (app == mHomeProcess) {
+ mHomeProcessName = mHomeProcess.processName;
mHomeProcess = null;
}
if (app == mPreviousProcess) {
@@ -19430,6 +19624,10 @@
app.adjType = "top-activity";
foregroundActivities = true;
procState = PROCESS_STATE_CUR_TOP;
+ if(app == mHomeProcess) {
+ mHomeKilled = false;
+ mHomeProcessName = mHomeProcess.processName;
+ }
} else if (app.instrumentationClass != null) {
// Don't want to kill running instrumentation.
adj = ProcessList.FOREGROUND_APP_ADJ;
@@ -19465,6 +19663,14 @@
app.cached = true;
app.empty = true;
app.adjType = "cch-empty";
+
+ if (mHomeKilled && app.processName.equals(mHomeProcessName)) {
+ adj = ProcessList.PERSISTENT_PROC_ADJ;
+ schedGroup = Process.THREAD_GROUP_DEFAULT;
+ app.cached = false;
+ app.empty = false;
+ app.adjType = "top-activity";
+ }
}
// Examine all activities if not already foreground.
@@ -20433,6 +20639,18 @@
boolean success = true;
if (app.curRawAdj != app.setRawAdj) {
+ String seempStr = "app_uid=" + app.uid
+ + ",app_pid=" + app.pid + ",oom_adj=" + app.curAdj
+ + ",setAdj=" + app.setAdj + ",hasShownUi=" + (app.hasShownUi ? 1 : 0)
+ + ",cached=" + (app.cached ? 1 : 0)
+ + ",fA=" + (app.foregroundActivities ? 1 : 0)
+ + ",fS=" + (app.foregroundServices ? 1 : 0)
+ + ",systemNoUi=" + (app.systemNoUi ? 1 : 0)
+ + ",curSchedGroup=" + app.curSchedGroup
+ + ",curProcState=" + app.curProcState + ",setProcState=" + app.setProcState
+ + ",killed=" + (app.killed ? 1 : 0) + ",killedByAm=" + (app.killedByAm ? 1 : 0)
+ + ",debugging=" + (app.debugging ? 1 : 0);
+ android.util.SeempLog.record_str(385, seempStr);
app.setRawAdj = app.curRawAdj;
}
@@ -20984,11 +21202,42 @@
int nextCachedAdj = curCachedAdj+1;
int curEmptyAdj = ProcessList.CACHED_APP_MIN_ADJ;
int nextEmptyAdj = curEmptyAdj+2;
+ ProcessRecord selectedAppRecord = null;
+ long serviceLastActivity = 0;
+ int numBServices = 0;
for (int i=N-1; i>=0; i--) {
ProcessRecord app = mLruProcesses.get(i);
if (app == null) {
continue;
}
+ if (mEnableBServicePropagation && app.serviceb
+ && (app.curAdj == ProcessList.SERVICE_B_ADJ)) {
+ numBServices++;
+ for (int s = app.services.size() - 1; s >= 0; s--) {
+ ServiceRecord sr = app.services.valueAt(s);
+ if (DEBUG_OOM_ADJ) Slog.d(TAG,"app.processName = " + app.processName
+ + " serviceb = " + app.serviceb + " s = " + s + " sr.lastActivity = "
+ + sr.lastActivity + " packageName = " + sr.packageName
+ + " processName = " + sr.processName);
+ if (SystemClock.uptimeMillis() - sr.lastActivity
+ < mMinBServiceAgingTime) {
+ if (DEBUG_OOM_ADJ) {
+ Slog.d(TAG,"Not aged enough!!!");
+ }
+ continue;
+ }
+ if (serviceLastActivity == 0) {
+ serviceLastActivity = sr.lastActivity;
+ selectedAppRecord = app;
+ } else if (sr.lastActivity < serviceLastActivity) {
+ serviceLastActivity = sr.lastActivity;
+ selectedAppRecord = app;
+ }
+ }
+ }
+ if (DEBUG_OOM_ADJ && selectedAppRecord != null) Slog.d(TAG,
+ "Identified app.processName = " + selectedAppRecord.processName
+ + " app.pid = " + selectedAppRecord.pid);
if (!app.killedByAm && app.thread != null) {
app.procStateChanged = false;
computeOomAdjLocked(app, ProcessList.UNKNOWN_ADJ, TOP_APP, true, now);
@@ -21097,6 +21346,14 @@
}
}
}
+ if ((numBServices > mBServiceAppThreshold) && (true == mAllowLowerMemLevel)
+ && (selectedAppRecord != null)) {
+ ProcessList.setOomAdj(selectedAppRecord.pid, selectedAppRecord.info.uid,
+ ProcessList.CACHED_APP_MAX_ADJ);
+ selectedAppRecord.setAdj = selectedAppRecord.curAdj;
+ if (DEBUG_OOM_ADJ) Slog.d(TAG,"app.processName = " + selectedAppRecord.processName
+ + " app.pid = " + selectedAppRecord.pid + " is moved to higher adj");
+ }
mNumServiceProcs = mNewNumServiceProcs;
@@ -21963,6 +22220,15 @@
synchronized (ActivityManagerService.this) {
SleepTokenImpl token = new SleepTokenImpl(tag);
mSleepTokens.add(token);
+ if (mEnableNetOpts) {
+ ActivityStack stack = mStackSupervisor.getLastStack();
+ if (stack != null) {
+ ActivityRecord r = stack.topRunningActivityLocked();
+ if (r != null) {
+ networkOptsCheck(1, r.processName);
+ }
+ }
+ }
updateSleepIfNeededLocked();
return token;
}
@@ -22129,6 +22395,15 @@
public void release() {
synchronized (ActivityManagerService.this) {
if (mSleepTokens.remove(this)) {
+ if (mEnableNetOpts) {
+ ActivityStack stack = mStackSupervisor.getLastStack();
+ if (stack != null) {
+ ActivityRecord r = stack.topRunningActivityLocked();
+ if (r != null) {
+ networkOptsCheck(0, r.processName);
+ }
+ }
+ }
updateSleepIfNeededLocked();
}
}
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index de858e39..1bb853d 100644
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -121,6 +121,8 @@
import android.util.Log;
import android.util.Slog;
import android.view.Display;
+import com.android.internal.app.ActivityTrigger;
+import android.util.BoostFramework;
import com.android.internal.app.IVoiceInteractor;
import com.android.internal.content.ReferrerIntent;
@@ -237,6 +239,10 @@
final WindowManagerService mWindowManager;
private final RecentTasks mRecentTasks;
+ public BoostFramework mPerf = null;
+ public boolean mIsAnimationBoostEnabled = false;
+ public int aBoostTimeOut = 0;
+ public int aBoostParamVal[];
/**
* The back history of all previous (and possibly still
* running) activities. It contains #TaskRecord objects.
@@ -356,6 +362,8 @@
final Handler mHandler;
+ static final ActivityTrigger mActivityTrigger = new ActivityTrigger();
+
final class ActivityStackHandler extends Handler {
ActivityStackHandler(Looper looper) {
@@ -449,6 +457,14 @@
mRecentTasks = recentTasks;
mTaskPositioner = mStackId == FREEFORM_WORKSPACE_STACK_ID
? new LaunchingTaskPositioner() : null;
+ mIsAnimationBoostEnabled = mService.mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_enablePerfBoostForAnimation);
+ if (mIsAnimationBoostEnabled) {
+ aBoostTimeOut = mService.mContext.getResources().getInteger(
+ com.android.internal.R.integer.animationboost_timeout_param);
+ aBoostParamVal = mService.mContext.getResources().getIntArray(
+ com.android.internal.R.array.animationboost_param_value);
+ }
}
void attachDisplay(ActivityStackSupervisor.ActivityDisplay activityDisplay, boolean onTop) {
@@ -1114,6 +1130,9 @@
if (DEBUG_STATES) Slog.v(TAG_STATES, "Moving to PAUSING: " + prev);
else if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Start pausing: " + prev);
+
+ mActivityTrigger.activityPauseTrigger(prev.intent, prev.info, prev.appInfo);
+
mResumedActivity = null;
mPausingActivity = prev;
mLastPausedActivity = prev;
@@ -2254,7 +2273,11 @@
if (DEBUG_SWITCH) Slog.v(TAG_SWITCH, "Resuming " + next);
- // If we are currently pausing an activity, then don't do anything until that is done.
+ mActivityTrigger.activityResumeTrigger(next.intent, next.info, next.appInfo,
+ next.task.mFullscreen);
+
+ // If we are currently pausing an activity, then don't do anything
+ // until that is done.
if (!mStackSupervisor.allPausedActivitiesComplete()) {
if (DEBUG_SWITCH || DEBUG_PAUSE || DEBUG_STATES) Slog.v(TAG_PAUSE,
"resumeTopActivityLocked: Skip resume: some activity pausing.");
@@ -2358,6 +2381,9 @@
// that the previous one will be hidden soon. This way it can know
// to ignore it when computing the desired screen orientation.
boolean anim = true;
+ if (mIsAnimationBoostEnabled == true && mPerf == null) {
+ mPerf = new BoostFramework();
+ }
if (prev != null) {
if (prev.finishing) {
if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION,
@@ -2369,6 +2395,9 @@
mWindowManager.prepareAppTransition(prev.task == next.task
? TRANSIT_ACTIVITY_CLOSE
: TRANSIT_TASK_CLOSE, false);
+ if(prev.task != next.task && mPerf != null) {
+ mPerf.perfLockAcquire(aBoostTimeOut, aBoostParamVal);
+ }
}
mWindowManager.setAppVisibility(prev.appToken, false);
} else {
@@ -2383,6 +2412,9 @@
: next.mLaunchTaskBehind
? TRANSIT_TASK_OPEN_BEHIND
: TRANSIT_TASK_OPEN, false);
+ if(prev.task != next.task && mPerf != null) {
+ mPerf.perfLockAcquire(aBoostTimeOut, aBoostParamVal);
+ }
}
}
} else {
@@ -2739,6 +2771,7 @@
task.setFrontOfTask();
r.putInHistory();
+ mActivityTrigger.activityStartTrigger(r.intent, r.info, r.appInfo, r.task.mFullscreen);
if (!isHomeStack() || numActivities() > 0) {
// We want to show the starting preview window if we are
// switching to a new task, or the next activity's process is
@@ -3278,11 +3311,15 @@
r.resumeKeyDispatchingLocked();
try {
r.stopped = false;
+
if (DEBUG_STATES) Slog.v(TAG_STATES,
"Moving to STOPPING: " + r + " (stop requested)");
r.state = ActivityState.STOPPING;
if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY,
"Stopping visible=" + r.visible + " for " + r);
+
+ mActivityTrigger.activityStopTrigger(r.intent, r.info, r.appInfo);
+
if (!r.visible) {
mWindowManager.setAppVisibility(r.appToken, false);
}
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index 636982f..1cb498b 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -84,6 +84,7 @@
import android.view.DisplayInfo;
import android.view.InputEvent;
import android.view.Surface;
+import android.util.BoostFramework;
import com.android.internal.content.ReferrerIntent;
import com.android.internal.os.TransferPipe;
@@ -205,6 +206,17 @@
static final int RESUME_TOP_ACTIVITY_MSG = FIRST_SUPERVISOR_STACK_MSG + 2;
static final int SLEEP_TIMEOUT_MSG = FIRST_SUPERVISOR_STACK_MSG + 3;
static final int LAUNCH_TIMEOUT_MSG = FIRST_SUPERVISOR_STACK_MSG + 4;
+
+ public BoostFramework mPerfBoost = null;
+ public BoostFramework mPerfPack = null;
+ public BoostFramework mPerfIop = null;
+ public boolean mIsPerfBoostEnabled = false;
+ public boolean mIsperfDisablepackingEnable = false;
+ public int lBoostTimeOut = 0;
+ public int lDisPackTimeOut = 0;
+ public int lBoostCpuParamVal[];
+ public int lBoostPackParamVal[];
+
static final int HANDLE_DISPLAY_ADDED = FIRST_SUPERVISOR_STACK_MSG + 5;
static final int HANDLE_DISPLAY_CHANGED = FIRST_SUPERVISOR_STACK_MSG + 6;
static final int HANDLE_DISPLAY_REMOVED = FIRST_SUPERVISOR_STACK_MSG + 7;
@@ -487,6 +499,25 @@
mHandler = new ActivityStackSupervisorHandler(mService.mHandler.getLooper());
mActivityMetricsLogger = new ActivityMetricsLogger(this, mService.mContext);
mResizeDockedStackTimeout = new ResizeDockedStackTimeout(service, this, mHandler);
+ /* Is perf lock for cpu-boost enabled during App 1st launch */
+ mIsPerfBoostEnabled = mService.mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_enableCpuBoostForAppLaunch);
+ mIsperfDisablepackingEnable = mService.mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_disablePacking);
+
+ if(mIsPerfBoostEnabled) {
+ lBoostTimeOut = mService.mContext.getResources().getInteger(
+ com.android.internal.R.integer.launchboost_timeout_param);
+ lBoostCpuParamVal = mService.mContext.getResources().getIntArray(
+ com.android.internal.R.array.launchboost_param_value);
+ }
+
+ if(mIsperfDisablepackingEnable) {
+ lDisPackTimeOut = mService.mContext.getResources().getInteger(
+ com.android.internal.R.integer.disablepacking_timeout_param);
+ lBoostPackParamVal = mService.mContext.getResources().getIntArray(
+ com.android.internal.R.array.launchboost_packing_param_value);
+ }
}
void setRecentTasks(RecentTasks recentTasks) {
@@ -1874,6 +1905,14 @@
void findTaskToMoveToFrontLocked(TaskRecord task, int flags, ActivityOptions options,
String reason, boolean forceNonResizeable) {
+
+ ActivityRecord top_activity;
+ top_activity = task.stack.topRunningActivityLocked();
+ /* App is launching from recent apps and it's a new process */
+ if(top_activity != null && top_activity.state == ActivityState.DESTROYED) {
+ acquireAppLaunchPerfLock(top_activity.packageName);
+ }
+
if ((flags & ActivityManager.MOVE_TASK_NO_USER_ACTION) == 0) {
mUserLeaving = true;
}
@@ -2688,6 +2727,31 @@
resumeFocusedStackTopActivityLocked();
}
+ void acquireAppLaunchPerfLock(String packageName) {
+ /* Acquire perf lock during new app launch */
+ if (mIsperfDisablepackingEnable == true && mPerfPack == null) {
+ mPerfPack = new BoostFramework();
+ }
+ if (mPerfPack != null) {
+ mPerfPack.perfLockAcquire(lDisPackTimeOut, lBoostPackParamVal);
+ }
+
+ if (mIsPerfBoostEnabled == true && mPerfBoost == null) {
+ mPerfBoost = new BoostFramework();
+ }
+ if (mPerfBoost != null) {
+ mPerfBoost.perfLockAcquire(lBoostTimeOut, lBoostCpuParamVal);
+ }
+
+ // Start IOP
+ if (mPerfIop == null) {
+ mPerfIop = new BoostFramework();
+ }
+ if (mPerfIop != null) {
+ mPerfIop.perfIOPrefetchStart(-1,packageName);
+ }
+ }
+
ActivityRecord findTaskLocked(ActivityRecord r) {
mTmpFindTaskResult.r = null;
mTmpFindTaskResult.matchedByRootAffinity = false;
@@ -2711,10 +2775,20 @@
// there is a better match in another stack. We eventually return the match based
// on root affinity if we don't find a better match.
if (mTmpFindTaskResult.r != null && !mTmpFindTaskResult.matchedByRootAffinity) {
+ if(mTmpFindTaskResult.r.state == ActivityState.DESTROYED ) {
+ /*It's a new app launch */
+ acquireAppLaunchPerfLock(r.packageName);
+ }
return mTmpFindTaskResult.r;
}
}
}
+
+ /* Acquire perf lock *only* during new app launch */
+ if (mTmpFindTaskResult.r == null || mTmpFindTaskResult.r.state == ActivityState.DESTROYED) {
+ acquireAppLaunchPerfLock(r.packageName);
+ }
+
if (DEBUG_TASKS && mTmpFindTaskResult.r == null) Slog.d(TAG_TASKS, "No task found");
return mTmpFindTaskResult.r;
}
diff --git a/services/core/java/com/android/server/am/AppErrors.java b/services/core/java/com/android/server/am/AppErrors.java
index 0c67c75..f4cf568 100644
--- a/services/core/java/com/android/server/am/AppErrors.java
+++ b/services/core/java/com/android/server/am/AppErrors.java
@@ -47,7 +47,8 @@
import android.util.Slog;
import android.util.SparseArray;
import android.util.TimeUtils;
-
+import java.util.Date;
+import java.text.SimpleDateFormat;
import java.io.File;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -72,7 +73,7 @@
private final ActivityManagerService mService;
private final Context mContext;
-
+ SimpleDateFormat mTraceDateFormat = new SimpleDateFormat("dd_MMM_HH_mm_ss.SSS");
private ArraySet<String> mAppsNotReportingCrashes;
/**
@@ -884,6 +885,24 @@
synchronized (mService) {
mService.mBatteryStatsService.noteProcessAnr(app.processName, app.uid);
+ boolean enableTraceRename = SystemProperties.getBoolean("persist.sys.enableTraceRename", false);
+ //Set the trace file name to app name + current date format to avoid overrinding trace file based on debug flag
+ if(enableTraceRename) {
+ String tracesPath = SystemProperties.get("dalvik.vm.stack-trace-file", null);
+ if (tracesPath != null && tracesPath.length() != 0) {
+ File traceRenameFile = new File(tracesPath);
+ String newTracesPath;
+ int lpos = tracesPath.lastIndexOf (".");
+ if (-1 != lpos)
+ newTracesPath = tracesPath.substring (0, lpos) + "_" + app.processName + "_" + mTraceDateFormat.format(new Date()) + tracesPath.substring (lpos);
+ else
+ newTracesPath = tracesPath + "_" + app.processName;
+
+ traceRenameFile.renameTo(new File(newTracesPath));
+ SystemClock.sleep(1000);
+ }
+ }
+
if (isSilentANR) {
app.kill("bg anr", true);
return;
@@ -895,6 +914,7 @@
annotation != null ? "ANR " + annotation : "ANR",
info.toString());
+
// Bring up the infamous App Not Responding dialog
Message msg = Message.obtain();
HashMap<String, Object> map = new HashMap<String, Object>();
diff --git a/services/core/java/com/android/server/am/ProcessList.java b/services/core/java/com/android/server/am/ProcessList.java
index 475b155..94d5b30 100644
--- a/services/core/java/com/android/server/am/ProcessList.java
+++ b/services/core/java/com/android/server/am/ProcessList.java
@@ -32,6 +32,7 @@
import android.content.res.Resources;
import android.graphics.Point;
import android.os.SystemProperties;
+import android.os.Process;
import android.net.LocalSocketAddress;
import android.net.LocalSocket;
import android.util.Slog;
@@ -147,7 +148,18 @@
// we have no limit on the number of service, visible, foreground, or other such
// processes and the number of those processes does not count against the cached
// process limit.
- static final int MAX_CACHED_APPS = 32;
+ static final int MAX_CACHED_APPS = SystemProperties.getInt("ro.sys.fw.bg_apps_limit",32);
+
+ static final boolean USE_TRIM_SETTINGS =
+ SystemProperties.getBoolean("ro.sys.fw.use_trim_settings",true);
+ static final int EMPTY_APP_PERCENT = SystemProperties.getInt("ro.sys.fw.empty_app_percent",50);
+ static final int TRIM_EMPTY_PERCENT =
+ SystemProperties.getInt("ro.sys.fw.trim_empty_percent",100);
+ static final int TRIM_CACHE_PERCENT =
+ SystemProperties.getInt("ro.sys.fw.trim_cache_percent",100);
+ static final long TRIM_ENABLE_MEMORY =
+ SystemProperties.getLong("ro.sys.fw.trim_enable_memory",1073741824);
+ public static boolean allowTrim() { return Process.getTotalMemory() < TRIM_ENABLE_MEMORY ; }
// We allow empty processes to stick around for at most 30 minutes.
static final long MAX_EMPTY_TIME = 30*60*1000;
@@ -157,11 +169,25 @@
// The number of empty apps at which we don't consider it necessary to do
// memory trimming.
- static final int TRIM_EMPTY_APPS = MAX_EMPTY_APPS/2;
+ public static int computeTrimEmptyApps() {
+ if (USE_TRIM_SETTINGS && allowTrim()) {
+ return MAX_EMPTY_APPS*TRIM_EMPTY_PERCENT/100;
+ } else {
+ return MAX_EMPTY_APPS/2;
+ }
+ }
+ static final int TRIM_EMPTY_APPS = computeTrimEmptyApps();
// The number of cached at which we don't consider it necessary to do
// memory trimming.
- static final int TRIM_CACHED_APPS = (MAX_CACHED_APPS-MAX_EMPTY_APPS)/3;
+ public static int computeTrimCachedApps() {
+ if (USE_TRIM_SETTINGS && allowTrim()) {
+ return MAX_CACHED_APPS*TRIM_CACHE_PERCENT/100;
+ } else {
+ return (MAX_CACHED_APPS-MAX_EMPTY_APPS)/3;
+ }
+ }
+ static final int TRIM_CACHED_APPS = computeTrimCachedApps();
// Threshold of number of cached+empty where we consider memory critical.
static final int TRIM_CRITICAL_THRESHOLD = 3;
@@ -322,7 +348,11 @@
}
public static int computeEmptyProcessLimit(int totalProcessLimit) {
- return totalProcessLimit/2;
+ if(USE_TRIM_SETTINGS && allowTrim()) {
+ return totalProcessLimit*EMPTY_APP_PERCENT/100;
+ } else {
+ return totalProcessLimit/2;
+ }
}
private static String buildOomTag(String prefix, String space, int val, int base) {
diff --git a/services/core/java/com/android/server/am/ProcessRecord.java b/services/core/java/com/android/server/am/ProcessRecord.java
index 3fffefb..c2cfcb6 100644
--- a/services/core/java/com/android/server/am/ProcessRecord.java
+++ b/services/core/java/com/android/server/am/ProcessRecord.java
@@ -466,6 +466,18 @@
}
public void makeActive(IApplicationThread _thread, ProcessStatsService tracker) {
+ String seempStr = "app_uid=" + uid
+ + ",app_pid=" + pid + ",oom_adj=" + curAdj
+ + ",setAdj=" + setAdj + ",hasShownUi=" + (hasShownUi ? 1 : 0)
+ + ",cached=" + (cached ? 1 : 0)
+ + ",fA=" + (foregroundActivities ? 1 : 0)
+ + ",fS=" + (foregroundServices ? 1 : 0)
+ + ",systemNoUi=" + (systemNoUi ? 1 : 0)
+ + ",curSchedGroup=" + curSchedGroup
+ + ",curProcState=" + curProcState + ",setProcState=" + setProcState
+ + ",killed=" + (killed ? 1 : 0) + ",killedByAm=" + (killedByAm ? 1 : 0)
+ + ",debugging=" + (debugging ? 1 : 0);
+ android.util.SeempLog.record_str(386, seempStr);
if (thread == null) {
final ProcessState origBase = baseProcessTracker;
if (origBase != null) {
@@ -492,6 +504,18 @@
}
public void makeInactive(ProcessStatsService tracker) {
+ String seempStr = "app_uid=" + uid
+ + ",app_pid=" + pid + ",oom_adj=" + curAdj
+ + ",setAdj=" + setAdj + ",hasShownUi=" + (hasShownUi ? 1 : 0)
+ + ",cached=" + (cached ? 1 : 0)
+ + ",fA=" + (foregroundActivities ? 1 : 0)
+ + ",fS=" + (foregroundServices ? 1 : 0)
+ + ",systemNoUi=" + (systemNoUi ? 1 : 0)
+ + ",curSchedGroup=" + curSchedGroup
+ + ",curProcState=" + curProcState + ",setProcState=" + setProcState
+ + ",killed=" + (killed ? 1 : 0) + ",killedByAm=" + (killedByAm ? 1 : 0)
+ + ",debugging=" + (debugging ? 1 : 0);
+ android.util.SeempLog.record_str(387, seempStr);
thread = null;
final ProcessState origBase = baseProcessTracker;
if (origBase != null) {
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index c70a87c..46fe34f 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -174,6 +174,27 @@
// the platform type affects volume and silent mode behavior
private final int mPlatformType;
+ private static final ArrayList<MediaPlayerInfo> mMediaPlayers =
+ new ArrayList<MediaPlayerInfo>();
+
+ private class MediaPlayerInfo {
+ private String mPackageName;
+ private boolean mIsfocussed;
+ public MediaPlayerInfo(String packageName, boolean isfocussed) {
+ mPackageName = packageName;
+ mIsfocussed = isfocussed;
+ }
+ public boolean isFocussed() {
+ return mIsfocussed;
+ }
+ public void setFocus(boolean focus) {
+ mIsfocussed = focus;
+ }
+ public String getPackageName() {
+ return mPackageName;
+ }
+ }
+
private boolean isPlatformVoice() {
return mPlatformType == AudioSystem.PLATFORM_VOICE;
}
@@ -431,6 +452,8 @@
private final ArrayMap<String, DeviceListSpec> mConnectedDevices = new ArrayMap<>();
+ private String mA2dpConnectedDevice = ""; //Used for BT a2dp connection
+
// Forced device usage for communications
private int mForcedUseForComm;
@@ -690,6 +713,7 @@
intentFilter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
intentFilter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
+ intentFilter.addAction(Intent.ACTION_SHUTDOWN);
// TODO merge orientation and rotation
mMonitorOrientation = SystemProperties.getBoolean("ro.audio.monitorOrientation", false);
if (mMonitorOrientation) {
@@ -891,6 +915,106 @@
}
}
+ /**
+ * @hide
+ */
+ public void addMediaPlayerAndUpdateRemoteController (String packageName) {
+ synchronized(mMediaPlayers) {
+ Log.v(TAG, "addMediaPlayerAndUpdateRemoteController: size of existing list: " +
+ mMediaPlayers.size());
+ boolean playerToAdd = true;
+ if (mMediaPlayers.size() > 0) {
+ final Iterator<MediaPlayerInfo> rccIterator = mMediaPlayers.iterator();
+ while (rccIterator.hasNext()) {
+ final MediaPlayerInfo player = rccIterator.next();
+ if (packageName.equals(player.getPackageName())) {
+ Log.e(TAG, "Player entry present, no need to add");
+ playerToAdd = false;
+ player.setFocus(true);
+ } else {
+ Log.e(TAG, "Player: " + player.getPackageName()+ "Lost Focus");
+ player.setFocus(false);
+ }
+ }
+ }
+ if (playerToAdd) {
+ Log.e(TAG, "Adding Player: " + packageName + " to available player list");
+ mMediaPlayers.add(new MediaPlayerInfo(packageName, true));
+ }
+ Intent intent = new Intent(AudioManager.RCC_CHANGED_ACTION);
+ intent.putExtra(AudioManager.EXTRA_CALLING_PACKAGE_NAME, packageName);
+ intent.putExtra(AudioManager.EXTRA_FOCUS_CHANGED_VALUE, true);
+ intent.putExtra(AudioManager.EXTRA_AVAILABLITY_CHANGED_VALUE, true);
+ sendBroadcastToAll(intent);
+ Log.v(TAG, "updating focussed RCC change to RCD: CallingPackageName:"
+ + packageName);
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public void updateRemoteControllerOnExistingMediaPlayers() {
+ synchronized(mMediaPlayers) {
+ Log.v(TAG, "updateRemoteControllerOnExistingMediaPlayers: size of Player list: " +
+ mMediaPlayers.size());
+ if (mMediaPlayers.size() > 0) {
+ Log.v(TAG, "Inform RemoteController regarding existing RCC entry");
+ final Iterator<MediaPlayerInfo> rccIterator = mMediaPlayers.iterator();
+ while (rccIterator.hasNext()) {
+ final MediaPlayerInfo player = rccIterator.next();
+ Intent intent = new Intent(AudioManager.RCC_CHANGED_ACTION);
+ intent.putExtra(AudioManager.EXTRA_CALLING_PACKAGE_NAME,
+ player.getPackageName());
+ intent.putExtra(AudioManager.EXTRA_FOCUS_CHANGED_VALUE,
+ player.isFocussed());
+ intent.putExtra(AudioManager.EXTRA_AVAILABLITY_CHANGED_VALUE, true);
+ sendBroadcastToAll(intent);
+ Log.v(TAG, "updating RCC change: CallingPackageName:" +
+ player.getPackageName());
+ }
+ } else {
+ Log.e(TAG, "No RCC entry present to update");
+ }
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public void removeMediaPlayerAndUpdateRemoteController (String packageName) {
+ synchronized(mMediaPlayers) {
+ Log.v(TAG, "removeMediaPlayerAndUpdateRemoteController: size of existing list: " +
+ mMediaPlayers.size());
+ boolean playerToRemove = false;
+ int index = -1;
+ if (mMediaPlayers.size() > 0) {
+ final Iterator<MediaPlayerInfo> rccIterator = mMediaPlayers.iterator();
+ while (rccIterator.hasNext()) {
+ index++;
+ final MediaPlayerInfo player = rccIterator.next();
+ if (packageName.equals(player.getPackageName())) {
+ Log.v(TAG, "Player entry present remove and update RemoteController");
+ playerToRemove = true;
+ break;
+ } else {
+ Log.v(TAG, "Player entry for " + player.getPackageName()+ " is not present");
+ }
+ }
+ }
+ if (playerToRemove) {
+ Log.e(TAG, "Removing Player: " + packageName + " from index" + index);
+ mMediaPlayers.remove(index);
+ }
+ Intent intent = new Intent(AudioManager.RCC_CHANGED_ACTION);
+ intent.putExtra(AudioManager.EXTRA_CALLING_PACKAGE_NAME, packageName);
+ intent.putExtra(AudioManager.EXTRA_FOCUS_CHANGED_VALUE, false);
+ intent.putExtra(AudioManager.EXTRA_AVAILABLITY_CHANGED_VALUE, false);
+ sendBroadcastToAll(intent);
+ Log.v(TAG, "Updated List size: " + mMediaPlayers.size());
+ }
+ }
+
private void checkAllAliasStreamVolumes() {
synchronized (VolumeStreamState.class) {
int numStreamTypes = AudioSystem.getNumStreamTypes();
@@ -2691,6 +2815,13 @@
public void setBluetoothScoOnInt(boolean on) {
if (on) {
mForcedUseForComm = AudioSystem.FORCE_BT_SCO;
+ synchronized(mScoClients) {
+ if ((mBluetoothHeadset != null) &&
+ (mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice)
+ != BluetoothHeadset.STATE_AUDIO_CONNECTED)) {
+ return;
+ }
+ }
} else if (mForcedUseForComm == AudioSystem.FORCE_BT_SCO) {
mForcedUseForComm = AudioSystem.FORCE_NONE;
}
@@ -3100,6 +3231,18 @@
boolean success =
handleDeviceConnection(connected, outDevice, address, btDeviceName) &&
handleDeviceConnection(connected, inDevice, address, btDeviceName);
+
+ /* When one BT headset is disconnected while there is SCO with another BT
+ * headset, ignore the BT headset disconncting/disconnected intents.
+ */
+ if ((state == BluetoothProfile.STATE_DISCONNECTED ||
+ state == BluetoothProfile.STATE_DISCONNECTING) &&
+ mBluetoothHeadset != null &&
+ mBluetoothHeadset.getAudioState(btDevice) == BluetoothHeadset.STATE_AUDIO_CONNECTED) {
+ Log.w(TAG, "SCO is there with another device, returning");
+ return;
+ }
+
if (success) {
synchronized (mScoClients) {
if (connected) {
@@ -3122,9 +3265,13 @@
synchronized (mConnectedDevices) {
synchronized (mA2dpAvrcpLock) {
mA2dp = (BluetoothA2dp) proxy;
+ //In Dual A2dp, we can have two devices connected
deviceList = mA2dp.getConnectedDevices();
- if (deviceList.size() > 0) {
- btDevice = deviceList.get(0);
+ Log.d(TAG, "onServiceConnected: A2dp Service connected: " +
+ deviceList.size());
+ for (int i = 0; i < deviceList.size(); i++) {
+ //Add the device in Connected list
+ btDevice = deviceList.get(i);
int state = mA2dp.getConnectionState(btDevice);
int delay = checkSendBecomingNoisyIntent(
AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
@@ -3804,10 +3951,68 @@
public int setBluetoothA2dpDeviceConnectionState(BluetoothDevice device, int state, int profile)
{
- int delay;
+ int delay = 0;
if (profile != BluetoothProfile.A2DP && profile != BluetoothProfile.A2DP_SINK) {
throw new IllegalArgumentException("invalid profile " + profile);
}
+ /*check if device is valid or not and state of the currnt device*/
+ if (device == null || state == BluetoothA2dp.STATE_CONNECTING) {
+ Log.d(TAG, "Device is invalid or still in connecting state");
+ return delay;
+ }
+ String key = makeDeviceListKey(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
+ device.getAddress());
+ DeviceListSpec deviceSpec = mConnectedDevices.get(key);
+ boolean isDeviceAdded = deviceSpec != null;
+ if (isDeviceAdded && (state == BluetoothA2dp.STATE_CONNECTED)) {
+ Log.d(TAG, "Device conn is updated again, ignore ");
+ return delay;
+ }
+ if (!isDeviceAdded && (state == BluetoothA2dp.STATE_CONNECTED)) {
+ /*add the device in the list*/
+ Log.d(TAG, "Add new connected device in the list: " + device);
+ boolean deviceexist = false;
+ synchronized (mConnectedDevices) {
+ for (int i = 0; i < mConnectedDevices.size(); i++) {
+ DeviceListSpec devSpec = mConnectedDevices.valueAt(i);
+ if (devSpec.mDeviceType == AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP) {
+ Log.d(TAG, "Second device connected, add new device to list");
+ mConnectedDevices.put(
+ makeDeviceListKey(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, device.getAddress()),
+ new DeviceListSpec(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, device.getName(),
+ device.getAddress()));
+ deviceexist = true;
+ }
+ }
+ }
+ if (deviceexist)
+ return delay;
+ } else if ((state == BluetoothA2dp.STATE_DISCONNECTED) ||
+ (state == BluetoothA2dp.STATE_DISCONNECTING)) {
+ Log.d(TAG, "Device is getting disconnected: " + device);
+ int BTdeviceList = 0;
+ synchronized (mConnectedDevices) {
+ for (int i = 0; i < mConnectedDevices.size(); i++) {
+ DeviceListSpec devSpec = mConnectedDevices.valueAt(i);
+ if (devSpec.mDeviceType == AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP) {
+ BTdeviceList++;
+ }
+ }
+ }
+ if (BTdeviceList > 1 && isDeviceAdded) {
+ Log.d(TAG, "Remove device from mConnectedDevices list ");
+ synchronized (mConnectedDevices) {
+ mConnectedDevices.remove(
+ makeDeviceListKey(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, device.getAddress()));
+ }
+ Log.d(TAG, "Not all are disconnected ");
+ return delay;
+ }else if (!isDeviceAdded) {
+ Log.d(TAG,"Disconnect state updated again, device already removed");
+ Log.d(TAG, "Not all are disconnected ");
+ return delay;
+ }
+ }
synchronized (mConnectedDevices) {
if (profile == BluetoothProfile.A2DP) {
delay = checkSendBecomingNoisyIntent(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
@@ -4875,18 +5080,34 @@
btDevice.getAddress());
DeviceListSpec deviceSpec = mConnectedDevices.get(key);
boolean isConnected = deviceSpec != null;
+ int BTdeviceList = 0;
+ for (int i = 0; i < mConnectedDevices.size(); i++) {
+ DeviceListSpec devSpec = mConnectedDevices.valueAt(i);
+ if (devSpec.mDeviceType == AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP) {
+ Log.w(TAG, "onSetA2dpSinkConnectionState Addr" + devSpec.mDeviceAddress);
+ BTdeviceList++;
+ }
+ }
+ Log.d(TAG, "onSetA2dpSinkConnectionState isConnected = "+isConnected+
+ "state="+state+"device:"+address);
if (isConnected && state != BluetoothProfile.STATE_CONNECTED) {
if (btDevice.isBluetoothDock()) {
if (state == BluetoothProfile.STATE_DISCONNECTED) {
// introduction of a delay for transient disconnections of docks when
// power is rapidly turned off/on, this message will be canceled if
// we reconnect the dock under a preset delay
- makeA2dpDeviceUnavailableLater(address, BTA2DP_DOCK_TIMEOUT_MILLIS);
+ makeA2dpDeviceUnavailableLater(btDevice.getAddress(), BTA2DP_DOCK_TIMEOUT_MILLIS);
// the next time isConnected is evaluated, it will be false for the dock
}
+ } else if (BTdeviceList > 1) {
+ Log.d(TAG,"onSetA2dpSinkConnectionState: Not all device are disconnected");
+ mConnectedDevices.remove(
+ makeDeviceListKey(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP, address));
+ return;
} else {
- makeA2dpDeviceUnavailableNow(address);
+ Log.d(TAG, "All devices are disconneted, update Policymanager ");
+ makeA2dpDeviceUnavailableNow(btDevice.getAddress());
}
synchronized (mCurAudioRoutes) {
if (mCurAudioRoutes.bluetoothName != null) {
@@ -4896,21 +5117,24 @@
}
}
} else if (!isConnected && state == BluetoothProfile.STATE_CONNECTED) {
+ //This function is not implemented
+ mA2dpConnectedDevice = "BluetoothA2dp"; // Add this String
if (btDevice.isBluetoothDock()) {
// this could be a reconnection after a transient disconnection
cancelA2dpDeviceTimeout();
- mDockAddress = address;
+ mDockAddress = mA2dpConnectedDevice;
} else {
// this could be a connection of another A2DP device before the timeout of
// a dock: cancel the dock timeout, and make the dock unavailable now
if(hasScheduledA2dpDockTimeout()) {
cancelA2dpDeviceTimeout();
- makeA2dpDeviceUnavailableNow(mDockAddress);
+ makeA2dpDeviceUnavailableNow(btDevice.getAddress());
}
}
- makeA2dpDeviceAvailable(address, btDevice.getName());
+ makeA2dpDeviceAvailable(btDevice.getAddress(), btDevice.getName());
+ //Updated the Router for a2dp device
synchronized (mCurAudioRoutes) {
- String name = btDevice.getAliasName();
+ String name = mA2dpConnectedDevice;
if (!TextUtils.equals(mCurAudioRoutes.bluetoothName, name)) {
mCurAudioRoutes.bluetoothName = name;
sendMsg(mAudioHandler, MSG_REPORT_NEW_ROUTES,
@@ -4927,6 +5151,7 @@
Log.d(TAG, "onSetA2dpSourceConnectionState btDevice="+btDevice+" state="+state);
}
if (btDevice == null) {
+ Log.d(TAG, "onSetA2dpSourceConnectionState device is null"); //gasati
return;
}
String address = btDevice.getAddress();
@@ -5012,6 +5237,7 @@
int delay = 0;
if ((state == 0) && ((device & mBecomingNoisyIntentDevices) != 0)) {
int devices = 0;
+ Log.d(TAG, "checkSendBecomingNoisyIntent update the noise");
for (int i = 0; i < mConnectedDevices.size(); i++) {
int dev = mConnectedDevices.valueAt(i).mDeviceType;
if (((dev & AudioSystem.DEVICE_BIT_IN) == 0)
@@ -5027,7 +5253,7 @@
0,
null,
0);
- delay = 1000;
+ delay = SystemProperties.getInt("audio.noisy.broadcast.delay", 700);
}
}
@@ -5261,7 +5487,7 @@
state = intent.getIntExtra(BluetoothProfile.EXTRA_STATE,
BluetoothProfile.STATE_DISCONNECTED);
BluetoothDevice btDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
-
+ Log.d(TAG, "Bt device " + btDevice.getAddress() + "disconnection intent received");
setBtScoDeviceConnectionState(btDevice, state);
} else if (action.equals(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED)) {
boolean broadcast = false;
@@ -5368,6 +5594,8 @@
state == BluetoothAdapter.STATE_TURNING_OFF) {
disconnectAllBluetoothProfiles();
}
+ } else if (action.equals(Intent.ACTION_SHUTDOWN)) {
+ AudioSystem.setParameters("dev_shutdown=true");
}
}
} // end class AudioServiceBroadcastReceiver
@@ -5447,7 +5675,6 @@
}
}
-
//==========================================================================================
// Audio Focus
//==========================================================================================
diff --git a/services/core/java/com/android/server/connectivity/Nat464Xlat.java b/services/core/java/com/android/server/connectivity/Nat464Xlat.java
index b390884..0dc9d35 100644
--- a/services/core/java/com/android/server/connectivity/Nat464Xlat.java
+++ b/services/core/java/com/android/server/connectivity/Nat464Xlat.java
@@ -29,6 +29,7 @@
import android.os.Message;
import android.os.INetworkManagementService;
import android.os.RemoteException;
+import android.os.SystemProperties;
import android.util.Slog;
import com.android.server.net.BaseNetworkObserver;
@@ -96,7 +97,12 @@
(nai.linkProperties != null) ? nai.linkProperties.hasIPv4Address() : false;
// Only support clat on mobile and wifi for now, because these are the only IPv6-only
// networks we can connect to.
- return connected && !hasIPv4Address && ArrayUtils.contains(NETWORK_TYPES, netType);
+ boolean doXlat = SystemProperties.getBoolean("persist.net.doxlat",true);
+ if(!doXlat) {
+ Slog.i(TAG, "Android Xlat is disabled");
+ }
+ return connected && !hasIPv4Address && ArrayUtils.contains(NETWORK_TYPES, netType)
+ && ((netType == ConnectivityManager.TYPE_MOBILE) ? doXlat : true);
}
/**
diff --git a/services/core/java/com/android/server/connectivity/Tethering.java b/services/core/java/com/android/server/connectivity/Tethering.java
index 156e278..26eecaa 100644
--- a/services/core/java/com/android/server/connectivity/Tethering.java
+++ b/services/core/java/com/android/server/connectivity/Tethering.java
@@ -44,6 +44,7 @@
import android.net.NetworkUtils;
import android.net.RouteInfo;
import android.net.wifi.WifiManager;
+import android.net.wifi.WifiDevice;
import android.os.Binder;
import android.os.Bundle;
import android.os.INetworkManagementService;
@@ -70,6 +71,7 @@
import com.android.internal.util.State;
import com.android.internal.util.StateMachine;
import com.android.server.IoThread;
+import com.android.server.NetPluginDelegate;
import com.android.server.connectivity.tethering.IControlsTethering;
import com.android.server.connectivity.tethering.IPv6TetheringCoordinator;
import com.android.server.connectivity.tethering.TetherInterfaceStateMachine;
@@ -84,8 +86,22 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
+import java.io.BufferedReader;
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.FileDescriptor;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import static android.net.wifi.WifiManager.WIFI_AP_STATE_DISABLED;
+import static android.net.wifi.WifiManager.WIFI_AP_STATE_ENABLED;
+import static android.net.wifi.WifiManager.WIFI_AP_STATE_CHANGED_ACTION;
+
/**
* @hide
@@ -171,14 +187,29 @@
private Notification.Builder mTetheredNotificationBuilder;
private int mLastNotificationId;
+ private Notification.Builder softApNotificationBuilder;
+ private int mLastSoftApNotificationId = 0;
private boolean mRndisEnabled; // track the RNDIS function enabled state
private boolean mUsbTetherRequested; // true if USB tethering should be started
// when RNDIS is enabled
+ // Once STA established connection to hostapd, it will be added
+ // to mL2ConnectedDeviceMap. Then after deviceinfo update from dnsmasq,
+ // it will be added to mConnectedDeviceMap
+ private HashMap<String, WifiDevice> mL2ConnectedDeviceMap = new HashMap<String, WifiDevice>();
+ private HashMap<String, WifiDevice> mConnectedDeviceMap = new HashMap<String, WifiDevice>();
+ private static final String dhcpLocation = "/data/misc/dhcp/dnsmasq.leases";
+
+ // Device name polling interval(ms) and max times
+ private static final int DNSMASQ_POLLING_INTERVAL = 1000;
+ private static final int DNSMASQ_POLLING_MAX_TIMES = 10;
+
// True iff WiFi tethering should be started when soft AP is ready.
private boolean mWifiTetherRequested;
+ private final String SOFTAP_CONCURRENCY_INTERFACE = "softap0";
+
public Tethering(Context context, INetworkManagementService nmService,
INetworkStatsService statsService, INetworkPolicyManager policyManager) {
mContext = context;
@@ -203,6 +234,8 @@
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
filter.addAction(WifiManager.WIFI_AP_STATE_CHANGED_ACTION);
filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
+ filter.addAction(WIFI_AP_STATE_CHANGED_ACTION);
+
mContext.registerReceiver(mStateReceiver, filter);
filter = new IntentFilter();
@@ -232,14 +265,27 @@
return (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
}
+ private boolean isIpv6TetheringEnabled() {
+ int ipv6TetheringEnable = Settings.Global.getInt(mContext.getContentResolver(),
+ "enable_aosp_v6_tethering", 0);
+
+ return ipv6TetheringEnable == 1;
+ }
+
void updateConfiguration() {
String[] tetherableUsbRegexs = mContext.getResources().getStringArray(
com.android.internal.R.array.config_tether_usb_regexs);
- String[] tetherableWifiRegexs = mContext.getResources().getStringArray(
- com.android.internal.R.array.config_tether_wifi_regexs);
+ String[] tetherableWifiRegexs;
String[] tetherableBluetoothRegexs = mContext.getResources().getStringArray(
com.android.internal.R.array.config_tether_bluetooth_regexs);
+ if (SystemProperties.getInt("persist.fst.softap.en", 0) == 1) {
+ tetherableWifiRegexs = new String[] {"bond0"};
+ } else {
+ tetherableWifiRegexs = mContext.getResources().getStringArray(
+ com.android.internal.R.array.config_tether_wifi_regexs);
+ }
+
int ifaceTypes[] = mContext.getResources().getIntArray(
com.android.internal.R.array.config_tether_upstream_types);
Collection<Integer> upstreamIfaceTypes = new ArrayList<>();
@@ -263,6 +309,7 @@
// Never called directly: only called from interfaceLinkStateChanged.
// See NetlinkHandler.cpp:71.
if (VDBG) Log.d(TAG, "interfaceStatusChanged " + iface + ", " + up);
+
synchronized (mPublicSync) {
int interfaceType = ifaceNameToType(iface);
if (interfaceType == ConnectivityManager.TETHERING_INVALID) {
@@ -324,6 +371,10 @@
private int ifaceNameToType(String iface) {
if (isWifi(iface)) {
+ String wigigIface = SystemProperties.get("wigig.interface", "wigig0");
+ if (wigigIface.equals(iface)) {
+ return ConnectivityManager.TETHERING_WIGIG;
+ }
return ConnectivityManager.TETHERING_WIFI;
} else if (isUsb(iface)) {
return ConnectivityManager.TETHERING_USB;
@@ -590,6 +641,168 @@
}
}
+ public List<WifiDevice> getTetherConnectedSta() {
+ Iterator it;
+ List<WifiDevice> TetherConnectedStaList = new ArrayList<WifiDevice>();
+
+ if (mContext.getResources().getBoolean(com.android.internal.R.bool.config_softap_extention)) {
+ it = mConnectedDeviceMap.keySet().iterator();
+ while(it.hasNext()) {
+ String key = (String)it.next();
+ WifiDevice device = (WifiDevice)mConnectedDeviceMap.get(key);
+ if (VDBG) {
+ Log.d(TAG, "getTetherConnectedSta: addr=" + key + " name=" + device.deviceName);
+ }
+ TetherConnectedStaList.add(device);
+ }
+ }
+
+ return TetherConnectedStaList;
+ }
+
+ private void sendTetherConnectStateChangedBroadcast() {
+ if (!getConnectivityManager().isTetheringSupported()) return;
+
+ Intent broadcast = new Intent(ConnectivityManager.TETHER_CONNECT_STATE_CHANGED);
+ broadcast.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING |
+ Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
+
+ mContext.sendStickyBroadcastAsUser(broadcast, UserHandle.ALL);
+
+ showSoftApClientsNotification(com.android.internal.R.drawable.stat_sys_tether_wifi);
+ }
+
+ private boolean readDeviceInfoFromDnsmasq(WifiDevice device) {
+ boolean result = false;
+ FileInputStream fstream = null;
+ String line;
+
+ try {
+ fstream = new FileInputStream(dhcpLocation);
+ DataInputStream in = new DataInputStream(fstream);
+ BufferedReader br = new BufferedReader(new InputStreamReader(in));
+
+ while ((null != (line = br.readLine())) && (line.length() != 0)) {
+ String[] fields = line.split(" ");
+
+ // 949295 00:0a:f5:6a:bf:70 192.168.43.32 android-93de88df9ec61bac *
+ if (fields.length > 3) {
+ String addr = fields[1];
+ String name = fields[3];
+
+ if (addr.equals(device.deviceAddress)) {
+ device.deviceName = name;
+ result = true;
+ break;
+ }
+ }
+ }
+ } catch (IOException ex) {
+ Log.e(TAG, "readDeviceNameFromDnsmasq: " + ex);
+ } finally {
+ if (fstream != null) {
+ try {
+ fstream.close();
+ } catch (IOException ex) {}
+ }
+ }
+
+ return result;
+ }
+
+ /*
+ * DnsmasqThread is used to read the Device info from dnsmasq.
+ */
+ private static class DnsmasqThread extends Thread {
+ private final Tethering mTethering;
+ private int mInterval;
+ private int mMaxTimes;
+ private WifiDevice mDevice;
+
+ public DnsmasqThread(Tethering tethering, WifiDevice device,
+ int interval, int maxTimes) {
+ super("Tethering");
+ mTethering = tethering;
+ mInterval = interval;
+ mMaxTimes = maxTimes;
+ mDevice = device;
+ }
+
+ public void run() {
+ boolean result = false;
+
+ try {
+ while (mMaxTimes > 0) {
+ result = mTethering.readDeviceInfoFromDnsmasq(mDevice);
+ if (result) {
+ if (DBG) Log.d(TAG, "Successfully poll device info for " + mDevice.deviceAddress);
+ break;
+ }
+
+ mMaxTimes --;
+ Thread.sleep(mInterval);
+ }
+ } catch (Exception ex) {
+ result = false;
+ Log.e(TAG, "Pulling " + mDevice.deviceAddress + "error" + ex);
+ }
+
+ if (!result) {
+ if (DBG) Log.d(TAG, "Pulling timeout, suppose STA uses static ip " + mDevice.deviceAddress);
+ }
+
+ // When STA uses static ip, device info will be unavaiable from dnsmasq,
+ // thus no matter the result is success or failure, we will broadcast the event.
+ // But if the device is not in L2 connected state, it means the hostapd connection is
+ // disconnected before dnsmasq get device info, so in this case, don't broadcast
+ // connection event.
+ WifiDevice other = mTethering.mL2ConnectedDeviceMap.get(mDevice.deviceAddress);
+ if (other != null && other.deviceState == WifiDevice.CONNECTED) {
+ mTethering.mConnectedDeviceMap.put(mDevice.deviceAddress, mDevice);
+ mTethering.sendTetherConnectStateChangedBroadcast();
+ } else {
+ if (DBG) Log.d(TAG, "Device " + mDevice.deviceAddress + "already disconnected, ignoring");
+ }
+ }
+ }
+
+ public void interfaceMessageRecevied(String message) {
+ // if softap extension feature not enabled, do nothing
+ if (!mContext.getResources().getBoolean(com.android.internal.R.bool.config_softap_extention)) {
+ return;
+ }
+
+ if (DBG) Log.d(TAG, "interfaceMessageRecevied: message=" + message);
+
+ try {
+ WifiDevice device = new WifiDevice(message);
+
+ if (device.deviceState == WifiDevice.CONNECTED) {
+ mL2ConnectedDeviceMap.put(device.deviceAddress, device);
+
+ // When hostapd reported STA-connection event, it is possible that device
+ // info can't fetched from dnsmasq, then we start a thread to poll the
+ // device info, the thread will exit after device info avaiable.
+ // For static ip case, dnsmasq don't hold the device info, thus thread
+ // will exit after a timeout.
+ if (readDeviceInfoFromDnsmasq(device)) {
+ mConnectedDeviceMap.put(device.deviceAddress, device);
+ sendTetherConnectStateChangedBroadcast();
+ } else {
+ if (DBG) Log.d(TAG, "Starting poll device info for " + device.deviceAddress);
+ new DnsmasqThread(this, device,
+ DNSMASQ_POLLING_INTERVAL, DNSMASQ_POLLING_MAX_TIMES).start();
+ }
+ } else if (device.deviceState == WifiDevice.DISCONNECTED) {
+ mL2ConnectedDeviceMap.remove(device.deviceAddress);
+ mConnectedDeviceMap.remove(device.deviceAddress);
+ sendTetherConnectStateChangedBroadcast();
+ }
+ } catch (IllegalArgumentException ex) {
+ Log.e(TAG, "WifiDevice IllegalArgument: " + ex);
+ }
+ }
+
public int tether(String iface) {
if (DBG) Log.d(TAG, "Tethering " + iface);
synchronized (mPublicSync) {
@@ -705,6 +918,11 @@
} else {
/* We now have a status bar icon for WifiTethering, so drop the notification */
clearTetheredNotification();
+ if (mContext.getResources().getBoolean(
+ com.android.internal.R.bool
+ .config_regional_hotspot_show_notification_when_turn_on)) {
+ showTetheredNotification(com.android.internal.R.drawable.stat_sys_tether_wifi);
+ }
}
} else if (bluetoothTethered) {
showTetheredNotification(com.android.internal.R.drawable.stat_sys_tether_bluetooth);
@@ -713,6 +931,63 @@
}
}
+ private void showSoftApClientsNotification(int icon) {
+ NotificationManager notificationManager =
+ (NotificationManager)mContext.getSystemService(Context.NOTIFICATION_SERVICE);
+ if (notificationManager == null) {
+ return;
+ }
+
+ Intent intent = new Intent();
+ intent.setClassName("com.android.settings", "com.android.settings.TetherSettings");
+ intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
+
+ PendingIntent pi = PendingIntent.getActivityAsUser(mContext, 0, intent, 0,
+ null, UserHandle.CURRENT);
+
+ CharSequence message;
+ Resources r = Resources.getSystem();
+ CharSequence title = r.getText(com.android.internal.R.string.tethered_notification_title);
+
+ int size = mConnectedDeviceMap.size();
+ if (size == 0) {
+ message = r.getText(com.android.internal.R.string.tethered_notification_no_device_message);
+ } else if (size == 1) {
+ message = String.format((r.getText(com.android.internal.R.string.tethered_notification_one_device_message)).toString(),
+ size);
+ } else {
+ message = String.format((r.getText(com.android.internal.R.string.tethered_notification_multi_device_message)).toString(),
+ size);
+ }
+ if (softApNotificationBuilder == null) {
+ softApNotificationBuilder = new Notification.Builder(mContext);
+ softApNotificationBuilder.setWhen(0)
+ .setOngoing(true)
+ .setColor(mContext.getColor(
+ com.android.internal.R.color.system_notification_accent_color))
+ .setVisibility(Notification.VISIBILITY_PUBLIC)
+ .setCategory(Notification.CATEGORY_STATUS);
+ }
+ softApNotificationBuilder.setSmallIcon(icon)
+ .setContentTitle(title)
+ .setContentText(message)
+ .setContentIntent(pi)
+ .setPriority(Notification.PRIORITY_MIN);
+ softApNotificationBuilder.setContentText(message);
+ mLastSoftApNotificationId = icon + 10;
+
+ notificationManager.notify(mLastSoftApNotificationId, softApNotificationBuilder.build());
+ }
+
+ private void clearSoftApClientsNotification() {
+ NotificationManager notificationManager =
+ (NotificationManager)mContext.getSystemService(Context.NOTIFICATION_SERVICE);
+ if (notificationManager != null && mLastSoftApNotificationId != 0) {
+ notificationManager.cancel(mLastSoftApNotificationId);
+ mLastSoftApNotificationId = 0;
+ }
+ }
+
private void showTetheredNotification(int icon) {
NotificationManager notificationManager =
(NotificationManager)mContext.getSystemService(Context.NOTIFICATION_SERVICE);
@@ -738,8 +1013,9 @@
Resources r = Resources.getSystem();
CharSequence title = r.getText(com.android.internal.R.string.tethered_notification_title);
+
CharSequence message = r.getText(com.android.internal.R.string.
- tethered_notification_message);
+ tethered_notification_message);
if (mTetheredNotificationBuilder == null) {
mTetheredNotificationBuilder = new Notification.Builder(mContext);
@@ -758,6 +1034,7 @@
notificationManager.notifyAsUser(null, mLastNotificationId,
mTetheredNotificationBuilder.build(), UserHandle.ALL);
+
}
private void clearTetheredNotification() {
@@ -808,6 +1085,9 @@
}
break;
case WifiManager.WIFI_AP_STATE_DISABLED:
+ clearSoftApClientsNotification();
+ mConnectedDeviceMap.clear();
+ mL2ConnectedDeviceMap.clear();
case WifiManager.WIFI_AP_STATE_DISABLING:
case WifiManager.WIFI_AP_STATE_FAILED:
default:
@@ -842,6 +1122,7 @@
if (VDBG) Log.d(TAG, "tetherMatchingInterfaces(" + enable + ", " + interfaceType + ")");
String[] ifaces = null;
+ WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
try {
ifaces = mNMService.listInterfaces();
} catch (Exception e) {
@@ -852,6 +1133,15 @@
if (ifaces != null) {
for (String iface : ifaces) {
if (ifaceNameToType(iface) == interfaceType) {
+ if ((interfaceType == ConnectivityManager.TETHERING_WIFI) &&
+ wifiManager.getWifiStaSapConcurrency()) {
+ if (!iface.matches(SOFTAP_CONCURRENCY_INTERFACE)) {
+ if (DBG) {
+ Log.d(TAG, "For STA + SoftAp concurrency skip tethering on " + iface);
+ }
+ continue;
+ }
+ }
chosenIface = iface;
break;
}
@@ -1439,6 +1729,8 @@
Network network = null;
if (upType != ConnectivityManager.TYPE_NONE) {
+ network = getConnectivityManager().getNetworkForType(upType);
+ NetPluginDelegate.setUpstream(network);
LinkProperties linkProperties = cm.getLinkProperties(upType);
if (linkProperties != null) {
// Find the interface with the default IPv4 route. It may be the
@@ -1934,7 +2226,7 @@
private void trackNewTetherableInterface(String iface, int interfaceType) {
TetherState tetherState;
tetherState = new TetherState(new TetherInterfaceStateMachine(iface, mLooper,
- interfaceType, mNMService, mStatsService, this));
+ interfaceType, mNMService, mStatsService, this, isIpv6TetheringEnabled()));
mTetherStates.put(iface, tetherState);
tetherState.mStateMachine.start();
}
diff --git a/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java b/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java
index 9e7cb93..f23ffcc 100644
--- a/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java
+++ b/services/core/java/com/android/server/connectivity/tethering/TetherInterfaceStateMachine.java
@@ -45,6 +45,8 @@
private static final int USB_PREFIX_LENGTH = 24;
private static final String WIFI_HOST_IFACE_ADDR = "192.168.43.1";
private static final int WIFI_HOST_IFACE_PREFIX_LENGTH = 24;
+ private static final String WIGIG_HOST_IFACE_ADDR = "192.168.50.1";
+ private static final int WIGIG_HOST_IFACE_PREFIX_LENGTH = 24;
private final static String TAG = "TetherInterfaceSM";
private final static boolean DBG = false;
@@ -88,6 +90,7 @@
private final String mIfaceName;
private final int mInterfaceType;
private final IPv6TetheringInterfaceServices mIPv6TetherSvc;
+ private boolean mIpv6TetheringEnabled;
private int mLastError;
private String mMyUpstreamIfaceName; // may change over time
@@ -102,6 +105,7 @@
mIfaceName = ifaceName;
mInterfaceType = interfaceType;
mIPv6TetherSvc = new IPv6TetheringInterfaceServices(mIfaceName, mNMService);
+ mIpv6TetheringEnabled = false;
mLastError = ConnectivityManager.TETHER_ERROR_NO_ERROR;
mInitialState = new InitialState();
@@ -114,6 +118,12 @@
setInitialState(mInitialState);
}
+ public TetherInterfaceStateMachine(String ifaceName, Looper looper, int interfaceType,
+ INetworkManagementService nMService, INetworkStatsService statsService,
+ IControlsTethering tetherController,boolean Ipv6TetheringEnabled) {
+ this(ifaceName,looper,interfaceType,nMService,statsService,tetherController);
+ mIpv6TetheringEnabled = Ipv6TetheringEnabled;
+ }
public int interfaceType() {
return mInterfaceType;
}
@@ -130,6 +140,9 @@
} else if (mInterfaceType == ConnectivityManager.TETHERING_WIFI) {
ipAsString = WIFI_HOST_IFACE_ADDR;
prefixLen = WIFI_HOST_IFACE_PREFIX_LENGTH;
+ } else if (mInterfaceType == ConnectivityManager.TETHERING_WIGIG) {
+ ipAsString = WIGIG_HOST_IFACE_ADDR;
+ prefixLen = WIGIG_HOST_IFACE_PREFIX_LENGTH;
} else {
// Nothing to do, BT does this elsewhere.
return true;
@@ -214,7 +227,7 @@
return;
}
- if (!mIPv6TetherSvc.start()) {
+ if (mIpv6TetheringEnabled && !mIPv6TetherSvc.start()) {
Log.e(TAG, "Failed to start IPv6TetheringInterfaceServices");
}
diff --git a/services/core/java/com/android/server/content/SyncStorageEngine.java b/services/core/java/com/android/server/content/SyncStorageEngine.java
index f804fa1c..8b9a501 100644
--- a/services/core/java/com/android/server/content/SyncStorageEngine.java
+++ b/services/core/java/com/android/server/content/SyncStorageEngine.java
@@ -40,6 +40,7 @@
import android.os.Parcel;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
+import android.os.SystemProperties;
import android.os.UserHandle;
import android.util.*;
@@ -952,6 +953,12 @@
* active accounts.
*/
public void doDatabaseCleanup(Account[] accounts, int userId) {
+ // It is not necessary to clean up database during alarm boot as
+ // only power off alarm apps are installed. The applications with
+ // sync accounts won't be installed during alarm boot.
+ if (SystemProperties.getBoolean("ro.alarm_boot", false)) {
+ return;
+ }
synchronized (mAuthorities) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Slog.v(TAG, "Updating for new accounts...");
diff --git a/services/core/java/com/android/server/display/ExtendedRemoteDisplayHelper.java b/services/core/java/com/android/server/display/ExtendedRemoteDisplayHelper.java
new file mode 100644
index 0000000..1be474b
--- /dev/null
+++ b/services/core/java/com/android/server/display/ExtendedRemoteDisplayHelper.java
@@ -0,0 +1,163 @@
+/*
+ * 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.
+ */
+package com.android.server.display;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import android.media.RemoteDisplay;
+import android.os.Handler;
+import android.util.Slog;
+import android.content.Context;
+
+class ExtendedRemoteDisplayHelper {
+ private static final String TAG = "ExtendedRemoteDisplayHelper";
+
+ // ExtendedRemoteDisplay class
+ // ExtendedRemoteDisplay is an enhanced RemoteDisplay. It has
+ // similar interface as RemoteDisplay class
+ private static Class sExtRemoteDisplayClass;
+
+ // Method object for the API ExtendedRemoteDisplay.Listen
+ // ExtendedRemoteDisplay.Listen has the same API signature as
+ // RemoteDisplay.Listen except for an additional argument to pass the
+ // Context
+ private static Method sExtRemoteDisplayListen;
+
+ // Method Object for the API ExtendedRemoteDisplay.Dispose
+ // ExtendedRemoteDisplay.Dispose follows the same API signature as
+ // RemoteDisplay.Dispose
+ private static Method sExtRemoteDisplayDispose;
+
+ static {
+ //Check availability of ExtendedRemoteDisplay runtime
+ try {
+ sExtRemoteDisplayClass = Class.forName("com.qualcomm.wfd.ExtendedRemoteDisplay");
+ } catch (Throwable t) {
+ Slog.i(TAG, "ExtendedRemoteDisplay Not available.");
+ }
+
+ if(sExtRemoteDisplayClass != null) {
+ // If ExtendedRemoteDisplay is available find the methods
+ Slog.i(TAG, "ExtendedRemoteDisplay Is available. Find Methods");
+ try {
+ Class args[] = {
+ String.class,
+ RemoteDisplay.Listener.class,
+ Handler.class, Context.class
+ };
+ sExtRemoteDisplayListen = sExtRemoteDisplayClass.getDeclaredMethod("listen", args);
+ } catch (Throwable t) {
+ Slog.i(TAG, "ExtendedRemoteDisplay.listen Not available.");
+ }
+
+ try {
+ Class args[] = {};
+ sExtRemoteDisplayDispose = sExtRemoteDisplayClass.getDeclaredMethod("dispose", args);
+ } catch (Throwable t) {
+ Slog.i(TAG, "ExtendedRemoteDisplay.dispose Not available.");
+ }
+ }
+ }
+
+ /**
+ * Starts listening for displays to be connected on the specified interface.
+ *
+ * @param iface The interface address and port in the form "x.x.x.x:y".
+ * @param listener The listener to invoke
+ * when displays are connected or disconnected.
+ * @param handler The handler on which to invoke the listener.
+ * @param context The current service context
+ * */
+ public static Object listen(String iface, RemoteDisplay.Listener listener,
+ Handler handler, Context context)
+ {
+ Object extRemoteDisplay = null;
+ Slog.i(TAG, "ExtendedRemoteDisplay.listen");
+
+ if(sExtRemoteDisplayListen != null && sExtRemoteDisplayDispose != null){
+ try {
+ extRemoteDisplay = sExtRemoteDisplayListen.invoke(null,
+ iface, listener, handler, context);
+ } catch (InvocationTargetException e) {
+ Slog.i(TAG, "ExtendedRemoteDisplay.listen - InvocationTargetException");
+ Throwable cause = e.getCause();
+ if (cause instanceof RuntimeException) {
+ throw (RuntimeException) cause;
+ } else if (cause instanceof Error) {
+ throw (Error) cause;
+ } else {
+ throw new RuntimeException(e);
+ }
+ } catch (IllegalAccessException e) {
+ Slog.i(TAG, "ExtendedRemoteDisplay.listen -IllegalAccessException");
+ e.printStackTrace();
+ }
+ }
+ return extRemoteDisplay;
+ }
+
+ /**
+ * Disconnects the remote display and stops listening for new connections.
+ */
+ public static void dispose(Object extRemoteDisplay) {
+ Slog.i(TAG, "ExtendedRemoteDisplay.dispose");
+ try{
+ sExtRemoteDisplayDispose.invoke(extRemoteDisplay);
+ } catch (InvocationTargetException e) {
+ Slog.i(TAG, "ExtendedRemoteDisplay.dispose - InvocationTargetException");
+ Throwable cause = e.getCause();
+ if (cause instanceof RuntimeException) {
+ throw (RuntimeException) cause;
+ } else if (cause instanceof Error) {
+ throw (Error) cause;
+ } else {
+ throw new RuntimeException(e);
+ }
+ } catch (IllegalAccessException e) {
+ Slog.i(TAG, "ExtendedRemoteDisplay.dispose-IllegalAccessException");
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Checks if ExtendedRemoteDisplay is available
+ */
+ public static boolean isAvailable()
+ {
+ if(sExtRemoteDisplayClass != null &&
+ sExtRemoteDisplayDispose != null &&
+ sExtRemoteDisplayListen != null) {
+ Slog.i(TAG, "ExtendedRemoteDisplay isAvailable() : Available.");
+ return true;
+ }
+ Slog.i(TAG, "ExtendedRemoteDisplay isAvailable() : Not Available.");
+ return false;
+ }
+}
diff --git a/services/core/java/com/android/server/display/LocalDisplayAdapter.java b/services/core/java/com/android/server/display/LocalDisplayAdapter.java
index 8673225..6ca5e21 100644
--- a/services/core/java/com/android/server/display/LocalDisplayAdapter.java
+++ b/services/core/java/com/android/server/display/LocalDisplayAdapter.java
@@ -59,6 +59,7 @@
private static final int[] BUILT_IN_DISPLAY_IDS_TO_SCAN = new int[] {
SurfaceControl.BUILT_IN_DISPLAY_ID_MAIN,
SurfaceControl.BUILT_IN_DISPLAY_ID_HDMI,
+ SurfaceControl.BUILT_IN_DISPLAY_ID_TERTIARY,
};
private final SparseArray<LocalDisplayDevice> mDevices =
@@ -287,6 +288,10 @@
// Build an updated list of all existing color modes.
boolean colorModesAdded = false;
+ if (colorModes == null) {
+ return false;
+ }
+
for (int colorMode: colorModes) {
if (!mSupportedColorModes.contains(colorMode)) {
colorModesAdded = true;
diff --git a/services/core/java/com/android/server/display/WifiDisplayController.java b/services/core/java/com/android/server/display/WifiDisplayController.java
index 8932ca0..26e0ed2 100644
--- a/services/core/java/com/android/server/display/WifiDisplayController.java
+++ b/services/core/java/com/android/server/display/WifiDisplayController.java
@@ -42,11 +42,14 @@
import android.net.wifi.p2p.WifiP2pManager.GroupInfoListener;
import android.net.wifi.p2p.WifiP2pManager.PeerListListener;
import android.os.Handler;
+import android.os.SystemProperties;
import android.provider.Settings;
import android.util.Slog;
import android.view.Surface;
import java.io.PrintWriter;
+import java.lang.StackTraceElement;
+import java.lang.Thread;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
@@ -70,8 +73,10 @@
*/
final class WifiDisplayController implements DumpUtils.Dump {
private static final String TAG = "WifiDisplayController";
- private static final boolean DEBUG = false;
-
+ private static final boolean DEBUG =
+ SystemProperties.getBoolean("persist.debug.wfdcdbg",false);
+ private static final boolean DEBUGV =
+ SystemProperties.getBoolean("persist.debug.wfdcdbgv",false);
private static final int DEFAULT_CONTROL_PORT = 7236;
private static final int MAX_THROUGHPUT = 50;
private static final int CONNECTION_TIMEOUT_SECONDS = 30;
@@ -137,6 +142,10 @@
// Number of connection retries remaining.
private int mConnectionRetriesLeft;
+ // The Extended remote display that is listening on the connection.
+ // Created after the Wifi P2P network is connected.
+ private Object mExtRemoteDisplay;
+
// The remote display that is listening on the connection.
// Created after the Wifi P2P network is connected.
private RemoteDisplay mRemoteDisplay;
@@ -238,6 +247,35 @@
}
}
+ private void dump() {
+ Slog.d(TAG,"mWifiDisplayOnSetting=" + mWifiDisplayOnSetting);
+ Slog.d(TAG,"mWifiP2pEnabled=" + mWifiP2pEnabled);
+ Slog.d(TAG,"mWfdEnabled=" + mWfdEnabled);
+ Slog.d(TAG,"mWfdEnabling=" + mWfdEnabling);
+ Slog.d(TAG,"mNetworkInfo=" + mNetworkInfo);
+ Slog.d(TAG,"mScanRequested=" + mScanRequested);
+ Slog.d(TAG,"mDiscoverPeersInProgress=" + mDiscoverPeersInProgress);
+ Slog.d(TAG,"mDesiredDevice=" + describeWifiP2pDevice(mDesiredDevice));
+ Slog.d(TAG,"mConnectingDisplay=" + describeWifiP2pDevice(mConnectingDevice));
+ Slog.d(TAG,"mDisconnectingDisplay=" + describeWifiP2pDevice(mDisconnectingDevice));
+ Slog.d(TAG,"mCancelingDisplay=" + describeWifiP2pDevice(mCancelingDevice));
+ Slog.d(TAG,"mConnectedDevice=" + describeWifiP2pDevice(mConnectedDevice));
+ Slog.d(TAG,"mConnectionRetriesLeft=" + mConnectionRetriesLeft);
+ Slog.d(TAG,"mRemoteDisplay=" + mRemoteDisplay);
+ Slog.d(TAG,"mRemoteDisplayInterface=" + mRemoteDisplayInterface);
+ Slog.d(TAG,"mRemoteDisplayConnected=" + mRemoteDisplayConnected);
+ Slog.d(TAG,"mAdvertisedDisplay=" + mAdvertisedDisplay);
+ Slog.d(TAG,"mAdvertisedDisplaySurface=" + mAdvertisedDisplaySurface);
+ Slog.d(TAG,"mAdvertisedDisplayWidth=" + mAdvertisedDisplayWidth);
+ Slog.d(TAG,"mAdvertisedDisplayHeight=" + mAdvertisedDisplayHeight);
+ Slog.d(TAG,"mAdvertisedDisplayFlags=" + mAdvertisedDisplayFlags);
+
+ Slog.d(TAG,"mAvailableWifiDisplayPeers: size=" + mAvailableWifiDisplayPeers.size());
+ for (WifiP2pDevice device : mAvailableWifiDisplayPeers) {
+ Slog.d(TAG," " + describeWifiP2pDevice(device));
+ }
+ }
+
public void requestStartScan() {
if (!mScanRequested) {
mScanRequested = true;
@@ -359,7 +397,9 @@
}
private void updateScanState() {
- if (mScanRequested && mWfdEnabled && mDesiredDevice == null) {
+ if (mScanRequested && mWfdEnabled &&
+ (mDesiredDevice == null) && (mConnectedDevice == null)
+ && (mDisconnectingDevice == null)) {
if (!mDiscoverPeersInProgress) {
Slog.i(TAG, "Starting Wifi display scan.");
mDiscoverPeersInProgress = true;
@@ -559,20 +599,35 @@
* connection is established (or not).
*/
private void updateConnection() {
+ if(DEBUGV) {
+ //new Throwable("WFD_DBG").printStackTrace();
+ StackTraceElement[] st = Thread.currentThread().getStackTrace();
+ for(int i = 2 ; i < st.length && i < 5; i++) {
+ Slog.i(TAG,st[i].toString());
+ }
+ dump();
+ }
// Step 0. Stop scans if necessary to prevent interference while connected.
// Resume scans later when no longer attempting to connect.
updateScanState();
// Step 1. Before we try to connect to a new device, tell the system we
// have disconnected from the old one.
- if (mRemoteDisplay != null && mConnectedDevice != mDesiredDevice) {
- Slog.i(TAG, "Stopped listening for RTSP connection on " + mRemoteDisplayInterface
- + " from Wifi display: " + mConnectedDevice.deviceName);
+ if ((mRemoteDisplay != null || mExtRemoteDisplay != null) &&
+ (mConnectedDevice != mDesiredDevice)||
+ (mRemoteDisplayInterface != null && mConnectedDevice == null)) {
+ Slog.i(TAG, "Stopped listening for RTSP connection on "
+ + mRemoteDisplayInterface);
- mRemoteDisplay.dispose();
+ if(mRemoteDisplay != null) {
+ mRemoteDisplay.dispose();
+ } else if(mExtRemoteDisplay != null) {
+ ExtendedRemoteDisplayHelper.dispose(mExtRemoteDisplay);
+ }
+
+ mExtRemoteDisplay = null;
mRemoteDisplay = null;
mRemoteDisplayInterface = null;
- mRemoteDisplayConnected = false;
mHandler.removeCallbacks(mRtspTimeout);
mWifiP2pManager.setMiracastMode(WifiP2pManager.MIRACAST_DISABLED);
@@ -582,7 +637,7 @@
}
// Step 2. Before we try to connect to a new device, disconnect from the old one.
- if (mDisconnectingDevice != null) {
+ if (mRemoteDisplayConnected || mDisconnectingDevice != null) {
return; // wait for asynchronous callback
}
if (mConnectedDevice != null && mConnectedDevice != mDesiredDevice) {
@@ -666,6 +721,51 @@
return; // done
}
+ //Before we connect, we need to set the oldDevice to the desiredDevice to check
+ //the device on receiving callbacks from the Remote display modules
+ final WifiP2pDevice oldDevice = mDesiredDevice;
+ RemoteDisplay.Listener listener = new RemoteDisplay.Listener() {
+ @Override
+ public void onDisplayConnected(Surface surface,
+ int width, int height, int flags, int session) {
+ if (mConnectedDevice == oldDevice && !mRemoteDisplayConnected) {
+ Slog.i(TAG, "Opened RTSP connection with Wifi display: "
+ + mConnectedDevice.deviceName);
+ mRemoteDisplayConnected = true;
+ mHandler.removeCallbacks(mRtspTimeout);
+
+ if (mWifiDisplayCertMode) {
+ mListener.onDisplaySessionInfo(
+ getSessionInfo(mConnectedDeviceGroupInfo, session));
+ }
+
+ final WifiDisplay display = createWifiDisplay(mConnectedDevice);
+ advertiseDisplay(display, surface, width, height, flags);
+ }
+ }
+
+ @Override
+ public void onDisplayDisconnected() {
+ if (mConnectedDevice == oldDevice) {
+ Slog.i(TAG, "Closed RTSP connection with Wifi display: "
+ + mConnectedDevice.deviceName);
+ mHandler.removeCallbacks(mRtspTimeout);
+ mRemoteDisplayConnected = false;
+ disconnect();
+ }
+ }
+
+ @Override
+ public void onDisplayError(int error) {
+ if (mConnectedDevice == oldDevice) {
+ Slog.i(TAG, "Lost RTSP connection with Wifi display due to error "
+ + error + ": " + mConnectedDevice.deviceName);
+ mHandler.removeCallbacks(mRtspTimeout);
+ handleConnectionFailure(false);
+ }
+ }
+ };
+
// Step 5. Try to connect.
if (mConnectedDevice == null && mConnectingDevice == null) {
Slog.i(TAG, "Connecting to Wifi display: " + mDesiredDevice.deviceName);
@@ -691,6 +791,19 @@
WifiDisplay display = createWifiDisplay(mConnectingDevice);
advertiseDisplay(display, null, 0, 0, 0);
+ if(ExtendedRemoteDisplayHelper.isAvailable()&&
+ mExtRemoteDisplay == null){
+ final int port = getPortNumber(mDesiredDevice);
+ //IP is superfluous for WFD source, and we don't have one at this stage anyway since
+ //P2P connection hasn't been established yet
+ final String iface = "255.255.255.255:" + port;
+ mRemoteDisplayInterface = iface;
+ Slog.i(TAG, "Listening for RTSP connection on " + iface
+ + " from Wifi display: " + mDesiredDevice.deviceName);
+ mExtRemoteDisplay = ExtendedRemoteDisplayHelper.listen(iface,
+ listener, mHandler, mContext);
+ }
+
final WifiP2pDevice newDevice = mDesiredDevice;
mWifiP2pManager.connect(mWifiP2pChannel, config, new ActionListener() {
@Override
@@ -728,54 +841,16 @@
mWifiP2pManager.setMiracastMode(WifiP2pManager.MIRACAST_SOURCE);
- final WifiP2pDevice oldDevice = mConnectedDevice;
final int port = getPortNumber(mConnectedDevice);
final String iface = addr.getHostAddress() + ":" + port;
mRemoteDisplayInterface = iface;
- Slog.i(TAG, "Listening for RTSP connection on " + iface
- + " from Wifi display: " + mConnectedDevice.deviceName);
-
- mRemoteDisplay = RemoteDisplay.listen(iface, new RemoteDisplay.Listener() {
- @Override
- public void onDisplayConnected(Surface surface,
- int width, int height, int flags, int session) {
- if (mConnectedDevice == oldDevice && !mRemoteDisplayConnected) {
- Slog.i(TAG, "Opened RTSP connection with Wifi display: "
- + mConnectedDevice.deviceName);
- mRemoteDisplayConnected = true;
- mHandler.removeCallbacks(mRtspTimeout);
-
- if (mWifiDisplayCertMode) {
- mListener.onDisplaySessionInfo(
- getSessionInfo(mConnectedDeviceGroupInfo, session));
- }
-
- final WifiDisplay display = createWifiDisplay(mConnectedDevice);
- advertiseDisplay(display, surface, width, height, flags);
- }
- }
-
- @Override
- public void onDisplayDisconnected() {
- if (mConnectedDevice == oldDevice) {
- Slog.i(TAG, "Closed RTSP connection with Wifi display: "
- + mConnectedDevice.deviceName);
- mHandler.removeCallbacks(mRtspTimeout);
- disconnect();
- }
- }
-
- @Override
- public void onDisplayError(int error) {
- if (mConnectedDevice == oldDevice) {
- Slog.i(TAG, "Lost RTSP connection with Wifi display due to error "
- + error + ": " + mConnectedDevice.deviceName);
- mHandler.removeCallbacks(mRtspTimeout);
- handleConnectionFailure(false);
- }
- }
- }, mHandler, mContext.getOpPackageName());
+ if(!ExtendedRemoteDisplayHelper.isAvailable()){
+ Slog.i(TAG, "Listening for RTSP connection on " + iface
+ + " from Wifi display: " + mConnectedDevice.deviceName);
+ mRemoteDisplay = RemoteDisplay.listen(iface, listener,
+ mHandler, mContext.getOpPackageName());
+ }
// Use extended timeout value for certification, as some tests require user inputs
int rtspTimeout = mWifiDisplayCertMode ?
@@ -786,7 +861,7 @@
}
private WifiDisplaySessionInfo getSessionInfo(WifiP2pGroup info, int session) {
- if (info == null) {
+ if (info == null || info.getOwner() == null) {
return null;
}
Inet4Address addr = getInterfaceAddress(info);
@@ -820,6 +895,10 @@
mWifiP2pManager.requestGroupInfo(mWifiP2pChannel, new GroupInfoListener() {
@Override
public void onGroupInfoAvailable(WifiP2pGroup info) {
+ if(info == null) {
+ return;
+ }
+
if (DEBUG) {
Slog.d(TAG, "Received group info: " + describeWifiP2pGroup(info));
}
@@ -839,8 +918,9 @@
}
if (mWifiDisplayCertMode) {
- boolean owner = info.getOwner().deviceAddress
- .equals(mThisDevice.deviceAddress);
+ boolean owner = (info.getOwner() != null)?
+ info.getOwner().deviceAddress
+ .equals(mThisDevice.deviceAddress):false;
if (owner && info.getClientList().isEmpty()) {
// this is the case when we started Autonomous GO,
// and no client has connected, save group info
@@ -910,7 +990,8 @@
@Override
public void run() {
if (mConnectedDevice != null
- && mRemoteDisplay != null && !mRemoteDisplayConnected) {
+ && (mRemoteDisplay != null || mExtRemoteDisplay != null)
+ && !mRemoteDisplayConnected) {
Slog.i(TAG, "Timed out waiting for Wifi display RTSP connection after "
+ RTSP_TIMEOUT_SECONDS + " seconds: "
+ mConnectedDevice.deviceName);
diff --git a/services/core/java/com/android/server/location/GnssLocationProvider.java b/services/core/java/com/android/server/location/GnssLocationProvider.java
index eab6c22..a2d3afd 100644
--- a/services/core/java/com/android/server/location/GnssLocationProvider.java
+++ b/services/core/java/com/android/server/location/GnssLocationProvider.java
@@ -553,15 +553,19 @@
if (!TextUtils.isEmpty(mccMnc)) {
if (DEBUG) Log.d(TAG, "SIM MCC/MNC is available: " + mccMnc);
synchronized (mLock) {
- if (isVerizon(mccMnc, imsi, groupId)) {
- // load current properties for carrier VZW
- loadPropertiesFromResource(context, mProperties);
- String lpp_profile = mProperties.getProperty("LPP_PROFILE");
- // set the persist property LPP_PROFILE for VZW
- SystemProperties.set(LPP_PROFILE, lpp_profile);
- } else {
- // reset the persist property for Non VZW
- SystemProperties.set(LPP_PROFILE, "");
+ try {
+ if (isVerizon(mccMnc, imsi, groupId)) {
+ // load current properties for carrier VZW
+ loadPropertiesFromResource(context, mProperties);
+ String lpp_profile = mProperties.getProperty("LPP_PROFILE");
+ // set the persist property LPP_PROFILE for VZW
+ SystemProperties.set(LPP_PROFILE, lpp_profile);
+ } else {
+ // reset the persist property for Non VZW
+ SystemProperties.set(LPP_PROFILE, "");
+ }
+ } catch (RuntimeException e) {
+ Log.e(TAG, "Unable to set SystemProperties for key: " + LPP_PROFILE);
}
reloadGpsProperties(context, mProperties);
mNIHandler.setSuplEsEnabled(mSuplEsEnabled);
@@ -1477,7 +1481,7 @@
// reset SV count to zero
updateStatus(LocationProvider.TEMPORARILY_UNAVAILABLE, 0);
- mFixRequestTime = System.currentTimeMillis();
+ mFixRequestTime = SystemClock.elapsedRealtime(); //return milliseconds since boot
if (!hasCapability(GPS_CAPABILITY_SCHEDULING)) {
// set timer to give up if we do not receive a fix within NO_FIX_TIMEOUT
// and our fix interval is not short
@@ -1575,7 +1579,7 @@
}
}
- mLastFixTime = System.currentTimeMillis();
+ mLastFixTime = SystemClock.elapsedRealtime(); //return milliseconds since boot
// report time to first fix
if (mTimeToFirstFix == 0 && (flags & LOCATION_HAS_LAT_LONG) == LOCATION_HAS_LAT_LONG) {
mTimeToFirstFix = (int)(mLastFixTime - mFixRequestTime);
diff --git a/services/core/java/com/android/server/location/GpsXtraDownloader.java b/services/core/java/com/android/server/location/GpsXtraDownloader.java
index bf779859..874857a 100644
--- a/services/core/java/com/android/server/location/GpsXtraDownloader.java
+++ b/services/core/java/com/android/server/location/GpsXtraDownloader.java
@@ -23,6 +23,8 @@
import java.net.HttpURLConnection;
import java.net.URL;
+import libcore.io.IoUtils;
+
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.IOException;
diff --git a/services/core/java/com/android/server/media/MediaSessionRecord.java b/services/core/java/com/android/server/media/MediaSessionRecord.java
index 88d6c14..b65e74d 100644
--- a/services/core/java/com/android/server/media/MediaSessionRecord.java
+++ b/services/core/java/com/android/server/media/MediaSessionRecord.java
@@ -108,6 +108,9 @@
private CharSequence mQueueTitle;
private int mRatingType;
private long mLastActiveTime;
+ private String mBrowsedPlayerURI;
+ private boolean mPlayItemStatus;
+ private long[] mNowPlayingList;
// End TransportPerformer fields
// Volume handling fields
@@ -525,6 +528,86 @@
}
}
+ private void pushBrowsePlayerInfo() {
+ synchronized (mLock) {
+ if (mDestroyed) {
+ return;
+ }
+ for (int i = mControllerCallbacks.size() - 1; i >= 0; i--) {
+ ISessionControllerCallback cb = mControllerCallbacks.get(i);
+ try {
+ Log.d(TAG, "pushBrowsePlayerInfo");
+ cb.onUpdateFolderInfoBrowsedPlayer(mBrowsedPlayerURI);
+ } catch (DeadObjectException e) {
+ Log.w(TAG, "Removing dead callback in pushBrowsePlayerInfo. ", e);
+ mControllerCallbacks.remove(i);
+ } catch (RemoteException e) {
+ Log.w(TAG, "unexpected exception in pushBrowsePlayerInfo. ", e);
+ }
+ }
+ }
+ }
+
+ private void pushNowPlayingEntries() {
+ synchronized (mLock) {
+ if (mDestroyed) {
+ return;
+ }
+ for (int i = mControllerCallbacks.size() - 1; i >= 0; i--) {
+ ISessionControllerCallback cb = mControllerCallbacks.get(i);
+ try {
+ Log.d(TAG, "pushNowPlayingEntries");
+ cb.onUpdateNowPlayingEntries(mNowPlayingList);
+ } catch (DeadObjectException e) {
+ Log.w(TAG, "Removing dead callback in pushNowPlayingEntries. ", e);
+ mControllerCallbacks.remove(i);
+ } catch (RemoteException e) {
+ Log.w(TAG, "unexpected exception in pushNowPlayingEntries. ", e);
+ }
+ }
+ }
+ }
+
+ private void pushNowPlayingContentChange() {
+ synchronized (mLock) {
+ if (mDestroyed) {
+ return;
+ }
+ for (int i = mControllerCallbacks.size() - 1; i >= 0; i--) {
+ ISessionControllerCallback cb = mControllerCallbacks.get(i);
+ try {
+ Log.d(TAG, "pushNowPlayingContentChange");
+ cb.onUpdateNowPlayingContentChange();
+ } catch (DeadObjectException e) {
+ Log.w(TAG, "Removing dead callback in pushNowPlayingContentChange. ", e);
+ mControllerCallbacks.remove(i);
+ } catch (RemoteException e) {
+ Log.w(TAG, "unexpected exception in pushNowPlayingContentChange. ", e);
+ }
+ }
+ }
+ }
+
+ private void pushPlayItemResponse() {
+ synchronized (mLock) {
+ if (mDestroyed) {
+ return;
+ }
+ for (int i = mControllerCallbacks.size() - 1; i >= 0; i--) {
+ ISessionControllerCallback cb = mControllerCallbacks.get(i);
+ try {
+ Log.d(TAG, "pushPlayItemResponse");
+ cb.onPlayItemResponse(mPlayItemStatus);
+ } catch (DeadObjectException e) {
+ Log.w(TAG, "Removing dead callback in pushPlayItemResponse. ", e);
+ mControllerCallbacks.remove(i);
+ } catch (RemoteException e) {
+ Log.w(TAG, "unexpected exception in pushPlayItemResponse. ", e);
+ }
+ }
+ }
+ }
+
private void pushQueueUpdate() {
synchronized (mLock) {
if (mDestroyed) {
@@ -809,6 +892,33 @@
}
@Override
+ public void updateFolderInfoBrowsedPlayer(String stringUri) {
+ Log.d(TAG, "SessionStub: updateFolderInfoBrowsedPlayer");
+ mBrowsedPlayerURI = stringUri;
+ mHandler.post(MessageHandler.MSG_FOLDER_INFO_BROWSED_PLAYER);
+ }
+
+ @Override
+ public void updateNowPlayingEntries(long[] playList) {
+ Log.d(TAG, "SessionStub: updateNowPlayingEntries");
+ mNowPlayingList = playList;
+ mHandler.post(MessageHandler.MSG_UPDATE_NOWPLAYING_ENTRIES);
+ }
+
+ @Override
+ public void updateNowPlayingContentChange() {
+ Log.d(TAG, "SessionStub: updateNowPlayingContentChange");
+ mHandler.post(MessageHandler.MSG_UPDATE_NOWPLAYING_CONTENT_CHANGE);
+ }
+
+ @Override
+ public void playItemResponse(boolean success) {
+ Log.d(TAG, "SessionStub: playItemResponse");
+ mPlayItemStatus = success;
+ mHandler.post(MessageHandler.MSG_PLAY_ITEM_RESPONSE);
+ }
+
+ @Override
public void setQueueTitle(CharSequence title) {
mQueueTitle = title;
mHandler.post(MessageHandler.MSG_UPDATE_QUEUE_TITLE);
@@ -1028,6 +1138,7 @@
}
public void seekTo(long pos) {
+ Slog.d(TAG, "seekTo in SessionCb");
try {
mCb.onSeekTo(pos);
} catch (RemoteException e) {
@@ -1035,6 +1146,42 @@
}
}
+ /**
+ * @hide
+ */
+ public void setRemoteControlClientBrowsedPlayer() {
+ Slog.d(TAG, "setRemoteControlClientBrowsedPlayer in SessionCb");
+ try {
+ mCb.setRemoteControlClientBrowsedPlayer();
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Remote failure in setRemoteControlClientBrowsedPlayer.", e);
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public void setRemoteControlClientPlayItem(long uid, int scope) throws RemoteException {
+ Slog.d(TAG, "setRemoteControlClientPlayItem in SessionCb");
+ try {
+ mCb.setRemoteControlClientPlayItem(uid, scope);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Remote failure in setRemoteControlClientPlayItem.", e);
+ }
+ }
+
+ /**
+ * @hide
+ */
+ public void getRemoteControlClientNowPlayingEntries() throws RemoteException {
+ Slog.d(TAG, "getRemoteControlClientNowPlayingEntries in SessionCb");
+ try {
+ mCb.getRemoteControlClientNowPlayingEntries();
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Remote failure in getRemoteControlClientNowPlayingEntries.", e);
+ }
+ }
+
public void rate(Rating rating) {
try {
mCb.onRate(rating);
@@ -1267,11 +1414,33 @@
@Override
public void seekTo(long pos) throws RemoteException {
+ Log.d(TAG, "seekTo in ControllerStub");
updateCallingPackage();
mSessionCb.seekTo(pos);
}
@Override
+ public void setRemoteControlClientBrowsedPlayer() throws RemoteException {
+ Log.d(TAG, "setRemoteControlClientBrowsedPlayer in ControllerStub");
+ updateCallingPackage();
+ mSessionCb.setRemoteControlClientBrowsedPlayer();
+ }
+
+ @Override
+ public void setRemoteControlClientPlayItem(long uid, int scope) throws RemoteException {
+ Log.d(TAG, "setRemoteControlClientPlayItem in ControllerStub");
+ updateCallingPackage();
+ mSessionCb.setRemoteControlClientPlayItem(uid, scope);
+ }
+
+ @Override
+ public void getRemoteControlClientNowPlayingEntries() throws RemoteException {
+ Log.d(TAG, "getRemoteControlClientNowPlayingEntries in ControllerStub");
+ updateCallingPackage();
+ mSessionCb.getRemoteControlClientNowPlayingEntries();
+ }
+
+ @Override
public void rate(Rating rating) throws RemoteException {
updateCallingPackage();
mSessionCb.rate(rating);
@@ -1337,6 +1506,10 @@
private static final int MSG_UPDATE_SESSION_STATE = 7;
private static final int MSG_UPDATE_VOLUME = 8;
private static final int MSG_DESTROYED = 9;
+ private static final int MSG_FOLDER_INFO_BROWSED_PLAYER = 10;
+ private static final int MSG_UPDATE_NOWPLAYING_ENTRIES = 11;
+ private static final int MSG_UPDATE_NOWPLAYING_CONTENT_CHANGE = 12;
+ private static final int MSG_PLAY_ITEM_RESPONSE = 13;
public MessageHandler(Looper looper) {
super(looper);
@@ -1370,6 +1543,18 @@
break;
case MSG_DESTROYED:
pushSessionDestroyed();
+ case MSG_FOLDER_INFO_BROWSED_PLAYER:
+ pushBrowsePlayerInfo();
+ break;
+ case MSG_UPDATE_NOWPLAYING_ENTRIES:
+ pushNowPlayingEntries();
+ break;
+ case MSG_UPDATE_NOWPLAYING_CONTENT_CHANGE:
+ pushNowPlayingContentChange();
+ break;
+ case MSG_PLAY_ITEM_RESPONSE:
+ pushPlayItemResponse();
+ break;
}
}
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index 7545959..471d77d 100644
--- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -173,6 +173,7 @@
import com.android.server.EventLogTags;
import com.android.server.LocalServices;
import com.android.server.SystemConfig;
+import com.android.server.NetPluginDelegate;
import libcore.io.IoUtils;
@@ -1179,12 +1180,14 @@
// permission above.
maybeRefreshTrustedTime();
- synchronized (mNetworkPoliciesSecondLock) {
- ensureActiveMobilePolicyNL();
- normalizePoliciesNL();
- updateNetworkEnabledNL();
- updateNetworkRulesNL();
- updateNotificationsNL();
+ synchronized (mUidRulesFirstLock) {
+ synchronized (mNetworkPoliciesSecondLock) {
+ ensureActiveMobilePolicyNL();
+ normalizePoliciesNL();
+ updateNetworkEnabledNL();
+ updateNetworkRulesNL();
+ updateNotificationsNL();
+ }
}
}
};
@@ -3421,6 +3424,7 @@
private void setInterfaceQuota(String iface, long quotaBytes) {
try {
mNetworkManager.setInterfaceQuota(iface, quotaBytes);
+ NetPluginDelegate.setQuota(iface, quotaBytes);
} catch (IllegalStateException e) {
Log.wtf(TAG, "problem setting interface quota", e);
} catch (RemoteException e) {
diff --git a/services/core/java/com/android/server/net/NetworkStatsService.java b/services/core/java/com/android/server/net/NetworkStatsService.java
index 4658c046..6f5a060 100644
--- a/services/core/java/com/android/server/net/NetworkStatsService.java
+++ b/services/core/java/com/android/server/net/NetworkStatsService.java
@@ -74,6 +74,8 @@
import android.content.IntentFilter;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
+import android.database.ContentObserver;
+import android.net.ConnectivityManager;
import android.net.DataUsageRequest;
import android.net.IConnectivityManager;
import android.net.INetworkManagementEventObserver;
@@ -122,6 +124,7 @@
import com.android.internal.util.FileRotator;
import com.android.internal.util.IndentingPrintWriter;
import com.android.server.EventLogTags;
+import com.android.server.NetPluginDelegate;
import com.android.server.connectivity.Tethering;
import java.io.File;
@@ -151,6 +154,7 @@
private static final int FLAG_PERSIST_FORCE = 0x100;
private static final String TAG_NETSTATS_ERROR = "netstats_error";
+ private static final String DIALER_PACKEAGE_NAME = "com.android.dialer";
private final Context mContext;
private final INetworkManagementService mNetworkManager;
@@ -236,6 +240,10 @@
private NetworkStatsRecorder mUidRecorder;
private NetworkStatsRecorder mUidTagRecorder;
+ private NetworkStats.Entry mVideoCallMobileDataEntry;
+ private NetworkStats.Entry mVideoCallWifiDataEntry;
+ private boolean mConfigEnableDataUsage = false;
+
/** Cached {@link #mXtRecorder} stats. */
private NetworkStatsCollection mXtStatsCached;
@@ -248,6 +256,7 @@
/** Must be set in factory by calling #setHandler. */
private Handler mHandler;
private Handler.Callback mHandlerCallback;
+ private Handler mStatsHandler = null;
private boolean mSystemReady;
private long mPersistThreshold = 2 * MB_IN_BYTES;
@@ -280,6 +289,11 @@
handlerThread.start();
Handler handler = new Handler(handlerThread.getLooper(), callback);
service.setHandler(handler, callback);
+
+ HandlerThread mStatsThread = new HandlerThread("StatsObserver");
+ mStatsThread.start();
+ Handler mStatsHandler = new Handler(mStatsThread.getLooper());
+
return service;
}
@@ -298,6 +312,13 @@
mStatsObservers = checkNotNull(statsObservers, "missing NetworkStatsObservers");
mSystemDir = checkNotNull(systemDir, "missing systemDir");
mBaseDir = checkNotNull(baseDir, "missing baseDir");
+
+ ContentResolver contentResolver = context.getContentResolver();
+ contentResolver.registerContentObserver(Settings.Global.getUriFor(
+ NETSTATS_GLOBAL_ALERT_BYTES), false, mGlobalAlertBytesObserver);
+
+ mConfigEnableDataUsage = mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_video_call_datausage_enable);
}
@VisibleForTesting
@@ -461,6 +482,18 @@
}
}
+ private final ContentObserver mGlobalAlertBytesObserver =
+ new ContentObserver(mStatsHandler) {
+ public void onChange(boolean selfChange) {
+ long GlobalAlertBytes = mSettings.getGlobalAlertBytes(mPersistThreshold);
+ if (GlobalAlertBytes > 0) {
+ mGlobalAlertBytes = GlobalAlertBytes;
+ } else {
+ mGlobalAlertBytes = mPersistThreshold;
+ }
+ };
+ };
+
@Override
public INetworkStatsSession openSession() {
return createSession(null, /* poll on create */ false);
@@ -964,7 +997,7 @@
final ArraySet<String> mobileIfaces = new ArraySet<>();
for (NetworkState state : states) {
- if (state.networkInfo.isConnected()) {
+ if (state.networkInfo != null && state.networkInfo.isConnected()) {
final boolean isMobile = isNetworkTypeMobile(state.networkInfo.getType());
final NetworkIdentity ident = NetworkIdentity.buildNetworkIdentity(mContext, state);
@@ -1033,6 +1066,11 @@
final NetworkStats xtSnapshot = getNetworkStatsXtAndVt();
final NetworkStats devSnapshot = mNetworkManager.getNetworkStatsSummaryDev();
+ NetPluginDelegate.getTetherStats(uidSnapshot, xtSnapshot, devSnapshot);
+
+ if (mConfigEnableDataUsage) {
+ combineVideoCallEntryValues(uidSnapshot);
+ }
// For xt/dev, we pass a null VPN array because usage is aggregated by UID, so VPN traffic
// can't be reattributed to responsible apps.
@@ -1527,4 +1565,71 @@
return getGlobalLong(NETSTATS_UID_TAG_PERSIST_BYTES, def);
}
}
+
+ public void recordVideoCallData(String iface, int ifaceType, long rxBytes, long txBytes) {
+ Log.d(TAG, "recordVideoCallData service ifaceType = " + ifaceType
+ + " iface = "+ iface + " rxBytes = " +rxBytes + "txBytes = "+ txBytes);
+ if (ifaceType == ConnectivityManager.TYPE_MOBILE) {
+ if (mVideoCallMobileDataEntry == null) {
+ mVideoCallMobileDataEntry = createVideoCallDataEntry(iface);
+ }
+ synchronized(mVideoCallMobileDataEntry) {
+ mVideoCallMobileDataEntry.rxBytes += rxBytes;
+ mVideoCallMobileDataEntry.txBytes += txBytes;
+ }
+ } else if (ifaceType == ConnectivityManager.TYPE_WIFI) {
+ if (mVideoCallWifiDataEntry == null) {
+ mVideoCallWifiDataEntry = createVideoCallDataEntry(iface);
+ }
+ synchronized(mVideoCallWifiDataEntry) {
+ mVideoCallWifiDataEntry.rxBytes += rxBytes;
+ mVideoCallWifiDataEntry.txBytes += txBytes;
+ }
+ } else {
+ return;
+ }
+
+ synchronized (mStatsLock) {
+ performPollLocked(FLAG_PERSIST_ALL);
+ }
+ }
+
+
+ private NetworkStats.Entry createVideoCallDataEntry(String iface) {
+ NetworkStats.Entry dataEntry = new NetworkStats.Entry();
+ PackageManager pm = mContext.getPackageManager();
+ ApplicationInfo ai = null;
+ try {
+ ai = pm.getApplicationInfo(DIALER_PACKEAGE_NAME, PackageManager.GET_ACTIVITIES);
+ } catch(Exception e) {
+ Log.d(TAG, "get dialer getApplicationInfo failed ");
+ }
+ if (ai != null){
+ dataEntry.uid = ai.uid;
+ }
+ dataEntry.iface = iface;
+ return dataEntry;
+ }
+
+ private void combineVideoCallEntryValues(NetworkStats uidSnapshot) {
+ if (mVideoCallMobileDataEntry != null) {
+ synchronized(mVideoCallMobileDataEntry) {
+ uidSnapshot.combineValues(mVideoCallMobileDataEntry);
+ }
+ }
+ if (mVideoCallWifiDataEntry != null) {
+ synchronized(mVideoCallWifiDataEntry) {
+ uidSnapshot.combineValues(mVideoCallWifiDataEntry);
+ }
+ }
+ }
+
+ private boolean hasImsNetworkCapability(NetworkState state) {
+ if (mConfigEnableDataUsage && state.networkCapabilities.hasCapability(
+ NetworkCapabilities.NET_CAPABILITY_IMS)) {
+ return true;
+ }
+ return false;
+ }
+
}
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 62cbb01..e5242fc 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -92,6 +92,8 @@
import android.os.IInterface;
import android.os.Looper;
import android.os.Message;
+import android.os.Parcelable;
+import android.os.PersistableBundle;
import android.os.Process;
import android.os.RemoteException;
import android.os.SystemClock;
@@ -110,6 +112,7 @@
import android.service.notification.NotificationRankingUpdate;
import android.service.notification.StatusBarNotification;
import android.service.notification.ZenModeConfig;
+import android.telephony.CarrierConfigManager;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
@@ -305,6 +308,8 @@
private RankingHandler mRankingHandler;
private long mLastOverRateLogTime;
private float mMaxPackageEnqueueRate = DEFAULT_MAX_NOTIFICATION_ENQUEUE_RATE;
+ private PersistableBundle mCarrierConfig;
+ private CarrierConfigManager mConfigManager;
private String mSystemNotificationSound;
private static class Archive {
@@ -813,6 +818,8 @@
mListeners.onUserUnlocked(user);
mRankerServices.onUserUnlocked(user);
mZenModeHelper.onUserUnlocked(user);
+ } else if (action.equals(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED)) {
+ mCarrierConfig = mConfigManager.getConfig();
}
}
};
@@ -1042,6 +1049,7 @@
filter.addAction(Intent.ACTION_USER_REMOVED);
filter.addAction(Intent.ACTION_USER_UNLOCKED);
filter.addAction(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE);
+ filter.addAction(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED);
getContext().registerReceiver(mIntentReceiver, filter);
IntentFilter pkgFilter = new IntentFilter();
@@ -1070,6 +1078,8 @@
publishBinderService(Context.NOTIFICATION_SERVICE, mService);
publishLocalService(NotificationManagerInternal.class, mInternalService);
+ mConfigManager = (CarrierConfigManager)
+ getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE);
}
private void sendRegisteredOnlyBroadcast(String action) {
@@ -2832,7 +2842,14 @@
// These are set inside the conditional if the notification is allowed to make noise.
boolean hasValidVibrate = false;
boolean hasValidSound = false;
- if (disableEffects == null
+
+ boolean smsRingtone = false;
+ if (mCarrierConfig != null) {
+ smsRingtone = mCarrierConfig.getBoolean(
+ CarrierConfigManager.KEY_CONFIG_SMS_RINGTONE_INCALL);
+ }
+
+ if ((disableEffects == null || (smsRingtone && mInCall))
&& (record.getUserId() == UserHandle.USER_ALL ||
record.getUserId() == currentUser ||
mUserProfiles.isCurrentProfile(record.getUserId()))
diff --git a/services/core/java/com/android/server/notification/ScheduleConditionProvider.java b/services/core/java/com/android/server/notification/ScheduleConditionProvider.java
index 32d03ce..e95b462 100644
--- a/services/core/java/com/android/server/notification/ScheduleConditionProvider.java
+++ b/services/core/java/com/android/server/notification/ScheduleConditionProvider.java
@@ -91,12 +91,14 @@
pw.print(" mRegistered="); pw.println(mRegistered);
pw.println(" mSubscriptions=");
final long now = System.currentTimeMillis();
- for (Uri conditionId : mSubscriptions.keySet()) {
- pw.print(" ");
- pw.print(meetsSchedule(mSubscriptions.get(conditionId), now) ? "* " : " ");
- pw.println(conditionId);
- pw.print(" ");
- pw.println(mSubscriptions.get(conditionId).toString());
+ synchronized (mSubscriptions) {
+ for (Uri conditionId : mSubscriptions.keySet()) {
+ pw.print(" ");
+ pw.print(meetsSchedule(mSubscriptions.get(conditionId), now) ? "* " : " ");
+ pw.println(conditionId);
+ pw.print(" ");
+ pw.println(mSubscriptions.get(conditionId).toString());
+ }
}
pw.println(" snoozed due to alarm: " + TextUtils.join(SEPARATOR, mSnoozed));
dumpUpcomingTime(pw, "mNextAlarmTime", mNextAlarmTime, now);
@@ -128,14 +130,18 @@
notifyCondition(conditionId, Condition.STATE_FALSE, "badCondition");
return;
}
- mSubscriptions.put(conditionId, toScheduleCalendar(conditionId));
+ synchronized (mSubscriptions) {
+ mSubscriptions.put(conditionId, toScheduleCalendar(conditionId));
+ }
evaluateSubscriptions();
}
@Override
public void onUnsubscribe(Uri conditionId) {
if (DEBUG) Slog.d(TAG, "onUnsubscribe " + conditionId);
- mSubscriptions.remove(conditionId);
+ synchronized (mSubscriptions) {
+ mSubscriptions.remove(conditionId);
+ }
removeSnoozed(conditionId);
evaluateSubscriptions();
}
@@ -154,32 +160,34 @@
if (mAlarmManager == null) {
mAlarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);
}
- setRegistered(!mSubscriptions.isEmpty());
final long now = System.currentTimeMillis();
- mNextAlarmTime = 0;
- long nextUserAlarmTime = getNextAlarm();
- for (Uri conditionId : mSubscriptions.keySet()) {
- final ScheduleCalendar cal = mSubscriptions.get(conditionId);
- if (cal != null && cal.isInSchedule(now)) {
- if (conditionSnoozed(conditionId) || cal.shouldExitForAlarm(now)) {
- notifyCondition(conditionId, Condition.STATE_FALSE, "alarmCanceled");
- addSnoozed(conditionId);
- } else {
- notifyCondition(conditionId, Condition.STATE_TRUE, "meetsSchedule");
- }
- cal.maybeSetNextAlarm(now, nextUserAlarmTime);
- } else {
- notifyCondition(conditionId, Condition.STATE_FALSE, "!meetsSchedule");
- removeSnoozed(conditionId);
- if (nextUserAlarmTime == 0) {
+ synchronized (mSubscriptions) {
+ setRegistered(!mSubscriptions.isEmpty());
+ mNextAlarmTime = 0;
+ long nextUserAlarmTime = getNextAlarm();
+ for (Uri conditionId : mSubscriptions.keySet()) {
+ final ScheduleCalendar cal = mSubscriptions.get(conditionId);
+ if (cal != null && cal.isInSchedule(now)) {
+ if (conditionSnoozed(conditionId) || cal.shouldExitForAlarm(now)) {
+ notifyCondition(conditionId, Condition.STATE_FALSE, "alarmCanceled");
+ addSnoozed(conditionId);
+ } else {
+ notifyCondition(conditionId, Condition.STATE_TRUE, "meetsSchedule");
+ }
cal.maybeSetNextAlarm(now, nextUserAlarmTime);
+ } else {
+ notifyCondition(conditionId, Condition.STATE_FALSE, "!meetsSchedule");
+ removeSnoozed(conditionId);
+ if (cal != null && nextUserAlarmTime == 0) {
+ cal.maybeSetNextAlarm(now, nextUserAlarmTime);
+ }
}
- }
- if (cal != null) {
- final long nextChangeTime = cal.getNextChangeTime(now);
- if (nextChangeTime > 0 && nextChangeTime > now) {
- if (mNextAlarmTime == 0 || nextChangeTime < mNextAlarmTime) {
- mNextAlarmTime = nextChangeTime;
+ if (cal != null) {
+ final long nextChangeTime = cal.getNextChangeTime(now);
+ if (nextChangeTime > 0 && nextChangeTime > now) {
+ if (mNextAlarmTime == 0 || nextChangeTime < mNextAlarmTime) {
+ mNextAlarmTime = nextChangeTime;
+ }
}
}
}
@@ -314,11 +322,13 @@
@Override
public void onReceive(Context context, Intent intent) {
if (DEBUG) Slog.d(TAG, "onReceive " + intent.getAction());
- if (Intent.ACTION_TIMEZONE_CHANGED.equals(intent.getAction())) {
- for (Uri conditionId : mSubscriptions.keySet()) {
- final ScheduleCalendar cal = mSubscriptions.get(conditionId);
- if (cal != null) {
- cal.setTimeZone(Calendar.getInstance().getTimeZone());
+ synchronized (mSubscriptions) {
+ if (Intent.ACTION_TIMEZONE_CHANGED.equals(intent.getAction())) {
+ for (Uri conditionId : mSubscriptions.keySet()) {
+ final ScheduleCalendar cal = mSubscriptions.get(conditionId);
+ if (cal != null) {
+ cal.setTimeZone(Calendar.getInstance().getTimeZone());
+ }
}
}
}
diff --git a/services/core/java/com/android/server/os/RegionalizationService.java b/services/core/java/com/android/server/os/RegionalizationService.java
new file mode 100644
index 0000000..bced2ea
--- /dev/null
+++ b/services/core/java/com/android/server/os/RegionalizationService.java
@@ -0,0 +1,155 @@
+/*
+ * Copyright (c) 2015, 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.
+ */
+
+package com.android.server.os;
+
+import android.text.TextUtils;
+import android.util.Log;
+
+import com.android.internal.os.IRegionalizationService;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.ArrayList;
+
+/**
+ * The implementation of the regionalization service interface.
+ *
+ * @hide
+ */
+public class RegionalizationService extends IRegionalizationService.Stub {
+
+ private static final String TAG = "RegionalizationService";
+
+ public RegionalizationService() {
+ }
+
+ @Override
+ public boolean checkFileExists(String filepath) {
+ File file = new File(filepath);
+ if (file == null || !file.exists())
+ return false;
+
+ return true;
+ }
+
+ @Override
+ public ArrayList<String> readFile(String filepath, String regularExpression) {
+ File file = new File(filepath);
+ if (file == null || !file.exists() || !file.canRead()) return null;
+
+
+ ArrayList<String> contents = new ArrayList<String>();
+
+ FileReader fr = null;
+ BufferedReader br = null;
+ try {
+ fr = new FileReader(file);
+ br = new BufferedReader(fr);
+ String line = null;
+ while ((line = br.readLine()) != null && (line = line.trim()) != null) {
+ if (!TextUtils.isEmpty(regularExpression)) {
+ if (line.matches(regularExpression)) {
+ contents.add(line);
+ }
+ } else {
+ contents.add(line);
+ }
+ }
+ } catch (IOException e) {
+ Log.e(TAG, "Read File error, caused by: " + e.getMessage());
+ } finally {
+ try {
+ if (br != null) br.close();
+ if (fr != null) fr.close();
+ } catch (IOException e) {
+ Log.e(TAG, "Close the reader error, caused by: " + e.getMessage());
+ }
+ }
+
+ return contents;
+ }
+
+ @Override
+ public boolean writeFile(String filepath, String content, boolean append) {
+ File file = new File(filepath);
+ if (file == null || !file.exists() || !file.canWrite()) return false;
+
+ if (TextUtils.isEmpty(content)) return false;
+
+ // Write the file with the content.
+ FileWriter fw = null;
+ try {
+ fw = new FileWriter(file, append);
+ fw.write(content);
+ } catch (IOException e) {
+ e.printStackTrace();
+ return false;
+ } finally {
+ if (fw != null) try {
+ fw.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ public void deleteFilesUnderDir(String dirPath, String ext, boolean delDir) {
+ File file = new File(dirPath);
+ if (file == null || !file.exists()) return;
+
+ deleteFiles(file, ext, delDir);
+ }
+
+ // Delete all files under this folder and its subfolders
+ private void deleteFiles(File dir, String ext, boolean delDir) {
+ if (dir.isDirectory()) {
+ String[] children = dir.list();
+ if (children == null) return;
+
+ for (int i = 0; i < children.length; i++) {
+ deleteFiles(new File(dir, children[i]), ext, delDir);
+ }
+ if (delDir) {
+ dir.delete();
+ }
+ } else {
+ if (dir.isFile() && (ext.isEmpty() || dir.getName().endsWith(ext))) {
+ dir.delete();
+ }
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/pm/MultiTaskDealer.java b/services/core/java/com/android/server/pm/MultiTaskDealer.java
new file mode 100644
index 0000000..9b8d46e
--- /dev/null
+++ b/services/core/java/com/android/server/pm/MultiTaskDealer.java
@@ -0,0 +1,141 @@
+/*
+* Copyright (c) 2015-2016, 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.
+*/
+package com.android.server.pm;
+
+import java.lang.ref.WeakReference;
+import java.util.HashMap;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.ReentrantLock;
+
+import android.util.Log;
+
+public class MultiTaskDealer {
+
+ public static final String TAG = "MultiTaskDealer";
+ public static final String PACKAGEMANAGER_SCANER = "packagescan";
+ private static final boolean DEBUG_TASK = false;
+
+ private static HashMap<String, WeakReference<MultiTaskDealer>> map = new HashMap<String, WeakReference<MultiTaskDealer>>();
+
+ public static MultiTaskDealer getDealer(String name) {
+ WeakReference<MultiTaskDealer> ref = map.get(name);
+ MultiTaskDealer dealer = ref!=null?ref.get():null;
+ return dealer;
+ }
+
+ public static MultiTaskDealer startDealer(String name,int taskCount) {
+ MultiTaskDealer dealer = getDealer(name);
+ if(dealer==null) {
+ dealer = new MultiTaskDealer(name,taskCount);
+ WeakReference<MultiTaskDealer> ref = new WeakReference<MultiTaskDealer>(dealer);
+ map.put(name,ref);
+ }
+ return dealer;
+ }
+
+ public void startLock() {
+ mLock.lock();
+ }
+
+ public void endLock() {
+ mLock.unlock();
+ }
+
+ private ThreadPoolExecutor mExecutor;
+ private int mTaskCount = 0;
+ private boolean mNeedNotifyEnd = false;
+ private Object mObjWaitAll = new Object();
+ private ReentrantLock mLock = new ReentrantLock();
+
+ public MultiTaskDealer(String name,int taskCount) {
+ final String taskName = name;
+ ThreadFactory factory = new ThreadFactory()
+ {
+ private final AtomicInteger mCount = new AtomicInteger(1);
+
+ public Thread newThread(final Runnable r) {
+ if (DEBUG_TASK) Log.d(TAG, "create a new thread:" + taskName);
+ return new Thread(r, taskName + "-" + mCount.getAndIncrement());
+ }
+ };
+ mExecutor = new ThreadPoolExecutor(taskCount, taskCount, 5, TimeUnit.SECONDS,
+ new LinkedBlockingQueue<Runnable>(), factory){
+ protected void afterExecute(Runnable r, Throwable t) {
+ if(t!=null) {
+ t.printStackTrace();
+ }
+ MultiTaskDealer.this.TaskCompleteNotify(r);
+ if (DEBUG_TASK) Log.d(TAG, "end task");
+ super.afterExecute(r,t);
+ }
+ protected void beforeExecute(Thread t, Runnable r) {
+ if (DEBUG_TASK) Log.d(TAG, "start task");
+ super.beforeExecute(t,r);
+ }
+ };
+ }
+
+ public void addTask(Runnable task) {
+ synchronized (mObjWaitAll) {
+ mTaskCount+=1;
+ }
+ mExecutor.execute(task);
+ if (DEBUG_TASK) Log.d(TAG, "addTask");
+ }
+
+ private void TaskCompleteNotify(Runnable task) {
+ synchronized (mObjWaitAll) {
+ mTaskCount-=1;
+ if(mTaskCount<=0 && mNeedNotifyEnd) {
+ if (DEBUG_TASK) Log.d(TAG, "complete notify");
+ mObjWaitAll.notify();
+ }
+ }
+ }
+
+ public void waitAll() {
+ if (DEBUG_TASK) Log.d(TAG, "start wait all");
+ synchronized (mObjWaitAll) {
+ if(mTaskCount>0) {
+ mNeedNotifyEnd = true;
+ try {
+ mObjWaitAll.wait();
+ } catch (Exception e) {
+ }
+ mNeedNotifyEnd = false;
+ }
+ if (DEBUG_TASK) Log.d(TAG, "wait finish");
+ return;
+ }
+ }
+}
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index cee56c3..e27da71 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -1,4 +1,7 @@
/*
+ * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
+ * Not a Contribution.
+ *
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -102,6 +105,7 @@
import android.annotation.Nullable;
import android.app.ActivityManager;
import android.app.ActivityManagerNative;
+import android.app.AlarmManager;
import android.app.IActivityManager;
import android.app.ResourcesManager;
import android.app.admin.IDevicePolicyManager;
@@ -233,6 +237,7 @@
import com.android.internal.logging.MetricsLogger;
import com.android.internal.os.IParcelFileDescriptorFactory;
import com.android.internal.os.InstallerConnection.InstallerException;
+import com.android.internal.os.RegionalizationEnvironment;
import com.android.internal.os.SomeArgs;
import com.android.internal.os.Zygote;
import com.android.internal.telephony.CarrierAppUtils;
@@ -305,6 +310,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
/**
* Keep track of all those APKs everywhere.
@@ -540,11 +546,13 @@
final Context mContext;
final boolean mFactoryTest;
final boolean mOnlyCore;
+ private boolean mOnlyPowerOffAlarm = false;
final DisplayMetrics mMetrics;
final int mDefParseFlags;
final String[] mSeparateProcesses;
final boolean mIsUpgrade;
final boolean mIsPreNUpgrade;
+ final boolean mIsAlarmBoot;
final boolean mIsPreNMR1Upgrade;
@GuardedBy("mPackages")
@@ -572,6 +580,9 @@
// apps.
final File mDrmAppPrivateInstallDir;
+ // Directory containing the regionalization 3rd apps.
+ final File mRegionalizationAppInstallDir;
+
// ----------------------------------------------------------------
// Lock for state used when installing and doing other long running
@@ -1134,6 +1145,7 @@
| FLAG_PERMISSION_REVOKE_ON_UPGRADE;
final @Nullable String mRequiredVerifierPackage;
+ final @Nullable String mOptionalVerifierPackage;
final @NonNull String mRequiredInstallerPackage;
final @NonNull String mRequiredUninstallerPackage;
final @Nullable String mSetupWizardPackage;
@@ -2094,6 +2106,28 @@
mSettings.addSharedUserLPw("android.uid.shell", SHELL_UID,
ApplicationInfo.FLAG_SYSTEM, ApplicationInfo.PRIVATE_FLAG_PRIVILEGED);
+ File setFile = new File(AlarmManager.POWER_OFF_ALARM_SET_FILE);
+ File handleFile = new File(AlarmManager.POWER_OFF_ALARM_HANDLE_FILE);
+ mIsAlarmBoot = SystemProperties.getBoolean("ro.alarm_boot", false);
+ if (mIsAlarmBoot) {
+ mOnlyPowerOffAlarm = true;
+ } else if (setFile.exists() && handleFile.exists()) {
+ // if it is normal boot, check if power off alarm is handled. And set
+ // alarm properties for others to check.
+ if (!mOnlyCore && AlarmManager
+ .readPowerOffAlarmFile(AlarmManager.POWER_OFF_ALARM_HANDLE_FILE)
+ .equals(AlarmManager.POWER_OFF_ALARM_HANDLED)) {
+ SystemProperties.set("ro.alarm_handled", "true");
+ File instanceFile = new File(AlarmManager.POWER_OFF_ALARM_INSTANCE_FILE);
+ String instanceValue = AlarmManager
+ .readPowerOffAlarmFile(AlarmManager.POWER_OFF_ALARM_INSTANCE_FILE);
+ SystemProperties.set("ro.alarm_instance", instanceValue);
+
+ AlarmManager.writePowerOffAlarmFile(AlarmManager.POWER_OFF_ALARM_HANDLE_FILE,
+ AlarmManager.POWER_OFF_ALARM_NOT_HANDLED);
+ }
+ }
+
String separateProcesses = SystemProperties.get("debug.separate_processes");
if (separateProcesses != null && separateProcesses.length() > 0) {
if ("*".equals(separateProcesses)) {
@@ -2128,9 +2162,9 @@
mProtectedPackages = new ProtectedPackages(mContext);
- synchronized (mInstallLock) {
+// synchronized (mInstallLock) {
// writer
- synchronized (mPackages) {
+// synchronized (mPackages) {
mHandlerThread = new ServiceThread(TAG,
Process.THREAD_PRIORITY_BACKGROUND, true /*allowIo*/);
mHandlerThread.start();
@@ -2146,6 +2180,7 @@
mEphemeralInstallDir = new File(dataDir, "app-ephemeral");
mAsecInternalPath = new File(dataDir, "app-asec").getPath();
mDrmAppPrivateInstallDir = new File(dataDir, "app-private");
+ mRegionalizationAppInstallDir = new File(dataDir, "app-regional");
sUserManager = new UserManagerService(context, this, mPackages);
@@ -2342,6 +2377,28 @@
| PackageParser.PARSE_IS_SYSTEM
| PackageParser.PARSE_IS_SYSTEM_DIR, scanFlags, 0);
+ // Collect all Regionalization packages form Carrier's res packages.
+ if (RegionalizationEnvironment.isSupported()) {
+ Log.d(TAG, "Load Regionalization vendor apks");
+ final List<File> RegionalizationDirs =
+ RegionalizationEnvironment.getAllPackageDirectories();
+ for (File f : RegionalizationDirs) {
+ File RegionalizationSystemDir = new File(f, "system");
+ // Collect packages in <Package>/system/priv-app
+ scanDirLI(new File(RegionalizationSystemDir, "priv-app"),
+ PackageParser.PARSE_IS_SYSTEM | PackageParser.PARSE_IS_SYSTEM_DIR
+ | PackageParser.PARSE_IS_PRIVILEGED, scanFlags, 0);
+ // Collect packages in <Package>/system/app
+ scanDirLI(new File(RegionalizationSystemDir, "app"),
+ PackageParser.PARSE_IS_SYSTEM | PackageParser.PARSE_IS_SYSTEM_DIR,
+ scanFlags, 0);
+ // Collect overlay in <Package>/system/vendor
+ scanDirLI(new File(RegionalizationSystemDir, "vendor/overlay"),
+ PackageParser.PARSE_IS_SYSTEM | PackageParser.PARSE_IS_SYSTEM_DIR,
+ scanFlags | SCAN_TRUSTED_OVERLAY, 0);
+ }
+ }
+
// Prune any system packages that no longer exist.
final List<String> possiblyDeletedUpdatedSystemApps = new ArrayList<String>();
if (!mOnlyCore) {
@@ -2428,6 +2485,17 @@
| PackageParser.PARSE_IS_EPHEMERAL,
scanFlags | SCAN_REQUIRE_KNOWN, 0);
+ // Collect all Regionalization 3rd packages.
+ if (RegionalizationEnvironment.isSupported()) {
+ Log.d(TAG, "Load Regionalization 3rd apks from res packages.");
+ final List<String> packages = RegionalizationEnvironment.getAllPackageNames();
+ for (String pack : packages) {
+ File appFolder = new File(mRegionalizationAppInstallDir, pack);
+ Log.d(TAG, "Load Regionalization 3rd apks of path " + appFolder.getPath());
+ scanDirLI(appFolder, 0, scanFlags | SCAN_REQUIRE_KNOWN, 0);
+ }
+ }
+
/**
* Remove disable package settings for any updated system
* apps that were removed via an OTA. If they're not a
@@ -2667,6 +2735,7 @@
if (!mOnlyCore) {
mRequiredVerifierPackage = getRequiredButNotReallyRequiredVerifierLPr();
+ mOptionalVerifierPackage = getOptionalVerfiferLPr();
mRequiredInstallerPackage = getRequiredInstallerLPr();
mRequiredUninstallerPackage = getRequiredUninstallerLPr();
mIntentFilterVerifierComponent = getIntentFilterVerifierComponentNameLPr();
@@ -2678,7 +2747,12 @@
PackageManager.SYSTEM_SHARED_LIBRARY_SHARED);
} else {
mRequiredVerifierPackage = null;
- mRequiredInstallerPackage = null;
+ mOptionalVerifierPackage = null;
+ if (mOnlyPowerOffAlarm) {
+ mRequiredInstallerPackage = getRequiredInstallerLPr();
+ } else {
+ mRequiredInstallerPackage = null;
+ }
mRequiredUninstallerPackage = null;
mIntentFilterVerifierComponent = null;
mIntentFilterVerifier = null;
@@ -2717,8 +2791,8 @@
}
mEphemeralApplicationRegistry = new EphemeralApplicationRegistry(this);
- } // synchronized (mPackages)
- } // synchronized (mInstallLock)
+ //} // synchronized (mPackages)
+ //} // synchronized (mInstallLock)
// Now after opening every single application zip, make sure they
// are all flushed. Not really needed, but keeps things nice and
@@ -2757,6 +2831,14 @@
UserHandle.USER_SYSTEM);
if (matches.size() == 1) {
return matches.get(0).getComponentInfo().packageName;
+ } else if (matches.size() > 1) {
+ String optionalVerifierName = mContext.getResources().getString(R.string.config_optionalPackageVerifierName);
+ if (TextUtils.isEmpty(optionalVerifierName))
+ return matches.get(0).getComponentInfo().packageName;
+ for (int i = 0; i < matches.size(); i++) {
+ if (!matches.get(i).getComponentInfo().packageName.contains(optionalVerifierName))
+ return matches.get(i).getComponentInfo().packageName;
+ }
} else if (matches.size() == 0) {
Log.e(TAG, "There should probably be a verifier, but, none were found");
return null;
@@ -2764,6 +2846,25 @@
throw new RuntimeException("There must be exactly one verifier; found " + matches);
}
+ private @Nullable String getOptionalVerfiferLPr() {
+ final Intent intent = new Intent("android.intent.action.PACKAGE_NEEDS_OPTIONAL_VERIFICATION");
+
+ final List<ResolveInfo> matches = queryIntentReceiversInternal(intent, PACKAGE_MIME_TYPE,
+ MATCH_SYSTEM_ONLY | MATCH_DIRECT_BOOT_AWARE | MATCH_DIRECT_BOOT_UNAWARE,
+ UserHandle.USER_SYSTEM);
+ if (matches.size() >= 1) {
+ String optionalVerifierName = mContext.getResources().getString(R.string.config_optionalPackageVerifierName);
+ if (TextUtils.isEmpty(optionalVerifierName))
+ return null;
+ for (int i = 0; i < matches.size(); i++) {
+ if (matches.get(i).getComponentInfo().packageName.contains(optionalVerifierName)) {
+ return matches.get(i).getComponentInfo().packageName;
+ }
+ }
+ }
+ return null;
+ }
+
private @NonNull String getRequiredSharedLibraryLPr(String libraryName) {
synchronized (mPackages) {
SharedLibraryEntry libraryEntry = mSharedLibraries.get(libraryName);
@@ -6753,6 +6854,13 @@
+ " flags=0x" + Integer.toHexString(parseFlags));
}
+ Log.d(TAG, "start scanDirLI:"+dir);
+ // use multi thread to speed up scanning
+ int iMultitaskNum = SystemProperties.getInt("persist.pm.multitask", 6);
+ Log.d(TAG, "max thread:" + iMultitaskNum);
+ final MultiTaskDealer dealer = (iMultitaskNum > 1) ? MultiTaskDealer.startDealer(
+ MultiTaskDealer.PACKAGEMANAGER_SCANER, iMultitaskNum) : null;
+
for (File file : files) {
final boolean isPackage = (isApkFile(file) || file.isDirectory())
&& !PackageInstallerService.isStageName(file.getName());
@@ -6760,20 +6868,44 @@
// Ignore entries which are not packages
continue;
}
- try {
- scanPackageTracedLI(file, parseFlags | PackageParser.PARSE_MUST_BE_APK,
- scanFlags, currentTime, null);
- } catch (PackageManagerException e) {
- Slog.w(TAG, "Failed to parse " + file + ": " + e.getMessage());
-
- // Delete invalid userdata apps
- if ((parseFlags & PackageParser.PARSE_IS_SYSTEM) == 0 &&
- e.error == PackageManager.INSTALL_FAILED_INVALID_APK) {
- logCriticalInfo(Log.WARN, "Deleting invalid package at " + file);
- removeCodePathLI(file);
- }
+ if (RegionalizationEnvironment.isSupported()) {
+ if (RegionalizationEnvironment.isExcludedApp(file.getName())) {
+ Slog.d(TAG, "Regionalization Excluded:" + file.getName());
+ continue;
}
+ }
+
+ final File ref_file = file;
+ final int ref_parseFlags = parseFlags;
+ final int ref_scanFlags = scanFlags;
+ final long ref_currentTime = currentTime;
+ Runnable scanTask = new Runnable() {
+ public void run() {
+ try {
+ scanPackageTracedLI(ref_file, ref_parseFlags | PackageParser.PARSE_MUST_BE_APK,
+ ref_scanFlags, ref_currentTime, null);
+ } catch (PackageManagerException e) {
+ Slog.w(TAG, "Failed to parse " + ref_file + ": " + e.getMessage());
+
+ // Delete invalid userdata apps
+ if ((ref_parseFlags & PackageParser.PARSE_IS_SYSTEM) == 0 &&
+ e.error == PackageManager.INSTALL_FAILED_INVALID_APK) {
+ logCriticalInfo(Log.WARN, "Deleting invalid package at " + ref_file);
+ removeCodePathLI(ref_file);
+ }
+ }
+ }
+ };
+
+ if (dealer != null)
+ dealer.addTask(scanTask);
+ else
+ scanTask.run();
}
+
+ if (dealer != null)
+ dealer.waitAll();
+ Log.d(TAG, "end scanDirLI:"+dir);
}
private static File getSettingsProblemFile() {
@@ -6787,7 +6919,7 @@
logCriticalInfo(priority, msg);
}
- static void logCriticalInfo(int priority, String msg) {
+ static synchronized void logCriticalInfo(int priority, String msg) {
Slog.println(priority, TAG, msg);
EventLogTags.writePmCriticalInfo(msg);
try {
@@ -6882,9 +7014,10 @@
private PackageParser.Package scanPackageLI(File scanFile, int parseFlags, int scanFlags,
long currentTime, UserHandle user) throws PackageManagerException {
if (DEBUG_INSTALL) Slog.d(TAG, "Parsing: " + scanFile);
- PackageParser pp = new PackageParser();
+ PackageParser pp = new PackageParser(mContext);
pp.setSeparateProcesses(mSeparateProcesses);
pp.setOnlyCoreApps(mOnlyCore);
+ pp.setOnlyPowerOffAlarmApps(mOnlyPowerOffAlarm);
pp.setDisplayMetrics(mMetrics);
if ((scanFlags & SCAN_TRUSTED_OVERLAY) != 0) {
@@ -9397,12 +9530,14 @@
if (ps.pkg != null && ps.pkg.applicationInfo != null &&
!TextUtils.equals(adjustedAbi, ps.pkg.applicationInfo.primaryCpuAbi)) {
ps.pkg.applicationInfo.primaryCpuAbi = adjustedAbi;
+
Slog.i(TAG, "Adjusting ABI for " + ps.name + " to " + adjustedAbi
+ " (requirer="
- + (requirer == null ? "null" : requirer.pkg.packageName)
+ + (requirer == null ? "null" : (requirer.pkg == null ? "null" : requirer.pkg.packageName))
+ ", scannedPackage="
+ (scannedPackage != null ? scannedPackage.packageName : "null")
+ ")");
+
try {
mInstaller.rmdex(ps.codePathString,
getDexCodeInstructionSet(getPreferredInstructionSet()));
@@ -11687,6 +11822,7 @@
@Override
public void installPackageAsUser(String originPath, IPackageInstallObserver2 observer,
int installFlags, String installerPackageName, int userId) {
+ android.util.SeempLog.record(90);
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.INSTALL_PACKAGES, null);
final int callingUid = Binder.getCallingUid();
@@ -13208,7 +13344,12 @@
final int requiredUid = mRequiredVerifierPackage == null ? -1
: getPackageUid(mRequiredVerifierPackage, MATCH_DEBUG_TRIAGED_MISSING,
verifierUser.getIdentifier());
- if (!origin.existing && requiredUid != -1
+
+ final int optionalUid = mOptionalVerifierPackage == null ? -1
+ : getPackageUid(mOptionalVerifierPackage, MATCH_DEBUG_TRIAGED_MISSING,
+ verifierUser.getIdentifier());
+
+ if (!origin.existing && (requiredUid != -1 || optionalUid != -1)
&& isVerificationEnabled(verifierUser.getIdentifier(), installFlags)) {
final Intent verification = new Intent(
Intent.ACTION_PACKAGE_NEEDS_VERIFICATION);
@@ -13290,6 +13431,31 @@
}
}
+ if (mOptionalVerifierPackage != null) {
+ final Intent optionalIntent = new Intent(verification);
+ optionalIntent.setAction("android.intent.action.PACKAGE_NEEDS_OPTIONAL_VERIFICATION");
+ final List<ResolveInfo> optional_receivers = queryIntentReceiversInternal(optionalIntent,
+ PACKAGE_MIME_TYPE, 0, verifierUser.getIdentifier());
+ final ComponentName optionalVerifierComponent = matchComponentForVerifier(
+ mOptionalVerifierPackage, optional_receivers);
+ optionalIntent.setComponent(optionalVerifierComponent);
+ verificationState.addOptionalVerifier(optionalUid);
+ if (mRequiredVerifierPackage != null) {
+ mContext.sendBroadcastAsUser(optionalIntent, verifierUser, android.Manifest.permission.PACKAGE_VERIFICATION_AGENT);
+ } else {
+ mContext.sendOrderedBroadcastAsUser(optionalIntent, verifierUser, android.Manifest.permission.PACKAGE_VERIFICATION_AGENT,
+ new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ final Message msg = mHandler.obtainMessage(CHECK_PENDING_VERIFICATION);
+ msg.arg1 = verificationId;
+ mHandler.sendMessageDelayed(msg, getVerificationTimeout());
+ }
+ }, null, 0, null, null);
+ mArgs = null;
+ }
+ }
+
final ComponentName requiredVerifierComponent = matchComponentForVerifier(
mRequiredVerifierPackage, receivers);
if (ret == PackageManager.INSTALL_SUCCEEDED
@@ -18302,6 +18468,9 @@
// disabled after already being started.
CarrierAppUtils.disableCarrierAppsUntilPrivileged(mContext.getOpPackageName(), this,
mContext.getContentResolver(), UserHandle.USER_SYSTEM);
+ // And also disable any special carrier apps.
+ CarrierAppUtils.disableSpecialCarrierAppsUntilMatched(mContext, this,
+ UserHandle.USER_SYSTEM);
// Read the compatibilty setting when the system is ready.
boolean compatibilityModeEnabled = android.provider.Settings.Global.getInt(
@@ -18315,32 +18484,34 @@
int[] grantPermissionsUserIds = EMPTY_INT_ARRAY;
synchronized (mPackages) {
- // Verify that all of the preferred activity components actually
- // exist. It is possible for applications to be updated and at
- // that point remove a previously declared activity component that
- // had been set as a preferred activity. We try to clean this up
- // the next time we encounter that preferred activity, but it is
- // possible for the user flow to never be able to return to that
- // situation so here we do a sanity check to make sure we haven't
- // left any junk around.
- ArrayList<PreferredActivity> removed = new ArrayList<PreferredActivity>();
- for (int i=0; i<mSettings.mPreferredActivities.size(); i++) {
- PreferredIntentResolver pir = mSettings.mPreferredActivities.valueAt(i);
- removed.clear();
- for (PreferredActivity pa : pir.filterSet()) {
- if (mActivities.mActivities.get(pa.mPref.mComponent) == null) {
- removed.add(pa);
+ if (!mIsAlarmBoot) {
+ // Verify that all of the preferred activity components actually
+ // exist. It is possible for applications to be updated and at
+ // that point remove a previously declared activity component that
+ // had been set as a preferred activity. We try to clean this up
+ // the next time we encounter that preferred activity, but it is
+ // possible for the user flow to never be able to return to that
+ // situation so here we do a sanity check to make sure we haven't
+ // left any junk around.
+ ArrayList<PreferredActivity> removed = new ArrayList<PreferredActivity>();
+ for (int i=0; i<mSettings.mPreferredActivities.size(); i++) {
+ PreferredIntentResolver pir = mSettings.mPreferredActivities.valueAt(i);
+ removed.clear();
+ for (PreferredActivity pa : pir.filterSet()) {
+ if (mActivities.mActivities.get(pa.mPref.mComponent) == null) {
+ removed.add(pa);
+ }
}
- }
- if (removed.size() > 0) {
- for (int r=0; r<removed.size(); r++) {
- PreferredActivity pa = removed.get(r);
- Slog.w(TAG, "Removing dangling preferred activity: "
- + pa.mPref.mComponent);
- pir.removeFilter(pa);
+ if (removed.size() > 0) {
+ for (int r=0; r<removed.size(); r++) {
+ PreferredActivity pa = removed.get(r);
+ Slog.w(TAG, "Removing dangling preferred activity: "
+ + pa.mPref.mComponent);
+ pir.removeFilter(pa);
+ }
+ mSettings.writePackageRestrictionsLPr(
+ mSettings.mPreferredActivities.keyAt(i));
}
- mSettings.writePackageRestrictionsLPr(
- mSettings.mPreferredActivities.keyAt(i));
}
}
diff --git a/services/core/java/com/android/server/pm/PackageVerificationState.java b/services/core/java/com/android/server/pm/PackageVerificationState.java
index 3214e88..d12856d 100644
--- a/services/core/java/com/android/server/pm/PackageVerificationState.java
+++ b/services/core/java/com/android/server/pm/PackageVerificationState.java
@@ -43,6 +43,14 @@
private boolean mRequiredVerificationPassed;
+ private int mOptionalVerifierUid;
+
+ private boolean mHasOptionalVerifier;
+
+ private boolean mOptionalVerificationComplete;
+
+ private boolean mOptionalVerificationPassed;
+
private boolean mExtendedTimeout;
/**
@@ -73,6 +81,11 @@
mSufficientVerifierUids.put(uid, true);
}
+ public void addOptionalVerifier(int uid) {
+ mOptionalVerifierUid = uid;
+ mHasOptionalVerifier = true;
+ }
+
/**
* Should be called when a verification is received from an agent so the
* state of the package verification can be tracked.
@@ -94,6 +107,16 @@
mRequiredVerificationPassed = false;
}
return true;
+ } else if (mHasOptionalVerifier && uid == mOptionalVerifierUid) {
+ mOptionalVerificationComplete = true;
+ switch (code) {
+ case PackageManager.VERIFICATION_ALLOW:
+ mOptionalVerificationPassed = true;
+ break;
+ default:
+ mOptionalVerificationPassed = false;
+ }
+ return true;
} else {
if (mSufficientVerifierUids.get(uid)) {
if (code == PackageManager.VERIFICATION_ALLOW) {
@@ -121,7 +144,11 @@
* @return {@code true} when verification is considered complete
*/
public boolean isVerificationComplete() {
- if (!mRequiredVerificationComplete) {
+ if (mRequiredVerifierUid != -1 && !mRequiredVerificationComplete) {
+ return false;
+ }
+
+ if (mHasOptionalVerifier && !mOptionalVerificationComplete) {
return false;
}
@@ -139,7 +166,11 @@
* @return {@code true} if installation should be allowed
*/
public boolean isInstallAllowed() {
- if (!mRequiredVerificationPassed) {
+ if (mRequiredVerifierUid != -1 && !mRequiredVerificationPassed) {
+ return false;
+ }
+
+ if (mHasOptionalVerifier && !mOptionalVerificationPassed) {
return false;
}
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index 24f877e..59300ca 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -1089,6 +1089,7 @@
mGuestRestrictions.putBoolean(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES, true);
mGuestRestrictions.putBoolean(UserManager.DISALLOW_OUTGOING_CALLS, true);
mGuestRestrictions.putBoolean(UserManager.DISALLOW_SMS, true);
+ mGuestRestrictions.putBoolean(UserManager.DISALLOW_SU, true);
}
}
}
@@ -3452,6 +3453,7 @@
if (user != null && !user.isAdmin()) {
setUserRestriction(UserManager.DISALLOW_SMS, true, user.id);
setUserRestriction(UserManager.DISALLOW_OUTGOING_CALLS, true, user.id);
+ setUserRestriction(UserManager.DISALLOW_SU, true, user.id);
}
return user;
}
diff --git a/services/core/java/com/android/server/pm/UserRestrictionsUtils.java b/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
index 3df13a9..2c1cb3cc 100644
--- a/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
+++ b/services/core/java/com/android/server/pm/UserRestrictionsUtils.java
@@ -105,6 +105,7 @@
UserManager.DISALLOW_SET_WALLPAPER,
UserManager.DISALLOW_OEM_UNLOCK,
UserManager.DISALLLOW_UNMUTE_DEVICE,
+ UserManager.DISALLOW_SU
});
/**
@@ -130,7 +131,8 @@
UserManager.DISALLOW_FUN,
UserManager.DISALLOW_SAFE_BOOT,
UserManager.DISALLOW_CREATE_WINDOWS,
- UserManager.DISALLOW_DATA_ROAMING
+ UserManager.DISALLOW_DATA_ROAMING,
+ UserManager.DISALLOW_SU
);
/**
diff --git a/services/core/java/com/android/server/policy/GlobalActions.java b/services/core/java/com/android/server/policy/GlobalActions.java
index a8bd4d2..2bc1bb2 100644
--- a/services/core/java/com/android/server/policy/GlobalActions.java
+++ b/services/core/java/com/android/server/policy/GlobalActions.java
@@ -42,6 +42,7 @@
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
+import android.os.IPowerManager;
import android.os.Message;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -95,6 +96,7 @@
/* Valid settings for global actions keys.
* see config.xml config_globalActionList */
private static final String GLOBAL_ACTION_KEY_POWER = "power";
+ private static final String GLOBAL_ACTION_KEY_REBOOT = "reboot";
private static final String GLOBAL_ACTION_KEY_AIRPLANE = "airplane";
private static final String GLOBAL_ACTION_KEY_BUGREPORT = "bugreport";
private static final String GLOBAL_ACTION_KEY_SILENT = "silent";
@@ -279,6 +281,8 @@
}
if (GLOBAL_ACTION_KEY_POWER.equals(actionKey)) {
mItems.add(new PowerAction());
+ } else if (GLOBAL_ACTION_KEY_REBOOT.equals(actionKey)) {
+ mItems.add(new RebootAction());
} else if (GLOBAL_ACTION_KEY_AIRPLANE.equals(actionKey)) {
mItems.add(mAirplaneModeOn);
} else if (GLOBAL_ACTION_KEY_BUGREPORT.equals(actionKey)) {
@@ -378,6 +382,35 @@
mWindowManagerFuncs.shutdown(false /* confirm */);
}
}
+
+ private final class RebootAction extends SinglePressAction {
+ private RebootAction() {
+ super(com.android.internal.R.drawable.ic_lock_power_reboot,
+ R.string.global_action_reboot);
+ }
+
+ @Override
+ public boolean showDuringKeyguard() {
+ return true;
+ }
+
+ @Override
+ public boolean showBeforeProvisioning() {
+ return true;
+ }
+
+ @Override
+ public void onPress() {
+ try {
+ IPowerManager pm = IPowerManager.Stub.asInterface(ServiceManager
+ .getService(Context.POWER_SERVICE));
+ pm.reboot(true, null, false);
+ } catch (RemoteException e) {
+ Log.e(TAG, "PowerManager service died!", e);
+ return;
+ }
+ }
+ }
private final class RestartAction extends SinglePressAction implements LongPressAction {
private RestartAction() {
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index 889c52a..ca5c4dc 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -262,6 +262,19 @@
.setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)
.build();
+ /**
+ * Broadcast Action: WiFi Display video is enabled or disabled
+ *
+ * <p>The intent will have the following extra values:</p>
+ * <ul>
+ * <li><em>state</em> - 0 for disabled, 1 for enabled. </li>
+ * </ul>
+ */
+
+ private static final String ACTION_WIFI_DISPLAY_VIDEO =
+ "org.codeaurora.intent.action.WIFI_DISPLAY_VIDEO";
+
+
// The panic gesture may become active only after the keyguard is dismissed and the immersive
// app shows again. If that doesn't happen for 30s we drop the gesture.
private static final long PANIC_GESTURE_EXPIRATION = 30000;
@@ -753,6 +766,8 @@
private static final int MSG_REQUEST_TRANSIENT_BARS_ARG_STATUS = 0;
private static final int MSG_REQUEST_TRANSIENT_BARS_ARG_NAVIGATION = 1;
+ boolean mWifiDisplayConnected = false;
+ int mWifiDisplayCustomRotation = -1;
private class PolicyHandler extends Handler {
@Override
@@ -1878,6 +1893,11 @@
mWindowManagerFuncs.registerPointerEventListener(mSystemGestures);
mVibrator = (Vibrator)context.getSystemService(Context.VIBRATOR_SERVICE);
+
+ /* Register for WIFI Display Intents */
+ IntentFilter wifiDisplayFilter = new IntentFilter(ACTION_WIFI_DISPLAY_VIDEO);
+ Intent wifidisplayIntent = context.registerReceiver(
+ mWifiDisplayReceiver, wifiDisplayFilter);
mLongPressVibePattern = getLongIntArray(mContext.getResources(),
com.android.internal.R.array.config_longPressVibePattern);
mVirtualKeyVibePattern = getLongIntArray(mContext.getResources(),
@@ -3162,6 +3182,17 @@
+ " canceled=" + canceled);
}
+ // If the boot mode is power off alarm, we should not dispatch the several physical keys
+ // in power off alarm UI to avoid pausing power off alarm UI.
+ boolean isAlarmBoot = SystemProperties.getBoolean("ro.alarm_boot", false);
+ if (isAlarmBoot && (keyCode == KeyEvent.KEYCODE_HOME
+ || keyCode == KeyEvent.KEYCODE_SEARCH
+ || keyCode == KeyEvent.KEYCODE_MENU
+ || keyCode == KeyEvent.KEYCODE_APP_SWITCH
+ || keyCode == KeyEvent.KEYCODE_BACK)) {
+ return -1;
+ }
+
// If we think we might have a volume down & power key chord on the way
// but we're not sure, then tell the dispatcher to wait a little while and
// try again later before dispatching.
@@ -6394,6 +6425,24 @@
}
}
+
+ BroadcastReceiver mWifiDisplayReceiver = new BroadcastReceiver() {
+ public void onReceive(Context context, Intent intent) {
+ String action = intent.getAction();
+ if (action.equals(ACTION_WIFI_DISPLAY_VIDEO)) {
+ int state = intent.getIntExtra("state", 0);
+ if(state == 1) {
+ mWifiDisplayConnected = true;
+ } else {
+ mWifiDisplayConnected = false;
+ }
+ mWifiDisplayCustomRotation =
+ intent.getIntExtra("wfd_UIBC_rot", -1);
+ updateRotation(true);
+ }
+ }
+ };
+
// Called on the PowerManager's Notifier thread.
@Override
public void startedGoingToSleep(int why) {
@@ -6828,10 +6877,13 @@
// enable 180 degree rotation while docked.
preferredRotation = mDeskDockEnablesAccelerometer
? sensorRotation : mDeskDockRotation;
- } else if (mHdmiPlugged && mDemoHdmiRotationLock) {
+ } else if ((mHdmiPlugged || mWifiDisplayConnected) && mDemoHdmiRotationLock) {
// Ignore sensor when plugged into HDMI when demo HDMI rotation lock enabled.
// Note that the dock orientation overrides the HDMI orientation.
preferredRotation = mDemoHdmiRotation;
+ } else if (mWifiDisplayConnected && (mWifiDisplayCustomRotation > -1)) {
+ // Ignore sensor when WFD is active and UIBC rotation is enabled
+ preferredRotation = mWifiDisplayCustomRotation;
} else if (mHdmiPlugged && mDockMode == Intent.EXTRA_DOCK_STATE_UNDOCKED
&& mUndockedHdmiRotation >= 0) {
// Ignore sensor when plugged into HDMI and an undocked orientation has
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
index b33f3cf..7528a74 100644
--- a/services/core/java/com/android/server/power/PowerManagerService.java
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
@@ -111,7 +111,7 @@
private static final int MSG_CHECK_FOR_LONG_WAKELOCKS = 4;
// Dirty bit: mWakeLocks changed
- private static final int DIRTY_WAKE_LOCKS = 1 << 0;
+ protected static final int DIRTY_WAKE_LOCKS = 1 << 0;
// Dirty bit: mWakefulness changed
private static final int DIRTY_WAKEFULNESS = 1 << 1;
// Dirty bit: user activity was poked or may have timed out
@@ -203,7 +203,7 @@
// A bitfield that indicates what parts of the power state have
// changed and need to be recalculated.
- private int mDirty;
+ protected int mDirty;
// Indicates whether the device is awake or asleep or somewhere in between.
// This is distinct from the screen power state, which is managed separately.
@@ -222,7 +222,7 @@
private final ArrayList<SuspendBlocker> mSuspendBlockers = new ArrayList<SuspendBlocker>();
// Table of all wake locks acquired by applications.
- private final ArrayList<WakeLock> mWakeLocks = new ArrayList<WakeLock>();
+ protected final ArrayList<WakeLock> mWakeLocks = new ArrayList<WakeLock>();
// A bitfield that summarizes the state of all active wakelocks.
private int mWakeLockSummary;
@@ -493,6 +493,8 @@
// Set of app ids that are temporarily allowed to acquire wakelocks due to high-pri message
int[] mDeviceIdleTempWhitelist = new int[0];
+ private QCNsrmPowerExtension qcNsrmPowExt;
+
private final SparseIntArray mUidState = new SparseIntArray();
// True if theater mode is enabled
@@ -523,7 +525,7 @@
Process.THREAD_PRIORITY_DISPLAY, false /*allowIo*/);
mHandlerThread.start();
mHandler = new PowerManagerHandler(mHandlerThread.getLooper());
-
+ qcNsrmPowExt = new QCNsrmPowerExtension(this);
synchronized (mLock) {
mWakeLockSuspendBlocker = createSuspendBlockerLocked("PowerManagerService.WakeLocks");
mDisplaySuspendBlocker = createSuspendBlockerLocked("PowerManagerService.Display");
@@ -903,6 +905,7 @@
}
mWakeLocks.add(wakeLock);
setWakeLockDisabledStateLocked(wakeLock);
+ qcNsrmPowExt.checkPmsBlockedWakelocks(uid, pid, flags, tag, wakeLock);
notifyAcquire = true;
}
@@ -1049,7 +1052,7 @@
return -1;
}
- private void notifyWakeLockAcquiredLocked(WakeLock wakeLock) {
+ protected void notifyWakeLockAcquiredLocked(WakeLock wakeLock) {
if (mSystemReady && !wakeLock.mDisabled) {
wakeLock.mNotifiedAcquired = true;
mNotifier.onWakeLockAcquired(wakeLock.mFlags, wakeLock.mTag, wakeLock.mPackageName,
@@ -1105,7 +1108,7 @@
}
}
- private void notifyWakeLockReleasedLocked(WakeLock wakeLock) {
+ protected void notifyWakeLockReleasedLocked(WakeLock wakeLock) {
if (mSystemReady && wakeLock.mNotifiedAcquired) {
wakeLock.mNotifiedAcquired = false;
wakeLock.mAcquireTime = 0;
@@ -1426,7 +1429,7 @@
* each time something important changes, and ensure that we do it the same
* way each time. The point is to gather all of the transition logic here.
*/
- private void updatePowerStateLocked() {
+ protected void updatePowerStateLocked() {
if (!mSystemReady || mDirty == 0) {
return;
}
@@ -3154,7 +3157,7 @@
/**
* Represents a wake lock that has been acquired by an application.
*/
- private final class WakeLock implements IBinder.DeathRecipient {
+ protected final class WakeLock implements IBinder.DeathRecipient {
public final IBinder mLock;
public int mFlags;
public String mTag;
@@ -3833,6 +3836,17 @@
Binder.restoreCallingIdentity(ident);
}
}
+
+ @Override
+ /* updates the blocked uids, so if a wake lock is acquired for it
+ * can be released.
+ */
+ public void updateBlockedUids(int uid, boolean isBlocked) {
+ synchronized(mLock) {
+ qcNsrmPowExt.processPmsBlockedUid(uid, isBlocked,
+ mWakeLocks);
+ }
+ }
}
private final class LocalService extends PowerManagerInternal {
diff --git a/services/core/java/com/android/server/power/QCNsrmPowerExtension.java b/services/core/java/com/android/server/power/QCNsrmPowerExtension.java
new file mode 100644
index 0000000..632d5c1
--- /dev/null
+++ b/services/core/java/com/android/server/power/QCNsrmPowerExtension.java
@@ -0,0 +1,160 @@
+/*
+ *Copyright (c) 2016, 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.
+ */
+
+package com.android.server.power;
+
+import java.util.ArrayList;
+
+import android.os.Binder;
+import android.os.PowerManager;
+import android.os.Process;
+import android.util.Slog;
+
+public final class QCNsrmPowerExtension {
+ static final String TAG = "QCNsrmPowerExtn";
+ static final boolean localLOGV = false;
+ private PowerManagerService pmHandle;
+
+ //track the blocked uids in PowerManagerService.
+ private final ArrayList<Integer> mPmsBlockedUids = new ArrayList<Integer>();
+
+ public QCNsrmPowerExtension (PowerManagerService handle) {
+ pmHandle = handle ;
+ }
+
+ protected void checkPmsBlockedWakelocks (
+ int uid, int pid, int flags,
+ String tag, PowerManagerService.WakeLock pMwakeLock
+ ) {
+ if(mPmsBlockedUids.contains(new Integer(uid)) && uid != Process.myUid()) {
+ // wakelock acquisition for blocked uid, disable it.
+ if (localLOGV) {
+ Slog.d(TAG, "uid is blocked disabling wakeLock flags=0x" +
+ Integer.toHexString(flags) + " tag=" + tag + " uid=" +
+ uid + " pid =" + pid);
+ }
+ updatePmsBlockedWakelock(pMwakeLock, true);
+ }
+ }
+
+ private boolean checkWorkSourceObjectId (
+ int uid, PowerManagerService.WakeLock wl
+ ) {
+ try {
+ for (int index = 0; index < wl.mWorkSource.size(); index++) {
+ if (uid == wl.mWorkSource.get(index)) {
+ if (localLOGV) Slog.v(TAG, "WS uid matched");
+ return true;
+ }
+ }
+ }
+ catch (Exception e) {
+ return false;
+ }
+ return false;
+ }
+
+ protected boolean processPmsBlockedUid (
+ int uid, boolean isBlocked,
+ ArrayList<PowerManagerService.WakeLock> mWakeLocks
+ ) {
+ boolean changed = false;
+ if (updatePmsBlockedUidAllowed(uid, isBlocked))
+ return changed;
+
+ for (int index = 0; index < mWakeLocks.size(); index++) {
+ PowerManagerService.WakeLock wl = mWakeLocks.get(index);
+ if(wl != null) {
+ // update the wakelock for the blocked uid
+ if ((wl.mOwnerUid == uid || checkWorkSourceObjectId(uid, wl))
+ || (wl.mTag.startsWith("*sync*") && wl.mOwnerUid ==
+ Process.SYSTEM_UID)) {
+ if(updatePmsBlockedWakelock(wl, isBlocked)) {
+ changed = true;
+ }
+ }
+ }
+ }
+ if(changed) {
+ pmHandle.mDirty |= pmHandle.DIRTY_WAKE_LOCKS;
+ pmHandle.updatePowerStateLocked();
+ }
+ return changed;
+ }
+
+ protected boolean updatePmsBlockedUidAllowed (
+ int uid, boolean isBlocked
+ ) {
+ if (localLOGV) Slog.v(TAG, "updateBlockedUids: uid = " + uid +
+ "isBlocked = " + isBlocked);
+ if (Binder.getCallingUid() != Process.SYSTEM_UID) {
+ if (localLOGV) Slog.v(TAG, "UpdateBlockedUids is not allowed");
+ return true;
+ }
+ updatePmsBlockedUids(uid, isBlocked);
+ return false;
+ }
+
+ private void updatePmsBlockedUids (int uid, boolean isBlocked) {
+ if(isBlocked) {
+ if (localLOGV) Slog.v(TAG, "adding powerMgr mPmBlockedUids "+
+ "with uid "+ uid);
+ mPmsBlockedUids.add(new Integer(uid));
+ }
+ else {
+ if (localLOGV) Slog.v(TAG, "clearing powerMgr mPmBlockedUids ");
+ mPmsBlockedUids.clear();
+ }
+ }
+
+ private boolean updatePmsBlockedWakelock (
+ PowerManagerService.WakeLock wakeLock, boolean update
+ ) {
+ if (wakeLock != null && ((wakeLock.mFlags &
+ PowerManager.WAKE_LOCK_LEVEL_MASK
+ ) == PowerManager.PARTIAL_WAKE_LOCK )) {
+ if (wakeLock.mDisabled != update && pmHandle != null) {
+ wakeLock.mDisabled = update;
+ if (localLOGV) Slog.v(TAG, "updatePmsBlockWakelock pmHandle "+pmHandle);
+ if (wakeLock.mDisabled) {
+ // This wake lock is no longer being respected.
+ pmHandle.notifyWakeLockReleasedLocked(wakeLock);
+ } else {
+ pmHandle.notifyWakeLockAcquiredLocked(wakeLock);
+ }
+ return true;
+ }
+ else {
+ if (localLOGV) Slog.v(TAG, "updatePmsBlockWakelock pmHandle "+pmHandle );
+ }
+ }
+ return false;
+ }
+}
+
diff --git a/services/core/java/com/android/server/power/ShutdownThread.java b/services/core/java/com/android/server/power/ShutdownThread.java
index badee82..e586db7 100644
--- a/services/core/java/com/android/server/power/ShutdownThread.java
+++ b/services/core/java/com/android/server/power/ShutdownThread.java
@@ -18,6 +18,7 @@
package com.android.server.power;
import android.app.ActivityManagerNative;
+import android.app.AlarmManager;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.IActivityManager;
@@ -60,13 +61,17 @@
import java.io.FileReader;
import java.io.IOException;
+import java.lang.reflect.Method;
+
public final class ShutdownThread extends Thread {
// constants
private static final String TAG = "ShutdownThread";
private static final int PHONE_STATE_POLL_SLEEP_MSEC = 500;
// maximum time we wait for the shutdown broadcast before going on.
private static final int MAX_BROADCAST_TIME = 10*1000;
- private static final int MAX_SHUTDOWN_WAIT_TIME = 20*1000;
+ // maximun time we wait for the mountservice before going on.
+ // Short time may cause unmount fail if 3rd app occupy files, but no impact on app use.
+ private static final int MAX_SHUTDOWN_WAIT_TIME = SystemProperties.getInt("sys.shutdown.waittime",20*1000);
private static final int MAX_RADIO_WAIT_TIME = 12*1000;
private static final int MAX_UNCRYPT_WAIT_TIME = 15*60*1000;
// constants for progress bar. the values are roughly estimated based on timeout.
@@ -146,13 +151,25 @@
}
}
+ boolean showRebootOption = false;
+ String[] defaultActions = context.getResources().getStringArray(
+ com.android.internal.R.array.config_globalActionsList);
+ for (int i = 0; i < defaultActions.length; i++) {
+ if (defaultActions[i].equals("reboot")) {
+ showRebootOption = true;
+ break;
+ }
+ }
final int longPressBehavior = context.getResources().getInteger(
com.android.internal.R.integer.config_longPressOnPowerBehavior);
- final int resourceId = mRebootSafeMode
+ int resourceId = mRebootSafeMode
? com.android.internal.R.string.reboot_safemode_confirm
: (longPressBehavior == 2
? com.android.internal.R.string.shutdown_confirm_question
: com.android.internal.R.string.shutdown_confirm);
+ if (showRebootOption && !mRebootSafeMode) {
+ resourceId = com.android.internal.R.string.reboot_confirm;
+ }
Log.d(TAG, "Notifying thread to start shutdown longPressBehavior=" + longPressBehavior);
@@ -164,7 +181,9 @@
sConfirmDialog = new AlertDialog.Builder(context)
.setTitle(mRebootSafeMode
? com.android.internal.R.string.reboot_safemode_title
- : com.android.internal.R.string.power_off)
+ : showRebootOption
+ ? com.android.internal.R.string.reboot_title
+ : com.android.internal.R.string.power_off)
.setMessage(resourceId)
.setPositiveButton(com.android.internal.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
@@ -494,6 +513,26 @@
uncrypt();
}
+
+ // If it is alarm boot and encryption status, power off alarm status will
+ // be set to handled when device go to shutdown or reboot.
+ boolean isAlarmBoot = SystemProperties.getBoolean("ro.alarm_boot", false);
+ String cryptState = SystemProperties.get("vold.decrypt");
+
+ if (isAlarmBoot &&
+ ("trigger_restart_min_framework".equals(cryptState) ||
+ "1".equals(cryptState))) {
+ AlarmManager.writePowerOffAlarmFile(AlarmManager.POWER_OFF_ALARM_HANDLE_FILE,
+ AlarmManager.POWER_OFF_ALARM_HANDLED);
+ }
+
+ // If it is factory data reset, value in POWER_OFF_ALARM_TIMEZONE_FILE will be cleared.
+ if (mReboot && PowerManager.REBOOT_RECOVERY.equals(mReason)) {
+ AlarmManager.writePowerOffAlarmFile(AlarmManager.POWER_OFF_ALARM_TIMEZONE_FILE, "");
+ } else {
+ AlarmManager.writePowerOffAlarmFile(AlarmManager.POWER_OFF_ALARM_TIMEZONE_FILE,
+ SystemProperties.get("persist.sys.timezone"));
+ }
rebootOrShutdown(mContext, mReboot, mReason);
}
@@ -633,6 +672,33 @@
}
/**
+ * OEM shutdown handler. This function will load the oem-services jar file
+ * and call into the rebootOrShutdown method defined there if present
+ */
+ private static void deviceRebootOrShutdown(boolean reboot, String reason)
+ {
+ Class<?> cl;
+ String deviceShutdownClassName = "com.qti.server.power.ShutdownOem";
+ String deviceShutdownMethodName = "rebootOrShutdown";
+ try {
+ cl = Class.forName(deviceShutdownClassName);
+ Method m;
+ try {
+ m = cl.getMethod(deviceShutdownMethodName, new Class[] {boolean.class, String.class});
+ m.invoke(cl.newInstance(), reboot, reason);
+ } catch (NoSuchMethodException ex) {
+ Log.e(TAG, "Unable to find method " + deviceShutdownMethodName + " in class " + deviceShutdownClassName);
+ } catch (Exception ex) {
+ Log.e(TAG, "Unknown exception while trying to invoke " + deviceShutdownMethodName);
+ }
+ } catch (ClassNotFoundException e) {
+ Log.e(TAG, "Unable to find class " + deviceShutdownClassName);
+ } catch (Exception e) {
+ Log.e(TAG, "Unknown exception while loading class " + deviceShutdownClassName);
+ }
+ }
+
+ /**
* Do not call this directly. Use {@link #reboot(Context, String, boolean)}
* or {@link #shutdown(Context, boolean)} instead.
*
@@ -641,6 +707,8 @@
* @param reason reason for reboot/shutdown
*/
public static void rebootOrShutdown(final Context context, boolean reboot, String reason) {
+ // Call oem shutdown handler
+ deviceRebootOrShutdown(reboot, reason);
if (reboot) {
Log.i(TAG, "Rebooting, reason: " + reason);
PowerManagerService.lowLevelReboot(reason);
diff --git a/services/core/java/com/android/server/vr/VrManagerService.java b/services/core/java/com/android/server/vr/VrManagerService.java
index a9a6aa1..14fe0e8 100644
--- a/services/core/java/com/android/server/vr/VrManagerService.java
+++ b/services/core/java/com/android/server/vr/VrManagerService.java
@@ -539,16 +539,12 @@
false, mOverlayToken, null, oldUserId);
}
- if (!mVrModeEnabled) {
- return;
- }
-
// Apply the restrictions for the current user based on vr state
String[] exemptions = (exemptedPackage == null) ? new String[0] :
new String[] { exemptedPackage };
appOpsManager.setUserRestrictionForUser(AppOpsManager.OP_SYSTEM_ALERT_WINDOW,
- true, mOverlayToken, exemptions, newUserId);
+ mVrModeEnabled, mOverlayToken, exemptions, newUserId);
}
private void updateDependentAppOpsLocked(String newVrServicePackage, int newUserId,
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index d7535bb..2422691 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -261,6 +261,7 @@
if (DEBUG) {
Slog.v(TAG, "moved-to, therefore restore; reloading metadata");
}
+ SELinux.restorecon(changedFile);
loadSettingsLocked(wallpaper.userId, true);
}
generateCrop(wallpaper);
@@ -1089,7 +1090,7 @@
final WallpaperData fallback = new WallpaperData(wallpaper.userId,
WALLPAPER_LOCK_ORIG, WALLPAPER_LOCK_CROP);
ensureSaneWallpaperData(fallback);
- bindWallpaperComponentLocked(mImageWallpaper, true, false, fallback, reply);
+ bindWallpaperComponentLocked(cname, true, false, fallback, reply);
mWaitingForUnlock = true;
}
}
diff --git a/services/core/java/com/android/server/wm/DimLayer.java b/services/core/java/com/android/server/wm/DimLayer.java
index 052b2f5..4e00176 100644
--- a/services/core/java/com/android/server/wm/DimLayer.java
+++ b/services/core/java/com/android/server/wm/DimLayer.java
@@ -193,13 +193,14 @@
}
if (mDimSurface != null) {
- mDimSurface.setPosition(mBounds.left, mBounds.top);
- mDimSurface.setSize(mBounds.width(), mBounds.height());
- if (DEBUG_DIM_LAYER) Slog.v(TAG,
- "adjustBounds user=" + mUser.toShortString() + " mBounds=" + mBounds);
+ if(!mLastBounds.equals(mBounds)) {
+ mDimSurface.setPosition(mBounds.left, mBounds.top);
+ mDimSurface.setSize(mBounds.width(), mBounds.height());
+ if (DEBUG_DIM_LAYER) Slog.v(TAG,
+ "adjustBounds user=" + mUser.toShortString() + " mBounds=" + mBounds);
+ mLastBounds.set(mBounds);
+ }
}
-
- mLastBounds.set(mBounds);
}
private void getBoundsForFullscreen(Rect outBounds) {
diff --git a/services/core/java/com/android/server/wm/TaskTapPointerEventListener.java b/services/core/java/com/android/server/wm/TaskTapPointerEventListener.java
index fb556d2..532891e 100644
--- a/services/core/java/com/android/server/wm/TaskTapPointerEventListener.java
+++ b/services/core/java/com/android/server/wm/TaskTapPointerEventListener.java
@@ -25,6 +25,7 @@
import android.view.WindowManagerPolicy.PointerEventListener;
import com.android.server.wm.WindowManagerService.H;
+import com.android.server.am.ActivityManagerService;
import static android.view.PointerIcon.TYPE_NOT_SPECIFIED;
import static android.view.PointerIcon.TYPE_DEFAULT;
@@ -63,6 +64,17 @@
public void onPointerEvent(MotionEvent motionEvent) {
doGestureDetection(motionEvent);
+ if (ActivityManagerService.sIsFreqAggrBoostSet) {
+ ActivityManagerService.sFreqAggr_init.perfLockRelease();
+ ActivityManagerService.sFreqAggr.perfLockRelease();
+ ActivityManagerService.sIsFreqAggrBoostSet = false;
+ }
+
+ if (ActivityManagerService.sIsLaunchBoostv2_set) {
+ ActivityManagerService.sPerfBoost_v2.perfLockRelease();
+ ActivityManagerService.sIsLaunchBoostv2_set = false;
+ }
+
final int action = motionEvent.getAction();
switch (action & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN: {
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 2203ebb..0050519f 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -127,6 +127,7 @@
import android.view.inputmethod.InputMethodManagerInternal;
import com.android.internal.R;
+import com.android.internal.app.ActivityTrigger;
import com.android.internal.app.IAssistScreenshotReceiver;
import com.android.internal.os.IResultReceiver;
import com.android.internal.policy.IShortcutService;
@@ -264,7 +265,10 @@
static final boolean PROFILE_ORIENTATION = false;
static final boolean localLOGV = DEBUG;
-
+ static final boolean mEnableAnimCheck = SystemProperties.getBoolean("persist.animcheck.enable", false);
+ static ActivityTrigger mActivityTrigger = new ActivityTrigger();
+ static WindowState mFocusingWindow;
+ String mFocusingActivity;
/** How much to multiply the policy's type layer, to reserve room
* for multiple windows of the same type and Z-ordering adjustment
* with TYPE_LAYER_OFFSET. */
@@ -349,6 +353,11 @@
private static final String PROPERTY_BUILD_DATE_UTC = "ro.build.date.utc";
+ /*define misc. activty trigger function*/
+ static final int START_PROCESS = 1;
+ static final int NETWORK_OPTS = 2;
+ static final int ANIMATION_SCALE = 3;
+
// Enums for animation scale update types.
@Retention(RetentionPolicy.SOURCE)
@IntDef({WINDOW_ANIMATION_SCALE, TRANSITION_ANIMATION_SCALE, ANIMATION_DURATION_SCALE})
@@ -1884,6 +1893,7 @@
long origId;
final int callingUid = Binder.getCallingUid();
final int type = attrs.type;
+ mFocusingActivity = attrs.getTitle().toString();
synchronized(mWindowMap) {
if (!mDisplayReady) {
@@ -5737,12 +5747,38 @@
ValueAnimator.setDurationScale(scale);
}
+ private float animationScalesCheck (int which) {
+ float value = -1.0f;
+ if (!mAnimationsDisabled) {
+ if (mEnableAnimCheck) {
+ if (mFocusingActivity != null) {
+ if (mActivityTrigger == null) {
+ mActivityTrigger = new ActivityTrigger();
+ }
+ if (mActivityTrigger != null) {
+ value = mActivityTrigger.activityMiscTrigger(ANIMATION_SCALE, mFocusingActivity, which, 0);
+ }
+ }
+ }
+ if (value == -1.0f) {
+ switch (which) {
+ case WINDOW_ANIMATION_SCALE: value = mWindowAnimationScaleSetting; break;
+ case TRANSITION_ANIMATION_SCALE: value = mTransitionAnimationScaleSetting; break;
+ case ANIMATION_DURATION_SCALE: value = mAnimatorDurationScaleSetting; break;
+ }
+ }
+ } else {
+ value = 0;
+ }
+ return value;
+ }
+
public float getWindowAnimationScaleLocked() {
- return mAnimationsDisabled ? 0 : mWindowAnimationScaleSetting;
+ return animationScalesCheck(WINDOW_ANIMATION_SCALE);
}
public float getTransitionAnimationScaleLocked() {
- return mAnimationsDisabled ? 0 : mTransitionAnimationScaleSetting;
+ return animationScalesCheck(TRANSITION_ANIMATION_SCALE);
}
@Override
@@ -5764,7 +5800,7 @@
@Override
public float getCurrentAnimatorScale() {
synchronized(mWindowMap) {
- return mAnimationsDisabled ? 0 : mAnimatorDurationScaleSetting;
+ return animationScalesCheck(ANIMATION_DURATION_SCALE);
}
}
@@ -10034,6 +10070,12 @@
// No focus for you!!!
if (localLOGV || DEBUG_FOCUS_LIGHT) Slog.v(TAG_WM,
"findFocusedWindow: Reached focused app=" + mFocusedApp);
+ if (mFocusedApp.hasWindowsAlive()) {
+ mFocusingWindow = mFocusedApp.findMainWindow();
+ if (mFocusingWindow != null) {
+ mFocusingActivity = mFocusingWindow.mAttrs.getTitle().toString();
+ }
+ }
return null;
}
}
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 228ef1a..cfa2c99 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -30,6 +30,7 @@
import android.os.RemoteCallbackList;
import android.os.RemoteException;
import android.os.SystemClock;
+import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle;
import android.os.WorkSource;
@@ -2102,7 +2103,10 @@
return false;
}
- if (DEBUG_DISABLE_SAVING_SURFACES) {
+ boolean disableSaveSurface = SystemProperties
+ .getBoolean("persist.sys.disableSaveSurface", false);
+
+ if (DEBUG_DISABLE_SAVING_SURFACES || disableSaveSurface) {
return false;
}
diff --git a/services/core/jni/com_android_server_AlarmManagerService.cpp b/services/core/jni/com_android_server_AlarmManagerService.cpp
index 246ab0d..2138458 100644
--- a/services/core/jni/com_android_server_AlarmManagerService.cpp
+++ b/services/core/jni/com_android_server_AlarmManagerService.cpp
@@ -51,6 +51,7 @@
CLOCK_BOOTTIME_ALARM,
CLOCK_BOOTTIME,
CLOCK_MONOTONIC,
+ CLOCK_POWEROFF_ALARM,
CLOCK_REALTIME,
};
/* to match the legacy alarm driver implementation, we need an extra
@@ -63,6 +64,7 @@
virtual ~AlarmImpl();
virtual int set(int type, struct timespec *ts) = 0;
+ virtual int clear(int type, struct timespec *ts) = 0;
virtual int setTime(struct timeval *tv) = 0;
virtual int waitForAlarm() = 0;
@@ -77,6 +79,7 @@
AlarmImplAlarmDriver(int fd) : AlarmImpl(&fd, 1) { }
int set(int type, struct timespec *ts);
+ int clear(int type, struct timespec *ts);
int setTime(struct timeval *tv);
int waitForAlarm();
};
@@ -89,6 +92,7 @@
~AlarmImplTimerFd();
int set(int type, struct timespec *ts);
+ int clear(int type, struct timespec *ts);
int setTime(struct timeval *tv);
int waitForAlarm();
@@ -116,6 +120,11 @@
return ioctl(fds[0], ANDROID_ALARM_SET(type), ts);
}
+int AlarmImplAlarmDriver::clear(int type, struct timespec *ts)
+{
+ return ioctl(fds[0], ANDROID_ALARM_CLEAR(type), ts);
+}
+
int AlarmImplAlarmDriver::setTime(struct timeval *tv)
{
struct timespec ts;
@@ -162,6 +171,23 @@
return timerfd_settime(fds[type], TFD_TIMER_ABSTIME, &spec, NULL);
}
+int AlarmImplTimerFd::clear(int type, struct timespec *ts)
+{
+ if (type > ANDROID_ALARM_TYPE_COUNT) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ ts->tv_sec = 0;
+ ts->tv_nsec = 0;
+
+ struct itimerspec spec;
+ memset(&spec, 0, sizeof(spec));
+ memcpy(&spec.it_value, ts, sizeof(spec.it_value));
+
+ return timerfd_settime(fds[type], TFD_TIMER_ABSTIME, &spec, NULL);
+}
+
int AlarmImplTimerFd::setTime(struct timeval *tv)
{
struct rtc_time rtc;
@@ -443,6 +469,24 @@
}
}
+static void android_server_AlarmManagerService_clear(JNIEnv*, jobject, jlong nativeData, jint type, jlong seconds,
+ jlong nanoseconds)
+{
+ AlarmImpl *impl = reinterpret_cast<AlarmImpl *>(nativeData);
+ struct timespec ts;
+ ts.tv_sec = seconds;
+ ts.tv_nsec = nanoseconds;
+
+ int result = impl->clear(type, &ts);
+ if (result < 0)
+ {
+ ALOGE("Unable to clear alarm %lld.%09lld: %s\n",
+ static_cast<long long>(seconds),
+ static_cast<long long>(nanoseconds), strerror(errno));
+ }
+}
+
+
static jint android_server_AlarmManagerService_waitForAlarm(JNIEnv*, jobject, jlong nativeData)
{
AlarmImpl *impl = reinterpret_cast<AlarmImpl *>(nativeData);
@@ -467,6 +511,7 @@
{"init", "()J", (void*)android_server_AlarmManagerService_init},
{"close", "(J)V", (void*)android_server_AlarmManagerService_close},
{"set", "(JIJJ)V", (void*)android_server_AlarmManagerService_set},
+ {"clear", "(JIJJ)V", (void*)android_server_AlarmManagerService_clear},
{"waitForAlarm", "(J)I", (void*)android_server_AlarmManagerService_waitForAlarm},
{"setKernelTime", "(JJ)I", (void*)android_server_AlarmManagerService_setKernelTime},
{"setKernelTimezone", "(JI)I", (void*)android_server_AlarmManagerService_setKernelTimezone},
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 910b43f..e6b1bdc 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -8664,6 +8664,13 @@
}
}
+ public boolean isRuntimePermission(String permissionName) throws NameNotFoundException {
+ final PackageManager packageManager = mContext.getPackageManager();
+ PermissionInfo permissionInfo = packageManager.getPermissionInfo(permissionName, 0);
+ return (permissionInfo.protectionLevel & PermissionInfo.PROTECTION_MASK_BASE)
+ == PermissionInfo.PROTECTION_DANGEROUS;
+ }
+
@Override
public int getPermissionGrantState(ComponentName admin, String packageName,
String permission) throws RemoteException {
@@ -9587,13 +9594,6 @@
}
}
- public boolean isRuntimePermission(String permissionName) throws NameNotFoundException {
- final PackageManager packageManager = mContext.getPackageManager();
- PermissionInfo permissionInfo = packageManager.getPermissionInfo(permissionName, 0);
- return (permissionInfo.protectionLevel & PermissionInfo.PROTECTION_MASK_BASE)
- == PermissionInfo.PROTECTION_DANGEROUS;
- }
-
@Override
public boolean isNetworkLoggingEnabled(ComponentName admin) {
if (!mHasFeature) {
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 653c5e9..4fd302a4 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -31,6 +31,8 @@
import android.os.Environment;
import android.os.FactoryTest;
import android.os.FileUtils;
+import android.os.IBinder;
+import android.os.IPowerManager;
import android.os.Looper;
import android.os.PowerManager;
import android.os.RemoteException;
@@ -51,6 +53,7 @@
import com.android.internal.R;
import com.android.internal.app.NightDisplayController;
import com.android.internal.os.BinderInternal;
+import com.android.internal.os.RegionalizationEnvironment;
import com.android.internal.os.SamplingProfilerIntegration;
import com.android.internal.os.ZygoteInit;
import com.android.internal.policy.EmergencyAffordanceManager;
@@ -79,6 +82,7 @@
import com.android.server.net.NetworkPolicyManagerService;
import com.android.server.net.NetworkStatsService;
import com.android.server.notification.NotificationManagerService;
+import com.android.server.os.RegionalizationService;
import com.android.server.os.SchedulingPolicyService;
import com.android.server.pm.BackgroundDexOptService;
import com.android.server.pm.Installer;
@@ -105,6 +109,9 @@
import com.android.server.wm.WindowManagerService;
import dalvik.system.VMRuntime;
+import dalvik.system.PathClassLoader;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
import java.io.File;
import java.io.IOException;
@@ -208,6 +215,7 @@
private boolean mOnlyCore;
private boolean mFirstBoot;
+ private boolean mIsAlarmBoot;
private final boolean mRuntimeRestart;
/**
@@ -451,12 +459,26 @@
// Only run "core" apps if we're encrypting the device.
String cryptState = SystemProperties.get("vold.decrypt");
+
+ mIsAlarmBoot = SystemProperties.getBoolean("ro.alarm_boot", false);
if (ENCRYPTING_STATE.equals(cryptState)) {
Slog.w(TAG, "Detected encryption in progress - only parsing core apps");
mOnlyCore = true;
} else if (ENCRYPTED_STATE.equals(cryptState)) {
Slog.w(TAG, "Device encrypted - only parsing core apps");
mOnlyCore = true;
+ } else if (mIsAlarmBoot) {
+ // power off alarm mode is similar to encryption mode. Only power off alarm
+ // applications will be parsed by packageParser. Some services or settings are
+ // not necessary to power off alarm mode. So reuse mOnlyCore for power off alarm
+ // mode.
+ mOnlyCore = true;
+ }
+
+ if (RegionalizationEnvironment.isSupported()) {
+ Slog.i(TAG, "Regionalization Service");
+ RegionalizationService regionalizationService = new RegionalizationService();
+ ServiceManager.addService("regionalization", regionalizationService);
}
// Start the package manager.
@@ -539,6 +561,8 @@
ConsumerIrService consumerIr = null;
MmsServiceBroker mmsService = null;
HardwarePropertiesManagerService hardwarePropertiesService = null;
+ Object wigigP2pService = null;
+ Object wigigService = null;
boolean disableStorage = SystemProperties.getBoolean("config.disable_storage", false);
boolean disableBluetooth = SystemProperties.getBoolean("config.disable_bluetooth", false);
@@ -565,6 +589,7 @@
false);
boolean isEmulator = SystemProperties.get("ro.kernel.qemu").equals("1");
+ boolean enableWigig = SystemProperties.getBoolean("persist.wigig.enable", false);
try {
Slog.i(TAG, "Reading configuration...");
@@ -854,6 +879,31 @@
mSystemServiceManager.startService("com.android.server.wifi.RttService");
}
+ if (enableWigig) {
+ try {
+ Slog.i(TAG, "Wigig Service");
+ PathClassLoader wigigClassLoader =
+ new PathClassLoader("/system/framework/wigig-service.jar",
+ "/system/lib64:/system/vendor/lib64",
+ getClass().getClassLoader());
+ Class wigigP2pClass = wigigClassLoader.loadClass(
+ "com.qualcomm.qti.server.wigig.p2p.WigigP2pServiceImpl");
+ Constructor<Class> ctor = wigigP2pClass.getConstructor(Context.class);
+ wigigP2pService = ctor.newInstance(context);
+ Slog.i(TAG, "Successfully loaded WigigP2pServiceImpl class");
+ ServiceManager.addService("wigigp2p", (IBinder) wigigP2pService);
+
+ Class wigigClass = wigigClassLoader.loadClass(
+ "com.qualcomm.qti.server.wigig.WigigService");
+ ctor = wigigClass.getConstructor(Context.class);
+ wigigService = ctor.newInstance(context);
+ Slog.i(TAG, "Successfully loaded WigigService class");
+ ServiceManager.addService("wigig", (IBinder) wigigService);
+ } catch (Throwable e) {
+ reportWtf("starting WigigService", e);
+ }
+ }
+
if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_ETHERNET) ||
mPackageManager.hasSystemFeature(PackageManager.FEATURE_USB_HOST)) {
mSystemServiceManager.startService(ETHERNET_SERVICE_CLASS);
@@ -951,7 +1001,7 @@
mSystemServiceManager.startService(DropBoxManagerService.class);
if (!disableNonCoreServices && context.getResources().getBoolean(
- R.bool.config_enableWallpaperService)) {
+ R.bool.config_enableWallpaperService) && !mIsAlarmBoot) {
traceBeginAndSlog("StartWallpaperManagerService");
mSystemServiceManager.startService(WALLPAPER_SERVICE_CLASS);
Trace.traceEnd(Trace.TRACE_TAG_SYSTEM_SERVER);
@@ -964,8 +1014,8 @@
if (!disableNonCoreServices) {
mSystemServiceManager.startService(DockObserver.class);
- if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
- mSystemServiceManager.startService(THERMAL_OBSERVER_CLASS);
+ if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
+ //#Fixme:mSystemServiceManager.startService(THERMAL_OBSERVER_CLASS);
}
}
@@ -1033,8 +1083,9 @@
mSystemServiceManager.startService(BACKUP_MANAGER_SERVICE_CLASS);
}
- if (mPackageManager.hasSystemFeature(PackageManager.FEATURE_APP_WIDGETS)
- || context.getResources().getBoolean(R.bool.config_enableAppWidgetService)) {
+ if ((mPackageManager.hasSystemFeature(PackageManager.FEATURE_APP_WIDGETS)
+ || context.getResources().getBoolean(R.bool.config_enableAppWidgetService))
+ && !mIsAlarmBoot) {
mSystemServiceManager.startService(APPWIDGET_SERVICE_CLASS);
}
@@ -1190,6 +1241,9 @@
}
if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
+ //#Fixme:mSystemServiceManager.startService(WEAR_BLUETOOTH_SERVICE_CLASS);
+ /* #These Wear Services are part of google.clockwork project
+ #and actually these are not present in the code
mSystemServiceManager.startService(WEAR_BLUETOOTH_SERVICE_CLASS);
mSystemServiceManager.startService(WEAR_WIFI_MEDIATOR_SERVICE_CLASS);
if (SystemProperties.getBoolean("config.enable_cellmediator", false)) {
@@ -1197,7 +1251,7 @@
}
if (!disableNonCoreServices) {
mSystemServiceManager.startService(WEAR_TIME_SERVICE_CLASS);
- }
+ }*/
}
// Before things start rolling, be sure we have decided whether
@@ -1246,6 +1300,26 @@
mSystemServiceManager.startBootPhase(SystemService.PHASE_SYSTEM_SERVICES_READY);
Trace.traceBegin(Trace.TRACE_TAG_SYSTEM_SERVER, "MakeWindowManagerServiceReady");
+
+ // Wigig services are not registered as system services because of class loader
+ // limitations, send boot phase notification separately
+ if (enableWigig) {
+ try {
+ Slog.i(TAG, "calling onBootPhase for Wigig Services");
+ Class wigigP2pClass = wigigP2pService.getClass();
+ Method m = wigigP2pClass.getMethod("onBootPhase", int.class);
+ m.invoke(wigigP2pService, new Integer(
+ SystemService.PHASE_SYSTEM_SERVICES_READY));
+
+ Class wigigClass = wigigService.getClass();
+ m = wigigClass.getMethod("onBootPhase", int.class);
+ m.invoke(wigigService, new Integer(
+ SystemService.PHASE_SYSTEM_SERVICES_READY));
+ } catch (Throwable e) {
+ reportWtf("Wigig services ready", e);
+ }
+ }
+
try {
wm.systemReady();
} catch (Throwable e) {
diff --git a/services/net/java/android/net/dhcp/DhcpClient.java b/services/net/java/android/net/dhcp/DhcpClient.java
index ffbea9f..7083ac5 100644
--- a/services/net/java/android/net/dhcp/DhcpClient.java
+++ b/services/net/java/android/net/dhcp/DhcpClient.java
@@ -40,6 +40,7 @@
import android.system.ErrnoException;
import android.system.Os;
import android.system.PacketSocketAddress;
+import android.util.EventLog;
import android.util.Log;
import android.util.SparseArray;
import android.util.TimeUtils;
@@ -126,6 +127,9 @@
public static final int CMD_CONFIGURE_LINKADDRESS = PUBLIC_BASE + 8;
public static final int EVENT_LINKADDRESS_CONFIGURED = PUBLIC_BASE + 9;
+ /* Command from controller to start DHCP with Rapid commit */
+ public static final int CMD_START_DHCP_RAPID_COMMIT = PUBLIC_BASE + 10;
+
/* Message.arg1 arguments to CMD_POST_DHCP_ACTION notification */
public static final int DHCP_SUCCESS = 1;
public static final int DHCP_FAILURE = 2;
@@ -193,6 +197,8 @@
private DhcpResults mDhcpLease;
private long mDhcpLeaseExpiry;
private DhcpResults mOffer;
+ public boolean mRapidCommit;
+ public boolean mDiscoverSent;
// Milliseconds SystemClock timestamps used to record transition times to DhcpBoundState.
private long mLastInitEnterTime;
@@ -202,6 +208,7 @@
private State mStoppedState = new StoppedState();
private State mDhcpState = new DhcpState();
private State mDhcpInitState = new DhcpInitState();
+ private State mDhcpRapidCommitInitState = new DhcpRapidCommitInitState();
private State mDhcpSelectingState = new DhcpSelectingState();
private State mDhcpRequestingState = new DhcpRequestingState();
private State mDhcpHaveLeaseState = new DhcpHaveLeaseState();
@@ -212,6 +219,7 @@
private State mDhcpInitRebootState = new DhcpInitRebootState();
private State mDhcpRebootingState = new DhcpRebootingState();
private State mWaitBeforeStartState = new WaitBeforeStartState(mDhcpInitState);
+ private State mRapidCommitWaitBeforeStartState = new WaitBeforeStartState(mDhcpRapidCommitInitState);
private State mWaitBeforeRenewalState = new WaitBeforeRenewalState(mDhcpRenewingState);
private WakeupMessage makeWakeupMessage(String cmdName, int cmd) {
@@ -229,7 +237,9 @@
addState(mStoppedState);
addState(mDhcpState);
addState(mDhcpInitState, mDhcpState);
+ addState(mDhcpRapidCommitInitState, mDhcpState);
addState(mWaitBeforeStartState, mDhcpState);
+ addState(mRapidCommitWaitBeforeStartState, mDhcpState);
addState(mDhcpSelectingState, mDhcpState);
addState(mDhcpRequestingState, mDhcpState);
addState(mDhcpHaveLeaseState, mDhcpState);
@@ -369,6 +379,13 @@
if (PACKET_DBG) {
Log.d(TAG, HexDump.dumpHexString(mPacket, 0, length));
}
+ if (e.errorCode == DhcpErrorEvent.DHCP_NO_COOKIE) {
+ int snetTagId = 0x534e4554;
+ String bugId = "31850211";
+ int uid = -1;
+ String data = DhcpPacket.ParseException.class.getName();
+ EventLog.writeEvent(snetTagId, bugId, uid, data);
+ }
logError(e.errorCode);
}
}
@@ -408,10 +425,17 @@
return true;
}
+ public ByteBuffer buildDiscoverWithRapidCommitPacket() {
+ startNewTransaction();
+ return DhcpPacket.buildDiscoverPacket(
+ DhcpPacket.ENCAP_L2, mTransactionId, getSecs(), mHwAddr,
+ DO_UNICAST, REQUESTED_PARAMS, mRapidCommit);
+ }
+
private boolean sendDiscoverPacket() {
ByteBuffer packet = DhcpPacket.buildDiscoverPacket(
DhcpPacket.ENCAP_L2, mTransactionId, getSecs(), mHwAddr,
- DO_UNICAST, REQUESTED_PARAMS);
+ DO_UNICAST, REQUESTED_PARAMS, mRapidCommit);
return transmitPacket(packet, "DHCPDISCOVER", DhcpPacket.ENCAP_L2, INADDR_BROADCAST);
}
@@ -576,12 +600,75 @@
transitionTo(mDhcpInitState);
}
return HANDLED;
+ case CMD_START_DHCP_RAPID_COMMIT:
+ mRapidCommit = message.arg1 == 1 ? true: false;
+ mDiscoverSent = message.arg2 == 1 ? true : false;
+ if (mRegisteredForPreDhcpNotification) {
+ if (mRapidCommit) {
+ transitionTo(mRapidCommitWaitBeforeStartState);
+ } else {
+ transitionTo(mWaitBeforeStartState);
+ }
+ } else {
+ if (mRapidCommit) {
+ transitionTo(mDhcpRapidCommitInitState);
+ } else {
+ transitionTo(mDhcpInitState);
+ }
+ }
+ return HANDLED;
default:
return NOT_HANDLED;
}
}
}
+ class DhcpRapidCommitInitState extends PacketRetransmittingState {
+ public DhcpRapidCommitInitState() {
+ super();
+ }
+
+ @Override
+ public void enter() {
+ super.enter();
+ if (!mDiscoverSent) {
+ startNewTransaction();
+ }
+ mLastInitEnterTime = SystemClock.elapsedRealtime();
+ }
+
+ protected boolean sendPacket() {
+ if (mDiscoverSent) {
+ mDiscoverSent = false;
+ return true;
+ }
+ return sendDiscoverPacket();
+ }
+
+ protected void receivePacket(DhcpPacket packet) {
+ if (!isValidPacket(packet)) return;
+ if (packet instanceof DhcpOfferPacket) {
+ mOffer = packet.toDhcpResults();
+ if (mOffer != null) {
+ Log.d(TAG, "DhcpRapidCommitInitState:Got pending lease: " + mOffer);
+ transitionTo(mDhcpRequestingState);
+ }
+ } else if ((packet instanceof DhcpAckPacket)) {
+ DhcpResults results = packet.toDhcpResults();
+ Log.d(TAG,"Received ACK in DhcpRapidCommitInitState");
+ if (results != null) {
+ setDhcpLeaseExpiry(packet);
+ acceptDhcpResults(results, "Confirmed");
+ transitionTo(mConfiguringInterfaceState);
+ }
+ } else if (packet instanceof DhcpNakPacket) {
+ Log.d(TAG, "Received NAK in DhcpRapidCommitInitState, returning to INIT");
+ mOffer = null;
+ transitionTo(mDhcpInitState);
+ }
+ }
+ }
+
class WaitBeforeStartState extends WaitBeforeOtherState {
public WaitBeforeStartState(State otherState) {
super();
diff --git a/services/net/java/android/net/dhcp/DhcpDiscoverPacket.java b/services/net/java/android/net/dhcp/DhcpDiscoverPacket.java
index 91e6bd6..f2d0c08 100644
--- a/services/net/java/android/net/dhcp/DhcpDiscoverPacket.java
+++ b/services/net/java/android/net/dhcp/DhcpDiscoverPacket.java
@@ -29,6 +29,11 @@
DhcpDiscoverPacket(int transId, short secs, byte[] clientMac, boolean broadcast) {
super(transId, secs, INADDR_ANY, INADDR_ANY, INADDR_ANY, INADDR_ANY, clientMac, broadcast);
}
+ DhcpDiscoverPacket(int transId, short secs, byte[] clientMac, boolean broadcast,
+ boolean rapidCommit) {
+ super(transId, secs, INADDR_ANY, INADDR_ANY, INADDR_ANY, INADDR_ANY,
+ clientMac, broadcast, rapidCommit);
+ }
public String toString() {
String s = super.toString();
@@ -55,6 +60,9 @@
addTlv(buffer, DHCP_CLIENT_IDENTIFIER, getClientId());
addCommonClientTlvs(buffer);
addTlv(buffer, DHCP_PARAMETER_LIST, mRequestedParams);
+ if (mRapidCommit) {
+ addTlv(buffer, DHCP_OPTION_RAPID_COMMIT);
+ }
addTlvEnd(buffer);
}
}
diff --git a/services/net/java/android/net/dhcp/DhcpPacket.java b/services/net/java/android/net/dhcp/DhcpPacket.java
index 060ded6..0129ca3 100644
--- a/services/net/java/android/net/dhcp/DhcpPacket.java
+++ b/services/net/java/android/net/dhcp/DhcpPacket.java
@@ -253,6 +253,11 @@
protected static final byte DHCP_CLIENT_IDENTIFIER = 61;
/**
+ * DHCP zero-length option code: rapid commit
+ */
+ protected static final byte DHCP_OPTION_RAPID_COMMIT = 80;
+
+ /**
* DHCP zero-length option code: pad
*/
protected static final byte DHCP_OPTION_PAD = 0x00;
@@ -293,6 +298,11 @@
protected final byte[] mClientMac;
/**
+ * Whether the packet should be built with rapid commit option
+ */
+ protected boolean mRapidCommit;
+
+ /**
* Asks the packet object to create a ByteBuffer serialization of
* the packet for transmission.
*/
@@ -312,7 +322,7 @@
protected DhcpPacket(int transId, short secs, Inet4Address clientIp, Inet4Address yourIp,
Inet4Address nextIp, Inet4Address relayIp,
- byte[] clientMac, boolean broadcast) {
+ byte[] clientMac, boolean broadcast, boolean rapidCommit) {
mTransId = transId;
mSecs = secs;
mClientIp = clientIp;
@@ -321,6 +331,14 @@
mRelayIp = relayIp;
mClientMac = clientMac;
mBroadcast = broadcast;
+ mRapidCommit = rapidCommit;
+ }
+
+ protected DhcpPacket(int transId, short secs, Inet4Address clientIp, Inet4Address yourIp,
+ Inet4Address nextIp, Inet4Address relayIp,
+ byte[] clientMac, boolean broadcast) {
+ this(transId, secs, clientIp, yourIp, nextIp,
+ relayIp, clientMac, broadcast, false);
}
/**
@@ -520,6 +538,14 @@
}
/**
+ * Adds an optional parameter not containing any payload.
+ */
+ protected static void addTlv(ByteBuffer buf, byte type) {
+ buf.put(type);
+ buf.put((byte) 0);
+ }
+
+ /**
* Adds an optional parameter containing a single byte value.
*/
protected static void addTlv(ByteBuffer buf, byte type, byte value) {
@@ -1171,8 +1197,14 @@
*/
public static ByteBuffer buildDiscoverPacket(int encap, int transactionId,
short secs, byte[] clientMac, boolean broadcast, byte[] expectedParams) {
+ return buildDiscoverPacket(encap, transactionId, secs, clientMac,
+ broadcast, expectedParams, false);
+ }
+ public static ByteBuffer buildDiscoverPacket(int encap, int transactionId,
+ short secs, byte[] clientMac, boolean broadcast, byte[] expectedParams,
+ boolean rapidCommit) {
DhcpPacket pkt = new DhcpDiscoverPacket(
- transactionId, secs, clientMac, broadcast);
+ transactionId, secs, clientMac, broadcast, rapidCommit);
pkt.mRequestedParams = expectedParams;
return pkt.buildPacket(encap, DHCP_SERVER, DHCP_CLIENT);
}
diff --git a/services/net/java/android/net/ip/IpManager.java b/services/net/java/android/net/ip/IpManager.java
index abdf683..1d0632c 100644
--- a/services/net/java/android/net/ip/IpManager.java
+++ b/services/net/java/android/net/ip/IpManager.java
@@ -58,6 +58,7 @@
import java.net.SocketException;
import java.util.Objects;
import java.util.StringJoiner;
+import java.nio.ByteBuffer;
/**
@@ -331,6 +332,8 @@
/* package */ StaticIpConfiguration mStaticIpConfig;
/* package */ ApfCapabilities mApfCapabilities;
/* package */ int mProvisioningTimeoutMs = DEFAULT_TIMEOUT_MS;
+ /* package */ public boolean mRapidCommit;
+ /* package */ public boolean mDiscoverSent;
public ProvisioningConfiguration() {}
@@ -342,6 +345,8 @@
mStaticIpConfig = other.mStaticIpConfig;
mApfCapabilities = other.mApfCapabilities;
mProvisioningTimeoutMs = other.mProvisioningTimeoutMs;
+ mRapidCommit = other.mRapidCommit;
+ mDiscoverSent = other.mDiscoverSent;
}
@Override
@@ -605,7 +610,7 @@
}
public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
- if (args.length > 0 && DUMP_ARG_CONFIRM.equals(args[0])) {
+ if (args != null && args.length > 0 && DUMP_ARG_CONFIRM.equals(args[0])) {
// Execute confirmConfiguration() and take no further action.
confirmConfiguration();
return;
@@ -1012,7 +1017,12 @@
// Start DHCPv4.
mDhcpClient = DhcpClient.makeDhcpClient(mContext, IpManager.this, mInterfaceName);
mDhcpClient.registerForPreDhcpNotification();
- mDhcpClient.sendMessage(DhcpClient.CMD_START_DHCP);
+ if (mConfiguration.mRapidCommit || mConfiguration.mDiscoverSent)
+ mDhcpClient.sendMessage(DhcpClient.CMD_START_DHCP_RAPID_COMMIT,
+ (mConfiguration.mRapidCommit ? 1: 0),
+ (mConfiguration.mDiscoverSent ? 1: 0));
+ else
+ mDhcpClient.sendMessage(DhcpClient.CMD_START_DHCP);
}
return true;
@@ -1058,6 +1068,11 @@
return (mIpReachabilityMonitor != null);
}
+
+ public ByteBuffer buildDiscoverWithRapidCommitPacket() {
+ return mDhcpClient.buildDiscoverWithRapidCommitPacket();
+ }
+
private void stopAllIP() {
// We don't need to worry about routes, just addresses, because:
// - disableIpv6() will clear autoconf IPv6 routes as well, and
diff --git a/services/tests/servicestests/src/android/net/dhcp/DhcpPacketTest.java b/services/tests/servicestests/src/android/net/dhcp/DhcpPacketTest.java
index bc8baa1..b4e9db7 100644
--- a/services/tests/servicestests/src/android/net/dhcp/DhcpPacketTest.java
+++ b/services/tests/servicestests/src/android/net/dhcp/DhcpPacketTest.java
@@ -27,7 +27,6 @@
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Random;
import junit.framework.TestCase;
import static android.net.dhcp.DhcpPacket.*;
@@ -431,7 +430,7 @@
try {
DhcpPacket offerPacket = DhcpPacket.decodeFullPacket(packet, packet.length, ENCAP_L3);
} catch (DhcpPacket.ParseException expected) {
- assertDhcpErrorCodes(DhcpErrorEvent.DHCP_NO_COOKIE, expected.errorCode);
+ assertDhcpErrorCodes(DhcpErrorEvent.PARSING_ERROR, expected.errorCode);
return;
}
fail("Dhcp packet parsing should have failed");
@@ -473,55 +472,6 @@
assertEquals(Integer.toHexString(expected), Integer.toHexString(got));
}
- public void testTruncatedOfferPackets() throws Exception {
- final byte[] packet = HexDump.hexStringToByteArray(
- // IP header.
- "450001518d0600004011144dc0a82b01c0a82bf7" +
- // UDP header.
- "00430044013d9ac7" +
- // BOOTP header.
- "02010600dfc23d1f0002000000000000c0a82bf7c0a82b0100000000" +
- // MAC address.
- "30766ff2a90c00000000000000000000" +
- // Server name.
- "0000000000000000000000000000000000000000000000000000000000000000" +
- "0000000000000000000000000000000000000000000000000000000000000000" +
- // File.
- "0000000000000000000000000000000000000000000000000000000000000000" +
- "0000000000000000000000000000000000000000000000000000000000000000" +
- "0000000000000000000000000000000000000000000000000000000000000000" +
- "0000000000000000000000000000000000000000000000000000000000000000" +
- // Options
- "638253633501023604c0a82b01330400000e103a04000007083b0400000c4e0104ffffff00" +
- "1c04c0a82bff0304c0a82b010604c0a82b012b0f414e44524f49445f4d455445524544ff");
-
- for (int len = 0; len < packet.length; len++) {
- try {
- DhcpPacket.decodeFullPacket(packet, len, ENCAP_L3);
- } catch (ParseException e) {
- if (e.errorCode == DhcpErrorEvent.PARSING_ERROR) {
- fail(String.format("bad truncated packet of length %d", len));
- }
- }
- }
- }
-
- public void testRandomPackets() throws Exception {
- final int maxRandomPacketSize = 512;
- final Random r = new Random();
- for (int i = 0; i < 10000; i++) {
- byte[] packet = new byte[r.nextInt(maxRandomPacketSize + 1)];
- r.nextBytes(packet);
- try {
- DhcpPacket.decodeFullPacket(packet, packet.length, ENCAP_L3);
- } catch (ParseException e) {
- if (e.errorCode == DhcpErrorEvent.PARSING_ERROR) {
- fail("bad packet: " + HexDump.toHexString(packet));
- }
- }
- }
- }
-
private byte[] mtuBytes(int mtu) {
// 0x1a02: option 26, length 2. 0xff: no more options.
if (mtu > Short.MAX_VALUE - Short.MIN_VALUE) {
diff --git a/services/usb/java/com/android/server/usb/UsbDeviceManager.java b/services/usb/java/com/android/server/usb/UsbDeviceManager.java
old mode 100644
new mode 100755
index 4908408..31ed62d
--- a/services/usb/java/com/android/server/usb/UsbDeviceManager.java
+++ b/services/usb/java/com/android/server/usb/UsbDeviceManager.java
@@ -354,7 +354,6 @@
SystemProperties.get(USB_STATE_PROPERTY));
mAdbEnabled = UsbManager.containsFunction(getDefaultFunctions(),
UsbManager.USB_FUNCTION_ADB);
-
/**
* Remove MTP from persistent config, to bring usb to a good state
* after fixes to b/31814300. This block can be removed after the update
@@ -364,8 +363,19 @@
SystemProperties.set(USB_PERSISTENT_CONFIG_PROPERTY,
UsbManager.removeFunction(persisted, UsbManager.USB_FUNCTION_MTP));
}
+
+ boolean usbDataUnlocked = false;
- setEnabledFunctions(null, false, false);
+ if (mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_usb_data_unlock)) {
+ boolean mtpEnable = UsbManager.containsFunction(getDefaultFunctions(),
+ UsbManager.USB_FUNCTION_MTP);
+ boolean ptpEnable = UsbManager.containsFunction(getDefaultFunctions(),
+ UsbManager.USB_FUNCTION_PTP);
+ if (mtpEnable || ptpEnable) usbDataUnlocked = true;
+ }
+
+ setEnabledFunctions(null, false, usbDataUnlocked);
String state = FileUtils.readTextFile(new File(STATE_PATH), 0, null).trim();
updateState(state);
@@ -576,7 +586,11 @@
}
private String applyAdbFunction(String functions) {
- if (mAdbEnabled) {
+ //Not enable adb when it s charging mode
+ //Now take MTP and mUsbDataUnlocked false as charging mode
+ if (mAdbEnabled &&
+ !(UsbManager.containsFunction(functions, UsbManager.USB_FUNCTION_MTP)
+ && !mUsbDataUnlocked)) {
functions = UsbManager.addFunction(functions, UsbManager.USB_FUNCTION_ADB);
} else {
functions = UsbManager.removeFunction(functions, UsbManager.USB_FUNCTION_ADB);
diff --git a/services/usb/java/com/android/server/usb/UsbService.java b/services/usb/java/com/android/server/usb/UsbService.java
old mode 100644
new mode 100755
index daccc00..fb92e70
--- a/services/usb/java/com/android/server/usb/UsbService.java
+++ b/services/usb/java/com/android/server/usb/UsbService.java
@@ -313,6 +313,7 @@
case UsbManager.USB_FUNCTION_MTP:
case UsbManager.USB_FUNCTION_PTP:
case UsbManager.USB_FUNCTION_RNDIS:
+ case UsbManager.USB_FUNCTION_CHARGING:
return true;
}
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index 58c5002..fb5e3b9 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -255,8 +255,20 @@
*/
public static final int CAPABILITY_CAN_PULL_CALL = 0x00800000;
+ /**
+ * Call has voice privacy capability.
+ * @hide
+ */
+ public static final int CAPABILITY_VOICE_PRIVACY = 0x01000000;
+
+ /**
+ * Add participant in an active or conference call option
+ * @hide
+ */
+ public static final int CAPABILITY_ADD_PARTICIPANT = 0x02000000;
+
//******************************************************************************************
- // Next CAPABILITY value: 0x01000000
+ // Next CAPABILITY value: 0x04000000
//******************************************************************************************
/**
@@ -417,6 +429,12 @@
if (can(capabilities, CAPABILITY_CAN_PULL_CALL)) {
builder.append(" CAPABILITY_CAN_PULL_CALL");
}
+ if (can(capabilities, CAPABILITY_VOICE_PRIVACY)) {
+ builder.append(" CAPABILITY_VOICE_PRIVACY");
+ }
+ if (can(capabilities, CAPABILITY_ADD_PARTICIPANT)) {
+ builder.append(" CAPABILITY_ADD_PARTICIPANT");
+ }
builder.append("]");
return builder.toString();
}
diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java
index a012082..5f568a3 100644
--- a/telecomm/java/android/telecom/Conference.java
+++ b/telecomm/java/android/telecom/Conference.java
@@ -61,6 +61,7 @@
public void onStatusHintsChanged(Conference conference, StatusHints statusHints) {}
public void onExtrasChanged(Conference c, Bundle extras) {}
public void onExtrasRemoved(Conference c, List<String> keys) {}
+ public void onConferenceMergeFailed(Conference conference) {}
}
private final Set<Listener> mListeners = new CopyOnWriteArraySet<>();
@@ -270,6 +271,14 @@
public void onSeparate(Connection connection) {}
/**
+ * Invoked when the conference adds a participant to the conference call.
+ *
+ * @param participant The participant to be added with conference call.
+ * @hide
+ */
+ public void onAddParticipant(String participant) {}
+
+ /**
* Notifies the {@link Conference} when the specified {@link Connection} should merged with the
* conference call.
*
@@ -795,6 +804,16 @@
}
/**
+ * Update conference merge failure {@link Conference}.
+ * @hide
+ */
+ public final void updateMergeConferenceFailed() {
+ for (Listener l : mListeners) {
+ l.onConferenceMergeFailed(this);
+ }
+ }
+
+ /**
* Removes extras from this {@link Conference}.
*
* @param keys The keys of the extras to remove.
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index 6cf9828..db607e2 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -318,8 +318,22 @@
*/
public static final int CAPABILITY_CAN_PULL_CALL = 0x01000000;
+ /**
+ * Call has voice privacy capability.
+ * @hide
+ */
+ public static final int CAPABILITY_VOICE_PRIVACY = 0x02000000;
+
+ /**
+ * Add participant in an active or conference call option
+ *
+ * @hide
+ */
+ public static final int CAPABILITY_ADD_PARTICIPANT = 0x04000000;
+
+
//**********************************************************************************************
- // Next CAPABILITY value: 0x02000000
+ // Next CAPABILITY value: 0x08000000
//**********************************************************************************************
/**
diff --git a/telecomm/java/android/telecom/ConnectionRequest.java b/telecomm/java/android/telecom/ConnectionRequest.java
index aba38fe..c6811209 100644
--- a/telecomm/java/android/telecom/ConnectionRequest.java
+++ b/telecomm/java/android/telecom/ConnectionRequest.java
@@ -28,7 +28,7 @@
public final class ConnectionRequest implements Parcelable {
// TODO: Token to limit recursive invocations
- private final PhoneAccountHandle mAccountHandle;
+ private PhoneAccountHandle mAccountHandle;
private final Uri mAddress;
private final Bundle mExtras;
private final int mVideoState;
@@ -94,6 +94,9 @@
*/
public PhoneAccountHandle getAccountHandle() { return mAccountHandle; }
+ /** {@hide} */
+ public void setAccountHandle(PhoneAccountHandle acc) { mAccountHandle = acc; }
+
/**
* The handle (e.g., phone number) to which the {@link Connection} is to connect.
*/
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index f782232..591f5e8 100644
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -106,6 +106,8 @@
private static final int MSG_PULL_EXTERNAL_CALL = 22;
private static final int MSG_SEND_CALL_EVENT = 23;
private static final int MSG_ON_EXTRAS_CHANGED = 24;
+ //Proprietary values starts after this.
+ private static final int MSG_ADD_PARTICIPANT_WITH_CONFERENCE = 30;
private static Connection sNullConnection;
@@ -232,6 +234,14 @@
}
@Override
+ public void addParticipantWithConference(String callId, String participant) {
+ SomeArgs args = SomeArgs.obtain();
+ args.arg1 = callId;
+ args.arg2 = participant;
+ mHandler.obtainMessage(MSG_ADD_PARTICIPANT_WITH_CONFERENCE, args).sendToTarget();
+ }
+
+ @Override
public void mergeConference(String callId) {
mHandler.obtainMessage(MSG_MERGE_CONFERENCE, callId).sendToTarget();
}
@@ -390,6 +400,17 @@
case MSG_SPLIT_FROM_CONFERENCE:
splitFromConference((String) msg.obj);
break;
+ case MSG_ADD_PARTICIPANT_WITH_CONFERENCE: {
+ SomeArgs args = (SomeArgs) msg.obj;
+ try {
+ String callId = (String) args.arg1;
+ String participant = (String) args.arg2;
+ addParticipantWithConference(callId, participant);
+ } finally {
+ args.recycle();
+ }
+ break;
+ }
case MSG_MERGE_CONFERENCE:
mergeConference((String) msg.obj);
break;
@@ -542,6 +563,14 @@
mAdapter.removeExtras(id, keys);
}
}
+
+ @Override
+ public void onConferenceMergeFailed(Conference c) {
+ String id = mIdByConference.get(c);
+ if (id != null) {
+ mAdapter.onConferenceMergeFailed(id);
+ }
+ }
};
private final Connection.Listener mConnectionListener = new Connection.Listener() {
@@ -944,6 +973,17 @@
}
}
+ private void addParticipantWithConference(String callId, String participant) {
+ Log.d(this, "ConnectionService addParticipantWithConference(%s, %s)", participant, callId);
+ Conference conference = findConferenceForAction(callId, "addParticipantWithConference");
+ Connection connection = findConnectionForAction(callId, "addParticipantWithConnection");
+ if (connection != getNullConnection()) {
+ onAddParticipant(connection, participant);
+ } else if (conference != getNullConference()) {
+ conference.onAddParticipant(participant);
+ }
+ }
+
private void mergeConference(String callId) {
Log.d(this, "mergeConference(%s)", callId);
Conference conference = findConferenceForAction(callId, "mergeConference");
@@ -1298,6 +1338,19 @@
public void onConference(Connection connection1, Connection connection2) {}
/**
+ * Add participant with connection. Invoked when user has made a request to add
+ * participant with specified connection. In response, the participant should add with
+ * the connection.
+ *
+ * @param connection A connection where participant need to add.
+ * @param participant Address of participant which will be added.
+ * @return
+ *
+ * @hide
+ */
+ public void onAddParticipant(Connection connection, String participant) {}
+
+ /**
* Indicates that a remote conference has been created for existing {@link RemoteConnection}s.
* When this method is invoked, this {@link ConnectionService} should create its own
* representation of the conference call and send it to telecom using {@link #addConference}.
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index aa32769..c06fb3a 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -153,6 +153,17 @@
"android.telecom.action.DEFAULT_DIALER_CHANGED";
/**
+ *@hide Broadcast intent action indicating the call type(CS call or Non-CS call).
+ * The string extra {@link #EXTRA_CALL_TYPE_CS} will contain the
+ * boolean value true if call is CS call else false.
+ *
+ * @see #EXTRA_CALL_TYPE_CS
+ */
+ public static final String ACTION_CALL_TYPE =
+ "codeaurora.telecom.action.CALL_TYPE";
+
+
+ /**
* Extra value used to provide the package name for {@link #ACTION_CHANGE_DEFAULT_DIALER}.
*/
public static final String EXTRA_CHANGE_DEFAULT_DIALER_PACKAGE_NAME =
@@ -280,6 +291,13 @@
"android.telecom.extra.CALL_TECHNOLOGY_TYPE";
/**
+ *@hide Extra value used to provide the call type for {@link #ACTION_CALL_TYPE}.
+ */
+ public static final String EXTRA_CALL_TYPE_CS =
+ "codeaurora.telecom.extra.CALL_TYPE_CS";
+
+
+ /**
* An optional {@link android.content.Intent#ACTION_CALL} intent extra denoting the
* package name of the app specifying an alternative gateway for the call.
* The value is a string.
diff --git a/telecomm/java/com/android/internal/telecom/IConnectionService.aidl b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
index a4c1798..e85dfb9 100644
--- a/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
+++ b/telecomm/java/com/android/internal/telecom/IConnectionService.aidl
@@ -81,4 +81,6 @@
void sendCallEvent(String callId, String event, in Bundle extras);
void onExtrasChanged(String callId, in Bundle extras);
+
+ void addParticipantWithConference(String callId, String recipients);
}
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index 2c888f9..7c88fe0 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -338,6 +338,18 @@
"carrier_default_wfc_ims_roaming_enabled_bool";
/**
+ * Carrier supports Cellular-preferred mode only, in home network:
+ * true In home network, wifi calling mode preference is always
+ * set to Cellular-preferred.
+ * false Wifi calling mode preference set as per user preference or other
+ * wifi calling mode related configs.
+ *
+ * @hide
+ */
+ public static final String KEY_CARRIER_WFC_ONLY_CELL_PREF_IN_HOME_NET_BOOL =
+ "carrier_wfc_only_cell_pref_in_home_net_bool";
+
+ /**
* Flag indicating whether failed calls due to no service should prompt the user to enable
* WIFI calling. When {@code true}, if the user attempts to establish a call when there is no
* service available, they are connected to WIFI, and WIFI calling is disabled, a different
@@ -741,6 +753,12 @@
"broadcast_emergency_call_state_changes_bool";
/**
+ * Flag specifying whether CDMA call waiting and call forwarding are enabled
+ * @hide
+ */
+ public static final String KEY_CDMA_CW_CF_ENABLED_BOOL = "cdma_cw_cf_enabled_bool";
+
+ /**
* Cell broadcast additional channels enbled by the carrier
* @hide
*/
@@ -756,7 +774,6 @@
public static final String KEY_STK_DISABLE_LAUNCH_BROWSER_BOOL =
"stk_disable_launch_browser_bool";
-
// These variables are used by the MMS service and exposed through another API, {@link
// SmsManager}. The variable names and string values are copied from there.
public static final String KEY_MMS_ALIAS_ENABLED_BOOL = "aliasEnabled";
@@ -896,6 +913,31 @@
/** @hide */
public static final int CDMA_ROAMING_MODE_ANY = 2;
+ /**
+ * Key that determines if ACTIVATE_REJECT_GGSN is to be treated as a permanent error.
+ * @hide
+ */
+ public static final String KEY_REJECT_GGSN_PERM_FAILURE = "reject_ggsn_perm_failure";
+
+ /**
+ * Key that determines if PROTOCOL_ERRORS is treated as permanent error.
+ * @hide
+ */
+ public static final String KEY_PROTOCOL_ERRORS_PERM_FAILURE = "protocol_errors_perm_failure";
+
+ /**
+ * Key that determines if anonymous users to be mapped to presentation restricted
+ * @hide
+ */
+ public static final String KEY_MAP_ANONYMOUS_TO_RESTRICTED_BOOL =
+ "carrier_map_anonymous_to_restricted";
+
+ /**
+ * Configuration to play sms ringtone during MO/MT call.
+ * @hide
+ */
+ public static final String KEY_CONFIG_SMS_RINGTONE_INCALL = "config_sms_ringtone_incall";
+
/**
* Report IMEI as device id even if it's a CDMA/LTE phone.
*
@@ -1105,6 +1147,7 @@
sDefaults.putBoolean(KEY_CARRIER_WFC_SUPPORTS_WIFI_ONLY_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_DEFAULT_WFC_IMS_ENABLED_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_ENABLED_BOOL, false);
+ sDefaults.putBoolean(KEY_CARRIER_WFC_ONLY_CELL_PREF_IN_HOME_NET_BOOL, false);
sDefaults.putBoolean(KEY_CARRIER_PROMOTE_WFC_ON_CALL_FAIL_BOOL, false);
sDefaults.putInt(KEY_CARRIER_DEFAULT_WFC_IMS_MODE_INT, 2);
sDefaults.putInt(KEY_CARRIER_DEFAULT_WFC_IMS_ROAMING_MODE_INT, 2);
@@ -1177,6 +1220,7 @@
new String[]{"default", "mms", "dun", "supl"});
sDefaults.putStringArray(KEY_CARRIER_METERED_ROAMING_APN_TYPES_STRINGS,
new String[]{"default", "mms", "dun", "supl"});
+ sDefaults.putBoolean(KEY_CDMA_CW_CF_ENABLED_BOOL, false);
sDefaults.putStringArray(KEY_GSM_ROAMING_NETWORKS_STRING_ARRAY, null);
sDefaults.putStringArray(KEY_GSM_NONROAMING_NETWORKS_STRING_ARRAY, null);
@@ -1201,6 +1245,8 @@
sDefaults.putBoolean(KEY_CONFIG_WIFI_DISABLE_IN_ECBM, false);
sDefaults.putBoolean(KEY_CARRIER_NAME_OVERRIDE_BOOL, false);
sDefaults.putString(KEY_CARRIER_NAME_STRING, "");
+ sDefaults.putBoolean(KEY_REJECT_GGSN_PERM_FAILURE,true);
+ sDefaults.putBoolean(KEY_PROTOCOL_ERRORS_PERM_FAILURE,true);
// MMS defaults
sDefaults.putBoolean(KEY_MMS_ALIAS_ENABLED_BOOL, false);
@@ -1264,6 +1310,8 @@
sDefaults.putStringArray(FILTERED_CNAP_NAMES_STRING_ARRAY, null);
sDefaults.putBoolean(KEY_EDITABLE_WFC_ROAMING_MODE_BOOL, false);
sDefaults.putBoolean(KEY_STK_DISABLE_LAUNCH_BROWSER_BOOL, false);
+ sDefaults.putBoolean(KEY_MAP_ANONYMOUS_TO_RESTRICTED_BOOL, true);
+ sDefaults.putBoolean(KEY_CONFIG_SMS_RINGTONE_INCALL, true);
sDefaults.putStringArray(KEY_CARRIER_WIFI_STRING_ARRAY, null);
sDefaults.putInt(KEY_PREF_NETWORK_NOTIFICATION_DELAY_INT, -1);
sDefaults.putBoolean(KEY_EDITABLE_TETHER_APN_BOOL, false);
diff --git a/telephony/java/android/telephony/DisconnectCause.java b/telephony/java/android/telephony/DisconnectCause.java
index 88fd848..1c1d4e4 100644
--- a/telephony/java/android/telephony/DisconnectCause.java
+++ b/telephony/java/android/telephony/DisconnectCause.java
@@ -233,12 +233,68 @@
*/
public static final int DIALED_ON_WRONG_SLOT = 56;
+
/**
* The call being placed was detected as a call forwarding number and was being dialed while
* roaming on a carrier that does not allow this.
* @hide
*/
public static final int DIALED_CALL_FORWARDING_WHILE_ROAMING = 57;
+ public static final int NO_CIRCUIT_AVAIL = 58;
+ public static final int NO_ROUTE_TO_DESTINAON = 59;
+ public static final int OPERATOR_DETERMINED_BARRING = 60;
+ public static final int CALL_FAIL_NO_USER_RESPONDING = 61;
+ public static final int CALL_FAIL_NO_ANSWER_FROM_USER = 62;
+ public static final int CALL_FAIL_DESTINATION_OUT_OF_ORDER = 63;
+ public static final int BEARER_CAPABILITY_NOT_AUTHORIZED = 64;
+ public static final int CHANNEL_UNACCEPTABLE = 65;
+ public static final int CALL_REJECTED = 66;
+ public static final int NUMBER_CHANGED = 67;
+ public static final int PREEMPTION = 68;
+ public static final int FACILITY_REJECTED = 69;
+ public static final int RESP_TO_STATUS_ENQUIRY = 70;
+ public static final int NORMAL_UNSPECIFIED = 71;
+ public static final int NETWORK_OUT_OF_ORDER = 72;
+ public static final int TEMPORARY_FAILURE = 73;
+ public static final int SWITCHING_EQUIPMENT_CONGESTION = 74;
+ public static final int ACCESS_INFORMATION_DISCARDED = 75;
+ public static final int REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 76;
+ public static final int RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 77;
+ public static final int QOS_UNAVAILABLE = 78;
+ public static final int REQUESTED_FACILITY_NOT_SUBSCRIBED = 79;
+ public static final int INCOMING_CALLS_BARRED_WITHIN_CUG = 80;
+ public static final int BEARER_CAPABILITY_UNAVAILABLE = 81;
+ public static final int SERVICE_OPTION_NOT_AVAILABLE = 82;
+ public static final int BEARER_SERVICE_NOT_IMPLEMENTED = 83;
+ public static final int REQUESTED_FACILITY_NOT_IMPLEMENTED = 84;
+ public static final int ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 85;
+ public static final int SERVICE_OR_OPTION_NOT_IMPLEMENTED = 86;
+ public static final int INVALID_TRANSACTION_IDENTIFIER = 87;
+ public static final int USER_NOT_MEMBER_OF_CUG = 88;
+ public static final int INCOMPATIBLE_DESTINATION = 89;
+ public static final int INVALID_TRANSIT_NW_SELECTION = 90;
+ public static final int SEMANTICALLY_INCORRECT_MESSAGE = 91;
+ public static final int INVALID_MANDATORY_INFORMATION = 92;
+ public static final int MESSAGE_TYPE_NON_IMPLEMENTED = 93;
+ public static final int MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 94;
+ public static final int INFORMATION_ELEMENT_NON_EXISTENT = 95;
+ public static final int CONDITIONAL_IE_ERROR = 96;
+ public static final int MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 97;
+ public static final int RECOVERY_ON_TIMER_EXPIRED = 98;
+ public static final int PROTOCOL_ERROR_UNSPECIFIED = 99;
+ public static final int INTERWORKING_UNSPECIFIED = 100;
+ public static final int LOCAL_LOW_BATTERY = 101;
+ public static final int LOW_BATTERY = 102;
+
+ /** EMERGENCY call failed with temporary fail cause */
+ public static final int EMERGENCY_TEMP_FAILURE = 103;
+ /** EMERGENCY call failed with permanent fail cause */
+ public static final int EMERGENCY_PERM_FAILURE = 104;
+
+ /** call failed due to LTE to 3G/2G handover not feasible */
+ public static final int HO_NOT_FEASIBLE = 105;
+
+ public static final int NON_SELECTED_USER_CLEARING = 106;
//*********************************************************************************************
// When adding a disconnect type:
@@ -248,14 +304,14 @@
// 4) Update toString() with the newly added disconnect type.
// 5) Update android.telecom.DisconnectCauseUtil with any mappings to a telecom.DisconnectCause.
//
- // NextId: 58
+ // NextId: 107
//*********************************************************************************************
/** Smallest valid value for call disconnect codes. */
public static final int MINIMUM_VALID_VALUE = NOT_DISCONNECTED;
/** Largest valid value for call disconnect codes. */
- public static final int MAXIMUM_VALID_VALUE = DIALED_CALL_FORWARDING_WHILE_ROAMING;
+ public static final int MAXIMUM_VALID_VALUE = NON_SELECTED_USER_CLEARING;
/** Private constructor to avoid class instantiation. */
private DisconnectCause() {
@@ -378,7 +434,105 @@
case DIALED_ON_WRONG_SLOT:
return "DIALED_ON_WRONG_SLOT";
case DIALED_CALL_FORWARDING_WHILE_ROAMING:
- return "DIALED_CALL_FORWARDING_WHILE_ROAMING";
+ return "DIALED_CALL_FORWARDING_WHILE_ROAMING";
+ case NO_CIRCUIT_AVAIL:
+ return "NO_CIRCUIT_AVAIL";
+ case NO_ROUTE_TO_DESTINAON:
+ return "NO_ROUTE_TO_DESTINAON";
+ case OPERATOR_DETERMINED_BARRING:
+ return "OPERATOR_DETERMINED_BARRING";
+ case CALL_FAIL_NO_USER_RESPONDING:
+ return "CALL_FAIL_NO_USER_RESPONDING";
+ case CALL_FAIL_NO_ANSWER_FROM_USER:
+ return "CALL_FAIL_NO_ANSWER_FROM_USER";
+ case CALL_FAIL_DESTINATION_OUT_OF_ORDER:
+ return "CALL_FAIL_DESTINATION_OUT_OF_ORDER";
+ case BEARER_CAPABILITY_NOT_AUTHORIZED:
+ return "BEARER_CAPABILITY_NOT_AUTHORIZED";
+ case CHANNEL_UNACCEPTABLE:
+ return "CHANNEL_UNACCEPTABLE";
+ case CALL_REJECTED:
+ return "CALL_REJECTED";
+ case NUMBER_CHANGED:
+ return "NUMBER_CHANGED";
+ case PREEMPTION:
+ return "PREEMPTION";
+ case FACILITY_REJECTED:
+ return "FACILITY_REJECTED";
+ case RESP_TO_STATUS_ENQUIRY:
+ return "RESP_TO_STATUS_ENQUIRY";
+ case NORMAL_UNSPECIFIED:
+ return "NORMAL_UNSPECIFIED";
+ case NETWORK_OUT_OF_ORDER:
+ return "NETWORK_OUT_OF_ORDER";
+ case TEMPORARY_FAILURE:
+ return "TEMPORARY_FAILURE";
+ case SWITCHING_EQUIPMENT_CONGESTION:
+ return "SWITCHING_EQUIPMENT_CONGESTION";
+ case ACCESS_INFORMATION_DISCARDED:
+ return "ACCESS_INFORMATION_DISCARDED";
+ case REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE:
+ return "REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE";
+ case RESOURCES_UNAVAILABLE_OR_UNSPECIFIED:
+ return "RESOURCES_UNAVAILABLE_OR_UNSPECIFIED";
+ case QOS_UNAVAILABLE:
+ return "QOS_UNAVAILABLE";
+ case REQUESTED_FACILITY_NOT_SUBSCRIBED:
+ return "REQUESTED_FACILITY_NOT_SUBSCRIBED";
+ case INCOMING_CALLS_BARRED_WITHIN_CUG:
+ return "INCOMING_CALLS_BARRED_WITHIN_CUG";
+ case BEARER_CAPABILITY_UNAVAILABLE:
+ return "BEARER_CAPABILITY_UNAVAILABLE";
+ case SERVICE_OPTION_NOT_AVAILABLE:
+ return "SERVICE_OPTION_NOT_AVAILABLE";
+ case BEARER_SERVICE_NOT_IMPLEMENTED:
+ return "BEARER_SERVICE_NOT_IMPLEMENTED";
+ case REQUESTED_FACILITY_NOT_IMPLEMENTED:
+ return "REQUESTED_FACILITY_NOT_IMPLEMENTED";
+ case ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE:
+ return "ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE";
+ case SERVICE_OR_OPTION_NOT_IMPLEMENTED:
+ return "SERVICE_OR_OPTION_NOT_IMPLEMENTED";
+ case INVALID_TRANSACTION_IDENTIFIER:
+ return "INVALID_TRANSACTION_IDENTIFIER";
+ case USER_NOT_MEMBER_OF_CUG:
+ return "USER_NOT_MEMBER_OF_CUG";
+ case INCOMPATIBLE_DESTINATION:
+ return "INCOMPATIBLE_DESTINATION";
+ case INVALID_TRANSIT_NW_SELECTION:
+ return "INVALID_TRANSIT_NW_SELECTION";
+ case SEMANTICALLY_INCORRECT_MESSAGE:
+ return "SEMANTICALLY_INCORRECT_MESSAGE";
+ case INVALID_MANDATORY_INFORMATION:
+ return "INVALID_MANDATORY_INFORMATION";
+ case MESSAGE_TYPE_NON_IMPLEMENTED:
+ return "MESSAGE_TYPE_NON_IMPLEMENTED";
+ case MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE:
+ return "MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE";
+ case INFORMATION_ELEMENT_NON_EXISTENT:
+ return "INFORMATION_ELEMENT_NON_EXISTENT";
+ case CONDITIONAL_IE_ERROR:
+ return "CONDITIONAL_IE_ERROR";
+ case MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE:
+ return "MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE";
+ case RECOVERY_ON_TIMER_EXPIRED:
+ return "RECOVERY_ON_TIMER_EXPIRED";
+ case PROTOCOL_ERROR_UNSPECIFIED:
+ return "PROTOCOL_ERROR_UNSPECIFIED";
+ case INTERWORKING_UNSPECIFIED:
+ return "INTERWORKING_UNSPECIFIED";
+ case LOCAL_LOW_BATTERY:
+ return "LOCAL_LOW_BATTERY";
+ case LOW_BATTERY:
+ return "LOW_BATTERY";
+ case EMERGENCY_TEMP_FAILURE:
+ return "EMERGENCY_TEMP_FAILURE";
+ case EMERGENCY_PERM_FAILURE:
+ return "EMERGENCY_PERM_FAILURE";
+ case HO_NOT_FEASIBLE:
+ return "HO_NOT_FEASIBLE";
+ case NON_SELECTED_USER_CLEARING:
+ return "NON_SELECTED_USER_CLEARING";
default:
return "INVALID: " + cause;
}
diff --git a/telephony/java/android/telephony/PhoneNumberUtils.java b/telephony/java/android/telephony/PhoneNumberUtils.java
index f0da790..904e97c 100644
--- a/telephony/java/android/telephony/PhoneNumberUtils.java
+++ b/telephony/java/android/telephony/PhoneNumberUtils.java
@@ -26,6 +26,7 @@
import android.content.Intent;
import android.content.res.Resources;
import android.database.Cursor;
+import android.location.Country;
import android.location.CountryDetector;
import android.net.Uri;
import android.os.SystemProperties;
@@ -80,6 +81,7 @@
static final String LOG_TAG = "PhoneNumberUtils";
private static final boolean DBG = false;
+ private static Country sCountryDetector = null;
/*
* global-phone-number = ["+"] 1*( DIGIT / written-sep )
* written-sep = ("-"/".")
@@ -2058,12 +2060,9 @@
private static boolean isLocalEmergencyNumberInternal(int subId, String number,
Context context,
boolean useExactMatch) {
- String countryIso;
- CountryDetector detector = (CountryDetector) context.getSystemService(
- Context.COUNTRY_DETECTOR);
- if (detector != null && detector.detectCountry() != null) {
- countryIso = detector.detectCountry().getCountryIso();
- } else {
+ String countryIso = getCountryIso(context);
+ Rlog.w(LOG_TAG, "isLocalEmergencyNumberInternal" + countryIso);
+ if (countryIso == null) {
Locale locale = context.getResources().getConfiguration().locale;
countryIso = locale.getCountry();
Rlog.w(LOG_TAG, "No CountryDetector; falling back to countryIso based on locale: "
@@ -2072,6 +2071,28 @@
return isEmergencyNumberInternal(subId, number, countryIso, useExactMatch);
}
+ private static String getCountryIso(Context context) {
+ Rlog.w(LOG_TAG, "getCountryIso " + sCountryDetector);
+ if (sCountryDetector == null) {
+ CountryDetector detector = (CountryDetector) context.getSystemService(
+ Context.COUNTRY_DETECTOR);
+ if (detector != null) {
+ sCountryDetector = detector.detectCountry();
+ }
+ }
+
+ if (sCountryDetector == null) {
+ return null;
+ } else {
+ return sCountryDetector.getCountryIso();
+ }
+ }
+
+ /** @hide */
+ public static void resetCountryDetectorInfo() {
+ sCountryDetector = null;
+ }
+
/**
* isVoiceMailNumber: checks a given number against the voicemail
* number provided by the RIL and SIM card. The caller must have
diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java
index 6151e5b..aa44b1f 100644
--- a/telephony/java/android/telephony/ServiceState.java
+++ b/telephony/java/android/telephony/ServiceState.java
@@ -229,6 +229,7 @@
private int mRilVoiceRadioTechnology;
private int mRilDataRadioTechnology;
+ private int mRilImsRadioTechnology = RIL_RADIO_TECHNOLOGY_UNKNOWN;
private boolean mCssIndicator;
private int mNetworkId;
@@ -320,6 +321,7 @@
mCdmaEriIconMode = s.mCdmaEriIconMode;
mIsEmergencyOnly = s.mIsEmergencyOnly;
mIsDataRoamingFromRegistration = s.mIsDataRoamingFromRegistration;
+ mRilImsRadioTechnology = s.mRilImsRadioTechnology;
mIsUsingCarrierAggregation = s.mIsUsingCarrierAggregation;
}
@@ -350,6 +352,7 @@
mIsEmergencyOnly = in.readInt() != 0;
mIsDataRoamingFromRegistration = in.readInt() != 0;
mIsUsingCarrierAggregation = in.readInt() != 0;
+ mRilImsRadioTechnology = in.readInt();
}
public void writeToParcel(Parcel out, int flags) {
@@ -376,6 +379,7 @@
out.writeInt(mIsEmergencyOnly ? 1 : 0);
out.writeInt(mIsDataRoamingFromRegistration ? 1 : 0);
out.writeInt(mIsUsingCarrierAggregation ? 1 : 0);
+ out.writeInt(mRilImsRadioTechnology);
}
public int describeContents() {
@@ -686,7 +690,8 @@
s.mCdmaDefaultRoamingIndicator)
&& mIsEmergencyOnly == s.mIsEmergencyOnly
&& mIsDataRoamingFromRegistration == s.mIsDataRoamingFromRegistration
- && mIsUsingCarrierAggregation == s.mIsUsingCarrierAggregation);
+ && mIsUsingCarrierAggregation == s.mIsUsingCarrierAggregation
+ && mRilImsRadioTechnology == s.mRilImsRadioTechnology);
}
/**
@@ -795,7 +800,8 @@
+ " DefRoamInd=" + mCdmaDefaultRoamingIndicator
+ " EmergOnly=" + mIsEmergencyOnly
+ " IsDataRoamingFromRegistration=" + mIsDataRoamingFromRegistration
- + " IsUsingCarrierAggregation=" + mIsUsingCarrierAggregation);
+ + " IsUsingCarrierAggregation=" + mIsUsingCarrierAggregation
+ + " mRilImsRadioTechnology=" + mRilImsRadioTechnology);
}
private void setNullState(int state) {
@@ -823,6 +829,7 @@
mIsEmergencyOnly = false;
mIsDataRoamingFromRegistration = false;
mIsUsingCarrierAggregation = false;
+ mRilImsRadioTechnology = RIL_RADIO_TECHNOLOGY_UNKNOWN;
}
public void setStateOutOfService() {
@@ -1027,6 +1034,7 @@
m.putBoolean("emergencyOnly", Boolean.valueOf(mIsEmergencyOnly));
m.putBoolean("isDataRoamingFromRegistration", Boolean.valueOf(mIsDataRoamingFromRegistration));
m.putBoolean("isUsingCarrierAggregation", Boolean.valueOf(mIsUsingCarrierAggregation));
+ m.putInt("imsRadioTechnology", mRilImsRadioTechnology);
}
/** @hide */
@@ -1260,8 +1268,19 @@
// voice overrides
newSs.mVoiceRegState = voiceSs.mVoiceRegState;
+ newSs.mRilVoiceRadioTechnology = voiceSs.mRilVoiceRadioTechnology;
newSs.mIsEmergencyOnly = false; // only get here if voice is IN_SERVICE
return newSs;
}
+
+ /** @hide */
+ public int getRilImsRadioTechnology() {
+ return mRilImsRadioTechnology;
+ }
+
+ /** @hide */
+ public void setRilImsRadioTechnology(int imsRadioTechnology) {
+ mRilImsRadioTechnology = imsRadioTechnology;
+ }
}
diff --git a/telephony/java/android/telephony/SignalStrength.java b/telephony/java/android/telephony/SignalStrength.java
index fced667..49c40e2 100644
--- a/telephony/java/android/telephony/SignalStrength.java
+++ b/telephony/java/android/telephony/SignalStrength.java
@@ -72,6 +72,8 @@
private boolean isGsm; // This value is set by the ServiceStateTracker onSignalStrengthResult
+ private int[] mThreshRsrp;
+
/**
* Create a new SignalStrength from a intent notifier Bundle
*
@@ -420,6 +422,14 @@
}
/**
+ * Set custom operator-specific RSRP Threshold values
+ * @hide
+ */
+ public void setThreshRsrp(int[] threshRsrp) {
+ mThreshRsrp = threshRsrp;
+ }
+
+ /**
* Get the GSM Signal Strength, valid values are (0-31, 99) as defined in TS
* 27.007 8.5
*/
@@ -619,19 +629,37 @@
* @hide
*/
public int getGsmLevel() {
- int level;
+ int level = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+ if (Resources.getSystem().getBoolean(
+ com.android.internal.R.bool.config_regional_umts_singnal_threshold)) {
+ int dbm = getGsmDbm();
+ int[] threshGsm;
+ threshGsm = Resources.getSystem().getIntArray(
+ com.android.internal.R.array.umts_signal_strength_threshold);;
+ if (threshGsm.length < 6)
+ return level;
+ if (dbm > threshGsm[5]) level = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+ else if (dbm >= threshGsm[4]) level = SIGNAL_STRENGTH_GREAT;
+ else if (dbm >= threshGsm[3]) level = SIGNAL_STRENGTH_GOOD;
+ else if (dbm >= threshGsm[2]) level = SIGNAL_STRENGTH_MODERATE;
+ else if (dbm >= threshGsm[1]) level = SIGNAL_STRENGTH_POOR;
+ else if (dbm >= threshGsm[0]) level = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+ if (DBG) log("getCustomizedGsmDbmLevel - dbm:" + dbm + " gsmLevel:"
+ + level);
+ } else {
+ // ASU ranges from 0 to 31 - TS 27.007 Sec 8.5
+ // asu = 0 (-113dB or less) is very weak
+ // signal, its better to show 0 bars to the user in such cases.
+ // asu = 99 is a special case, where the signal strength is unknown.
+ int asu = getGsmSignalStrength();
+ if (asu <= 2 || asu == 99) level = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+ else if (asu >= 12) level = SIGNAL_STRENGTH_GREAT;
+ else if (asu >= 8) level = SIGNAL_STRENGTH_GOOD;
+ else if (asu >= 5) level = SIGNAL_STRENGTH_MODERATE;
+ else level = SIGNAL_STRENGTH_POOR;
+ if (DBG) log("getGsmLevel=" + level);
+ }
- // ASU ranges from 0 to 31 - TS 27.007 Sec 8.5
- // asu = 0 (-113dB or less) is very weak
- // signal, its better to show 0 bars to the user in such cases.
- // asu = 99 is a special case, where the signal strength is unknown.
- int asu = getGsmSignalStrength();
- if (asu <= 2 || asu == 99) level = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
- else if (asu >= 12) level = SIGNAL_STRENGTH_GREAT;
- else if (asu >= 8) level = SIGNAL_STRENGTH_GOOD;
- else if (asu >= 5) level = SIGNAL_STRENGTH_MODERATE;
- else level = SIGNAL_STRENGTH_POOR;
- if (DBG) log("getGsmLevel=" + level);
return level;
}
@@ -793,19 +821,32 @@
int rsrpThreshType = Resources.getSystem().getInteger(com.android.internal.R.integer.
config_LTE_RSRP_threshold_type);
- int[] threshRsrp;
- if (rsrpThreshType == RSRP_THRESH_TYPE_STRICT) {
- threshRsrp = RSRP_THRESH_STRICT;
- } else {
- threshRsrp = RSRP_THRESH_LENIENT;
+
+ if (mThreshRsrp == null) {
+ if (rsrpThreshType == RSRP_THRESH_TYPE_STRICT) {
+ mThreshRsrp = RSRP_THRESH_STRICT;
+ } else {
+ mThreshRsrp = RSRP_THRESH_LENIENT;
+ }
+ }
+ if (Resources.getSystem().getBoolean(
+ com.android.internal.R.bool.config_regional_lte_singnal_threshold)){
+ mThreshRsrp = Resources.getSystem().getIntArray(
+ com.android.internal.R.array.lte_signal_strength_threshold);
}
- if (mLteRsrp > threshRsrp[5]) rsrpIconLevel = -1;
- else if (mLteRsrp >= threshRsrp[4]) rsrpIconLevel = SIGNAL_STRENGTH_GREAT;
- else if (mLteRsrp >= threshRsrp[3]) rsrpIconLevel = SIGNAL_STRENGTH_GOOD;
- else if (mLteRsrp >= threshRsrp[2]) rsrpIconLevel = SIGNAL_STRENGTH_MODERATE;
- else if (mLteRsrp >= threshRsrp[1]) rsrpIconLevel = SIGNAL_STRENGTH_POOR;
- else if (mLteRsrp >= threshRsrp[0]) rsrpIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+ if (mLteRsrp > mThreshRsrp[5]) rsrpIconLevel = -1;
+ else if (mLteRsrp >= mThreshRsrp[4]) rsrpIconLevel = SIGNAL_STRENGTH_GREAT;
+ else if (mLteRsrp >= mThreshRsrp[3]) rsrpIconLevel = SIGNAL_STRENGTH_GOOD;
+ else if (mLteRsrp >= mThreshRsrp[2]) rsrpIconLevel = SIGNAL_STRENGTH_MODERATE;
+ else if (mLteRsrp >= mThreshRsrp[1]) rsrpIconLevel = SIGNAL_STRENGTH_POOR;
+ else if (mLteRsrp >= mThreshRsrp[0]) rsrpIconLevel = SIGNAL_STRENGTH_NONE_OR_UNKNOWN;
+
+ if (Resources.getSystem().getBoolean(
+ com.android.internal.R.bool.config_regional_lte_singnal_threshold)){
+ log("getLTELevel - rsrp = " + rsrpIconLevel);
+ if (rsrpIconLevel != -1) return rsrpIconLevel;
+ }
/*
* Values are -200 dB to +300 (SNR*10dB) RS_SNR >= 13.0 dB =>4 bars 4.5
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index ac09213..2d58762 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -791,6 +791,9 @@
*/
public static final String VVM_TYPE_CVVM = "vvm_type_cvvm";
+ /** {@hide} */
+ public static final String EMR_DIAL_ACCOUNT = "emr_dial_account";
+
//
//
// Device Info
@@ -863,6 +866,7 @@
* @param slotId of which deviceID is returned
*/
public String getDeviceId(int slotId) {
+ android.util.SeempLog.record_str(8, ""+slotId);
// FIXME this assumes phoneId == slotId
try {
IPhoneSubInfo info = getSubscriberInfo();
@@ -958,6 +962,7 @@
* {@link android.Manifest.permission#ACCESS_COARSE_LOCATION ACCESS_FINE_LOCATION}.
*/
public CellLocation getCellLocation() {
+ android.util.SeempLog.record(49);
try {
ITelephony telephony = getITelephony();
if (telephony == null) {
@@ -1055,6 +1060,7 @@
*/
@Deprecated
public List<NeighboringCellInfo> getNeighboringCellInfo() {
+ android.util.SeempLog.record(50);
try {
ITelephony telephony = getITelephony();
if (telephony == null)
@@ -1593,7 +1599,7 @@
* @see #NETWORK_TYPE_HSPAP
*/
public int getDataNetworkType() {
- return getDataNetworkType(getSubId());
+ return getDataNetworkType(getDefaultDataSubscriptionId());
}
/**
@@ -2070,6 +2076,7 @@
* @hide
*/
public String getSimSerialNumber(int subId) {
+ android.util.SeempLog.record_str(388, ""+subId);
try {
IPhoneSubInfo info = getSubscriberInfo();
if (info == null)
@@ -2159,6 +2166,7 @@
* @hide
*/
public String getSubscriberId(int subId) {
+ android.util.SeempLog.record_str(389, ""+subId);
try {
IPhoneSubInfo info = getSubscriberInfo();
if (info == null)
@@ -2247,6 +2255,7 @@
* @hide
*/
public String getLine1Number(int subId) {
+ android.util.SeempLog.record_str(9, ""+subId);
String number = null;
try {
ITelephony telephony = getITelephony();
@@ -3273,6 +3282,28 @@
}
/**
+ * Opens a logical channel to the ICC card for the given subId
+ *
+ * @param subId subid to send the command to
+ * @param AID applcation id. See ETSI 102.221 and 101.220.
+ * @param p2 byte P2 parameter
+ * @return an IccOpenLogicalChannelResponse object
+ * @hide
+ */
+ public IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId,
+ String AID, byte p2) {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony != null) {
+ return telephony.iccOpenLogicalChannelWithP2(subId, AID, p2);
+ }
+ } catch (RemoteException ex) {
+ } catch (NullPointerException ex) {
+ }
+ return null;
+ }
+
+ /**
* Closes a previously opened logical channel to the ICC card.
*
* Input parameters equivalent to TS 27.007 AT+CCHC command.
@@ -3658,6 +3689,13 @@
}
/**
+ * Returns Default Data subscription.
+ */
+ private static int getDefaultDataSubscriptionId() {
+ return SubscriptionManager.getDefaultDataSubscriptionId();
+ }
+
+ /**
* Returns Default phone.
*/
private static int getDefaultPhone() {
@@ -4737,7 +4775,7 @@
/** @hide */
@SystemApi
public void setDataEnabled(boolean enable) {
- setDataEnabled(SubscriptionManager.getDefaultDataSubscriptionId(), enable);
+ setDataEnabled(getDefaultDataSubscriptionId(), enable);
}
/** @hide */
@@ -4756,7 +4794,7 @@
/** @hide */
@SystemApi
public boolean getDataEnabled() {
- return getDataEnabled(SubscriptionManager.getDefaultDataSubscriptionId());
+ return getDataEnabled(getDefaultDataSubscriptionId());
}
/** @hide */
@@ -4953,6 +4991,24 @@
}
}
+ /**
+ * Returns the IMS Registration Status
+ * using subId
+ * @hide
+ */
+ public boolean isImsRegisteredForSubscriber(int subId) {
+ try {
+ ITelephony telephony = getITelephony();
+ if (telephony == null)
+ return false;
+ return telephony.isImsRegisteredForSubscriber(subId);
+ } catch (RemoteException ex) {
+ return false;
+ } catch (NullPointerException ex) {
+ return false;
+ }
+ }
+
/**
* Returns the Status of Volte
* @hide
@@ -4965,7 +5021,7 @@
} catch (NullPointerException ex) {
return false;
}
- }
+ }
/**
* Returns the Status of video telephony (VT)
@@ -4995,6 +5051,37 @@
}
}
+ /**
+ * Returns the Status of VOWIFI calling
+ * using subId
+ * @hide
+ */
+ public boolean isVoWifiCallingAvailableForSubscriber(int subId) {
+ try {
+ return getITelephony().isVoWifiCallingAvailableForSubscriber(subId);
+ } catch (RemoteException ex) {
+ return false;
+ } catch (NullPointerException ex) {
+ return false;
+ }
+ }
+
+ /**
+ * Returns the Status of Video telephony wifi calling
+ * using subId
+ * @hide
+ */
+ public boolean isVideoTelephonyWifiCallingAvailableForSubscriber(int subId) {
+ try {
+ return getITelephony()
+ .isVideoTelephonyWifiCallingAvailableForSubscriber(subId);
+ } catch (RemoteException ex) {
+ return false;
+ } catch (NullPointerException ex) {
+ return false;
+ }
+ }
+
/**
* Set TelephonyProperties.PROPERTY_ICC_OPERATOR_NUMERIC for the default phone.
*
diff --git a/telephony/java/com/android/ims/ImsReasonInfo.java b/telephony/java/com/android/ims/ImsReasonInfo.java
index 56b8822..1186f78 100644
--- a/telephony/java/com/android/ims/ImsReasonInfo.java
+++ b/telephony/java/com/android/ims/ImsReasonInfo.java
@@ -30,6 +30,7 @@
* Specific code of each types
*/
public static final int CODE_UNSPECIFIED = 0;
+ public static final int CODE_NORMAL_UNSPECIFIED = 31;
/**
* LOCAL
@@ -308,6 +309,12 @@
public static final int CODE_DATA_DISABLED = 1406;
/**
+ * Indicates the registration attempt on IWLAN failed due to IKEv2 authetication failure
+ * during tunnel establishment.
+ */
+ public static final int CODE_IKEV2_AUTH_FAILURE = 1407;
+
+ /**
* Network string error messages.
* mExtraMessage may have these values.
*/
diff --git a/telephony/java/com/android/ims/ImsStreamMediaProfile.java b/telephony/java/com/android/ims/ImsStreamMediaProfile.java
index 216cef5..cfe37b5 100644
--- a/telephony/java/com/android/ims/ImsStreamMediaProfile.java
+++ b/telephony/java/com/android/ims/ImsStreamMediaProfile.java
@@ -72,14 +72,20 @@
public static final int VIDEO_QUALITY_VGA_LANDSCAPE = (1 << 3);
public static final int VIDEO_QUALITY_VGA_PORTRAIT = (1 << 4);
+ /**
+ * RTT Modes
+ */
+ public static final int RTT_MODE_DISABLED = 0;
+ public static final int RTT_MODE_FULL = 1;
+
// Audio related information
public int mAudioQuality;
public int mAudioDirection;
// Video related information
public int mVideoQuality;
public int mVideoDirection;
-
-
+ // Rtt related information
+ public int mRttMode;
public ImsStreamMediaProfile(Parcel in) {
readFromParcel(in);
@@ -90,6 +96,7 @@
mAudioDirection = DIRECTION_SEND_RECEIVE;
mVideoQuality = VIDEO_QUALITY_NONE;
mVideoDirection = DIRECTION_INVALID;
+ mRttMode = RTT_MODE_DISABLED;
}
public ImsStreamMediaProfile(int audioQuality, int audioDirection,
@@ -100,11 +107,16 @@
mVideoDirection = videoDirection;
}
+ public ImsStreamMediaProfile(int rttMode) {
+ mRttMode = rttMode;
+ }
+
public void copyFrom(ImsStreamMediaProfile profile) {
mAudioQuality = profile.mAudioQuality;
mAudioDirection = profile.mAudioDirection;
mVideoQuality = profile.mVideoQuality;
mVideoDirection = profile.mVideoDirection;
+ mRttMode = profile.mRttMode;
}
@Override
@@ -112,7 +124,8 @@
return "{ audioQuality=" + mAudioQuality +
", audioDirection=" + mAudioDirection +
", videoQuality=" + mVideoQuality +
- ", videoDirection=" + mVideoDirection + " }";
+ ", videoDirection=" + mVideoDirection +
+ ", rttMode=" + mRttMode + " }";
}
@Override
@@ -126,6 +139,7 @@
out.writeInt(mAudioDirection);
out.writeInt(mVideoQuality);
out.writeInt(mVideoDirection);
+ out.writeInt(mRttMode);
}
private void readFromParcel(Parcel in) {
@@ -133,6 +147,7 @@
mAudioDirection = in.readInt();
mVideoQuality = in.readInt();
mVideoDirection = in.readInt();
+ mRttMode = in.readInt();
}
public static final Creator<ImsStreamMediaProfile> CREATOR =
@@ -147,4 +162,20 @@
return new ImsStreamMediaProfile[size];
}
};
+
+ /**
+ * Determines if it's RTT call
+ * @return true if RTT call, false otherwise.
+ */
+ public boolean isRttCall() {
+ return (mRttMode == RTT_MODE_FULL);
+ }
+
+ /**
+ * Updates the RttCall attribute
+ */
+ public void setRttMode(int rttMode) {
+ mRttMode = rttMode;
+ }
+
}
diff --git a/telephony/java/com/android/ims/internal/IImsCallSession.aidl b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
index b1f2d32..ff2f66a 100644
--- a/telephony/java/com/android/ims/internal/IImsCallSession.aidl
+++ b/telephony/java/com/android/ims/internal/IImsCallSession.aidl
@@ -255,4 +255,23 @@
* @return {@code True} if the session is multiparty.
*/
boolean isMultiparty();
+
+ /**
+ * Device issues RTT modify request
+ * @param: toProfile The profile with requested changes made
+ */
+ void sendRttModifyRequest(in ImsCallProfile toProfile);
+
+ /*
+ * Device responds to Remote RTT modify request
+ * @param: status true : Accepted the request
+ * false : Declined the request
+ */
+ void sendRttModifyResponse(in boolean status);
+
+ /*
+ * Device sends RTT message
+ * @param: rttMessage RTT message to be sent
+ */
+ void sendRttMessage(in String rttMessage);
}
diff --git a/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl b/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl
index d562ecc..b46a029 100644
--- a/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl
+++ b/telephony/java/com/android/ims/internal/IImsCallSessionListener.aidl
@@ -130,4 +130,25 @@
*/
void callSessionSuppServiceReceived(in IImsCallSession session,
in ImsSuppServiceNotification suppSrvNotification);
+
+ /**
+ * Device received RTT modify request from Remote UE
+ * @param session Requested session with updated mIsRttCall attribute
+ * to desired value
+ */
+ void callSessionRttModifyRequestReceived(in IImsCallSession session,
+ in ImsCallProfile profile);
+
+ /* Device issued RTT modify request and inturn received response
+ * from Remote UE
+ * @param status Will be one of the following values from:
+ * - {@link Connection.VideoProvider}
+ */
+ void callSessionRttModifyResponseReceived(in int status);
+
+ /*
+ * While in call, device received RTT message from Remote UE
+ * @param rttMessage Received RTT message
+ */
+ void callSessionRttMessageReceived(in String rttMessage);
}
diff --git a/telephony/java/com/android/ims/internal/IImsUt.aidl b/telephony/java/com/android/ims/internal/IImsUt.aidl
index 4ab5ee3..78b7c20 100644
--- a/telephony/java/com/android/ims/internal/IImsUt.aidl
+++ b/telephony/java/com/android/ims/internal/IImsUt.aidl
@@ -111,4 +111,20 @@
* Sets the listener.
*/
void setListener(in IImsUtListener listener);
+
+ /**
+ * Retrieves the configuration of the call forward for specified service class.
+ */
+ int queryCFForServiceClass(int condition, String number, int serviceClass);
+
+ /**
+ * Retrieves the configuration of the call barring for specified service class.
+ */
+ int queryCallBarringWithServiceClass(int cbType, int serviceClass);
+
+ /**
+ * Updates the configuration of the call barring for specified service class.
+ */
+ int updateCallBarringWithServiceClass(int cbType, int action, int serviceClass,
+ in String[] barrList);
}
diff --git a/telephony/java/com/android/ims/internal/uce/presence/IPresenceListener.aidl b/telephony/java/com/android/ims/internal/uce/presence/IPresenceListener.aidl
index 5b71149..a43468e 100644
--- a/telephony/java/com/android/ims/internal/uce/presence/IPresenceListener.aidl
+++ b/telephony/java/com/android/ims/internal/uce/presence/IPresenceListener.aidl
@@ -89,4 +89,9 @@
*/
void listCapInfoReceived(in PresRlmiInfo rlmiInfo,
in PresResInfo [] resInfo);
-}
\ No newline at end of file
+
+ /** Callback function to be invoked to inform the client when Unpublish message
+ * is sent to network.
+ */
+ void unpublishMessageSent();
+}
diff --git a/telephony/java/com/android/internal/telephony/CallerInfo.java b/telephony/java/com/android/internal/telephony/CallerInfo.java
index 5f3f773..7314007 100644
--- a/telephony/java/com/android/internal/telephony/CallerInfo.java
+++ b/telephony/java/com/android/internal/telephony/CallerInfo.java
@@ -171,6 +171,7 @@
* number. The returned CallerInfo is null if no number is supplied.
*/
public static CallerInfo getCallerInfo(Context context, Uri contactRef, Cursor cursor) {
+ android.util.SeempLog.record_uri(12, contactRef);
CallerInfo info = new CallerInfo();
info.photoResource = 0;
info.phoneLabel = null;
@@ -343,6 +344,7 @@
* with all relevant fields empty or null.
*/
public static CallerInfo getCallerInfo(Context context, String number, int subId) {
+ android.util.SeempLog.record_str(12, "number="+number+",subId="+subId);
if (TextUtils.isEmpty(number)) {
return null;
diff --git a/telephony/java/com/android/internal/telephony/CarrierAppUtils.java b/telephony/java/com/android/internal/telephony/CarrierAppUtils.java
index 8b81b0d..0121ecd 100644
--- a/telephony/java/com/android/internal/telephony/CarrierAppUtils.java
+++ b/telephony/java/com/android/internal/telephony/CarrierAppUtils.java
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2015 The Android Open Source Project
+ * Copyright (C) 2017-2018 Fairphone B.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,13 +19,18 @@
import android.annotation.Nullable;
import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageManager;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.os.RemoteException;
+import android.os.UserHandle;
+import android.os.UserManager;
import android.provider.Settings;
import android.telephony.TelephonyManager;
+import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Slog;
@@ -44,6 +50,11 @@
private static final boolean DEBUG = false; // STOPSHIP if true
+ private static final String SPECIAL_CARRIER_APP_INTENT_SERVICE_CLASS = "com.android.phone.SpecialCarrierAppIntentService";
+ private static final String SPECIAL_CARRIER_APP_ACTION_HANDLE_MATCH = "com.android.phone.SpecialCarrierApp.handle_match";
+ private static final String SPECIAL_CARRIER_APP_EXTRA_APP_INFO = "com.android.phone.SpecialCarrierApp.app_info";
+ private static final String SPECIAL_CARRIER_APP_EXTRA_DEVICE_PROVISIONED = "com.android.phone.SpecialCarrierApp.device_provisioned";
+
private CarrierAppUtils() {}
/**
@@ -242,6 +253,182 @@
}
/**
+ * Like {@link #disableSpecialCarrierAppsUntilMatched(Context, IPackageManager,
+ * TelephonyManager, int)}, but assumes that no carrier apps have carrier privileges.
+ *
+ * This prevents a potential race condition on first boot - since the app's default state is
+ * enabled, we will initially disable it when the telephony stack is first initialized as it has
+ * not yet read the carrier privilege rules. However, since telephony is initialized later on
+ * late in boot, the app being disabled may have already been started in response to certain
+ * broadcasts. The app will continue to run (briefly) after being disabled, before the Package
+ * Manager can kill it, and this can lead to crashes as the app is in an unexpected state.
+ */
+ public synchronized static void disableSpecialCarrierAppsUntilMatched(Context context,
+ IPackageManager packageManager, int userId) {
+ disableSpecialCarrierAppsUntilMatched(
+ context, packageManager, null /* telephonyManager */, userId);
+ }
+
+ /**
+ * Handle special carrier apps which should be disabled until a matching UICC is detected.
+ *
+ * Evaluates the list of applications in config_disabledUntilUsedSpecialCarrierApps. We
+ * want to disable each such application which is present on the system image until an UICC
+ * exposing the right operator code is found (indicating a "match"), without interfering with
+ * the user if they opt to enable/disable the app explicitly.
+ *
+ * So, for each such app, we either disable until used if -and only if- the app is not matching
+ * a carrier AND is in the default state (e.g. not explicitly enabled or disabled by the user),
+ * or we ask the adequate service (SpecialCarrierAppIntentService living in the Telephony
+ * service) to handle our request if the app is matching a carrier and in either the default
+ * state (first boot) or flagged as DISABLED_UNTIL_USED.
+ *
+ * This method differs from
+ * {@link #disableCarrierAppsUntilPrivileged(String, IPackageManager, TelephonyManager, int)} in
+ * two ways:
+ * - The apps are enabled based on the UICC operator code and the package signature; and
+ * - When enabling a carrier app, no permissions are implicitly granted.
+ * If the configuration specifies so (per app), an intents is broadcasted after a carrier app
+ * has been enabled.
+ *
+ * This method is idempotent and is safe to be called at any time; it should be called once at
+ * system startup prior to any application running, as well as any time the set of carrier
+ * privileged apps may have changed.
+ */
+ public synchronized static void disableSpecialCarrierAppsUntilMatched(Context context,
+ IPackageManager packageManager, @Nullable TelephonyManager telephonyManager, int userId) {
+ if (DEBUG) {
+ Slog.d(TAG, "disableSpecialCarrierAppsUntilMatched");
+ }
+
+ String[] specialSystemCarrierAppsDisabledUntilUsed = Resources.getSystem().getStringArray(
+ com.android.internal.R.array.config_disabledUntilUsedSpecialCarrierApps);
+ List<ApplicationInfo> candidates = getDefaultCarrierAppCandidatesHelper(packageManager,
+ userId, specialSystemCarrierAppsDisabledUntilUsed);
+
+ Slog.d(TAG, "Found " + (candidates == null ? 0 : candidates.size()) + " candidate(s) for "
+ + specialSystemCarrierAppsDisabledUntilUsed.length + " special carrier app(s)");
+
+ if (candidates == null || candidates.isEmpty()) {
+ return;
+ }
+
+ String[] simOperatorCodes;
+ if (telephonyManager != null) {
+ simOperatorCodes = new String[telephonyManager.getPhoneCount()];
+ for (int i = 0; i < simOperatorCodes.length; i++) {
+ simOperatorCodes[i] = telephonyManager.getSimOperatorNumericForPhone(i);
+ }
+ } else {
+ simOperatorCodes = new String[0];
+ }
+
+ String[] specialSystemCarrierAppOperatorCodes = Resources.getSystem().getStringArray(
+ com.android.internal.R.array.config_disabledUntilUsedSpecialCarrierAppUiccOperators);
+ String[] specialSystemCarrierAppIntents = Resources.getSystem().getStringArray(
+ com.android.internal.R.array.config_disabledUntilUsedSpecialCarrierAppIntents);
+
+ try {
+ for (ApplicationInfo ai : candidates) {
+ String operatorCodesToMatch = null, actionIntentToBroadcast = null;
+ // Do not try to match if the telephony stack is not ready
+ boolean shouldBeMatched = telephonyManager != null;
+
+ // Only update enabled state for the app on /system. Once it has been updated we
+ // shouldn't touch it.
+ if (ai.isUpdatedSystemApp()) {
+ if (DEBUG) {
+ Slog.d(TAG, "Special carrier app candidate '" + ai.packageName
+ + "' is an updated system app, ignoring");
+ }
+ continue;
+ }
+
+ // Not so nice look-up for every package name.
+ // The impact is mitigated by the low amount of items (a handful) expected.
+ for (int i = 0; i < specialSystemCarrierAppsDisabledUntilUsed.length; i++) {
+ if (ai.packageName.equals(specialSystemCarrierAppsDisabledUntilUsed[i])) {
+ operatorCodesToMatch = specialSystemCarrierAppOperatorCodes[i];
+ actionIntentToBroadcast = specialSystemCarrierAppIntents[i];
+ break;
+ }
+ }
+
+ if (TextUtils.isEmpty(operatorCodesToMatch)) {
+ // There is an error in the configuration
+ Slog.e(TAG, "No valid operator codes found in the configuration for candidate "
+ + ai.packageName);
+ // Do not try to match against available operator codes
+ shouldBeMatched = false;
+ } else if (DEBUG) {
+ Slog.d(TAG, "Special carrier app candidate (" + ai.packageName
+ + ") wants to match against " + operatorCodesToMatch);
+ }
+
+ SpecialCarrierAppInfo appInfo = new SpecialCarrierAppInfo(ai.packageName,
+ operatorCodesToMatch == null ? "" : operatorCodesToMatch,
+ actionIntentToBroadcast);
+
+ if (shouldBeMatched) {
+ for (int uiccSlot = 0; uiccSlot < simOperatorCodes.length; uiccSlot++) {
+ if (appInfo.matchesAgainstOperator(simOperatorCodes[uiccSlot])) {
+ appInfo.mUiccSlotId = uiccSlot;
+ appInfo.mCarrierName = TelephonyManager.getDefault().getSimOperatorNameForPhone(uiccSlot);
+ break;
+ }
+ }
+ }
+
+ if (appInfo.hasMatched()
+ && (ai.enabledSetting == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT
+ || ai.enabledSetting ==
+ PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED)) {
+ if (DEBUG) Slog.d(TAG, "Special carrier app candidate (" + ai.packageName
+ + ") found a match with UICC " + appInfo.mUiccSlotId);
+
+ boolean isDeviceProvisioned =
+ Settings.Global.getInt(context.getContentResolver(), Settings.Global.DEVICE_PROVISIONED) == 1;
+
+ if (new UserHandle(userId).isOwner()) {
+ if (DEBUG) Slog.d(TAG, "Launching the Telephony service to handle the special carrier app candidate ("
+ + ai.packageName + ") for owner user " + userId);
+ /*
+ * Defer to the Telephony service to handle the app match for the owner.
+ */
+ context.startService(new Intent()
+ .setClassName(context, SPECIAL_CARRIER_APP_INTENT_SERVICE_CLASS)
+ .setAction(SPECIAL_CARRIER_APP_ACTION_HANDLE_MATCH)
+ .putExtra(SPECIAL_CARRIER_APP_EXTRA_APP_INFO, appInfo)
+ .putExtra(SPECIAL_CARRIER_APP_EXTRA_DEVICE_PROVISIONED, isDeviceProvisioned));
+ } else {
+ /*
+ * FIXME: Non-owner users will not have a notification.
+ * The app is left "disabled until used" because there is only one user
+ * created by the first boot - and that is the owner.
+ */
+ Slog.i(TAG, "Update state(" + ai.packageName
+ + "): DISABLED_UNTIL_USED for non-owner user " + userId);
+ packageManager.setApplicationEnabledSetting(ai.packageName,
+ PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED, 0,
+ userId, context.getOpPackageName());
+ }
+ } else if (!appInfo.hasMatched()
+ && ai.enabledSetting == PackageManager.COMPONENT_ENABLED_STATE_DEFAULT) {
+ Slog.i(TAG, "Update state(" + ai.packageName
+ + "): DISABLED_UNTIL_USED for user " + userId);
+ packageManager.setApplicationEnabledSetting(ai.packageName,
+ PackageManager.COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED, 0,
+ userId, context.getOpPackageName());
+ }
+ }
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Could not reach PackageManager", e);
+ } catch (Settings.SettingNotFoundException e) {
+ Slog.e(TAG, "Could not read the device provision", e);
+ }
+ }
+
+ /**
* Returns the list of "default" carrier apps.
*
* This is the subset of apps returned by
diff --git a/telephony/java/com/android/internal/telephony/ISms.aidl b/telephony/java/com/android/internal/telephony/ISms.aidl
index 6115656..da35eb4 100644
--- a/telephony/java/com/android/internal/telephony/ISms.aidl
+++ b/telephony/java/com/android/internal/telephony/ISms.aidl
@@ -187,6 +187,53 @@
in PendingIntent deliveryIntent, in boolean persistMessage);
/**
+ * Send an SMS with options using Subscription Id.
+ *
+ * @param subId the subId on which the SMS has to be sent.
+ * @param destAddr the address to send the message to
+ * @param scAddr the SMSC to send the message through, or NULL for the
+ * default SMSC
+ * @param text the body of the message to send
+ * @param sentIntent if not NULL this <code>PendingIntent</code> is
+ * broadcast when the message is sucessfully sent, or failed.
+ * The result code will be <code>Activity.RESULT_OK<code> for success,
+ * or one of these errors:<br>
+ * <code>RESULT_ERROR_GENERIC_FAILURE</code><br>
+ * <code>RESULT_ERROR_RADIO_OFF</code><br>
+ * <code>RESULT_ERROR_NULL_PDU</code><br>
+ * For <code>RESULT_ERROR_GENERIC_FAILURE</code> the sentIntent may include
+ * the extra "errorCode" containing a radio technology specific value,
+ * generally only useful for troubleshooting.<br>
+ * The per-application based SMS control checks sentIntent. If sentIntent
+ * is NULL the caller will be checked against all unknown applications,
+ * which cause smaller number of SMS to be sent in checking period.
+ * @param deliveryIntent if not NULL this <code>PendingIntent</code> is
+ * broadcast when the message is delivered to the recipient. The
+ * raw pdu of the status report is in the extended data ("pdu").
+ * @param priority Priority level of the message
+ * Refer specification See 3GPP2 C.S0015-B, v2.0, table 4.5.9-1
+ * ---------------------------------
+ * PRIORITY | Level of Priority
+ * ---------------------------------
+ * '00' | Normal
+ * '01' | Interactive
+ * '10' | Urgent
+ * '11' | Emergency
+ * ----------------------------------
+ * Any Other values included Negative considered as Invalid Priority Indicator of the message.
+ * @param isExpectMore is a boolean to indicate the sending message is multi segmented or not.
+ * @param validityPeriod Validity Period of the message in mins.
+ * Refer specification 3GPP TS 23.040 V6.8.1 section 9.2.3.12.1.
+ * Validity Period(Minimum) -> 5 mins
+ * Validity Period(Maximum) -> 635040 mins(i.e.63 weeks).
+ * Any Other values included Negative considered as Invalid Validity Period of the message.
+ */
+ void sendTextForSubscriberWithOptions(in int subId, String callingPkg, in String destAddr,
+ in String scAddr, in String text, in PendingIntent sentIntent,
+ in PendingIntent deliveryIntent, in int priority, in boolean isExpectMore,
+ in int validityPeriod);
+
+ /**
* Inject an SMS PDU into the android platform.
*
* @param subId the subId on which the SMS has to be injected.
@@ -234,6 +281,51 @@
in List<PendingIntent> deliveryIntents, in boolean persistMessageForNonDefaultSmsApp);
/**
+ * Send a multi-part text based SMS with options using Subscription Id.
+ *
+ * @param subId the subId on which the SMS has to be sent.
+ * @param destinationAddress the address to send the message to
+ * @param scAddress is the service center address or null to use
+ * the current default SMSC
+ * @param parts an <code>ArrayList</code> of strings that, in order,
+ * comprise the original message
+ * @param sentIntents if not null, an <code>ArrayList</code> of
+ * <code>PendingIntent</code>s (one for each message part) that is
+ * broadcast when the corresponding message part has been sent.
+ * The result code will be <code>Activity.RESULT_OK<code> for success,
+ * or one of these errors:
+ * <code>RESULT_ERROR_GENERIC_FAILURE</code>
+ * <code>RESULT_ERROR_RADIO_OFF</code>
+ * <code>RESULT_ERROR_NULL_PDU</code>.
+ * @param deliveryIntents if not null, an <code>ArrayList</code> of
+ * <code>PendingIntent</code>s (one for each message part) that is
+ * broadcast when the corresponding message part has been delivered
+ * to the recipient. The raw pdu of the status report is in the
+ * extended data ("pdu").
+ * @param priority Priority level of the message
+ * Refer specification See 3GPP2 C.S0015-B, v2.0, table 4.5.9-1
+ * ---------------------------------
+ * PRIORITY | Level of Priority
+ * ---------------------------------
+ * '00' | Normal
+ * '01' | Interactive
+ * '10' | Urgent
+ * '11' | Emergency
+ * ----------------------------------
+ * Any Other values included Negative considered as Invalid Priority Indicator of the message.
+ * @param isExpectMore is a boolean to indicate the sending message is multi segmented or not.
+ * @param validityPeriod Validity Period of the message in mins.
+ * Refer specification 3GPP TS 23.040 V6.8.1 section 9.2.3.12.1.
+ * Validity Period(Minimum) -> 5 mins
+ * Validity Period(Maximum) -> 635040 mins(i.e.63 weeks).
+ * Any Other values included Negative considered as Invalid Validity Period of the message.
+ */
+ void sendMultipartTextForSubscriberWithOptions(in int subId, String callingPkg,
+ in String destinationAddress, in String scAddress, in List<String> parts,
+ in List<PendingIntent> sentIntents, in List<PendingIntent> deliveryIntents,
+ in int priority, in boolean isExpectMore, in int validityPeriod);
+
+ /**
* Enable reception of cell broadcast (SMS-CB) messages with the given
* message identifier and RAN type. The RAN type specify this message ID
* belong to 3GPP (GSM) or 3GPP2(CDMA). Note that if two different clients
@@ -447,4 +539,12 @@
void sendStoredMultipartText(int subId, String callingPkg, in Uri messageUri,
String scAddress, in List<PendingIntent> sentIntents,
in List<PendingIntent> deliveryIntents);
+
+ /**
+ * Get the capacity count of sms on Icc card.
+ *
+ * @param subId for subId which getSmsCapacityOnIcc is queried.
+ * @return capacity of ICC
+ */
+ int getSmsCapacityOnIccForSubscriber(int subId);
}
diff --git a/telephony/java/com/android/internal/telephony/ISmsSecurityAgent.aidl b/telephony/java/com/android/internal/telephony/ISmsSecurityAgent.aidl
new file mode 100644
index 0000000..3b52529
--- /dev/null
+++ b/telephony/java/com/android/internal/telephony/ISmsSecurityAgent.aidl
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+package com.android.internal.telephony;
+
+import com.android.internal.telephony.SmsAuthorizationRequest;
+
+/**
+ * ISmsSecurityAgent enhances the security of outgoing SMS messages by allowing trusted system
+ * components to inspect and authorize or reject outgoing SMS messages.
+ *
+ * @hide
+ **/
+interface ISmsSecurityAgent {
+ /**
+ * Called when a SMS message is queued for dispatch allowing a registered
+ * agent to decide on whether to accept/reject the request to send an SMS message.
+ * <b>Unless the agent rejects the request within the OEM specific timeout, the SMS
+ * will be sent.</b>
+ * @param request the object containing information regarding the message and
+ * through which the agent can accept/reject the request.
+ */
+ void onAuthorize(in SmsAuthorizationRequest request);
+
+}
diff --git a/telephony/java/com/android/internal/telephony/ISmsSecurityService.aidl b/telephony/java/com/android/internal/telephony/ISmsSecurityService.aidl
new file mode 100644
index 0000000..e479f0c
--- /dev/null
+++ b/telephony/java/com/android/internal/telephony/ISmsSecurityService.aidl
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+package com.android.internal.telephony;
+
+import com.android.internal.telephony.ISmsSecurityAgent;
+import com.android.internal.telephony.SmsAuthorizationRequest;
+
+/**
+ * ISmsSecurityService exposes a service that monitors the dispatch of outgoing SMS messages
+ * and notifies a registered ISmsSecurityAgent in order to authorize or reject the dispatch
+ * of each outgoing SMS message.
+ *
+ * @hide
+ */
+interface ISmsSecurityService {
+ /**
+ * Registers an agent in order to receive requests for outgoing SMS messages on which
+ * it can accept or reject the request for the dispatch of each SMS message.
+ * <b>Only one agent can be registered at one time.</b>
+ * @param agent the agent to be registered.
+ * @return true if the registration succeeds, false otherwise.
+ */
+ boolean register(in ISmsSecurityAgent agent);
+
+ /**
+ * Unregisters the previously registered agent and causes the security
+ * service to no longer rely on the agent for a decision regarding
+ * successive SMS messages being dispatched allowing all successive messages to be dispatched.
+ *
+ * @param agent the agent to be unregistered.
+ * @return true if the unregistration succeeds, false otherwise.
+ */
+ boolean unregister(in ISmsSecurityAgent agent);
+
+ /**
+ * Allows the registered ISmsSecurityAgent implementation to asynchronously send a response
+ * on whether it will accept/reject the dispatch of the SMS message.
+ * <b>If the agent responds after the OEM defined timeout it may not be able to
+ * interfere on whether the SMS was sent or not.</b>
+ * @param request the request related to an outgoing SMS message to accept/reject.
+ * @param accepted true to accept, false to reject.
+ * return true if the response took effect, false if a response has already been sent for this
+ * request or an OEM specific timeout already happened.
+ */
+ boolean sendResponse(in SmsAuthorizationRequest request, boolean authorized);
+}
diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl
index a8eaf36..a95d8bc 100644
--- a/telephony/java/com/android/internal/telephony/ITelephony.aidl
+++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl
@@ -570,6 +570,16 @@
IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId, String AID);
/**
+ * Opens a logical channel to the ICC card for a particular subID
+ *
+ * @param subId user preferred subId.
+ * @param p2 P2 parameter
+ * @param AID Application id. See ETSI 102.221 and 101.220
+ */
+ IccOpenLogicalChannelResponse iccOpenLogicalChannelWithP2(int subId,
+ String AID, byte p2);
+
+ /**
* Closes a previously opened logical channel to the ICC card.
*
* Input parameters equivalent to TS 27.007 AT+CCHC command.
@@ -992,10 +1002,21 @@
boolean isImsRegistered();
/**
+ * Get IMS Registration Status using subId
+ */
+ boolean isImsRegisteredForSubscriber(int subId);
+
+ /**
* Returns the Status of Wi-Fi Calling
*/
boolean isWifiCallingAvailable();
+ /*
+ * Returns the Status of VOWIFI calling
+ * using subId
+ */
+ boolean isVoWifiCallingAvailableForSubscriber(int subId);
+
/**
* Returns the Status of Volte
*/
@@ -1007,6 +1028,12 @@
boolean isVideoTelephonyAvailable();
/**
+ * Returns the Status of Video telephony wifi calling
+ * using subId
+ */
+ boolean isVideoTelephonyWifiCallingAvailableForSubscriber(int subId);
+
+ /**
* Returns the unique device ID of phone, for example, the IMEI for
* GSM and the MEID for CDMA phones. Return null if device ID is not available.
*
@@ -1093,6 +1120,12 @@
List<String> getPackagesWithCarrierPrivileges();
/**
+ * Get ATR (Answer To Reset; as per ISO/IEC 7816-4) from SIM card
+ * for a particular subId.
+ */
+ byte[] getAtr(int subId);
+
+ /**
* Return the application ID for the app type.
*
* @param subId the subscription ID that this request applies to.
diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java
index a91e9be..11b162e 100644
--- a/telephony/java/com/android/internal/telephony/RILConstants.java
+++ b/telephony/java/com/android/internal/telephony/RILConstants.java
@@ -25,6 +25,7 @@
*/
import android.os.SystemProperties;
+import android.telephony.TelephonyManager;
/**
* {@hide}
@@ -105,6 +106,7 @@
int DEVICE_IN_USE = 64; /* Operation cannot be performed because the device
is currently in use */
int ABORTED = 65; /* Operation aborted */
+ int INVALID_PARAMETER = 66;
// Below is list of OEM specific error codes which can by used by OEMs in case they don't want to
// reveal particular replacement for Generic failure
int OEM_ERROR_1 = 501;
@@ -160,8 +162,10 @@
int NETWORK_MODE_LTE_TDSCDMA_GSM_WCDMA = 20; /* TD-SCDMA, GSM/WCDMA and LTE */
int NETWORK_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 21; /*TD-SCDMA,EvDo,CDMA,GSM/WCDMA*/
int NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 22; /* TD-SCDMA/LTE/GSM/WCDMA, CDMA, and EvDo */
- int PREFERRED_NETWORK_MODE = SystemProperties.getInt("ro.telephony.default_network",
- NETWORK_MODE_WCDMA_PREF);
+
+ int PREFERRED_NETWORK_MODE = Integer.parseInt(TelephonyManager.getTelephonyProperty(0,
+ "ro.telephony.default_network",
+ Integer.toString(NETWORK_MODE_WCDMA_PREF)));
int BAND_MODE_UNSPECIFIED = 0; //"unspecified" (selected by baseband automatically)
int BAND_MODE_EURO = 1; //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)
@@ -411,6 +415,10 @@
int RIL_REQUEST_GET_ACTIVITY_INFO = 135;
int RIL_REQUEST_SET_ALLOWED_CARRIERS = 136;
int RIL_REQUEST_GET_ALLOWED_CARRIERS = 137;
+ int RIL_REQUEST_SIM_GET_ATR = 138;
+ int RIL_REQUEST_CAF_SIM_OPEN_CHANNEL_WITH_P2 = 139;
+ int RIL_REQUEST_GET_ADN_RECORD = 140;
+ int RIL_REQUEST_UPDATE_ADN_RECORD = 141;
int RIL_RESPONSE_ACKNOWLEDGEMENT = 800;
@@ -462,4 +470,6 @@
int RIL_UNSOL_STK_CC_ALPHA_NOTIFY = 1044;
int RIL_UNSOL_LCEDATA_RECV = 1045;
int RIL_UNSOL_PCO_DATA = 1046;
+ int RIL_UNSOL_RESPONSE_ADN_INIT_DONE = 1047;
+ int RIL_UNSOL_RESPONSE_ADN_RECORDS = 1048;
}
diff --git a/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.aidl b/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.aidl
new file mode 100644
index 0000000..a2f7020
--- /dev/null
+++ b/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.aidl
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+package com.android.internal.telephony;
+
+/** @hide */
+parcelable SmsAuthorizationRequest;
diff --git a/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.java b/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.java
new file mode 100644
index 0000000..bc64fa8
--- /dev/null
+++ b/telephony/java/com/android/internal/telephony/SmsAuthorizationRequest.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+package com.android.internal.telephony;
+
+import android.os.IBinder;
+import android.os.Parcel;
+import android.os.Parcelable;
+import android.os.RemoteException;
+
+/**
+ * This class represents a request from the {@link ISmsSecurityService} to trusted parties
+ * in order to allow third party components to participate in the decision process to accept
+ * or reject a request to send an SMS message.
+ *
+ * @hide
+ */
+public class SmsAuthorizationRequest implements Parcelable {
+
+ private final ISmsSecurityService service;
+
+ private final IBinder token;
+
+ public final String packageName;
+
+ public final String destinationAddress;
+
+ public final String message;
+
+ public SmsAuthorizationRequest(final Parcel source) {
+ this.service = ISmsSecurityService.Stub.asInterface(source.readStrongBinder());
+ this.token = source.readStrongBinder();
+ this.packageName = source.readString();
+ this.destinationAddress = source.readString();
+ this.message = source.readString();
+ }
+
+ public SmsAuthorizationRequest(final ISmsSecurityService service,
+ final IBinder binderToken,
+ final String packageName,
+ final String destinationAddress,
+ final String message) {
+ this.service = service;
+ this.token = binderToken;
+ this.packageName = packageName;
+ this.destinationAddress = destinationAddress;
+ this.message = message;
+ }
+
+ @Override
+ public void writeToParcel(final Parcel dest, final int flags) {
+ dest.writeStrongBinder(service.asBinder());
+ dest.writeStrongBinder(token);
+ dest.writeString(packageName);
+ dest.writeString(destinationAddress);
+ dest.writeString(message);
+ }
+
+ @Override
+ public int describeContents() {
+ return 0;
+ }
+
+ public static Parcelable.Creator<SmsAuthorizationRequest> CREATOR =
+ new Creator<SmsAuthorizationRequest>() {
+ @Override
+ public SmsAuthorizationRequest[] newArray(final int size) {
+ return new SmsAuthorizationRequest[size];
+ }
+
+ @Override
+ public SmsAuthorizationRequest createFromParcel(final Parcel source) {
+ return new SmsAuthorizationRequest(source);
+ }
+ };
+
+ public void accept() throws RemoteException{
+ service.sendResponse(this, true);
+ }
+
+ public void reject() throws RemoteException {
+ service.sendResponse(this, false);
+ }
+
+ public IBinder getToken() {
+ return token;
+ }
+
+ @Override
+ public String toString() {
+ return String.format("[%s] (%s) # %s",
+ this.packageName,
+ this.destinationAddress,
+ this.message);
+ }
+}
diff --git a/telephony/java/com/android/internal/telephony/SpecialCarrierAppInfo.java b/telephony/java/com/android/internal/telephony/SpecialCarrierAppInfo.java
new file mode 100644
index 0000000..81abdea9
--- /dev/null
+++ b/telephony/java/com/android/internal/telephony/SpecialCarrierAppInfo.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2017-2018 Fairphone B.V.
+ *
+ * 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.telephony;
+
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+
+import java.io.Serializable;
+
+public class SpecialCarrierAppInfo implements Serializable {
+ /**
+ * The app package name.
+ */
+ @NonNull
+ public String mPackageName;
+ /**
+ * The operator codes to match, separated by comma.
+ */
+ @NonNull
+ public String mOperatorCodesToMatch;
+ /**
+ * The optional action intent to broadcast after enabling the app.
+ */
+ @Nullable
+ public String mActionIntentToBroadcast;
+ /**
+ * The matched UICC slot id, or <code>-1</code> if not matched.
+ */
+ public int mUiccSlotId;
+ /**
+ * The carrier name as described by the matched UICC, or <code>null</code>.
+ */
+ @Nullable
+ public String mCarrierName;
+
+ public SpecialCarrierAppInfo(@NonNull String packageName, @NonNull String operatorCodesToMatch,
+ String actionIntentToBroadcast) {
+ this(packageName, operatorCodesToMatch, actionIntentToBroadcast, -1, null);
+ }
+
+ private SpecialCarrierAppInfo(@NonNull String packageName, @NonNull String operatorCodesToMatch,
+ String actionIntentToBroadcast, int uiccSlotId, String carrierName) {
+ mPackageName = packageName;
+ mOperatorCodesToMatch = operatorCodesToMatch;
+ mActionIntentToBroadcast = actionIntentToBroadcast;
+ mUiccSlotId = uiccSlotId;
+ mCarrierName = carrierName;
+ }
+
+ /**
+ * @return All operator codes to match, or an empty array if none.
+ */
+ @NonNull
+ public String[] getAllOperatorCodesToMatch() {
+ return mOperatorCodesToMatch.split(",");
+ }
+
+ public boolean matchesAgainstOperator(@Nullable String operatorCode) {
+ for (String operatorCodeToMatch : getAllOperatorCodesToMatch()) {
+ if (operatorCodeToMatch.equals(operatorCode)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ public boolean hasMatched() {
+ return mUiccSlotId != -1;
+ }
+}
diff --git a/telephony/java/com/android/internal/telephony/TelephonyProperties.java b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
index 6567ea7..9674016 100644
--- a/telephony/java/com/android/internal/telephony/TelephonyProperties.java
+++ b/telephony/java/com/android/internal/telephony/TelephonyProperties.java
@@ -218,4 +218,43 @@
*/
static final String PROPERTY_VIDEOCALL_AUDIO_OUTPUT = "persist.radio.call.audio.output";
+ /**
+ * Used when Presence app sends Dial intent with specific schema
+ * If true: skip schema parsing and use Tel schema
+ * If false: parse schema
+ */
+ static final String EXTRA_SKIP_SCHEMA_PARSING =
+ "org.codeaurora.extra.SKIP_SCHEMA_PARSING";
+
+ /**
+ * For Group Conference Calling
+ * If true: isConferenceUri in Dial is set to true,
+ * which indicates that Dial is for Conference Calling
+ * If false: above is set to false
+ */
+ static final String EXTRAS_IS_CONFERENCE_URI = "isConferenceUri";
+
+ /**
+ * For Group Conference Dialing Feature
+ * If true: Dial intent triggered from Group Conference Calling screen
+ * if false: normal dial
+ */
+ static final String EXTRA_DIAL_CONFERENCE_URI =
+ "org.codeaurora.extra.DIAL_CONFERENCE_URI";
+
+ /**
+ * For Add Participant Feature
+ * If true: Dial intent triggered from Dialpad is for AddParticipant
+ * if false: normal dial
+ */
+ static final String ADD_PARTICIPANT_KEY = "add_participant";
+
+ /*
+ * For VICE Feature
+ * If true: Dial intent is for call pull functionality
+ * if false: normal dial
+ */
+ static final String EXTRA_IS_CALL_PULL =
+ "org.codeaurora.extra.IS_CALL_PULL";
+
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java
index 9f73d79..0d6a7ff 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgePowerManager.java
@@ -165,4 +165,9 @@
public boolean isScreenBrightnessBoosted() throws RemoteException {
return false;
}
+
+ @Override
+ public void updateBlockedUids(int uid, boolean isBlocked) throws RemoteException {
+ // pass for now.
+ }
}
diff --git a/wifi/java/android/net/wifi/IWifiManager.aidl b/wifi/java/android/net/wifi/IWifiManager.aidl
index 5fa080e..12e7108 100644
--- a/wifi/java/android/net/wifi/IWifiManager.aidl
+++ b/wifi/java/android/net/wifi/IWifiManager.aidl
@@ -171,5 +171,7 @@
void factoryReset();
Network getCurrentNetwork();
+
+ boolean getWifiStaSapConcurrency();
}
diff --git a/wifi/java/android/net/wifi/WifiConfiguration.java b/wifi/java/android/net/wifi/WifiConfiguration.java
index 33ef483..8bf515d 100644
--- a/wifi/java/android/net/wifi/WifiConfiguration.java
+++ b/wifi/java/android/net/wifi/WifiConfiguration.java
@@ -69,6 +69,8 @@
/** {@hide} */
private String mPasspointManagementObjectTree;
+ /** {@hide} */
+ public static final String SIMNumVarName = "sim_num";
/**
* Recognized key management schemes.
@@ -217,6 +219,20 @@
public static final String[] strings = { "current", "disabled", "enabled" };
}
+ public static class Fils {
+ private Fils() { }
+ /**
+ * FILS SK with SHA256
+ */
+ public static final int FILS_SHA256 = 0;
+ /**
+ * FILS SK with SHA384:
+ */
+ public static final int FILS_SHA384 = 1;
+
+ public static final String[] filsKeyStrings = {"FILS_SHA256", "FILS_SHA384"};
+ }
+
/** @hide */
public static final int UNKNOWN_UID = -1;
@@ -356,6 +372,12 @@
*/
public BitSet allowedGroupCiphers;
/**
+ * The set of FILS keys
+ */
+ public BitSet filsKeyMgmts;
+ /** {@hide} */
+ public static final String erpVarName = "erp";
+ /**
* The enterprise configuration details specifying the EAP method,
* certificates and other settings associated with the EAP.
*/
@@ -460,6 +482,12 @@
/**
* @hide
+ * sim number selected
+ */
+ public int SIMNum;
+
+ /**
+ * @hide
* Status of user approval for connection
*/
public int userApproved = USER_UNSPECIFIED;
@@ -1353,6 +1381,7 @@
allowedAuthAlgorithms = new BitSet();
allowedPairwiseCiphers = new BitSet();
allowedGroupCiphers = new BitSet();
+ filsKeyMgmts = new BitSet();
wepKeys = new String[4];
for (int i = 0; i < wepKeys.length; i++) {
wepKeys[i] = null;
@@ -1369,6 +1398,7 @@
creatorUid = -1;
shared = true;
dtimInterval = 0;
+ SIMNum = 0;
}
/**
@@ -1530,6 +1560,10 @@
if (this.preSharedKey != null) {
sbuf.append('*');
}
+ sbuf.append('\n').append(" sim_num ");
+ if (this.SIMNum > 0 ) {
+ sbuf.append('*');
+ }
sbuf.append("\nEnterprise config:\n");
sbuf.append(enterpriseConfig);
@@ -1875,6 +1909,7 @@
allowedAuthAlgorithms = (BitSet) source.allowedAuthAlgorithms.clone();
allowedPairwiseCiphers = (BitSet) source.allowedPairwiseCiphers.clone();
allowedGroupCiphers = (BitSet) source.allowedGroupCiphers.clone();
+ filsKeyMgmts = (BitSet) source.filsKeyMgmts.clone();
enterpriseConfig = new WifiEnterpriseConfig(source.enterpriseConfig);
defaultGwMacAddress = source.defaultGwMacAddress;
@@ -1928,6 +1963,7 @@
creationTime = source.creationTime;
updateTime = source.updateTime;
shared = source.shared;
+ SIMNum = source.SIMNum;
}
}
@@ -1962,6 +1998,7 @@
writeBitSet(dest, allowedAuthAlgorithms);
writeBitSet(dest, allowedPairwiseCiphers);
writeBitSet(dest, allowedGroupCiphers);
+ writeBitSet(dest, filsKeyMgmts);
dest.writeParcelable(enterpriseConfig, flags);
@@ -1999,6 +2036,7 @@
dest.writeInt(isCarrierNetwork ? 1 : 0);
dest.writeInt(shared ? 1 : 0);
dest.writeString(mPasspointManagementObjectTree);
+ dest.writeInt(SIMNum);
}
/** Implement the Parcelable interface {@hide} */
@@ -2035,6 +2073,7 @@
config.allowedAuthAlgorithms = readBitSet(in);
config.allowedPairwiseCiphers = readBitSet(in);
config.allowedGroupCiphers = readBitSet(in);
+ config.filsKeyMgmts = readBitSet(in);
config.enterpriseConfig = in.readParcelable(null);
config.mIpConfiguration = in.readParcelable(null);
@@ -2071,6 +2110,7 @@
config.isCarrierNetwork = in.readInt() != 0;
config.shared = in.readInt() != 0;
config.mPasspointManagementObjectTree = in.readString();
+ config.SIMNum = in.readInt();
return config;
}
diff --git a/wifi/java/android/net/wifi/WifiDevice.aidl b/wifi/java/android/net/wifi/WifiDevice.aidl
new file mode 100644
index 0000000..c1b186c
--- /dev/null
+++ b/wifi/java/android/net/wifi/WifiDevice.aidl
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+package android.net.wifi;
+
+parcelable WifiDevice;
diff --git a/wifi/java/android/net/wifi/WifiDevice.java b/wifi/java/android/net/wifi/WifiDevice.java
new file mode 100644
index 0000000..163b559
--- /dev/null
+++ b/wifi/java/android/net/wifi/WifiDevice.java
@@ -0,0 +1,137 @@
+/*
+ * 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.
+ */
+
+package android.net.wifi;
+
+import android.os.Parcelable;
+import android.os.Parcel;
+
+/**
+ * Describes information about a detected Wi-Fi STA.
+ * {@hide}
+ */
+public class WifiDevice implements Parcelable {
+ /**
+ * The device MAC address is the unique id of a Wi-Fi STA
+ */
+ public String deviceAddress = "";
+
+ /**
+ * The device name is a readable string of a Wi-Fi STA
+ */
+ public String deviceName = "";
+
+ /**
+ * The device state is the state of a Wi-Fi STA
+ */
+ public int deviceState = 0;
+
+ /**
+ * These definitions are for deviceState
+ */
+ public static final int DISCONNECTED = 0;
+ public static final int CONNECTED = 1;
+ public static final int BLACKLISTED = 2;
+
+ private static final String AP_STA_CONNECTED_STR = "AP-STA-CONNECTED";
+ private static final String AP_STA_DISCONNECTED_STR = "AP-STA-DISCONNECTED";
+
+ /** {@hide} */
+ public WifiDevice() {}
+
+ /**
+ * @param string formats supported include
+ *
+ * AP-STA-CONNECTED 42:fc:89:a8:96:09
+ * AP-STA-DISCONNECTED 42:fc:89:a8:96:09
+ *
+ * Note: The events formats can be looked up in the hostapd code
+ * @hide
+ */
+ public WifiDevice(String dataString) throws IllegalArgumentException {
+ String[] tokens = dataString.split(" ");
+
+ if (tokens.length < 2) {
+ throw new IllegalArgumentException();
+ }
+
+ if (tokens[0].indexOf(AP_STA_CONNECTED_STR) != -1) {
+ deviceState = CONNECTED;
+ } else if (tokens[0].indexOf(AP_STA_DISCONNECTED_STR) != -1) {
+ deviceState = DISCONNECTED;
+ } else {
+ throw new IllegalArgumentException();
+ }
+
+ deviceAddress = tokens[1];
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null || !(obj instanceof WifiDevice)) {
+ return false;
+ }
+
+ WifiDevice other = (WifiDevice) obj;
+
+ if (deviceAddress == null) {
+ return (other.deviceAddress == null);
+ } else {
+ return deviceAddress.equals(other.deviceAddress);
+ }
+ }
+
+ /** Implement the Parcelable interface {@hide} */
+ public int describeContents() {
+ return 0;
+ }
+
+ /** Implement the Parcelable interface {@hide} */
+ public void writeToParcel(Parcel dest, int flags) {
+ dest.writeString(deviceAddress);
+ dest.writeString(deviceName);
+ dest.writeInt(deviceState);
+ }
+
+ /** Implement the Parcelable interface {@hide} */
+ public static final Creator<WifiDevice> CREATOR =
+ new Creator<WifiDevice>() {
+ public WifiDevice createFromParcel(Parcel in) {
+ WifiDevice device = new WifiDevice();
+ device.deviceAddress = in.readString();
+ device.deviceName = in.readString();
+ device.deviceState = in.readInt();
+ return device;
+ }
+
+ public WifiDevice[] newArray(int size) {
+ return new WifiDevice[size];
+ }
+ };
+}
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index e2d5ae3..852316a 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -91,6 +91,13 @@
public static final String EXTRA_SCAN_AVAILABLE = "scan_enabled";
/**
+ * ACTION_AUTH_PASSWORD_WRONG
+ *
+ * @ @hide
+ **/
+ public static final String ACTION_AUTH_PASSWORD_WRONG = "Auth_password_wrong";
+
+ /**
* Broadcast intent action indicating that the credential of a Wi-Fi network
* has been changed. One extra provides the ssid of the network. Another
* extra provides the event type, whether the credential is saved or forgot.
@@ -237,6 +244,14 @@
"android.net.wifi.WIFI_AP_STATE_CHANGED";
/**
+ * Broadcast intent action indicating that Wi-Fi AP sub system has been restarted.
+ *
+ * @hide
+ */
+ public static final String WIFI_AP_SUB_SYSTEM_RESTART =
+ "android.net.wifi.WIFI_AP_SUB_SYSTEM_RESTART";
+
+ /**
* The lookup key for an int that indicates whether Wi-Fi AP is enabled,
* disabled, enabling, disabling, or failed. Retrieve it with
* {@link android.content.Intent#getIntExtra(String,int)}.
@@ -325,6 +340,12 @@
public static final int WIFI_AP_STATE_FAILED = 14;
/**
+ * Wi-Fi AP is in restarting state
+ * @hide
+ */
+ public static final int WIFI_AP_STATE_RESTART = 15;
+
+ /**
* If WIFI AP start failed, this reason code means there is no legal channel exists on
* user selected band by regulatory
*
@@ -519,6 +540,14 @@
"android.net.wifi.LINK_CONFIGURATION_CHANGED";
/**
+ * Broadcast intent action indicating that the user initiated Wifi OFF
+ * or APM ON and Wifi disconnection is in progress
+ * Actual Wifi disconnection happens after mDisconnectDelayDuration seconds.
+ * @hide
+ */
+ public static final String ACTION_WIFI_DISCONNECT_IN_PROGRESS = "wifi_disconnect_in_progress";
+
+ /**
* The lookup key for a {@link android.net.LinkProperties} object associated with the
* Wi-Fi network. Retrieve with
* {@link android.content.Intent#getParcelableExtra(String)}.
@@ -1339,6 +1368,7 @@
* returned.
*/
public List<ScanResult> getScanResults() {
+ android.util.SeempLog.record(55);
try {
return mService.getScanResults(mContext.getOpPackageName());
} catch (RemoteException e) {
@@ -2709,6 +2739,21 @@
}
/**
+ * get concurrency support
+ *
+ * @return true if concurrency is allowed.
+ *
+ * @hide no intent to publish
+ */
+ public boolean getWifiStaSapConcurrency() {
+ try {
+ return mService.getWifiStaSapConcurrency();
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* Resets all wifi manager settings back to factory defaults.
*
* @hide