diff options
175 files changed, 540 insertions, 205 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 22971a24beeb..055984f9fa32 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -4392,6 +4392,7 @@ public class Activity extends ContextThemeWrapper mFragments.dispatchPause(); mCalled = false; onPause(); + mResumed = false; if (!mCalled && getApplicationInfo().targetSdkVersion >= android.os.Build.VERSION_CODES.GINGERBREAD) { throw new SuperNotCalledException( diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java index 34788a5df4ca..c095c069918b 100644 --- a/core/java/android/app/ActivityManagerNative.java +++ b/core/java/android/app/ActivityManagerNative.java @@ -376,6 +376,14 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM return true; } + case ACTIVITY_SLEPT_TRANSACTION: { + data.enforceInterface(IActivityManager.descriptor); + IBinder token = data.readStrongBinder(); + activitySlept(token); + reply.writeNoException(); + return true; + } + case ACTIVITY_DESTROYED_TRANSACTION: { data.enforceInterface(IActivityManager.descriptor); IBinder token = data.readStrongBinder(); @@ -1719,6 +1727,17 @@ class ActivityManagerProxy implements IActivityManager data.recycle(); reply.recycle(); } + public void activitySlept(IBinder token) throws RemoteException + { + Parcel data = Parcel.obtain(); + Parcel reply = Parcel.obtain(); + data.writeInterfaceToken(IActivityManager.descriptor); + data.writeStrongBinder(token); + mRemote.transact(ACTIVITY_SLEPT_TRANSACTION, data, reply, IBinder.FLAG_ONEWAY); + reply.readException(); + data.recycle(); + reply.recycle(); + } public void activityDestroyed(IBinder token) throws RemoteException { Parcel data = Parcel.obtain(); diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index 2389f01cd54f..511ddc1ce9ec 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -421,6 +421,10 @@ public final class ActivityThread { token); } + public final void scheduleSleeping(IBinder token, boolean sleeping) { + queueOrSendMessage(H.SLEEPING, token, sleeping ? 1 : 0); + } + public final void scheduleResumeActivity(IBinder token, boolean isForward) { queueOrSendMessage(H.RESUME_ACTIVITY, token, isForward ? 1 : 0); } @@ -929,6 +933,7 @@ public final class ActivityThread { public static final int SCHEDULE_CRASH = 134; public static final int DUMP_HEAP = 135; public static final int DUMP_ACTIVITY = 136; + public static final int SLEEPING = 137; String codeToString(int code) { if (DEBUG_MESSAGES) { switch (code) { @@ -969,6 +974,7 @@ public final class ActivityThread { case SCHEDULE_CRASH: return "SCHEDULE_CRASH"; case DUMP_HEAP: return "DUMP_HEAP"; case DUMP_ACTIVITY: return "DUMP_ACTIVITY"; + case SLEEPING: return "SLEEPING"; } } return "(unknown)"; @@ -1101,6 +1107,9 @@ public final class ActivityThread { case DUMP_ACTIVITY: handleDumpActivity((DumpComponentInfo)msg.obj); break; + case SLEEPING: + handleSleeping((IBinder)msg.obj, msg.arg1 != 0); + break; } if (DEBUG_MESSAGES) Slog.v(TAG, "<<< done: " + msg.what); } @@ -2615,6 +2624,42 @@ public final class ActivityThread { } } + private final void handleSleeping(IBinder token, boolean sleeping) { + ActivityClientRecord r = mActivities.get(token); + + if (r == null) { + Log.w(TAG, "handleSleeping: no activity for token " + token); + return; + } + + if (sleeping) { + if (!r.stopped && !r.isPreHoneycomb()) { + try { + // Now we are idle. + r.activity.performStop(); + } catch (Exception e) { + if (!mInstrumentation.onException(r.activity, e)) { + throw new RuntimeException( + "Unable to stop activity " + + r.intent.getComponent().toShortString() + + ": " + e.toString(), e); + } + } + r.stopped = true; + } + // Tell activity manager we slept. + try { + ActivityManagerNative.getDefault().activitySlept(r.token); + } catch (RemoteException ex) { + } + } else { + if (r.stopped && r.activity.mVisibleFromServer) { + r.activity.performRestart(); + r.stopped = false; + } + } + } + private final void deliverResults(ActivityClientRecord r, List<ResultInfo> results) { final int N = results.size(); for (int i=0; i<N; i++) { diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java index d28e8533ce6a..ef929333823c 100644 --- a/core/java/android/app/ApplicationThreadNative.java +++ b/core/java/android/app/ApplicationThreadNative.java @@ -97,6 +97,15 @@ public abstract class ApplicationThreadNative extends Binder return true; } + case SCHEDULE_SLEEPING_TRANSACTION: + { + data.enforceInterface(IApplicationThread.descriptor); + IBinder b = data.readStrongBinder(); + boolean sleeping = data.readInt() != 0; + scheduleSleeping(b, sleeping); + return true; + } + case SCHEDULE_RESUME_ACTIVITY_TRANSACTION: { data.enforceInterface(IApplicationThread.descriptor); @@ -503,6 +512,17 @@ class ApplicationThreadProxy implements IApplicationThread { data.recycle(); } + public final void scheduleSleeping(IBinder token, + boolean sleeping) throws RemoteException { + Parcel data = Parcel.obtain(); + data.writeInterfaceToken(IApplicationThread.descriptor); + data.writeStrongBinder(token); + data.writeInt(sleeping ? 1 : 0); + mRemote.transact(SCHEDULE_SLEEPING_TRANSACTION, data, null, + IBinder.FLAG_ONEWAY); + data.recycle(); + } + public final void scheduleResumeActivity(IBinder token, boolean isForward) throws RemoteException { Parcel data = Parcel.obtain(); diff --git a/core/java/android/app/IActivityManager.java b/core/java/android/app/IActivityManager.java index abffbdb296f3..5d4380b3c18c 100644 --- a/core/java/android/app/IActivityManager.java +++ b/core/java/android/app/IActivityManager.java @@ -124,6 +124,8 @@ public interface IActivityManager extends IInterface { public void activityStopped(IBinder token, Bundle state, Bitmap thumbnail, CharSequence description) throws RemoteException; /* oneway */ + public void activitySlept(IBinder token) throws RemoteException; + /* oneway */ public void activityDestroyed(IBinder token) throws RemoteException; public String getCallingPackage(IBinder token) throws RemoteException; public ComponentName getCallingActivity(IBinder token) throws RemoteException; @@ -553,4 +555,5 @@ public interface IActivityManager extends IInterface { int DUMP_HEAP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+119; int START_ACTIVITIES_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+120; int START_ACTIVITIES_IN_PACKAGE_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+121; + int ACTIVITY_SLEPT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+122; } diff --git a/core/java/android/app/IApplicationThread.java b/core/java/android/app/IApplicationThread.java index ecd199c4993c..16c3c5cf1985 100644 --- a/core/java/android/app/IApplicationThread.java +++ b/core/java/android/app/IApplicationThread.java @@ -48,6 +48,7 @@ public interface IApplicationThread extends IInterface { void scheduleStopActivity(IBinder token, boolean showWindow, int configChanges) throws RemoteException; void scheduleWindowVisibility(IBinder token, boolean showWindow) throws RemoteException; + void scheduleSleeping(IBinder token, boolean sleeping) throws RemoteException; void scheduleResumeActivity(IBinder token, boolean isForward) throws RemoteException; void scheduleSendResult(IBinder token, List<ResultInfo> results) throws RemoteException; void scheduleLaunchActivity(Intent intent, IBinder token, int ident, @@ -137,7 +138,7 @@ public interface IApplicationThread extends IInterface { int SCHEDULE_LOW_MEMORY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+23; int SCHEDULE_ACTIVITY_CONFIGURATION_CHANGED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+24; int SCHEDULE_RELAUNCH_ACTIVITY_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+25; - + int SCHEDULE_SLEEPING_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+26; int PROFILER_CONTROL_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+27; int SET_SCHEDULING_GROUP_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+28; int SCHEDULE_CREATE_BACKUP_AGENT_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION+29; diff --git a/core/java/android/bluetooth/BluetoothDeviceProfileState.java b/core/java/android/bluetooth/BluetoothDeviceProfileState.java index 3280d39accab..6ec347f65b79 100644 --- a/core/java/android/bluetooth/BluetoothDeviceProfileState.java +++ b/core/java/android/bluetooth/BluetoothDeviceProfileState.java @@ -82,6 +82,7 @@ public final class BluetoothDeviceProfileState extends HierarchicalStateMachine public static final int TRANSITION_TO_STABLE = 102; public static final int CONNECT_OTHER_PROFILES = 103; + private static final int AUTO_CONNECT_DELAY = 6000; // 6 secs private static final int CONNECT_OTHER_PROFILES_DELAY = 4000; // 4 secs private BondedDevice mBondedDevice = new BondedDevice(); @@ -1010,8 +1011,9 @@ public final class BluetoothDeviceProfileState extends HierarchicalStateMachine case CONNECT_HFP_INCOMING: // Connect A2DP if there is no incoming connection // If the priority is OFF - don't auto connect. - // If the priority is AUTO_CONNECT, auto connect code takes care. - if (mA2dpService.getPriority(mDevice) == BluetoothProfile.PRIORITY_ON) { + if (mA2dpService.getPriority(mDevice) == BluetoothProfile.PRIORITY_ON || + mA2dpService.getPriority(mDevice) == + BluetoothProfile.PRIORITY_AUTO_CONNECT) { Message msg = new Message(); msg.what = CONNECT_OTHER_PROFILES; msg.arg1 = CONNECT_A2DP_OUTGOING; @@ -1023,7 +1025,9 @@ public final class BluetoothDeviceProfileState extends HierarchicalStateMachine // before A2DP, so we should not hit this case. But many devices // don't follow this. if (mHeadsetService != null && - mHeadsetService.getPriority(mDevice) == BluetoothProfile.PRIORITY_ON) { + (mHeadsetService.getPriority(mDevice) == BluetoothProfile.PRIORITY_ON || + mHeadsetService.getPriority(mDevice) == + BluetoothProfile.PRIORITY_AUTO_CONNECT)) { Message msg = new Message(); msg.what = CONNECT_OTHER_PROFILES; msg.arg1 = CONNECT_HFP_OUTGOING; diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index 6b41ce5cf057..edad4943fcf5 100644 --- a/core/java/android/view/ViewConfiguration.java +++ b/core/java/android/view/ViewConfiguration.java @@ -17,6 +17,7 @@ package android.view; import android.content.Context; +import android.content.res.Configuration; import android.util.DisplayMetrics; import android.util.SparseArray; @@ -217,22 +218,29 @@ public class ViewConfiguration { private ViewConfiguration(Context context) { final DisplayMetrics metrics = context.getResources().getDisplayMetrics(); final float density = metrics.density; + final float sizeAndDensity; + if (context.getResources().getConfiguration().isLayoutSizeAtLeast( + Configuration.SCREENLAYOUT_SIZE_XLARGE)) { + sizeAndDensity = density * 1.5f; + } else { + sizeAndDensity = density; + } - mEdgeSlop = (int) (density * EDGE_SLOP + 0.5f); - mFadingEdgeLength = (int) (density * FADING_EDGE_LENGTH + 0.5f); + mEdgeSlop = (int) (sizeAndDensity * EDGE_SLOP + 0.5f); + mFadingEdgeLength = (int) (sizeAndDensity * FADING_EDGE_LENGTH + 0.5f); mMinimumFlingVelocity = (int) (density * MINIMUM_FLING_VELOCITY + 0.5f); mMaximumFlingVelocity = (int) (density * MAXIMUM_FLING_VELOCITY + 0.5f); mScrollbarSize = (int) (density * SCROLL_BAR_SIZE + 0.5f); - mTouchSlop = (int) (density * TOUCH_SLOP + 0.5f); - mPagingTouchSlop = (int) (density * PAGING_TOUCH_SLOP + 0.5f); - mDoubleTapSlop = (int) (density * DOUBLE_TAP_SLOP + 0.5f); - mWindowTouchSlop = (int) (density * WINDOW_TOUCH_SLOP + 0.5f); + mTouchSlop = (int) (sizeAndDensity * TOUCH_SLOP + 0.5f); + mPagingTouchSlop = (int) (sizeAndDensity * PAGING_TOUCH_SLOP + 0.5f); + mDoubleTapSlop = (int) (sizeAndDensity * DOUBLE_TAP_SLOP + 0.5f); + mWindowTouchSlop = (int) (sizeAndDensity * WINDOW_TOUCH_SLOP + 0.5f); // Size of the screen in bytes, in ARGB_8888 format mMaximumDrawingCacheSize = 4 * metrics.widthPixels * metrics.heightPixels; - mOverscrollDistance = (int) (density * OVERSCROLL_DISTANCE + 0.5f); - mOverflingDistance = (int) (density * OVERFLING_DISTANCE + 0.5f); + mOverscrollDistance = (int) (sizeAndDensity * OVERSCROLL_DISTANCE + 0.5f); + mOverflingDistance = (int) (sizeAndDensity * OVERFLING_DISTANCE + 0.5f); } /** diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java index ad101f862c86..8a9b78be4ddd 100644 --- a/core/java/android/view/ViewRoot.java +++ b/core/java/android/view/ViewRoot.java @@ -1133,7 +1133,7 @@ public final class ViewRoot extends Handler implements ViewParent, if (DEBUG_LAYOUT) Log.v(TAG, "Ooops, something changed! mWidth=" + mWidth + " measuredWidth=" + host.getMeasuredWidth() + " mHeight=" + mHeight - + " measuredHeight" + host.getMeasuredHeight() + + " measuredHeight=" + host.getMeasuredHeight() + " coveredInsetsChanged=" + contentInsetsChanged); // Ask host how big it wants to be diff --git a/core/res/res/anim/activity_close_enter.xml b/core/res/res/anim/activity_close_enter.xml index d52512705ca6..4260c0893eaf 100644 --- a/core/res/res/anim/activity_close_enter.xml +++ b/core/res/res/anim/activity_close_enter.xml @@ -18,14 +18,14 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="normal" + android:zAdjustment="top" android:shareInterpolator="false"> <scale android:fromXScale="0.975" android:toXScale="1.0" android:fromYScale="0.975" android:toYScale="1.0" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/decelerate_quint" android:duration="@android:integer/config_activityDefaultDur" /> - <alpha android:fromAlpha=".75" android:toAlpha="1.0" + <alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:interpolator="@interpolator/decelerate_cubic" android:duration="@android:integer/config_activityDefaultDur"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/activity_close_exit.xml b/core/res/res/anim/activity_close_exit.xml index ab7adcb40fbe..8c97ee8a8cb5 100644 --- a/core/res/res/anim/activity_close_exit.xml +++ b/core/res/res/anim/activity_close_exit.xml @@ -18,14 +18,11 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="top" + android:zAdjustment="normal" android:shareInterpolator="false"> <scale android:fromXScale="1.0" android:toXScale="1.075" android:fromYScale="1.0" android:toYScale="1.075" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/decelerate_quint" android:duration="@android:integer/config_activityDefaultDur" /> - <alpha android:fromAlpha="1.0" android:toAlpha="0.0" - android:interpolator="@interpolator/decelerate_cubic" - android:duration="@android:integer/config_activityDefaultDur"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/activity_open_enter.xml b/core/res/res/anim/activity_open_enter.xml index 90f852090d4a..5f6ac68935f7 100644 --- a/core/res/res/anim/activity_open_enter.xml +++ b/core/res/res/anim/activity_open_enter.xml @@ -18,14 +18,11 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="top" + android:zAdjustment="normal" android:shareInterpolator="false"> <scale android:fromXScale="1.125" android:toXScale="1.0" android:fromYScale="1.125" android:toYScale="1.0" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/decelerate_quint" android:duration="@android:integer/config_activityDefaultDur" /> - <alpha android:fromAlpha="0.0" android:toAlpha="1.0" - android:interpolator="@interpolator/decelerate_cubic" - android:duration="@android:integer/config_activityDefaultDur"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/activity_open_exit.xml b/core/res/res/anim/activity_open_exit.xml index 30a1dece97cc..08b22b96a099 100644 --- a/core/res/res/anim/activity_open_exit.xml +++ b/core/res/res/anim/activity_open_exit.xml @@ -18,14 +18,14 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="normal" + android:zAdjustment="top" android:shareInterpolator="false"> <scale android:fromXScale="1.0" android:toXScale="0.975" android:fromYScale="1.0" android:toYScale="0.975" android:pivotX="50%p" android:pivotY="50%p" android:interpolator="@interpolator/linear" android:duration="@android:integer/config_activityDefaultDur" /> - <alpha android:fromAlpha="1.0" android:toAlpha="0.75" + <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:interpolator="@interpolator/decelerate_cubic" android:duration="@android:integer/config_activityDefaultDur"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/task_open_enter.xml b/core/res/res/anim/task_open_enter.xml index e3e8585b3640..b3b3fd1155e4 100644 --- a/core/res/res/anim/task_open_enter.xml +++ b/core/res/res/anim/task_open_enter.xml @@ -18,7 +18,7 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:shareInterpolator="false"> + android:detachWallpaper="true" android:shareInterpolator="false"> <scale android:fromXScale="1.0" android:toXScale="1.0" android:fromYScale=".9" android:toYScale="1.0" android:pivotX="50%p" android:pivotY="50%p" diff --git a/core/res/res/anim/task_open_exit.xml b/core/res/res/anim/task_open_exit.xml index 5f03516f4e38..763b581dfb06 100644 --- a/core/res/res/anim/task_open_exit.xml +++ b/core/res/res/anim/task_open_exit.xml @@ -18,7 +18,7 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:shareInterpolator="false"> + android:detachWallpaper="true" android:shareInterpolator="false"> <scale android:fromXScale="1.0" android:toXScale="1.0" android:fromYScale="1.0" android:toYScale="0.0" android:pivotX="50%p" android:pivotY="50%p" diff --git a/core/res/res/drawable-hdpi/btn_check_off_disabled_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_off_disabled_focused_holo_dark.png Binary files differindex c0f0d16760ea..46194d8b544a 100644 --- a/core/res/res/drawable-hdpi/btn_check_off_disabled_focused_holo_dark.png +++ b/core/res/res/drawable-hdpi/btn_check_off_disabled_focused_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_check_off_disabled_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_check_off_disabled_focused_holo_light.png Binary files differindex ba03d28c081d..fe11736eadfb 100644 --- a/core/res/res/drawable-hdpi/btn_check_off_disabled_focused_holo_light.png +++ b/core/res/res/drawable-hdpi/btn_check_off_disabled_focused_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_check_off_disabled_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_off_disabled_holo_dark.png Binary files differindex a320240dd0d4..f312dc42eb00 100644 --- a/core/res/res/drawable-hdpi/btn_check_off_disabled_holo_dark.png +++ b/core/res/res/drawable-hdpi/btn_check_off_disabled_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_check_off_disabled_holo_light.png b/core/res/res/drawable-hdpi/btn_check_off_disabled_holo_light.png Binary files differindex 7f48c54f20fe..b7a8c5f45d51 100644 --- a/core/res/res/drawable-hdpi/btn_check_off_disabled_holo_light.png +++ b/core/res/res/drawable-hdpi/btn_check_off_disabled_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_check_off_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_off_focused_holo_dark.png Binary files differindex 82b7ba7177a6..a11b1285efef 100644 --- a/core/res/res/drawable-hdpi/btn_check_off_focused_holo_dark.png +++ b/core/res/res/drawable-hdpi/btn_check_off_focused_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_check_off_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_check_off_focused_holo_light.png Binary files differindex 69ecf0556773..40091d121c0c 100644 --- a/core/res/res/drawable-hdpi/btn_check_off_focused_holo_light.png +++ b/core/res/res/drawable-hdpi/btn_check_off_focused_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_check_off_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_off_holo_dark.png Binary files differindex 4148ac4072a5..00175badf1b4 100644 --- a/core/res/res/drawable-hdpi/btn_check_off_holo_dark.png +++ b/core/res/res/drawable-hdpi/btn_check_off_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_check_off_holo_light.png b/core/res/res/drawable-hdpi/btn_check_off_holo_light.png Binary files differindex 2cc946f38864..f8a34dcc8d85 100644 --- a/core/res/res/drawable-hdpi/btn_check_off_holo_light.png +++ b/core/res/res/drawable-hdpi/btn_check_off_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_check_off_pressed_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_off_pressed_holo_dark.png Binary files differindex c18e18bae66b..5b9a8891389b 100644 --- a/core/res/res/drawable-hdpi/btn_check_off_pressed_holo_dark.png +++ b/core/res/res/drawable-hdpi/btn_check_off_pressed_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_check_off_pressed_holo_light.png b/core/res/res/drawable-hdpi/btn_check_off_pressed_holo_light.png Binary files differindex 258c3d318288..7f3426ff87b8 100644 --- a/core/res/res/drawable-hdpi/btn_check_off_pressed_holo_light.png +++ b/core/res/res/drawable-hdpi/btn_check_off_pressed_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_check_off_selected_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_off_selected_holo_dark.png Binary files differdeleted file mode 100644 index f8199283b3dc..000000000000 --- a/core/res/res/drawable-hdpi/btn_check_off_selected_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_check_off_selected_holo_light.png b/core/res/res/drawable-hdpi/btn_check_off_selected_holo_light.png Binary files differdeleted file mode 100644 index 57cb5121305f..000000000000 --- a/core/res/res/drawable-hdpi/btn_check_off_selected_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_dark.png Binary files differindex e63e5a580777..9f57be89c4ac 100644 --- a/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_dark.png +++ b/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_light.png Binary files differindex 37415e02cc99..1a26bf69c49e 100644 --- a/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_light.png +++ b/core/res/res/drawable-hdpi/btn_check_on_disabled_focused_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_dark.png Binary files differindex 77a311527070..9e74f82604c0 100644 --- a/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_dark.png +++ b/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_light.png b/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_light.png Binary files differindex 51993e3ce093..8143700ab160 100644 --- a/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_light.png +++ b/core/res/res/drawable-hdpi/btn_check_on_disabled_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_check_on_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_on_focused_holo_dark.png Binary files differindex 817adf7179a3..c641801d98dd 100644 --- a/core/res/res/drawable-hdpi/btn_check_on_focused_holo_dark.png +++ b/core/res/res/drawable-hdpi/btn_check_on_focused_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_check_on_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_check_on_focused_holo_light.png Binary files differindex 645924028953..895b61d95b7b 100644 --- a/core/res/res/drawable-hdpi/btn_check_on_focused_holo_light.png +++ b/core/res/res/drawable-hdpi/btn_check_on_focused_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_check_on_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_on_holo_dark.png Binary files differindex d0c441545880..c0ffb410aa70 100644 --- a/core/res/res/drawable-hdpi/btn_check_on_holo_dark.png +++ b/core/res/res/drawable-hdpi/btn_check_on_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_check_on_holo_light.png b/core/res/res/drawable-hdpi/btn_check_on_holo_light.png Binary files differindex af84d4b0dbcb..466adf28c9f4 100644 --- a/core/res/res/drawable-hdpi/btn_check_on_holo_light.png +++ b/core/res/res/drawable-hdpi/btn_check_on_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_dark.png Binary files differindex 1333cb101293..fc542d99cea3 100644 --- a/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_dark.png +++ b/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_light.png b/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_light.png Binary files differindex 44133288da1f..a5f8f936ccf1 100644 --- a/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_light.png +++ b/core/res/res/drawable-hdpi/btn_check_on_pressed_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_check_on_selected_holo_dark.png b/core/res/res/drawable-hdpi/btn_check_on_selected_holo_dark.png Binary files differdeleted file mode 100644 index e758aab69fa2..000000000000 --- a/core/res/res/drawable-hdpi/btn_check_on_selected_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_check_on_selected_holo_light.png b/core/res/res/drawable-hdpi/btn_check_on_selected_holo_light.png Binary files differdeleted file mode 100644 index 2edf656a36fb..000000000000 --- a/core/res/res/drawable-hdpi/btn_check_on_selected_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_disabled_off_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_disabled_off_holo_dark.png Binary files differdeleted file mode 100644 index 4fdf5ce70ea6..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_disabled_off_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_disabled_off_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_disabled_off_holo_light.png Binary files differdeleted file mode 100644 index e70f8c3feca6..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_disabled_off_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_disabled_on_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_disabled_on_holo_dark.png Binary files differdeleted file mode 100644 index c28d6cdf9f98..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_disabled_on_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_disabled_on_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_disabled_on_holo_light.png Binary files differdeleted file mode 100644 index ebf4da63e143..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_disabled_on_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_focused_off_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_focused_off_holo_dark.png Binary files differdeleted file mode 100644 index 9a5455c32d56..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_focused_off_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_focused_off_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_focused_off_holo_light.png Binary files differdeleted file mode 100644 index 9648df2c23f5..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_focused_off_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_focused_on_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_focused_on_holo_dark.png Binary files differdeleted file mode 100644 index cd59fab6a45b..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_focused_on_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_focused_on_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_focused_on_holo_light.png Binary files differdeleted file mode 100644 index 4da6192eb5f7..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_focused_on_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_normal_off_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_normal_off_holo_dark.png Binary files differdeleted file mode 100644 index f18c6dacacc4..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_normal_off_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_normal_off_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_normal_off_holo_light.png Binary files differdeleted file mode 100644 index 70afefc1e136..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_normal_off_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_normal_on_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_normal_on_holo_dark.png Binary files differdeleted file mode 100644 index fdf1586b99e1..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_normal_on_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_normal_on_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_normal_on_holo_light.png Binary files differdeleted file mode 100644 index 457038a67341..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_normal_on_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_dark.png Binary files differnew file mode 100644 index 000000000000..39f1ca48d60b --- /dev/null +++ b/core/res/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_light.png Binary files differnew file mode 100644 index 000000000000..04567599d4f9 --- /dev/null +++ b/core/res/res/drawable-hdpi/btn_radio_off_disabled_focused_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_radio_off_disabled_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_off_disabled_holo_dark.png Binary files differnew file mode 100644 index 000000000000..ccd468c9646c --- /dev/null +++ b/core/res/res/drawable-hdpi/btn_radio_off_disabled_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_radio_off_disabled_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_off_disabled_holo_light.png Binary files differnew file mode 100644 index 000000000000..44a0b53abc02 --- /dev/null +++ b/core/res/res/drawable-hdpi/btn_radio_off_disabled_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_radio_off_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_off_focused_holo_dark.png Binary files differnew file mode 100644 index 000000000000..20cfc23200a1 --- /dev/null +++ b/core/res/res/drawable-hdpi/btn_radio_off_focused_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_radio_off_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_off_focused_holo_light.png Binary files differnew file mode 100644 index 000000000000..c05dcd3f563a --- /dev/null +++ b/core/res/res/drawable-hdpi/btn_radio_off_focused_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_radio_off_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_off_holo_dark.png Binary files differindex dd18b7afada7..328f662f9887 100644 --- a/core/res/res/drawable-hdpi/btn_radio_off_holo_dark.png +++ b/core/res/res/drawable-hdpi/btn_radio_off_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_radio_off_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_off_holo_light.png Binary files differindex 66d538f35aa5..1a1517717cb4 100644 --- a/core/res/res/drawable-hdpi/btn_radio_off_holo_light.png +++ b/core/res/res/drawable-hdpi/btn_radio_off_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_dark.png Binary files differindex 4e777f85dbae..c91b76f6f01e 100644 --- a/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_dark.png +++ b/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_light.png Binary files differindex 6062033df64a..4764c675d3db 100644 --- a/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_light.png +++ b/core/res/res/drawable-hdpi/btn_radio_off_pressed_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_radio_off_selected_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_off_selected_holo_dark.png Binary files differdeleted file mode 100644 index 683a883d807a..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_off_selected_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_off_selected_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_off_selected_holo_light.png Binary files differdeleted file mode 100644 index 19524ffe6ec7..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_off_selected_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_dark.png Binary files differnew file mode 100644 index 000000000000..5997c2d8b300 --- /dev/null +++ b/core/res/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_light.png Binary files differnew file mode 100644 index 000000000000..ee6c869cc7cd --- /dev/null +++ b/core/res/res/drawable-hdpi/btn_radio_on_disabled_focused_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_radio_on_disabled_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_on_disabled_holo_dark.png Binary files differnew file mode 100644 index 000000000000..f052e67cf697 --- /dev/null +++ b/core/res/res/drawable-hdpi/btn_radio_on_disabled_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_radio_on_disabled_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_on_disabled_holo_light.png Binary files differnew file mode 100644 index 000000000000..247d3062223f --- /dev/null +++ b/core/res/res/drawable-hdpi/btn_radio_on_disabled_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_radio_on_focused_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_on_focused_holo_dark.png Binary files differnew file mode 100644 index 000000000000..f95f1551a450 --- /dev/null +++ b/core/res/res/drawable-hdpi/btn_radio_on_focused_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_radio_on_focused_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_on_focused_holo_light.png Binary files differnew file mode 100644 index 000000000000..7bebc96984b3 --- /dev/null +++ b/core/res/res/drawable-hdpi/btn_radio_on_focused_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_radio_on_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_on_holo_dark.png Binary files differindex 2e1111b48966..02319257d748 100644 --- a/core/res/res/drawable-hdpi/btn_radio_on_holo_dark.png +++ b/core/res/res/drawable-hdpi/btn_radio_on_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_radio_on_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_on_holo_light.png Binary files differindex 90639ecf3c3e..cfde3cbfdde4 100644 --- a/core/res/res/drawable-hdpi/btn_radio_on_holo_light.png +++ b/core/res/res/drawable-hdpi/btn_radio_on_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_dark.png Binary files differindex 190721537b63..0296a62ee518 100644 --- a/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_dark.png +++ b/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_dark.png diff --git a/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_light.png Binary files differindex b51c7ad215b1..697001227e99 100644 --- a/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_light.png +++ b/core/res/res/drawable-hdpi/btn_radio_on_pressed_holo_light.png diff --git a/core/res/res/drawable-hdpi/btn_radio_on_selected_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_on_selected_holo_dark.png Binary files differdeleted file mode 100644 index 06d39cc30698..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_on_selected_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_on_selected_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_on_selected_holo_light.png Binary files differdeleted file mode 100644 index 06a4314bf3e3..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_on_selected_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_pressed_off_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_pressed_off_holo_dark.png Binary files differdeleted file mode 100644 index aa10966c5494..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_pressed_off_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_pressed_off_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_pressed_off_holo_light.png Binary files differdeleted file mode 100644 index 8eaf738787d8..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_pressed_off_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_pressed_on_holo_dark.png b/core/res/res/drawable-hdpi/btn_radio_pressed_on_holo_dark.png Binary files differdeleted file mode 100644 index 674cc5550695..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_pressed_on_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-hdpi/btn_radio_pressed_on_holo_light.png b/core/res/res/drawable-hdpi/btn_radio_pressed_on_holo_light.png Binary files differdeleted file mode 100644 index b4f8800272b5..000000000000 --- a/core/res/res/drawable-hdpi/btn_radio_pressed_on_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_check_off_disabled_focused_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_off_disabled_focused_holo_dark.png Binary files differindex 7e5839280ab5..031a54bace0a 100644 --- a/core/res/res/drawable-mdpi/btn_check_off_disabled_focused_holo_dark.png +++ b/core/res/res/drawable-mdpi/btn_check_off_disabled_focused_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_check_off_disabled_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_check_off_disabled_focused_holo_light.png Binary files differindex d5c1f7cf8076..538e43c1371e 100644 --- a/core/res/res/drawable-mdpi/btn_check_off_disabled_focused_holo_light.png +++ b/core/res/res/drawable-mdpi/btn_check_off_disabled_focused_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_check_off_disabled_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_off_disabled_holo_dark.png Binary files differindex b6eec977721f..e988577819f5 100644 --- a/core/res/res/drawable-mdpi/btn_check_off_disabled_holo_dark.png +++ b/core/res/res/drawable-mdpi/btn_check_off_disabled_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_check_off_disabled_holo_light.png b/core/res/res/drawable-mdpi/btn_check_off_disabled_holo_light.png Binary files differindex 1bc34b6e47bf..156714ecba9b 100644 --- a/core/res/res/drawable-mdpi/btn_check_off_disabled_holo_light.png +++ b/core/res/res/drawable-mdpi/btn_check_off_disabled_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_check_off_focused_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_off_focused_holo_dark.png Binary files differindex 894836f89abd..3538aab46faf 100644 --- a/core/res/res/drawable-mdpi/btn_check_off_focused_holo_dark.png +++ b/core/res/res/drawable-mdpi/btn_check_off_focused_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_check_off_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_check_off_focused_holo_light.png Binary files differindex ae81a5eb9945..edc3f6459fa0 100644 --- a/core/res/res/drawable-mdpi/btn_check_off_focused_holo_light.png +++ b/core/res/res/drawable-mdpi/btn_check_off_focused_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_check_off_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_off_holo_dark.png Binary files differindex b03f3569c97e..d20b2aaef316 100644 --- a/core/res/res/drawable-mdpi/btn_check_off_holo_dark.png +++ b/core/res/res/drawable-mdpi/btn_check_off_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_check_off_holo_light.png b/core/res/res/drawable-mdpi/btn_check_off_holo_light.png Binary files differindex 9dbbd49c30aa..a80c349db3fb 100644 --- a/core/res/res/drawable-mdpi/btn_check_off_holo_light.png +++ b/core/res/res/drawable-mdpi/btn_check_off_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_check_off_pressed_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_off_pressed_holo_dark.png Binary files differindex 0f9f4f065eac..64bda7627440 100644 --- a/core/res/res/drawable-mdpi/btn_check_off_pressed_holo_dark.png +++ b/core/res/res/drawable-mdpi/btn_check_off_pressed_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_check_off_pressed_holo_light.png b/core/res/res/drawable-mdpi/btn_check_off_pressed_holo_light.png Binary files differindex 77ad452d5e3d..39c9ea4bb9a3 100644 --- a/core/res/res/drawable-mdpi/btn_check_off_pressed_holo_light.png +++ b/core/res/res/drawable-mdpi/btn_check_off_pressed_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_check_off_selected_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_off_selected_holo_dark.png Binary files differdeleted file mode 100644 index 89ea3a8b237b..000000000000 --- a/core/res/res/drawable-mdpi/btn_check_off_selected_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_check_off_selected_holo_light.png b/core/res/res/drawable-mdpi/btn_check_off_selected_holo_light.png Binary files differdeleted file mode 100644 index 3fa45d9eb856..000000000000 --- a/core/res/res/drawable-mdpi/btn_check_off_selected_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_check_on_disabled_focused_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_on_disabled_focused_holo_dark.png Binary files differindex 28bf7f65da25..6db6c5dd16e8 100644 --- a/core/res/res/drawable-mdpi/btn_check_on_disabled_focused_holo_dark.png +++ b/core/res/res/drawable-mdpi/btn_check_on_disabled_focused_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_check_on_disabled_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_check_on_disabled_focused_holo_light.png Binary files differindex bb2d3147aa73..595261f3490e 100644 --- a/core/res/res/drawable-mdpi/btn_check_on_disabled_focused_holo_light.png +++ b/core/res/res/drawable-mdpi/btn_check_on_disabled_focused_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_check_on_disabled_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_on_disabled_holo_dark.png Binary files differindex 8cf45544e81e..f1129ef43028 100644 --- a/core/res/res/drawable-mdpi/btn_check_on_disabled_holo_dark.png +++ b/core/res/res/drawable-mdpi/btn_check_on_disabled_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_check_on_disabled_holo_light.png b/core/res/res/drawable-mdpi/btn_check_on_disabled_holo_light.png Binary files differindex ba37f93629ed..c49dcc988ff1 100644 --- a/core/res/res/drawable-mdpi/btn_check_on_disabled_holo_light.png +++ b/core/res/res/drawable-mdpi/btn_check_on_disabled_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_check_on_focused_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_on_focused_holo_dark.png Binary files differindex 1fca0947b560..423076cc8373 100644 --- a/core/res/res/drawable-mdpi/btn_check_on_focused_holo_dark.png +++ b/core/res/res/drawable-mdpi/btn_check_on_focused_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_check_on_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_check_on_focused_holo_light.png Binary files differindex 21c33f03af68..e8b9a3bb060b 100644 --- a/core/res/res/drawable-mdpi/btn_check_on_focused_holo_light.png +++ b/core/res/res/drawable-mdpi/btn_check_on_focused_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_check_on_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_on_holo_dark.png Binary files differindex ca4d509e7261..e33fbabe7680 100644 --- a/core/res/res/drawable-mdpi/btn_check_on_holo_dark.png +++ b/core/res/res/drawable-mdpi/btn_check_on_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_check_on_holo_light.png b/core/res/res/drawable-mdpi/btn_check_on_holo_light.png Binary files differindex 158f3a1cd181..8fdb3429ac7d 100644 --- a/core/res/res/drawable-mdpi/btn_check_on_holo_light.png +++ b/core/res/res/drawable-mdpi/btn_check_on_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_check_on_pressed_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_on_pressed_holo_dark.png Binary files differindex 84733fb400da..6690f644168a 100644 --- a/core/res/res/drawable-mdpi/btn_check_on_pressed_holo_dark.png +++ b/core/res/res/drawable-mdpi/btn_check_on_pressed_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_check_on_pressed_holo_light.png b/core/res/res/drawable-mdpi/btn_check_on_pressed_holo_light.png Binary files differindex 67a15d23c988..b7df43ea486f 100644 --- a/core/res/res/drawable-mdpi/btn_check_on_pressed_holo_light.png +++ b/core/res/res/drawable-mdpi/btn_check_on_pressed_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_check_on_selected_holo_dark.png b/core/res/res/drawable-mdpi/btn_check_on_selected_holo_dark.png Binary files differdeleted file mode 100644 index 5b93f8b6e9f7..000000000000 --- a/core/res/res/drawable-mdpi/btn_check_on_selected_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_check_on_selected_holo_light.png b/core/res/res/drawable-mdpi/btn_check_on_selected_holo_light.png Binary files differdeleted file mode 100644 index 74ab2504e582..000000000000 --- a/core/res/res/drawable-mdpi/btn_check_on_selected_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_disabled_off_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_disabled_off_holo_dark.png Binary files differdeleted file mode 100644 index f93718287528..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_disabled_off_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_disabled_off_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_disabled_off_holo_light.png Binary files differdeleted file mode 100644 index 4c35fb3bd3ca..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_disabled_off_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_disabled_on_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_disabled_on_holo_dark.png Binary files differdeleted file mode 100644 index af38a4fd3420..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_disabled_on_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_disabled_on_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_disabled_on_holo_light.png Binary files differdeleted file mode 100644 index a368602f2de4..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_disabled_on_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_focused_off_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_focused_off_holo_dark.png Binary files differdeleted file mode 100644 index 695d0b9c1da7..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_focused_off_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_focused_off_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_focused_off_holo_light.png Binary files differdeleted file mode 100644 index 6467bea73b02..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_focused_off_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_focused_on_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_focused_on_holo_dark.png Binary files differdeleted file mode 100644 index 813a069db91d..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_focused_on_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_focused_on_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_focused_on_holo_light.png Binary files differdeleted file mode 100644 index fe80d6977adc..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_focused_on_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_normal_off_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_normal_off_holo_dark.png Binary files differdeleted file mode 100644 index 5b6d906c6476..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_normal_off_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_normal_off_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_normal_off_holo_light.png Binary files differdeleted file mode 100644 index e5132ef68f88..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_normal_off_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_normal_on_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_normal_on_holo_dark.png Binary files differdeleted file mode 100644 index e216d35e3397..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_normal_on_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_normal_on_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_normal_on_holo_light.png Binary files differdeleted file mode 100644 index ed3946ac852b..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_normal_on_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_dark.png Binary files differnew file mode 100644 index 000000000000..480ef44a4878 --- /dev/null +++ b/core/res/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_light.png Binary files differnew file mode 100644 index 000000000000..eaac9164d4e3 --- /dev/null +++ b/core/res/res/drawable-mdpi/btn_radio_off_disabled_focused_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_radio_off_disabled_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_off_disabled_holo_dark.png Binary files differnew file mode 100644 index 000000000000..712b2677ca7b --- /dev/null +++ b/core/res/res/drawable-mdpi/btn_radio_off_disabled_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_radio_off_disabled_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_off_disabled_holo_light.png Binary files differnew file mode 100644 index 000000000000..e692b38275f3 --- /dev/null +++ b/core/res/res/drawable-mdpi/btn_radio_off_disabled_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_radio_off_focused_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_off_focused_holo_dark.png Binary files differnew file mode 100644 index 000000000000..2f27022fc126 --- /dev/null +++ b/core/res/res/drawable-mdpi/btn_radio_off_focused_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_radio_off_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_off_focused_holo_light.png Binary files differnew file mode 100644 index 000000000000..20a98b39b4d5 --- /dev/null +++ b/core/res/res/drawable-mdpi/btn_radio_off_focused_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_radio_off_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_off_holo_dark.png Binary files differindex a3cef04d9d41..93edad2174d1 100644 --- a/core/res/res/drawable-mdpi/btn_radio_off_holo_dark.png +++ b/core/res/res/drawable-mdpi/btn_radio_off_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_radio_off_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_off_holo_light.png Binary files differindex e8def559e536..c67e9fbb93f1 100644 --- a/core/res/res/drawable-mdpi/btn_radio_off_holo_light.png +++ b/core/res/res/drawable-mdpi/btn_radio_off_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_dark.png Binary files differindex 1a9310b43c96..46ebc0d68e0c 100644 --- a/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_dark.png +++ b/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_light.png Binary files differindex bc28b5b1a6fe..8052955462c4 100644 --- a/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_light.png +++ b/core/res/res/drawable-mdpi/btn_radio_off_pressed_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_radio_off_selected_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_off_selected_holo_dark.png Binary files differdeleted file mode 100644 index 2b0ddd1177e8..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_off_selected_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_off_selected_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_off_selected_holo_light.png Binary files differdeleted file mode 100644 index 745cf192bc08..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_off_selected_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_dark.png Binary files differnew file mode 100644 index 000000000000..7bd427611987 --- /dev/null +++ b/core/res/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_light.png Binary files differnew file mode 100644 index 000000000000..0473f84c8d33 --- /dev/null +++ b/core/res/res/drawable-mdpi/btn_radio_on_disabled_focused_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_radio_on_disabled_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_on_disabled_holo_dark.png Binary files differnew file mode 100644 index 000000000000..d92d7ee4db8b --- /dev/null +++ b/core/res/res/drawable-mdpi/btn_radio_on_disabled_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_radio_on_disabled_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_on_disabled_holo_light.png Binary files differnew file mode 100644 index 000000000000..f10cbd3783ec --- /dev/null +++ b/core/res/res/drawable-mdpi/btn_radio_on_disabled_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_radio_on_focused_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_on_focused_holo_dark.png Binary files differnew file mode 100644 index 000000000000..3ec97a3e5fb3 --- /dev/null +++ b/core/res/res/drawable-mdpi/btn_radio_on_focused_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_radio_on_focused_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_on_focused_holo_light.png Binary files differnew file mode 100644 index 000000000000..6624511cfccf --- /dev/null +++ b/core/res/res/drawable-mdpi/btn_radio_on_focused_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_radio_on_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_on_holo_dark.png Binary files differindex 9954500178b0..78262054a055 100644 --- a/core/res/res/drawable-mdpi/btn_radio_on_holo_dark.png +++ b/core/res/res/drawable-mdpi/btn_radio_on_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_radio_on_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_on_holo_light.png Binary files differindex fa67a4397e58..ed5acc92c110 100644 --- a/core/res/res/drawable-mdpi/btn_radio_on_holo_light.png +++ b/core/res/res/drawable-mdpi/btn_radio_on_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_dark.png Binary files differindex c15c310941d9..fad9d2a0d73d 100644 --- a/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_dark.png +++ b/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_dark.png diff --git a/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_light.png Binary files differindex aa07c5ac0296..f5d5453f28d9 100644 --- a/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_light.png +++ b/core/res/res/drawable-mdpi/btn_radio_on_pressed_holo_light.png diff --git a/core/res/res/drawable-mdpi/btn_radio_on_selected_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_on_selected_holo_dark.png Binary files differdeleted file mode 100644 index e96a74f11277..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_on_selected_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_on_selected_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_on_selected_holo_light.png Binary files differdeleted file mode 100644 index c51c96c1ddd6..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_on_selected_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_pressed_off_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_pressed_off_holo_dark.png Binary files differdeleted file mode 100644 index 9ab32d1fbc6d..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_pressed_off_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_pressed_off_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_pressed_off_holo_light.png Binary files differdeleted file mode 100644 index 717585355d14..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_pressed_off_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_pressed_on_holo_dark.png b/core/res/res/drawable-mdpi/btn_radio_pressed_on_holo_dark.png Binary files differdeleted file mode 100644 index a6fa7b60600e..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_pressed_on_holo_dark.png +++ /dev/null diff --git a/core/res/res/drawable-mdpi/btn_radio_pressed_on_holo_light.png b/core/res/res/drawable-mdpi/btn_radio_pressed_on_holo_light.png Binary files differdeleted file mode 100644 index e7a634d553f0..000000000000 --- a/core/res/res/drawable-mdpi/btn_radio_pressed_on_holo_light.png +++ /dev/null diff --git a/core/res/res/drawable/btn_check_holo_dark.xml b/core/res/res/drawable/btn_check_holo_dark.xml index a163c2e56ead..cbdf44e3a777 100644 --- a/core/res/res/drawable/btn_check_holo_dark.xml +++ b/core/res/res/drawable/btn_check_holo_dark.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2008 The Android Open Source Project +<!-- Copyright (C) 2011 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. @@ -34,10 +34,10 @@ <item android:state_checked="true" android:state_focused="true" android:state_enabled="true" - android:drawable="@drawable/btn_check_on_selected_holo_dark" /> + android:drawable="@drawable/btn_check_on_focused_holo_dark" /> <item android:state_checked="false" android:state_focused="true" android:state_enabled="true" - android:drawable="@drawable/btn_check_off_selected_holo_dark" /> + android:drawable="@drawable/btn_check_off_focused_holo_dark" /> <item android:state_checked="false" android:state_enabled="true" diff --git a/core/res/res/drawable/btn_check_holo_light.xml b/core/res/res/drawable/btn_check_holo_light.xml index 5c49456bd18c..c8c2bee04189 100644 --- a/core/res/res/drawable/btn_check_holo_light.xml +++ b/core/res/res/drawable/btn_check_holo_light.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2008 The Android Open Source Project +<!-- Copyright (C) 2011 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. @@ -34,10 +34,10 @@ <item android:state_checked="true" android:state_focused="true" android:state_enabled="true" - android:drawable="@drawable/btn_check_on_selected_holo_light" /> + android:drawable="@drawable/btn_check_on_focused_holo_light" /> <item android:state_checked="false" android:state_focused="true" android:state_enabled="true" - android:drawable="@drawable/btn_check_off_selected_holo_light" /> + android:drawable="@drawable/btn_check_off_focused_holo_light" /> <item android:state_checked="false" android:state_enabled="true" diff --git a/core/res/res/drawable/btn_radio_holo_dark.xml b/core/res/res/drawable/btn_radio_holo_dark.xml index 8984f6da63e4..e35d5709de4c 100644 --- a/core/res/res/drawable/btn_radio_holo_dark.xml +++ b/core/res/res/drawable/btn_radio_holo_dark.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2008 The Android Open Source Project +<!-- Copyright (C) 2011 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. @@ -16,20 +16,44 @@ <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="true" android:state_window_focused="false" + android:state_enabled="true" android:drawable="@drawable/btn_radio_on_holo_dark" /> <item android:state_checked="false" android:state_window_focused="false" + android:state_enabled="true" android:drawable="@drawable/btn_radio_off_holo_dark" /> <item android:state_checked="true" android:state_pressed="true" + android:state_enabled="true" android:drawable="@drawable/btn_radio_on_pressed_holo_dark" /> <item android:state_checked="false" android:state_pressed="true" + android:state_enabled="true" android:drawable="@drawable/btn_radio_off_pressed_holo_dark" /> <item android:state_checked="true" android:state_focused="true" - android:drawable="@drawable/btn_radio_on_selected_holo_dark" /> + android:state_enabled="true" + android:drawable="@drawable/btn_radio_on_focused_holo_dark" /> <item android:state_checked="false" android:state_focused="true" - android:drawable="@drawable/btn_radio_off_selected_holo_dark" /> + android:state_enabled="true" + android:drawable="@drawable/btn_radio_off_focused_holo_dark" /> + + <item android:state_checked="false" android:state_enabled="true" + android:drawable="@drawable/btn_radio_off_holo_dark" /> + <item android:state_checked="true" android:state_enabled="true" + android:drawable="@drawable/btn_radio_on_holo_dark" /> + + <!-- Disabled states --> + + <item android:state_checked="true" android:state_window_focused="false" + android:drawable="@drawable/btn_radio_on_disabled_holo_dark" /> + <item android:state_checked="false" android:state_window_focused="false" + android:drawable="@drawable/btn_radio_off_disabled_holo_dark" /> + + <item android:state_checked="true" android:state_focused="true" + android:drawable="@drawable/btn_radio_on_disabled_focused_holo_dark" /> + <item android:state_checked="false" android:state_focused="true" + android:drawable="@drawable/btn_radio_off_disabled_focused_holo_dark" /> + + <item android:state_checked="false" android:drawable="@drawable/btn_radio_off_disabled_holo_dark" /> + <item android:state_checked="true" android:drawable="@drawable/btn_radio_on_disabled_holo_dark" /> - <item android:state_checked="false" android:drawable="@drawable/btn_radio_off_holo_dark" /> - <item android:state_checked="true" android:drawable="@drawable/btn_radio_on_holo_dark" /> </selector> diff --git a/core/res/res/drawable/btn_radio_holo_light.xml b/core/res/res/drawable/btn_radio_holo_light.xml index 001508c404ba..e2f1f84c8837 100644 --- a/core/res/res/drawable/btn_radio_holo_light.xml +++ b/core/res/res/drawable/btn_radio_holo_light.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2008 The Android Open Source Project +<!-- Copyright (C) 2011 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. @@ -16,20 +16,44 @@ <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="true" android:state_window_focused="false" + android:state_enabled="true" android:drawable="@drawable/btn_radio_on_holo_light" /> <item android:state_checked="false" android:state_window_focused="false" + android:state_enabled="true" android:drawable="@drawable/btn_radio_off_holo_light" /> <item android:state_checked="true" android:state_pressed="true" + android:state_enabled="true" android:drawable="@drawable/btn_radio_on_pressed_holo_light" /> <item android:state_checked="false" android:state_pressed="true" + android:state_enabled="true" android:drawable="@drawable/btn_radio_off_pressed_holo_light" /> <item android:state_checked="true" android:state_focused="true" - android:drawable="@drawable/btn_radio_on_selected_holo_light" /> + android:state_enabled="true" + android:drawable="@drawable/btn_radio_on_focused_holo_light" /> <item android:state_checked="false" android:state_focused="true" - android:drawable="@drawable/btn_radio_off_selected_holo_light" /> + android:state_enabled="true" + android:drawable="@drawable/btn_radio_off_focused_holo_light" /> + + <item android:state_checked="false" android:state_enabled="true" + android:drawable="@drawable/btn_radio_off_holo_light" /> + <item android:state_checked="true" android:state_enabled="true" + android:drawable="@drawable/btn_radio_on_holo_light" /> + + <!-- Disabled states --> + + <item android:state_checked="true" android:state_window_focused="false" + android:drawable="@drawable/btn_radio_on_disabled_holo_light" /> + <item android:state_checked="false" android:state_window_focused="false" + android:drawable="@drawable/btn_radio_off_disabled_holo_light" /> + + <item android:state_checked="true" android:state_focused="true" + android:drawable="@drawable/btn_radio_on_disabled_focused_holo_light" /> + <item android:state_checked="false" android:state_focused="true" + android:drawable="@drawable/btn_radio_off_disabled_focused_holo_light" /> + + <item android:state_checked="false" android:drawable="@drawable/btn_radio_off_disabled_holo_light" /> + <item android:state_checked="true" android:drawable="@drawable/btn_radio_on_disabled_holo_light" /> - <item android:state_checked="false" android:drawable="@drawable/btn_radio_off_holo_light" /> - <item android:state_checked="true" android:drawable="@drawable/btn_radio_on_holo_light" /> </selector> diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index a51a26d71579..d094bad5db2f 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -74,4 +74,6 @@ <!-- The width of the big icons in notifications. --> <dimen name="notification_large_icon_height">60dp</dimen> + <!-- Minimum width of the search view text entry area. --> + <dimen name="search_view_text_min_width">160dip</dimen> </resources> diff --git a/docs/html/sdk/preview/start.jd b/docs/html/sdk/preview/start.jd index ec01d0c4ae62..3bf70b36c729 100644 --- a/docs/html/sdk/preview/start.jd +++ b/docs/html/sdk/preview/start.jd @@ -39,7 +39,27 @@ older versions of Android.</p> </li> </ol> - +<h3>Code samples</h3> +<p>Many of the new features and APIs that are described in the <a href="{@docRoot}sdk/android-3.0.html#api"> +Android 3.0 Platform Preview</a> also have accompanying samples that help you understand how to use them. +To get the samples, download them from the SDK repository using the Android SDK Manager. After download +the samples are located in <code><sdk_root>/samples/android-Honeycomb</code>. The list of links +below helps you find samples for the features you are interested in:</p> +<ul> + <li><a href="{@docRoot}resources/samples/Honeycomb-Gallery/index.html">Honeycomb Gallery</a> - + A demo application highlighting how to use some of the new APIs in Honeycomb, including fragments, the action bar, + drag and drop, transition animations, and a stack widget.</li> + <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/index.html#Fragment">Fragments</a> + <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/ActionBarMechanics.html">Action Bar</a></li> + <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/content/ClipboardSample.html">Clipboard</a></li> + <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/DragAndDropDemo.html">Drag and Drop</a></li> + <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/List15.html"> + Multiple-choice selection for ListView and GridView</a></li> + <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/app/LoaderThrottle.html">Content Loaders</a></li> + <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/animation/index.html">Property Animation</a></li> + <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/SearchViewActionBar.html">Search View Widget</a></li> + <li><a href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/PopupMenu1.html">Popup Menu Widget</a></li> +</ul> <h2 id="Setup">Set Up the Preview SDK</h2> @@ -69,6 +89,16 @@ the target to "Android 3.0 (Preview)" and the skin to "WXGA".</li> computer and the WXGA screen is significantly larger than what the emulator normally handles, emulator performance is much slower than usual.</p> +<p>In particular, initializing the emulator can be slow and can take several +minutes, depending on your hardware. When the emulator is booting there is +limited user feedback, so please be patient and continue waiting until you see +the home screen appear. </p> + +<p>Note that you do not need to do a full boot of your emulator each time you +rebuild your application — typically you only need to boot at the start of +a session. See the Tips section below for information about using Snapshots to +cut startup time after first initialization. </p> + <p>We're working hard to resolve the performance issues and it will improve in future releases. Unfortunately, the emulator will perform slowly during your trial with the preview SDK. For the time being, the emulator is still best way to evaluate your application's appearance and functionality on @@ -127,7 +157,7 @@ application for larger screens.</p> </ol> </li> - <li><b>Apply the new "Holographic" theme to your application</b> + <li><b>Apply the new "holographic" theme to your application</b> <ol> <li>Open your manifest file and update the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">{@code <uses-sdk>}</a> element to @@ -187,8 +217,6 @@ href="{@docRoot}guide/practices/screens_support.html#screen-independence">Best P for Screen Independence</a>.</p> - - <h2 id="Upgrade">Upgrade or Develop a New App for Tablets and Similar Devices</h2> <p>If you want to develop something truly for tablet-type devices running Android 3.0, then you need @@ -262,5 +290,5 @@ href="{@docRoot}guide/topics/manifest/supports-screens-element.html">{@code <div class="special"> <p>To learn more about some of the new APIs, -see the <a href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform</a> document.</p> +see the <a href="{@docRoot}sdk/android-3.0.html">Android 3.0 Platform Preview</a> document.</p> </div> diff --git a/docs/html/sdk/requirements.jd b/docs/html/sdk/requirements.jd index 401dfe38e1bb..3d62dd9f9833 100644 --- a/docs/html/sdk/requirements.jd +++ b/docs/html/sdk/requirements.jd @@ -10,8 +10,8 @@ Android applications using the Android SDK. </p> <li>Mac OS X 10.5.8 or later (x86 only)</li> <li>Linux (tested on Ubuntu Linux, Lucid Lynx) <ul> - <li>GNU C Library (glibc) 2.11 or later is required.</li> - <li>On Ubuntu Linux, Lucid Lynx or later release is required.</li> + <li>GNU C Library (glibc) 2.7 or later is required.</li> + <li>On Ubuntu Linux, version 8.04 or later is required.</li> <li>64-bit distributions must be capable of running 32-bit applications. For information about how to add support for 32-bit applications, see the <a href="installing.html#troubleshooting">Ubuntu Linux diff --git a/libs/hwui/Caches.h b/libs/hwui/Caches.h index aa0ceb707451..24585d5a14e9 100644 --- a/libs/hwui/Caches.h +++ b/libs/hwui/Caches.h @@ -69,7 +69,7 @@ static const GLsizei gMeshCount = 4; struct CacheLogger { CacheLogger() { - LOGD("Creating caches"); + LOGD("Creating OpenGL renderer caches"); } }; // struct CacheLogger diff --git a/libs/hwui/Debug.h b/libs/hwui/Debug.h index 62366845e7a1..14471bc7b717 100644 --- a/libs/hwui/Debug.h +++ b/libs/hwui/Debug.h @@ -20,6 +20,9 @@ // Turn on to check for OpenGL errors on each frame #define DEBUG_OPENGL 1 +// Turn on to enable initialization information +#define DEBUG_INIT 0 + // Turn on to enable memory usage summary on each frame #define DEBUG_MEMORY_USAGE 0 @@ -54,4 +57,10 @@ // Turn on to dump display list state #define DEBUG_DISPLAY_LIST 0 +#if DEBUG_INIT + #define INIT_LOGD(...) LOGD(__VA_ARGS__) +#else + #define INIT_LOGD(...) +#endif + #endif // ANDROID_HWUI_DEBUG_H diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp index bdf056c2bf95..58ef7b3a1689 100644 --- a/libs/hwui/DisplayListRenderer.cpp +++ b/libs/hwui/DisplayListRenderer.cpp @@ -92,6 +92,7 @@ const char* DisplayList::OP_NAMES[] = { "Translate", "Rotate", "Scale", + "Skew", "SetMatrix", "ConcatMatrix", "ClipRect", @@ -472,6 +473,12 @@ void DisplayListRenderer::prepare(bool opaque) { SkCanvas::kMatrix_SaveFlag | SkCanvas::kClip_SaveFlag); mSaveCount = 1; mSnapshot->setClip(0.0f, 0.0f, mWidth, mHeight); + mRestoreSaveCount = -1; +} + +void DisplayListRenderer::finish() { + insertRestoreToCount(); + OpenGLRenderer::finish(); } void DisplayListRenderer::acquireContext() { @@ -496,8 +503,7 @@ void DisplayListRenderer::restore() { } void DisplayListRenderer::restoreToCount(int saveCount) { - addOp(DisplayList::RestoreToCount); - addInt(saveCount); + mRestoreSaveCount = saveCount; OpenGLRenderer::restoreToCount(saveCount); } diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h index 7f9db8a46e62..68e4359ee90c 100644 --- a/libs/hwui/DisplayListRenderer.h +++ b/libs/hwui/DisplayListRenderer.h @@ -238,6 +238,7 @@ public: void setViewport(int width, int height); void prepare(bool opaque); + void finish(); void acquireContext(); void releaseContext(); @@ -318,7 +319,16 @@ public: } private: + void insertRestoreToCount() { + if (mRestoreSaveCount >= 0) { + mWriter.writeInt(DisplayList::RestoreToCount); + addInt(mRestoreSaveCount); + mRestoreSaveCount = -1; + } + } + inline void addOp(DisplayList::Op drawOp) { + insertRestoreToCount(); mWriter.writeInt(drawOp); } @@ -461,6 +471,8 @@ private: DisplayList *mDisplayList; + int mRestoreSaveCount; + friend class DisplayList; }; // class DisplayListRenderer diff --git a/libs/hwui/FboCache.cpp b/libs/hwui/FboCache.cpp index 2ef71c245305..beef7bea258d 100644 --- a/libs/hwui/FboCache.cpp +++ b/libs/hwui/FboCache.cpp @@ -18,6 +18,7 @@ #include <stdlib.h> +#include "Debug.h" #include "FboCache.h" #include "Properties.h" @@ -31,10 +32,10 @@ namespace uirenderer { FboCache::FboCache(): mMaxSize(DEFAULT_FBO_CACHE_SIZE) { char property[PROPERTY_VALUE_MAX]; if (property_get(PROPERTY_FBO_CACHE_SIZE, property, NULL) > 0) { - LOGD(" Setting fbo cache size to %s", property); + INIT_LOGD(" Setting fbo cache size to %s", property); mMaxSize = atoi(property); } else { - LOGD(" Using default fbo cache size of %d", DEFAULT_FBO_CACHE_SIZE); + INIT_LOGD(" Using default fbo cache size of %d", DEFAULT_FBO_CACHE_SIZE); } } diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp index c43e40dfcedd..0042f496fac4 100644 --- a/libs/hwui/FontRenderer.cpp +++ b/libs/hwui/FontRenderer.cpp @@ -22,6 +22,7 @@ #include <utils/Log.h> +#include "Debug.h" #include "FontRenderer.h" namespace android { @@ -301,7 +302,9 @@ Font* Font::create(FontRenderer* state, uint32_t fontId, float fontSize, static bool sLogFontRendererCreate = true; FontRenderer::FontRenderer() { - if (sLogFontRendererCreate) LOGD("Creating FontRenderer"); + if (sLogFontRendererCreate) { + INIT_LOGD("Creating FontRenderer"); + } mGammaTable = NULL; mInitialized = false; @@ -319,20 +322,24 @@ FontRenderer::FontRenderer() { char property[PROPERTY_VALUE_MAX]; if (property_get(PROPERTY_TEXT_CACHE_WIDTH, property, NULL) > 0) { - if (sLogFontRendererCreate) LOGD(" Setting text cache width to %s pixels", property); + if (sLogFontRendererCreate) { + INIT_LOGD(" Setting text cache width to %s pixels", property); + } mCacheWidth = atoi(property); } else { if (sLogFontRendererCreate) { - LOGD(" Using default text cache width of %i pixels", mCacheWidth); + INIT_LOGD(" Using default text cache width of %i pixels", mCacheWidth); } } if (property_get(PROPERTY_TEXT_CACHE_HEIGHT, property, NULL) > 0) { - if (sLogFontRendererCreate) LOGD(" Setting text cache width to %s pixels", property); + if (sLogFontRendererCreate) { + INIT_LOGD(" Setting text cache width to %s pixels", property); + } mCacheHeight = atoi(property); } else { if (sLogFontRendererCreate) { - LOGD(" Using default text cache height of %i pixels", mCacheHeight); + INIT_LOGD(" Using default text cache height of %i pixels", mCacheHeight); } } diff --git a/libs/hwui/GammaFontRenderer.cpp b/libs/hwui/GammaFontRenderer.cpp index 6d087e3baaae..e8362dcd45d2 100644 --- a/libs/hwui/GammaFontRenderer.cpp +++ b/libs/hwui/GammaFontRenderer.cpp @@ -16,6 +16,7 @@ #define LOG_TAG "OpenGLRenderer" +#include "Debug.h" #include "GammaFontRenderer.h" #include "Properties.h" @@ -27,7 +28,7 @@ namespace uirenderer { /////////////////////////////////////////////////////////////////////////////// GammaFontRenderer::GammaFontRenderer() { - LOGD("Creating gamma font renderer"); + INIT_LOGD("Creating gamma font renderer"); // Get the renderer properties char property[PROPERTY_VALUE_MAX]; @@ -35,29 +36,29 @@ GammaFontRenderer::GammaFontRenderer() { // Get the gamma float gamma = DEFAULT_TEXT_GAMMA; if (property_get(PROPERTY_TEXT_GAMMA, property, NULL) > 0) { - LOGD(" Setting text gamma to %s", property); + INIT_LOGD(" Setting text gamma to %s", property); gamma = atof(property); } else { - LOGD(" Using default text gamma of %.2f", DEFAULT_TEXT_GAMMA); + INIT_LOGD(" Using default text gamma of %.2f", DEFAULT_TEXT_GAMMA); } // Get the black gamma threshold mBlackThreshold = DEFAULT_TEXT_BLACK_GAMMA_THRESHOLD; if (property_get(PROPERTY_TEXT_BLACK_GAMMA_THRESHOLD, property, NULL) > 0) { - LOGD(" Setting text black gamma threshold to %s", property); + INIT_LOGD(" Setting text black gamma threshold to %s", property); mBlackThreshold = atoi(property); } else { - LOGD(" Using default text black gamma threshold of %d", + INIT_LOGD(" Using default text black gamma threshold of %d", DEFAULT_TEXT_BLACK_GAMMA_THRESHOLD); } // Get the white gamma threshold mWhiteThreshold = DEFAULT_TEXT_WHITE_GAMMA_THRESHOLD; if (property_get(PROPERTY_TEXT_WHITE_GAMMA_THRESHOLD, property, NULL) > 0) { - LOGD(" Setting text white gamma threshold to %s", property); + INIT_LOGD(" Setting text white gamma threshold to %s", property); mWhiteThreshold = atoi(property); } else { - LOGD(" Using default white black gamma threshold of %d", + INIT_LOGD(" Using default white black gamma threshold of %d", DEFAULT_TEXT_WHITE_GAMMA_THRESHOLD); } diff --git a/libs/hwui/GradientCache.cpp b/libs/hwui/GradientCache.cpp index a37964eae4cd..4a40a63485ac 100644 --- a/libs/hwui/GradientCache.cpp +++ b/libs/hwui/GradientCache.cpp @@ -23,6 +23,7 @@ #include <utils/threads.h> +#include "Debug.h" #include "GradientCache.h" #include "Properties.h" @@ -38,10 +39,10 @@ GradientCache::GradientCache(): mSize(0), mMaxSize(MB(DEFAULT_GRADIENT_CACHE_SIZE)) { char property[PROPERTY_VALUE_MAX]; if (property_get(PROPERTY_GRADIENT_CACHE_SIZE, property, NULL) > 0) { - LOGD(" Setting gradient cache size to %sMB", property); + INIT_LOGD(" Setting gradient cache size to %sMB", property); setMaxSize(MB(atof(property))); } else { - LOGD(" Using default gradient cache size of %.2fMB", DEFAULT_GRADIENT_CACHE_SIZE); + INIT_LOGD(" Using default gradient cache size of %.2fMB", DEFAULT_GRADIENT_CACHE_SIZE); } mCache.setOnEntryRemovedListener(this); diff --git a/libs/hwui/LayerCache.cpp b/libs/hwui/LayerCache.cpp index ec186a481e7c..7667af5fe018 100644 --- a/libs/hwui/LayerCache.cpp +++ b/libs/hwui/LayerCache.cpp @@ -20,6 +20,7 @@ #include <utils/Log.h> +#include "Debug.h" #include "LayerCache.h" #include "Properties.h" @@ -33,10 +34,10 @@ namespace uirenderer { LayerCache::LayerCache(): mSize(0), mMaxSize(MB(DEFAULT_LAYER_CACHE_SIZE)) { char property[PROPERTY_VALUE_MAX]; if (property_get(PROPERTY_LAYER_CACHE_SIZE, property, NULL) > 0) { - LOGD(" Setting layer cache size to %sMB", property); + INIT_LOGD(" Setting layer cache size to %sMB", property); setMaxSize(MB(atof(property))); } else { - LOGD(" Using default layer cache size of %.2fMB", DEFAULT_LAYER_CACHE_SIZE); + INIT_LOGD(" Using default layer cache size of %.2fMB", DEFAULT_LAYER_CACHE_SIZE); } } diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp index a16742982f61..1c89577207c6 100644 --- a/libs/hwui/LayerRenderer.cpp +++ b/libs/hwui/LayerRenderer.cpp @@ -29,6 +29,10 @@ namespace uirenderer { void LayerRenderer::prepare(bool opaque) { LAYER_RENDERER_LOGD("Rendering into layer, fbo = %d", mLayer->fbo); +#if RENDER_LAYERS_AS_REGIONS + mLayer->region.clear(); +#endif + glBindFramebuffer(GL_FRAMEBUFFER, mLayer->fbo); OpenGLRenderer::prepare(opaque); @@ -79,7 +83,6 @@ void LayerRenderer::generateMesh() { mLayer->meshIndices = NULL; mLayer->meshElementCount = 0; } - mLayer->region.clear(); return; } @@ -131,8 +134,6 @@ void LayerRenderer::generateMesh() { indices[index + 4] = quad + 1; // top-right indices[index + 5] = quad + 3; // bottom-right } - - mLayer->region.clear(); #endif } diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index b06bbd0aa543..9aa3e7cffc61 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -1568,29 +1568,31 @@ void OpenGLRenderer::drawLayer(Layer* layer, float x, float y, SkPaint* paint) { #if RENDER_LAYERS_AS_REGIONS - if (layer->region.isRect()) { - const Rect r(x, y, x + layer->layer.getWidth(), y + layer->layer.getHeight()); - composeLayerRect(layer, r); - } else if (!layer->region.isEmpty() && layer->mesh) { - const Rect& rect = layer->layer; - - setupDraw(); - setupDrawWithTexture(); - setupDrawColor(alpha, alpha, alpha, alpha); - setupDrawColorFilter(); - setupDrawBlending(layer->blend || layer->alpha < 255, layer->mode, false); - setupDrawProgram(); - setupDrawDirtyRegionsDisabled(); - setupDrawPureColorUniforms(); - setupDrawColorFilterUniforms(); - setupDrawTexture(layer->texture); - setupDrawModelViewTranslate(rect.left, rect.top, rect.right, rect.bottom); - setupDrawMesh(&layer->mesh[0].position[0], &layer->mesh[0].texture[0]); - - glDrawElements(GL_TRIANGLES, layer->meshElementCount, - GL_UNSIGNED_SHORT, layer->meshIndices); - - finishDrawTexture(); + if (!layer->region.isEmpty()) { + if (layer->region.isRect()) { + const Rect r(x, y, x + layer->layer.getWidth(), y + layer->layer.getHeight()); + composeLayerRect(layer, r); + } else if (layer->mesh) { + const Rect& rect = layer->layer; + + setupDraw(); + setupDrawWithTexture(); + setupDrawColor(alpha, alpha, alpha, alpha); + setupDrawColorFilter(); + setupDrawBlending(layer->blend || layer->alpha < 255, layer->mode, false); + setupDrawProgram(); + setupDrawDirtyRegionsDisabled(); + setupDrawPureColorUniforms(); + setupDrawColorFilterUniforms(); + setupDrawTexture(layer->texture); + setupDrawModelViewTranslate(rect.left, rect.top, rect.right, rect.bottom); + setupDrawMesh(&layer->mesh[0].position[0], &layer->mesh[0].texture[0]); + + glDrawElements(GL_TRIANGLES, layer->meshElementCount, + GL_UNSIGNED_SHORT, layer->meshIndices); + + finishDrawTexture(); + } } #else const Rect r(x, y, x + layer->layer.getWidth(), y + layer->layer.getHeight()); @@ -1704,12 +1706,17 @@ void OpenGLRenderer::drawTextDecorations(const char* text, int bytesCount, float if (underlineWidth > 0.0f) { const float textSize = paint->getTextSize(); - const float strokeWidth = textSize * kStdUnderline_Thickness; + // TODO: Support stroke width < 1.0f when we have AA lines + const float strokeWidth = fmax(textSize * kStdUnderline_Thickness, 1.0f); const float left = x - offsetX; float top = 0.0f; - const int pointsCount = 4 * (flags & SkPaint::kStrikeThruText_Flag ? 2 : 1); + int linesCount = 0; + if (flags & SkPaint::kUnderlineText_Flag) linesCount++; + if (flags & SkPaint::kStrikeThruText_Flag) linesCount++; + + const int pointsCount = 4 * linesCount; float points[pointsCount]; int currentPoint = 0; diff --git a/libs/hwui/ShapeCache.h b/libs/hwui/ShapeCache.h index c8bcfc246aad..c62793180838 100644 --- a/libs/hwui/ShapeCache.h +++ b/libs/hwui/ShapeCache.h @@ -302,10 +302,10 @@ ShapeCache<Entry>::ShapeCache(const char* name, const char* propertyName, float mSize(0), mMaxSize(MB(defaultSize)) { char property[PROPERTY_VALUE_MAX]; if (property_get(propertyName, property, NULL) > 0) { - LOGD(" Setting %s cache size to %sMB", name, property); + INIT_LOGD(" Setting %s cache size to %sMB", name, property); setMaxSize(MB(atof(property))); } else { - LOGD(" Using default %s cache size of %.2fMB", name, defaultSize); + INIT_LOGD(" Using default %s cache size of %.2fMB", name, defaultSize); } size_t len = strlen(name); diff --git a/libs/hwui/TextDropShadowCache.cpp b/libs/hwui/TextDropShadowCache.cpp index d96a7f516022..32567904161c 100644 --- a/libs/hwui/TextDropShadowCache.cpp +++ b/libs/hwui/TextDropShadowCache.cpp @@ -16,6 +16,7 @@ #define LOG_TAG "OpenGLRenderer" +#include "Debug.h" #include "TextDropShadowCache.h" #include "Properties.h" @@ -31,10 +32,11 @@ TextDropShadowCache::TextDropShadowCache(): mSize(0), mMaxSize(MB(DEFAULT_DROP_SHADOW_CACHE_SIZE)) { char property[PROPERTY_VALUE_MAX]; if (property_get(PROPERTY_DROP_SHADOW_CACHE_SIZE, property, NULL) > 0) { - LOGD(" Setting drop shadow cache size to %sMB", property); + INIT_LOGD(" Setting drop shadow cache size to %sMB", property); setMaxSize(MB(atof(property))); } else { - LOGD(" Using default drop shadow cache size of %.2fMB", DEFAULT_DROP_SHADOW_CACHE_SIZE); + INIT_LOGD(" Using default drop shadow cache size of %.2fMB", + DEFAULT_DROP_SHADOW_CACHE_SIZE); } init(); diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp index ebecebec9db7..e560b8f154f7 100644 --- a/libs/hwui/TextureCache.cpp +++ b/libs/hwui/TextureCache.cpp @@ -37,10 +37,10 @@ TextureCache::TextureCache(): mSize(0), mMaxSize(MB(DEFAULT_TEXTURE_CACHE_SIZE)) { char property[PROPERTY_VALUE_MAX]; if (property_get(PROPERTY_TEXTURE_CACHE_SIZE, property, NULL) > 0) { - LOGD(" Setting texture cache size to %sMB", property); + INIT_LOGD(" Setting texture cache size to %sMB", property); setMaxSize(MB(atof(property))); } else { - LOGD(" Using default texture cache size of %.2fMB", DEFAULT_TEXTURE_CACHE_SIZE); + INIT_LOGD(" Using default texture cache size of %.2fMB", DEFAULT_TEXTURE_CACHE_SIZE); } init(); @@ -60,7 +60,7 @@ void TextureCache::init() { mCache.setOnEntryRemovedListener(this); glGetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize); - LOGD(" Maximum texture dimension is %d pixels", mMaxTextureSize); + INIT_LOGD(" Maximum texture dimension is %d pixels", mMaxTextureSize); mDebugEnabled = readDebugLevel() & kDebugCaches; } diff --git a/media/java/android/mtp/MtpDatabase.java b/media/java/android/mtp/MtpDatabase.java index abc457ea07a6..a59556242a21 100644 --- a/media/java/android/mtp/MtpDatabase.java +++ b/media/java/android/mtp/MtpDatabase.java @@ -222,7 +222,6 @@ public class MtpDatabase { private int[] getObjectList(int storageID, int format, int parent) { // we can ignore storageID until we support multiple storages - Log.d(TAG, "getObjectList parent: " + parent); Cursor c = null; try { if (format != 0) { @@ -235,7 +234,6 @@ public class MtpDatabase { PARENT_WHERE, new String[] { Integer.toString(parent) }, null); } if (c == null) { - Log.d(TAG, "null cursor"); return null; } int count = c.getCount(); @@ -245,7 +243,6 @@ public class MtpDatabase { c.moveToNext(); result[i] = c.getInt(0); } - Log.d(TAG, "returning " + result); return result; } } catch (RemoteException e) { @@ -260,7 +257,6 @@ public class MtpDatabase { private int getNumObjects(int storageID, int format, int parent) { // we can ignore storageID until we support multiple storages - Log.d(TAG, "getObjectList parent: " + parent); Cursor c = null; try { if (format != 0) { @@ -529,8 +525,8 @@ public class MtpDatabase { String newPath = path.substring(0, lastSlash + 1) + newName; File newFile = new File(newPath); boolean success = oldFile.renameTo(newFile); - Log.d(TAG, "renaming "+ path + " to " + newPath + (success ? " succeeded" : " failed")); if (!success) { + Log.w(TAG, "renaming "+ path + " to " + newPath + " failed"); return MtpConstants.RESPONSE_GENERAL_ERROR; } @@ -557,8 +553,6 @@ public class MtpDatabase { private int setObjectProperty(int handle, int property, long intValue, String stringValue) { - Log.d(TAG, "setObjectProperty: " + property); - switch (property) { case MtpConstants.PROPERTY_OBJECT_FILE_NAME: return renameFile(handle, stringValue); @@ -569,8 +563,6 @@ public class MtpDatabase { } private int getDeviceProperty(int property, long[] outIntValue, char[] outStringValue) { - Log.d(TAG, "getDeviceProperty: " + property); - switch (property) { case MtpConstants.DEVICE_PROPERTY_SYNCHRONIZATION_PARTNER: case MtpConstants.DEVICE_PROPERTY_DEVICE_FRIENDLY_NAME: @@ -616,8 +608,6 @@ public class MtpDatabase { } private int setDeviceProperty(int property, long intValue, String stringValue) { - Log.d(TAG, "setDeviceProperty: " + property + " : " + stringValue); - switch (property) { case MtpConstants.DEVICE_PROPERTY_SYNCHRONIZATION_PARTNER: case MtpConstants.DEVICE_PROPERTY_DEVICE_FRIENDLY_NAME: @@ -638,7 +628,6 @@ public class MtpDatabase { private boolean getObjectInfo(int handle, int[] outStorageFormatParent, char[] outName, long[] outSizeModified) { - Log.d(TAG, "getObjectInfo: " + handle); Cursor c = null; try { c = mMediaProvider.query(mObjectsUri, OBJECT_INFO_PROJECTION, @@ -674,7 +663,6 @@ public class MtpDatabase { } private int getObjectFilePath(int handle, char[] outFilePath, long[] outFileLengthFormat) { - Log.d(TAG, "getObjectFilePath: " + handle); if (handle == 0) { // special case root directory mMediaStoragePath.getChars(0, mMediaStoragePath.length(), outFilePath, 0); @@ -708,7 +696,6 @@ public class MtpDatabase { } private int deleteFile(int handle) { - Log.d(TAG, "deleteFile: " + handle); mDatabaseModified = true; String path = null; int format = 0; @@ -754,7 +741,6 @@ public class MtpDatabase { } private int[] getObjectReferences(int handle) { - Log.d(TAG, "getObjectReferences for: " + handle); Uri uri = Files.getMtpReferencesUri(mVolumeName, handle); Cursor c = null; try { @@ -802,14 +788,11 @@ public class MtpDatabase { } private void sessionStarted() { - Log.d(TAG, "sessionStarted"); mDatabaseModified = false; } private void sessionEnded() { - Log.d(TAG, "sessionEnded"); if (mDatabaseModified) { - Log.d(TAG, "sending ACTION_MTP_SESSION_END"); mContext.sendBroadcast(new Intent(MediaStore.ACTION_MTP_SESSION_END)); mDatabaseModified = false; } diff --git a/media/java/android/mtp/MtpServer.java b/media/java/android/mtp/MtpServer.java index af6e8eb8ad6b..2e693737e7c6 100644 --- a/media/java/android/mtp/MtpServer.java +++ b/media/java/android/mtp/MtpServer.java @@ -34,15 +34,6 @@ public class MtpServer { native_setup(database, storagePath, reserveSpace); } - @Override - protected void finalize() throws Throwable { - try { - native_finalize(); - } finally { - super.finalize(); - } - } - public void start() { native_start(); } diff --git a/media/jni/android_mtp_MtpDatabase.cpp b/media/jni/android_mtp_MtpDatabase.cpp index 9abf6a241dd7..17d39e3eb656 100644 --- a/media/jni/android_mtp_MtpDatabase.cpp +++ b/media/jni/android_mtp_MtpDatabase.cpp @@ -1031,7 +1031,6 @@ static void android_mtp_MtpDatabase_setup(JNIEnv *env, jobject thiz) { #ifdef HAVE_ANDROID_OS - LOGD("setup\n"); MyMtpDatabase* database = new MyMtpDatabase(env, thiz); env->SetIntField(thiz, field_context, (int)database); checkAndClearExceptionFromCallback(env, __FUNCTION__); @@ -1042,7 +1041,6 @@ static void android_mtp_MtpDatabase_finalize(JNIEnv *env, jobject thiz) { #ifdef HAVE_ANDROID_OS - LOGD("finalize\n"); MyMtpDatabase* database = (MyMtpDatabase *)env->GetIntField(thiz, field_context); database->cleanup(env); delete database; @@ -1081,8 +1079,6 @@ int register_android_mtp_MtpDatabase(JNIEnv *env) { jclass clazz; - LOGD("register_android_mtp_MtpDatabase\n"); - clazz = env->FindClass("android/mtp/MtpDatabase"); if (clazz == NULL) { LOGE("Can't find android/mtp/MtpDatabase"); diff --git a/media/jni/android_mtp_MtpServer.cpp b/media/jni/android_mtp_MtpServer.cpp index 8908e675fa10..1452d2191798 100644 --- a/media/jni/android_mtp_MtpServer.cpp +++ b/media/jni/android_mtp_MtpServer.cpp @@ -111,7 +111,6 @@ public: sMutex.unlock(); - LOGD("MtpThread mServer->run"); mServer->run(); sleep(1); @@ -128,7 +127,6 @@ public: env->DeleteGlobalRef(mJavaServer); sMutex.unlock(); - LOGD("threadLoop returning"); return false; } @@ -160,8 +158,6 @@ android_mtp_MtpServer_setup(JNIEnv *env, jobject thiz, jobject javaDatabase, jstring storagePath, jlong reserveSpace) { #ifdef HAVE_ANDROID_OS - LOGD("setup\n"); - MtpDatabase* database = getMtpDatabase(env, javaDatabase); const char *storagePathStr = env->GetStringUTFChars(storagePath, NULL); @@ -174,17 +170,9 @@ android_mtp_MtpServer_setup(JNIEnv *env, jobject thiz, jobject javaDatabase, } static void -android_mtp_MtpServer_finalize(JNIEnv *env, jobject thiz) -{ - LOGD("finalize\n"); -} - - -static void android_mtp_MtpServer_start(JNIEnv *env, jobject thiz) { #ifdef HAVE_ANDROID_OS - LOGD("start\n"); MtpThread *thread = (MtpThread *)env->GetIntField(thiz, field_context); thread->run("MtpThread"); #endif // HAVE_ANDROID_OS @@ -194,7 +182,6 @@ static void android_mtp_MtpServer_stop(JNIEnv *env, jobject thiz) { #ifdef HAVE_ANDROID_OS - LOGD("stop\n"); MtpThread *thread = (MtpThread *)env->GetIntField(thiz, field_context); if (thread) thread->stop(); @@ -225,7 +212,6 @@ static void android_mtp_MtpServer_set_ptp_mode(JNIEnv *env, jobject thiz, jboolean usePtp) { #ifdef HAVE_ANDROID_OS - LOGD("set_ptp_mode\n"); MtpThread *thread = (MtpThread *)env->GetIntField(thiz, field_context); if (thread) thread->setPtpMode(usePtp); @@ -237,7 +223,6 @@ android_mtp_MtpServer_set_ptp_mode(JNIEnv *env, jobject thiz, jboolean usePtp) static JNINativeMethod gMethods[] = { {"native_setup", "(Landroid/mtp/MtpDatabase;Ljava/lang/String;J)V", (void *)android_mtp_MtpServer_setup}, - {"native_finalize", "()V", (void *)android_mtp_MtpServer_finalize}, {"native_start", "()V", (void *)android_mtp_MtpServer_start}, {"native_stop", "()V", (void *)android_mtp_MtpServer_stop}, {"native_send_object_added", "(I)V", (void *)android_mtp_MtpServer_send_object_added}, @@ -251,8 +236,6 @@ int register_android_mtp_MtpServer(JNIEnv *env) { jclass clazz; - LOGD("register_android_mtp_MtpServer\n"); - clazz = env->FindClass("android/mtp/MtpServer"); if (clazz == NULL) { LOGE("Can't find android/mtp/MtpServer"); diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp index b1bd145f6d8e..be004d2dd786 100644 --- a/media/mtp/MtpServer.cpp +++ b/media/mtp/MtpServer.cpp @@ -130,7 +130,7 @@ void MtpServer::run() { while (1) { int ret = mRequest.read(fd); if (ret < 0) { - LOGE("request read returned %d, errno: %d", ret, errno); + LOGV("request read returned %d, errno: %d", ret, errno); if (errno == ECANCELED) { // return to top of loop and wait for next command continue; @@ -204,23 +204,23 @@ void MtpServer::run() { void MtpServer::sendObjectAdded(MtpObjectHandle handle) { if (mSessionOpen) { - LOGD("sendObjectAdded %d\n", handle); + LOGV("sendObjectAdded %d\n", handle); mEvent.setEventCode(MTP_EVENT_OBJECT_ADDED); mEvent.setTransactionID(mRequest.getTransactionID()); mEvent.setParameter(1, handle); int ret = mEvent.write(mFD); - LOGD("mEvent.write returned %d\n", ret); + LOGV("mEvent.write returned %d\n", ret); } } void MtpServer::sendObjectRemoved(MtpObjectHandle handle) { if (mSessionOpen) { - LOGD("sendObjectRemoved %d\n", handle); + LOGV("sendObjectRemoved %d\n", handle); mEvent.setEventCode(MTP_EVENT_OBJECT_REMOVED); mEvent.setTransactionID(mRequest.getTransactionID()); mEvent.setParameter(1, handle); int ret = mEvent.write(mFD); - LOGD("mEvent.write returned %d\n", ret); + LOGV("mEvent.write returned %d\n", ret); } } @@ -496,7 +496,7 @@ MtpResponseCode MtpServer::doSetObjectReferences() { MtpResponseCode MtpServer::doGetObjectPropValue() { MtpObjectHandle handle = mRequest.getParameter(1); MtpObjectProperty property = mRequest.getParameter(2); - LOGD("GetObjectPropValue %d %s\n", handle, + LOGV("GetObjectPropValue %d %s\n", handle, MtpDebug::getObjectPropCodeName(property)); return mDatabase->getObjectPropertyValue(handle, property, mData); @@ -505,7 +505,7 @@ MtpResponseCode MtpServer::doGetObjectPropValue() { MtpResponseCode MtpServer::doSetObjectPropValue() { MtpObjectHandle handle = mRequest.getParameter(1); MtpObjectProperty property = mRequest.getParameter(2); - LOGD("SetObjectPropValue %d %s\n", handle, + LOGV("SetObjectPropValue %d %s\n", handle, MtpDebug::getObjectPropCodeName(property)); return mDatabase->setObjectPropertyValue(handle, property, mData); @@ -513,7 +513,7 @@ MtpResponseCode MtpServer::doSetObjectPropValue() { MtpResponseCode MtpServer::doGetDevicePropValue() { MtpDeviceProperty property = mRequest.getParameter(1); - LOGD("GetDevicePropValue %s\n", + LOGV("GetDevicePropValue %s\n", MtpDebug::getDevicePropCodeName(property)); return mDatabase->getDevicePropertyValue(property, mData); @@ -521,7 +521,7 @@ MtpResponseCode MtpServer::doGetDevicePropValue() { MtpResponseCode MtpServer::doSetDevicePropValue() { MtpDeviceProperty property = mRequest.getParameter(1); - LOGD("SetDevicePropValue %s\n", + LOGV("SetDevicePropValue %s\n", MtpDebug::getDevicePropCodeName(property)); return mDatabase->setDevicePropertyValue(property, mData); @@ -529,7 +529,7 @@ MtpResponseCode MtpServer::doSetDevicePropValue() { MtpResponseCode MtpServer::doResetDevicePropValue() { MtpDeviceProperty property = mRequest.getParameter(1); - LOGD("ResetDevicePropValue %s\n", + LOGV("ResetDevicePropValue %s\n", MtpDebug::getDevicePropCodeName(property)); return mDatabase->resetDeviceProperty(property); @@ -543,7 +543,7 @@ MtpResponseCode MtpServer::doGetObjectPropList() { uint32_t property = mRequest.getParameter(3); int groupCode = mRequest.getParameter(4); int depth = mRequest.getParameter(5); - LOGD("GetObjectPropList %d format: %s property: %s group: %d depth: %d\n", + LOGV("GetObjectPropList %d format: %s property: %s group: %d depth: %d\n", handle, MtpDebug::getFormatCodeName(format), MtpDebug::getObjectPropCodeName(property), groupCode, depth); @@ -674,7 +674,7 @@ MtpResponseCode MtpServer::doSendObjectInfo() { mData.getString(modified); // date modified // keywords follow - LOGD("name: %s format: %04X\n", (const char *)name, format); + LOGV("name: %s format: %04X\n", (const char *)name, format); time_t modifiedTime; if (!parseDateTime(modified, modifiedTime)) modifiedTime = 0; @@ -750,7 +750,7 @@ MtpResponseCode MtpServer::doSendObject() { mfr.offset = 0; mfr.length = mSendObjectFileSize; - LOGD("receiving %s\n", (const char *)mSendObjectFilePath); + LOGV("receiving %s\n", (const char *)mSendObjectFilePath); // transfer the file ret = ioctl(mFD, MTP_RECEIVE_FILE, (unsigned long)&mfr); close(mfr.fd); @@ -854,7 +854,7 @@ MtpResponseCode MtpServer::doDeleteObject() { MtpResponseCode MtpServer::doGetObjectPropDesc() { MtpObjectProperty propCode = mRequest.getParameter(1); MtpObjectFormat format = mRequest.getParameter(2); - LOGD("GetObjectPropDesc %s %s\n", MtpDebug::getObjectPropCodeName(propCode), + LOGV("GetObjectPropDesc %s %s\n", MtpDebug::getObjectPropCodeName(propCode), MtpDebug::getFormatCodeName(format)); MtpProperty* property = mDatabase->getObjectPropertyDesc(propCode, format); if (!property) @@ -866,7 +866,7 @@ MtpResponseCode MtpServer::doGetObjectPropDesc() { MtpResponseCode MtpServer::doGetDevicePropDesc() { MtpDeviceProperty propCode = mRequest.getParameter(1); - LOGD("GetDevicePropDesc %s\n", MtpDebug::getDevicePropCodeName(propCode)); + LOGV("GetDevicePropDesc %s\n", MtpDebug::getDevicePropCodeName(propCode)); MtpProperty* property = mDatabase->getDevicePropertyDesc(propCode); if (!property) return MTP_RESPONSE_DEVICE_PROP_NOT_SUPPORTED; diff --git a/media/mtp/MtpStorage.cpp b/media/mtp/MtpStorage.cpp index abc23de38aae..2fbbc512d1e2 100644 --- a/media/mtp/MtpStorage.cpp +++ b/media/mtp/MtpStorage.cpp @@ -38,7 +38,7 @@ MtpStorage::MtpStorage(MtpStorageID id, const char* filePath, uint64_t reserveSp mMaxCapacity(0), mReserveSpace(reserveSpace) { - LOGD("MtpStorage id: %d path: %s\n", id, filePath); + LOGV("MtpStorage id: %d path: %s\n", id, filePath); } MtpStorage::~MtpStorage() { diff --git a/services/java/com/android/server/LightsService.java b/services/java/com/android/server/LightsService.java index 9b57735b87cf..21f2bcf00be1 100644 --- a/services/java/com/android/server/LightsService.java +++ b/services/java/com/android/server/LightsService.java @@ -24,12 +24,12 @@ import android.os.ServiceManager; import android.os.Message; import android.util.Slog; -import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; public class LightsService { private static final String TAG = "LightsService"; + private static final boolean DEBUG = false; static final int LIGHT_ID_BACKLIGHT = 0; static final int LIGHT_ID_KEYBOARD = 1; @@ -115,6 +115,8 @@ public class LightsService { private void setLightLocked(int color, int mode, int onMS, int offMS, int brightnessMode) { if (color != mColor || mode != mMode || onMS != mOnMS || offMS != mOffMS) { + if (DEBUG) Slog.v(TAG, "setLight #" + mId + ": color=#" + + Integer.toHexString(color)); mColor = color; mMode = mode; mOnMS = onMS; diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index d2a1786793e4..ac3b96b15b75 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -9515,7 +9515,7 @@ public class WindowManagerService extends IWindowManager.Stub final AppWindowToken atoken = win.mAppToken; final boolean gone = win.mViewVisibility == View.GONE || !win.mRelayoutCalled - || win.mRootToken.hidden + || (atoken == null && win.mRootToken.hidden) || (atoken != null && atoken.hiddenRequested) || win.mAttachedHidden || win.mExiting || win.mDestroying; diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index 9e9a4f21a2d3..6bb19b04736e 100755 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -5858,16 +5858,18 @@ public final class ActivityManagerService extends ActivityManagerNative return pfd; } + // Actually is sleeping or shutting down or whatever else in the future + // is an inactive state. + public boolean isSleeping() { + return mSleeping || mShuttingDown; + } + public void goingToSleep() { synchronized(this) { mSleeping = true; mWindowManager.setEventDispatching(false); - if (mMainStack.mResumedActivity != null) { - mMainStack.pauseIfSleepingLocked(); - } else { - Slog.w(TAG, "goingToSleep with no resumed activity!"); - } + mMainStack.stopIfSleepingLocked(); // Initialize the wake times of all processes. checkExcessivePowerUsageLocked(false); @@ -5891,7 +5893,7 @@ public final class ActivityManagerService extends ActivityManagerNative mWindowManager.setEventDispatching(false); if (mMainStack.mResumedActivity != null) { - mMainStack.pauseIfSleepingLocked(); + mMainStack.stopIfSleepingLocked(); final long endTime = System.currentTimeMillis() + timeout; while (mMainStack.mResumedActivity != null || mMainStack.mPausingActivity != null) { @@ -5915,13 +5917,30 @@ public final class ActivityManagerService extends ActivityManagerNative return timedout; } + public final void activitySlept(IBinder token) { + if (localLOGV) Slog.v( + TAG, "Activity slept: token=" + token); + + ActivityRecord r = null; + + final long origId = Binder.clearCallingIdentity(); + + synchronized (this) { + int index = mMainStack.indexOfTokenLocked(token); + if (index >= 0) { + r = (ActivityRecord)mMainStack.mHistory.get(index); + mMainStack.activitySleptLocked(r); + } + } + + Binder.restoreCallingIdentity(origId); + } + public void wakingUp() { synchronized(this) { - if (mMainStack.mGoingToSleep.isHeld()) { - mMainStack.mGoingToSleep.release(); - } mWindowManager.setEventDispatching(true); mSleeping = false; + mMainStack.awakeFromSleepingLocked(); mMainStack.resumeTopActivityLocked(null); } } @@ -7520,6 +7539,11 @@ public final class ActivityManagerService extends ActivityManagerNative pw.println(" Activities waiting to stop:"); dumpHistoryList(pw, mMainStack.mStoppingActivities, " ", "Stop", false); } + if (mMainStack.mGoingToSleepActivities.size() > 0) { + pw.println(" "); + pw.println(" Activities waiting to sleep:"); + dumpHistoryList(pw, mMainStack.mGoingToSleepActivities, " ", "Sleep", false); + } if (mMainStack.mFinishingActivities.size() > 0) { pw.println(" "); pw.println(" Activities waiting to finish:"); @@ -7531,6 +7555,7 @@ public final class ActivityManagerService extends ActivityManagerNative pw.println(" mResumedActivity: " + mMainStack.mResumedActivity); pw.println(" mFocusedActivity: " + mFocusedActivity); pw.println(" mLastPausedActivity: " + mMainStack.mLastPausedActivity); + pw.println(" mSleepTimeout: " + mMainStack.mSleepTimeout); if (dumpAll && mRecentTasks.size() > 0) { pw.println(" "); diff --git a/services/java/com/android/server/am/ActivityRecord.java b/services/java/com/android/server/am/ActivityRecord.java index e29da1ce5ee1..0fb30ff4b172 100644 --- a/services/java/com/android/server/am/ActivityRecord.java +++ b/services/java/com/android/server/am/ActivityRecord.java @@ -60,7 +60,8 @@ class ActivityRecord extends IApplicationToken.Stub { final String processName; // process where this component wants to run final String taskAffinity; // as per ActivityInfo.taskAffinity final boolean stateNotNeeded; // As per ActivityInfo.flags - final boolean fullscreen; // covers the full screen? + final boolean fullscreen; // covers the full screen? + final boolean noDisplay; // activity is not displayed? final boolean componentSpecified; // did caller specifiy an explicit component? final boolean isHomeActivity; // do we consider this to be a home activity? final String baseDir; // where activity source (resources etc) located @@ -102,6 +103,7 @@ class ActivityRecord extends IApplicationToken.Stub { boolean inHistory; // are we in the history stack? int launchMode; // the launch mode activity attribute. boolean visible; // does this activity's window need to be shown? + boolean sleeping; // have we told the activity to sleep? boolean waitingVisible; // true if waiting for a new act to become vis boolean nowVisible; // is this activity's window visible? boolean thumbnailNeeded;// has someone requested a thumbnail? @@ -164,13 +166,15 @@ class ActivityRecord extends IApplicationToken.Stub { pw.print(" finishing="); pw.println(finishing); pw.print(prefix); pw.print("keysPaused="); pw.print(keysPaused); pw.print(" inHistory="); pw.print(inHistory); - pw.print(" immersive="); pw.print(immersive); - pw.print(" launchMode="); pw.println(launchMode); - pw.print(prefix); pw.print("fullscreen="); pw.print(fullscreen); pw.print(" visible="); pw.print(visible); - pw.print(" frozenBeforeDestroy="); pw.print(frozenBeforeDestroy); - pw.print(" thumbnailNeeded="); pw.print(thumbnailNeeded); + pw.print(" sleeping="); pw.print(sleeping); pw.print(" idle="); pw.println(idle); + pw.print(prefix); pw.print("fullscreen="); pw.print(fullscreen); + pw.print(" noDisplay="); pw.print(noDisplay); + pw.print(" immersive="); pw.print(immersive); + pw.print(" launchMode="); pw.println(launchMode); + pw.print(prefix); pw.print("frozenBeforeDestroy="); pw.print(frozenBeforeDestroy); + pw.print(" thumbnailNeeded="); pw.println(thumbnailNeeded); if (launchTime != 0 || startTime != 0) { pw.print(prefix); pw.print("launchTime="); TimeUtils.formatDuration(launchTime, pw); pw.print(" startTime="); @@ -280,6 +284,8 @@ class ActivityRecord extends IApplicationToken.Stub { com.android.internal.R.styleable.Window_windowIsFloating, false) && !ent.array.getBoolean( com.android.internal.R.styleable.Window_windowIsTranslucent, false); + noDisplay = ent != null && ent.array.getBoolean( + com.android.internal.R.styleable.Window_windowNoDisplay, false); if (!_componentSpecified || _launchedFromUid == Process.myUid() || _launchedFromUid == 0) { @@ -316,6 +322,7 @@ class ActivityRecord extends IApplicationToken.Stub { processName = null; packageName = null; fullscreen = true; + noDisplay = false; isHomeActivity = false; immersive = false; } @@ -597,7 +604,25 @@ class ActivityRecord extends IApplicationToken.Stub { public boolean isInterestingToUserLocked() { return visible || nowVisible || state == ActivityState.PAUSING || state == ActivityState.RESUMED; - } + } + + public void setSleeping(boolean _sleeping) { + if (sleeping == _sleeping) { + return; + } + if (app != null && app.thread != null) { + try { + app.thread.scheduleSleeping(this, _sleeping); + if (sleeping && !stack.mGoingToSleepActivities.contains(this)) { + stack.mGoingToSleepActivities.add(this); + } + sleeping = _sleeping; + } catch (RemoteException e) { + Slog.w(ActivityStack.TAG, "Exception thrown when sleeping: " + + intent.getComponent(), e); + } + } + } public String toString() { if (stringName != null) { diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java index dd6ddd6e95b7..2040cbd956ef 100644 --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -92,6 +92,9 @@ public class ActivityStack { // next activity. static final int PAUSE_TIMEOUT = 500; + // How long we can hold the sleep wake lock before giving up. + static final int SLEEP_TIMEOUT = 5*1000; + // How long we can hold the launch wake lock before giving up. static final int LAUNCH_TIMEOUT = 10*1000; @@ -158,6 +161,12 @@ public class ActivityStack { = new ArrayList<ActivityRecord>(); /** + * List of activities that are in the process of going to sleep. + */ + final ArrayList<ActivityRecord> mGoingToSleepActivities + = new ArrayList<ActivityRecord>(); + + /** * Animations that for the current transition have requested not to * be considered for the transition animation. */ @@ -238,9 +247,15 @@ public class ActivityStack { long mInitialStartTime = 0; + /** + * Set when we have taken too long waiting to go to sleep. + */ + boolean mSleepTimeout = false; + int mThumbnailWidth = -1; int mThumbnailHeight = -1; + static final int SLEEP_TIMEOUT_MSG = 8; static final int PAUSE_TIMEOUT_MSG = 9; static final int IDLE_TIMEOUT_MSG = 10; static final int IDLE_NOW_MSG = 11; @@ -255,6 +270,13 @@ public class ActivityStack { public void handleMessage(Message msg) { switch (msg.what) { + case SLEEP_TIMEOUT_MSG: { + if (mService.isSleeping()) { + Slog.w(TAG, "Sleep timeout! Sleeping now."); + mSleepTimeout = true; + checkReadyForSleepLocked(); + } + } break; case PAUSE_TIMEOUT_MSG: { IBinder token = (IBinder)msg.obj; // We don't at this point know if the activity is fullscreen, @@ -514,6 +536,7 @@ public class ActivityStack { mService.mHomeProcess = app; } mService.ensurePackageDexOpt(r.intent.getComponent().getPackageName()); + r.sleeping = false; app.thread.scheduleLaunchActivity(new Intent(r.intent), r, System.identityHashCode(r), r.info, r.icicle, results, newIntents, !andResume, @@ -575,7 +598,7 @@ public class ActivityStack { mService.addRecentTaskLocked(r.task); } completeResumeLocked(r); - pauseIfSleepingLocked(); + checkReadyForSleepLocked(); } else { // This activity is not starting in the resumed state... which // should look like we asked it to pause+stop (but remain visible), @@ -631,8 +654,8 @@ public class ActivityStack { "activity", r.intent.getComponent(), false); } - void pauseIfSleepingLocked() { - if (mService.mSleeping || mService.mShuttingDown) { + void stopIfSleepingLocked() { + if (mService.isSleeping()) { if (!mGoingToSleep.isHeld()) { mGoingToSleep.acquire(); if (mLaunchingActivity.isHeld()) { @@ -640,19 +663,97 @@ public class ActivityStack { mService.mHandler.removeMessages(LAUNCH_TIMEOUT_MSG); } } + mHandler.removeMessages(SLEEP_TIMEOUT_MSG); + Message msg = mHandler.obtainMessage(SLEEP_TIMEOUT_MSG); + mHandler.sendMessageDelayed(msg, SLEEP_TIMEOUT); + checkReadyForSleepLocked(); + } + } - // If we are not currently pausing an activity, get the current - // one to pause. If we are pausing one, we will just let that stuff - // run and release the wake lock when all done. - if (mPausingActivity == null) { - if (DEBUG_PAUSE) Slog.v(TAG, "Sleep needs to pause..."); + void awakeFromSleepingLocked() { + mHandler.removeMessages(SLEEP_TIMEOUT_MSG); + mSleepTimeout = false; + if (mGoingToSleep.isHeld()) { + mGoingToSleep.release(); + } + // Ensure activities are no longer sleeping. + for (int i=mHistory.size()-1; i>=0; i--) { + ActivityRecord r = (ActivityRecord)mHistory.get(i); + r.setSleeping(false); + } + mGoingToSleepActivities.clear(); + } + + void activitySleptLocked(ActivityRecord r) { + mGoingToSleepActivities.remove(r); + checkReadyForSleepLocked(); + } + + void checkReadyForSleepLocked() { + if (!mService.isSleeping()) { + // Do not care. + return; + } + + if (!mSleepTimeout) { + if (mResumedActivity != null) { + // Still have something resumed; can't sleep until it is paused. + if (DEBUG_PAUSE) Slog.v(TAG, "Sleep needs to pause " + mResumedActivity); if (DEBUG_USER_LEAVING) Slog.v(TAG, "Sleep => pause with userLeaving=false"); startPausingLocked(false, true); + return; + } + if (mPausingActivity != null) { + // Still waiting for something to pause; can't sleep yet. + if (DEBUG_PAUSE) Slog.v(TAG, "Sleep still waiting to pause " + mPausingActivity); + return; + } + + if (mStoppingActivities.size() > 0) { + // Still need to tell some activities to stop; can't sleep yet. + if (DEBUG_PAUSE) Slog.v(TAG, "Sleep still need to stop " + + mStoppingActivities.size() + " activities"); + Message msg = Message.obtain(); + msg.what = IDLE_NOW_MSG; + mHandler.sendMessage(msg); + return; + } + + ensureActivitiesVisibleLocked(null, 0); + + // Make sure any stopped but visible activities are now sleeping. + // This ensures that the activity's onStop() is called. + for (int i=mHistory.size()-1; i>=0; i--) { + ActivityRecord r = (ActivityRecord)mHistory.get(i); + if (r.state == ActivityState.STOPPING || r.state == ActivityState.STOPPED) { + r.setSleeping(true); + } + } + + if (mGoingToSleepActivities.size() > 0) { + // Still need to tell some activities to sleep; can't sleep yet. + if (DEBUG_PAUSE) Slog.v(TAG, "Sleep still need to sleep " + + mGoingToSleepActivities.size() + " activities"); + return; } } + + mHandler.removeMessages(SLEEP_TIMEOUT_MSG); + + if (mGoingToSleep.isHeld()) { + mGoingToSleep.release(); + } + if (mService.mShuttingDown) { + mService.notifyAll(); + } + } public final Bitmap screenshotActivities(ActivityRecord who) { + if (who.noDisplay) { + return null; + } + Resources res = mService.mContext.getResources(); int w = mThumbnailWidth; int h = mThumbnailHeight; @@ -813,6 +914,8 @@ public class ActivityStack { Message msg = Message.obtain(); msg.what = IDLE_NOW_MSG; mHandler.sendMessage(msg); + } else { + checkReadyForSleepLocked(); } } } else { @@ -822,15 +925,10 @@ public class ActivityStack { mPausingActivity = null; } - if (!mService.mSleeping && !mService.mShuttingDown) { + if (!mService.isSleeping()) { resumeTopActivityLocked(prev); } else { - if (mGoingToSleep.isHeld()) { - mGoingToSleep.release(); - } - if (mService.mShuttingDown) { - mService.notifyAll(); - } + checkReadyForSleepLocked(); } if (prev != null) { @@ -985,6 +1083,7 @@ public class ActivityStack { TAG, "Making visible and scheduling visibility: " + r); try { mService.mWindowManager.setAppVisibility(r, true); + r.sleeping = false; r.app.thread.scheduleWindowVisibility(r, true); r.stopFreezingScreenLocked(false); } catch (Exception e) { @@ -1114,6 +1213,8 @@ public class ActivityStack { // The activity may be waiting for stop, but that is no longer // appropriate for it. mStoppingActivities.remove(next); + mGoingToSleepActivities.remove(next); + next.sleeping = false; mWaitingVisibleActivities.remove(next); if (DEBUG_SWITCH) Slog.v(TAG, "Resuming " + next); @@ -1315,10 +1416,11 @@ public class ActivityStack { System.identityHashCode(next), next.task.taskId, next.shortComponentName); + next.sleeping = false; next.app.thread.scheduleResumeActivity(next, mService.isNextTransitionForward()); - pauseIfSleepingLocked(); + checkReadyForSleepLocked(); } catch (Exception e) { // Whoops, need to restart this activity! @@ -2831,6 +2933,9 @@ public class ActivityStack { mService.mWindowManager.setAppVisibility(r, false); } r.app.thread.scheduleStopActivity(r, r.visible, r.configChangeFlags); + if (mService.isSleeping()) { + r.setSleeping(true); + } } catch (Exception e) { // Maybe just ignore exceptions here... if the process // has crashed, our death notification will clean things @@ -2874,7 +2979,7 @@ public class ActivityStack { mService.mWindowManager.setAppVisibility(s, false); } } - if (!s.waitingVisible && remove) { + if ((!s.waitingVisible || mService.isSleeping()) && remove) { if (localLOGV) Slog.v(TAG, "Ready to stop: " + s); if (stops == null) { stops = new ArrayList<ActivityRecord>(); @@ -3198,6 +3303,8 @@ public class ActivityStack { Message msg = Message.obtain(); msg.what = IDLE_NOW_MSG; mHandler.sendMessage(msg); + } else { + checkReadyForSleepLocked(); } } r.state = ActivityState.STOPPING; @@ -3207,6 +3314,7 @@ public class ActivityStack { // make sure the record is cleaned out of other places. mStoppingActivities.remove(r); + mGoingToSleepActivities.remove(r); mWaitingVisibleActivities.remove(r); if (mResumedActivity == r) { mResumedActivity = null; @@ -3434,6 +3542,7 @@ public class ActivityStack { void removeHistoryRecordsForAppLocked(ProcessRecord app) { removeHistoryRecordsForAppLocked(mLRUActivities, app); removeHistoryRecordsForAppLocked(mStoppingActivities, app); + removeHistoryRecordsForAppLocked(mGoingToSleepActivities, app); removeHistoryRecordsForAppLocked(mWaitingVisibleActivities, app); removeHistoryRecordsForAppLocked(mFinishingActivities, app); } |