Merge "Revert "Temporary workaround for issue 3187563""
diff --git a/Android.mk b/Android.mk
index 7a24663..4c135da 100644
--- a/Android.mk
+++ b/Android.mk
@@ -391,6 +391,8 @@
# (see development/build/sdk.atree)
web_docs_sample_code_flags := \
-hdf android.hasSamples 1 \
+ -samplecode $(sample_dir)/AccessibilityService \
+ resources/samples/AccessibilityService "Accessibility Service" \
-samplecode $(sample_dir)/ApiDemos \
resources/samples/ApiDemos "API Demos" \
-samplecode $(sample_dir)/BackupRestore \
diff --git a/api/current.xml b/api/current.xml
index 7624086..b62c689 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -221434,17 +221434,6 @@
visibility="public"
>
</method>
-<method name="showInputMethodSubtypePicker"
- return="void"
- abstract="false"
- native="false"
- synchronized="false"
- static="false"
- final="false"
- deprecated="not deprecated"
- visibility="public"
->
-</method>
<method name="showSoftInput"
return="boolean"
abstract="false"
@@ -249212,7 +249201,7 @@
deprecated="not deprecated"
visibility="public"
>
-<parameter name="arg0" type="T">
+<parameter name="t" type="T">
</parameter>
</method>
</interface>
diff --git a/core/java/android/bluetooth/BluetoothDeviceProfileState.java b/core/java/android/bluetooth/BluetoothDeviceProfileState.java
index d1a6ed5..3eadff9 100644
--- a/core/java/android/bluetooth/BluetoothDeviceProfileState.java
+++ b/core/java/android/bluetooth/BluetoothDeviceProfileState.java
@@ -302,7 +302,7 @@
// Don't auto connect to docks.
break;
} else {
- if (mHeadsetService != null &&
+ if (mHeadsetService != null &&
mHeadsetService.getPriority(mDevice) ==
BluetoothHeadset.PRIORITY_AUTO_CONNECT &&
mHeadsetService.getDevicesMatchingConnectionStates(
@@ -1026,7 +1026,7 @@
// This is again against spec. HFP incoming connections should be made
// before A2DP, so we should not hit this case. But many devices
// don't follow this.
- if (mHeadsetService != null &&
+ if (mHeadsetService != null &&
mHeadsetService.getPriority(mDevice) == BluetoothProfile.PRIORITY_ON) {
Message msg = new Message();
msg.what = CONNECT_OTHER_PROFILES;
diff --git a/core/java/android/net/MobileDataStateTracker.java b/core/java/android/net/MobileDataStateTracker.java
index 40f72b2..de7abd7 100644
--- a/core/java/android/net/MobileDataStateTracker.java
+++ b/core/java/android/net/MobileDataStateTracker.java
@@ -46,6 +46,7 @@
private static final String TAG = "MobileDataStateTracker";
private static final boolean DBG = true;
+ private static final boolean VDBG = false;
private Phone.DataState mMobileDataState;
private ITelephony mPhoneService;
@@ -156,10 +157,15 @@
private class MobileDataStateReceiver extends BroadcastReceiver {
IConnectivityManager mConnectivityManager;
+ @Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(TelephonyIntents.
ACTION_ANY_DATA_CONNECTION_STATE_CHANGED)) {
String apnType = intent.getStringExtra(Phone.DATA_APN_TYPE_KEY);
+ if (VDBG) Log.d(TAG,
+ String.format("Broadcast received: ACTION_ANY_DATA_CONNECTION_STATE_CHANGED"
+ + "mApnType=%s %s received apnType=%s",
+ mApnType, TextUtils.equals(apnType, mApnType) ? "==" : "!=", apnType));
if (!TextUtils.equals(apnType, mApnType)) {
return;
}
@@ -171,8 +177,8 @@
mNetworkInfo.setIsAvailable(!intent.getBooleanExtra(Phone.NETWORK_UNAVAILABLE_KEY,
false));
- if (DBG) Log.d(TAG, mApnType + " Received state= " + state + ", old= " +
- mMobileDataState + ", reason= " +
+ if (DBG) Log.d(TAG, mApnType + " Received state=" + state + ", old=" +
+ mMobileDataState + ", reason=" +
(reason == null ? "(unspecified)" : reason));
if (mMobileDataState != state) {
@@ -249,6 +255,8 @@
equals(TelephonyIntents.ACTION_DATA_CONNECTION_FAILED)) {
String apnType = intent.getStringExtra(Phone.DATA_APN_TYPE_KEY);
if (!TextUtils.equals(apnType, mApnType)) {
+ if (DBG) Log.d(TAG, String.format("Broadcast received: ACTION_ANY_DATA_CONNECTION_FAILED ignore, mApnType=%s != received apnType=%s",
+ mApnType, apnType));
return;
}
String reason = intent.getStringExtra(Phone.FAILURE_REASON_KEY);
@@ -256,6 +264,8 @@
if (DBG) Log.d(TAG, mApnType + "Received " + intent.getAction() +
" broadcast" + reason == null ? "" : "(" + reason + ")");
setDetailedState(DetailedState.FAILED, reason, apnName);
+ } else {
+ if (DBG) Log.d(TAG, "Broadcast received: ignore " + intent.getAction());
}
}
}
diff --git a/core/java/android/os/StrictMode.java b/core/java/android/os/StrictMode.java
index 854428f..754d073 100644
--- a/core/java/android/os/StrictMode.java
+++ b/core/java/android/os/StrictMode.java
@@ -113,6 +113,13 @@
private static final boolean IS_USER_BUILD = "user".equals(Build.TYPE);
private static final boolean IS_ENG_BUILD = "eng".equals(Build.TYPE);
+ /**
+ * The boolean system property to control screen flashes on violations.
+ *
+ * @hide
+ */
+ public static final String VISUAL_PROPERTY = "persist.sys.strictmode.visual";
+
// Only log a duplicate stack trace to the logs every second.
private static final long MIN_LOG_INTERVAL_MS = 1000;
@@ -712,29 +719,66 @@
return new ThreadPolicy(oldPolicyMask);
}
+ // We don't want to flash the screen red in the system server
+ // process, nor do we want to modify all the call sites of
+ // conditionallyEnableDebugLogging() in the system server,
+ // so instead we use this to determine if we are the system server.
+ private static boolean amTheSystemServerProcess() {
+ // Fast path. Most apps don't have the system server's UID.
+ if (Process.myUid() != Process.SYSTEM_UID) {
+ return false;
+ }
+
+ // The settings app, though, has the system server's UID so
+ // look up our stack to see if we came from the system server.
+ Throwable stack = new Throwable();
+ stack.fillInStackTrace();
+ for (StackTraceElement ste : stack.getStackTrace()) {
+ String clsName = ste.getClassName();
+ if (clsName != null && clsName.startsWith("com.android.server.")) {
+ return true;
+ }
+ }
+ return false;
+ }
+
/**
* Enable DropBox logging for debug phone builds.
*
* @hide
*/
public static boolean conditionallyEnableDebugLogging() {
+ boolean doFlashes = !amTheSystemServerProcess() &&
+ SystemProperties.getBoolean(VISUAL_PROPERTY, IS_ENG_BUILD);
+
// For debug builds, log event loop stalls to dropbox for analysis.
// Similar logic also appears in ActivityThread.java for system apps.
- if (IS_USER_BUILD) {
+ if (IS_USER_BUILD && !doFlashes) {
setCloseGuardEnabled(false);
return false;
}
- StrictMode.setThreadPolicyMask(
- StrictMode.DETECT_DISK_WRITE |
- StrictMode.DETECT_DISK_READ |
- StrictMode.DETECT_NETWORK |
- StrictMode.PENALTY_DROPBOX |
- (IS_ENG_BUILD ? StrictMode.PENALTY_FLASH : 0)
- );
- sVmPolicyMask = StrictMode.DETECT_VM_CURSOR_LEAKS |
- StrictMode.DETECT_VM_CLOSABLE_LEAKS |
- StrictMode.PENALTY_DROPBOX;
- setCloseGuardEnabled(vmClosableObjectLeaksEnabled());
+
+ int threadPolicyMask = StrictMode.DETECT_DISK_WRITE |
+ StrictMode.DETECT_DISK_READ |
+ StrictMode.DETECT_NETWORK;
+
+ if (!IS_USER_BUILD) {
+ threadPolicyMask |= StrictMode.PENALTY_DROPBOX;
+ }
+ if (doFlashes) {
+ threadPolicyMask |= StrictMode.PENALTY_FLASH;
+ }
+
+ StrictMode.setThreadPolicyMask(threadPolicyMask);
+
+ if (IS_USER_BUILD) {
+ setCloseGuardEnabled(false);
+ } else {
+ sVmPolicyMask = StrictMode.DETECT_VM_CURSOR_LEAKS |
+ StrictMode.DETECT_VM_CLOSABLE_LEAKS |
+ StrictMode.PENALTY_DROPBOX;
+ setCloseGuardEnabled(vmClosableObjectLeaksEnabled());
+ }
return true;
}
diff --git a/core/java/android/os/SystemProperties.java b/core/java/android/os/SystemProperties.java
index 4a036ec..619bf8d 100644
--- a/core/java/android/os/SystemProperties.java
+++ b/core/java/android/os/SystemProperties.java
@@ -93,7 +93,7 @@
* Get the value for the given key, returned as a boolean.
* Values 'n', 'no', '0', 'false' or 'off' are considered false.
* Values 'y', 'yes', '1', 'true' or 'on' are considered true.
- * (case insensitive).
+ * (case sensitive).
* If the key does not exist, or has any other value, then the default
* result is returned.
* @param key the key to lookup
diff --git a/core/java/android/preference/PreferenceFrameLayout.java b/core/java/android/preference/PreferenceFrameLayout.java
index 426abf0..481859e17 100644
--- a/core/java/android/preference/PreferenceFrameLayout.java
+++ b/core/java/android/preference/PreferenceFrameLayout.java
@@ -45,12 +45,18 @@
TypedArray a = context.obtainStyledAttributes(attrs,
com.android.internal.R.styleable.PreferenceFrameLayout, defStyle, 0);
- mTopPadding = (int) a.getDimension(
+ float density = context.getResources().getDisplayMetrics().density;
+ int defaultTopPadding = (int) (density * DEFAULT_TOP_PADDING + 0.5f);
+ int defaultBottomPadding = (int) (density * DEFAULT_BOTTOM_PADDING + 0.5f);
+
+ mTopPadding = a.getDimensionPixelSize(
com.android.internal.R.styleable.PreferenceFrameLayout_topPadding,
- DEFAULT_TOP_PADDING);
- mBottomPadding = (int) a.getDimension(
+ defaultTopPadding);
+ mBottomPadding = a.getDimensionPixelSize(
com.android.internal.R.styleable.PreferenceFrameLayout_bottomPadding,
- DEFAULT_BOTTOM_PADDING);
+ defaultBottomPadding);
+
+
a.recycle();
}
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index d964e2f..beda099 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -140,6 +140,12 @@
// on screen)
void showStrictModeViolation(boolean on);
+ // Proxy to set the system property for whether the flashing
+ // should be enabled. The 'enabled' value is null or blank for
+ // the system default (differs per build variant) or any valid
+ // boolean string as parsed by SystemProperties.getBoolean().
+ void setStrictModeVisualIndicatorPreference(String enabled);
+
// These can only be called with the SET_ORIENTATION permission.
/**
* Change the current screen rotation, constants as per
diff --git a/core/java/android/view/animation/ScaleAnimation.java b/core/java/android/view/animation/ScaleAnimation.java
index 8537d42..1dd250f 100644
--- a/core/java/android/view/animation/ScaleAnimation.java
+++ b/core/java/android/view/animation/ScaleAnimation.java
@@ -17,8 +17,10 @@
package android.view.animation;
import android.content.Context;
+import android.content.res.Resources;
import android.content.res.TypedArray;
import android.util.AttributeSet;
+import android.util.TypedValue;
/**
* An animation that controls the scale of an object. You can specify the point
@@ -26,11 +28,23 @@
*
*/
public class ScaleAnimation extends Animation {
+ private final Resources mResources;
+
private float mFromX;
private float mToX;
private float mFromY;
private float mToY;
+ private int mFromXType = TypedValue.TYPE_NULL;
+ private int mToXType = TypedValue.TYPE_NULL;
+ private int mFromYType = TypedValue.TYPE_NULL;
+ private int mToYType = TypedValue.TYPE_NULL;
+
+ private int mFromXData = 0;
+ private int mToXData = 0;
+ private int mFromYData = 0;
+ private int mToYData = 0;
+
private int mPivotXType = ABSOLUTE;
private int mPivotYType = ABSOLUTE;
private float mPivotXValue = 0.0f;
@@ -48,14 +62,60 @@
public ScaleAnimation(Context context, AttributeSet attrs) {
super(context, attrs);
+ mResources = context.getResources();
+
TypedArray a = context.obtainStyledAttributes(attrs,
com.android.internal.R.styleable.ScaleAnimation);
- mFromX = a.getFloat(com.android.internal.R.styleable.ScaleAnimation_fromXScale, 0.0f);
- mToX = a.getFloat(com.android.internal.R.styleable.ScaleAnimation_toXScale, 0.0f);
+ TypedValue tv = a.peekValue(
+ com.android.internal.R.styleable.ScaleAnimation_fromXScale);
+ mFromX = 0.0f;
+ if (tv != null) {
+ if (tv.type == TypedValue.TYPE_FLOAT) {
+ // This is a scaling factor.
+ mFromX = tv.getFloat();
+ } else {
+ mFromXType = tv.type;
+ mFromXData = tv.data;
+ }
+ }
+ tv = a.peekValue(
+ com.android.internal.R.styleable.ScaleAnimation_toXScale);
+ mToX = 0.0f;
+ if (tv != null) {
+ if (tv.type == TypedValue.TYPE_FLOAT) {
+ // This is a scaling factor.
+ mToX = tv.getFloat();
+ } else {
+ mToXType = tv.type;
+ mToXData = tv.data;
+ }
+ }
- mFromY = a.getFloat(com.android.internal.R.styleable.ScaleAnimation_fromYScale, 0.0f);
- mToY = a.getFloat(com.android.internal.R.styleable.ScaleAnimation_toYScale, 0.0f);
+ tv = a.peekValue(
+ com.android.internal.R.styleable.ScaleAnimation_fromYScale);
+ mFromY = 0.0f;
+ if (tv != null) {
+ if (tv.type == TypedValue.TYPE_FLOAT) {
+ // This is a scaling factor.
+ mFromY = tv.getFloat();
+ } else {
+ mFromYType = tv.type;
+ mFromYData = tv.data;
+ }
+ }
+ tv = a.peekValue(
+ com.android.internal.R.styleable.ScaleAnimation_toYScale);
+ mToY = 0.0f;
+ if (tv != null) {
+ if (tv.type == TypedValue.TYPE_FLOAT) {
+ // This is a scaling factor.
+ mToY = tv.getFloat();
+ } else {
+ mToYType = tv.type;
+ mToYData = tv.data;
+ }
+ }
Description d = Description.parseValue(a.peekValue(
com.android.internal.R.styleable.ScaleAnimation_pivotX));
@@ -81,6 +141,7 @@
* @param toY Vertical scaling factor to apply at the end of the animation
*/
public ScaleAnimation(float fromX, float toX, float fromY, float toY) {
+ mResources = null;
mFromX = fromX;
mToX = toX;
mFromY = fromY;
@@ -107,6 +168,7 @@
*/
public ScaleAnimation(float fromX, float toX, float fromY, float toY,
float pivotX, float pivotY) {
+ mResources = null;
mFromX = fromX;
mToX = toX;
mFromY = fromY;
@@ -146,6 +208,7 @@
*/
public ScaleAnimation(float fromX, float toX, float fromY, float toY,
int pivotXType, float pivotXValue, int pivotYType, float pivotYValue) {
+ mResources = null;
mFromX = fromX;
mToX = toX;
mFromY = fromY;
@@ -177,10 +240,32 @@
}
}
+ float resolveScale(float scale, int type, int data, int size, int psize) {
+ float targetSize;
+ if (type == TypedValue.TYPE_FRACTION) {
+ targetSize = TypedValue.complexToFraction(data, size, psize);
+ } else if (type == TypedValue.TYPE_DIMENSION) {
+ targetSize = TypedValue.complexToDimension(data, mResources.getDisplayMetrics());
+ } else {
+ return scale;
+ }
+
+ if (size == 0) {
+ return 1;
+ }
+
+ return targetSize/(float)size;
+ }
+
@Override
public void initialize(int width, int height, int parentWidth, int parentHeight) {
super.initialize(width, height, parentWidth, parentHeight);
+ mFromX = resolveScale(mFromX, mFromXType, mFromXData, width, parentWidth);
+ mToX = resolveScale(mToX, mToXType, mToXData, width, parentWidth);
+ mFromY = resolveScale(mFromY, mFromYType, mFromYData, height, parentHeight);
+ mToY = resolveScale(mToY, mToYType, mToYData, height, parentHeight);
+
mPivotX = resolveSize(mPivotXType, mPivotXValue, width, parentWidth);
mPivotY = resolveSize(mPivotYType, mPivotYValue, height, parentHeight);
}
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 9bc1c22..867bb83 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -1430,16 +1430,6 @@
}
}
- public void showInputMethodSubtypePicker() {
- synchronized (mH) {
- try {
- mService.showInputMethodSubtypePickerFromClient(mClient);
- } catch (RemoteException e) {
- Log.w(TAG, "IME died: " + mCurId, e);
- }
- }
- }
-
public void showInputMethodAndSubtypeEnabler(String topId) {
synchronized (mH) {
try {
diff --git a/core/java/android/webkit/OverScrollGlow.java b/core/java/android/webkit/OverScrollGlow.java
index 53600f6..af56a2f 100644
--- a/core/java/android/webkit/OverScrollGlow.java
+++ b/core/java/android/webkit/OverScrollGlow.java
@@ -17,6 +17,7 @@
import com.android.internal.R;
+import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
@@ -40,13 +41,14 @@
public OverScrollGlow(WebView host) {
mHostView = host;
- final Resources res = host.getContext().getResources();
+ Context context = host.getContext();
+ final Resources res = context.getResources();
final Drawable edge = res.getDrawable(R.drawable.overscroll_edge);
final Drawable glow = res.getDrawable(R.drawable.overscroll_glow);
- mEdgeGlowTop = new EdgeGlow(edge, glow);
- mEdgeGlowBottom = new EdgeGlow(edge, glow);
- mEdgeGlowLeft = new EdgeGlow(edge, glow);
- mEdgeGlowRight = new EdgeGlow(edge, glow);
+ mEdgeGlowTop = new EdgeGlow(context, edge, glow);
+ mEdgeGlowBottom = new EdgeGlow(context, edge, glow);
+ mEdgeGlowLeft = new EdgeGlow(context, edge, glow);
+ mEdgeGlowRight = new EdgeGlow(context, edge, glow);
}
/**
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 56325f6..33015ad 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -588,9 +588,11 @@
private static final int DRAG_HELD_MOTIONLESS = 8;
private static final int AWAKEN_SCROLL_BARS = 9;
private static final int PREVENT_DEFAULT_TIMEOUT = 10;
+ private static final int SCROLL_SELECT_TEXT = 11;
+
private static final int FIRST_PRIVATE_MSG_ID = REMEMBER_PASSWORD;
- private static final int LAST_PRIVATE_MSG_ID = PREVENT_DEFAULT_TIMEOUT;
+ private static final int LAST_PRIVATE_MSG_ID = SCROLL_SELECT_TEXT;
/*
* Package message ids
@@ -647,7 +649,8 @@
"RESUME_WEBCORE_PRIORITY", // = 7;
"DRAG_HELD_MOTIONLESS", // = 8;
"AWAKEN_SCROLL_BARS", // = 9;
- "PREVENT_DEFAULT_TIMEOUT" // = 10;
+ "PREVENT_DEFAULT_TIMEOUT", // = 10;
+ "SCROLL_SELECT_TEXT" // = 11;
};
static final String[] HandlerPackageDebugString = {
@@ -787,6 +790,11 @@
private int mBackgroundColor = Color.WHITE;
+ private static final long SELECT_SCROLL_INTERVAL = 1000 / 60; // 60 / second
+ private int mAutoScrollX = 0;
+ private int mAutoScrollY = 0;
+ private boolean mSentAutoScrollMessage = false;
+
// Used to notify listeners of a new picture.
private PictureListener mPictureListener;
/**
@@ -1923,25 +1931,15 @@
* browsing session and clears any internal state associated with that
* session. The consequences of calling this method while a private
* browsing session is active are unspecified.
- * @param context The same context which was used to create the private
- * browsing WebView.
* @return True if the private browsing files were successfully deleted,
* false otherwise.
* @hide pending API council approval.
*/
- public static boolean cleanupPrivateBrowsingFiles(Context context) {
- // It seems wrong that we have to pass the storage locations here, given
- // that the storage files are created native-side in WebRequestContext
- // (albeit using a dumb getter on BrowserFrame to get the paths from
- // Java). It looks like this is required because we may need to call
- // this method before the BrowserFrame has been set up.
- // TODO: Investigate whether this can be avoided.
- return nativeCleanupPrivateBrowsingFiles(context.getDatabasePath("dummy").getParent(),
- context.getCacheDir().getAbsolutePath());
+ public static boolean cleanupPrivateBrowsingFiles() {
+ return nativeCleanupPrivateBrowsingFiles();
}
- private static native boolean nativeCleanupPrivateBrowsingFiles(String databaseDirectory,
- String cacheDirectory);
+ private static native boolean nativeCleanupPrivateBrowsingFiles();
private boolean extendScroll(int y) {
int finalY = mScroller.getFinalY();
@@ -3883,13 +3881,6 @@
// decide which adornments to draw
int extras = DRAW_EXTRAS_NONE;
- if (DebugFlags.WEB_VIEW) {
- Log.v(LOGTAG, "mFindIsUp=" + mFindIsUp
- + " mSelectingText=" + mSelectingText
- + " nativePageShouldHandleShiftAndArrows()="
- + nativePageShouldHandleShiftAndArrows()
- + " animateZoom=" + animateZoom);
- }
if (mFindIsUp) {
extras = DRAW_EXTRAS_FIND;
} else if (mSelectingText) {
@@ -3900,6 +3891,14 @@
} else if (drawCursorRing) {
extras = DRAW_EXTRAS_CURSOR_RING;
}
+ if (DebugFlags.WEB_VIEW) {
+ Log.v(LOGTAG, "mFindIsUp=" + mFindIsUp
+ + " mSelectingText=" + mSelectingText
+ + " nativePageShouldHandleShiftAndArrows()="
+ + nativePageShouldHandleShiftAndArrows()
+ + " animateZoom=" + animateZoom
+ + " extras=" + extras);
+ }
if (canvas.isHardwareAccelerated()) {
try {
@@ -4654,6 +4653,9 @@
WebViewCore.resumePriority();
WebViewCore.resumeUpdatePicture(mWebViewCore);
invalidate(); // redraw without selection
+ mAutoScrollX = 0;
+ mAutoScrollY = 0;
+ mSentAutoScrollMessage = false;
}
}
@@ -5299,6 +5301,22 @@
if (parent != null) {
parent.requestDisallowInterceptTouchEvent(true);
}
+ int layer = nativeScrollableLayer(contentX, contentY);
+ if (layer == 0) {
+ mAutoScrollX = x <= SELECT_SCROLL ? -SELECT_SCROLL
+ : x >= getViewWidth() - SELECT_SCROLL
+ ? SELECT_SCROLL : 0;
+ mAutoScrollY = y <= SELECT_SCROLL ? -SELECT_SCROLL
+ : y >= getViewHeightWithTitle() - SELECT_SCROLL
+ ? SELECT_SCROLL : 0;
+ if (!mSentAutoScrollMessage) {
+ mSentAutoScrollMessage = true;
+ mPrivateHandler.sendEmptyMessageDelayed(
+ SCROLL_SELECT_TEXT, SELECT_SCROLL_INTERVAL);
+ }
+ } else {
+ // TODO: allow scrollable overflow div to autoscroll
+ }
nativeExtendSelection(contentX, contentY);
invalidate();
break;
@@ -5723,6 +5741,7 @@
private static final int TRACKBALL_MOVE_COUNT = 10;
private static final int TRACKBALL_MULTIPLIER = 3;
private static final int SELECT_CURSOR_OFFSET = 16;
+ private static final int SELECT_SCROLL = 5;
private int mSelectX = 0;
private int mSelectY = 0;
private boolean mFocusSizeChanged = false;
@@ -6627,6 +6646,16 @@
}
break;
}
+ case SCROLL_SELECT_TEXT: {
+ if (mAutoScrollX == 0 && mAutoScrollY == 0) {
+ mSentAutoScrollMessage = false;
+ break;
+ }
+ scrollBy(mAutoScrollX, mAutoScrollY);
+ sendEmptyMessageDelayed(
+ SCROLL_SELECT_TEXT, SELECT_SCROLL_INTERVAL);
+ break;
+ }
case SWITCH_TO_SHORTPRESS: {
if (mTouchMode == TOUCH_INIT_MODE) {
if (!getSettings().supportTouchOnly()
@@ -7739,6 +7768,7 @@
private native boolean nativeHitSelection(int x, int y);
private native String nativeImageURI(int x, int y);
private native void nativeInstrumentReport();
+ private native Rect nativeLayerBounds(int layer);
/* package */ native boolean nativeMoveCursorToNextTextInput();
// return true if the page has been scrolled
private native boolean nativeMotionUp(int x, int y, int slop);
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index 423a788..4ff7ee8 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -132,7 +132,7 @@
* Indicates the touch gesture is a scroll
*/
static final int TOUCH_MODE_SCROLL = 3;
-
+
/**
* Indicates the view is in the process of being flung
*/
@@ -385,7 +385,7 @@
* Handles one frame of a fling
*/
private FlingRunnable mFlingRunnable;
-
+
/**
* Handles scrolling between positions within the list.
*/
@@ -456,7 +456,7 @@
int mResurrectToPosition = INVALID_POSITION;
private ContextMenuInfo mContextMenuInfo = null;
-
+
/**
* Maximum distance to record overscroll
*/
@@ -550,19 +550,19 @@
private int mMinimumVelocity;
private int mMaximumVelocity;
private float mVelocityScale = 1.0f;
-
+
final boolean[] mIsScrap = new boolean[1];
-
+
// True when the popup should be hidden because of a call to
// dispatchDisplayHint()
private boolean mPopupHidden;
-
+
/**
* ID of the active pointer. This is used to retain consistency during
* drags/flings if multiple pointers are used.
*/
private int mActivePointerId = INVALID_POINTER;
-
+
/**
* Sentinel value for no current active pointer.
* Used by {@link #mActivePointerId}.
@@ -726,7 +726,7 @@
boolean smoothScrollbar = a.getBoolean(R.styleable.AbsListView_smoothScrollbar, true);
setSmoothScrollbarEnabled(smoothScrollbar);
-
+
final int adapterId = a.getResourceId(R.styleable.AbsListView_adapter, 0);
if (adapterId != 0) {
final Context c = context;
@@ -764,11 +764,12 @@
public void setOverScrollMode(int mode) {
if (mode != OVER_SCROLL_NEVER) {
if (mEdgeGlowTop == null) {
- final Resources res = getContext().getResources();
+ Context context = getContext();
+ final Resources res = context.getResources();
final Drawable edge = res.getDrawable(R.drawable.overscroll_edge);
final Drawable glow = res.getDrawable(R.drawable.overscroll_glow);
- mEdgeGlowTop = new EdgeGlow(edge, glow);
- mEdgeGlowBottom = new EdgeGlow(edge, glow);
+ mEdgeGlowTop = new EdgeGlow(context, edge, glow);
+ mEdgeGlowBottom = new EdgeGlow(context, edge, glow);
}
} else {
mEdgeGlowTop = null;
@@ -1843,7 +1844,7 @@
* @param position The position to display
* @param isScrap Array of at least 1 boolean, the first entry will become true if
* the returned view was taken from the scrap heap, false if otherwise.
- *
+ *
* @return A view displaying the data associated with the specified position
*/
View obtainView(int position, boolean[] isScrap) {
@@ -2166,7 +2167,7 @@
treeObserver.addOnGlobalLayoutListener(this);
}
}
-
+
if (mAdapter != null && mDataSetObserver == null) {
mDataSetObserver = new AdapterDataSetObserver();
mAdapter.registerDataSetObserver(mDataSetObserver);
@@ -2962,7 +2963,7 @@
mFlingRunnable = new FlingRunnable();
}
reportScrollStateChange(OnScrollListener.SCROLL_STATE_FLING);
-
+
mFlingRunnable.start(-initialVelocity);
} else {
mTouchMode = TOUCH_MODE_REST;
@@ -3015,7 +3016,7 @@
mVelocityTracker.recycle();
mVelocityTracker = null;
}
-
+
mActivePointerId = INVALID_POINTER;
if (PROFILE_SCROLLING) {
@@ -3064,7 +3065,7 @@
mVelocityTracker = null;
}
}
-
+
if (mEdgeGlowTop != null) {
mEdgeGlowTop.onRelease();
mEdgeGlowBottom.onRelease();
@@ -3072,7 +3073,7 @@
mActivePointerId = INVALID_POINTER;
break;
}
-
+
case MotionEvent.ACTION_POINTER_UP: {
onSecondaryPointerUp(ev);
final int x = mMotionX;
@@ -3170,11 +3171,11 @@
mMotionCorrection = 0;
return true;
}
-
+
final int x = (int) ev.getX();
final int y = (int) ev.getY();
mActivePointerId = ev.getPointerId(0);
-
+
int motionPosition = findMotionRow(y);
if (touchMode != TOUCH_MODE_FLING && motionPosition >= 0) {
// User clicked on an actual view (and was not stopping a fling).
@@ -3213,7 +3214,7 @@
reportScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
break;
}
-
+
case MotionEvent.ACTION_POINTER_UP: {
onSecondaryPointerUp(ev);
break;
@@ -3222,7 +3223,7 @@
return false;
}
-
+
private void onSecondaryPointerUp(MotionEvent ev) {
final int pointerIndex = (ev.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK) >>
MotionEvent.ACTION_POINTER_INDEX_SHIFT;
@@ -3418,7 +3419,7 @@
default:
endFling();
return;
-
+
case TOUCH_MODE_SCROLL:
if (mScroller.isFinished()) {
return;
@@ -3521,17 +3522,17 @@
}
}
}
-
-
+
+
class PositionScroller implements Runnable {
private static final int SCROLL_DURATION = 400;
-
+
private static final int MOVE_DOWN_POS = 1;
private static final int MOVE_UP_POS = 2;
private static final int MOVE_DOWN_BOUND = 3;
private static final int MOVE_UP_BOUND = 4;
private static final int MOVE_OFFSET = 5;
-
+
private int mMode;
private int mTargetPos;
private int mBoundPos;
@@ -3540,17 +3541,17 @@
private final int mExtraScroll;
private int mOffsetFromTop;
-
+
PositionScroller() {
mExtraScroll = ViewConfiguration.get(mContext).getScaledFadingEdgeLength();
}
-
+
void start(int position) {
final int firstPos = mFirstPosition;
final int lastPos = firstPos + getChildCount() - 1;
-
+
int viewTravelCount;
- if (position <= firstPos) {
+ if (position <= firstPos) {
viewTravelCount = firstPos - position + 1;
mMode = MOVE_UP_POS;
} else if (position >= lastPos) {
@@ -3560,7 +3561,7 @@
// Already on screen, nothing to do
return;
}
-
+
if (viewTravelCount > 0) {
mScrollDuration = SCROLL_DURATION / viewTravelCount;
} else {
@@ -3569,19 +3570,19 @@
mTargetPos = position;
mBoundPos = INVALID_POSITION;
mLastSeenPos = INVALID_POSITION;
-
+
post(this);
}
-
+
void start(int position, int boundPosition) {
if (boundPosition == INVALID_POSITION) {
start(position);
return;
}
-
+
final int firstPos = mFirstPosition;
final int lastPos = firstPos + getChildCount() - 1;
-
+
int viewTravelCount;
if (position <= firstPos) {
final int boundPosFromLast = lastPos - boundPosition;
@@ -3589,7 +3590,7 @@
// Moving would shift our bound position off the screen. Abort.
return;
}
-
+
final int posTravel = firstPos - position + 1;
final int boundTravel = boundPosFromLast - 1;
if (boundTravel < posTravel) {
@@ -3619,7 +3620,7 @@
// Already on screen, nothing to do
return;
}
-
+
if (viewTravelCount > 0) {
mScrollDuration = SCROLL_DURATION / viewTravelCount;
} else {
@@ -3628,7 +3629,7 @@
mTargetPos = position;
mBoundPos = boundPosition;
mLastSeenPos = INVALID_POSITION;
-
+
post(this);
}
@@ -3679,12 +3680,12 @@
final int listHeight = getHeight();
final int firstPos = mFirstPosition;
-
+
switch (mMode) {
case MOVE_DOWN_POS: {
final int lastViewIndex = getChildCount() - 1;
final int lastPos = firstPos + lastViewIndex;
-
+
if (lastViewIndex < 0) {
return;
}
@@ -3710,11 +3711,11 @@
}
break;
}
-
+
case MOVE_DOWN_BOUND: {
final int nextViewIndex = 1;
final int childCount = getChildCount();
-
+
if (firstPos == mBoundPos || childCount <= nextViewIndex
|| firstPos + childCount >= mItemCount) {
return;
@@ -3739,13 +3740,13 @@
post(this);
} else {
- if (nextViewTop > extraScroll) {
+ if (nextViewTop > extraScroll) {
smoothScrollBy(nextViewTop - extraScroll, mScrollDuration);
}
}
break;
}
-
+
case MOVE_UP_POS: {
if (firstPos == mLastSeenPos) {
// No new views, let things keep going.
@@ -3769,7 +3770,7 @@
}
break;
}
-
+
case MOVE_UP_BOUND: {
final int lastViewIndex = getChildCount() - 2;
if (lastViewIndex < 0) {
@@ -3835,11 +3836,11 @@
}
}
}
-
+
/**
* The amount of friction applied to flings. The default value
* is {@link ViewConfiguration#getScrollFriction}.
- *
+ *
* @return A scalar dimensionless value representing the coefficient of
* friction.
*/
@@ -3847,19 +3848,19 @@
if (mFlingRunnable == null) {
mFlingRunnable = new FlingRunnable();
}
- mFlingRunnable.mScroller.setFriction(friction);
+ mFlingRunnable.mScroller.setFriction(friction);
}
/**
* Sets a scale factor for the fling velocity. The initial scale
* factor is 1.0.
- *
+ *
* @param scale The scale factor to multiply the velocity by.
*/
public void setVelocityScale(float scale) {
mVelocityScale = scale;
}
-
+
/**
* Smoothly scroll to the specified adapter position. The view will
* scroll such that the indicated position is displayed.
@@ -3913,7 +3914,7 @@
* Smoothly scroll to the specified adapter position. The view will
* scroll such that the indicated position is displayed, but it will
* stop early if scrolling further would scroll boundPosition out of
- * view.
+ * view.
* @param position Scroll to this adapter position.
* @param boundPosition Do not scroll if it would move this adapter
* position out of view.
@@ -3924,7 +3925,7 @@
}
mPositionScroller.start(position, boundPosition);
}
-
+
/**
* Smoothly scroll by distance pixels over duration milliseconds.
* @param distance Distance to scroll in pixels.
@@ -4145,7 +4146,7 @@
if (down) {
mFirstPosition += count;
}
-
+
invalidate();
final int absIncrementalDeltaY = Math.abs(incrementalDeltaY);
@@ -4171,7 +4172,7 @@
invokeOnItemScrollListener();
awakenScrollBars();
-
+
return false;
}
@@ -5289,7 +5290,7 @@
mCurrentScrap = scrapViews[0];
mScrapViews = scrapViews;
}
-
+
public void markChildrenDirty() {
if (mViewTypeCount == 1) {
final ArrayList<View> scrap = mCurrentScrap;
diff --git a/core/java/android/widget/EdgeGlow.java b/core/java/android/widget/EdgeGlow.java
index 9b3a6e6..2a0e849 100644
--- a/core/java/android/widget/EdgeGlow.java
+++ b/core/java/android/widget/EdgeGlow.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.view.animation.AnimationUtils;
@@ -44,7 +45,7 @@
private static final float HELD_GLOW_ALPHA = 0.5f;
private static final float HELD_GLOW_SCALE_Y = 0.5f;
- private static final float MAX_GLOW_HEIGHT = 3.f;
+ private static final float MAX_GLOW_HEIGHT = 4.f;
private static final float PULL_GLOW_BEGIN = 1.f;
private static final float PULL_EDGE_BEGIN = 0.6f;
@@ -58,6 +59,8 @@
private final Drawable mGlow;
private int mWidth;
private int mHeight;
+ private final int MIN_WIDTH = 300;
+ private final int mMinWidth;
private float mEdgeAlpha;
private float mEdgeScaleY;
@@ -86,12 +89,12 @@
// How much dragging should effect the height of the edge image.
// Number determined by user testing.
- private static final int PULL_DISTANCE_EDGE_FACTOR = 5;
+ private static final int PULL_DISTANCE_EDGE_FACTOR = 7;
// How much dragging should effect the height of the glow image.
// Number determined by user testing.
- private static final int PULL_DISTANCE_GLOW_FACTOR = 5;
- private static final float PULL_DISTANCE_ALPHA_GLOW_FACTOR = 0.8f;
+ private static final int PULL_DISTANCE_GLOW_FACTOR = 7;
+ private static final float PULL_DISTANCE_ALPHA_GLOW_FACTOR = 1.1f;
private static final int VELOCITY_EDGE_FACTOR = 8;
private static final int VELOCITY_GLOW_FACTOR = 16;
@@ -100,10 +103,11 @@
private float mPullDistance;
- public EdgeGlow(Drawable edge, Drawable glow) {
+ public EdgeGlow(Context context, Drawable edge, Drawable glow) {
mEdge = edge;
mGlow = glow;
+ mMinWidth = (int) (context.getResources().getDisplayMetrics().density * MIN_WIDTH + 0.5f);
mInterpolator = new DecelerateInterpolator();
}
@@ -251,17 +255,31 @@
mGlow.setAlpha((int) (Math.max(0, Math.min(mGlowAlpha, 1)) * 255));
- // Center the glow inside the width of the container.
- int glowLeft = (mWidth - glowWidth)/2;
- mGlow.setBounds(glowLeft, 0, mWidth - glowLeft, (int) Math.min(
+ int glowBottom = (int) Math.min(
glowHeight * mGlowScaleY * glowHeight/ glowWidth * 0.6f,
- glowHeight * MAX_GLOW_HEIGHT));
+ glowHeight * MAX_GLOW_HEIGHT);
+ if (mWidth < mMinWidth) {
+ // Center the glow and clip it.
+ int glowLeft = (mWidth - glowWidth)/2;
+ mGlow.setBounds(glowLeft, 0, mWidth - glowLeft, glowBottom);
+ } else {
+ // Stretch the glow to fit.
+ mGlow.setBounds(0, 0, mWidth, glowBottom);
+ }
+
mGlow.draw(canvas);
mEdge.setAlpha((int) (Math.max(0, Math.min(mEdgeAlpha, 1)) * 255));
- int edgeLeft = (mWidth - edgeWidth)/2;
- mEdge.setBounds(edgeLeft, 0, mWidth - edgeLeft, (int) (edgeHeight * mEdgeScaleY));
+ int edgeBottom = (int) (edgeHeight * mEdgeScaleY);
+ if (mWidth < mMinWidth) {
+ // Center the edge and clip it.
+ int edgeLeft = (mWidth - edgeWidth)/2;
+ mEdge.setBounds(edgeLeft, 0, mWidth - edgeLeft, edgeBottom);
+ } else {
+ // Stretch the edge to fit.
+ mEdge.setBounds(0, 0, mWidth, edgeBottom);
+ }
mEdge.draw(canvas);
return mState != STATE_IDLE;
diff --git a/core/java/android/widget/HorizontalScrollView.java b/core/java/android/widget/HorizontalScrollView.java
index 9fc91da..c05e3ad 100644
--- a/core/java/android/widget/HorizontalScrollView.java
+++ b/core/java/android/widget/HorizontalScrollView.java
@@ -58,8 +58,8 @@
* within a larger container.
*
* <p>HorizontalScrollView only supports horizontal scrolling.
- *
- * @attr ref android.R.styleable#HorizontalScrollView_fillViewport
+ *
+ * @attr ref android.R.styleable#HorizontalScrollView_fillViewport
*/
public class HorizontalScrollView extends FrameLayout {
private static final int ANIMATED_SCROLL_GAP = ScrollView.ANIMATED_SCROLL_GAP;
@@ -125,7 +125,7 @@
private int mTouchSlop;
private int mMinimumVelocity;
private int mMaximumVelocity;
-
+
private int mOverscrollDistance;
private int mOverflingDistance;
@@ -134,13 +134,13 @@
* drags/flings if multiple pointers are used.
*/
private int mActivePointerId = INVALID_POINTER;
-
+
/**
* Sentinel value for no current active pointer.
* Used by {@link #mActivePointerId}.
*/
private static final int INVALID_POINTER = -1;
-
+
public HorizontalScrollView(Context context) {
this(context, null);
}
@@ -279,7 +279,7 @@
*
* @param fillViewport True to stretch the content's width to the viewport's
* boundaries, false otherwise.
- *
+ *
* @attr ref android.R.styleable#HorizontalScrollView_fillViewport
*/
public void setFillViewport(boolean fillViewport) {
@@ -322,13 +322,13 @@
int width = getMeasuredWidth();
if (child.getMeasuredWidth() < width) {
final FrameLayout.LayoutParams lp = (LayoutParams) child.getLayoutParams();
-
+
int childHeightMeasureSpec = getChildMeasureSpec(heightMeasureSpec, mPaddingTop
+ mPaddingBottom, lp.height);
width -= mPaddingLeft;
width -= mPaddingRight;
int childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY);
-
+
child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
}
}
@@ -400,7 +400,7 @@
}
return false;
}
-
+
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
/*
@@ -453,7 +453,7 @@
mIsBeingDragged = false;
break;
}
-
+
/*
* Remember location of down touch.
* ACTION_DOWN always refers to pointer index 0.
@@ -581,7 +581,7 @@
}
}
}
-
+
mActivePointerId = INVALID_POINTER;
mIsBeingDragged = false;
@@ -618,7 +618,7 @@
}
return true;
}
-
+
private void onSecondaryPointerUp(MotionEvent ev) {
final int pointerIndex = (ev.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK) >>
MotionEvent.ACTION_POINTER_INDEX_SHIFT;
@@ -635,7 +635,7 @@
}
}
}
-
+
@Override
protected void onOverScrolled(int scrollX, int scrollY,
boolean clampedX, boolean clampedY) {
@@ -917,7 +917,7 @@
if (direction == View.FOCUS_LEFT && getScrollX() < scrollDelta) {
scrollDelta = getScrollX();
} else if (direction == View.FOCUS_RIGHT && getChildCount() > 0) {
-
+
int daRight = getChildAt(0).getRight();
int screenRight = getScrollX() + getWidth();
@@ -1033,7 +1033,7 @@
if (count == 0) {
return contentWidth;
}
-
+
int scrollRange = getChildAt(0).getRight();
final int scrollX = mScrollX;
final int overscrollRight = Math.max(0, scrollRange - contentWidth);
@@ -1045,7 +1045,7 @@
return scrollRange;
}
-
+
@Override
protected int computeHorizontalScrollOffset() {
return Math.max(0, super.computeHorizontalScrollOffset());
@@ -1352,25 +1352,25 @@
if (getChildCount() > 0) {
int width = getWidth() - mPaddingRight - mPaddingLeft;
int right = getChildAt(0).getWidth();
-
- mScroller.fling(mScrollX, mScrollY, velocityX, 0, 0,
+
+ mScroller.fling(mScrollX, mScrollY, velocityX, 0, 0,
Math.max(0, right - width), 0, 0, width/2, 0);
-
+
final boolean movingRight = velocityX > 0;
-
+
View newFocused = findFocusableViewInMyBounds(movingRight,
mScroller.getFinalX(), findFocus());
-
+
if (newFocused == null) {
newFocused = this;
}
-
+
if (newFocused != findFocus()
&& newFocused.requestFocus(movingRight ? View.FOCUS_RIGHT : View.FOCUS_LEFT)) {
mScrollViewMovedFocus = true;
mScrollViewMovedFocus = false;
}
-
+
invalidate();
}
}
@@ -1396,11 +1396,12 @@
public void setOverScrollMode(int mode) {
if (mode != OVER_SCROLL_NEVER) {
if (mEdgeGlowLeft == null) {
- final Resources res = getContext().getResources();
+ Context context = getContext();
+ final Resources res = context.getResources();
final Drawable edge = res.getDrawable(R.drawable.overscroll_edge);
final Drawable glow = res.getDrawable(R.drawable.overscroll_glow);
- mEdgeGlowLeft = new EdgeGlow(edge, glow);
- mEdgeGlowRight = new EdgeGlow(edge, glow);
+ mEdgeGlowLeft = new EdgeGlow(context, edge, glow);
+ mEdgeGlowRight = new EdgeGlow(context, edge, glow);
}
} else {
mEdgeGlowLeft = null;
diff --git a/core/java/android/widget/ScrollView.java b/core/java/android/widget/ScrollView.java
index 900c9ec..9fa90dc 100644
--- a/core/java/android/widget/ScrollView.java
+++ b/core/java/android/widget/ScrollView.java
@@ -51,7 +51,7 @@
* takes care of its own scrolling, so does not require a ScrollView, but
* using the two together is possible to achieve the effect of a text view
* within a larger container.
- *
+ *
* <p>ScrollView only supports vertical scrolling.
*
* @attr ref android.R.styleable#ScrollView_fillViewport
@@ -120,7 +120,7 @@
private int mTouchSlop;
private int mMinimumVelocity;
private int mMaximumVelocity;
-
+
private int mOverscrollDistance;
private int mOverflingDistance;
@@ -269,7 +269,7 @@
* Indicates whether this ScrollView's content is stretched to fill the viewport.
*
* @return True if the content fills the viewport, false otherwise.
- *
+ *
* @attr ref android.R.styleable#ScrollView_fillViewport
*/
public boolean isFillViewport() {
@@ -282,7 +282,7 @@
*
* @param fillViewport True to stretch the content's height to the viewport's
* boundaries, false otherwise.
- *
+ *
* @attr ref android.R.styleable#ScrollView_fillViewport
*/
public void setFillViewport(boolean fillViewport) {
@@ -325,14 +325,14 @@
int height = getMeasuredHeight();
if (child.getMeasuredHeight() < height) {
final FrameLayout.LayoutParams lp = (LayoutParams) child.getLayoutParams();
-
+
int childWidthMeasureSpec = getChildMeasureSpec(widthMeasureSpec, mPaddingLeft
+ mPaddingRight, lp.width);
height -= mPaddingTop;
height -= mPaddingBottom;
int childHeightMeasureSpec =
MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY);
-
+
child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
}
}
@@ -521,7 +521,7 @@
case MotionEvent.ACTION_DOWN: {
final float y = ev.getY();
mIsBeingDragged = true;
-
+
/*
* If being flinged and user touches, stop the fling. isFinished
* will be false if being flinged.
@@ -579,7 +579,7 @@
}
}
break;
- case MotionEvent.ACTION_UP:
+ case MotionEvent.ACTION_UP:
if (mIsBeingDragged) {
final VelocityTracker velocityTracker = mVelocityTracker;
velocityTracker.computeCurrentVelocity(1000, mMaximumVelocity);
@@ -615,7 +615,7 @@
}
return true;
}
-
+
private void onSecondaryPointerUp(MotionEvent ev) {
final int pointerIndex = (ev.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK) >>
MotionEvent.ACTION_POINTER_INDEX_SHIFT;
@@ -632,7 +632,7 @@
}
}
}
-
+
@Override
protected void onOverScrolled(int scrollX, int scrollY,
boolean clampedX, boolean clampedY) {
@@ -919,9 +919,9 @@
} else if (direction == View.FOCUS_DOWN) {
if (getChildCount() > 0) {
int daBottom = getChildAt(0).getBottom();
-
+
int screenBottom = getScrollY() + getHeight();
-
+
if (daBottom - screenBottom < maxJump) {
scrollDelta = daBottom - screenBottom;
}
@@ -1038,7 +1038,7 @@
if (count == 0) {
return contentHeight;
}
-
+
int scrollRange = getChildAt(0).getBottom();
final int scrollY = mScrollY;
final int overscrollBottom = Math.max(0, scrollRange - contentHeight);
@@ -1289,7 +1289,7 @@
}
return nextFocus.requestFocus(direction, previouslyFocusedRect);
- }
+ }
@Override
public boolean requestChildRectangleOnScreen(View child, Rect rectangle,
@@ -1325,7 +1325,7 @@
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
mIsLayoutDirty = false;
- // Give a child focus if it needs it
+ // Give a child focus if it needs it
if (mChildToScrollTo != null && isViewDescendantOf(mChildToScrollTo, this)) {
scrollToChild(mChildToScrollTo);
}
@@ -1352,7 +1352,7 @@
int scrollDelta = computeScrollDeltaToGetChildRectOnScreen(mTempRect);
doScrollY(scrollDelta);
}
- }
+ }
/**
* Return true if child is an descendant of parent, (or equal to the parent).
@@ -1364,7 +1364,7 @@
final ViewParent theParent = child.getParent();
return (theParent instanceof ViewGroup) && isViewDescendantOf((View) theParent, parent);
- }
+ }
/**
* Fling the scroll view
@@ -1377,18 +1377,18 @@
if (getChildCount() > 0) {
int height = getHeight() - mPaddingBottom - mPaddingTop;
int bottom = getChildAt(0).getHeight();
-
- mScroller.fling(mScrollX, mScrollY, 0, velocityY, 0, 0, 0,
+
+ mScroller.fling(mScrollX, mScrollY, 0, velocityY, 0, 0, 0,
Math.max(0, bottom - height), 0, height/2);
-
+
final boolean movingDown = velocityY > 0;
-
+
View newFocused =
findFocusableViewInMyBounds(movingDown, mScroller.getFinalY(), findFocus());
if (newFocused == null) {
newFocused = this;
}
-
+
if (newFocused != findFocus()
&& newFocused.requestFocus(movingDown ? View.FOCUS_DOWN : View.FOCUS_UP)) {
mScrollViewMovedFocus = true;
@@ -1444,11 +1444,12 @@
public void setOverScrollMode(int mode) {
if (mode != OVER_SCROLL_NEVER) {
if (mEdgeGlowTop == null) {
- final Resources res = getContext().getResources();
+ Context context = getContext();
+ final Resources res = context.getResources();
final Drawable edge = res.getDrawable(R.drawable.overscroll_edge);
final Drawable glow = res.getDrawable(R.drawable.overscroll_glow);
- mEdgeGlowTop = new EdgeGlow(edge, glow);
- mEdgeGlowBottom = new EdgeGlow(edge, glow);
+ mEdgeGlowTop = new EdgeGlow(context, edge, glow);
+ mEdgeGlowBottom = new EdgeGlow(context, edge, glow);
}
} else {
mEdgeGlowTop = null;
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 9f9fb18..88d3f7a 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -313,6 +313,8 @@
Drawable mSelectHandleRight;
Drawable mSelectHandleCenter;
+ private int mLastDownPositionX, mLastDownPositionY;
+
/*
* Kick-start the font cache for the zygote process (to pay the cost of
* initializing freetype for our default font only once).
@@ -3839,20 +3841,15 @@
boolean changed = false;
- SelectionModifierCursorController selectionController = null;
- if (mSelectionModifierCursorController != null) {
- selectionController = (SelectionModifierCursorController)
- mSelectionModifierCursorController;
- }
-
-
if (mMovement != null) {
/* This code also provides auto-scrolling when a cursor is moved using a
* CursorController (insertion point or selection limits).
* For selection, ensure start or end is visible depending on controller's state.
*/
int curs = getSelectionEnd();
- if (selectionController != null && selectionController.isSelectionStartDragged()) {
+ // Do not create the controller if it is not already created.
+ if (mSelectionModifierCursorController != null &&
+ mSelectionModifierCursorController.isSelectionStartDragged()) {
curs = getSelectionStart();
}
@@ -3879,7 +3876,7 @@
// - ExtractEditText does not call onFocus when it is displayed. Fixing this issue would
// allow to test for hasSelection in onFocusChanged, which would trigger a
// startTextSelectionMode here. TODO
- if (this instanceof ExtractEditText && selectionController != null && hasSelection()) {
+ if (this instanceof ExtractEditText && hasSelection() && hasSelectionController()) {
startSelectionActionMode();
}
@@ -3900,6 +3897,8 @@
final ViewTreeObserver observer = getViewTreeObserver();
if (observer != null) {
+ // No need to create the controller.
+ // The get method will add the listener on controller creation.
if (mInsertionPointCursorController != null) {
observer.addOnTouchModeChangeListener(mInsertionPointCursorController);
}
@@ -3919,6 +3918,7 @@
observer.removeOnPreDrawListener(this);
mPreDrawState = PREDRAW_NOT_REGISTERED;
}
+ // No need to create the controller, as getXXController would.
if (mInsertionPointCursorController != null) {
observer.removeOnTouchModeChangeListener(mInsertionPointCursorController);
}
@@ -4396,6 +4396,7 @@
* @hide
*/
protected void updateCursorControllerPositions() {
+ // No need to create the controllers if they were not already
if (mInsertionPointCursorController != null &&
mInsertionPointCursorController.isShowing()) {
mInsertionPointCursorController.updatePosition();
@@ -6906,8 +6907,9 @@
terminateSelectionActionMode();
}
+ // No need to create the controller
if (mSelectionModifierCursorController != null) {
- ((SelectionModifierCursorController) mSelectionModifierCursorController).resetTouchOffsets();
+ mSelectionModifierCursorController.resetTouchOffsets();
}
}
@@ -6921,9 +6923,9 @@
}
private int getLastTapPosition() {
+ // No need to create the controller at that point, no last tap position saved
if (mSelectionModifierCursorController != null) {
- int lastTapPosition = ((SelectionModifierCursorController)
- mSelectionModifierCursorController).getMinTouchOffset();
+ int lastTapPosition = mSelectionModifierCursorController.getMinTouchOffset();
if (lastTapPosition >= 0) {
// Safety check, should not be possible.
if (lastTapPosition > mText.length()) {
@@ -7009,8 +7011,8 @@
// Restore previous selection
Selection.setSelection((Spannable)mText, prevStart, prevEnd);
- if (hasSelectionController() && !getSelectionController().isShowing()) {
- // If the anchors aren't showing, revive them.
+ if (hasSelectionController()) {
+ // Revive the anchors.
getSelectionController().show();
}
return;
@@ -7065,6 +7067,9 @@
}
if (action == MotionEvent.ACTION_DOWN) {
+ mLastDownPositionX = (int) event.getX();
+ mLastDownPositionY = (int) event.getY();
+
// Reset this state; it will be re-set if super.onTouchEvent
// causes focus to move to the view.
mTouchFocusSelected = false;
@@ -7102,6 +7107,7 @@
if (mScrollX != oldScrollX || mScrollY != oldScrollY) {
// Hide insertion anchor while scrolling. Leave selection.
hideInsertionPointCursorController();
+ // No need to create the controller, since there is nothing to update.
if (mSelectionModifierCursorController != null &&
mSelectionModifierCursorController.isShowing()) {
mSelectionModifierCursorController.updatePosition();
@@ -7146,7 +7152,6 @@
|| windowParams.type > WindowManager.LayoutParams.LAST_SUB_WINDOW;
}
- // TODO Add an extra android:cursorController flag to disable the controller?
mInsertionControllerEnabled = windowSupportsHandles && isTextEditable() && mCursorVisible &&
mLayout != null && !mTextIsSelectable;
mSelectionControllerEnabled = windowSupportsHandles && textCanBeSelected() &&
@@ -7157,10 +7162,7 @@
}
if (!mSelectionControllerEnabled) {
- // Stop selection mode if the controller becomes unavailable.
- if (mSelectionModifierCursorController != null) {
- stopSelectionActionMode();
- }
+ stopSelectionActionMode();
mSelectionModifierCursorController = null;
}
}
@@ -7580,11 +7582,10 @@
minOffset = getSelectionStart();
maxOffset = getSelectionEnd();
} else {
- // selectionModifierCursorController is not null at that point
- SelectionModifierCursorController selectionModifierCursorController =
- ((SelectionModifierCursorController) mSelectionModifierCursorController);
- minOffset = selectionModifierCursorController.getMinTouchOffset();
- maxOffset = selectionModifierCursorController.getMaxTouchOffset();
+ // selectionModifierCursorController is guaranteed to exist at that point
+ SelectionModifierCursorController selectionController = getSelectionController();
+ minOffset = selectionController.getMinTouchOffset();
+ maxOffset = selectionController.getMaxTouchOffset();
}
int selectionStart, selectionEnd;
@@ -7771,7 +7772,7 @@
// Two spaces at beginning of paste: remove one
final int originalLength = mText.length();
((Editable) mText).replace(min - 1, min, "");
- // Due to filters, there is no garantee that exactly one character was
+ // Due to filters, there is no guarantee that exactly one character was
// removed. Count instead.
final int delta = mText.length() - originalLength;
min += delta;
@@ -7838,19 +7839,26 @@
return true;
}
- if (mSelectionActionMode != null) {
- if (touchPositionIsInSelection()) {
- // Start a drag
- final int start = getSelectionStart();
- final int end = getSelectionEnd();
- CharSequence selectedText = mTransformed.subSequence(start, end);
- ClipData data = ClipData.newPlainText(null, null, selectedText);
- startDrag(data, getTextThumbnailBuilder(selectedText), false);
- stopSelectionActionMode();
+ if (!isPositionOnText(mLastDownPositionX, mLastDownPositionY) && mInsertionControllerEnabled) {
+ final int offset = getOffset(mLastDownPositionX, mLastDownPositionY);
+ Selection.setSelection((Spannable)mText, offset);
+ if (canPaste()) {
+ getInsertionController().showWithPaste();
+ performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
} else {
- selectCurrentWord();
- getSelectionController().show();
+ getInsertionController().show();
}
+ mEatTouchRelease = true;
+ return true;
+ }
+
+ if (mSelectionActionMode != null && touchPositionIsInSelection()) {
+ final int start = getSelectionStart();
+ final int end = getSelectionEnd();
+ CharSequence selectedText = mTransformed.subSequence(start, end);
+ ClipData data = ClipData.newPlainText(null, null, selectedText);
+ startDrag(data, getTextThumbnailBuilder(selectedText), false);
+ stopSelectionActionMode();
performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
mEatTouchRelease = true;
return true;
@@ -7880,10 +7888,9 @@
Selection.setSelection((Spannable) mText, selectionStart, selectionEnd);
}
- SelectionModifierCursorController selectionModifierCursorController =
- ((SelectionModifierCursorController) mSelectionModifierCursorController);
- int minOffset = selectionModifierCursorController.getMinTouchOffset();
- int maxOffset = selectionModifierCursorController.getMaxTouchOffset();
+ SelectionModifierCursorController selectionController = getSelectionController();
+ int minOffset = selectionController.getMinTouchOffset();
+ int maxOffset = selectionController.getMaxTouchOffset();
return ((minOffset >= selectionStart) && (maxOffset < selectionEnd));
}
@@ -7928,10 +7935,10 @@
*/
private void terminateSelectionActionMode() {
stopSelectionActionMode();
+
+ // No need to create the controller, nothing to cancel in that case.
if (mSelectionModifierCursorController != null) {
- SelectionModifierCursorController selectionModifierCursorController =
- (SelectionModifierCursorController) mSelectionModifierCursorController;
- selectionModifierCursorController.cancelFadeOutAnimation();
+ mSelectionModifierCursorController.cancelFadeOutAnimation();
}
}
@@ -7973,7 +7980,7 @@
@Override
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
- if (mSelectionModifierCursorController == null) {
+ if (!hasSelectionController()) {
Log.w(LOG_TAG, "TextView has no selection controller. Action mode cancelled.");
return false;
}
@@ -8029,7 +8036,7 @@
styledAttributes.recycle();
if (atLeastOne) {
- mSelectionModifierCursorController.show();
+ getSelectionController().show();
return true;
} else {
return false;
@@ -8048,8 +8055,8 @@
if (itemId == ID_SELECT_ALL) {
Selection.setSelection((Spannable) mText, 0, mText.length());
// Update controller positions after selection change.
- if (mSelectionModifierCursorController != null) {
- mSelectionModifierCursorController.show();
+ if (hasSelectionController()) {
+ getSelectionController().show();
}
return true;
}
@@ -8093,9 +8100,7 @@
@Override
public void onDestroyActionMode(ActionMode mode) {
Selection.setSelection((Spannable) mText, getSelectionStart());
- if (mSelectionModifierCursorController != null) {
- mSelectionModifierCursorController.hide();
- }
+ hideSelectionModifierCursorController();
mSelectionActionMode = null;
}
}
@@ -8253,6 +8258,7 @@
private int mLastParentY;
private int mContainerPositionX, mContainerPositionY;
private long mTouchTimer;
+ private boolean mHasPastePopupWindow = false;
private PastePopupMenu mPastePopupWindow;
public static final int LEFT = 0;
@@ -8305,7 +8311,7 @@
mDrawable = mSelectHandleCenter;
handleWidth = mDrawable.getIntrinsicWidth();
mHotspotX = handleWidth / 2;
- mPastePopupWindow = new PastePopupMenu();
+ mHasPastePopupWindow = true;
break;
}
}
@@ -8473,9 +8479,9 @@
mLastParentX = coords[0];
mLastParentY = coords[1];
mIsDragging = true;
- if (mPastePopupWindow != null) {
+ if (mHasPastePopupWindow) {
mTouchTimer = SystemClock.uptimeMillis();
- if (mPastePopupWindow.isShowing()) {
+ if (mPastePopupWindow != null && mPastePopupWindow.isShowing()) {
// Tapping on the handle again dismisses the displayed paste view,
mPastePopupWindow.hide();
// and makes sure the action up does not display the paste view.
@@ -8507,7 +8513,7 @@
final int doubleTapSlop = viewConfiguration.getScaledDoubleTapSlop();
final int slopSquared = doubleTapSlop * doubleTapSlop;
if (distanceSquared < slopSquared) {
- mPastePopupWindow.show();
+ showPastePopupWindow();
}
}
}
@@ -8541,13 +8547,23 @@
convertFromViewportToContentCoordinates(bounds);
moveTo(bounds.left, bounds.top);
}
+
+ void showPastePopupWindow() {
+ if (mHasPastePopupWindow) {
+ if (mPastePopupWindow == null) {
+ // Lazy initialisation: create when actually shown only.
+ mPastePopupWindow = new PastePopupMenu();
+ }
+ mPastePopupWindow.show();
+ }
+ }
}
private class InsertionPointCursorController implements CursorController {
private static final int DELAY_BEFORE_FADE_OUT = 4100;
- // The cursor controller image
- private final HandleView mHandle;
+ // The cursor controller image. Lazily created.
+ private HandleView mHandle;
private final Runnable mHider = new Runnable() {
public void run() {
@@ -8555,28 +8571,30 @@
}
};
- InsertionPointCursorController() {
- mHandle = new HandleView(this, HandleView.CENTER);
- }
-
public void show() {
updatePosition();
- mHandle.show();
- hideDelayed(DELAY_BEFORE_FADE_OUT);
+ getHandle().show();
+ }
+
+ void showWithPaste() {
+ show();
+ getHandle().showPastePopupWindow();
}
public void hide() {
- mHandle.hide();
- TextView.this.removeCallbacks(mHider);
+ if (mHandle != null) {
+ mHandle.hide();
+ }
+ removeCallbacks(mHider);
}
- private void hideDelayed(int msec) {
- TextView.this.removeCallbacks(mHider);
- TextView.this.postDelayed(mHider, msec);
+ private void hideDelayed() {
+ removeCallbacks(mHider);
+ postDelayed(mHider, DELAY_BEFORE_FADE_OUT);
}
public boolean isShowing() {
- return mHandle.isShowing();
+ return mHandle != null && mHandle.isShowing();
}
public void updatePosition(HandleView handle, int x, int y) {
@@ -8587,7 +8605,7 @@
Selection.setSelection((Spannable) mText, offset);
updatePosition();
}
- hideDelayed(DELAY_BEFORE_FADE_OUT);
+ hideDelayed();
}
public void updatePosition() {
@@ -8600,7 +8618,8 @@
return;
}
- mHandle.positionAtCursor(offset, true);
+ // updatePosition is called only when isShowing. Handle has been created at this point.
+ getHandle().positionAtCursor(offset, true);
}
public boolean onTouchEvent(MotionEvent ev) {
@@ -8612,10 +8631,17 @@
hide();
}
}
+
+ private HandleView getHandle() {
+ if (mHandle == null) {
+ mHandle = new HandleView(this, HandleView.CENTER);
+ }
+ return mHandle;
+ }
}
private class SelectionModifierCursorController implements CursorController {
- // The cursor controller images
+ // The cursor controller images, lazily created when shown.
private HandleView mStartHandle, mEndHandle;
// The offsets of that last touch down event. Remembered to start selection there.
private int mMinTouchOffset, mMaxTouchOffset;
@@ -8636,8 +8662,6 @@
};
SelectionModifierCursorController() {
- mStartHandle = new HandleView(this, HandleView.LEFT);
- mEndHandle = new HandleView(this, HandleView.RIGHT);
resetTouchOffsets();
}
@@ -8646,24 +8670,29 @@
return;
}
+ // Lazy object creation has to be done before updatePosition() is called.
+ if (mStartHandle == null) mStartHandle = new HandleView(this, HandleView.LEFT);
+ if (mEndHandle == null) mEndHandle = new HandleView(this, HandleView.RIGHT);
+
mIsShowing = true;
updatePosition();
+
mStartHandle.show();
mEndHandle.show();
+
hideInsertionPointCursorController();
- hideDelayed(DELAY_BEFORE_FADE_OUT);
}
public void hide() {
- mStartHandle.hide();
- mEndHandle.hide();
+ if (mStartHandle != null) mStartHandle.hide();
+ if (mEndHandle != null) mEndHandle.hide();
mIsShowing = false;
removeCallbacks(mHider);
}
- private void hideDelayed(int delay) {
+ private void hideDelayed() {
removeCallbacks(mHider);
- postDelayed(mHider, delay);
+ postDelayed(mHider, DELAY_BEFORE_FADE_OUT);
}
public boolean isShowing() {
@@ -8723,9 +8752,10 @@
return;
}
+ // The handles have been created since the controller isShowing().
mStartHandle.positionAtCursor(selectionStart, true);
mEndHandle.positionAtCursor(selectionEnd, true);
- hideDelayed(DELAY_BEFORE_FADE_OUT);
+ hideDelayed();
}
public boolean onTouchEvent(MotionEvent event) {
@@ -8810,7 +8840,7 @@
* @return true iff this controller is currently used to move the selection start.
*/
public boolean isSelectionStartDragged() {
- return mStartHandle.isDragging();
+ return mStartHandle != null && mStartHandle.isDragging();
}
public void onTouchModeChanged(boolean isInTouchMode) {
@@ -8821,12 +8851,14 @@
}
private void hideInsertionPointCursorController() {
+ // No need to create the controller to hide it.
if (mInsertionPointCursorController != null) {
mInsertionPointCursorController.hide();
}
}
private void hideSelectionModifierCursorController() {
+ // No need to create the controller to hide it.
if (mSelectionModifierCursorController != null) {
mSelectionModifierCursorController.hide();
}
@@ -8837,15 +8869,6 @@
hideSelectionModifierCursorController();
}
- private int getOffsetForHorizontal(int line, int x) {
- x -= getTotalPaddingLeft();
- // Clamp the position to inside of the view.
- x = Math.max(0, x);
- x = Math.min(getWidth() - getTotalPaddingRight() - 1, x);
- x += getScrollX();
- return getLayout().getOffsetForHorizontal(line, x);
- }
-
/**
* Get the offset character closest to the specified absolute position.
*
@@ -8858,15 +8881,8 @@
*/
public int getOffset(int x, int y) {
if (getLayout() == null) return -1;
-
- y -= getTotalPaddingTop();
- // Clamp the position to inside of the view.
- y = Math.max(0, y);
- y = Math.min(getHeight() - getTotalPaddingBottom() - 1, y);
- y += getScrollY();
-
- final int line = getLayout().getLineForVertical(y);
- final int offset = getOffsetForHorizontal(line, x);
+ final int line = getLineAtCoordinate(y);
+ final int offset = getOffsetAtCoordinate(line, x);
return offset;
}
@@ -8874,14 +8890,7 @@
final Layout layout = getLayout();
if (layout == null) return -1;
- y -= getTotalPaddingTop();
- // Clamp the position to inside of the view.
- y = Math.max(0, y);
- y = Math.min(getHeight() - getTotalPaddingBottom() - 1, y);
- y += getScrollY();
-
- int line = getLayout().getLineForVertical(y);
-
+ int line = getLineAtCoordinate(y);
final int previousLine = layout.getLineForOffset(previousOffset);
final int previousLineTop = layout.getLineTop(previousLine);
final int previousLineBottom = layout.getLineBottom(previousLine);
@@ -8894,21 +8903,58 @@
line = previousLine;
}
- return getOffsetForHorizontal(line, x);
+ return getOffsetAtCoordinate(line, x);
+ }
+
+ private int convertToLocalHorizontalCoordinate(int x) {
+ x -= getTotalPaddingLeft();
+ // Clamp the position to inside of the view.
+ x = Math.max(0, x);
+ x = Math.min(getWidth() - getTotalPaddingRight() - 1, x);
+ x += getScrollX();
+ return x;
+ }
+
+ private int getLineAtCoordinate(int y) {
+ y -= getTotalPaddingTop();
+ // Clamp the position to inside of the view.
+ y = Math.max(0, y);
+ y = Math.min(getHeight() - getTotalPaddingBottom() - 1, y);
+ y += getScrollY();
+ return getLayout().getLineForVertical(y);
+ }
+
+ private int getOffsetAtCoordinate(int line, int x) {
+ x = convertToLocalHorizontalCoordinate(x);
+ return getLayout().getOffsetForHorizontal(line, x);
+ }
+
+ /** Returns true if the screen coordinates position (x,y) corresponds to a character displayed
+ * in the view. Returns false when the position is in the empty space of left/right of text.
+ */
+ private boolean isPositionOnText(int x, int y) {
+ if (getLayout() == null) return false;
+
+ final int line = getLineAtCoordinate(y);
+ x = convertToLocalHorizontalCoordinate(x);
+
+ if (x < getLayout().getLineLeft(line)) return false;
+ if (x > getLayout().getLineRight(line)) return false;
+ return true;
}
@Override
public boolean onDragEvent(DragEvent event) {
switch (event.getAction()) {
case DragEvent.ACTION_DRAG_STARTED:
- return mInsertionPointCursorController != null;
+ return hasInsertionController();
case DragEvent.ACTION_DRAG_ENTERED:
TextView.this.requestFocus();
return true;
case DragEvent.ACTION_DRAG_LOCATION: {
- final int offset = getOffset((int)event.getX(), (int)event.getY());
+ final int offset = getOffset((int) event.getX(), (int) event.getY());
Selection.setSelection((Spannable)mText, offset);
return true;
}
@@ -8951,7 +8997,7 @@
return mSelectionControllerEnabled;
}
- CursorController getInsertionController() {
+ InsertionPointCursorController getInsertionController() {
if (!mInsertionControllerEnabled) {
return null;
}
@@ -8968,7 +9014,7 @@
return mInsertionPointCursorController;
}
- CursorController getSelectionController() {
+ SelectionModifierCursorController getSelectionController() {
if (!mSelectionControllerEnabled) {
return null;
}
@@ -9027,8 +9073,8 @@
private boolean mCursorVisible = true;
// Cursor Controllers.
- private CursorController mInsertionPointCursorController;
- private CursorController mSelectionModifierCursorController;
+ private InsertionPointCursorController mInsertionPointCursorController;
+ private SelectionModifierCursorController mSelectionModifierCursorController;
private ActionMode mSelectionActionMode;
private boolean mInsertionControllerEnabled;
private boolean mSelectionControllerEnabled;
diff --git a/core/java/com/android/internal/statusbar/IStatusBar.aidl b/core/java/com/android/internal/statusbar/IStatusBar.aidl
index f87ca3e..1cc068f 100644
--- a/core/java/com/android/internal/statusbar/IStatusBar.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBar.aidl
@@ -32,6 +32,6 @@
void animateCollapse();
void setLightsOn(boolean on);
void setMenuKeyVisible(boolean visible);
- void setIMEButtonVisible(boolean visible);
+ void setIMEButtonVisible(in IBinder token, boolean visible);
}
diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
index 19666fd..f86b72d 100644
--- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
@@ -32,13 +32,13 @@
void removeIcon(String slot);
void setActiveWindowIsFullscreen(boolean fullscreen);
void setMenuKeyVisible(boolean visible);
- void setIMEButtonVisible(boolean visible);
+ void setIMEButtonVisible(in IBinder token, boolean visible);
// ---- Methods below are for use by the status bar policy services ----
// You need the STATUS_BAR_SERVICE permission
void registerStatusBar(IStatusBar callbacks, out StatusBarIconList iconList,
out List<IBinder> notificationKeys, out List<StatusBarNotification> notifications,
- out int[] switches);
+ out int[] switches, out List<IBinder> binders);
void onPanelRevealed();
void onNotificationClick(String pkg, String tag, int id);
void onNotificationError(String pkg, String tag, int id,
diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl
index a2e9486..215809f 100644
--- a/core/java/com/android/internal/view/IInputMethodManager.aidl
+++ b/core/java/com/android/internal/view/IInputMethodManager.aidl
@@ -52,7 +52,6 @@
int softInputMode, boolean first, int windowFlags);
void showInputMethodPickerFromClient(in IInputMethodClient client);
- void showInputMethodSubtypePickerFromClient(in IInputMethodClient client);
void showInputMethodAndSubtypeEnablerFromClient(in IInputMethodClient client, String topId);
void setInputMethod(in IBinder token, String id);
void setInputMethodAndSubtype(in IBinder token, String id, in InputMethodSubtype subtype);
diff --git a/core/res/res/anim/screen_rotate_0_enter.xml b/core/res/res/anim/screen_rotate_0_enter.xml
new file mode 100644
index 0000000..9e9a8ad
--- /dev/null
+++ b/core/res/res/anim/screen_rotate_0_enter.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shareInterpolator="false">
+ <alpha android:fromAlpha="1.0" android:toAlpha="1.0"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_shortAnimTime" />
+</set>
diff --git a/core/res/res/anim/screen_rotate_0_exit.xml b/core/res/res/anim/screen_rotate_0_exit.xml
new file mode 100644
index 0000000..09d0ac3
--- /dev/null
+++ b/core/res/res/anim/screen_rotate_0_exit.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shareInterpolator="false">
+ <alpha android:fromAlpha="1.0" android:toAlpha="0"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_shortAnimTime" />
+</set>
diff --git a/core/res/res/anim/screen_rotate_180_enter.xml b/core/res/res/anim/screen_rotate_180_enter.xml
new file mode 100644
index 0000000..bfc8c6d
--- /dev/null
+++ b/core/res/res/anim/screen_rotate_180_enter.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shareInterpolator="false">
+ <scale android:fromXScale="1.0" android:toXScale="1.0"
+ android:fromYScale=".9" android:toYScale="1.0"
+ android:pivotX="50%" android:pivotY="50%"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_mediumAnimTime" />
+</set>
diff --git a/core/res/res/anim/screen_rotate_180_exit.xml b/core/res/res/anim/screen_rotate_180_exit.xml
new file mode 100644
index 0000000..f1ce1cf
--- /dev/null
+++ b/core/res/res/anim/screen_rotate_180_exit.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shareInterpolator="false">
+ <scale android:fromXScale="1.0" android:toXScale="1.0"
+ android:fromYScale="1.0" android:toYScale=".9"
+ android:pivotX="50%" android:pivotY="50%"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_mediumAnimTime" />
+ <alpha android:fromAlpha="1.0" android:toAlpha="0"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_mediumAnimTime" />
+</set>
diff --git a/core/res/res/anim/screen_rotate_minus_90_enter.xml b/core/res/res/anim/screen_rotate_minus_90_enter.xml
new file mode 100644
index 0000000..92a7779
--- /dev/null
+++ b/core/res/res/anim/screen_rotate_minus_90_enter.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shareInterpolator="false">
+ <scale android:fromXScale="100%p" android:toXScale="100%"
+ android:fromYScale="100%p" android:toYScale="100%"
+ android:pivotX="50%" android:pivotY="50%"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_mediumAnimTime" />
+ <rotate android:fromDegrees="-90" android:toDegrees="0"
+ android:pivotX="50%" android:pivotY="50%"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_mediumAnimTime" />
+</set>
diff --git a/core/res/res/anim/screen_rotate_minus_90_exit.xml b/core/res/res/anim/screen_rotate_minus_90_exit.xml
new file mode 100644
index 0000000..c530759
--- /dev/null
+++ b/core/res/res/anim/screen_rotate_minus_90_exit.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shareInterpolator="false">
+ <scale android:fromXScale="100%" android:toXScale="100%p"
+ android:fromYScale="100%" android:toYScale="100%p"
+ android:pivotX="50%" android:pivotY="50%"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_mediumAnimTime" />
+ <rotate android:fromDegrees="0" android:toDegrees="90"
+ android:pivotX="50%" android:pivotY="50%"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_mediumAnimTime" />
+ <alpha android:fromAlpha="1.0" android:toAlpha="0"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_mediumAnimTime" />
+</set>
diff --git a/core/res/res/anim/screen_rotate_plus_90_enter.xml b/core/res/res/anim/screen_rotate_plus_90_enter.xml
new file mode 100644
index 0000000..f4ffaa8
--- /dev/null
+++ b/core/res/res/anim/screen_rotate_plus_90_enter.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shareInterpolator="false">
+ <scale android:fromXScale="100%p" android:toXScale="100%"
+ android:fromYScale="100%p" android:toYScale="100%"
+ android:pivotX="50%" android:pivotY="50%"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_mediumAnimTime" />
+ <rotate android:fromDegrees="90" android:toDegrees="0"
+ android:pivotX="50%" android:pivotY="50%"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_mediumAnimTime" />
+</set>
diff --git a/core/res/res/anim/screen_rotate_plus_90_exit.xml b/core/res/res/anim/screen_rotate_plus_90_exit.xml
new file mode 100644
index 0000000..0728bfb
--- /dev/null
+++ b/core/res/res/anim/screen_rotate_plus_90_exit.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2010, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shareInterpolator="false">
+ <scale android:fromXScale="100%" android:toXScale="100%p"
+ android:fromYScale="100%" android:toYScale="100%p"
+ android:pivotX="50%" android:pivotY="50%"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_mediumAnimTime" />
+ <rotate android:fromDegrees="0" android:toDegrees="-90"
+ android:pivotX="50%" android:pivotY="50%"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_mediumAnimTime" />
+ <alpha android:fromAlpha="1.0" android:toAlpha="0"
+ android:interpolator="@anim/decelerate_quint_interpolator"
+ android:duration="@android:integer/config_mediumAnimTime" />
+</set>
diff --git a/core/res/res/drawable-hdpi/ic_clear.png b/core/res/res/drawable-hdpi/ic_clear.png
new file mode 100644
index 0000000..33ad8d4
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_clear.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_clear_off.png b/core/res/res/drawable-hdpi/ic_clear_off.png
new file mode 100644
index 0000000..d97c342
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_clear_off.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_commit.png b/core/res/res/drawable-hdpi/ic_commit.png
new file mode 100644
index 0000000..404051c
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_commit.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_go.png b/core/res/res/drawable-hdpi/ic_go.png
new file mode 100644
index 0000000..97b825e
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_go.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_search.png b/core/res/res/drawable-hdpi/ic_search.png
new file mode 100644
index 0000000..bf8bd66
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_search.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/ic_voice_search.png b/core/res/res/drawable-hdpi/ic_voice_search.png
new file mode 100644
index 0000000..66d14ae
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_voice_search.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_activated_holo.9.png b/core/res/res/drawable-hdpi/list_activated_holo.9.png
index cd9a08e..12a379b 100644
--- a/core/res/res/drawable-hdpi/list_activated_holo.9.png
+++ b/core/res/res/drawable-hdpi/list_activated_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_divider_holo_dark.9.png b/core/res/res/drawable-hdpi/list_divider_holo_dark.9.png
index 7b18202..7264a7a 100644
--- a/core/res/res/drawable-hdpi/list_divider_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/list_divider_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_divider_holo_light.9.png b/core/res/res/drawable-hdpi/list_divider_holo_light.9.png
index 17bcbb4..74f48f5 100644
--- a/core/res/res/drawable-hdpi/list_divider_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/list_divider_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_focused_holo.9.png b/core/res/res/drawable-hdpi/list_focused_holo.9.png
index b91e9f2..e354629 100644
--- a/core/res/res/drawable-hdpi/list_focused_holo.9.png
+++ b/core/res/res/drawable-hdpi/list_focused_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_longpressed_holo.9.png b/core/res/res/drawable-hdpi/list_longpressed_holo.9.png
index db4831d..367c7d9 100644
--- a/core/res/res/drawable-hdpi/list_longpressed_holo.9.png
+++ b/core/res/res/drawable-hdpi/list_longpressed_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/list_pressed_holo_dark.9.png
index 1ce1601..9eae8f4 100644
--- a/core/res/res/drawable-hdpi/list_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/list_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/list_pressed_holo_light.9.png
index b36aa2c..a9131fc 100644
--- a/core/res/res/drawable-hdpi/list_pressed_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/list_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_section_divider_holo_light.9.png b/core/res/res/drawable-hdpi/list_section_divider_holo_light.9.png
index 763f4f6f..8069452a 100644
--- a/core/res/res/drawable-hdpi/list_section_divider_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/list_section_divider_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_selected_holo_dark.9.png b/core/res/res/drawable-hdpi/list_selected_holo_dark.9.png
index c054e14..780e86d 100644
--- a/core/res/res/drawable-hdpi/list_selected_holo_dark.9.png
+++ b/core/res/res/drawable-hdpi/list_selected_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/list_selected_holo_light.9.png b/core/res/res/drawable-hdpi/list_selected_holo_light.9.png
index 77c4032..999d05b 100644
--- a/core/res/res/drawable-hdpi/list_selected_holo_light.9.png
+++ b/core/res/res/drawable-hdpi/list_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_clear.png b/core/res/res/drawable-mdpi/ic_clear.png
new file mode 100644
index 0000000..86944a8
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_clear.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_clear_off.png b/core/res/res/drawable-mdpi/ic_clear_off.png
new file mode 100644
index 0000000..b9c3b44
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_clear_off.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_commit.png b/core/res/res/drawable-mdpi/ic_commit.png
new file mode 100644
index 0000000..49d7ec8
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_commit.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_go.png b/core/res/res/drawable-mdpi/ic_go.png
new file mode 100644
index 0000000..2340648
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_go.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_search.png b/core/res/res/drawable-mdpi/ic_search.png
new file mode 100644
index 0000000..d92071b
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_search.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_voice_search.png b/core/res/res/drawable-mdpi/ic_voice_search.png
new file mode 100644
index 0000000..a2fe874
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_voice_search.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_activated_holo.9.png b/core/res/res/drawable-mdpi/list_activated_holo.9.png
index 01ec674..f162c9a 100644
--- a/core/res/res/drawable-mdpi/list_activated_holo.9.png
+++ b/core/res/res/drawable-mdpi/list_activated_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_divider_holo_dark.9.png b/core/res/res/drawable-mdpi/list_divider_holo_dark.9.png
index 7b18202..aa8015d 100644
--- a/core/res/res/drawable-mdpi/list_divider_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/list_divider_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_divider_holo_light.9.png b/core/res/res/drawable-mdpi/list_divider_holo_light.9.png
index 17bcbb4..c25c256 100644
--- a/core/res/res/drawable-mdpi/list_divider_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/list_divider_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_focused_holo.9.png b/core/res/res/drawable-mdpi/list_focused_holo.9.png
index 23385df..e2449dd 100644
--- a/core/res/res/drawable-mdpi/list_focused_holo.9.png
+++ b/core/res/res/drawable-mdpi/list_focused_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_longpressed_holo.9.png b/core/res/res/drawable-mdpi/list_longpressed_holo.9.png
index 3312a51..3483891 100644
--- a/core/res/res/drawable-mdpi/list_longpressed_holo.9.png
+++ b/core/res/res/drawable-mdpi/list_longpressed_holo.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/list_pressed_holo_dark.9.png
index bbb14d8..e3344b6 100644
--- a/core/res/res/drawable-mdpi/list_pressed_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/list_pressed_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/list_pressed_holo_light.9.png
index 72380d4..2365978 100644
--- a/core/res/res/drawable-mdpi/list_pressed_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/list_pressed_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_section_divider_holo_dark.9.png b/core/res/res/drawable-mdpi/list_section_divider_holo_dark.9.png
index 953d7bf..f873edb 100644
--- a/core/res/res/drawable-mdpi/list_section_divider_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/list_section_divider_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_section_divider_holo_light.9.png b/core/res/res/drawable-mdpi/list_section_divider_holo_light.9.png
index e5fe664..ba11cfb 100644
--- a/core/res/res/drawable-mdpi/list_section_divider_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/list_section_divider_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_selected_holo_dark.9.png b/core/res/res/drawable-mdpi/list_selected_holo_dark.9.png
index c453506..a7f6277 100644
--- a/core/res/res/drawable-mdpi/list_selected_holo_dark.9.png
+++ b/core/res/res/drawable-mdpi/list_selected_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/list_selected_holo_light.9.png b/core/res/res/drawable-mdpi/list_selected_holo_light.9.png
index 58b6b3c..b6029ec 100644
--- a/core/res/res/drawable-mdpi/list_selected_holo_light.9.png
+++ b/core/res/res/drawable-mdpi/list_selected_holo_light.9.png
Binary files differ
diff --git a/core/res/res/layout-xlarge/status_bar_latest_event_content.xml b/core/res/res/layout-xlarge/status_bar_latest_event_content.xml
index e4aa270..dca2c57 100644
--- a/core/res/res/layout-xlarge/status_bar_latest_event_content.xml
+++ b/core/res/res/layout-xlarge/status_bar_latest_event_content.xml
@@ -29,6 +29,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:layout_marginTop="-4dp"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
diff --git a/core/res/res/layout-xlarge/status_bar_latest_event_content_large_icon.xml b/core/res/res/layout-xlarge/status_bar_latest_event_content_large_icon.xml
index 1e1f9de..144fa0d 100644
--- a/core/res/res/layout-xlarge/status_bar_latest_event_content_large_icon.xml
+++ b/core/res/res/layout-xlarge/status_bar_latest_event_content_large_icon.xml
@@ -22,6 +22,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:layout_marginTop="-4dp"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
@@ -37,7 +38,9 @@
/>
<ImageView android:id="@+id/icon"
android:layout_width="48dp"
- android:layout_height="64dp"
+ android:layout_height="32dp"
+ android:layout_gravity="top"
+ android:layout_marginTop="8dp"
android:scaleType="center"
/>
</LinearLayout>
diff --git a/core/res/res/layout-xlarge/status_bar_latest_event_ticker.xml b/core/res/res/layout-xlarge/status_bar_latest_event_ticker.xml
index b09ed44..7631781 100644
--- a/core/res/res/layout-xlarge/status_bar_latest_event_ticker.xml
+++ b/core/res/res/layout-xlarge/status_bar_latest_event_ticker.xml
@@ -28,6 +28,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:layout_marginTop="-4dp"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
@@ -37,8 +38,8 @@
android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Info"
android:layout_width="wrap_content"
android:layout_height="match_parent"
+ android:layout_marginTop="-10dp"
android:singleLine="true"
- android:gravity="center_vertical"
/>
</LinearLayout>
diff --git a/core/res/res/layout-xlarge/status_bar_latest_event_ticker_large_icon.xml b/core/res/res/layout-xlarge/status_bar_latest_event_ticker_large_icon.xml
index 6c2e6f7..b382c55 100644
--- a/core/res/res/layout-xlarge/status_bar_latest_event_ticker_large_icon.xml
+++ b/core/res/res/layout-xlarge/status_bar_latest_event_ticker_large_icon.xml
@@ -23,6 +23,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
+ android:layout_marginTop="-4dp"
android:singleLine="true"
android:ellipsize="marquee"
android:fadingEdge="horizontal"
@@ -33,11 +34,13 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:singleLine="true"
- android:gravity="center_vertical"
+ android:layout_marginTop="-10dp"
/>
<ImageView android:id="@+id/icon"
android:layout_width="48dp"
- android:layout_height="match_parent"
+ android:layout_height="32dp"
+ android:layout_gravity="top"
+ android:layout_marginTop="6dp"
android:scaleType="center"
/>
</LinearLayout>
diff --git a/core/res/res/layout/search_view.xml b/core/res/res/layout/search_view.xml
index 0fd9a77..eb0bb11 100644
--- a/core/res/res/layout/search_view.xml
+++ b/core/res/res/layout/search_view.xml
@@ -43,7 +43,8 @@
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
- android:src="@android:drawable/ic_btn_search"
+ android:background="?android:attr/selectableItemBackground"
+ android:src="@android:drawable/ic_search"
/>
<LinearLayout
@@ -56,6 +57,7 @@
<!-- Inner layout contains the app icon, button(s) and EditText -->
<LinearLayout
+ android:id="@+id/search_plate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -65,16 +67,16 @@
<ImageView
android:id="@+id/search_app_icon"
- android:layout_height="24dip"
- android:layout_width="24dip"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
android:layout_marginRight="7dip"
- android:layout_gravity="bottom"
- android:src="@android:drawable/ic_btn_search"
+ android:layout_gravity="center_vertical"
+ android:src="?android:attr/searchViewSearchIcon"
/>
<AutoCompleteTextView
android:id="@+id/search_src_text"
- android:layout_height="wrap_content"
+ android:layout_height="36dip"
android:layout_width="0dp"
android:layout_weight="1"
android:minWidth="100dp"
@@ -88,43 +90,46 @@
android:inputType="text|textAutoComplete"
android:imeOptions="actionSearch"
android:dropDownHeight="wrap_content"
- android:dropDownAnchor="@id/search_edit_frame"
+ android:dropDownAnchor="@id/search_plate"
android:dropDownVerticalOffset="0dip"
android:dropDownHorizontalOffset="0dip"
- android:popupBackground="?android:attr/searchDropdownBackground"
/>
- <!-- TODO: Use the generic dialog close drawable -->
<ImageView
android:id="@+id/search_close_btn"
- android:layout_width="24dp"
- android:layout_height="24dp"
- android:layout_gravity="bottom"
- android:src="@android:drawable/btn_close"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:paddingLeft="4dip"
+ android:paddingRight="4dip"
+ android:layout_gravity="center_vertical"
+ android:background="?android:attr/selectableItemBackground"
+ android:src="?android:attr/searchViewCloseIcon"
/>
</LinearLayout>
- <ImageView
- android:id="@+id/search_go_btn"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="bottom"
- android:layout_marginLeft="4dip"
- android:layout_marginRight="4dip"
- android:src="@android:drawable/ic_btn_find_next"
- />
</LinearLayout>
- <ImageButton
+ <ImageView
+ android:id="@+id/search_go_btn"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_gravity="center_vertical"
+ android:paddingLeft="4dip"
+ android:paddingRight="4dip"
+ android:background="?android:attr/selectableItemBackground"
+ android:src="?android:attr/searchViewGoIcon"
+ />
+
+ <ImageView
android:id="@+id/search_voice_btn"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
- android:layout_marginLeft="4dip"
- android:layout_marginRight="4dip"
- android:src="@android:drawable/ic_btn_speak_now"
- android:background="@android:color/transparent"
+ android:paddingLeft="4dip"
+ android:paddingRight="4dip"
+ android:src="?android:attr/searchViewVoiceIcon"
+ android:background="?android:attr/selectableItemBackground"
android:visibility="gone"
/>
</LinearLayout>
diff --git a/core/res/res/values-xlarge/config.xml b/core/res/res/values-xlarge/config.xml
index 37f59c8..8ed1c3e 100644
--- a/core/res/res/values-xlarge/config.xml
+++ b/core/res/res/values-xlarge/config.xml
@@ -31,7 +31,7 @@
<bool name="config_enableLockScreenRotation">true</bool>
<!-- see comment in values/config.xml -->
- <integer name="config_longPressOnHomeBehavior">1</integer>
+ <integer name="config_longPressOnHomeBehavior">0</integer>
</resources>
diff --git a/core/res/res/values-xlarge/styles.xml b/core/res/res/values-xlarge/styles.xml
index 316861e..095a83d 100644
--- a/core/res/res/values-xlarge/styles.xml
+++ b/core/res/res/values-xlarge/styles.xml
@@ -29,10 +29,10 @@
<style name="TextAppearance.StatusBar.Icon">
</style>
<style name="TextAppearance.StatusBar.EventContent">
- <item name="android:textColor">?android:attr/textColorPrimary</item>
- <item name="android:textSize">16sp</item>
+ <item name="android:textColor">#ff999999</item>
</style>
<style name="TextAppearance.StatusBar.EventContent.Title">
- <item name="android:textStyle">bold</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
</resources>
+
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 3f81a89..a8099e3 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -605,8 +605,20 @@
<!-- Background drawable for standalone items that need focus/pressed states. -->
<attr name="selectableItemBackground" format="reference" />
+ <!-- ============================ -->
+ <!-- SearchView styles and assets -->
+ <!-- ============================ -->
+ <eat-comment />
<!-- SearchView dropdown background -->
<attr name="searchDropdownBackground" format="reference" />
+ <!-- SearchView close button icon -->
+ <attr name="searchViewCloseIcon" format="reference" />
+ <!-- SearchView Go button icon -->
+ <attr name="searchViewGoIcon" format="reference" />
+ <!-- SearchView Search icon -->
+ <attr name="searchViewSearchIcon" format="reference" />
+ <!-- SearchView Voice button icon -->
+ <attr name="searchViewVoiceIcon" format="reference" />
<!-- Specifies a drawable to use for the 'home as up' indicator. -->
<attr name="homeAsUpIndicator" format="reference" />
@@ -3221,10 +3233,10 @@
</declare-styleable>
<declare-styleable name="ScaleAnimation">
- <attr name="fromXScale" format="float" />
- <attr name="toXScale" format="float" />
- <attr name="fromYScale" format="float" />
- <attr name="toYScale" format="float" />
+ <attr name="fromXScale" format="float|fraction|dimension" />
+ <attr name="toXScale" format="float|fraction|dimension" />
+ <attr name="fromYScale" format="float|fraction|dimension" />
+ <attr name="toYScale" format="float|fraction|dimension" />
<attr name="pivotX" />
<attr name="pivotY" />
</declare-styleable>
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index 21b810e..d64fb74 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -110,8 +110,8 @@
<color name="background_holo_light">#fff3f3f3</color>
<color name="bright_foreground_holo_dark">@android:color/background_holo_light</color>
<color name="bright_foreground_holo_light">@android:color/background_holo_dark</color>
- <color name="bright_foreground_disabled_holo_dark">#80ffffff</color>
- <color name="bright_foreground_disabled_holo_light">#80000000</color>
+ <color name="bright_foreground_disabled_holo_dark">#ff4c4c4c</color>
+ <color name="bright_foreground_disabled_holo_light">#ffb2b2b2</color>
<color name="bright_foreground_inverse_holo_dark">@android:color/bright_foreground_holo_light</color>
<color name="bright_foreground_inverse_holo_light">@android:color/bright_foreground_holo_dark</color>
<color name="dim_foreground_holo_dark">#bebebe</color>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 61223b3..03d581f 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -355,7 +355,7 @@
1 - Recent apps dialog
2 - Recent apps activity in SystemUI
-->
- <integer name="config_longPressOnHomeBehavior">0</integer>
+ <integer name="config_longPressOnHomeBehavior">1</integer>
<!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.
The N entries of this array define N + 1 zones as follows:
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 6985de6..2754e73 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -779,23 +779,22 @@
<item name="android:textColor">@android:color/sliding_tab_text_color_active</item>
<item name="android:textSize">28sp</item>
</style>
-
- <!-- @hide -->
+ <!-- @hide -->
<style name="TextAppearance.SearchResult">
<item name="android:textStyle">normal</item>
<item name="android:textColor">?textColorPrimaryInverse</item>
<item name="android:textColorHint">?textColorHintInverse</item>
</style>
-
- <!-- @hide -->
+
+ <!-- @hide -->
<style name="TextAppearance.SearchResult.Title">
- <item name="android:textSize">16sp</item>
+ <item name="android:textSize">18sp</item>
</style>
-
- <!-- @hide -->
+
+ <!-- @hide -->
<style name="TextAppearance.SearchResult.Subtitle">
- <item name="android:textSize">13sp</item>
+ <item name="android:textSize">14sp</item>
<item name="android:textColor">?textColorSecondaryInverse</item>
</style>
@@ -1061,17 +1060,17 @@
<style name="TextAppearance.Holo.SearchResult">
<item name="android:textStyle">normal</item>
- <item name="android:textColor">?textColorPrimaryInverse</item>
- <item name="android:textColorHint">?textColorHintInverse</item>
+ <item name="android:textColor">?textColorPrimary</item>
+ <item name="android:textColorHint">?textColorHint</item>
</style>
<style name="TextAppearance.Holo.SearchResult.Title">
- <item name="android:textSize">16sp</item>
+ <item name="android:textSize">18sp</item>
</style>
<style name="TextAppearance.Holo.SearchResult.Subtitle">
- <item name="android:textSize">13sp</item>
- <item name="android:textColor">?textColorSecondaryInverse</item>
+ <item name="android:textSize">14sp</item>
+ <item name="android:textColor">?textColorSecondary</item>
</style>
<style name="TextAppearance.Holo.Widget" parent="TextAppearance.Widget">
@@ -1203,14 +1202,17 @@
</style>
<style name="TextAppearance.Holo.Light.SearchResult" parent="TextAppearance.Holo.SearchResult">
- <item name="android:textColor">?textColorPrimary</item>
- <item name="android:textColorHint">?textColorHint</item>
+ <item name="android:textColor">?textColorPrimary</item>
+ <item name="android:textColorHint">?textColorHint</item>
</style>
<style name="TextAppearance.Holo.Light.SearchResult.Title">
+ <item name="android:textSize">18sp</item>
</style>
<style name="TextAppearance.Holo.Light.SearchResult.Subtitle">
+ <item name="android:textSize">14sp</item>
+ <item name="android:textColor">?textColorSecondary</item>
</style>
<style name="TextAppearance.Holo.Light.Widget" parent="TextAppearance.Widget">
@@ -1320,6 +1322,8 @@
</style>
<style name="Widget.Holo.AutoCompleteTextView" parent="Widget.AutoCompleteTextView">
+ <item name="android:dropDownSelector">@android:drawable/list_selector_holo_dark</item>
+ <item name="android:popupBackground">@android:drawable/menu_dropdown_panel_holo_dark</item>
</style>
<style name="Widget.Holo.CompoundButton.CheckBox" parent="Widget.CompoundButton.CheckBox">
@@ -1620,6 +1624,8 @@
</style>
<style name="Widget.Holo.Light.AutoCompleteTextView" parent="Widget.AutoCompleteTextView">
+ <item name="android:dropDownSelector">@android:drawable/list_selector_holo_light</item>
+ <item name="android:popupBackground">@android:drawable/menu_dropdown_panel_holo_light</item>
</style>
<style name="Widget.Holo.Light.CompoundButton.CheckBox" parent="Widget.CompoundButton.CheckBox">
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 1ef99d0..0eec0df 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -261,7 +261,11 @@
<item name="buttonGroupStyle">@android:style/Widget.ButtonGroup</item>
<!-- SearchView attributes -->
- <item name="searchDropdownBackground">@android:drawable/search_dropdown_dark</item>
+ <item name="searchDropdownBackground">@android:drawable/spinner_dropdown_background</item>
+ <item name="searchViewCloseIcon">@android:drawable/ic_clear</item>
+ <item name="searchViewSearchIcon">@android:drawable/ic_search</item>
+ <item name="searchViewGoIcon">@android:drawable/ic_go</item>
+ <item name="searchViewVoiceIcon">@android:drawable/ic_voice_search</item>
<!-- PreferenceFrameLayout attributes -->
<item name="preferenceFrameLayoutStyle">@android:style/Widget.PreferenceFrameLayout</item>
@@ -1028,7 +1032,7 @@
<!-- Widget styles -->
<item name="absListViewStyle">@android:style/Widget.Holo.AbsListView</item>
- <item name="autoCompleteTextViewStyle">@android:style/Widget.Holo.AutoCompleteTextView</item>
+ <item name="autoCompleteTextViewStyle">@android:style/Widget.Holo.Light.AutoCompleteTextView</item>
<item name="checkboxStyle">@android:style/Widget.Holo.CompoundButton.CheckBox</item>
<item name="dropDownListViewStyle">@android:style/Widget.Holo.ListView.DropDown</item>
<item name="editTextStyle">@android:style/Widget.Holo.EditText</item>
diff --git a/docs/html/guide/topics/resources/layout-resource.jd b/docs/html/guide/topics/resources/layout-resource.jd
index 111851c..36369d3 100644
--- a/docs/html/guide/topics/resources/layout-resource.jd
+++ b/docs/html/guide/topics/resources/layout-resource.jd
@@ -149,17 +149,23 @@
</dd>
<dt><code>android:layout_height</code></dt>
<dd><em>Dimension or keyword</em>. Overrides the height given to the root view in the
-included layout.
+included layout. Only effective if <code>android:layout_width</code> is also declared.
</dd>
<dt><code>android:layout_width</code></dt>
<dd><em>Dimension or keyword</em>. Overrides the width given to the root view in the
-included layout.
+included layout. Only effective if <code>android:layout_height</code> is also declared.
</dd>
</dl>
<p>You can include any other layout attributes in the <code><include></code> that are
supported by the root element in the included layout and they will override those defined in the
root element.</p>
+ <p class="caution"><strong>Caution:</strong> If you want to override the layout dimensions,
+you must override both <code>android:layout_height</code> and
+<code>android:layout_width</code>—you cannot override only the height or only the width.
+If you override only one, it will not take effect. (Other layout properties, such as weight,
+are still inherited from the source layout.)</p>
+
<p>Another way to include a layout is to use {@link android.view.ViewStub}. It is a lightweight
View that consumes no layout space until you explicitly inflate it, at which point, it includes a
layout file defined by its {@code android:layout} attribute. For more information about using {@link
diff --git a/docs/html/guide/topics/ui/declaring-layout.jd b/docs/html/guide/topics/ui/declaring-layout.jd
index 4d71d28..d561bdd 100644
--- a/docs/html/guide/topics/ui/declaring-layout.jd
+++ b/docs/html/guide/topics/ui/declaring-layout.jd
@@ -120,7 +120,7 @@
<pre>
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- setContentView.(R.layout.main_layout);
+ setContentView(R.layout.main_layout);
}
</pre>
diff --git a/docs/html/resources/articles/layout-tricks-reuse.jd b/docs/html/resources/articles/layout-tricks-reuse.jd
index 072ba89..396e2127 100644
--- a/docs/html/resources/articles/layout-tricks-reuse.jd
+++ b/docs/html/resources/articles/layout-tricks-reuse.jd
@@ -53,12 +53,24 @@
layout; it will also override the id of the included layout if one is defined.
Similarly, you can override all the layout parameters. This means that any
<code>android:layout_*</code> attribute can be used with the <code><include
-/></code> tag. Here is an example:</p>
+/></code> tag. Here is an example in
+which the same layout is included twice, but only the first one overrides the layout properties:</p>
-<pre class="prettyprint"><include android:layout_width="fill_parent" layout="@layout/image_holder" />
-<include android:layout_width="256dip" layout="@layout/image_holder" />
+<pre>
+<!-- override the layout height and width -->
+<include layout="@layout/image_holder"
+ android:layout_height="fill_parent"
+ android:layout_width="fill_parent" />
+<!-- do not override layout dimensions; inherit them from image_holder -->
+<include layout="@layout/image_holder" />
</pre>
+<p class="caution"><strong>Caution:</strong> If you want to override the layout dimensions,
+you must override both <code>android:layout_height</code> and
+<code>android:layout_width</code>—you cannot override only the height or only the width.
+If you override only one, it will not take effect. (Other layout properties, such as weight,
+are still inherited from the source layout.)</p>
+
<p>This tag is particularly useful when you need to customize only part of your
UI depending on the device's configuration. For instance, the main layout of
your activity can be placed in the <code>layout/</code> directory and can
diff --git a/drm/libdrmframework/plugins/widevine/Android.mk b/drm/libdrmframework/plugins/widevine/Android.mk
deleted file mode 100644
index 2c388da..0000000
--- a/drm/libdrmframework/plugins/widevine/Android.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Copyright (C) 2010 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-LOCAL_PATH:= $(call my-dir)
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libdrmwvmplugin
-
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/drm/plugins/native
-
-LOCAL_PRELINK_MODULE := false
-
-LOCAL_MODULE_TAGS := optional
-
-include $(BUILD_SHARED_LIBRARY)
diff --git a/libs/rs/rsScriptC.h b/libs/rs/rsScriptC.h
index 4f0dff3..ab2db5c8 100644
--- a/libs/rs/rsScriptC.h
+++ b/libs/rs/rsScriptC.h
@@ -21,7 +21,9 @@
#include "RenderScriptEnv.h"
-struct BCCscript;
+namespace bcc {
+class BCCscript;
+}
// ---------------------------------------------------------------------------
namespace android {
@@ -46,7 +48,7 @@
Program_t mProgram;
- BCCscript* mBccScript;
+ bcc::BCCscript* mBccScript;
const Allocation *ptrToAllocation(const void *) const;
diff --git a/media/java/android/media/videoeditor/MediaProperties.java b/media/java/android/media/videoeditor/MediaProperties.java
index 34088fc..0bb83eb 100755
--- a/media/java/android/media/videoeditor/MediaProperties.java
+++ b/media/java/android/media/videoeditor/MediaProperties.java
@@ -95,6 +95,9 @@
public static final int BITRATE_384K = 384000;
public static final int BITRATE_512K = 512000;
public static final int BITRATE_800K = 800000;
+ public static final int BITRATE_2M = 2000000;
+ public static final int BITRATE_5M = 5000000;
+ public static final int BITRATE_8M = 8000000;
// The array of supported bitrates
private static final int[] SUPPORTED_BITRATES = new int[] {
diff --git a/media/libwvm/Android.mk b/media/libwvm/Android.mk
deleted file mode 100644
index 7c75c0f..0000000
--- a/media/libwvm/Android.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-# create an empty mk for libwvm
-# for integration purpose
-LOCAL_PATH := $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := libwvm
-
-LOCAL_MODULE_TAGS := optional
-include $(BUILD_SHARED_LIBRARY)
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notification_open.png b/packages/SystemUI/res/drawable-hdpi/ic_notification_open.png
new file mode 100644
index 0000000..d083396
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_notification_open.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notification_veto.png b/packages/SystemUI/res/drawable-hdpi/ic_notification_veto.png
new file mode 100644
index 0000000..395604f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_notification_veto.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd.png
new file mode 100644
index 0000000..51b5809
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd_off.png
new file mode 100644
index 0000000..37ef7e1
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_quicksettings.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_quicksettings.png
new file mode 100644
index 0000000..d9b4eca
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_quicksettings.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_lanscape.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_lanscape.png
new file mode 100644
index 0000000..c091489
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_lanscape.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_portrait.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_portrait.png
new file mode 100644
index 0000000..73a9897
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_portrait.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_shadow.9.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_shadow.9.png
new file mode 100644
index 0000000..7cb2643
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_shadow.9.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/recent_overlay.png b/packages/SystemUI/res/drawable-hdpi/recent_overlay.png
new file mode 100644
index 0000000..fcf4417
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/recent_overlay.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/recent_rez_border.png b/packages/SystemUI/res/drawable-hdpi/recent_rez_border.png
new file mode 100644
index 0000000..af36ac7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/recent_rez_border.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signalmini_100.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signalmini_100.png
new file mode 100644
index 0000000..d89f8891
--- /dev/null
+++ b/packages/SystemUI/res/drawable-hdpi/sysbar_signalmini_100.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notification_veto.png b/packages/SystemUI/res/drawable-mdpi/ic_notification_veto.png
new file mode 100644
index 0000000..f6299e9
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_notification_veto.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd.png
new file mode 100644
index 0000000..fe44063
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd_off.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd_off.png
new file mode 100644
index 0000000..8088a2f
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png
new file mode 100644
index 0000000..96bf2ec
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png
new file mode 100644
index 0000000..cc56778
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable/recent_overlay.png b/packages/SystemUI/res/drawable-mdpi/recent_overlay.png
similarity index 100%
rename from packages/SystemUI/res/drawable/recent_overlay.png
rename to packages/SystemUI/res/drawable-mdpi/recent_overlay.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable/recent_rez_border.png b/packages/SystemUI/res/drawable-mdpi/recent_rez_border.png
similarity index 100%
rename from packages/SystemUI/res/drawable/recent_rez_border.png
rename to packages/SystemUI/res/drawable-mdpi/recent_rez_border.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_0.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_0.png
new file mode 100644
index 0000000..7371571
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_0.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_10.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_10.png
new file mode 100644
index 0000000..5781e9a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_10.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_100.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_100.png
new file mode 100644
index 0000000..c65728c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_100.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_20.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_20.png
new file mode 100644
index 0000000..a249fa2
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_20.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_30.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_30.png
new file mode 100644
index 0000000..289c088
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_30.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_40.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_40.png
new file mode 100644
index 0000000..f49dbd6
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_40.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_50.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_50.png
new file mode 100644
index 0000000..2f83e68
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_50.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_60.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_60.png
new file mode 100644
index 0000000..bedc021
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_60.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_70.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_70.png
new file mode 100644
index 0000000..edd8c05
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_70.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_80.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_80.png
new file mode 100644
index 0000000..148e20c
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_80.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_90.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_90.png
new file mode 100644
index 0000000..5a90ccb
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_90.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xlarge-hdpi/app_icon.png b/packages/SystemUI/res/drawable-xlarge-hdpi/app_icon.png
new file mode 100644
index 0000000..aedf7e7
--- /dev/null
+++ b/packages/SystemUI/res/drawable-xlarge-hdpi/app_icon.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable/ic_sysbar_back_ime.xml b/packages/SystemUI/res/drawable/ic_sysbar_back_ime.xml
new file mode 100644
index 0000000..248496d
--- /dev/null
+++ b/packages/SystemUI/res/drawable/ic_sysbar_back_ime.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true" android:drawable="@drawable/ic_sysbar_back_ime_pressed" />
+ <item android:drawable="@drawable/ic_sysbar_back_ime_default" />
+</selector>
+
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar.xml b/packages/SystemUI/res/layout-xlarge/status_bar.xml
index 488dbba..d4e9c53 100644
--- a/packages/SystemUI/res/layout-xlarge/status_bar.xml
+++ b/packages/SystemUI/res/layout-xlarge/status_bar.xml
@@ -167,11 +167,19 @@
/>
</com.android.systemui.statusbar.tablet.ShirtPocket>
<com.android.systemui.statusbar.tablet.InputMethodButton
- android:id="@+id/imeButton"
+ android:id="@+id/imeSwitchButton"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="8dip"
- android:src="@drawable/ic_sysbar_ime"
+ android:src="@drawable/ic_sysbar_ime_default"
+ android:visibility="invisible"
+ />
+ <com.android.systemui.statusbar.tablet.InputMethodButton
+ android:id="@+id/imeShortcutButton"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginLeft="8dip"
+ android:src="@drawable/ic_sysbar_ime_default"
android:visibility="invisible"
/>
</LinearLayout>
diff --git a/packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml b/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml
similarity index 94%
rename from packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml
rename to packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml
index fb4cf3f..c0612c8 100644
--- a/packages/SystemUI/res/layout-xlarge/sysbar_panel_notifications.xml
+++ b/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml
@@ -62,6 +62,7 @@
<com.android.systemui.statusbar.policy.DateView
android:id="@+id/date"
+ style="@style/StatusBarNotificationText"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_below="@id/clock"
@@ -84,12 +85,13 @@
<TextView
android:id="@+id/battery_text"
- android:layout_width="48dp"
+ style="@style/StatusBarNotificationText"
+ android:layout_width="56dp"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/battery"
android:layout_alignBaseline="@id/battery"
android:singleLine="true"
- android:text="@string/system_panel_settings_button"
+ android:text="@string/status_bar_settings_settings_button"
/>
<ImageView
@@ -104,12 +106,13 @@
<TextView
android:id="@+id/network_text"
+ style="@style/StatusBarNotificationText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/network"
android:layout_alignBaseline="@id/battery"
android:singleLine="true"
- android:text="@string/system_panel_settings_button"
+ android:text="@string/status_bar_settings_settings_button"
/>
<ImageView
diff --git a/packages/SystemUI/res/layout-xlarge/sysbar_panel_notification_peek.xml b/packages/SystemUI/res/layout-xlarge/status_bar_notification_peek.xml
similarity index 100%
rename from packages/SystemUI/res/layout-xlarge/sysbar_panel_notification_peek.xml
rename to packages/SystemUI/res/layout-xlarge/status_bar_notification_peek.xml
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml b/packages/SystemUI/res/layout-xlarge/status_bar_notification_row.xml
similarity index 100%
rename from packages/SystemUI/res/layout-xlarge/status_bar_latest_event.xml
rename to packages/SystemUI/res/layout-xlarge/status_bar_notification_row.xml
diff --git a/packages/SystemUI/res/layout-xlarge/sysbar_panel_pocket.xml b/packages/SystemUI/res/layout-xlarge/status_bar_pocket_panel.xml
similarity index 100%
rename from packages/SystemUI/res/layout-xlarge/sysbar_panel_pocket.xml
rename to packages/SystemUI/res/layout-xlarge/status_bar_pocket_panel.xml
diff --git a/packages/SystemUI/res/layout-xlarge/sysbar_panel_recent_item.xml b/packages/SystemUI/res/layout-xlarge/status_bar_recent_item.xml
similarity index 99%
rename from packages/SystemUI/res/layout-xlarge/sysbar_panel_recent_item.xml
rename to packages/SystemUI/res/layout-xlarge/status_bar_recent_item.xml
index b1997b8..e7a3a61 100644
--- a/packages/SystemUI/res/layout-xlarge/sysbar_panel_recent_item.xml
+++ b/packages/SystemUI/res/layout-xlarge/status_bar_recent_item.xml
@@ -56,4 +56,4 @@
</LinearLayout>
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/packages/SystemUI/res/layout-xlarge/sysbar_panel_recent.xml b/packages/SystemUI/res/layout-xlarge/status_bar_recent_panel.xml
similarity index 100%
rename from packages/SystemUI/res/layout-xlarge/sysbar_panel_recent.xml
rename to packages/SystemUI/res/layout-xlarge/status_bar_recent_panel.xml
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_settings_view.xml b/packages/SystemUI/res/layout-xlarge/status_bar_settings_view.xml
new file mode 100644
index 0000000..6dd97c3
--- /dev/null
+++ b/packages/SystemUI/res/layout-xlarge/status_bar_settings_view.xml
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<com.android.systemui.statusbar.tablet.SettingsView
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:background="@drawable/status_bar_item_background"
+ android:paddingLeft="16dp"
+ >
+
+ <!-- Airplane mode -->
+ <LinearLayout
+ android:id="@+id/airplane"
+ style="@style/StatusBarPanelSettingsRow"
+ >
+ <ImageView
+ android:id="@+id/airplane_icon"
+ style="@style/StatusBarPanelSettingsIcon"
+ android:src="@drawable/ic_sysbar_airplane_on"
+ />
+ <TextView
+ android:id="@+id/airplane_label"
+ style="@style/StatusBarPanelSettingsContents"
+ android:text="@string/status_bar_settings_airplane"
+ />
+ <CheckBox
+ android:id="@+id/airplane_checkbox"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ />
+ </LinearLayout>
+ <View style="@style/StatusBarPanelSettingsPanelSeparator" />
+
+ <!-- Network -->
+ <LinearLayout
+ android:id="@+id/network"
+ style="@style/StatusBarPanelSettingsRow"
+ >
+ <ImageView
+ android:id="@+id/network_icon"
+ style="@style/StatusBarPanelSettingsIcon"
+ android:src="@drawable/ic_sysbar_wifi_on"
+ />
+ <TextView
+ android:id="@+id/network_label"
+ style="@style/StatusBarPanelSettingsContents"
+ />
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top"
+ android:layout_marginTop="16dp"
+ android:layout_marginRight="8dp"
+ android:src="@drawable/ic_notification_open"
+ />
+ </LinearLayout>
+ <View style="@style/StatusBarPanelSettingsPanelSeparator" />
+
+ <!-- Rotation lock -->
+ <LinearLayout
+ android:id="@+id/rotate"
+ style="@style/StatusBarPanelSettingsRow"
+ >
+ <ImageView
+ android:id="@+id/rotate_icon"
+ style="@style/StatusBarPanelSettingsIcon"
+ android:src="@drawable/ic_sysbar_rotate_on"
+ />
+ <TextView
+ android:id="@+id/rotate_label"
+ style="@style/StatusBarPanelSettingsContents"
+ android:text="@string/status_bar_settings_rotation_lock"
+ />
+ <CheckBox
+ android:id="@+id/rotate_checkbox"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ />
+ </LinearLayout>
+ <View style="@style/StatusBarPanelSettingsPanelSeparator" />
+
+ <!-- Brightness -->
+ <LinearLayout style="@style/StatusBarPanelSettingsRow" >
+ <ImageView
+ android:id="@+id/brightness_icon"
+ style="@style/StatusBarPanelSettingsIcon"
+ android:src="@drawable/ic_sysbar_brightness"
+ />
+ </LinearLayout>
+ <View style="@style/StatusBarPanelSettingsPanelSeparator" />
+
+ <!-- Volume -->
+ <LinearLayout style="@style/StatusBarPanelSettingsRow" >
+ <ImageView
+ android:id="@+id/volume_icon"
+ style="@style/StatusBarPanelSettingsIcon"
+ android:src="@drawable/ic_sysbar_sound_on"
+ />
+ </LinearLayout>
+ <View style="@style/StatusBarPanelSettingsPanelSeparator" />
+
+ <!-- Notifications / Do not disturb -->
+ <LinearLayout
+ android:id="@+id/do_not_disturb"
+ style="@style/StatusBarPanelSettingsRow"
+ >
+ <ImageView
+ android:id="@+id/do_not_disturb_icon"
+ style="@style/StatusBarPanelSettingsIcon"
+ android:src="@drawable/ic_sysbar_gps_on"
+ />
+ <TextView
+ style="@style/StatusBarPanelSettingsContents"
+ android:text="@string/status_bar_settings_notifications"
+ />
+ <CheckBox
+ android:id="@+id/do_not_disturb_checkbox"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ />
+ </LinearLayout>
+ <View style="@style/StatusBarPanelSettingsPanelSeparator" />
+
+ <!-- Link to settings -->
+ <LinearLayout
+ android:id="@+id/settings"
+ style="@style/StatusBarPanelSettingsRow"
+ >
+
+ <ImageView
+ android:id="@+id/settings"
+ style="@style/StatusBarPanelSettingsIcon"
+ android:src="@drawable/ic_sysbar_quicksettings"
+ />
+ <TextView
+ style="@style/StatusBarPanelSettingsContents"
+ android:text="@string/status_bar_settings_settings_button"
+ />
+ <ImageView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top"
+ android:layout_marginTop="16dp"
+ android:layout_marginRight="8dp"
+ android:src="@drawable/ic_notification_open"
+ />
+ </LinearLayout>
+ <View style="@style/StatusBarPanelSettingsPanelSeparator" />
+
+</com.android.systemui.statusbar.tablet.SettingsView>
+
diff --git a/packages/SystemUI/res/layout-xlarge/ticker_compat.xml b/packages/SystemUI/res/layout-xlarge/status_bar_ticker_compat.xml
similarity index 100%
rename from packages/SystemUI/res/layout-xlarge/ticker_compat.xml
rename to packages/SystemUI/res/layout-xlarge/status_bar_ticker_compat.xml
diff --git a/packages/SystemUI/res/layout-xlarge/ticker.xml b/packages/SystemUI/res/layout-xlarge/status_bar_ticker_panel.xml
similarity index 100%
rename from packages/SystemUI/res/layout-xlarge/ticker.xml
rename to packages/SystemUI/res/layout-xlarge/status_bar_ticker_panel.xml
diff --git a/packages/SystemUI/res/layout-xlarge/sysbar_panel_settings.xml b/packages/SystemUI/res/layout-xlarge/sysbar_panel_settings.xml
deleted file mode 100644
index a800afb..0000000
--- a/packages/SystemUI/res/layout-xlarge/sysbar_panel_settings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-
-<com.android.systemui.statusbar.tablet.SettingsPanel
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="200dip"
- android:background="#ff000000"
- >
-</com.android.systemui.statusbar.tablet.SettingsPanel>
-
diff --git a/packages/SystemUI/res/layout-xlarge/sysbar_panel_system.xml b/packages/SystemUI/res/layout-xlarge/sysbar_panel_system.xml
deleted file mode 100644
index a1792fd..0000000
--- a/packages/SystemUI/res/layout-xlarge/sysbar_panel_system.xml
+++ /dev/null
@@ -1,213 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* apps/common/assets/default/default/skins/StatusBar.xml
-**
-** Copyright 2010, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<com.android.systemui.statusbar.tablet.SystemPanel
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="wrap_content"
- android:layout_width="match_parent"
- android:background="@drawable/sysbar_panel_bg"
- android:orientation="vertical"
- android:paddingLeft="70dip"
- android:paddingRight="120dip"
- >
-
- <!-- top row: quick settings buttons -->
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="64dip"
- android:orientation="horizontal"
- android:gravity="center"
- >
- <ImageButton android:id="@+id/brightness"
- android:layout_width="90dip"
- android:layout_height="64dip"
- android:src="@drawable/ic_sysbar_brightness"
- android:background="@drawable/sysbar_toggle_bg_off"
- />
- <ImageButton android:id="@+id/sound"
- android:layout_width="90dip"
- android:layout_height="64dip"
- android:layout_marginLeft="8dip"
- android:src="@drawable/ic_sysbar_sound_on"
- android:background="@drawable/sysbar_toggle_bg_off"
- />
- <ImageButton android:id="@+id/orientation"
- android:layout_width="90dip"
- android:layout_height="64dip"
- android:layout_marginLeft="8dip"
- android:src="@drawable/ic_sysbar_rotate_on"
- android:background="@drawable/sysbar_toggle_bg_off"
- />
- <ImageButton android:id="@+id/airplane"
- android:layout_width="90dip"
- android:layout_height="64dip"
- android:layout_marginLeft="8dip"
- android:src="@drawable/ic_sysbar_airplane_on"
- android:background="@drawable/sysbar_toggle_bg_off"
- />
- <ImageButton android:id="@+id/gps"
- android:layout_width="90dip"
- android:layout_height="64dip"
- android:layout_marginLeft="8dip"
- android:src="@drawable/ic_sysbar_gps_on"
- android:background="@drawable/sysbar_toggle_bg_off"
- />
- <ImageButton android:id="@+id/bluetooth"
- android:layout_width="90dip"
- android:layout_height="64dip"
- android:layout_marginLeft="8dip"
- android:src="@drawable/ic_sysbar_bluetooth_on"
- android:background="@drawable/sysbar_toggle_bg_off"
- />
- </LinearLayout>
-
- <!-- main row: meters, clock -->
- <RelativeLayout
- android:padding="8dip"
- android:layout_width="match_parent"
- android:layout_height="192dip"
- >
- <RelativeLayout
- android:layout_width="256dip"
- android:layout_height="192dip"
- android:layout_alignParentLeft="true"
- android:layout_marginLeft="48dip"
- >
- <ImageView android:id="@+id/battery_meter"
- android:layout_width="256dip"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:scaleType="centerCrop"
- />
- <TextView android:id="@+id/battery_info"
- style="@style/TextAppearance.StatusBar.SystemPanel"
- android:layout_width="match_parent"
- android:layout_height="24dip"
- android:gravity="center"
- android:layout_above="@id/battery_meter"
- />
- </RelativeLayout>
-
- <com.android.systemui.statusbar.policy.Clock
- style="@style/TextAppearance.StatusBar.SystemPanel"
- android:id="@+id/clock"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:textSize="50sp"
- android:textStyle="normal"
- android:textColor="#FFFFFFFF"
- android:layout_centerHorizontal="true"
- android:layout_alignParentBottom="true"
- />
-
- <RelativeLayout
- android:layout_width="256dip"
- android:layout_height="192dip"
- android:layout_alignParentRight="true"
- android:layout_marginRight="48dip"
- >
- <ImageView android:id="@+id/signal_meter"
- android:layout_width="256dip"
- android:layout_height="wrap_content"
- android:layout_alignParentBottom="true"
- android:scaleType="centerCrop"
- />
-
- <TextView android:id="@+id/signal_info"
- style="@style/TextAppearance.StatusBar.SystemPanel"
- android:layout_width="match_parent"
- android:layout_height="24dip"
- android:gravity="center"
- android:layout_above="@id/signal_meter"
- />
- </RelativeLayout>
-
- <ImageView
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentBottom="true"
- android:layout_marginBottom="8dip"
- android:layout_marginLeft="8dip"
- android:src="@drawable/ic_sysbar_battery_on"
- />
- <ImageView
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_alignParentRight="true"
- android:layout_alignParentBottom="true"
- android:layout_marginBottom="8dip"
- android:layout_marginRight="8dip"
- android:src="@drawable/ic_sysbar_wifi_on"
- />
- </RelativeLayout>
-
- <!-- bottom row: transient indicators, settings button -->
- <View
- android:layout_width="match_parent"
- android:layout_height="1sp"
- android:background="@android:drawable/divider_horizontal_dark"
- />
- <RelativeLayout
- android:layout_width="match_parent"
- android:layout_height="48dip"
- >
- <TextView android:id="@+id/settings_button"
- style="@style/TextAppearance.StatusBar.TextButton"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:layout_alignParentRight="true"
- android:paddingRight="32dip"
- android:paddingLeft="32dip"
- android:textSize="20sp"
- android:gravity="center"
- android:text="@string/system_panel_settings_button"
- />
- <View
- android:id="@+id/settings_left_divider"
- android:layout_height="match_parent"
- android:layout_width="1sp"
- android:layout_toLeftOf="@id/settings_button"
- android:background="@*android:drawable/divider_vertical_dark"
- />
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_alignParentLeft="true"
- android:layout_toLeftOf="@id/settings_left_divider"
- android:orientation="horizontal"
- android:gravity="left|center_vertical"
- >
- <!-- TODO: alarm -->
- <!-- TODO: sync -->
- <com.android.systemui.statusbar.policy.DateView
- android:id="@+id/date"
- style="@style/TextAppearance.StatusBar.SystemPanel"
- android:layout_width="wrap_content"
- android:layout_height="match_parent"
- android:singleLine="true"
- android:gravity="center"
- />
- </LinearLayout>
-
-
- </RelativeLayout>
-</com.android.systemui.statusbar.tablet.SystemPanel>
diff --git a/packages/SystemUI/res/layout-xlarge/ticker_icon.xml b/packages/SystemUI/res/layout-xlarge/ticker_icon.xml
deleted file mode 100644
index 9efa987..0000000
--- a/packages/SystemUI/res/layout-xlarge/ticker_icon.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
--->
-
-<ImageView
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="30dp"
- android:layout_height="30dp"
- android:layout_gravity="center"
- android:layout_marginLeft="6dp"
- />
-
diff --git a/packages/SystemUI/res/layout/status_bar_latest_event.xml b/packages/SystemUI/res/layout/status_bar_notification_row.xml
similarity index 100%
rename from packages/SystemUI/res/layout/status_bar_latest_event.xml
rename to packages/SystemUI/res/layout/status_bar_notification_row.xml
diff --git a/packages/SystemUI/res/values-ar/strings.xml b/packages/SystemUI/res/values-ar/strings.xml
index d94e58a..1a32aa7 100644
--- a/packages/SystemUI/res/values-ar/strings.xml
+++ b/packages/SystemUI/res/values-ar/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"استخدام البطارية"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"حديثة"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-bg/strings.xml b/packages/SystemUI/res/values-bg/strings.xml
index 975c207..a9c8ba0 100644
--- a/packages/SystemUI/res/values-bg/strings.xml
+++ b/packages/SystemUI/res/values-bg/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Използване на батерията"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Скорошни"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-ca/strings.xml b/packages/SystemUI/res/values-ca/strings.xml
index 611bec7..eea01e1 100644
--- a/packages/SystemUI/res/values-ca/strings.xml
+++ b/packages/SystemUI/res/values-ca/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Ús de la bateria"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Recents"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-cs-xlarge/strings.xml b/packages/SystemUI/res/values-cs-xlarge/strings.xml
index a0301bb..d432a8b 100644
--- a/packages/SystemUI/res/values-cs-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-cs-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"žádné připojení k internetu"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"žádné připojení k internetu"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: připojeno"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: připojování"</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Mob. data: připojeno"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Mob. data: připojování"</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: připojeno"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: připojování"</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Mob. data: připojeno"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Mob. data: připojování"</string>
</resources>
diff --git a/packages/SystemUI/res/values-cs/strings.xml b/packages/SystemUI/res/values-cs/strings.xml
index 4e7f5cf..5eac747 100644
--- a/packages/SystemUI/res/values-cs/strings.xml
+++ b/packages/SystemUI/res/values-cs/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Využití baterie"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Nejnovější"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-da-xlarge/strings.xml b/packages/SystemUI/res/values-da-xlarge/strings.xml
index d75b5a51..9d587a8 100644
--- a/packages/SystemUI/res/values-da-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-da-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"ingen forbindelse"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"ingen forbindelse"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi forbundet"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: forbinder..."</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Mobildata tilsluttet"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Mobildata tilsluttes"</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi forbundet"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: forbinder..."</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Mobildata tilsluttet"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Mobildata tilsluttes"</string>
</resources>
diff --git a/packages/SystemUI/res/values-da/strings.xml b/packages/SystemUI/res/values-da/strings.xml
index aad6d71..7b49070 100644
--- a/packages/SystemUI/res/values-da/strings.xml
+++ b/packages/SystemUI/res/values-da/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Batteriforbrug"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Seneste"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-de-xlarge/strings.xml b/packages/SystemUI/res/values-de-xlarge/strings.xml
index eb402da..fd1a976 100644
--- a/packages/SystemUI/res/values-de-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-de-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"Keine Verbindung"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"Keine Verbindung"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"WLAN: verbunden"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"WLAN: verbindet..."</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Mobile Daten: aktiv"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Mobile Daten: verbindet"</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"WLAN: verbunden"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"WLAN: verbindet..."</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Mobile Daten: aktiv"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Mobile Daten: verbindet"</string>
</resources>
diff --git a/packages/SystemUI/res/values-de/strings.xml b/packages/SystemUI/res/values-de/strings.xml
index 1674c22..1535e78 100644
--- a/packages/SystemUI/res/values-de/strings.xml
+++ b/packages/SystemUI/res/values-de/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Akkuverbrauch"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Zuletzt verwendet"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-el-xlarge/strings.xml b/packages/SystemUI/res/values-el-xlarge/strings.xml
index 63e59aa..c52d6daf 100644
--- a/packages/SystemUI/res/values-el-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-el-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"χωρίς σύνδ. σε Διαδ."</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"χωρίς σύνδ. σε Διαδ."</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: συνδέθηκε"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: σύνδεση..."</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Δεδ. κιν.: συνδέθηκε"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Δεδ.κιν.: σύνδεση..."</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: συνδέθηκε"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: σύνδεση..."</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Δεδ. κιν.: συνδέθηκε"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Δεδ.κιν.: σύνδεση..."</string>
</resources>
diff --git a/packages/SystemUI/res/values-el/strings.xml b/packages/SystemUI/res/values-el/strings.xml
index bb7fab1..369b16f 100644
--- a/packages/SystemUI/res/values-el/strings.xml
+++ b/packages/SystemUI/res/values-el/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Χρήση μπαταρίας"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Πρόσφατα"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-en-rGB/strings.xml b/packages/SystemUI/res/values-en-rGB/strings.xml
index 2939dba..db4f9ba 100644
--- a/packages/SystemUI/res/values-en-rGB/strings.xml
+++ b/packages/SystemUI/res/values-en-rGB/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Battery use"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Recent"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-es-rUS-xlarge/strings.xml b/packages/SystemUI/res/values-es-rUS-xlarge/strings.xml
index b4f8f27..6530edf 100644
--- a/packages/SystemUI/res/values-es-rUS-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"no hay conexión a Internet"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"no hay conexión a Internet"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: conectado"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: conectando…"</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Datos para cel: conectado"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Datos para cel: conectando"</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: conectado"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: conectando…"</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Datos para cel: conectado"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Datos para cel: conectando"</string>
</resources>
diff --git a/packages/SystemUI/res/values-es-rUS/strings.xml b/packages/SystemUI/res/values-es-rUS/strings.xml
index c18de7d..2312be7 100644
--- a/packages/SystemUI/res/values-es-rUS/strings.xml
+++ b/packages/SystemUI/res/values-es-rUS/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Uso de la batería"</string>
- <string name="system_panel_settings_button" msgid="7832600575390861653">"Configuración"</string>
+ <string name="status_bar_settings_settings_button" msgid="7832600575390861653">"Configuración"</string>
<string name="recent_tasks_title" msgid="3691764623638127888">"Reciente"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
<skip />
diff --git a/packages/SystemUI/res/values-es-xlarge/strings.xml b/packages/SystemUI/res/values-es-xlarge/strings.xml
index 2045aa8..adcda91 100644
--- a/packages/SystemUI/res/values-es-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-es-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"sin conexión"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"sin conexión"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"WiFi: conectado"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"WiFi: conectando..."</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Datos móviles: conectados"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Datos móviles: conectando..."</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"WiFi: conectado"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"WiFi: conectando..."</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Datos móviles: conectados"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Datos móviles: conectando..."</string>
</resources>
diff --git a/packages/SystemUI/res/values-es/strings.xml b/packages/SystemUI/res/values-es/strings.xml
index 84b7e32..64b60b4 100644
--- a/packages/SystemUI/res/values-es/strings.xml
+++ b/packages/SystemUI/res/values-es/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Uso de la batería"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Reciente"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-fa/strings.xml b/packages/SystemUI/res/values-fa/strings.xml
index cc1f215..8e2b348 100644
--- a/packages/SystemUI/res/values-fa/strings.xml
+++ b/packages/SystemUI/res/values-fa/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"استفاده از باتری"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"اخیر"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-fi/strings.xml b/packages/SystemUI/res/values-fi/strings.xml
index 59e3af3..8fcc7d6 100644
--- a/packages/SystemUI/res/values-fi/strings.xml
+++ b/packages/SystemUI/res/values-fi/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Akun käyttö"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Viimeisimmät"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-fr-xlarge/strings.xml b/packages/SystemUI/res/values-fr-xlarge/strings.xml
index 36c6f77..f8036ad 100644
--- a/packages/SystemUI/res/values-fr-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-fr-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"Internet indisponible"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"Internet indisponible"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi : connecté"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi : connexion..."</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Données mobiles connectées"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Connexion données mobiles..."</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi : connecté"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi : connexion..."</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Données mobiles connectées"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Connexion données mobiles..."</string>
</resources>
diff --git a/packages/SystemUI/res/values-fr/strings.xml b/packages/SystemUI/res/values-fr/strings.xml
index 914e98e..7df4d74 100644
--- a/packages/SystemUI/res/values-fr/strings.xml
+++ b/packages/SystemUI/res/values-fr/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Utilisation de la batterie"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Récentes"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-he/strings.xml b/packages/SystemUI/res/values-he/strings.xml
index 67b2c5f..0e3479b 100644
--- a/packages/SystemUI/res/values-he/strings.xml
+++ b/packages/SystemUI/res/values-he/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"צריכת סוללה"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"אחרונות"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-hr/strings.xml b/packages/SystemUI/res/values-hr/strings.xml
index 149a356..0fea021 100644
--- a/packages/SystemUI/res/values-hr/strings.xml
+++ b/packages/SystemUI/res/values-hr/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Iskorištenost baterije"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Nedavni"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-hu/strings.xml b/packages/SystemUI/res/values-hu/strings.xml
index 9eb50fa..788e96f4 100644
--- a/packages/SystemUI/res/values-hu/strings.xml
+++ b/packages/SystemUI/res/values-hu/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Akkumulátorhasználat"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Legutóbbiak"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-id/strings.xml b/packages/SystemUI/res/values-id/strings.xml
index 3bf805c..cde575f 100644
--- a/packages/SystemUI/res/values-id/strings.xml
+++ b/packages/SystemUI/res/values-id/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Penggunaan baterai"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Terbaru"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-it-xlarge/strings.xml b/packages/SystemUI/res/values-it-xlarge/strings.xml
index 512dfa4..3909bd5 100644
--- a/packages/SystemUI/res/values-it-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-it-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"no conness. Internet"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"no conness. Internet"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: connesso"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: connessione…"</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Dati cell.: connesso"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Dati cell.: connessione…"</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: connesso"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: connessione…"</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Dati cell.: connesso"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Dati cell.: connessione…"</string>
</resources>
diff --git a/packages/SystemUI/res/values-it/strings.xml b/packages/SystemUI/res/values-it/strings.xml
index 849be2e..ee91a16 100644
--- a/packages/SystemUI/res/values-it/strings.xml
+++ b/packages/SystemUI/res/values-it/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Utilizzo batteria"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Recenti"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-ja-xlarge/strings.xml b/packages/SystemUI/res/values-ja-xlarge/strings.xml
index 01dacb3..df512b7 100644
--- a/packages/SystemUI/res/values-ja-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-ja-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"インターネット接続なし"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"インターネット接続なし"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: 接続されました"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: 接続中..."</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"データ通信: 接続されました"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"データ通信: 接続中..."</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: 接続されました"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: 接続中..."</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"データ通信: 接続されました"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"データ通信: 接続中..."</string>
</resources>
diff --git a/packages/SystemUI/res/values-ja/strings.xml b/packages/SystemUI/res/values-ja/strings.xml
index f787541..817f656 100644
--- a/packages/SystemUI/res/values-ja/strings.xml
+++ b/packages/SystemUI/res/values-ja/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"電池使用量"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"新着"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-ko-xlarge/strings.xml b/packages/SystemUI/res/values-ko-xlarge/strings.xml
index a26940a..42f798c 100644
--- a/packages/SystemUI/res/values-ko-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-ko-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"인터넷에 연결되지 않음"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"인터넷에 연결되지 않음"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: 연결됨"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: 연결 중…"</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"모바일 데이터: 연결됨"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"모바일 데이터: 연결 중…"</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: 연결됨"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: 연결 중…"</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"모바일 데이터: 연결됨"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"모바일 데이터: 연결 중…"</string>
</resources>
diff --git a/packages/SystemUI/res/values-ko/strings.xml b/packages/SystemUI/res/values-ko/strings.xml
index ff82d99..be94258 100644
--- a/packages/SystemUI/res/values-ko/strings.xml
+++ b/packages/SystemUI/res/values-ko/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"배터리 사용량"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"최근 사용한 앱"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-lt/strings.xml b/packages/SystemUI/res/values-lt/strings.xml
index c87f312..ccfc800 100644
--- a/packages/SystemUI/res/values-lt/strings.xml
+++ b/packages/SystemUI/res/values-lt/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Akumuliatoriaus naudojimas"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Naujos"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-lv/strings.xml b/packages/SystemUI/res/values-lv/strings.xml
index ac0715e..dd6cdcf 100644
--- a/packages/SystemUI/res/values-lv/strings.xml
+++ b/packages/SystemUI/res/values-lv/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Akumulatora lietojums"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Nesens"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-nb-xlarge/strings.xml b/packages/SystemUI/res/values-nb-xlarge/strings.xml
index 9a95faf..b07d70c 100644
--- a/packages/SystemUI/res/values-nb-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-nb-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"ingen Int.-tilkobl."</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"ingen Int.-tilkobl."</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: tilkoblet"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: kobler til"</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Mob.data: tilkoblet"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Mob.data: kobler til"</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: tilkoblet"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: kobler til"</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Mob.data: tilkoblet"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Mob.data: kobler til"</string>
</resources>
diff --git a/packages/SystemUI/res/values-nb/strings.xml b/packages/SystemUI/res/values-nb/strings.xml
index aefd2ec..5da4f01 100644
--- a/packages/SystemUI/res/values-nb/strings.xml
+++ b/packages/SystemUI/res/values-nb/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Batteribruk"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Nylig"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-nl-xlarge/strings.xml b/packages/SystemUI/res/values-nl-xlarge/strings.xml
index 8ab6234..6298908 100644
--- a/packages/SystemUI/res/values-nl-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-nl-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"geen internet"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"geen internet"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: verbonden"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: verbinden…"</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Mobiel: verbonden"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Mobiel: verbinden..."</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: verbonden"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: verbinden…"</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Mobiel: verbonden"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Mobiel: verbinden..."</string>
</resources>
diff --git a/packages/SystemUI/res/values-nl/strings.xml b/packages/SystemUI/res/values-nl/strings.xml
index e7fd55b..3492652 100644
--- a/packages/SystemUI/res/values-nl/strings.xml
+++ b/packages/SystemUI/res/values-nl/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Accugebruik"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Recent"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-pl-xlarge/strings.xml b/packages/SystemUI/res/values-pl-xlarge/strings.xml
index a11754b..e2cefc6 100644
--- a/packages/SystemUI/res/values-pl-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-pl-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"brak połączenia internetowego"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"brak połączenia internetowego"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: połączono"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: łączenie…"</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Sieć komórkowa: połączono"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Sieć komórkowa: łączenie…"</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: połączono"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: łączenie…"</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Sieć komórkowa: połączono"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Sieć komórkowa: łączenie…"</string>
</resources>
diff --git a/packages/SystemUI/res/values-pl/strings.xml b/packages/SystemUI/res/values-pl/strings.xml
index 108ef13..f6a6d79 100644
--- a/packages/SystemUI/res/values-pl/strings.xml
+++ b/packages/SystemUI/res/values-pl/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Użycie baterii"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Najnowsze"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-pt-rPT-xlarge/strings.xml b/packages/SystemUI/res/values-pt-rPT-xlarge/strings.xml
index 9f20932..550c11c 100644
--- a/packages/SystemUI/res/values-pt-rPT-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"Sem ligação à internet"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"Sem ligação à internet"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: ligado"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: a ligar…"</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Dados móveis: ligado"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Dados móveis: a ligar..."</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: ligado"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: a ligar…"</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Dados móveis: ligado"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Dados móveis: a ligar..."</string>
</resources>
diff --git a/packages/SystemUI/res/values-pt-rPT/strings.xml b/packages/SystemUI/res/values-pt-rPT/strings.xml
index 1f38ed7..2c03a18 100644
--- a/packages/SystemUI/res/values-pt-rPT/strings.xml
+++ b/packages/SystemUI/res/values-pt-rPT/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Utilização da bateria"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Recente"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-pt-xlarge/strings.xml b/packages/SystemUI/res/values-pt-xlarge/strings.xml
index 481263f..9f2d033 100644
--- a/packages/SystemUI/res/values-pt-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-pt-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"Sem conex. à intern."</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"Sem conex. à intern."</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: conectado"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: conectando…"</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Dados móv: conectado"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Dados: conectando..."</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: conectado"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: conectando…"</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Dados móv: conectado"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Dados: conectando..."</string>
</resources>
diff --git a/packages/SystemUI/res/values-pt/strings.xml b/packages/SystemUI/res/values-pt/strings.xml
index 83bde68..a7a43a8 100644
--- a/packages/SystemUI/res/values-pt/strings.xml
+++ b/packages/SystemUI/res/values-pt/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Uso da bateria"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Recente"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-rm/strings.xml b/packages/SystemUI/res/values-rm/strings.xml
index 8a5014e..a8625a9 100644
--- a/packages/SystemUI/res/values-rm/strings.xml
+++ b/packages/SystemUI/res/values-rm/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Consum dad accu"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Utilisà sco ultim"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-ro/strings.xml b/packages/SystemUI/res/values-ro/strings.xml
index bdca5ea..7b4ad47 100644
--- a/packages/SystemUI/res/values-ro/strings.xml
+++ b/packages/SystemUI/res/values-ro/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Utilizarea bateriei"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Recente"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-ru-xlarge/strings.xml b/packages/SystemUI/res/values-ru-xlarge/strings.xml
index 7514d4b..68b2b9a 100644
--- a/packages/SystemUI/res/values-ru-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-ru-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"связь отсутствует"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"связь отсутствует"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: подключено"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: подключение..."</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Моб. данные: подключено"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Моб. данные: подключение..."</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: подключено"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: подключение..."</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Моб. данные: подключено"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Моб. данные: подключение..."</string>
</resources>
diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml
index f701fe3..d597315 100644
--- a/packages/SystemUI/res/values-ru/strings.xml
+++ b/packages/SystemUI/res/values-ru/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Расход заряда батареи"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Недавние"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-sk/strings.xml b/packages/SystemUI/res/values-sk/strings.xml
index 95b4c30..b4a3221 100644
--- a/packages/SystemUI/res/values-sk/strings.xml
+++ b/packages/SystemUI/res/values-sk/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Využitie batérie"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Najnovšie"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-sl/strings.xml b/packages/SystemUI/res/values-sl/strings.xml
index 94b599d..8783529 100644
--- a/packages/SystemUI/res/values-sl/strings.xml
+++ b/packages/SystemUI/res/values-sl/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Uporaba baterije"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Nedavno"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-sr/strings.xml b/packages/SystemUI/res/values-sr/strings.xml
index e1f07b5..a4d2bf0 100644
--- a/packages/SystemUI/res/values-sr/strings.xml
+++ b/packages/SystemUI/res/values-sr/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Коришћење батерије"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Недавно"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-sv-xlarge/strings.xml b/packages/SystemUI/res/values-sv-xlarge/strings.xml
index ccc30ec..c1147c7 100644
--- a/packages/SystemUI/res/values-sv-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-sv-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"ingen Internetanslutn."</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"ingen Internetanslutn."</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: ansluten"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: ansluter..."</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Mobildata: ansluten"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Mobildata: ansluter…"</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi: ansluten"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi: ansluter..."</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Mobildata: ansluten"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Mobildata: ansluter…"</string>
</resources>
diff --git a/packages/SystemUI/res/values-sv/strings.xml b/packages/SystemUI/res/values-sv/strings.xml
index 4f9cfd0..f2dc7f1 100644
--- a/packages/SystemUI/res/values-sv/strings.xml
+++ b/packages/SystemUI/res/values-sv/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Batteriförbrukning"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Senaste"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-th/strings.xml b/packages/SystemUI/res/values-th/strings.xml
index 00be23d..fb25fdf 100644
--- a/packages/SystemUI/res/values-th/strings.xml
+++ b/packages/SystemUI/res/values-th/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"การใช้แบตเตอรี่"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"เมื่อเร็วๆ นี้"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-tl/strings.xml b/packages/SystemUI/res/values-tl/strings.xml
index 240f181..900de9f 100644
--- a/packages/SystemUI/res/values-tl/strings.xml
+++ b/packages/SystemUI/res/values-tl/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Paggamit ng baterya"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Kamakailan"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-tr-xlarge/strings.xml b/packages/SystemUI/res/values-tr-xlarge/strings.xml
index 008006d..cc36b93 100644
--- a/packages/SystemUI/res/values-tr-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-tr-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"internet bağlantısı yok"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"internet bağlantısı yok"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Kablosuz: bağlı"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Kablosuz: bağlanıyor..."</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"Mobil veri: bağlı"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"Mob veri: bağlnyr..."</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Kablosuz: bağlı"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Kablosuz: bağlanıyor..."</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"Mobil veri: bağlı"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"Mob veri: bağlnyr..."</string>
</resources>
diff --git a/packages/SystemUI/res/values-tr/strings.xml b/packages/SystemUI/res/values-tr/strings.xml
index cef5539..31451e1 100644
--- a/packages/SystemUI/res/values-tr/strings.xml
+++ b/packages/SystemUI/res/values-tr/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Pil kullanımı"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"En Son Görevler"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-uk/strings.xml b/packages/SystemUI/res/values-uk/strings.xml
index cbc7881..e7b9f19 100644
--- a/packages/SystemUI/res/values-uk/strings.xml
+++ b/packages/SystemUI/res/values-uk/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Викор. батареї"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Останні"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-vi/strings.xml b/packages/SystemUI/res/values-vi/strings.xml
index 0a559da..fe11324 100644
--- a/packages/SystemUI/res/values-vi/strings.xml
+++ b/packages/SystemUI/res/values-vi/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"Sử dụng pin"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"Gần đây"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-xlarge/strings.xml b/packages/SystemUI/res/values-xlarge/strings.xml
index e305681..e3e5148 100644
--- a/packages/SystemUI/res/values-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-xlarge/strings.xml
@@ -25,14 +25,14 @@
<!-- Text to display underneath the graphical signal strength meter when
no connection is available. [CHAR LIMIT=20] -->
- <string name="system_panel_signal_meter_disconnected">
+ <string name="status_bar_settings_signal_meter_disconnected">
no internet connection
</string>
<!-- Text to display underneath the graphical signal strength meter when
it is displaying information about a connected, named Wi-Fi network.
[CHAR LIMIT=20] -->
- <string name="system_panel_signal_meter_wifi_ssid_format">
+ <string name="status_bar_settings_signal_meter_wifi_ssid_format">
<xliff:g id="ssid">%s</xliff:g>
</string>
@@ -40,14 +40,14 @@
it is displaying Wi-Fi status and Wi-Fi is connected to a network
whose SSID is not available.
[CHAR LIMIT=20] -->
- <string name="system_panel_signal_meter_wifi_nossid">
+ <string name="status_bar_settings_signal_meter_wifi_nossid">
Wi-Fi: connected
</string>
<!-- Text to display underneath the graphical signal strength meter when
it is displaying Wi-Fi status and Wi-Fi is in the process of
connecting to a network. [CHAR LIMIT=20] -->
- <string name="system_panel_signal_meter_wifi_connecting">
+ <string name="status_bar_settings_signal_meter_wifi_connecting">
Wi-Fi: connecting…
</string>
@@ -55,7 +55,7 @@
it is displaying mobile data (3G) status and a network connection is
available.
[CHAR LIMIT=20] -->
- <string name="system_panel_signal_meter_data_connected">
+ <string name="status_bar_settings_signal_meter_data_connected">
Mobile data: connected
</string>
@@ -63,7 +63,7 @@
it is displaying mobile data (3G) status and a network connection is
unavailable.
[CHAR LIMIT=20] -->
- <string name="system_panel_signal_meter_data_connecting">
+ <string name="status_bar_settings_signal_meter_data_connecting">
Mobile data: connecting…
</string>
</resources>
diff --git a/packages/SystemUI/res/values-xlarge/styles.xml b/packages/SystemUI/res/values-xlarge/styles.xml
new file mode 100644
index 0000000..fb10a24
--- /dev/null
+++ b/packages/SystemUI/res/values-xlarge/styles.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<resources xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <style name="StatusBarNotificationText">
+ <item name="android:textSize">16sp</item>
+ <item name="android:textColor">#ff999999</item>
+ </style>
+
+ <style name="StatusBarPanelSettingsRow">
+ <item name="android:layout_height">64dp</item>
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:orientation">horizontal</item>
+ </style>
+
+ <style name="StatusBarPanelSettingsIcon">
+ <item name="android:layout_height">match_parent</item>
+ <item name="android:layout_width">64dp</item>
+ <item name="android:scaleType">center</item>
+ </style>
+
+ <style name="StatusBarPanelSettingsContents">
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:layout_width">0dp</item>
+ <item name="android:layout_weight">1</item>
+ <item name="android:layout_gravity">left|center_vertical</item>
+ <item name="android:textColor">?android:attr/textColorPrimary</item>
+ </style>
+
+ <style name="StatusBarPanelSettingsPanelSeparator">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">1dp</item>
+ <item name="android:background">@android:drawable/divider_horizontal_dark</item>
+ </style>
+
+</resources>
diff --git a/packages/SystemUI/res/values-zh-rCN-xlarge/strings.xml b/packages/SystemUI/res/values-zh-rCN-xlarge/strings.xml
index 68b0fac..072bcb0 100644
--- a/packages/SystemUI/res/values-zh-rCN-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"无互联网连接"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"无互联网连接"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi:已连接"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi:正在连接..."</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"移动数据:已连接"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"移动数据:正在连接..."</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-Fi:已连接"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi:正在连接..."</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"移动数据:已连接"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"移动数据:正在连接..."</string>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rCN/strings.xml b/packages/SystemUI/res/values-zh-rCN/strings.xml
index 9ed98c9..48218c0 100644
--- a/packages/SystemUI/res/values-zh-rCN/strings.xml
+++ b/packages/SystemUI/res/values-zh-rCN/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"电量使用情况"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"近期任务"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values-zh-rTW-xlarge/strings.xml b/packages/SystemUI/res/values-zh-rTW-xlarge/strings.xml
index bc41d11..0d06aad 100644
--- a/packages/SystemUI/res/values-zh-rTW-xlarge/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW-xlarge/strings.xml
@@ -21,11 +21,11 @@
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- no translation found for status_bar_clear_all_button (4722520806446512408) -->
<skip />
- <string name="system_panel_signal_meter_disconnected" msgid="2123001074951934237">"沒有網際網路連線"</string>
- <!-- no translation found for system_panel_signal_meter_wifi_ssid_format (6261810256542749384) -->
+ <string name="status_bar_settings_signal_meter_disconnected" msgid="2123001074951934237">"沒有網際網路連線"</string>
+ <!-- no translation found for status_bar_settings_signal_meter_wifi_ssid_format (6261810256542749384) -->
<skip />
- <string name="system_panel_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-F:已連線"</string>
- <string name="system_panel_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi:連線中..."</string>
- <string name="system_panel_signal_meter_data_connected" msgid="2171100321540926054">"行動數據:已連線"</string>
- <string name="system_panel_signal_meter_data_connecting" msgid="7183001278053801143">"行動數據:連線中..."</string>
+ <string name="status_bar_settings_signal_meter_wifi_nossid" msgid="160846667119240422">"Wi-F:已連線"</string>
+ <string name="status_bar_settings_signal_meter_wifi_connecting" msgid="4087640898624652649">"Wi-Fi:連線中..."</string>
+ <string name="status_bar_settings_signal_meter_data_connected" msgid="2171100321540926054">"行動數據:已連線"</string>
+ <string name="status_bar_settings_signal_meter_data_connecting" msgid="7183001278053801143">"行動數據:連線中..."</string>
</resources>
diff --git a/packages/SystemUI/res/values-zh-rTW/strings.xml b/packages/SystemUI/res/values-zh-rTW/strings.xml
index 4dc323b..10c08d0 100644
--- a/packages/SystemUI/res/values-zh-rTW/strings.xml
+++ b/packages/SystemUI/res/values-zh-rTW/strings.xml
@@ -35,7 +35,7 @@
<!-- no translation found for invalid_charger (4549105996740522523) -->
<skip />
<string name="battery_low_why" msgid="7279169609518386372">"電池使用狀況"</string>
- <!-- no translation found for system_panel_settings_button (7832600575390861653) -->
+ <!-- no translation found for status_bar_settings_settings_button (7832600575390861653) -->
<skip />
<string name="recent_tasks_title" msgid="3691764623638127888">"最新的"</string>
<!-- no translation found for recent_tasks_empty (1905484479067697884) -->
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index e8c3c91..ed31a34 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -72,10 +72,19 @@
<string name="battery_low_why">Battery use</string>
<!-- Name of the button that links to the Settings app. [CHAR LIMIT=NONE] -->
- <string name="system_panel_settings_button">Settings</string>
+ <string name="status_bar_settings_settings_button">Settings</string>
+
+ <!-- Label in the system panel for airplane mode (all radios are turned off)[CHAR LIMIT=30] -->
+ <string name="status_bar_settings_airplane">Airplane mode</string>
+
+ <!-- Label in system panel saying the device will use the orientation sensor to rotate [CHAR LIMIT=30] -->
+ <string name="status_bar_settings_rotation_lock">Lock screen orientation</string>
+
+ <!-- Label in system panel saying the device will show notifications [CHAR LIMIT=30] -->
+ <string name="status_bar_settings_notifications">Notifications</string>
<!-- Text to display next to the graphical battery meter. [CHAR LIMIT=3] -->
- <string name="system_panel_battery_meter_format" translatable="false">
+ <string name="status_bar_settings_battery_meter_format" translatable="false">
<xliff:g id="number">%d</xliff:g><xliff:g id="percent">%%</xliff:g>
</string>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
index ed2ed1c..37939df 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
@@ -82,7 +82,7 @@
public void animateCollapse();
public void setLightsOn(boolean on);
public void setMenuKeyVisible(boolean visible);
- public void setIMEButtonVisible(boolean visible);
+ public void setIMEButtonVisible(IBinder token, boolean visible);
}
public CommandQueue(Callbacks callbacks, StatusBarIconList list) {
@@ -165,10 +165,10 @@
}
}
- public void setIMEButtonVisible(boolean visible) {
+ public void setIMEButtonVisible(IBinder token, boolean visible) {
synchronized (mList) {
mHandler.removeMessages(MSG_SHOW_IME_BUTTON);
- mHandler.obtainMessage(MSG_SHOW_IME_BUTTON, visible ? 1 : 0, 0, null).sendToTarget();
+ mHandler.obtainMessage(MSG_SHOW_IME_BUTTON, visible ? 1 : 0, 0, token).sendToTarget();
}
}
@@ -233,7 +233,7 @@
mCallbacks.setMenuKeyVisible(msg.arg1 != 0);
break;
case MSG_SHOW_IME_BUTTON:
- mCallbacks.setIMEButtonVisible(msg.arg1 != 0);
+ mCallbacks.setIMEButtonVisible((IBinder)msg.obj, msg.arg1 != 0);
break;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java
index 731f6cd..d7f3730 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java
@@ -65,9 +65,10 @@
mBarService = IStatusBarService.Stub.asInterface(
ServiceManager.getService(Context.STATUS_BAR_SERVICE));
int[] switches = new int[4];
+ ArrayList<IBinder> binders = new ArrayList<IBinder>();
try {
mBarService.registerStatusBar(mCommandQueue, iconList, notificationKeys, notifications,
- switches);
+ switches, binders);
} catch (RemoteException ex) {
// If the system process isn't there we're doomed anyway.
}
@@ -75,7 +76,8 @@
disable(switches[0]);
setLightsOn(switches[1] != 0);
setMenuKeyVisible(switches[2] != 0);
- setIMEButtonVisible(switches[3] != 0);
+ // StatusBarManagerService has a back up of IME token and it's restored here.
+ setIMEButtonVisible(binders.get(0), switches[3] != 0);
// Set up the initial icon state
int N = iconList.size();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 915fa2f..0d6c5f6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -505,7 +505,7 @@
// create the row view
LayoutInflater inflater = (LayoutInflater)mContext.getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
- View row = inflater.inflate(R.layout.status_bar_latest_event, parent, false);
+ View row = inflater.inflate(R.layout.status_bar_notification_row, parent, false);
// bind the click event to the content area
ViewGroup content = (ViewGroup)row.findViewById(R.id.content);
@@ -1016,7 +1016,7 @@
// Not supported
public void setMenuKeyVisible(boolean visible) { }
- public void setIMEButtonVisible(boolean visible) { }
+ public void setIMEButtonVisible(IBinder token, boolean visible) { }
private class Launcher implements View.OnClickListener {
private PendingIntent mIntent;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AirplaneModeController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AirplaneModeController.java
new file mode 100644
index 0000000..da60f0d
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AirplaneModeController.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.policy;
+
+import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.provider.Settings;
+import android.util.Slog;
+import android.widget.CompoundButton;
+
+public class AirplaneModeController extends BroadcastReceiver
+ implements CompoundButton.OnCheckedChangeListener {
+ private static final String TAG = "StatusBar.AirplaneModeController";
+
+ private Context mContext;
+ private CompoundButton mCheckBox;
+
+ private boolean mAirplaneMode;
+
+ public AirplaneModeController(Context context, CompoundButton checkbox) {
+ mContext = context;
+ mAirplaneMode = getAirplaneMode();
+ mCheckBox = checkbox;
+ checkbox.setChecked(mAirplaneMode);
+ checkbox.setOnCheckedChangeListener(this);
+
+ IntentFilter filter = new IntentFilter();
+ filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED);
+ context.registerReceiver(this, filter);
+
+ }
+
+ public void release() {
+ mContext.unregisterReceiver(this);
+ }
+
+ public void onCheckedChanged(CompoundButton view, boolean checked) {
+ Slog.d(TAG, "onCheckedChanged checked=" + checked + " mAirplaneMode=" + mAirplaneMode);
+ if (checked != mAirplaneMode) {
+ mAirplaneMode = checked;
+ unsafe(checked);
+ }
+ }
+
+ public void onReceive(Context context, Intent intent) {
+ if (Intent.ACTION_AIRPLANE_MODE_CHANGED.equals(intent.getAction())) {
+ final boolean enabled = intent.getBooleanExtra("state", false);
+ if (enabled != mAirplaneMode) {
+ mAirplaneMode = enabled;
+ mCheckBox.setChecked(enabled);
+ }
+ }
+ }
+
+ private boolean getAirplaneMode() {
+ ContentResolver cr = mContext.getContentResolver();
+ return 0 != Settings.System.getInt(cr, Settings.System.AIRPLANE_MODE_ON, 0);
+ }
+
+ // TODO: Fix this racy API by adding something better to TelephonyManager or
+ // ConnectivityService.
+ private void unsafe(boolean enabled) {
+ Settings.System.putInt(
+ mContext.getContentResolver(),
+ Settings.System.AIRPLANE_MODE_ON,
+ enabled ? 1 : 0);
+ Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
+ intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
+ intent.putExtra("state", enabled);
+ mContext.sendBroadcast(intent);
+ }
+}
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AutoRotateController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AutoRotateController.java
new file mode 100644
index 0000000..866e5fc
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AutoRotateController.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.policy;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.provider.Settings;
+import android.util.Slog;
+import android.view.IWindowManager;
+import android.widget.CompoundButton;
+
+/**
+ * TODO: Listen for changes to the setting.
+ */
+public class AutoRotateController implements CompoundButton.OnCheckedChangeListener {
+ private static final String TAG = "StatusBar.AutoRotateController";
+
+ private Context mContext;
+ private CompoundButton mCheckBox;
+
+ private boolean mLockRotation;
+
+ public AutoRotateController(Context context, CompoundButton checkbox) {
+ mContext = context;
+ mLockRotation = getLockRotation();
+ mCheckBox = checkbox;
+ checkbox.setChecked(mLockRotation);
+ checkbox.setOnCheckedChangeListener(this);
+ }
+
+ public void onCheckedChanged(CompoundButton view, boolean checked) {
+ Slog.d(TAG, "onCheckedChanged checked=" + checked + " mLockRotation=" + mLockRotation);
+ if (checked != mLockRotation) {
+ setLockRotation(checked);
+ }
+ }
+
+ private boolean getLockRotation() {
+ ContentResolver cr = mContext.getContentResolver();
+ return 0 == Settings.System.getInt(cr, Settings.System.ACCELEROMETER_ROTATION, 0);
+ }
+
+ private void setLockRotation(boolean locked) {
+ mLockRotation = locked;
+ try {
+ IWindowManager wm = IWindowManager.Stub.asInterface(ServiceManager.getService(
+ Context.WINDOW_SERVICE));
+ ContentResolver cr = mContext.getContentResolver();
+ if (locked) {
+ wm.freezeRotation();
+ } else {
+ wm.thawRotation();
+ }
+ } catch (RemoteException exc) {
+ }
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
index a1efdd4..ae2b6b2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java
@@ -67,7 +67,7 @@
for (int i=0; i<N; i++) {
//final boolean plugged = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0) != 0;
TextView v = mLabelViews.get(i);
- v.setText(mContext.getString(R.string.system_panel_battery_meter_format, level));
+ v.setText(mContext.getString(R.string.status_bar_settings_battery_meter_format, level));
}
}
}
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 18003dd..ec23a3d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -616,18 +616,18 @@
if (mWifiConnected) {
if (mWifiSsid == null) {
- label = context.getString(R.string.system_panel_signal_meter_wifi_nossid);
+ label = context.getString(R.string.status_bar_settings_signal_meter_wifi_nossid);
} else {
- label = context.getString(R.string.system_panel_signal_meter_wifi_ssid_format,
+ label = context.getString(R.string.status_bar_settings_signal_meter_wifi_ssid_format,
mWifiSsid);
}
combinedSignalIconId = mWifiIconId;
dataTypeIconId = 0;
} else {
if (mDataConnected) {
- label = context.getString(R.string.system_panel_signal_meter_data_connected);
+ label = context.getString(R.string.status_bar_settings_signal_meter_data_connected);
} else {
- label = context.getString(R.string.system_panel_signal_meter_disconnected);
+ label = context.getString(R.string.status_bar_settings_signal_meter_disconnected);
}
combinedSignalIconId = mDataSignalIconId;
dataTypeIconId = mDataTypeIconId;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java
index a025d63..7e03e2a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/InputMethodButton.java
@@ -20,6 +20,7 @@
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import android.os.Handler;
+import android.os.IBinder;
import android.provider.Settings;
import android.util.Log;
import android.util.Slog;
@@ -33,24 +34,39 @@
import com.android.server.InputMethodManagerService;
import com.android.systemui.R;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
public class InputMethodButton extends ImageView {
private static final String TAG = "StatusBar/InputMethodButton";
private static final boolean DEBUG = false;
- private boolean mKeyboardShown;
- private ImageView mIcon;
+ private static final int ID_IME_SWITCH_BUTTON = R.id.imeSwitchButton;
+ private static final int ID_IME_SHORTCUT_BUTTON = R.id.imeShortcutButton;
+
// other services we wish to talk to
- private InputMethodManager mImm;
+ private final InputMethodManager mImm;
+ private final int mId;
+ // Cache of InputMethodsInfo
+ private final HashMap<String, InputMethodInfo> mInputMethodsInfo =
+ new HashMap<String, InputMethodInfo>();
+ private ImageView mIcon;
+ private IBinder mToken;
+ private boolean mKeyboardShown;
+ private InputMethodInfo mShortcutInfo;
+ private InputMethodSubtype mShortcutSubtype;
public InputMethodButton(Context context, AttributeSet attrs) {
super(context, attrs);
mKeyboardShown = false;
+ // Resource Id of the input method button. This id is defined in status_bar.xml
+ mId = getId();
// IME hookup
- mImm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+ mImm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
// TODO: read the current icon & visibility state directly from the service
// TODO: register for notifications about changes to visibility & subtype from service
@@ -58,14 +74,24 @@
setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- mImm.showInputMethodSubtypePicker();
+ switch (mId) {
+ case ID_IME_SWITCH_BUTTON:
+ mImm.showInputMethodPicker();
+ break;
+ case ID_IME_SHORTCUT_BUTTON:
+ if (mToken != null && mShortcutInfo != null) {
+ mImm.setInputMethodAndSubtype(
+ mToken, mShortcutInfo.getId(), mShortcutSubtype);
+ }
+ break;
+ }
}
});
}
@Override
protected void onAttachedToWindow() {
- mIcon = (ImageView) findViewById(R.id.imeButton);
+ mIcon = (ImageView) findViewById(mId);
refreshStatusIcon(mKeyboardShown);
}
@@ -73,25 +99,44 @@
private InputMethodInfo getCurrentInputMethodInfo() {
String curInputMethodId = Settings.Secure.getString(getContext()
.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD);
- List<InputMethodInfo> imis = mImm.getEnabledInputMethodList();
- if (curInputMethodId != null) {
- for (InputMethodInfo imi: imis) {
- if (imi.getId().equals(curInputMethodId)) {
- return imi;
- }
+ if (!mInputMethodsInfo.containsKey(curInputMethodId)) {
+ mInputMethodsInfo.clear();
+ List<InputMethodInfo> imis = mImm.getInputMethodList();
+ for (int i = 0; i < imis.size(); ++i) {
+ InputMethodInfo imi = imis.get(i);
+ mInputMethodsInfo.put(imi.getId(), imi);
+ }
+ }
+ return mInputMethodsInfo.get(curInputMethodId);
+ }
+
+ // TODO: Need to show an appropriate drawable for this shortcut button,
+ // if there are two or more shortcut input methods contained in this button.
+ // And need to add other methods to handle multiple shortcuts as appropriate.
+ private Drawable getShortcutInputMethodAndSubtypeDrawable() {
+ Map<InputMethodInfo, List<InputMethodSubtype>> shortcuts =
+ mImm.getShortcutInputMethodsAndSubtypes();
+ if (shortcuts.size() > 0) {
+ for (InputMethodInfo imi: shortcuts.keySet()) {
+ List<InputMethodSubtype> subtypes = shortcuts.get(imi);
+ // TODO: Returns the first found IMI for now. Should handle all shortcuts as
+ // appropriate.
+ mShortcutInfo = imi;
+ // TODO: Pick up the first found subtype for now. Should handle all subtypes
+ // as appropriate.
+ mShortcutSubtype = subtypes.size() > 0 ? subtypes.get(0) : null;
+ return getSubtypeIcon(mShortcutInfo, mShortcutSubtype);
}
}
return null;
}
- private Drawable getCurrentSubtypeIcon() {
+ private Drawable getSubtypeIcon(InputMethodInfo imi, InputMethodSubtype subtype) {
final PackageManager pm = getContext().getPackageManager();
- InputMethodInfo imi = getCurrentInputMethodInfo();
- InputMethodSubtype subtype = mImm.getCurrentInputMethodSubtype();
- Drawable icon = null;
if (imi != null) {
if (DEBUG) {
- Log.d(TAG, "--- Update icons of IME: " + imi.getPackageName() + "," + subtype);
+ Log.d(TAG, "Update icons of IME: " + imi.getPackageName() + ","
+ + subtype.getLocale() + "," + subtype.getMode());
}
if (subtype != null) {
return pm.getDrawable(imi.getPackageName(), subtype.getIconResId(),
@@ -104,7 +149,7 @@
try {
return pm.getApplicationInfo(imi.getPackageName(), 0).loadIcon(pm);
} catch (PackageManager.NameNotFoundException e) {
- Log.w(TAG, "Current IME cann't be found: " + imi.getPackageName());
+ Log.w(TAG, "IME can't be found: " + imi.getPackageName());
}
}
}
@@ -118,7 +163,18 @@
} else {
setVisibility(View.VISIBLE);
}
- Drawable icon = getCurrentSubtypeIcon();
+ Drawable icon = null;
+ switch (mId) {
+ case ID_IME_SWITCH_BUTTON:
+ // TODO: Just showing the first shortcut IME subtype for now. Should handle all
+ // shortcuts as appropriate.
+ icon = getSubtypeIcon(getCurrentInputMethodInfo(),
+ mImm.getCurrentInputMethodSubtype());
+ break;
+ case ID_IME_SHORTCUT_BUTTON:
+ icon = getShortcutInputMethodAndSubtypeDrawable();
+ break;
+ }
if (icon == null) {
mIcon.setImageResource(R.drawable.ic_sysbar_ime_default);
} else {
@@ -126,7 +182,8 @@
}
}
- public void setIMEButtonVisible(boolean visible) {
+ public void setIMEButtonVisible(IBinder token, boolean visible) {
+ mToken = token;
mKeyboardShown = visible;
refreshStatusIcon(mKeyboardShown);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
index 5f49d8c..baf4a0f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
@@ -37,7 +37,7 @@
View mNotificationButton;
View mNotificationScroller;
FrameLayout mContentFrame;
- View mSettingsPanel;
+ View mSettingsView;
public NotificationPanel(Context context, AttributeSet attrs) {
this(context, attrs, 0);
@@ -68,6 +68,7 @@
// when we hide, put back the notifications
if (!isShown()) {
switchToNotificationMode();
+ mNotificationScroller.scrollTo(0, 0);
}
}
@@ -103,15 +104,15 @@
}
public void switchToSettingsMode() {
- removeSettingsPanel();
- addSettingsPanel();
+ removeSettingsView();
+ addSettingsView();
mSettingsButton.setVisibility(View.INVISIBLE);
mNotificationScroller.setVisibility(View.GONE);
mNotificationButton.setVisibility(View.VISIBLE);
}
public void switchToNotificationMode() {
- removeSettingsPanel();
+ removeSettingsView();
mSettingsButton.setVisibility(View.VISIBLE);
mNotificationScroller.setVisibility(View.VISIBLE);
mNotificationButton.setVisibility(View.INVISIBLE);
@@ -125,17 +126,17 @@
return x >= l && x < r && y >= t && y < b;
}
- void removeSettingsPanel() {
- if (mSettingsPanel != null) {
- mContentFrame.removeView(mSettingsPanel);
- mSettingsPanel = null;
+ void removeSettingsView() {
+ if (mSettingsView != null) {
+ mContentFrame.removeView(mSettingsView);
+ mSettingsView = null;
}
}
- void addSettingsPanel() {
+ void addSettingsView() {
LayoutInflater infl = LayoutInflater.from(getContext());
- mSettingsPanel = infl.inflate(R.layout.sysbar_panel_settings, mContentFrame, false);
- mContentFrame.addView(mSettingsPanel);
+ mSettingsView = infl.inflate(R.layout.status_bar_settings_view, mContentFrame, false);
+ mContentFrame.addView(mSettingsView);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java
index 0c31304..546750b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java
@@ -224,7 +224,7 @@
final int last = Math.min(mActivityDescriptions.size(), DISPLAY_TASKS) - 1;
for (int i = last; i >= first; i--) {
ActivityDescription activityDescription = mActivityDescriptions.get(i);
- View view = View.inflate(mContext, R.layout.sysbar_panel_recent_item, null);
+ View view = View.inflate(mContext, R.layout.status_bar_recent_item, null);
ImageView appThumbnail = (ImageView) view.findViewById(R.id.app_thumbnail);
ImageView appIcon = (ImageView) view.findViewById(R.id.app_icon);
TextView appDescription = (TextView) view.findViewById(R.id.app_label);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsPanel.java
deleted file mode 100644
index 9013f5c..0000000
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsPanel.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.statusbar.tablet;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.util.Slog;
-import android.widget.LinearLayout;
-import android.view.View;
-
-import com.android.systemui.R;
-
-public class SettingsPanel extends LinearLayout {
- static final String TAG = "SettingsPanel";
-
- public SettingsPanel(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public SettingsPanel(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
- }
-}
-
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsView.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsView.java
new file mode 100644
index 0000000..f9ba908
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SettingsView.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.tablet;
+
+import android.app.StatusBarManager;
+import android.content.Context;
+import android.content.Intent;
+import android.provider.Settings;
+import android.util.AttributeSet;
+import android.util.Slog;
+import android.widget.LinearLayout;
+import android.view.View;
+import android.widget.CompoundButton;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.android.systemui.R;
+import com.android.systemui.statusbar.policy.AirplaneModeController;
+import com.android.systemui.statusbar.policy.AutoRotateController;
+
+public class SettingsView extends LinearLayout implements View.OnClickListener {
+ static final String TAG = "SettingsView";
+
+ AirplaneModeController mAirplane;
+ AutoRotateController mRotate;
+
+ public SettingsView(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public SettingsView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ }
+
+ @Override
+ protected void onFinishInflate() {
+ super.onFinishInflate();
+
+ final Context context = getContext();
+
+ mAirplane = new AirplaneModeController(context,
+ (CompoundButton)findViewById(R.id.airplane_checkbox));
+ findViewById(R.id.network).setOnClickListener(this);
+ mRotate = new AutoRotateController(context,
+ (CompoundButton)findViewById(R.id.rotate_checkbox));
+ findViewById(R.id.settings).setOnClickListener(this);
+ }
+
+ @Override
+ protected void onDetachedFromWindow() {
+ super.onDetachedFromWindow();
+ mAirplane.release();
+ }
+
+ public void onClick(View v) {
+ switch (v.getId()) {
+ case R.id.network:
+ onClickNetwork();
+ break;
+ case R.id.settings:
+ onClickSettings();
+ break;
+ }
+ }
+
+ private StatusBarManager getStatusBarManager() {
+ return (StatusBarManager)getContext().getSystemService(Context.STATUS_BAR_SERVICE);
+ }
+
+ // Network
+ // ----------------------------
+ private void onClickNetwork() {
+ Slog.d(TAG, "onClickNetwork");
+ }
+
+ // Settings
+ // ----------------------------
+ private void onClickSettings() {
+ Slog.d(TAG, "onClickSettings");
+ getContext().startActivity(new Intent(Settings.ACTION_SETTINGS)
+ .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
+ getStatusBarManager().collapse();
+ }
+}
+
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/ShirtPocket.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/ShirtPocket.java
index 0cb9249..d1e61a9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/ShirtPocket.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/ShirtPocket.java
@@ -184,7 +184,7 @@
};
private void setupWindow() {
- mWindow = View.inflate(getContext(), R.layout.sysbar_panel_pocket, null);
+ mWindow = View.inflate(getContext(), R.layout.status_bar_pocket_panel, null);
mPreviewIcon = (ImageView) mWindow.findViewById(R.id.icon);
mDescription = (TextView) mWindow.findViewById(R.id.description);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SystemPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SystemPanel.java
deleted file mode 100644
index 41b44c2..0000000
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/SystemPanel.java
+++ /dev/null
@@ -1,403 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.statusbar.tablet;
-
-import android.bluetooth.BluetoothAdapter;
-import android.content.BroadcastReceiver;
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.IntentFilter;
-import android.location.LocationManager;
-import android.media.AudioManager;
-import android.telephony.PhoneStateListener;
-import android.telephony.ServiceState;
-import android.os.IPowerManager;
-import android.os.RemoteException;
-import android.os.ServiceManager;
-import android.provider.Settings;
-import android.util.AttributeSet;
-import android.util.Slog;
-import android.view.View;
-import android.view.IWindowManager;
-import android.view.WindowManager;
-import android.view.WindowManagerImpl;
-import android.widget.ImageButton;
-import android.widget.LinearLayout;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import com.android.internal.telephony.IccCard;
-import com.android.internal.telephony.TelephonyIntents;
-import com.android.internal.telephony.cdma.EriInfo;
-import com.android.internal.telephony.cdma.TtyIntent;
-
-import com.android.server.WindowManagerService;
-
-import com.android.systemui.statusbar.*;
-import com.android.systemui.R;
-
-public class SystemPanel extends LinearLayout implements StatusBarPanel {
- private static final String TAG = "SystemPanel";
- private static final boolean DEBUG = TabletStatusBar.DEBUG;
-
- private static final int MINIMUM_BACKLIGHT = android.os.Power.BRIGHTNESS_DIM + 5;
- private static final int MAXIMUM_BACKLIGHT = android.os.Power.BRIGHTNESS_ON;
- private static final int DEFAULT_BACKLIGHT = (int) (android.os.Power.BRIGHTNESS_ON * 0.4f);
-
- private TabletStatusBar mBar;
- private boolean mAirplaneMode;
-
- private ImageButton mBrightnessButton;
- private ImageButton mSoundButton;
- private ImageButton mOrientationButton;
- private ImageButton mAirplaneButton;
- private ImageButton mGpsButton;
- private ImageButton mBluetoothButton;
-
- private final IWindowManager mWM;
-
- private final AudioManager mAudioManager;
- private final BluetoothAdapter mBluetoothAdapter;
-
- public boolean isInContentArea(int x, int y) {
- final int l = getPaddingLeft();
- final int r = getWidth() - getPaddingRight();
- final int t = getPaddingTop();
- final int b = getHeight() - getPaddingBottom();
- return x >= l && x < r && y >= t && y < b;
- }
-
- private BroadcastReceiver mReceiver = new BroadcastReceiver() {
- @Override
- public void onReceive(Context context, Intent intent) {
- final String action = intent.getAction();
- if (action.equals(AudioManager.RINGER_MODE_CHANGED_ACTION)) {
- refreshSound();
- } else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
- refreshBluetooth();
- }
- }
- };
-
- public void setBar(TabletStatusBar bar) {
- mBar = bar;
- }
-
- public SystemPanel(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public SystemPanel(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
-
- // our mighty overlord
- mWM = IWindowManager.Stub.asInterface(
- ServiceManager.getService("window"));
-
- // audio status
- mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
-
- // Bluetooth
- mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
- }
-
- public void onAttachedToWindow() {
- TextView settingsButton = (TextView)findViewById(R.id.settings_button);
- settingsButton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- getContext().startActivity(new Intent(android.provider.Settings.ACTION_SETTINGS)
- .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
- mBar.animateCollapse();
- }});
-
- mBrightnessButton = (ImageButton)findViewById(R.id.brightness);
- mBrightnessButton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- rotateBrightness();
- }
- });
-
- mSoundButton = (ImageButton)findViewById(R.id.sound);
- mSoundButton.setAlpha(getSilentMode() ? 0x7F : 0xFF);
- mSoundButton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- setSilentMode(!getSilentMode());
- mSoundButton.setAlpha(getSilentMode() ? 0x7F : 0xFF);
- }
- });
- mOrientationButton = (ImageButton)findViewById(R.id.orientation);
- mOrientationButton.setImageResource(
- getAutoRotate()
- ? R.drawable.ic_sysbar_rotate_on
- : R.drawable.ic_sysbar_rotate_off);
- mOrientationButton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- setAutoRotate(!getAutoRotate());
- mOrientationButton.setImageResource(
- getAutoRotate()
- ? R.drawable.ic_sysbar_rotate_on
- : R.drawable.ic_sysbar_rotate_off);
- Toast.makeText(getContext(),
- getAutoRotate()
- ? R.string.toast_rotation_free
- : R.string.toast_rotation_locked,
- Toast.LENGTH_SHORT).show();
- }
- });
-
- mAirplaneButton = (ImageButton)findViewById(R.id.airplane);
- mAirplaneButton.setAlpha(mAirplaneMode ? 0xFF : 0x7F);
- mAirplaneButton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- boolean newMode = !getAirplaneMode();
- Toast.makeText(getContext(), "Attempting to turn "
- + (newMode ? "on" : "off") + " airplane mode (flaky).",
- Toast.LENGTH_SHORT).show();
- setAirplaneMode(newMode);
- }
- });
-
- mGpsButton = (ImageButton)findViewById(R.id.gps);
- mGpsButton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- toggleGps();
- refreshGps();
- }
- });
-
- mBluetoothButton = (ImageButton)findViewById(R.id.bluetooth);
- mBluetoothButton.setOnClickListener(new View.OnClickListener() {
- public void onClick(View v) {
- toggleBluetooth();
- refreshBluetooth();
- }
- });
-
- // register for broadcasts
- IntentFilter filter = new IntentFilter();
- filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
- filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
- getContext().registerReceiver(mReceiver, filter);
-
- refreshBluetooth();
- refreshGps();
- }
-
- public void onDetachedFromWindow() {
- getContext().unregisterReceiver(mReceiver);
- }
-
- // ----------------------------------------------------------------------
-
-// private boolean isAutoBrightness() {
-// Context context = getContext();
-// try {
-// IPowerManager power = IPowerManager.Stub.asInterface(
-// ServiceManager.getService("power"));
-// if (power != null) {
-// int brightnessMode = Settings.System.getInt(context.getContentResolver(),
-// Settings.System.SCREEN_BRIGHTNESS_MODE);
-// return brightnessMode == Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC;
-// }
-// } catch (RemoteException e) {
-// } catch (Settings.SettingNotFoundException e) {
-// }
-// return false;
-// }
-
- private void rotateBrightness() {
- int icon = R.drawable.ic_sysbar_brightness;
- int bg = R.drawable.sysbar_toggle_bg_on;
- Context context = getContext();
- try {
- IPowerManager power = IPowerManager.Stub.asInterface(
- ServiceManager.getService("power"));
- if (power != null) {
- ContentResolver cr = context.getContentResolver();
- int brightness = Settings.System.getInt(cr,
- Settings.System.SCREEN_BRIGHTNESS);
- int brightnessMode = Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL;
- //Only get brightness setting if available
- if (context.getResources().getBoolean(
- com.android.internal.R.bool.config_automatic_brightness_available)) {
- brightnessMode = Settings.System.getInt(cr,
- Settings.System.SCREEN_BRIGHTNESS_MODE);
- }
-
- // Rotate AUTO -> MINIMUM -> DEFAULT -> MAXIMUM
- // Technically, not a toggle...
- if (brightnessMode == Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC) {
- brightness = MINIMUM_BACKLIGHT;
- icon = R.drawable.ic_sysbar_brightness_low;
- brightnessMode = Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL;
- } else if (brightness < DEFAULT_BACKLIGHT) {
- brightness = DEFAULT_BACKLIGHT;
- } else if (brightness < MAXIMUM_BACKLIGHT) {
- brightness = MAXIMUM_BACKLIGHT;
- } else {
- brightnessMode = Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC;
- brightness = MINIMUM_BACKLIGHT;
- icon = R.drawable.ic_sysbar_brightness_auto;
- }
-
- if (context.getResources().getBoolean(
- com.android.internal.R.bool.config_automatic_brightness_available)) {
- // Set screen brightness mode (automatic or manual)
- Settings.System.putInt(context.getContentResolver(),
- Settings.System.SCREEN_BRIGHTNESS_MODE,
- brightnessMode);
- } else {
- // Make sure we set the brightness if automatic mode isn't available
- brightnessMode = Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL;
- }
- if (brightnessMode == Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL) {
- power.setBacklightBrightness(brightness);
- Settings.System.putInt(cr, Settings.System.SCREEN_BRIGHTNESS, brightness);
- }
- }
- } catch (RemoteException e) {
- } catch (Settings.SettingNotFoundException e) {
- }
-
- mBrightnessButton.setImageResource(icon);
- mBrightnessButton.setBackgroundResource(bg);
- }
-
- PhoneStateListener mPhoneStateListener = new PhoneStateListener() {
- @Override
- public void onServiceStateChanged(ServiceState serviceState) {
- if (DEBUG) {
- Slog.d(TAG, "phone service state changed: " + serviceState.getState());
- }
- mAirplaneMode = serviceState.getState() == ServiceState.STATE_POWER_OFF;
- if (mAirplaneButton != null) {
- mAirplaneButton.setImageResource(mAirplaneMode
- ? R.drawable.ic_sysbar_airplane_on
- : R.drawable.ic_sysbar_airplane_off);
- mAirplaneButton.setBackgroundResource(mAirplaneMode
- ? R.drawable.sysbar_toggle_bg_on
- : R.drawable.sysbar_toggle_bg_off);
- }
- }
- };
-
- private boolean getAirplaneMode() {
- return mAirplaneMode;
- }
-
- private void setAirplaneMode(boolean on) {
- Settings.System.putInt(
- mContext.getContentResolver(),
- Settings.System.AIRPLANE_MODE_ON,
- on ? 1 : 0);
- Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);
- intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
- intent.putExtra("state", on);
- getContext().sendBroadcast(intent);
- }
-
- boolean getSilentMode() {
- return mAudioManager.getRingerMode() != AudioManager.RINGER_MODE_NORMAL;
- }
-
- void setSilentMode(boolean on) {
- if (on) {
- mAudioManager.setRingerMode((Settings.System.getInt(mContext.getContentResolver(),
- Settings.System.VIBRATE_IN_SILENT, 1) == 1)
- ? AudioManager.RINGER_MODE_VIBRATE
- : AudioManager.RINGER_MODE_SILENT);
- } else {
- mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
- }
- }
-
- void refreshSound() {
- boolean silent = getSilentMode();
- mSoundButton.setImageResource(!silent
- ? R.drawable.ic_sysbar_sound_on
- : R.drawable.ic_sysbar_sound_off);
- mSoundButton.setBackgroundResource(!silent
- ? R.drawable.sysbar_toggle_bg_on
- : R.drawable.sysbar_toggle_bg_off);
- }
-
- void toggleBluetooth() {
- if (mBluetoothAdapter == null) return;
- if (mBluetoothAdapter.isEnabled()) {
- mBluetoothAdapter.disable();
- } else {
- mBluetoothAdapter.enable();
- }
- }
-
- void refreshBluetooth() {
- boolean on = mBluetoothAdapter != null && mBluetoothAdapter.isEnabled();
- mBluetoothButton.setImageResource(on ? R.drawable.ic_sysbar_bluetooth_on
- : R.drawable.ic_sysbar_bluetooth_off);
- mBluetoothButton.setBackgroundResource(on
- ? R.drawable.sysbar_toggle_bg_on
- : R.drawable.sysbar_toggle_bg_off);
- }
-
- private boolean isGpsEnabled() {
- ContentResolver res = mContext.getContentResolver();
- return Settings.Secure.isLocationProviderEnabled(
- res, LocationManager.GPS_PROVIDER);
- }
-
- private void toggleGps() {
- Settings.Secure.setLocationProviderEnabled(mContext.getContentResolver(),
- LocationManager.GPS_PROVIDER, !isGpsEnabled());
- }
-
- private void refreshGps() {
- boolean on = isGpsEnabled();
- mGpsButton.setImageResource(on ? R.drawable.ic_sysbar_gps_on
- : R.drawable.ic_sysbar_gps_off);
- mGpsButton.setBackgroundResource(on
- ? R.drawable.sysbar_toggle_bg_on
- : R.drawable.sysbar_toggle_bg_off);
- }
-
- void setAutoRotate(boolean rot) {
- try {
- ContentResolver cr = getContext().getContentResolver();
- if (rot) {
- mWM.thawRotation();
- } else {
- mWM.freezeRotation();
- }
- } catch (RemoteException exc) {
- }
- }
-
- boolean getAutoRotate() {
- ContentResolver cr = getContext().getContentResolver();
- return 1 == Settings.System.getInt(cr,
- Settings.System.ACCELEROMETER_ROTATION,
- 1);
- }
-
- int getDisplayRotation() {
- try {
- return mWM.getRotation();
- } catch (RemoteException exc) {
- return 0;
- }
- }
-}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index a934cd7..3cae088 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -102,12 +102,13 @@
NotificationIconArea mNotificationIconArea;
View mNavigationArea;
- View mBackButton;
+ ImageView mBackButton;
View mHomeButton;
View mMenuButton;
View mRecentButton;
- InputMethodButton mInputMethodButton;
+ InputMethodButton mInputMethodSwitchButton;
+ InputMethodButton mInputMethodShortcutButton;
NotificationPanel mNotificationPanel;
NotificationPeekPanel mNotificationPeekWindow;
@@ -144,11 +145,11 @@
final Resources res = context.getResources();
final int barHeight= res.getDimensionPixelSize(
- com.android.internal.R.dimen.status_bar_height);
+ com.android.internal.R.dimen.status_bar_height);
// Notification Panel
mNotificationPanel = (NotificationPanel)View.inflate(context,
- R.layout.sysbar_panel_notifications, null);
+ R.layout.status_bar_notification_panel, null);
mNotificationPanel.setVisibility(View.GONE);
mNotificationPanel.setOnTouchListener(
new TouchOutsideListener(MSG_CLOSE_NOTIFICATION_PANEL, mNotificationPanel));
@@ -179,11 +180,11 @@
// Notification preview window
mNotificationPeekWindow = (NotificationPeekPanel) View.inflate(context,
- R.layout.sysbar_panel_notification_peek, null);
+ R.layout.status_bar_notification_peek, null);
mNotificationPeekRow = (ViewGroup) mNotificationPeekWindow.findViewById(R.id.content);
mNotificationPeekWindow.setVisibility(View.GONE);
mNotificationPeekWindow.setOnTouchListener(
- new TouchOutsideListener(MSG_CLOSE_NOTIFICATION_PANEL, mNotificationPeekWindow));
+ new TouchOutsideListener(MSG_CLOSE_NOTIFICATION_PEEK, mNotificationPeekWindow));
mNotificationPeekScrubRight = new LayoutTransition();
mNotificationPeekScrubRight.setAnimator(LayoutTransition.APPEARING,
ObjectAnimator.ofInt(null, "left", -512, 0));
@@ -215,8 +216,8 @@
// Recents Panel
if (USE_2D_RECENTS) {
- mRecentsPanel = (RecentAppsPanel) View.inflate(context, R.layout.sysbar_panel_recent,
- null);
+ mRecentsPanel = (RecentAppsPanel) View.inflate(context,
+ R.layout.status_bar_recent_panel, null);
mRecentsPanel.setVisibility(View.GONE);
mRecentsPanel.setOnTouchListener(new TouchOutsideListener(MSG_CLOSE_RECENTS_PANEL,
mRecentsPanel));
@@ -286,7 +287,7 @@
// The navigation buttons
mNavigationArea = sb.findViewById(R.id.navigationArea);
- mBackButton = mNavigationArea.findViewById(R.id.back);
+ mBackButton = (ImageView)mNavigationArea.findViewById(R.id.back);
mHomeButton = mNavigationArea.findViewById(R.id.home);
mMenuButton = mNavigationArea.findViewById(R.id.menu);
mRecentButton = mNavigationArea.findViewById(R.id.recent_apps);
@@ -294,7 +295,8 @@
mRecentButton.setOnClickListener(mOnClickListener);
// The bar contents buttons
- mInputMethodButton = (InputMethodButton) sb.findViewById(R.id.imeButton);
+ mInputMethodSwitchButton = (InputMethodButton) sb.findViewById(R.id.imeSwitchButton);
+ mInputMethodShortcutButton = (InputMethodButton) sb.findViewById(R.id.imeShortcutButton);
// "shadows" of the status bar features, for lights-out mode
mBackShadow = sb.findViewById(R.id.back_shadow);
@@ -386,6 +388,7 @@
mNotificationPanel.setVisibility(View.VISIBLE);
// synchronize with current shadow state
mShadowController.hideElement(mNotificationArea);
+ mTicker.halt();
}
break;
case MSG_CLOSE_NOTIFICATION_PANEL:
@@ -456,12 +459,7 @@
if (DEBUG) Slog.d(TAG, "addNotification(" + key + " -> " + notification + ")");
addNotificationViews(key, notification);
- boolean immersive = false;
- try {
- immersive = ActivityManagerNative.getDefault().isTopActivityImmersive();
- //Slog.d(TAG, "Top activity is " + (immersive?"immersive":"not immersive"));
- } catch (RemoteException ex) {
- }
+ final boolean immersive = isImmersive();
if (false && immersive) {
// TODO: immersive mode popups for tablet
} else if (notification.notification.fullScreenIntent != null) {
@@ -473,7 +471,7 @@
} catch (PendingIntent.CanceledException e) {
}
} else {
- tick(notification);
+ tick(key, notification);
}
setAreThereNotifications();
@@ -547,7 +545,14 @@
removeNotificationViews(key);
addNotificationViews(key, notification);
}
- // TODO: ticker; immersive mode
+ // fullScreenIntent doesn't happen on updates. You need to clear & repost a new
+ // notification.
+ final boolean immersive = isImmersive();
+ if (false && immersive) {
+ // TODO: immersive mode
+ } else {
+ tick(key, notification);
+ }
setAreThereNotifications();
}
@@ -555,6 +560,7 @@
public void removeNotification(IBinder key) {
if (DEBUG) Slog.d(TAG, "removeNotification(" + key + ") // TODO");
removeNotificationViews(key);
+ mTicker.remove(key);
setAreThereNotifications();
}
@@ -601,7 +607,7 @@
return n.tickerView != null || !TextUtils.isEmpty(n.tickerText);
}
- private void tick(StatusBarNotification n) {
+ private void tick(IBinder key, StatusBarNotification n) {
// Don't show the ticker when the windowshade is open.
if (mNotificationPanel.getVisibility() == View.VISIBLE) {
return;
@@ -613,7 +619,7 @@
if (hasTicker(n.notification) && mStatusBarView.getWindowToken() != null) {
if (0 == (mDisabled & (StatusBarManager.DISABLE_NOTIFICATION_ICONS
| StatusBarManager.DISABLE_NOTIFICATION_TICKER))) {
- mTicker.add(n);
+ mTicker.add(key, n);
}
}
}
@@ -645,13 +651,26 @@
mMenuButton.setVisibility(visible ? View.VISIBLE : View.GONE);
}
- public void setIMEButtonVisible(boolean visible) {
+ public void setIMEButtonVisible(IBinder token, boolean visible) {
if (DEBUG) {
Slog.d(TAG, (visible?"showing":"hiding") + " the IME button");
}
- mInputMethodButton.setIMEButtonVisible(visible);
+ mInputMethodSwitchButton.setIMEButtonVisible(token, visible);
+ mInputMethodShortcutButton.setIMEButtonVisible(token, visible);
+ mBackButton.setImageResource(
+ visible ? R.drawable.ic_sysbar_back_ime : R.drawable.ic_sysbar_back);
}
+ private boolean isImmersive() {
+ try {
+ return ActivityManagerNative.getDefault().isTopActivityImmersive();
+ //Slog.d(TAG, "Top activity is " + (immersive?"immersive":"not immersive"));
+ } catch (RemoteException ex) {
+ // the end is nigh
+ return false;
+ }
+ }
+
private void setAreThereNotifications() {
final boolean hasClearable = mNotns.hasClearableItems();
@@ -815,8 +834,7 @@
case MotionEvent.ACTION_MOVE:
// peek and switch icons if necessary
int numIcons = mIconLayout.getChildCount();
- int peekIndex =
- (int)((float)event.getX() * numIcons / mIconLayout.getWidth());
+ int peekIndex = (int)((float)event.getX() * numIcons / mIconLayout.getWidth());
if (peekIndex > numIcons - 1) peekIndex = numIcons - 1;
else if (peekIndex < 0) peekIndex = 0;
@@ -828,8 +846,7 @@
mHandler.removeMessages(MSG_OPEN_NOTIFICATION_PEEK);
// no delay if we're scrubbing left-right
- mHandler.sendMessageDelayed(peekMsg,
- peeking ? 0 : mNotificationPeekTapDuration);
+ mHandler.sendMessage(peekMsg);
}
// check for fling
@@ -851,7 +868,7 @@
case MotionEvent.ACTION_CANCEL:
mHandler.removeMessages(MSG_OPEN_NOTIFICATION_PEEK);
if (peeking) {
- mHandler.sendEmptyMessageDelayed(MSG_CLOSE_NOTIFICATION_PEEK, 250);
+ mHandler.sendEmptyMessageDelayed(MSG_CLOSE_NOTIFICATION_PEEK, 5000);
}
mVT.recycle();
mVT = null;
@@ -984,7 +1001,7 @@
// create the row view
LayoutInflater inflater = (LayoutInflater)mContext.getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
- View row = inflater.inflate(R.layout.status_bar_latest_event, parent, false);
+ View row = inflater.inflate(R.layout.status_bar_notification_row, parent, false);
workAroundBadLayerDrawableOpacity(row);
View vetoButton = row.findViewById(R.id.veto);
if (entry.notification.isClearable()) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java
index b05fe1a..b3aed03 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletTicker.java
@@ -25,6 +25,7 @@
import android.graphics.PixelFormat;
import android.graphics.drawable.Drawable;
import android.os.Handler;
+import android.os.IBinder;
import android.os.Message;
import android.util.Slog;
import android.view.Gravity;
@@ -47,6 +48,9 @@
public class TabletTicker extends Handler {
private static final String TAG = "StatusBar.TabletTicker";
+ // 3 is enough to let us see most cases, but not get so far behind that it's too annoying.
+ private static final int QUEUE_LENGTH = 3;
+
private static final int MSG_ADVANCE = 1;
private static final int ADVANCE_DELAY = 5000; // 5 seconds
@@ -54,42 +58,77 @@
private Context mContext;
private ViewGroup mWindow;
+ private IBinder mCurrentKey;
private StatusBarNotification mCurrentNotification;
private View mCurrentView;
- private StatusBarNotification[] mQueue;
+ private IBinder[] mKeys = new IBinder[QUEUE_LENGTH];
+ private StatusBarNotification[] mQueue = new StatusBarNotification[QUEUE_LENGTH];
private int mQueuePos;
public TabletTicker(Context context) {
mContext = context;
-
- // TODO: Make this a configuration value.
- // 3 is enough to let us see most cases, but not get so far behind that it's annoying.
- mQueue = new StatusBarNotification[3];
}
- public void add(StatusBarNotification notification) {
+ public void add(IBinder key, StatusBarNotification notification) {
if (false) {
- Slog.d(TAG, "add mCurrentNotification=" + mCurrentNotification
+ Slog.d(TAG, "add 1 mCurrentNotification=" + mCurrentNotification
+ " mQueuePos=" + mQueuePos + " mQueue=" + Arrays.toString(mQueue));
}
+
+ // If it's already in here, remove whatever's in there and put the new one at the end.
+ remove(key, false);
+
+ mKeys[mQueuePos] = key;
mQueue[mQueuePos] = notification;
- // If nothing is running now, start the next one
- if (mCurrentNotification == null) {
+ // If nothing is running now, start the next one.
+ if (mQueuePos == 0 && mCurrentNotification == null) {
sendEmptyMessage(MSG_ADVANCE);
}
- if (mQueuePos < mQueue.length - 1) {
+ if (mQueuePos < QUEUE_LENGTH - 1) {
mQueuePos++;
}
}
+ public void remove(IBinder key) {
+ remove(key, true);
+ }
+
+ public void remove(IBinder key, boolean advance) {
+ if (mCurrentKey == key) {
+ Slog.d(TAG, "removed current");
+ // Showing now
+ if (advance) {
+ removeMessages(MSG_ADVANCE);
+ sendEmptyMessage(MSG_ADVANCE);
+ }
+ } else {
+ // In the queue
+ for (int i=0; i<QUEUE_LENGTH; i++) {
+ if (mKeys[i] == key) {
+ Slog.d(TAG, "removed from queue: " + i);
+ for (; i<QUEUE_LENGTH-1; i++) {
+ mKeys[i] = mKeys[i+1];
+ mQueue[i] = mQueue[i+1];
+ }
+ mKeys[QUEUE_LENGTH-1] = null;
+ mQueue[QUEUE_LENGTH-1] = null;
+ if (mQueuePos > 0) {
+ mQueuePos--;
+ }
+ break;
+ }
+ }
+ }
+ }
+
public void halt() {
removeMessages(MSG_ADVANCE);
- if (mCurrentView != null) {
- final int N = mQueue.length;
- for (int i=0; i<N; i++) {
+ if (mCurrentView != null || mQueuePos != 0) {
+ for (int i=0; i<QUEUE_LENGTH; i++) {
+ mKeys[i] = null;
mQueue[i] = null;
}
mQueuePos = 0;
@@ -110,14 +149,14 @@
if (mCurrentView != null) {
mWindow.removeView(mCurrentView);
mCurrentView = null;
+ mCurrentKey = null;
mCurrentNotification = null;
}
// In with the new...
- StatusBarNotification next = dequeue();
- while (next != null) {
- mCurrentNotification = next;
- mCurrentView = makeTickerView(next);
+ dequeue();
+ while (mCurrentNotification != null) {
+ mCurrentView = makeTickerView(mCurrentNotification);
if (mCurrentView != null) {
if (mWindow == null) {
mWindow = makeWindow();
@@ -127,31 +166,33 @@
sendEmptyMessageDelayed(MSG_ADVANCE, ADVANCE_DELAY);
break;
}
- next = dequeue();
+ dequeue();
}
// if there's nothing left, close the window
// TODO: Do this when the animation is done instead
- if (mCurrentView == null) {
+ if (mCurrentView == null && mWindow != null) {
WindowManagerImpl.getDefault().removeView(mWindow);
mWindow = null;
}
}
- private StatusBarNotification dequeue() {
- StatusBarNotification notification = mQueue[0];
+ private void dequeue() {
+ mCurrentKey = mKeys[0];
+ mCurrentNotification = mQueue[0];
if (false) {
Slog.d(TAG, "dequeue mQueuePos=" + mQueuePos + " mQueue=" + Arrays.toString(mQueue));
}
final int N = mQueuePos;
for (int i=0; i<N; i++) {
+ mKeys[i] = mKeys[i+1];
mQueue[i] = mQueue[i+1];
}
+ mKeys[N] = null;
mQueue[N] = null;
if (mQueuePos > 0) {
mQueuePos--;
}
- return notification;
}
private ViewGroup makeWindow() {
@@ -187,7 +228,7 @@
iconId = R.id.left_icon;
}
if (n.tickerView != null) {
- group = (ViewGroup)inflater.inflate(R.layout.ticker, null, false);
+ group = (ViewGroup)inflater.inflate(R.layout.status_bar_ticker_panel, null, false);
View expanded = null;
Exception exception = null;
try {
@@ -209,7 +250,7 @@
lp.gravity = Gravity.BOTTOM;
group.addView(expanded, lp);
} else if (n.tickerText != null) {
- group = (ViewGroup)inflater.inflate(R.layout.ticker_compat, mWindow, false);
+ group = (ViewGroup)inflater.inflate(R.layout.status_bar_ticker_compat, mWindow, false);
final Drawable icon = StatusBarIconView.getIcon(mContext,
new StatusBarIcon(notification.pkg, n.icon, n.iconLevel, 0));
ImageView iv = (ImageView)group.findViewById(iconId);
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index f892e9e..1373627 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -588,7 +588,7 @@
// We can't initialize this in init() since the configuration hasn't been loaded yet.
if (mLongPressOnHomeBehavior < 0) {
mLongPressOnHomeBehavior
- = mContext.getResources().getInteger(R.integer.config_longPressOnPowerBehavior);
+ = mContext.getResources().getInteger(R.integer.config_longPressOnHomeBehavior);
if (mLongPressOnHomeBehavior < LONG_PRESS_HOME_NOTHING ||
mLongPressOnHomeBehavior > LONG_PRESS_HOME_RECENT_ACTIVITY) {
mLongPressOnHomeBehavior = LONG_PRESS_HOME_NOTHING;
@@ -600,7 +600,6 @@
sendCloseSystemWindows(SYSTEM_DIALOG_REASON_RECENT_APPS);
}
- // Use 3d Recents dialog
if (mLongPressOnHomeBehavior == LONG_PRESS_HOME_RECENT_DIALOG) {
// Fallback to dialog if we fail to launch the above.
if (mRecentAppsDialog == null) {
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index 723432d..c7bfdc8 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -964,7 +964,7 @@
}
synchronized (mMethodMap) {
- mStatusBar.setIMEButtonVisible(visible);
+ mStatusBar.setIMEButtonVisible(token, visible);
}
} finally {
Binder.restoreCallingIdentity(ident);
@@ -1007,23 +1007,29 @@
if (id.equals(mCurMethodId)) {
ArrayList<InputMethodSubtype> subtypes = info.getSubtypes();
+ InputMethodSubtype subtype = null;
if (subtypeId >= 0 && subtypeId < subtypes.size()) {
- InputMethodSubtype subtype = subtypes.get(subtypeId);
- if (subtype != mCurrentSubtype) {
- synchronized (mMethodMap) {
- if (mCurMethod != null) {
- try {
- setSelectedInputMethodAndSubtypeLocked(info, subtypeId, true);
- if (mInputShown) {
- // If mInputShown is false, there is no IME button on the
- // system bar.
- // Thus there is no need to make it invisible explicitly.
- mStatusBar.setIMEButtonVisible(true);
- }
- mCurMethod.changeInputMethodSubtype(subtype);
- } catch (RemoteException e) {
- return;
+ subtype = subtypes.get(subtypeId);
+ }
+ if (subtype != mCurrentSubtype) {
+ synchronized (mMethodMap) {
+ if (mCurMethod != null) {
+ try {
+ setSelectedInputMethodAndSubtypeLocked(info, subtypeId, true);
+ if (mInputShown) {
+ // If mInputShown is false, there is no IME button on the
+ // system bar.
+ // Thus there is no need to make it invisible explicitly.
+ mStatusBar.setIMEButtonVisible(mCurToken, true);
}
+ // If subtype is null, try to find the most applicable one from
+ // getCurrentInputMethodSubtype.
+ if (subtype == null) {
+ subtype = getCurrentInputMethodSubtype();
+ }
+ mCurMethod.changeInputMethodSubtype(subtype);
+ } catch (RemoteException e) {
+ return;
}
}
}
@@ -1271,34 +1277,12 @@
+ Binder.getCallingUid() + ": " + client);
}
- mHandler.sendEmptyMessage(MSG_SHOW_IM_PICKER);
- }
- }
-
- public void showInputMethodSubtypePickerFromClient(IInputMethodClient client) {
- synchronized (mMethodMap) {
- if (mCurClient == null || client == null
- || mCurClient.client.asBinder() != client.asBinder()) {
- Slog.w(TAG, "Ignoring showInputMethodSubtypePickerFromClient of: " + client);
- }
-
+ // Always call subtype picker, because subtype picker is a superset of input method
+ // picker.
mHandler.sendEmptyMessage(MSG_SHOW_IM_SUBTYPE_PICKER);
}
}
- public void showInputMethodAndSubtypeEnablerFromClient(
- IInputMethodClient client, String topId) {
- // TODO: Handle topId for setting the top position of the list activity
- synchronized (mMethodMap) {
- if (mCurClient == null || client == null
- || mCurClient.client.asBinder() != client.asBinder()) {
- Slog.w(TAG, "Ignoring showInputMethodAndSubtypeEnablerFromClient of: " + client);
- }
-
- mHandler.sendEmptyMessage(MSG_SHOW_IM_SUBTYPE_ENABLER);
- }
- }
-
public void setInputMethod(IBinder token, String id) {
setInputMethodWithSubtypeId(token, id, NOT_A_SUBTYPE_ID);
}
@@ -1314,6 +1298,18 @@
}
}
+ public void showInputMethodAndSubtypeEnablerFromClient(
+ IInputMethodClient client, String topId) {
+ // TODO: Handle topId for setting the top position of the list ActivityManagerNative
+ synchronized (mMethodMap) {
+ if (mCurClient == null || client == null
+ || mCurClient.client.asBinder() != client.asBinder()) {
+ Slog.w(TAG, "Ignoring showInputMethodAndSubtypeEnablerFromClient of: " + client);
+ }
+ mHandler.sendEmptyMessage(MSG_SHOW_IM_SUBTYPE_ENABLER);
+ }
+ }
+
public boolean switchToLastInputMethod(IBinder token) {
synchronized (mMethodMap) {
Pair<String, String> lastIme = mSettings.getLastInputMethodAndSubtypeLocked();
@@ -1942,28 +1938,29 @@
* return defaultSubtypeId
* @return the most applicable subtypeId
*/
- private int findLastResortApplicableSubtypeLocked(
+ private InputMethodSubtype findLastResortApplicableSubtypeLocked(
List<InputMethodSubtype> subtypes, String mode, String locale, int defaultSubtypeId) {
if (subtypes == null || subtypes.size() == 0) {
- return NOT_A_SUBTYPE_ID;
+ return null;
}
if (TextUtils.isEmpty(locale)) {
locale = mContext.getResources().getConfiguration().locale.toString();
}
final String language = locale.substring(0, 2);
boolean partialMatchFound = false;
- int applicableSubtypeId = defaultSubtypeId;
+ InputMethodSubtype applicableSubtype = null;
for (int i = 0; i < subtypes.size(); ++i) {
- final String subtypeLocale = subtypes.get(i).getLocale();
+ InputMethodSubtype subtype = subtypes.get(i);
+ final String subtypeLocale = subtype.getLocale();
// An applicable subtype should match "mode".
if (subtypes.get(i).getMode().equalsIgnoreCase(mode)) {
if (locale.equals(subtypeLocale)) {
// Exact match (e.g. system locale is "en_US" and subtype locale is "en_US")
- applicableSubtypeId = i;
+ applicableSubtype = subtype;
break;
} else if (!partialMatchFound && subtypeLocale.startsWith(language)) {
// Partial match (e.g. system locale is "en_US" and subtype locale is "en")
- applicableSubtypeId = i;
+ applicableSubtype = subtype;
partialMatchFound = true;
}
}
@@ -1972,10 +1969,10 @@
// The first subtype applicable to the system locale will be defined as the most applicable
// subtype.
if (DEBUG) {
- Slog.d(TAG, "Applicable InputMethodSubtype was found: " + applicableSubtypeId + ","
- + subtypes.get(applicableSubtypeId).getLocale());
+ Slog.d(TAG, "Applicable InputMethodSubtype was found: " + applicableSubtype.getMode()
+ + "," + applicableSubtype.getLocale());
}
- return applicableSubtypeId;
+ return applicableSubtype;
}
// If there are no selected shortcuts, tries finding the most applicable ones.
@@ -1983,59 +1980,66 @@
findLastResortApplicableShortcutInputMethodAndSubtypeLocked(String mode) {
List<InputMethodInfo> imis = mSettings.getEnabledInputMethodListLocked();
InputMethodInfo mostApplicableIMI = null;
- int mostApplicableSubtypeId = NOT_A_SUBTYPE_ID;
+ InputMethodSubtype mostApplicableSubtype = null;
boolean foundInSystemIME = false;
// Search applicable subtype for each InputMethodInfo
for (InputMethodInfo imi: imis) {
- int subtypeId = NOT_A_SUBTYPE_ID;
+ InputMethodSubtype subtype = null;
if (mCurrentSubtype != null) {
// 1. Search with the current subtype's locale and the enabled subtypes
- subtypeId = findLastResortApplicableSubtypeLocked(
+ subtype = findLastResortApplicableSubtypeLocked(
mSettings.getEnabledInputMethodSubtypeListLocked(
imi), mode, mCurrentSubtype.getLocale(), NOT_A_SUBTYPE_ID);
- if (subtypeId == NOT_A_SUBTYPE_ID) {
+ if (subtype == null) {
// 2. Search with the current subtype's locale and all subtypes
- subtypeId = findLastResortApplicableSubtypeLocked(imi.getSubtypes(),
+ subtype = findLastResortApplicableSubtypeLocked(imi.getSubtypes(),
mode, mCurrentSubtype.getLocale(), NOT_A_SUBTYPE_ID);
}
}
// 3. Search with the system locale and the enabled subtypes
- if (subtypeId == NOT_A_SUBTYPE_ID) {
- subtypeId = findLastResortApplicableSubtypeLocked(
+ if (subtype == null) {
+ subtype = findLastResortApplicableSubtypeLocked(
mSettings.getEnabledInputMethodSubtypeListLocked(
imi), mode, null, NOT_A_SUBTYPE_ID);
}
- if (subtypeId == NOT_A_SUBTYPE_ID) {
+ if (subtype == null) {
// 4. Search with the system locale and all subtypes
- subtypeId = findLastResortApplicableSubtypeLocked(imi.getSubtypes(),
+ subtype = findLastResortApplicableSubtypeLocked(imi.getSubtypes(),
mode, null, NOT_A_SUBTYPE_ID);
}
- if (subtypeId != NOT_A_SUBTYPE_ID) {
+ if (subtype != null) {
if (imi.getId().equals(mCurMethodId)) {
// The current input method is the most applicable IME.
mostApplicableIMI = imi;
- mostApplicableSubtypeId = subtypeId;
+ mostApplicableSubtype = subtype;
break;
} else if ((imi.getServiceInfo().applicationInfo.flags
& ApplicationInfo.FLAG_SYSTEM) != 0) {
// The system input method is 2nd applicable IME.
mostApplicableIMI = imi;
- mostApplicableSubtypeId = subtypeId;
+ mostApplicableSubtype = subtype;
foundInSystemIME = true;
} else if (!foundInSystemIME) {
mostApplicableIMI = imi;
- mostApplicableSubtypeId = subtypeId;
+ mostApplicableSubtype = subtype;
}
}
}
if (DEBUG) {
- Slog.w(TAG, "Most applicable shortcut input method subtype was:"
- + mostApplicableIMI.getId() + "," + mostApplicableSubtypeId);
+ if (mostApplicableIMI != null) {
+ Slog.w(TAG, "Most applicable shortcut input method was:"
+ + mostApplicableIMI.getId());
+ if (mostApplicableSubtype != null) {
+ Slog.w(TAG, "Most applicable shortcut input method subtype was:"
+ + "," + mostApplicableSubtype.getMode() + ","
+ + mostApplicableSubtype.getLocale());
+ }
+ }
}
- if (mostApplicableIMI != null && mostApplicableSubtypeId != NOT_A_SUBTYPE_ID) {
+ if (mostApplicableIMI != null) {
return new Pair<InputMethodInfo, InputMethodSubtype> (mostApplicableIMI,
- mostApplicableIMI.getSubtypes().get(mostApplicableSubtypeId));
+ mostApplicableSubtype);
} else {
return null;
}
@@ -2063,15 +2067,12 @@
// the most applicable subtype from all subtypes whose mode is
// SUBTYPE_MODE_KEYBOARD. This is an exceptional case, so we will hardcode
// the mode.
- subtypeId = findLastResortApplicableSubtypeLocked(imi.getSubtypes(),
+ mCurrentSubtype = findLastResortApplicableSubtypeLocked(imi.getSubtypes(),
SUBTYPE_MODE_KEYBOARD, null, DEFAULT_SUBTYPE_ID);
}
- }
- if (subtypeId != NOT_A_SUBTYPE_ID) {
+ } else {
mCurrentSubtype =
mMethodMap.get(lastInputMethodId).getSubtypes().get(subtypeId);
- } else {
- mCurrentSubtype = null;
}
}
return mCurrentSubtype;
@@ -2101,7 +2102,7 @@
SUBTYPE_MODE_VOICE);
addShortcutInputMethodAndSubtypes(info.first, info.second);
}
- ArrayList ret = new ArrayList<Object>();
+ ArrayList<Object> ret = new ArrayList<Object>();
for (InputMethodInfo imi: mShortcutInputMethodsAndSubtypes.keySet()) {
ret.add(imi);
for (InputMethodSubtype subtype: mShortcutInputMethodsAndSubtypes.get(imi)) {
diff --git a/services/java/com/android/server/ScreenRotationAnimation.java b/services/java/com/android/server/ScreenRotationAnimation.java
index 299567a..1cc6a2a 100644
--- a/services/java/com/android/server/ScreenRotationAnimation.java
+++ b/services/java/com/android/server/ScreenRotationAnimation.java
@@ -16,6 +16,7 @@
package com.android.server; // TODO: use com.android.server.wm, once things move there
+import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
@@ -28,38 +29,60 @@
import android.view.Display;
import android.view.Surface;
import android.view.SurfaceSession;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.view.animation.Transformation;
class ScreenRotationAnimation {
- private static final String TAG = "ScreenRotationAnimation";
+ static final String TAG = "ScreenRotationAnimation";
+ static final boolean DEBUG = false;
+ final Context mContext;
+ final Display mDisplay;
Surface mSurface;
int mWidth, mHeight;
- int mBaseRotation;
+ int mSnapshotRotation;
+ int mSnapshotDeltaRotation;
+ int mOriginalRotation;
+ int mOriginalWidth, mOriginalHeight;
int mCurRotation;
- int mDeltaRotation;
- final Matrix mMatrix = new Matrix();
+ Animation mExitAnimation;
+ final Transformation mExitTransformation = new Transformation();
+ Animation mEnterAnimation;
+ final Transformation mEnterTransformation = new Transformation();
+ boolean mStarted;
+
+ final DisplayMetrics mDisplayMetrics = new DisplayMetrics();
+ final Matrix mSnapshotInitialMatrix = new Matrix();
+ final Matrix mSnapshotFinalMatrix = new Matrix();
final float[] mTmpFloats = new float[9];
- public ScreenRotationAnimation(Display display, SurfaceSession session) {
- final DisplayMetrics dm = new DisplayMetrics();
- display.getMetrics(dm);
+ public ScreenRotationAnimation(Context context, Display display, SurfaceSession session) {
+ mContext = context;
+ mDisplay = display;
+
+ display.getMetrics(mDisplayMetrics);
Bitmap screenshot = Surface.screenshot(0, 0);
if (screenshot != null) {
// Screenshot does NOT include rotation!
- mBaseRotation = 0;
+ mSnapshotRotation = 0;
mWidth = screenshot.getWidth();
mHeight = screenshot.getHeight();
} else {
// Just in case.
- mBaseRotation = display.getRotation();
- mWidth = dm.widthPixels;
- mHeight = dm.heightPixels;
+ mSnapshotRotation = display.getRotation();
+ mWidth = mDisplayMetrics.widthPixels;
+ mHeight = mDisplayMetrics.heightPixels;
}
+ mOriginalRotation = display.getRotation();
+ mOriginalWidth = mDisplayMetrics.widthPixels;
+ mOriginalHeight = mDisplayMetrics.heightPixels;
+
Surface.openTransaction();
if (mSurface != null) {
mSurface.destroy();
@@ -102,43 +125,24 @@
screenshot.recycle();
}
- // Must be called while in a transaction.
- public void setRotation(int rotation) {
- mCurRotation = rotation;
- int delta = mCurRotation - mBaseRotation;
+ static int deltaRotation(int oldRotation, int newRotation) {
+ int delta = newRotation - oldRotation;
if (delta < 0) delta += 4;
- mDeltaRotation = delta;
+ return delta;
+ }
- switch (delta) {
- case Surface.ROTATION_0:
- mMatrix.reset();
- break;
- case Surface.ROTATION_90:
- mMatrix.setRotate(90, 0, 0);
- mMatrix.postTranslate(0, mWidth);
- break;
- case Surface.ROTATION_180:
- mMatrix.setRotate(180, 0, 0);
- mMatrix.postTranslate(mWidth, mHeight);
- break;
- case Surface.ROTATION_270:
- mMatrix.setRotate(270, 0, 0);
- mMatrix.postTranslate(mHeight, 0);
- break;
- }
-
- mMatrix.getValues(mTmpFloats);
+ void setSnapshotTransform(Matrix matrix, float alpha) {
+ matrix.getValues(mTmpFloats);
mSurface.setPosition((int)mTmpFloats[Matrix.MTRANS_X],
(int)mTmpFloats[Matrix.MTRANS_Y]);
mSurface.setMatrix(
- mTmpFloats[Matrix.MSCALE_X], mTmpFloats[Matrix.MSKEW_X],
- mTmpFloats[Matrix.MSKEW_Y], mTmpFloats[Matrix.MSCALE_Y]);
-
- if (false) {
+ mTmpFloats[Matrix.MSCALE_X], mTmpFloats[Matrix.MSKEW_Y],
+ mTmpFloats[Matrix.MSKEW_X], mTmpFloats[Matrix.MSCALE_Y]);
+ mSurface.setAlpha(alpha);
+ if (DEBUG) {
float[] srcPnts = new float[] { 0, 0, mWidth, mHeight };
- float[] dstPnts = new float[8];
- mMatrix.mapPoints(dstPnts, srcPnts);
- Slog.i(TAG, "**** ROTATION: " + delta);
+ float[] dstPnts = new float[4];
+ matrix.mapPoints(dstPnts, srcPnts);
Slog.i(TAG, "Original : (" + srcPnts[0] + "," + srcPnts[1]
+ ")-(" + srcPnts[2] + "," + srcPnts[3] + ")");
Slog.i(TAG, "Transformed: (" + dstPnts[0] + "," + dstPnts[1]
@@ -146,7 +150,165 @@
}
}
- public void dismiss() {
- mSurface.destroy();
+ // Must be called while in a transaction.
+ public void setRotation(int rotation) {
+ mCurRotation = rotation;
+
+ // Compute the transformation matrix that must be applied
+ // to the snapshot to make it stay in the same original position
+ // with the current screen rotation.
+ int delta = deltaRotation(rotation, mSnapshotRotation);
+ switch (delta) {
+ case Surface.ROTATION_0:
+ mSnapshotInitialMatrix.reset();
+ break;
+ case Surface.ROTATION_90:
+ mSnapshotInitialMatrix.setRotate(90, 0, 0);
+ mSnapshotInitialMatrix.postTranslate(mHeight, 0);
+ break;
+ case Surface.ROTATION_180:
+ mSnapshotInitialMatrix.setRotate(180, 0, 0);
+ mSnapshotInitialMatrix.postTranslate(mWidth, mHeight);
+ break;
+ case Surface.ROTATION_270:
+ mSnapshotInitialMatrix.setRotate(270, 0, 0);
+ mSnapshotInitialMatrix.postTranslate(0, mWidth);
+ break;
+ }
+
+ if (DEBUG) Slog.v(TAG, "**** ROTATION: " + delta);
+ setSnapshotTransform(mSnapshotInitialMatrix, 1.0f);
+ }
+
+ /**
+ * Returns true if animating.
+ */
+ public boolean dismiss(long maxAnimationDuration, float animationScale) {
+ // Figure out how the screen has moved from the original rotation.
+ int delta = deltaRotation(mCurRotation, mOriginalRotation);
+ if (false && delta == 0) {
+ // Nothing changed, just remove the snapshot.
+ if (mSurface != null) {
+ mSurface.destroy();
+ mSurface = null;
+ }
+ return false;
+ }
+
+ switch (delta) {
+ case Surface.ROTATION_0:
+ mExitAnimation = AnimationUtils.loadAnimation(mContext,
+ com.android.internal.R.anim.screen_rotate_0_exit);
+ mEnterAnimation = AnimationUtils.loadAnimation(mContext,
+ com.android.internal.R.anim.screen_rotate_0_enter);
+ break;
+ case Surface.ROTATION_90:
+ mExitAnimation = AnimationUtils.loadAnimation(mContext,
+ com.android.internal.R.anim.screen_rotate_plus_90_exit);
+ mEnterAnimation = AnimationUtils.loadAnimation(mContext,
+ com.android.internal.R.anim.screen_rotate_plus_90_enter);
+ break;
+ case Surface.ROTATION_180:
+ mExitAnimation = AnimationUtils.loadAnimation(mContext,
+ com.android.internal.R.anim.screen_rotate_180_exit);
+ mEnterAnimation = AnimationUtils.loadAnimation(mContext,
+ com.android.internal.R.anim.screen_rotate_180_enter);
+ break;
+ case Surface.ROTATION_270:
+ mExitAnimation = AnimationUtils.loadAnimation(mContext,
+ com.android.internal.R.anim.screen_rotate_minus_90_exit);
+ mEnterAnimation = AnimationUtils.loadAnimation(mContext,
+ com.android.internal.R.anim.screen_rotate_minus_90_enter);
+ break;
+ }
+
+ mDisplay.getMetrics(mDisplayMetrics);
+
+ // Initialize the animations. This is a hack, redefining what "parent"
+ // means to allow supplying the last and next size. In this definition
+ // "%p" is the original (let's call it "previous") size, and "%" is the
+ // screen's current/new size.
+ mEnterAnimation.initialize(mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels,
+ mOriginalWidth, mOriginalHeight);
+ mExitAnimation.initialize(mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels,
+ mOriginalWidth, mOriginalHeight);
+ mStarted = false;
+
+ mExitAnimation.restrictDuration(maxAnimationDuration);
+ mExitAnimation.scaleCurrentDuration(animationScale);
+ mEnterAnimation.restrictDuration(maxAnimationDuration);
+ mEnterAnimation.scaleCurrentDuration(animationScale);
+
+ return true;
+ }
+
+ public void kill() {
+ if (mSurface != null) {
+ mSurface.destroy();
+ mSurface = null;
+ }
+ if (mExitAnimation != null) {
+ mExitAnimation.cancel();
+ mExitAnimation = null;
+ }
+ if (mEnterAnimation != null) {
+ mEnterAnimation.cancel();
+ mEnterAnimation = null;
+ }
+ }
+
+ public boolean isAnimating() {
+ return mEnterAnimation != null || mExitAnimation != null;
+ }
+
+ public boolean stepAnimation(long now) {
+ if (mEnterAnimation == null && mExitAnimation == null) {
+ return false;
+ }
+
+ if (!mStarted) {
+ mEnterAnimation.setStartTime(now);
+ mExitAnimation.setStartTime(now);
+ mStarted = true;
+ }
+
+ mExitTransformation.clear();
+ boolean moreExit = false;
+ if (mExitAnimation != null) {
+ moreExit = mExitAnimation.getTransformation(now, mExitTransformation);
+ if (DEBUG) Slog.v(TAG, "Stepped exit: " + mExitTransformation);
+ if (!moreExit) {
+ if (DEBUG) Slog.v(TAG, "Exit animation done!");
+ mExitAnimation.cancel();
+ mExitAnimation = null;
+ mExitTransformation.clear();
+ if (mSurface != null) {
+ mSurface.destroy();
+ mSurface = null;
+ }
+ }
+ }
+
+ mEnterTransformation.clear();
+ boolean moreEnter = false;
+ if (mEnterAnimation != null) {
+ moreEnter = mEnterAnimation.getTransformation(now, mEnterTransformation);
+ if (!moreEnter) {
+ mEnterAnimation.cancel();
+ mEnterAnimation = null;
+ mEnterTransformation.clear();
+ }
+ }
+
+ if (mSurface != null) {
+ mSnapshotFinalMatrix.setConcat(mExitTransformation.getMatrix(), mSnapshotInitialMatrix);
+ setSnapshotTransform(mSnapshotFinalMatrix, mExitTransformation.getAlpha());
+ }
+
+ return moreEnter || moreExit;
+ }
+
+ public Transformation getEnterTransformation() {
+ return mEnterTransformation;
}
}
diff --git a/services/java/com/android/server/StatusBarManagerService.java b/services/java/com/android/server/StatusBarManagerService.java
index 596db57..cbfa4ee 100644
--- a/services/java/com/android/server/StatusBarManagerService.java
+++ b/services/java/com/android/server/StatusBarManagerService.java
@@ -73,6 +73,7 @@
boolean mLightsOn = true;
boolean mMenuVisible = false;
boolean mIMEButtonVisible = false;
+ IBinder mIMEToken = null;
private class DisableRecord implements IBinder.DeathRecipient {
String pkg;
@@ -257,7 +258,7 @@
}
}
- public void setIMEButtonVisible(final boolean visible) {
+ public void setIMEButtonVisible(final IBinder token, final boolean visible) {
enforceStatusBar();
if (SPEW) Slog.d(TAG, (visible?"showing":"hiding") + " IME Button");
@@ -267,11 +268,12 @@
// mIMEButtonVisible because mIMEButtonVisible may not have been set to false when the
// previous IME was destroyed.
mIMEButtonVisible = visible;
+ mIMEToken = token;
mHandler.post(new Runnable() {
public void run() {
if (mBar != null) {
try {
- mBar.setIMEButtonVisible(visible);
+ mBar.setIMEButtonVisible(token, visible);
} catch (RemoteException ex) {
}
}
@@ -351,7 +353,7 @@
// ================================================================================
public void registerStatusBar(IStatusBar bar, StatusBarIconList iconList,
List<IBinder> notificationKeys, List<StatusBarNotification> notifications,
- int switches[]) {
+ int switches[], List<IBinder> binders) {
enforceStatusBarService();
Slog.i(TAG, "registerStatusBar bar=" + bar);
@@ -370,6 +372,7 @@
switches[1] = mLightsOn ? 1 : 0;
switches[2] = mMenuVisible ? 1 : 0;
switches[3] = mIMEButtonVisible ? 1 : 0;
+ binders.add(mIMEToken);
}
}
diff --git a/services/java/com/android/server/TelephonyRegistry.java b/services/java/com/android/server/TelephonyRegistry.java
index 689b1c6..e881523 100644
--- a/services/java/com/android/server/TelephonyRegistry.java
+++ b/services/java/com/android/server/TelephonyRegistry.java
@@ -388,8 +388,8 @@
return;
}
Slog.i(TAG, "notifyDataConnection: state=" + state + " isDataConnectivityPossible="
- + isDataConnectivityPossible + " reason=" + reason
- + " apn=" + apn + " networkType=" + networkType);
+ + isDataConnectivityPossible + " reason='" + reason
+ + "' apn='" + apn + "' apnType=" + apnType + " networkType=" + networkType);
synchronized (mRecords) {
boolean modified = false;
if (state == TelephonyManager.DATA_CONNECTED) {
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java
index 5c32c38..cbb35c6 100644
--- a/services/java/com/android/server/WindowManagerService.java
+++ b/services/java/com/android/server/WindowManagerService.java
@@ -4918,6 +4918,10 @@
}
}
+ public void setStrictModeVisualIndicatorPreference(String value) {
+ SystemProperties.set(StrictMode.VISUAL_PROPERTY, value);
+ }
+
public void freezeRotation() {
if (!checkCallingPermission(android.Manifest.permission.SET_ORIENTATION,
"setRotation()")) {
@@ -7483,8 +7487,10 @@
}
}
+ final boolean screenAnimation = mScreenRotationAnimation != null
+ && mScreenRotationAnimation.isAnimating();
if (selfTransformation || attachedTransformation != null
- || appTransformation != null) {
+ || appTransformation != null || screenAnimation) {
// cache often used attributes locally
final Rect frame = mFrame;
final float tmpFloats[] = mTmpFloats;
@@ -7502,6 +7508,10 @@
if (appTransformation != null) {
tmpMatrix.postConcat(appTransformation.getMatrix());
}
+ if (screenAnimation) {
+ tmpMatrix.postConcat(
+ mScreenRotationAnimation.getEnterTransformation().getMatrix());
+ }
// "convert" it into SurfaceFlinger's format
// (a 2x2 matrix + an offset)
@@ -7511,8 +7521,8 @@
tmpMatrix.getValues(tmpFloats);
mDsDx = tmpFloats[Matrix.MSCALE_X];
- mDtDx = tmpFloats[Matrix.MSKEW_X];
- mDsDy = tmpFloats[Matrix.MSKEW_Y];
+ mDtDx = tmpFloats[Matrix.MSKEW_Y];
+ mDsDy = tmpFloats[Matrix.MSKEW_X];
mDtDy = tmpFloats[Matrix.MSCALE_Y];
int x = (int)tmpFloats[Matrix.MTRANS_X] + mXOffset;
int y = (int)tmpFloats[Matrix.MTRANS_Y] + mYOffset;
@@ -7540,6 +7550,10 @@
if (appTransformation != null) {
mShownAlpha *= appTransformation.getAlpha();
}
+ if (screenAnimation) {
+ mShownAlpha *=
+ mScreenRotationAnimation.getEnterTransformation().getAlpha();
+ }
} else {
//Slog.i(TAG, "Not applying alpha transform");
}
@@ -9393,6 +9407,16 @@
animating = tokensAnimating;
+ if (mScreenRotationAnimation != null) {
+ if (mScreenRotationAnimation.isAnimating()) {
+ if (mScreenRotationAnimation.stepAnimation(currentTime)) {
+ animating = true;
+ } else {
+ mScreenRotationAnimation = null;
+ }
+ }
+ }
+
boolean tokenMayBeDrawn = false;
boolean wallpaperMayChange = false;
boolean forceHiding = false;
@@ -10837,8 +10861,13 @@
}
if (CUSTOM_SCREEN_ROTATION) {
+ if (mScreenRotationAnimation != null && mScreenRotationAnimation.isAnimating()) {
+ mScreenRotationAnimation.kill();
+ mScreenRotationAnimation = null;
+ }
if (mScreenRotationAnimation == null) {
- mScreenRotationAnimation = new ScreenRotationAnimation(mDisplay, mFxSession);
+ mScreenRotationAnimation = new ScreenRotationAnimation(mContext,
+ mDisplay, mFxSession);
}
} else {
Surface.freezeDisplay(0);
@@ -10862,8 +10891,12 @@
if (CUSTOM_SCREEN_ROTATION) {
if (mScreenRotationAnimation != null) {
- mScreenRotationAnimation.dismiss();
- mScreenRotationAnimation = null;
+ if (mScreenRotationAnimation.dismiss(MAX_ANIMATION_DURATION,
+ mTransitionAnimationScale)) {
+ requestAnimationLocked(0);
+ } else {
+ mScreenRotationAnimation = null;
+ }
}
} else {
Surface.unfreezeDisplay(0);
diff --git a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
index 8f3fa1b..cc01bc5 100644
--- a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
@@ -687,7 +687,7 @@
public boolean isApnTypeEnabled(String apnType) {
if (apnType == null) {
- apnType = getActiveApnString();
+ apnType = getActiveApnType();
}
return isApnIdEnabled(apnTypeToId(apnType));
}
diff --git a/telephony/java/com/android/internal/telephony/DefaultPhoneNotifier.java b/telephony/java/com/android/internal/telephony/DefaultPhoneNotifier.java
index 52cbd7c..83db3d1 100644
--- a/telephony/java/com/android/internal/telephony/DefaultPhoneNotifier.java
+++ b/telephony/java/com/android/internal/telephony/DefaultPhoneNotifier.java
@@ -115,7 +115,7 @@
mRegistry.notifyDataConnection(
convertDataState(state),
sender.isDataConnectivityPossible(), reason,
- sender.getActiveApn(),
+ sender.getActiveApnHost(),
apnType,
linkProperties,
linkCapabilities,
diff --git a/telephony/java/com/android/internal/telephony/Phone.java b/telephony/java/com/android/internal/telephony/Phone.java
index 2957c7e..69b7de6 100644
--- a/telephony/java/com/android/internal/telephony/Phone.java
+++ b/telephony/java/com/android/internal/telephony/Phone.java
@@ -309,16 +309,17 @@
/**
* Returns an array of string identifiers for the APN types serviced by the
- * currently active or last connected APN.
- * @return The string array.
+ * currently active.
+ * @return The string array will always return at least one entry, Phone.APN_TYPE_DEFAULT.
+ * TODO: Revisit if we always should return at least one entry.
*/
String[] getActiveApnTypes();
/**
- * Returns a string identifier for currently active or last connected APN.
- * @return The string name.
+ * Returns string for the active APN host.
+ * @return type as a string or null if none.
*/
- String getActiveApn();
+ String getActiveApnHost();
/**
* Return the LinkProperties for the named apn or null if not available
diff --git a/telephony/java/com/android/internal/telephony/PhoneBase.java b/telephony/java/com/android/internal/telephony/PhoneBase.java
index 83080ee..fe4fdb3 100644
--- a/telephony/java/com/android/internal/telephony/PhoneBase.java
+++ b/telephony/java/com/android/internal/telephony/PhoneBase.java
@@ -746,8 +746,10 @@
}
public void notifyDataConnection() {
- String apn = getActiveApn();
- mNotifier.notifyDataConnection(this, null, apn, getDataConnectionState(apn));
+ String types[] = getActiveApnTypes();
+ for (String apnType : types) {
+ mNotifier.notifyDataConnection(this, null, apnType, getDataConnectionState(apnType));
+ }
}
public void notifyOtaspChanged(int otaspMode) {
@@ -947,6 +949,10 @@
return mDataConnection.getActiveApnTypes();
}
+ public String getActiveApnHost() {
+ return mDataConnection.getActiveApnString();
+ }
+
public LinkProperties getLinkProperties(String apnType) {
return mDataConnection.getLinkProperties(apnType);
}
@@ -955,10 +961,6 @@
return mDataConnection.getLinkCapabilities(apnType);
}
- public String getActiveApn() {
- return mDataConnection.getActiveApnString();
- }
-
public int enableApnType(String type) {
return mDataConnection.enableApnType(type);
}
diff --git a/telephony/java/com/android/internal/telephony/PhoneProxy.java b/telephony/java/com/android/internal/telephony/PhoneProxy.java
index 02fdf28..2e79762 100644
--- a/telephony/java/com/android/internal/telephony/PhoneProxy.java
+++ b/telephony/java/com/android/internal/telephony/PhoneProxy.java
@@ -209,6 +209,10 @@
return mActivePhone.getActiveApnTypes();
}
+ public String getActiveApnHost() {
+ return mActivePhone.getActiveApnHost();
+ }
+
public LinkProperties getLinkProperties(String apnType) {
return mActivePhone.getLinkProperties(apnType);
}
@@ -217,10 +221,6 @@
return mActivePhone.getLinkCapabilities(apnType);
}
- public String getActiveApn() {
- return mActivePhone.getActiveApn();
- }
-
public SignalStrength getSignalStrength() {
return mActivePhone.getSignalStrength();
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
index 024ef33..f7664ca5 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
@@ -89,6 +89,8 @@
Phone.APN_TYPE_MMS,
Phone.APN_TYPE_HIPRI };
+ private static final int mDefaultApnId = DataConnectionTracker.APN_DEFAULT_ID;
+
/* Constructor */
CdmaDataConnectionTracker(CDMAPhone p) {
@@ -324,13 +326,17 @@
/** TODO: We probably want the connection being setup to a parameter passed around */
mPendingDataConnection = conn;
String[] types;
+ int apnId;
if (mRequestedApnType.equals(Phone.APN_TYPE_DUN)) {
types = new String[1];
types[0] = Phone.APN_TYPE_DUN;
+ apnId = DataConnectionTracker.APN_DUN_ID;
} else {
types = mDefaultApnTypes;
+ apnId = mDefaultApnId;
}
- mActiveApn = new ApnSetting(0, "", "", "", "", "", "", "", "", "", "", 0, types);
+ mActiveApn = new ApnSetting(apnId, "", "", "", "", "", "", "", "", "", "", 0, types);
+ if (DBG) log("setupData: mActiveApn=" + mActiveApn);
Message msg = obtainMessage();
msg.what = EVENT_DATA_SETUP_COMPLETE;