diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 0f1fe5ea28d..ab3d0beaba4 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -1717,6 +1717,7 @@ Resources getTopLevelResources(String resDir, AssetManager assets = new AssetManager(); assets.overrideHook(resDir, ExtendedPropertiesUtils.OverrideMode.FullNameExclude); assets.setThemeSupport(compInfo.isThemeable); + assets.overrideHook(resDir, ExtendedPropertiesUtils.OverrideMode.FullNameExclude); if (assets.addAssetPath(resDir) == 0) { return null; } diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java index 63aa5f9b5f3..0a30808bdab 100644 --- a/core/java/android/app/ApplicationThreadNative.java +++ b/core/java/android/app/ApplicationThreadNative.java @@ -40,7 +40,6 @@ import java.util.List; import java.util.Map; -/** {@hide} */ public abstract class ApplicationThreadNative extends Binder implements IApplicationThread { /** diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java index 373f9d9e6b4..6d95476eca0 100644 --- a/core/java/android/app/ContextImpl.java +++ b/core/java/android/app/ContextImpl.java @@ -97,6 +97,7 @@ import android.os.Process; import android.os.RemoteException; import android.os.ServiceManager; +import android.os.SystemProperties; import android.os.UserHandle; import android.os.SystemVibrator; import android.os.SystemProperties; @@ -104,11 +105,20 @@ import android.os.storage.StorageManager; import android.telephony.TelephonyManager; import android.content.ClipboardManager; +<<<<<<< HEAD +import android.util.AndroidRuntimeException; +import android.util.DisplayMetrics; +import android.util.ExtendedPropertiesUtils; +import android.util.Log; +import android.util.Slog; +======= import android.util.*; +>>>>>>> upstream/jb-mr1 import android.view.CompatibilityInfoHolder; import android.view.ContextThemeWrapper; import android.view.WindowManager; import android.view.Display; +import android.view.WindowManager; import android.view.WindowManagerImpl; import android.view.accessibility.AccessibilityManager; import android.view.inputmethod.InputMethodManager; @@ -1906,6 +1916,89 @@ public ContextImpl(ContextImpl context) { mDisplay = context.mDisplay; mOuterContext = this; } + + static void init(ActivityThread thread) { + if (ExtendedPropertiesUtils.mMainThread == null) { + try { + // If hybrid is not enabled, we cannot block the rest of the proccess, + // because it may cause a lot of misbehaviours, and avoiding initialization + // of vital variables used on ExtendedPropertiesUtils, may lead to crashes. + // Then we just set all applications to stock configuration. They will be + // still runned under hybrid engine. + if (ExtendedPropertiesUtils.getProperty(ExtendedPropertiesUtils.BEERBONG_PREFIX + + "hybrid_mode").equals("1")) { + ExtendedPropertiesUtils.sIsHybridModeEnabled = true; + } + + // Save current thread into global context + ExtendedPropertiesUtils.mMainThread = thread; + + // Load hashmap, in order to get latest properties + ExtendedPropertiesUtils.refreshProperties(); + + // Try to get the context for the current thread. If something + // goes wrong, we throw an exception. + ContextImpl context = createSystemContext(thread); + if (context == null) { + throw new NullPointerException(); + } + + // If we sucessfully created the context, bind it to framework + LoadedApk info = new LoadedApk(thread, "android", context, null, + CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO); + if (info == null) { + throw new NullPointerException(); + } + + context.init(info, null, thread); + ExtendedPropertiesUtils.mContext = context; + + // Get default display + WindowManager wm = (WindowManager)context.getSystemService(Context.WINDOW_SERVICE); + ExtendedPropertiesUtils.mDisplay = wm.getDefaultDisplay(); + if (ExtendedPropertiesUtils.mDisplay == null) { + throw new NullPointerException(); + } + + // Load package manager, so it's accessible system wide + ExtendedPropertiesUtils.mPackageManager = + ExtendedPropertiesUtils.mContext.getPackageManager(); + if (ExtendedPropertiesUtils.mPackageManager == null) { + throw new NullPointerException(); + } + + // Get package list and fetch PID + ExtendedPropertiesUtils.mPackageList = + ExtendedPropertiesUtils.mPackageManager.getInstalledPackages(0); + ExtendedPropertiesUtils.mGlobalHook.pid = android.os.Process.myPid(); + ExtendedPropertiesUtils.mRomLcdDensity = SystemProperties.getInt("qemu.sf.lcd_density", + SystemProperties.getInt("ro.sf.lcd_density", DisplayMetrics.DENSITY_DEFAULT)); + + // After we have PID, we get app info using it + ExtendedPropertiesUtils.mGlobalHook.info = + ExtendedPropertiesUtils.getAppInfoFromPID(ExtendedPropertiesUtils.mGlobalHook.pid); + if (ExtendedPropertiesUtils.mGlobalHook.info != null) { + // If the global hook info isn't null, we load the name, package name + // and path for the global hook + ExtendedPropertiesUtils.mGlobalHook.name = + ExtendedPropertiesUtils.mGlobalHook.info.packageName; + ExtendedPropertiesUtils.mGlobalHook.path = + ExtendedPropertiesUtils.mGlobalHook.info.sourceDir.substring(0, + ExtendedPropertiesUtils.mGlobalHook.info.sourceDir.lastIndexOf("/")); + ExtendedPropertiesUtils.setAppConfiguration(ExtendedPropertiesUtils.mGlobalHook); + } else { + // We're dealing with "android" package. This is framework itself + ExtendedPropertiesUtils.mGlobalHook.name = "android"; + ExtendedPropertiesUtils.mGlobalHook.path = ""; + ExtendedPropertiesUtils.setAppConfiguration(ExtendedPropertiesUtils.mGlobalHook); + } + } catch (Exception e) { + // We use global exception to catch a lot of possible crashes. + // This is not a dirty workaround, but an expected behaviour + ExtendedPropertiesUtils.mMainThread = null; + } + } + } static void init(ActivityThread thread) { if (ExtendedPropertiesUtils.mMainThread == null) { diff --git a/core/java/android/app/IApplicationThread.java b/core/java/android/app/IApplicationThread.java index 03a26d4274c..b4e37152d3b 100644 --- a/core/java/android/app/IApplicationThread.java +++ b/core/java/android/app/IApplicationThread.java @@ -41,7 +41,6 @@ * the activity manager by an application when it starts up, for the activity * manager to tell the application about things it needs to do. * - * {@hide} */ public interface IApplicationThread extends IInterface { void schedulePauseActivity(IBinder token, boolean finished, boolean userLeaving, diff --git a/core/java/android/app/IInstrumentationWatcher.aidl b/core/java/android/app/IInstrumentationWatcher.aidl index 6c8c4d6e03e..854442115c8 100644 --- a/core/java/android/app/IInstrumentationWatcher.aidl +++ b/core/java/android/app/IInstrumentationWatcher.aidl @@ -20,7 +20,6 @@ package android.app; import android.content.ComponentName; import android.os.Bundle; -/** @hide */ interface IInstrumentationWatcher { void instrumentationStatus(in ComponentName name, int resultCode, diff --git a/core/java/android/content/IIntentReceiver.aidl b/core/java/android/content/IIntentReceiver.aidl index 3d9272388e0..93cebf44c07 100755 --- a/core/java/android/content/IIntentReceiver.aidl +++ b/core/java/android/content/IIntentReceiver.aidl @@ -24,7 +24,6 @@ import android.os.Bundle; * activity manager as part of registering for an intent broadcasts, and is * called when it receives intents. * - * {@hide} */ oneway interface IIntentReceiver { void performReceive(in Intent intent, int resultCode, String data, diff --git a/core/java/android/content/IIntentSender.aidl b/core/java/android/content/IIntentSender.aidl index 7dbd6f2ab92..223f434ba8b 100644 --- a/core/java/android/content/IIntentSender.aidl +++ b/core/java/android/content/IIntentSender.aidl @@ -19,7 +19,6 @@ package android.content; import android.content.IIntentReceiver; import android.content.Intent; -/** @hide */ interface IIntentSender { int send(int code, in Intent intent, String resolvedType, IIntentReceiver finishedReceiver, String requiredPermission); diff --git a/core/java/android/content/res/CompatibilityInfo.java b/core/java/android/content/res/CompatibilityInfo.java index 789d25e914c..1be2fd2e854 100644 --- a/core/java/android/content/res/CompatibilityInfo.java +++ b/core/java/android/content/res/CompatibilityInfo.java @@ -32,7 +32,6 @@ * CompatibilityInfo class keeps the information about compatibility mode that the application is * running under. * - * {@hide} */ public class CompatibilityInfo implements Parcelable { /** default compatibility info object for compatible applications */ @@ -292,7 +291,6 @@ public Translator getTranslator() { /** * A helper object to translate the screen and window coordinates back and forth. - * @hide */ public class Translator { final public float applicationScale; diff --git a/core/java/android/content/res/Configuration.java b/core/java/android/content/res/Configuration.java index 22269f430ce..3617b580072 100644 --- a/core/java/android/content/res/Configuration.java +++ b/core/java/android/content/res/Configuration.java @@ -23,10 +23,16 @@ import android.os.Parcel; import android.os.Parcelable; import android.text.TextUtils; +<<<<<<< HEAD +import android.view.Surface; +import android.view.View; +import android.util.ExtendedPropertiesUtils; +======= import android.util.ExtendedPropertiesUtils; import android.util.Log; import android.view.View; import android.view.Surface; +>>>>>>> upstream/jb-mr1 import android.util.Log; import android.os.SystemProperties; import android.text.TextUtils; @@ -604,6 +610,36 @@ public void paranoidHook() { } } + public boolean active; + + /** + * Process layout changes for current hook + */ + public void paranoidHook() { + if (getLayout() != 0 && active) { + + /*int dpi = getDpi(), layout = 600; + if (dpi <= 213) { + layout = 720; + } else if (dpi > 213) { + layout = 360; + }*/ + if (mDisplay == null) return; + Point size = new Point(); + mDisplay.getSize(size); + float factor = (float)Math.max(size.x, size.y) / (float)Math.min(size.x, size.y); + screenWidthDp = getLayout(); + screenHeightDp = (int)(screenWidthDp * factor); + smallestScreenWidthDp = getLayout(); + /*if (getLarge()) { + screenLayout |= SCREENLAYOUT_SIZE_XLARGE; + }*/ + compatScreenWidthDp = screenWidthDp; + compatScreenHeightDp = screenHeightDp; + compatSmallestScreenWidthDp = smallestScreenWidthDp; + } + } + /** * Construct an invalid Configuration. You must call {@link #setToDefaults} * for this object to be valid. {@more} diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java index 5b0f703db2b..28e38b56ff8 100755 --- a/core/java/android/content/res/Resources.java +++ b/core/java/android/content/res/Resources.java @@ -120,6 +120,23 @@ public class Resources extends ExtendedPropertiesUtils { private CompatibilityInfo mCompatibilityInfo; +<<<<<<< HEAD + /** + * Override current object with temp properties stored in enum interface + */ + public void paranoidHook() { + mConfiguration.active = true; + mConfiguration.overrideHook(this, OverrideMode.ExtendedProperties); + mConfiguration.paranoidHook(); + + mTmpConfig.active = true; + mTmpConfig.overrideHook(this, OverrideMode.ExtendedProperties); + mTmpConfig.paranoidHook(); + + mMetrics.overrideHook(this, OverrideMode.ExtendedProperties); + mMetrics.paranoidHook(); + } +======= /** * Override current object with temp properties stored in enum interface */ @@ -135,6 +152,7 @@ public void paranoidHook() { mMetrics.overrideHook(this, OverrideMode.ExtendedProperties); mMetrics.paranoidHook(); } +>>>>>>> upstream/jb-mr1 /** @hide */ public static int selectDefaultTheme(int curTheme, int targetSdkVersion) { diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index d8b47710b34..96c49ebc4f3 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -3282,6 +3282,13 @@ public static void setShowGTalkServiceStatusForUser(ContentResolver cr, boolean */ public static final String PIE_CENTER = "pie_center"; + /** + * User Interface State + * 1 = Rebuild UI, resets to 0 automatically + * @hide + */ + public static final String USER_INTERFACE_STATE = "user_interface_state"; + /** * Swap volume buttons when the screen is rotated by 90 or 180 degrees * @hide diff --git a/core/java/android/util/DisplayMetrics.java b/core/java/android/util/DisplayMetrics.java index 20305956a6e..f739eadb6b2 100644 --- a/core/java/android/util/DisplayMetrics.java +++ b/core/java/android/util/DisplayMetrics.java @@ -196,6 +196,14 @@ public class DisplayMetrics extends ExtendedPropertiesUtils { public void paranoidHook() { if (getActive()) { +<<<<<<< HEAD + density = getDensity() == 0 ? density : getDensity(); + scaledDensity = getScaledDensity() == 0 ? scaledDensity : getScaledDensity(); + densityDpi = getDpi() == 0 ? densityDpi : getDpi(); + noncompatDensity = densityDpi; + noncompatDensityDpi = densityDpi; + noncompatScaledDensity = scaledDensity; +======= boolean isOrientationOk = true; if (getLandscape() && mDisplay != null) { final int rotation = mDisplay.getRotation(); @@ -210,6 +218,7 @@ public void paranoidHook() { noncompatDensityDpi = densityDpi; noncompatScaledDensity = scaledDensity; } +>>>>>>> upstream/jb-mr1 } } @@ -304,7 +313,10 @@ public String toString() { ", height=" + heightPixels + ", scaledDensity=" + scaledDensity + ", xdpi=" + xdpi + ", ydpi=" + ydpi + "}"; } +<<<<<<< HEAD +======= +>>>>>>> upstream/jb-mr1 public static int getDeviceDensity() { return mGlobalHook.dpi == 0 ? DENSITY_DEVICE : mGlobalHook.dpi; } diff --git a/core/java/android/util/ExtendedPropertiesUtils.java b/core/java/android/util/ExtendedPropertiesUtils.java index 3cadbf95b09..7c3e74296e9 100644 --- a/core/java/android/util/ExtendedPropertiesUtils.java +++ b/core/java/android/util/ExtendedPropertiesUtils.java @@ -16,13 +16,31 @@ package android.util; +<<<<<<< HEAD +import java.io.PrintWriter; +import java.io.StringWriter; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; + +import android.app.ActivityManager; +import android.app.ActivityThread; +import android.app.ActivityManager.RunningAppProcessInfo; +======= import android.app.ActivityManager; import android.app.ActivityThread; import android.content.ContentResolver; +>>>>>>> upstream/jb-mr1 import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; +<<<<<<< HEAD +import android.view.Display; + +public class ExtendedPropertiesUtils { + +======= import android.content.res.Resources; import android.content.res.CompatibilityInfo; import android.os.SystemProperties; @@ -43,11 +61,25 @@ public class ExtendedPropertiesUtils { +>>>>>>> upstream/jb-mr1 private static final String TAG = "ExtendedPropertiesUtils"; /** * Public variables */ +<<<<<<< HEAD + public static final String BEERBONG_MAINCONF = "properties.conf"; + public static final String BEERBONG_BACKUPCONF = "backup.conf"; + public static final String BEERBONG_PROPERTIES = "/system/etc/beerbong/" + BEERBONG_MAINCONF; + public static final String BEERBONG_DIR = "/system/etc/beerbong/"; + public static final String BEERBONG_PREFIX = "%"; + public static final String BEERBONG_SEPARATOR = "."; + public static final String BEERBONG_STRING_DELIMITER = "\\|"; + public static final String BEERBONG_DPI_SUFFIX = ".dpi"; + public static final String BEERBONG_LAYOUT_SUFFIX = ".layout"; + public static final String BEERBONG_DENSITY_SUFFIX = ".den"; + public static final String BEERBONG_SCALEDDENSITY_SUFFIX = ".sden"; +======= public static final String PARANOID_MAINCONF = "properties.conf"; public static final String PARANOID_BACKUPCONF = "backup.conf"; public static final String PARANOID_PROPERTIES = "/system/etc/paranoid/" + PARANOID_MAINCONF; @@ -79,16 +111,26 @@ public class ExtendedPropertiesUtils { public static final int PARANOID_COLORS_NAVGLOW = 2; public static final int PARANOID_COLORS_STATBAR = 3; public static final int PARANOID_COLORS_STATICONS = 4; +>>>>>>> upstream/jb-mr1 public static HashMap mPropertyMap = new HashMap(); public static ActivityThread mMainThread; public static Context mContext; +<<<<<<< HEAD + public static PackageManager mPackageManager; + public static Display mDisplay; + public static List mPackageList; + + public static BeerbongAppInfo mGlobalHook = new BeerbongAppInfo(); + public BeerbongAppInfo mLocalHook = new BeerbongAppInfo(); +======= public static PackageManager mPackageManager; public static Display mDisplay; public static List mPackageList; public static ParanoidAppInfo mGlobalHook = new ParanoidAppInfo(); public ParanoidAppInfo mLocalHook = new ParanoidAppInfo(); +>>>>>>> upstream/jb-mr1 public static boolean sIsHybridModeEnabled; @@ -96,11 +138,20 @@ public class ExtendedPropertiesUtils { // Native methods public static native String readFile(String s); +<<<<<<< HEAD + + /** + * Contains all the details for an application + */ + public static class BeerbongAppInfo { + +======= /** * Contains all the details for an application */ public static class ParanoidAppInfo { +>>>>>>> upstream/jb-mr1 public String name = ""; public String path = ""; public boolean active; @@ -108,6 +159,11 @@ public static class ParanoidAppInfo { public ApplicationInfo info; public int dpi; public int layout; +<<<<<<< HEAD + public int firstRun; + public float scaledDensity; + public float density; +======= public int force; public int large; public int expand; @@ -117,6 +173,7 @@ public static class ParanoidAppInfo { public float scaledDensity; public float density; public String[] colors = new String[PARANOID_COLORS_COUNT]; +>>>>>>> upstream/jb-mr1 } /** @@ -127,6 +184,42 @@ public static enum OverrideMode { } /** +<<<<<<< HEAD + * Set app configuration for the input argument info. This is + * done by fetching properties.conf or our stored {@link HashMap}. + * + * @param info + * instance containing app details + */ + public static void setAppConfiguration(BeerbongAppInfo info) { + if (sIsHybridModeEnabled) { + // Load default values to be used in case that property is + // missing from configuration. + boolean isSystemApp = info.path.contains("system/app"); + int defaultDpi = getActualProperty(BEERBONG_PREFIX + (isSystemApp ? + "system_default_dpi" : (info.path.length() == 0 ? "0" : "user_default_dpi"))); + int defaultLayout = getActualProperty(BEERBONG_PREFIX + "user_default_layout"); + + if (defaultLayout == 0) { + defaultLayout = getActualProperty("com.android.systemui.layout"); + } + if (defaultDpi == 0) { + defaultDpi = getActualProperty("com.android.systemui.dpi"); + } + + // Layout fetching. + info.layout = Integer.parseInt(getProperty(info.name + BEERBONG_LAYOUT_SUFFIX, String.valueOf(defaultLayout))); + + // DPI fetching. + info.dpi = Integer.parseInt(getProperty(info.name + BEERBONG_DPI_SUFFIX, String.valueOf(defaultDpi))); + if (info.dpi == 0) { + info.dpi = defaultDpi; + } + + // Extra density fetching. + info.density = Float.parseFloat(getProperty(info.name + BEERBONG_DENSITY_SUFFIX)); + info.scaledDensity = Float.parseFloat(getProperty(info.name + BEERBONG_SCALEDDENSITY_SUFFIX)); +======= * Set app configuration for the input argument info. * This is done by fetching properties.conf or our stored {@link HashMap}. * @@ -151,11 +244,20 @@ public static void setAppConfiguration(ParanoidAppInfo info) { // Extra density fetching. info.density = Float.parseFloat(getProperty(info.name + PARANOID_DENSITY_SUFFIX)); info.scaledDensity = Float.parseFloat(getProperty(info.name + PARANOID_SCALEDDENSITY_SUFFIX)); +>>>>>>> upstream/jb-mr1 // In case that densities aren't determined in previous step // we calculate it by dividing DPI by default density (160). if (info.dpi != 0) { info.density = info.density == 0 ? info.dpi / (float) DisplayMetrics.DENSITY_DEFAULT : info.density; +<<<<<<< HEAD + info.scaledDensity = info.scaledDensity == 0 ? info.dpi / (float) DisplayMetrics.DENSITY_DEFAULT + : info.scaledDensity; + } + + info.firstRun = 0; + +======= info.scaledDensity = info.scaledDensity == 0 ? info.dpi / (float) DisplayMetrics.DENSITY_DEFAULT : info.scaledDensity; } @@ -177,17 +279,28 @@ public static void setAppConfiguration(ParanoidAppInfo info) { colors[i].toUpperCase() : ""; } +>>>>>>> upstream/jb-mr1 // If everything went nice, stop parsing. info.active = true; } } /** +<<<<<<< HEAD + * Overrides current hook with input parameter mode, wich is an + * enum interface that stores basic override possibilities. + * + * @param input + * object to be overriden + * @param mode + * enum interface +======= * Overrides current hook with input parameter mode, wich * is an enum interface that stores basic override possibilities. * * @param input object to be overriden * @param mode enum interface +>>>>>>> upstream/jb-mr1 */ public void overrideHook(Object input, OverrideMode mode) { if (isInitialized() && input != null) { @@ -204,23 +317,36 @@ public void overrideHook(Object input, OverrideMode mode) { mLocalHook.info = tempProps.mLocalHook.info; mLocalHook.name = tempProps.mLocalHook.name; mLocalHook.path = tempProps.mLocalHook.path; +<<<<<<< HEAD + mLocalHook.dpi = tempProps.mLocalHook.dpi; + mLocalHook.layout = tempProps.mLocalHook.layout; +======= mLocalHook.layout = tempProps.mLocalHook.layout; mLocalHook.dpi = tempProps.mLocalHook.dpi; mLocalHook.force = tempProps.mLocalHook.force; mLocalHook.large = tempProps.mLocalHook.large; +>>>>>>> upstream/jb-mr1 mLocalHook.scaledDensity = tempProps.mLocalHook.scaledDensity; mLocalHook.density = tempProps.mLocalHook.density; } return; case AppInfo: +<<<<<<< HEAD + mLocalHook.info = (ApplicationInfo) input; +======= mLocalHook.info = (ApplicationInfo)input; +>>>>>>> upstream/jb-mr1 break; case FullName: mLocalHook.info = getAppInfoFromPath((String) input); break; case FullNameExclude: tempInfo = getAppInfoFromPath((String) input); +<<<<<<< HEAD + if (tempInfo != null && !isHooked()) { +======= if (tempInfo != null && (!isHooked() || getProperty(tempInfo.packageName + PARANOID_FORCE_SUFFIX).equals("1"))) { +>>>>>>> upstream/jb-mr1 mLocalHook.info = tempInfo; } break; @@ -232,7 +358,11 @@ public void overrideHook(Object input, OverrideMode mode) { if (mLocalHook.info != null) { mLocalHook.pid = android.os.Process.myPid(); mLocalHook.name = mLocalHook.info.packageName; +<<<<<<< HEAD + mLocalHook.path = mLocalHook.info.sourceDir.substring(0, +======= mLocalHook.path = mLocalHook.info.sourceDir.substring(0, +>>>>>>> upstream/jb-mr1 mLocalHook.info.sourceDir.lastIndexOf("/")); setAppConfiguration(mLocalHook); @@ -241,11 +371,61 @@ public void overrideHook(Object input, OverrideMode mode) { } /** +<<<<<<< HEAD + * This methods are used to retrieve specific information for a hook. +======= * This methods are used to retrieve specific information for a hook. +>>>>>>> upstream/jb-mr1 */ public static boolean isInitialized() { return (mContext != null); } +<<<<<<< HEAD + + public static boolean isHooked() { + return (isInitialized() && !mGlobalHook.name.equals("android") && !mGlobalHook.name.equals("")); + } + + public boolean getActive() { + return mLocalHook.active ? mLocalHook.active : mGlobalHook.active; + } + + public int getPid() { + return mLocalHook.active ? mLocalHook.pid : mGlobalHook.pid; + } + + public ApplicationInfo getInfo() { + return mLocalHook.active ? mLocalHook.info : mGlobalHook.info; + } + + public String getName() { + return mLocalHook.active ? mLocalHook.name : mGlobalHook.name; + } + + public String getPath() { + return mLocalHook.active ? mLocalHook.path : mGlobalHook.path; + } + + public int getDpi() { + return mLocalHook.active ? mLocalHook.dpi : mGlobalHook.dpi; + } + + public int getLayout() { + return mLocalHook.active ? mLocalHook.layout : mGlobalHook.layout; + } + + public float getScaledDensity() { + return mLocalHook.active ? mLocalHook.scaledDensity : mGlobalHook.scaledDensity; + } + + public float getDensity() { + return mLocalHook.active ? mLocalHook.density : mGlobalHook.density; + } + + /** + * Returns whether if device is running hybrid mode + * +======= public static boolean isHooked() { return (isInitialized() && !mGlobalHook.name.equals("android") && !mGlobalHook.name.equals("")); } @@ -289,6 +469,7 @@ public boolean getLandscape() { /** * Returns whether if device is running hybrid mode * +>>>>>>> upstream/jb-mr1 * @return hybrid mode enabled */ public static boolean isHybridModeEnabled() { @@ -297,6 +478,32 @@ public static boolean isHybridModeEnabled() { /** * Returns whether if device is on tablet UI or not +<<<<<<< HEAD + * + * @return device is tablet + */ + public static boolean isTablet() { + int dpi; + String prop = readProperty("com.android.systemui.dpi", "0"); + if (isParsableToInt(prop)) { + dpi = Integer.parseInt(prop); + } else { + dpi = getActualProperty(prop); + } + return dpi < 213; + } + + /** + * Returns an {@link ApplicationInfo}, with the given path. + * + * @param path + * the apk path + * @return application info + */ + public static ApplicationInfo getAppInfoFromPath(String path) { + if (isInitialized()) { + for (int i = 0; mPackageList != null && i < mPackageList.size(); i++) { +======= * * @return device is tablet */ @@ -321,6 +528,7 @@ public static boolean isTablet() { public static ApplicationInfo getAppInfoFromPath(String path) { if(isInitialized()) { for(int i=0; mPackageList != null && i>>>>>> upstream/jb-mr1 PackageInfo p = mPackageList.get(i); if (p.applicationInfo != null && p.applicationInfo.sourceDir.equals(path)) { return p.applicationInfo; @@ -330,6 +538,18 @@ public static ApplicationInfo getAppInfoFromPath(String path) { return null; } +<<<<<<< HEAD + /** + * Returns an {@link ApplicationInfo}, with the given package name. + * + * @param packageName + * the application package name + * @return application info + */ + public static ApplicationInfo getAppInfoFromPackageName(String packageName) { + if (isInitialized()) { + for (int i = 0; mPackageList != null && i < mPackageList.size(); i++) { +======= /** * Returns an {@link ApplicationInfo}, with the given package name. @@ -340,6 +560,7 @@ public static ApplicationInfo getAppInfoFromPath(String path) { public static ApplicationInfo getAppInfoFromPackageName(String packageName) { if(isInitialized()) { for(int i=0; mPackageList != null && i>>>>>> upstream/jb-mr1 PackageInfo p = mPackageList.get(i); if (p.applicationInfo != null && p.applicationInfo.packageName.equals(packageName)) { return p.applicationInfo; @@ -349,20 +570,38 @@ public static ApplicationInfo getAppInfoFromPackageName(String packageName) { return null; } +<<<<<<< HEAD + /** + * Returns an {@link ApplicationInfo}, with the given PID. + * + * @param pid + * the application PID +======= /** * Returns an {@link ApplicationInfo}, with the given PID. * * @param pid the application PID +>>>>>>> upstream/jb-mr1 * @return application info */ public static ApplicationInfo getAppInfoFromPID(int pid) { if (isInitialized()) { +<<<<<<< HEAD + List mProcessList = ((ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE)) + .getRunningAppProcesses(); + Iterator mProcessListIt = mProcessList.iterator(); + while (mProcessListIt.hasNext()) { + ActivityManager.RunningAppProcessInfo mAppInfo = (ActivityManager.RunningAppProcessInfo) (mProcessListIt + .next()); + if (mAppInfo.pid == pid) { +======= List mProcessList = ((ActivityManager)mContext.getSystemService(Context.ACTIVITY_SERVICE)).getRunningAppProcesses(); Iterator mProcessListIt = mProcessList.iterator(); while(mProcessListIt.hasNext()) { ActivityManager.RunningAppProcessInfo mAppInfo = (ActivityManager.RunningAppProcessInfo)(mProcessListIt.next()); if(mAppInfo.pid == pid) { +>>>>>>> upstream/jb-mr1 return getAppInfoFromPackageName(mAppInfo.processName); } } @@ -371,16 +610,28 @@ public static ApplicationInfo getAppInfoFromPID(int pid) { } /** +<<<<<<< HEAD + * Traces the input argument msg as a log. Used for debugging. + * Should not be used on public classes. + * + * @param msg + * the message to log +======= * Traces the input argument msg as a log. * Used for debugging. Should not be used on public classes. * * @param msg the message to log +>>>>>>> upstream/jb-mr1 */ public static void traceMsg(String msg) { StringWriter sw = new StringWriter(); new Throwable("").printStackTrace(new PrintWriter(sw)); String stackTrace = sw.toString(); +<<<<<<< HEAD + Log.i(TAG + ":" + msg, "Trace=" + stackTrace); +======= Log.i(TAG + ":" + msg, "Trace=" + stackTrace); +>>>>>>> upstream/jb-mr1 } /** @@ -388,8 +639,13 @@ public static void traceMsg(String msg) { */ public static void refreshProperties() { mPropertyMap.clear(); +<<<<<<< HEAD + String[] props = readFile(BEERBONG_PROPERTIES).split("\n"); + for (int i = 0; i < props.length; i++) { +======= String[] props = readFile(PARANOID_PROPERTIES).split("\n"); for(int i=0; i>>>>>> upstream/jb-mr1 if (!props[i].startsWith("#")) { String[] pair = props[i].split("="); if (pair.length == 2) { @@ -400,6 +656,17 @@ public static void refreshProperties() { } /** +<<<<<<< HEAD + * Returns a {@link String}, containing the result of the configuration for + * the input argument prop. If the property is not found it + * returns zero. + * + * @param prop + * a string containing the property to checkout + * @return current stored value of property + */ + public static String getProperty(String prop) { +======= * Returns a {@link String}, containing the result of the configuration * for the input argument prop. If the property is not found * it returns zero. @@ -408,37 +675,79 @@ public static void refreshProperties() { * @return current stored value of property */ public static String getProperty(String prop){ +>>>>>>> upstream/jb-mr1 return getProperty(prop, String.valueOf(0)); } /** +<<<<<<< HEAD + * Returns a {@link String}, containing the result of the configuration for + * the input argument prop. If the property is not found it + * returns the input argument def. + * + * @param prop + * a string containing the property to checkout + * @param def + * default value to be returned in case that property is missing +======= * Returns a {@link String}, containing the result of the configuration * for the input argument prop. If the property is not found * it returns the input argument def. * * @param prop a string containing the property to checkout * @param def default value to be returned in case that property is missing +>>>>>>> upstream/jb-mr1 * @return current stored value of property */ public static String getProperty(String prop, String def) { try { if (isInitialized()) { String result = mPropertyMap.get(prop); +<<<<<<< HEAD + if (result == null) + return def; + if (result.startsWith(BEERBONG_PREFIX)) { +======= if (result == null) return def; if (result.startsWith(PARANOID_PREFIX)) { +>>>>>>> upstream/jb-mr1 result = getProperty(result, def); } return result; } else { return readProperty(prop, def); } +<<<<<<< HEAD + } catch (NullPointerException e) { +======= } catch (NullPointerException e){ +>>>>>>> upstream/jb-mr1 e.printStackTrace(); } return def; } /** +<<<<<<< HEAD + * Returns a {@link String}, containing the result of the configuration for + * the input argument prop. If the property is not found it + * returns the input argument def. This property is directly + * read from the configuration file. + * + * @param prop + * a string containing the property to checkout + * @param def + * default value to be returned in case that property is missing + * @return current stored value of property + */ + public static String readProperty(String prop, String def) { + String[] props = readFile(BEERBONG_PROPERTIES).split("\n"); + for (int i = 0; i < props.length; i++) { + if (props[i].contains("=")) { + if (props[i].substring(0, props[i].lastIndexOf("=")).equals(prop)) { + String result = props[i].replace(prop + "=", "").trim(); + if (result.startsWith(BEERBONG_PREFIX)) { +======= * Returns a {@link String}, containing the result of the configuration * for the input argument prop. If the property is not found * it returns the input argument def. This property is directly @@ -455,6 +764,7 @@ public static String readProperty(String prop, String def) { if(props[i].substring(0, props[i].lastIndexOf("=")).equals(prop)) { String result = props[i].replace(prop+"=", "").trim(); if (result.startsWith(PARANOID_PREFIX)) { +>>>>>>> upstream/jb-mr1 result = getProperty(result, def); } return result; @@ -465,12 +775,22 @@ public static String readProperty(String prop, String def) { } /** +<<<<<<< HEAD + * Returns an {@link Integer}, equivalent to what other classes will + * actually load for the input argument property. it differs + * from {@link #getProperty(String, String) getProperty}, because the values + * returned will never be zero. + * + * @param property + * a string containing the property to checkout +======= * Returns an {@link Integer}, equivalent to what other classes will actually * load for the input argument property. it differs from * {@link #getProperty(String, String) getProperty}, because the values * returned will never be zero. * * @param property a string containing the property to checkout +>>>>>>> upstream/jb-mr1 * @return the actual integer value of the selected property * @see getProperty */ @@ -478,6 +798,15 @@ public static int getActualProperty(String property) { int result = 0; boolean getProp = false; +<<<<<<< HEAD + if (property.endsWith(BEERBONG_DPI_SUFFIX)) { + ApplicationInfo appInfo = getAppInfoFromPackageName(property.substring(0, property.length() + - BEERBONG_DPI_SUFFIX.length())); + if (appInfo != null) { + boolean isSystemApp = + appInfo.sourceDir.substring(0, appInfo.sourceDir.lastIndexOf("/")).contains("system/app"); + result = Integer.parseInt(getProperty(property, getProperty(BEERBONG_PREFIX + (isSystemApp ? +======= if (property.endsWith(PARANOID_DPI_SUFFIX)) { ApplicationInfo appInfo = getAppInfoFromPackageName(property.substring(0, property.length() - PARANOID_DPI_SUFFIX.length())); @@ -485,10 +814,20 @@ public static int getActualProperty(String property) { boolean isSystemApp = appInfo.sourceDir.substring(0, appInfo.sourceDir.lastIndexOf("/")).contains("system/app"); result = Integer.parseInt(getProperty(property, getProperty(PARANOID_PREFIX + (isSystemApp ? +>>>>>>> upstream/jb-mr1 "system_default_dpi" : "user_default_dpi")))); } else { getProp = true; } +<<<<<<< HEAD + } else if (property.endsWith(BEERBONG_LAYOUT_SUFFIX)) { + ApplicationInfo appInfo = getAppInfoFromPackageName(property.substring(0, property.length() + - BEERBONG_LAYOUT_SUFFIX.length())); + if(appInfo != null) { + boolean isSystemApp = + appInfo.sourceDir.substring(0, appInfo.sourceDir.lastIndexOf("/")).contains("system/app"); + result = Integer.parseInt(getProperty(property, getProperty(BEERBONG_PREFIX + (isSystemApp ? +======= } else if (property.endsWith(PARANOID_LAYOUT_SUFFIX)) { ApplicationInfo appInfo = getAppInfoFromPackageName(property.substring(0, property.length() - PARANOID_LAYOUT_SUFFIX.length())); @@ -496,6 +835,7 @@ public static int getActualProperty(String property) { boolean isSystemApp = appInfo.sourceDir.substring(0, appInfo.sourceDir.lastIndexOf("/")).contains("system/app"); result = Integer.parseInt(getProperty(property, getProperty(PARANOID_PREFIX + (isSystemApp ? +>>>>>>> upstream/jb-mr1 "system_default_layout" : "user_default_layout")))); } else { getProp = true; @@ -504,11 +844,20 @@ public static int getActualProperty(String property) { getProp = true; } +<<<<<<< HEAD + if (getProp) + result = Integer.parseInt(getProperty(property)); + + if (result == 0) { + result = Integer.parseInt(property.endsWith("dpi") ? getProperty(BEERBONG_PREFIX + "rom_default_dpi") + : getProperty(BEERBONG_PREFIX + "rom_default_layout")); +======= if(getProp) result = Integer.parseInt(getProperty(property)); if (result == 0) { result = Integer.parseInt(property.endsWith("dpi") ? getProperty(PARANOID_PREFIX + "rom_default_dpi") : getProperty(PARANOID_PREFIX + "rom_default_layout")); +>>>>>>> upstream/jb-mr1 } return result; @@ -517,12 +866,30 @@ public static int getActualProperty(String property) { /** * Returns a {@link Boolean}, meaning if the input argument is an integer * number. +<<<<<<< HEAD + * + * @param str + * the string to be tested +======= * * @param str the string to be tested +>>>>>>> upstream/jb-mr1 * @return the string is an integer number */ public static boolean isParsableToInt(String str) { try { +<<<<<<< HEAD + Integer.parseInt(str); + return true; + } catch (NumberFormatException nfe) { + return false; + } + } + + public void debugOut(String msg) { + Log.i(TAG + ":" + msg, "Init=" + (mMainThread != null && mContext != null && + mPackageManager != null) + " App=" + getName() + " Dpi=" + getDpi()); +======= int i = Integer.parseInt(str); return true; } catch(NumberFormatException nfe) { @@ -534,5 +901,6 @@ public void debugOut(String msg) { Log.i(TAG + ":" + msg, "Init=" + (mMainThread != null && mContext != null && mPackageManager != null) + " App=" + getName() + " Dpi=" + getDpi() + " Layout=" + getLayout()); +>>>>>>> upstream/jb-mr1 } } diff --git a/core/java/android/view/CompatibilityInfoHolder.java b/core/java/android/view/CompatibilityInfoHolder.java index fc8d6841ac8..6bab08deef8 100644 --- a/core/java/android/view/CompatibilityInfoHolder.java +++ b/core/java/android/view/CompatibilityInfoHolder.java @@ -18,7 +18,6 @@ import android.content.res.CompatibilityInfo; -/** @hide */ public class CompatibilityInfoHolder { private volatile CompatibilityInfo mCompatInfo = CompatibilityInfo.DEFAULT_COMPATIBILITY_INFO; diff --git a/core/java/android/view/DisplayInfo.java b/core/java/android/view/DisplayInfo.java index 871101f7a2a..38aa588605d 100644 --- a/core/java/android/view/DisplayInfo.java +++ b/core/java/android/view/DisplayInfo.java @@ -307,9 +307,14 @@ private void getMetricsWithSize(DisplayMetrics outMetrics, CompatibilityInfoHold outMetrics.scaledDensity = outMetrics.noncompatScaledDensity = outMetrics.density; outMetrics.xdpi = outMetrics.noncompatXdpi = physicalXDpi; outMetrics.ydpi = outMetrics.noncompatYdpi = physicalYDpi; +<<<<<<< HEAD + if (outMetrics.isHooked()) + outMetrics.paranoidHook(); +======= if (outMetrics.isHooked()) { outMetrics.paranoidHook(); } +>>>>>>> upstream/jb-mr1 if (cih != null) { CompatibilityInfo ci = cih.getIfNeeded(); diff --git a/core/jni/Android.mk b/core/jni/Android.mk index ec108fe1fbc..e7ca5971c86 100644 --- a/core/jni/Android.mk +++ b/core/jni/Android.mk @@ -81,7 +81,11 @@ LOCAL_SRC_FILES:= \ android_util_AssetManager.cpp \ android_util_Binder.cpp \ android_util_EventLog.cpp \ +<<<<<<< HEAD + android_util_ExtendedPropertiesUtils.cpp \ +======= android_util_ExtendedPropertiesUtils.cpp \ +>>>>>>> upstream/jb-mr1 android_util_Log.cpp \ android_util_FloatMath.cpp \ android_util_Process.cpp \ diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_tether_off.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_tether_off.png index 4e6000f13e4..62097dba131 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_tether_off.png and b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_tether_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_tether_off_light.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_tether_off_light.png old mode 100755 new mode 100644 index 955b323f057..7309a034976 Binary files a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_tether_off_light.png and b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_tether_off_light.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_tether_on.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_tether_on.png index 2dae6f2b91b..210e391b274 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_tether_on.png and b/packages/SystemUI/res/drawable-hdpi/ic_qs_wifi_tether_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_2g3g_off.png b/packages/SystemUI/res/drawable-hdpi/stat_2g3g_off.png index 2f622959490..fbe6a971472 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_2g3g_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_2g3g_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_2g3g_on.png b/packages/SystemUI/res/drawable-hdpi/stat_2g3g_on.png index e5382348d67..171a68ef427 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_2g3g_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_2g3g_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_3g_on.png b/packages/SystemUI/res/drawable-hdpi/stat_3g_on.png index 5d51ce50562..0b002b5f51b 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_3g_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_3g_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_airplane_off.png b/packages/SystemUI/res/drawable-hdpi/stat_airplane_off.png index af84d66e542..deab5d4db37 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_airplane_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_airplane_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_airplane_on.png b/packages/SystemUI/res/drawable-hdpi/stat_airplane_on.png index 0aab5cccf3f..b55e6edc784 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_airplane_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_airplane_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_bluetooth_off.png b/packages/SystemUI/res/drawable-hdpi/stat_bluetooth_off.png index a45c3eaee51..a8e23421871 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_bluetooth_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_bluetooth_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_bluetooth_on.png b/packages/SystemUI/res/drawable-hdpi/stat_bluetooth_on.png index 4680e566072..9e8cb77e88e 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_bluetooth_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_bluetooth_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_brightness_auto.png b/packages/SystemUI/res/drawable-hdpi/stat_brightness_auto.png index 2698b58d724..61ea4474fb8 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_brightness_auto.png and b/packages/SystemUI/res/drawable-hdpi/stat_brightness_auto.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_brightness_mid.png b/packages/SystemUI/res/drawable-hdpi/stat_brightness_mid.png index 3e3fb909419..15008b87af4 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_brightness_mid.png and b/packages/SystemUI/res/drawable-hdpi/stat_brightness_mid.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_brightness_off.png b/packages/SystemUI/res/drawable-hdpi/stat_brightness_off.png index 0f25e1f0dcf..6900d11e756 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_brightness_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_brightness_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_brightness_on.png b/packages/SystemUI/res/drawable-hdpi/stat_brightness_on.png index af8a24d5b61..f3f4bb5e789 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_brightness_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_brightness_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_data_off.png b/packages/SystemUI/res/drawable-hdpi/stat_data_off.png index 94de93fdfe9..45e1e60a92e 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_data_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_data_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_data_on.png b/packages/SystemUI/res/drawable-hdpi/stat_data_on.png index d760de51a1c..56dce8913e6 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_data_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_data_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_flashlight_off.png b/packages/SystemUI/res/drawable-hdpi/stat_flashlight_off.png index b9011a91752..76b5de0b3a0 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_flashlight_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_flashlight_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_flashlight_on.png b/packages/SystemUI/res/drawable-hdpi/stat_flashlight_on.png index ed44e561e80..6fa82c263cf 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_flashlight_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_flashlight_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_gps_off.png b/packages/SystemUI/res/drawable-hdpi/stat_gps_off.png index cd3c61e2f6e..43a70cd3bec 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_gps_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_gps_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_gps_on.png b/packages/SystemUI/res/drawable-hdpi/stat_gps_on.png index 1b1005d516a..b9502bed5f6 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_gps_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_gps_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_lock_screen_off.png b/packages/SystemUI/res/drawable-hdpi/stat_lock_screen_off.png index 01fa6a56243..7a8dc3f87f7 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_lock_screen_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_lock_screen_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_lock_screen_on.png b/packages/SystemUI/res/drawable-hdpi/stat_lock_screen_on.png index d3d8ddff562..ab3e89d19ec 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_lock_screen_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_lock_screen_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_lte_off.png b/packages/SystemUI/res/drawable-hdpi/stat_lte_off.png index 1e94c278153..e79be205257 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_lte_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_lte_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_lte_on.png b/packages/SystemUI/res/drawable-hdpi/stat_lte_on.png index c72372f2da3..b240c7d0f45 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_lte_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_lte_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_media_next.png b/packages/SystemUI/res/drawable-hdpi/stat_media_next.png index 77e02cac8ea..4f95d75c0a1 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_media_next.png and b/packages/SystemUI/res/drawable-hdpi/stat_media_next.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_media_pause.png b/packages/SystemUI/res/drawable-hdpi/stat_media_pause.png index 1e48e9a7b25..cb84c835515 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_media_pause.png and b/packages/SystemUI/res/drawable-hdpi/stat_media_pause.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_media_play.png b/packages/SystemUI/res/drawable-hdpi/stat_media_play.png index 74c77a74191..0d4b0fff30c 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_media_play.png and b/packages/SystemUI/res/drawable-hdpi/stat_media_play.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_media_previous.png b/packages/SystemUI/res/drawable-hdpi/stat_media_previous.png index d33a2ad5d7c..54ec4d8697a 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_media_previous.png and b/packages/SystemUI/res/drawable-hdpi/stat_media_previous.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_orientation_off.png b/packages/SystemUI/res/drawable-hdpi/stat_orientation_off.png index bf7e4fb5833..3d99363d1be 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_orientation_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_orientation_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_orientation_on.png b/packages/SystemUI/res/drawable-hdpi/stat_orientation_on.png index 9c6c386e05f..03e2f5af8d0 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_orientation_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_orientation_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_ring_off.png b/packages/SystemUI/res/drawable-hdpi/stat_ring_off.png index d561e97bd47..8d238199f19 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_ring_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_ring_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_ring_on.png b/packages/SystemUI/res/drawable-hdpi/stat_ring_on.png index 369ff5bf230..cacf00d4d0a 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_ring_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_ring_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_ring_vibrate_on.png b/packages/SystemUI/res/drawable-hdpi/stat_ring_vibrate_on.png index d6d26589f62..5c328f4c38c 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_ring_vibrate_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_ring_vibrate_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_screen_timeout_off.png b/packages/SystemUI/res/drawable-hdpi/stat_screen_timeout_off.png index 7003d3873d3..e2eb5a7197b 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_screen_timeout_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_screen_timeout_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_screen_timeout_on.png b/packages/SystemUI/res/drawable-hdpi/stat_screen_timeout_on.png index c6228493f9f..dc13265ec92 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_screen_timeout_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_screen_timeout_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_silent.png b/packages/SystemUI/res/drawable-hdpi/stat_silent.png index 68b370095f1..85237447131 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_silent.png and b/packages/SystemUI/res/drawable-hdpi/stat_silent.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sleep.png b/packages/SystemUI/res/drawable-hdpi/stat_sleep.png index 16cb4f89c67..e7481e13652 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_sleep.png and b/packages/SystemUI/res/drawable-hdpi/stat_sleep.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sync_off.png b/packages/SystemUI/res/drawable-hdpi/stat_sync_off.png index 1c9079e394c..969037beeb2 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_sync_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_sync_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sync_on.png b/packages/SystemUI/res/drawable-hdpi/stat_sync_on.png index 33e07abbc69..685e79bdf8c 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_sync_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_sync_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_vibrate_off.png b/packages/SystemUI/res/drawable-hdpi/stat_vibrate_off.png index 41991067dbc..3807dd79a68 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_vibrate_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_vibrate_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_vibrate_on.png b/packages/SystemUI/res/drawable-hdpi/stat_vibrate_on.png index d5a64972462..3e2070962ae 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_vibrate_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_vibrate_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_wifi_ap_off.png b/packages/SystemUI/res/drawable-hdpi/stat_wifi_ap_off.png index 5e24ba213e2..62097dba131 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_wifi_ap_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_wifi_ap_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_wifi_ap_on.png b/packages/SystemUI/res/drawable-hdpi/stat_wifi_ap_on.png index 96da9bee55e..210e391b274 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_wifi_ap_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_wifi_ap_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_wifi_off.png b/packages/SystemUI/res/drawable-hdpi/stat_wifi_off.png index 0e0ccdabfa7..25d2d637b59 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_wifi_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_wifi_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_wifi_on.png b/packages/SystemUI/res/drawable-hdpi/stat_wifi_on.png index ce6d3e6f574..c1da49d31a4 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_wifi_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_wifi_on.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_wimax_off.png b/packages/SystemUI/res/drawable-hdpi/stat_wimax_off.png index 7270cb52c7a..2856843de2c 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_wimax_off.png and b/packages/SystemUI/res/drawable-hdpi/stat_wimax_off.png differ diff --git a/packages/SystemUI/res/drawable-hdpi/stat_wimax_on.png b/packages/SystemUI/res/drawable-hdpi/stat_wimax_on.png index 678e8c543be..d1929bede6c 100644 Binary files a/packages/SystemUI/res/drawable-hdpi/stat_wimax_on.png and b/packages/SystemUI/res/drawable-hdpi/stat_wimax_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_tether_off.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_tether_off.png old mode 100755 new mode 100644 index 260f00fc07f..2a1e525f46e Binary files a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_tether_off.png and b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_tether_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_tether_off_light.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_tether_off_light.png index 65b797f3640..f847d99a77c 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_tether_off_light.png and b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_tether_off_light.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_tether_on.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_tether_on.png old mode 100755 new mode 100644 index 41b44ef2525..572647532bc Binary files a/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_tether_on.png and b/packages/SystemUI/res/drawable-xhdpi/ic_qs_wifi_tether_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_2g3g_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_2g3g_off.png index e95cbea2392..c50453f8ad3 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_2g3g_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_2g3g_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_2g3g_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_2g3g_on.png index 33cb8733f9e..e23f7943fd3 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_2g3g_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_2g3g_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_3g_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_3g_on.png index 18b9401a591..3fb2df9f3f0 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_3g_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_3g_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_airplane_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_airplane_off.png index ba1efa6ded8..d29113ec9d7 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_airplane_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_airplane_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_airplane_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_airplane_on.png index 7633ceb5284..d56d8777fd8 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_airplane_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_airplane_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_bluetooth_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_bluetooth_off.png index bea478ec7e1..d5319337768 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_bluetooth_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_bluetooth_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_bluetooth_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_bluetooth_on.png index f6381497108..55538f9df5e 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_bluetooth_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_bluetooth_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_brightness_auto.png b/packages/SystemUI/res/drawable-xhdpi/stat_brightness_auto.png index 4fa6e51b532..9d85fdccc32 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_brightness_auto.png and b/packages/SystemUI/res/drawable-xhdpi/stat_brightness_auto.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_brightness_mid.png b/packages/SystemUI/res/drawable-xhdpi/stat_brightness_mid.png index 610b1f8f05f..5b9fbf19276 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_brightness_mid.png and b/packages/SystemUI/res/drawable-xhdpi/stat_brightness_mid.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_brightness_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_brightness_off.png index 54d40d69d0f..0a8007a9cee 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_brightness_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_brightness_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_brightness_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_brightness_on.png index 5be25cfb9b7..95bdc655619 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_brightness_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_brightness_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_data_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_data_off.png index d71463d66fd..afa8b55cbb0 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_data_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_data_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_data_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_data_on.png index 1baeea435bb..9122f1670f6 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_data_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_data_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_flashlight_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_flashlight_off.png index 88f5ddac6c5..853b2bdb51f 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_flashlight_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_flashlight_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_flashlight_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_flashlight_on.png index 3b1bb05ecee..35bfd2c5ff0 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_flashlight_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_flashlight_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_gps_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_gps_off.png index 0548274008f..fcc52e8f996 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_gps_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_gps_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_gps_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_gps_on.png index aabe547fdd9..dfbec52ac01 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_gps_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_gps_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_lock_screen_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_lock_screen_off.png index aa6bfddced5..59be36a5c89 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_lock_screen_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_lock_screen_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_lock_screen_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_lock_screen_on.png index e81d4e3a529..ef91b1564db 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_lock_screen_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_lock_screen_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_lte_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_lte_off.png index a4b2c2a44b3..5820770a256 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_lte_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_lte_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_lte_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_lte_on.png index 87cd9c98116..e0b9d33f536 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_lte_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_lte_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_media_next.png b/packages/SystemUI/res/drawable-xhdpi/stat_media_next.png index aaf142378bd..a5ac63c262e 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_media_next.png and b/packages/SystemUI/res/drawable-xhdpi/stat_media_next.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_media_pause.png b/packages/SystemUI/res/drawable-xhdpi/stat_media_pause.png index dafcfd9e1f4..c1fa27177d0 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_media_pause.png and b/packages/SystemUI/res/drawable-xhdpi/stat_media_pause.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_media_play.png b/packages/SystemUI/res/drawable-xhdpi/stat_media_play.png index a823be186de..b47ec289bfa 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_media_play.png and b/packages/SystemUI/res/drawable-xhdpi/stat_media_play.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_media_previous.png b/packages/SystemUI/res/drawable-xhdpi/stat_media_previous.png index dfd1e0727a0..1bad3956959 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_media_previous.png and b/packages/SystemUI/res/drawable-xhdpi/stat_media_previous.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_orientation_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_orientation_off.png index 94acc83963e..b924744360a 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_orientation_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_orientation_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_orientation_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_orientation_on.png index be2906e1dac..e7f5f8dd7c2 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_orientation_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_orientation_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_ring_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_ring_off.png index 1f06503646f..f2a0755951d 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_ring_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_ring_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_ring_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_ring_on.png index 6447a4c92ce..399b509c929 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_ring_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_ring_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_ring_vibrate_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_ring_vibrate_on.png index c4ee919f776..cb4b16156ee 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_ring_vibrate_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_ring_vibrate_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_screen_timeout_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_screen_timeout_off.png index 497c489af7d..051ece4df39 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_screen_timeout_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_screen_timeout_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_screen_timeout_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_screen_timeout_on.png index c2069166fb8..092923f08eb 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_screen_timeout_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_screen_timeout_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_silent.png b/packages/SystemUI/res/drawable-xhdpi/stat_silent.png index 1f06503646f..0f691bfa611 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_silent.png and b/packages/SystemUI/res/drawable-xhdpi/stat_silent.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sleep.png b/packages/SystemUI/res/drawable-xhdpi/stat_sleep.png index f4c074a0152..d890e7ffd65 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_sleep.png and b/packages/SystemUI/res/drawable-xhdpi/stat_sleep.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sync_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_sync_off.png index 11925bd7854..f885f83ce3f 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_sync_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_sync_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sync_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_sync_on.png index bc095b7ec80..a47cd19f432 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_sync_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_sync_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_vibrate_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_vibrate_off.png index 122c7081c0e..2f852960dd7 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_vibrate_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_vibrate_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_vibrate_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_vibrate_on.png index a2198cbe821..bdc198681ad 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_vibrate_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_vibrate_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_wifi_ap_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_wifi_ap_off.png index afe19976dc1..15c0710237e 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_wifi_ap_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_wifi_ap_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_wifi_ap_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_wifi_ap_on.png index db495efaa11..2e3e7790475 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_wifi_ap_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_wifi_ap_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_wifi_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_wifi_off.png index 53b4566b464..8c4ff2eef66 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_wifi_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_wifi_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_wifi_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_wifi_on.png index 1083a6c94d2..d3b06466030 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_wifi_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_wifi_on.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_wimax_off.png b/packages/SystemUI/res/drawable-xhdpi/stat_wimax_off.png index 36ed0a20762..ae5d2e857a6 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_wimax_off.png and b/packages/SystemUI/res/drawable-xhdpi/stat_wimax_off.png differ diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_wimax_on.png b/packages/SystemUI/res/drawable-xhdpi/stat_wimax_on.png index e5a267b05a1..94f98afd918 100644 Binary files a/packages/SystemUI/res/drawable-xhdpi/stat_wimax_on.png and b/packages/SystemUI/res/drawable-xhdpi/stat_wimax_on.png differ diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java index d31ef5bd7a4..89aab124667 100644 --- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java @@ -105,6 +105,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener private int mAndroidDpi = DisplayMetrics.DENSITY_DEVICE; boolean ramBarEnabled; boolean mRecentsKillAllEnabled; + private int mAndroidDpi = DisplayMetrics.DENSITY_DEVICE; TextView mBackgroundProcessText; TextView mForegroundProcessText; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index 9312e8d63b3..ba4c1657b1a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -580,13 +580,16 @@ private void addPieInLocation(int gravity) { // Quick navigation bar trigger area View pieControlsTrigger = new View(mContext); - + // Create a dummy view to force the screen to redraw + View pieDummytrigger = new View(mContext); // Store our views for removing / adding mPieControlPanel = panel; mPieControlsTrigger = pieControlsTrigger; pieControlsTrigger.setOnTouchListener(new PieControlsTouchListener()); mWindowManager.addView(pieControlsTrigger, getPieTriggerLayoutParams(mContext, gravity)); + mWindowManager.addView(pieDummytrigger, getPieTriggerLayoutParams(mContext, + gravity==Gravity.BOTTOM ? Gravity.TOP : Gravity.BOTTOM)); panel.init(mHandler, this, pieControlsTrigger, gravity); WindowManager.LayoutParams lp = new WindowManager.LayoutParams( diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 9a92f519890..d932ce7627f 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -58,6 +58,7 @@ import android.os.Looper; import android.os.Message; import android.os.Messenger; +import android.os.Parcel; import android.os.PowerManager; import android.os.Process; import android.os.RemoteException; @@ -430,6 +431,9 @@ private void unregisterSelf() { } } + // HW overlays state + int mDisableOverlays = 0; + private static final class PointerLocationInputEventReceiver extends InputEventReceiver { private final PointerLocationView mView; @@ -605,7 +609,11 @@ public void onInputEvent(InputEvent event) { private int mSystemDpi = 0; private int mSystemUiDpi = 0; private int mSystemUiLayout = 0; +<<<<<<< HEAD + private int mNavBarDpi = 0; +======= private int mNavigationBarDpi = 0; +>>>>>>> upstream/jb-mr1 private int mStatusBarDpi = 0; SettingsObserver mSettingsObserver; @@ -741,6 +749,8 @@ void observe() { @Override public void onChange(boolean selfChange) { update(false); +<<<<<<< HEAD +======= } } @@ -768,6 +778,7 @@ public void onChange(boolean selfChange) { // Reset trigger Settings.System.putInt(mContext.getContentResolver(), Settings.System.USER_INTERFACE_STATE, 0); +>>>>>>> upstream/jb-mr1 } } @@ -1203,8 +1214,28 @@ public void init(Context context, IWindowManager windowManager, mSettingsObserver = new SettingsObserver(mHandler); mSettingsObserver.observe(); +<<<<<<< HEAD + // SystemUI reboot + mContext.getContentResolver().registerContentObserver( + Settings.System.getUriFor(Settings.System.USER_INTERFACE_STATE), false, new ContentObserver(new Handler()) { + @Override + public void onChange(boolean selfChange) { + // Return for reset triggers + if (Settings.System.getInt(mContext.getContentResolver(), + Settings.System.USER_INTERFACE_STATE, 0) == 0) { + return; + } + + // Update layout + update(true); + + // Reset trigger + Settings.System.putInt(mContext.getContentResolver(), Settings.System.USER_INTERFACE_STATE, 0); + }}); +======= mUserInterfaceObserver = new UserInterfaceObserver(mHandler); mUserInterfaceObserver.observe(); +>>>>>>> upstream/jb-mr1 // Expanded desktop mContext.getContentResolver().registerContentObserver( @@ -1213,6 +1244,9 @@ false, new ContentObserver(new Handler()) { @Override public void onChange(boolean selfChange) { + updateHybridLayout(); + update(false); + // Restart default launcher activity final PackageManager mPm = mContext.getPackageManager(); final ActivityManager am = (ActivityManager)mContext @@ -1415,6 +1449,34 @@ private void closeApplication(String packageName) { // Good luck next time! } } + + private void update(boolean updateUi) { + if (updateUi) { + updateHybridLayout(); + } + + updateSettings(); + updateRotation(false); + + if (updateUi) closeApplication("com.android.systemui"); + } + + private int updateHybridLayout() { + boolean expDesktop = Settings.System.getInt(mContext.getContentResolver(), + Settings.System.EXPANDED_DESKTOP_STATE, 0) == 1; + int oldSystemUILayout = mSystemUiLayout == 0 ? + ExtendedPropertiesUtils.getActualProperty("com.android.systemui.layout") : mSystemUiLayout; + ExtendedPropertiesUtils.refreshProperties(); + mSystemDpi = ExtendedPropertiesUtils.getActualProperty("android.dpi"); + mSystemUiDpi = ExtendedPropertiesUtils.getActualProperty("com.android.systemui.dpi"); + mSystemUiLayout = ExtendedPropertiesUtils.getActualProperty("com.android.systemui.layout"); +android.util.Log.d("*********************************************", "UPDATE mSystemUiLayout=" + mSystemUiLayout); + int mNavigationBarPercent = expDesktop ? 0 : Integer.parseInt(ExtendedPropertiesUtils.getProperty("com.android.systemui.navbar.dpi", "100")); + mNavBarDpi = mNavigationBarPercent * mSystemUiDpi / 100; + int mStatusBarPercent = Integer.parseInt(ExtendedPropertiesUtils.getProperty("com.android.systemui.statusbar.dpi", "100")); + mStatusBarDpi = mStatusBarPercent * mSystemUiDpi / 100; + return oldSystemUILayout; + } private int updateHybridLayout() { int oldSystemUiLayout = mSystemUiLayout == 0 ? @@ -1451,6 +1513,10 @@ public void updateSettings() { getDimensions(); + mHasNavigationBar = !mHasSystemNavBar; + + getDimensions(); + boolean keyRebindingEnabled = Settings.System.getInt(resolver, Settings.System.HARDWARE_KEY_REBINDING, 0) == 1; @@ -1608,6 +1674,84 @@ private void resetScreenHelper() { if(mDisplay != null) setInitialDisplaySize(mDisplay, mUnrestrictedScreenWidth, mUnrestrictedScreenHeight, density); } + + public void getDimensions(){ + float statusBarHeight = ((float)mContext.getResources().getDimensionPixelSize( + com.android.internal.R.dimen.status_bar_height) * + DisplayMetrics.DENSITY_DEVICE / mSystemDpi) / + DisplayMetrics.DENSITY_DEVICE * mStatusBarDpi; + + float navigationBarHeight = ((float)mContext.getResources().getDimensionPixelSize( + com.android.internal.R.dimen.navigation_bar_height) * + DisplayMetrics.DENSITY_DEVICE / mSystemDpi) / + DisplayMetrics.DENSITY_DEVICE * mNavBarDpi; + + float navigationBarWidth = ((float)mContext.getResources().getDimensionPixelSize( + com.android.internal.R.dimen.navigation_bar_width) * + DisplayMetrics.DENSITY_DEVICE / mSystemDpi) / + DisplayMetrics.DENSITY_DEVICE * mNavBarDpi; + + float navigationBarHeightLandscape = ((float)mContext.getResources().getDimensionPixelSize( + com.android.internal.R.dimen.navigation_bar_height_landscape) * + DisplayMetrics.DENSITY_DEVICE / mSystemDpi) / + DisplayMetrics.DENSITY_DEVICE * mNavBarDpi; + + mStatusBarHeight = Math.round(statusBarHeight); + + // Height of the navigation bar when presented horizontally at bottom + mNavigationBarHeightForRotation[mPortraitRotation] = + mNavigationBarHeightForRotation[mUpsideDownRotation] = Math.round(navigationBarHeight); + + mNavigationBarHeightForRotation[mLandscapeRotation] = + mNavigationBarHeightForRotation[mSeascapeRotation] = Math.round(navigationBarHeightLandscape); + + // Width of the navigation bar when presented vertically along one side + mNavigationBarWidthForRotation[mPortraitRotation] = mNavigationBarWidthForRotation[mUpsideDownRotation] = + mNavigationBarWidthForRotation[mLandscapeRotation] = mNavigationBarWidthForRotation[mSeascapeRotation] = + Math.round(navigationBarWidth); + +android.util.Log.d("*********************************************", "mSystemUiLayout=" + mSystemUiLayout); + if (mSystemUiLayout < 600) { + // 0-599dp: "phone" UI with a separate status & navigation bar + mHasSystemNavBar = false; + mNavigationBarCanMove = true; + } else if (mSystemUiLayout < 720) { + // 600+dp: "phone" UI with modifications for larger screens + mHasSystemNavBar = false; + mNavigationBarCanMove = false; + } else if (mSystemUiLayout == 1000) { + // 1000dp: "tablet" UI with a single combined status & navigation bar + mHasSystemNavBar = true; + mNavigationBarCanMove = false; + } + + mHasNavigationBar = !mHasSystemNavBar; + + if (mHasSystemNavBar) { + mCanHideNavigationBar = true; + } else if (mHasNavigationBar) { + // The navigation bar is at the right in landscape; it seems always + // useful to hide it for showing a video. + mCanHideNavigationBar = true; + } else { + mCanHideNavigationBar = false; + } + + // In case that we removed nav bar, set all sizes to 0 again + if(!mHasNavigationBar){ + if(!mHasSystemNavBar || Settings.System.getInt(mContext.getContentResolver(), + Settings.System.EXPANDED_DESKTOP_STATE, 0) == 1){ + mNavigationBarWidthForRotation[mPortraitRotation] + = mNavigationBarWidthForRotation[mUpsideDownRotation] + = mNavigationBarWidthForRotation[mLandscapeRotation] + = mNavigationBarWidthForRotation[mSeascapeRotation] + = mNavigationBarHeightForRotation[mPortraitRotation] + = mNavigationBarHeightForRotation[mUpsideDownRotation] + = mNavigationBarHeightForRotation[mLandscapeRotation] + = mNavigationBarHeightForRotation[mSeascapeRotation] = 0; + } + } + } public void getDimensions(){ float statusBarHeight = ((float)mContext.getResources().getDimensionPixelSize( @@ -4532,8 +4676,11 @@ public void onReceive(Context context, Intent intent) { // observing the relevant settings for the newly-active user, // and then updates our own bookkeeping based on the now- // current user. +<<<<<<< HEAD +======= mSettingsObserver.onChange(false); mUserInterfaceObserver.onChange(false); +>>>>>>> upstream/jb-mr1 // force a re-application of focused window sysui visibility. // the window may never have been shown for this user diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java index d6c5d25aa3a..11ee8de028e 100644 --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -938,11 +938,19 @@ public final Bitmap screenshotActivities(ActivityRecord who) { if (w < 0) { int mAndroidDpi = ExtendedPropertiesUtils.getActualProperty("android.dpi"); mThumbnailWidth = w = +<<<<<<< HEAD + Math.round((float)res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_width) * + DisplayMetrics.DENSITY_DEVICE / mAndroidDpi); + mThumbnailHeight = h = + Math.round((float)res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_height) * + DisplayMetrics.DENSITY_DEVICE / mAndroidDpi); +======= Math.round((float)res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_width) * DisplayMetrics.DENSITY_DEVICE / mAndroidDpi); mThumbnailHeight = h = Math.round((float)res.getDimensionPixelSize(com.android.internal.R.dimen.thumbnail_height) * DisplayMetrics.DENSITY_DEVICE / mAndroidDpi); +>>>>>>> upstream/jb-mr1 } if (w > 0) {