diff options
293 files changed, 1937 insertions, 1368 deletions
diff --git a/api/current.txt b/api/current.txt index 4e41c29943a9..cc7f07988404 100644 --- a/api/current.txt +++ b/api/current.txt @@ -3235,6 +3235,7 @@ package android.app { method public final android.app.Fragment getTargetFragment(); method public final int getTargetRequestCode(); method public final java.lang.CharSequence getText(int); + method public boolean getUserVisibleHint(); method public android.view.View getView(); method public final int hashCode(); method public static android.app.Fragment instantiate(android.content.Context, java.lang.String); @@ -3245,7 +3246,6 @@ package android.app { method public final boolean isInLayout(); method public final boolean isRemoving(); method public final boolean isResumed(); - method public boolean isStartDeferred(); method public final boolean isVisible(); method public void onActivityCreated(android.os.Bundle); method public void onActivityResult(int, int, android.content.Intent); @@ -3281,8 +3281,8 @@ package android.app { method public void setInitialSavedState(android.app.Fragment.SavedState); method public void setMenuVisibility(boolean); method public void setRetainInstance(boolean); - method public void setStartDeferred(boolean); method public void setTargetFragment(android.app.Fragment, int); + method public void setUserVisibleHint(boolean); method public void startActivity(android.content.Intent); method public void startActivityForResult(android.content.Intent, int); method public void unregisterForContextMenu(android.view.View); diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java index 9b01b7ffaf44..473a2d17ca39 100644 --- a/core/java/android/app/Fragment.java +++ b/core/java/android/app/Fragment.java @@ -458,6 +458,9 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene // have been started and their loaders are finished. boolean mDeferStart; + // Hint provided by the app that this fragment is currently visible to the user. + boolean mUserVisibleHint = true; + LoaderManagerImpl mLoaderManager; boolean mLoadersStarted; boolean mCheckedForLoaderManager; @@ -915,31 +918,32 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene } /** - * Set whether this fragment should enter the started state as normal or if - * start should be deferred until a system-determined convenient time, such - * as after any loaders have completed their work. + * Set a hint to the system about whether this fragment's UI is currently visible + * to the user. This hint defaults to true and is persistent across fragment instance + * state save and restore. * - * <p>This option is not sticky across fragment starts; after a deferred start - * completes this option will be set to false.</p> + * <p>An app may set this to false to indicate that the fragment's UI is + * scrolled out of visibility or is otherwise not directly visible to the user. + * This may be used by the system to prioritize operations such as fragment lifecycle updates + * or loader ordering behavior.</p> * - * @param deferResume true if this fragment can defer its resume until after others + * @param isVisibleToUser true if this fragment's UI is currently visible to the user (default), + * false if it is not. */ - public void setStartDeferred(boolean deferResume) { - if (mDeferStart && !deferResume) { + public void setUserVisibleHint(boolean isVisibleToUser) { + if (!mUserVisibleHint && isVisibleToUser && mState < STARTED) { mFragmentManager.performPendingDeferredStart(this); } - mDeferStart = deferResume; + mUserVisibleHint = isVisibleToUser; + mDeferStart = !isVisibleToUser; } /** - * Returns true if this fragment's move to the started state has been deferred. - * If this returns true it will be started once other fragments' loaders - * have finished running. - * - * @return true if this fragment's start has been deferred. + * @return The current value of the user-visible hint on this fragment. + * @see #setUserVisibleHint(boolean) */ - public boolean isStartDeferred() { - return mDeferStart; + public boolean getUserVisibleHint() { + return mUserVisibleHint; } /** @@ -1477,7 +1481,8 @@ public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListene writer.print(" mMenuVisible="); writer.print(mMenuVisible); writer.print(" mHasMenu="); writer.println(mHasMenu); writer.print(prefix); writer.print("mRetainInstance="); writer.print(mRetainInstance); - writer.print(" mRetaining="); writer.println(mRetaining); + writer.print(" mRetaining="); writer.print(mRetaining); + writer.print(" mUserVisibleHint="); writer.println(mUserVisibleHint); if (mFragmentManager != null) { writer.print(prefix); writer.print("mFragmentManager="); writer.println(mFragmentManager); diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java index c4ba778cfb73..a8c9cbab2095 100644 --- a/core/java/android/app/FragmentManager.java +++ b/core/java/android/app/FragmentManager.java @@ -382,6 +382,7 @@ final class FragmentManagerImpl extends FragmentManager { static final String TARGET_REQUEST_CODE_STATE_TAG = "android:target_req_state"; static final String TARGET_STATE_TAG = "android:target_state"; static final String VIEW_STATE_TAG = "android:view_state"; + static final String USER_VISIBLE_HINT_TAG = "android:user_visible_hint"; ArrayList<Runnable> mPendingActions; Runnable[] mTmpActions; @@ -406,6 +407,7 @@ final class FragmentManagerImpl extends FragmentManager { boolean mStateSaved; boolean mDestroyed; String mNoTransactionsBecause; + boolean mHavePendingDeferredStart; // Temporary vars for state save and restore. Bundle mStateBundle = null; @@ -711,6 +713,11 @@ final class FragmentManagerImpl extends FragmentManager { public void performPendingDeferredStart(Fragment f) { if (f.mDeferStart) { + if (mExecutingActions) { + // Wait until we're done executing our pending transactions + mHavePendingDeferredStart = true; + return; + } f.mDeferStart = false; moveToState(f, mCurState, 0, 0); } @@ -757,6 +764,14 @@ final class FragmentManagerImpl extends FragmentManager { f.mTargetRequestCode = f.mSavedFragmentState.getInt( FragmentManagerImpl.TARGET_REQUEST_CODE_STATE_TAG, 0); } + f.mUserVisibleHint = f.mSavedFragmentState.getBoolean( + FragmentManagerImpl.USER_VISIBLE_HINT_TAG, true); + if (!f.mUserVisibleHint) { + f.mDeferStart = true; + if (newState > Fragment.STOPPED) { + newState = Fragment.STOPPED; + } + } } f.mActivity = mActivity; f.mFragmentManager = mActivity.mFragments; @@ -1343,7 +1358,7 @@ final class FragmentManagerImpl extends FragmentManager { synchronized (this) { if (mPendingActions == null || mPendingActions.size() == 0) { - return didSomething; + break; } numActions = mPendingActions.size(); @@ -1363,8 +1378,23 @@ final class FragmentManagerImpl extends FragmentManager { mExecutingActions = false; didSomething = true; } + + if (mHavePendingDeferredStart) { + boolean loadersRunning = false; + for (int i=0; i<mActive.size(); i++) { + Fragment f = mActive.get(i); + if (f != null && f.mLoaderManager != null) { + loadersRunning |= f.mLoaderManager.hasRunningLoaders(); + } + } + if (!loadersRunning) { + mHavePendingDeferredStart = false; + startPendingDeferredFragments(); + } + } + return didSomething; } - + void reportBackStackChanged() { if (mBackStackChangeListeners != null) { for (int i=0; i<mBackStackChangeListeners.size(); i++) { @@ -1500,6 +1530,10 @@ final class FragmentManagerImpl extends FragmentManager { result.putSparseParcelableArray( FragmentManagerImpl.VIEW_STATE_TAG, f.mSavedViewState); } + if (!f.mUserVisibleHint) { + // Only add this if it's not the default value + result.putBoolean(FragmentManagerImpl.USER_VISIBLE_HINT_TAG, f.mUserVisibleHint); + } return result; } diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java index 954a6feafe58..fdc25708f2d1 100755 --- a/core/java/android/speech/tts/TextToSpeech.java +++ b/core/java/android/speech/tts/TextToSpeech.java @@ -1089,6 +1089,7 @@ public class TextToSpeech { // Copy feature strings defined by the framework. copyStringParam(bundle, params, Engine.KEY_FEATURE_NETWORK_SYNTHESIS); + copyStringParam(bundle, params, Engine.KEY_FEATURE_EMBEDDED_SYNTHESIS); // Copy over all parameters that start with the name of the // engine that we are currently connected to. The engine is diff --git a/core/java/android/speech/tts/TextToSpeechService.java b/core/java/android/speech/tts/TextToSpeechService.java index 245271df5967..83b6d4c24f21 100644 --- a/core/java/android/speech/tts/TextToSpeechService.java +++ b/core/java/android/speech/tts/TextToSpeechService.java @@ -792,8 +792,13 @@ public abstract class TextToSpeechService extends Service { public String[] getFeaturesForLanguage(String lang, String country, String variant) { Set<String> features = onGetFeaturesForLanguage(lang, country, variant); - String[] featuresArray = new String[features.size()]; - features.toArray(featuresArray); + String[] featuresArray = null; + if (features != null) { + featuresArray = new String[features.size()]; + features.toArray(featuresArray); + } else { + featuresArray = new String[0]; + } return featuresArray; } diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index a8680d441d71..5833afd8ffe7 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -9059,51 +9059,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener sendAccessibilityEventUnchecked(event); } - @Override - protected void onCreateContextMenu(ContextMenu menu) { - super.onCreateContextMenu(menu); - boolean added = false; - mContextMenuTriggeredByKey = mDPadCenterIsDown || mEnterKeyIsDown; - // Problem with context menu on long press: the menu appears while the key in down and when - // the key is released, the view does not receive the key_up event. - // We need two layers of flags: mDPadCenterIsDown and mEnterKeyIsDown are set in key down/up - // events. We cannot simply clear these flags in onTextContextMenuItem since - // it may not be called (if the user/ discards the context menu with the back key). - // We clear these flags here and mContextMenuTriggeredByKey saves that state so that it is - // available in onTextContextMenuItem. - mDPadCenterIsDown = mEnterKeyIsDown = false; - - MenuHandler handler = new MenuHandler(); - - if (mText instanceof Spanned && hasSelectionController()) { - long lastTouchOffset = getLastTouchOffsets(); - final int selStart = extractRangeStartFromLong(lastTouchOffset); - final int selEnd = extractRangeEndFromLong(lastTouchOffset); - - URLSpan[] urls = ((Spanned) mText).getSpans(selStart, selEnd, URLSpan.class); - if (urls.length > 0) { - menu.add(0, ID_COPY_URL, 0, com.android.internal.R.string.copyUrl). - setOnMenuItemClickListener(handler); - - added = true; - } - } - - // The context menu is not empty, which will prevent the selection mode from starting. - // Add a entry to start it in the context menu. - // TODO Does not handle the case where a subclass does not call super.thisMethod or - // populates the menu AFTER this call. - if (menu.size() > 0) { - menu.add(0, ID_SELECTION_MODE, 0, com.android.internal.R.string.selectTextMode). - setOnMenuItemClickListener(handler); - added = true; - } - - if (added) { - menu.setHeaderTitle(com.android.internal.R.string.editTextMenuTitle); - } - } - /** * Returns whether this text view is a current input method target. The * default implementation just checks with {@link InputMethodManager}. @@ -9118,9 +9073,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener private static final int ID_CUT = android.R.id.cut; private static final int ID_COPY = android.R.id.copy; private static final int ID_PASTE = android.R.id.paste; - // Context menu entries - private static final int ID_COPY_URL = android.R.id.copyUrl; - private static final int ID_SELECTION_MODE = android.R.id.selectTextMode; private class MenuHandler implements MenuItem.OnMenuItemClickListener { public boolean onMenuItemClick(MenuItem item) { @@ -9130,9 +9082,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener /** * Called when a context menu option for the text view is selected. Currently - * this will be {@link android.R.id#copyUrl}, {@link android.R.id#selectTextMode}, - * {@link android.R.id#selectAll}, {@link android.R.id#paste}, {@link android.R.id#cut} - * or {@link android.R.id#copy}. + * this will be one of {@link android.R.id#selectAll}, {@link android.R.id#cut}, + * {@link android.R.id#copy} or {@link android.R.id#paste}. * * @return true if the context menu item action was performed. */ @@ -9149,34 +9100,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } switch (id) { - case ID_COPY_URL: - URLSpan[] urls = ((Spanned) mText).getSpans(min, max, URLSpan.class); - if (urls.length >= 1) { - ClipData clip = null; - for (int i=0; i<urls.length; i++) { - Uri uri = Uri.parse(urls[0].getURL()); - if (clip == null) { - clip = ClipData.newRawUri(null, uri); - } else { - clip.addItem(new ClipData.Item(uri)); - } - } - if (clip != null) { - setPrimaryClip(clip); - } - } - stopSelectionActionMode(); - return true; - - case ID_SELECTION_MODE: - if (mSelectionActionMode != null) { - // Selection mode is already started, simply change selected part. - selectCurrentWord(); - } else { - startSelectionActionMode(); - } - return true; - case ID_SELECT_ALL: // This does not enter text selection mode. Text is highlighted, so that it can be // bulk edited, like selectAllOnFocus does. Returns true even if text is empty. diff --git a/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png Binary files differindex f57126bc56e1..13ab8f7dabb2 100644 --- a/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png Binary files differindex f57126bc56e1..13ab8f7dabb2 100644 --- a/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_default_disabled_focused_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/btn_default_disabled_holo.9.png b/core/res/res/drawable-hdpi/btn_default_disabled_holo.9.png Binary files differindex c5adc38aa99f..1d76bb5aa80b 100644 --- a/core/res/res/drawable-hdpi/btn_default_disabled_holo.9.png +++ b/core/res/res/drawable-hdpi/btn_default_disabled_holo.9.png diff --git a/core/res/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png Binary files differindex 05cb4e455e3b..8ebd761cc1e1 100644 --- a/core/res/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_default_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_default_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_disabled_holo_light.9.png Binary files differindex 05cb4e455e3b..8ebd761cc1e1 100644 --- a/core/res/res/drawable-hdpi/btn_default_disabled_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_default_disabled_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/btn_default_focused_holo.9.png b/core/res/res/drawable-hdpi/btn_default_focused_holo.9.png Binary files differindex efcfa26d7594..b405d81c3e85 100644 --- a/core/res/res/drawable-hdpi/btn_default_focused_holo.9.png +++ b/core/res/res/drawable-hdpi/btn_default_focused_holo.9.png diff --git a/core/res/res/drawable-hdpi/btn_default_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_focused_holo_dark.9.png Binary files differindex 3b9d73469839..fee599ae9940 100644 --- a/core/res/res/drawable-hdpi/btn_default_focused_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_default_focused_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_default_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_focused_holo_light.9.png Binary files differindex 3b9d73469839..fee599ae9940 100644 --- a/core/res/res/drawable-hdpi/btn_default_focused_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_default_focused_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/btn_default_normal_holo.9.png b/core/res/res/drawable-hdpi/btn_default_normal_holo.9.png Binary files differindex 490b6f545aa9..dddfc26c37dd 100644 --- a/core/res/res/drawable-hdpi/btn_default_normal_holo.9.png +++ b/core/res/res/drawable-hdpi/btn_default_normal_holo.9.png diff --git a/core/res/res/drawable-hdpi/btn_default_normal_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_normal_holo_dark.9.png Binary files differindex b28518349ab7..ab40fa7ab944 100644 --- a/core/res/res/drawable-hdpi/btn_default_normal_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_default_normal_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_default_normal_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_normal_holo_light.9.png Binary files differindex b28518349ab7..807792183fd5 100644 --- a/core/res/res/drawable-hdpi/btn_default_normal_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_default_normal_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/btn_default_pressed_holo.9.png b/core/res/res/drawable-hdpi/btn_default_pressed_holo.9.png Binary files differindex 57f20268b570..0d8f8ba49c28 100644 --- a/core/res/res/drawable-hdpi/btn_default_pressed_holo.9.png +++ b/core/res/res/drawable-hdpi/btn_default_pressed_holo.9.png diff --git a/core/res/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png Binary files differindex 13d154fa2090..baf7018a443e 100644 --- a/core/res/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_default_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_default_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/btn_default_pressed_holo_light.9.png Binary files differindex 13d154fa2090..baf7018a443e 100644 --- a/core/res/res/drawable-hdpi/btn_default_pressed_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_default_pressed_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png Binary files differindex 15b9fb94de2d..7a24c9b6d61b 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png Binary files differindex 4d83d6502273..7a24c9b6d61b 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_focused_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png Binary files differindex e06aef018761..93c6d1bdec36 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png Binary files differindex d81d34635769..93c6d1bdec36 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_off_disabled_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png Binary files differindex 9f027b7c22d4..120f963a396a 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png Binary files differindex a7582d63b3ee..120f963a396a 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_off_focused_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png Binary files differindex 21be9f446cb1..6b106fb6a9cf 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png Binary files differindex 791b318fc3d7..6b106fb6a9cf 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_off_normal_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_dark.9.png Binary files differindex 8cf35b286dfd..a1b7003040e0 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_light.9.png Binary files differindex e475b496f503..a1b7003040e0 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_off_pressed_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png Binary files differindex 7996db4d8d25..7176a6b3e6a4 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png Binary files differindex 7996db4d8d25..7176a6b3e6a4 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_focused_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png Binary files differindex 906a22996983..7fba6a5dbc16 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png Binary files differindex 906a22996983..7fba6a5dbc16 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_on_disabled_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png Binary files differindex 56bd3253cb67..8bbfe9f0a664 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png Binary files differindex 56bd3253cb67..8bbfe9f0a664 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_on_focused_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png Binary files differindex 61b2efcb7904..28f0ee62749c 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png Binary files differindex 61b2efcb7904..28f0ee62749c 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_on_normal_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_dark.9.png Binary files differindex d2e4ca8dfc9a..c4c41a3183cd 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_light.9.png Binary files differindex d2e4ca8dfc9a..c4c41a3183cd 100644 --- a/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_light.9.png +++ b/core/res/res/drawable-hdpi/btn_toggle_on_pressed_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/ic_media_next.png b/core/res/res/drawable-hdpi/ic_media_next.png Binary files differindex f5ba824c1943..6e27b8161e4a 100644 --- a/core/res/res/drawable-hdpi/ic_media_next.png +++ b/core/res/res/drawable-hdpi/ic_media_next.png diff --git a/core/res/res/drawable-hdpi/ic_media_pause.png b/core/res/res/drawable-hdpi/ic_media_pause.png Binary files differindex 671148e8f809..1d465a41e4b0 100644 --- a/core/res/res/drawable-hdpi/ic_media_pause.png +++ b/core/res/res/drawable-hdpi/ic_media_pause.png diff --git a/core/res/res/drawable-hdpi/ic_media_play.png b/core/res/res/drawable-hdpi/ic_media_play.png Binary files differindex c2e366a7dd7e..2746d17fb1fe 100644 --- a/core/res/res/drawable-hdpi/ic_media_play.png +++ b/core/res/res/drawable-hdpi/ic_media_play.png diff --git a/core/res/res/drawable-hdpi/ic_media_previous.png b/core/res/res/drawable-hdpi/ic_media_previous.png Binary files differindex 40ecb00f469f..85b376690418 100644 --- a/core/res/res/drawable-hdpi/ic_media_previous.png +++ b/core/res/res/drawable-hdpi/ic_media_previous.png diff --git a/core/res/res/drawable-hdpi/ic_media_stop.png b/core/res/res/drawable-hdpi/ic_media_stop.png Binary files differindex ec0c1eaabb80..a0ff13695d9b 100644 --- a/core/res/res/drawable-hdpi/ic_media_stop.png +++ b/core/res/res/drawable-hdpi/ic_media_stop.png diff --git a/core/res/res/drawable-hdpi/list_focused_holo.9.png b/core/res/res/drawable-hdpi/list_focused_holo.9.png Binary files differindex 516f5c7399c8..555270842a73 100644 --- a/core/res/res/drawable-hdpi/list_focused_holo.9.png +++ b/core/res/res/drawable-hdpi/list_focused_holo.9.png diff --git a/core/res/res/drawable-hdpi/numberpicker_down_focused_holo_dark.png b/core/res/res/drawable-hdpi/numberpicker_down_focused_holo_dark.png Binary files differindex 9ff4cce66b88..5717beebcf23 100644 --- a/core/res/res/drawable-hdpi/numberpicker_down_focused_holo_dark.png +++ b/core/res/res/drawable-hdpi/numberpicker_down_focused_holo_dark.png diff --git a/core/res/res/drawable-hdpi/numberpicker_down_focused_holo_light.png b/core/res/res/drawable-hdpi/numberpicker_down_focused_holo_light.png Binary files differindex a556e00f25ec..e874330d3868 100644 --- a/core/res/res/drawable-hdpi/numberpicker_down_focused_holo_light.png +++ b/core/res/res/drawable-hdpi/numberpicker_down_focused_holo_light.png diff --git a/core/res/res/drawable-hdpi/numberpicker_down_longpressed_holo_dark.png b/core/res/res/drawable-hdpi/numberpicker_down_longpressed_holo_dark.png Binary files differindex 935351104198..96a6c8a2dd91 100644 --- a/core/res/res/drawable-hdpi/numberpicker_down_longpressed_holo_dark.png +++ b/core/res/res/drawable-hdpi/numberpicker_down_longpressed_holo_dark.png diff --git a/core/res/res/drawable-hdpi/numberpicker_down_longpressed_holo_light.png b/core/res/res/drawable-hdpi/numberpicker_down_longpressed_holo_light.png Binary files differindex 935351104198..96a6c8a2dd91 100644 --- a/core/res/res/drawable-hdpi/numberpicker_down_longpressed_holo_light.png +++ b/core/res/res/drawable-hdpi/numberpicker_down_longpressed_holo_light.png diff --git a/core/res/res/drawable-hdpi/numberpicker_down_normal_holo_dark.png b/core/res/res/drawable-hdpi/numberpicker_down_normal_holo_dark.png Binary files differindex 2ca591f5a3cf..4631d85cf15e 100644 --- a/core/res/res/drawable-hdpi/numberpicker_down_normal_holo_dark.png +++ b/core/res/res/drawable-hdpi/numberpicker_down_normal_holo_dark.png diff --git a/core/res/res/drawable-hdpi/numberpicker_down_normal_holo_light.png b/core/res/res/drawable-hdpi/numberpicker_down_normal_holo_light.png Binary files differindex 1275a2f29a82..39c7af4145ff 100644 --- a/core/res/res/drawable-hdpi/numberpicker_down_normal_holo_light.png +++ b/core/res/res/drawable-hdpi/numberpicker_down_normal_holo_light.png diff --git a/core/res/res/drawable-hdpi/numberpicker_up_focused_holo_dark.png b/core/res/res/drawable-hdpi/numberpicker_up_focused_holo_dark.png Binary files differindex df374c4e4ce5..b06017e0f8b6 100644 --- a/core/res/res/drawable-hdpi/numberpicker_up_focused_holo_dark.png +++ b/core/res/res/drawable-hdpi/numberpicker_up_focused_holo_dark.png diff --git a/core/res/res/drawable-hdpi/numberpicker_up_focused_holo_light.png b/core/res/res/drawable-hdpi/numberpicker_up_focused_holo_light.png Binary files differindex d6b9c679317f..a1000f8951f7 100644 --- a/core/res/res/drawable-hdpi/numberpicker_up_focused_holo_light.png +++ b/core/res/res/drawable-hdpi/numberpicker_up_focused_holo_light.png diff --git a/core/res/res/drawable-hdpi/numberpicker_up_longpressed_holo_dark.png b/core/res/res/drawable-hdpi/numberpicker_up_longpressed_holo_dark.png Binary files differindex 69474e33414b..b3d6706a408c 100644 --- a/core/res/res/drawable-hdpi/numberpicker_up_longpressed_holo_dark.png +++ b/core/res/res/drawable-hdpi/numberpicker_up_longpressed_holo_dark.png diff --git a/core/res/res/drawable-hdpi/numberpicker_up_longpressed_holo_light.png b/core/res/res/drawable-hdpi/numberpicker_up_longpressed_holo_light.png Binary files differindex 69474e33414b..b3d6706a408c 100644 --- a/core/res/res/drawable-hdpi/numberpicker_up_longpressed_holo_light.png +++ b/core/res/res/drawable-hdpi/numberpicker_up_longpressed_holo_light.png diff --git a/core/res/res/drawable-hdpi/numberpicker_up_normal_holo_dark.png b/core/res/res/drawable-hdpi/numberpicker_up_normal_holo_dark.png Binary files differindex a2fc32a4652f..9ee35c7db9d8 100644 --- a/core/res/res/drawable-hdpi/numberpicker_up_normal_holo_dark.png +++ b/core/res/res/drawable-hdpi/numberpicker_up_normal_holo_dark.png diff --git a/core/res/res/drawable-hdpi/numberpicker_up_normal_holo_light.png b/core/res/res/drawable-hdpi/numberpicker_up_normal_holo_light.png Binary files differindex c4b58b73ea8e..4da4fa76f996 100644 --- a/core/res/res/drawable-hdpi/numberpicker_up_normal_holo_light.png +++ b/core/res/res/drawable-hdpi/numberpicker_up_normal_holo_light.png diff --git a/core/res/res/drawable-hdpi/presence_away.png b/core/res/res/drawable-hdpi/presence_away.png Binary files differindex 455fec188618..c39d3a87ce78 100644 --- a/core/res/res/drawable-hdpi/presence_away.png +++ b/core/res/res/drawable-hdpi/presence_away.png diff --git a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_focused_dark.9.png b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_focused_dark.9.png Binary files differnew file mode 100644 index 000000000000..cbd8c5cccaae --- /dev/null +++ b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_focused_dark.9.png diff --git a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_focused_light.9.png b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_focused_light.9.png Binary files differnew file mode 100644 index 000000000000..f7f4ba34a1a8 --- /dev/null +++ b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_focused_light.9.png diff --git a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_dark.9.png b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_dark.9.png Binary files differindex db236355c3ec..a82e7ac05014 100644 --- a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_dark.9.png +++ b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_dark.9.png diff --git a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_light.9.png b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_light.9.png Binary files differindex 269a4569e247..db4ce8003e4e 100644 --- a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_light.9.png +++ b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_normal_light.9.png diff --git a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_dark.9.png b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_dark.9.png Binary files differindex d997b361faa7..0c689ff9f717 100644 --- a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_dark.9.png +++ b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_dark.9.png diff --git a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_light.9.png b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_light.9.png Binary files differindex 8ed5eb7a4821..f3999204c19c 100644 --- a/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_light.9.png +++ b/core/res/res/drawable-hdpi/quickcontact_badge_overlay_pressed_light.9.png diff --git a/core/res/res/drawable-hdpi/spinner_ab_default_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_ab_default_holo_dark.9.png Binary files differindex b306f22ccd26..eb28ff9a5516 100644 --- a/core/res/res/drawable-hdpi/spinner_ab_default_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/spinner_ab_default_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/spinner_ab_default_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_ab_default_holo_light.9.png Binary files differindex 21cf17e4fd1d..d281adb553af 100644 --- a/core/res/res/drawable-hdpi/spinner_ab_default_holo_light.9.png +++ b/core/res/res/drawable-hdpi/spinner_ab_default_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_dark.9.png Binary files differindex b9833f3f94d7..b2985860907a 100644 --- a/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_light.9.png Binary files differindex f68b6624b557..4215396dd4e5 100644 --- a/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_light.9.png +++ b/core/res/res/drawable-hdpi/spinner_ab_disabled_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/spinner_ab_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_ab_focused_holo_dark.9.png Binary files differindex a76f4ab6706c..a280eabf59b5 100644 --- a/core/res/res/drawable-hdpi/spinner_ab_focused_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/spinner_ab_focused_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/spinner_ab_focused_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_ab_focused_holo_light.9.png Binary files differindex ecfe9ccbfdce..f8d619b4d47a 100644 --- a/core/res/res/drawable-hdpi/spinner_ab_focused_holo_light.9.png +++ b/core/res/res/drawable-hdpi/spinner_ab_focused_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_dark.9.png Binary files differindex 51a5226b644e..955a2f34061a 100644 --- a/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_light.9.png Binary files differindex a24da9104e03..6c22e223acd3 100644 --- a/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_light.9.png +++ b/core/res/res/drawable-hdpi/spinner_ab_pressed_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/spinner_default_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_default_holo_dark.9.png Binary files differindex 09fc9c32c647..34a88dfa8f87 100644 --- a/core/res/res/drawable-hdpi/spinner_default_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/spinner_default_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/spinner_default_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_default_holo_light.9.png Binary files differindex bb257b910990..b03842dfa265 100644 --- a/core/res/res/drawable-hdpi/spinner_default_holo_light.9.png +++ b/core/res/res/drawable-hdpi/spinner_default_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/spinner_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_disabled_holo_dark.9.png Binary files differindex df49a4d0bb50..2d306d984149 100644 --- a/core/res/res/drawable-hdpi/spinner_disabled_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/spinner_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/spinner_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_disabled_holo_light.9.png Binary files differindex a6cb9922a528..720c4175c605 100644 --- a/core/res/res/drawable-hdpi/spinner_disabled_holo_light.9.png +++ b/core/res/res/drawable-hdpi/spinner_disabled_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/spinner_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_focused_holo_dark.9.png Binary files differindex 09f8cefe023a..b038fba6150a 100644 --- a/core/res/res/drawable-hdpi/spinner_focused_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/spinner_focused_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/spinner_focused_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_focused_holo_light.9.png Binary files differindex 58c67a01e841..ccffda98dbcd 100644 --- a/core/res/res/drawable-hdpi/spinner_focused_holo_light.9.png +++ b/core/res/res/drawable-hdpi/spinner_focused_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/spinner_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/spinner_pressed_holo_dark.9.png Binary files differindex a4723383b31f..f638d5e7965e 100644 --- a/core/res/res/drawable-hdpi/spinner_pressed_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/spinner_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/spinner_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/spinner_pressed_holo_light.9.png Binary files differindex ed9f6f621d00..0aedd25de2cc 100644 --- a/core/res/res/drawable-hdpi/spinner_pressed_holo_light.9.png +++ b/core/res/res/drawable-hdpi/spinner_pressed_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/switch_bg_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/switch_bg_disabled_holo_dark.9.png Binary files differindex e88681261aa3..f2196fd3fe32 100644 --- a/core/res/res/drawable-hdpi/switch_bg_disabled_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/switch_bg_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/switch_bg_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/switch_bg_disabled_holo_light.9.png Binary files differindex 3e92cf0ede3a..f111d823f217 100644 --- a/core/res/res/drawable-hdpi/switch_bg_disabled_holo_light.9.png +++ b/core/res/res/drawable-hdpi/switch_bg_disabled_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/switch_bg_focused_holo_dark.9.png b/core/res/res/drawable-hdpi/switch_bg_focused_holo_dark.9.png Binary files differindex 962cefb380fb..4e2ae0f36d4e 100644 --- a/core/res/res/drawable-hdpi/switch_bg_focused_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/switch_bg_focused_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/switch_bg_focused_holo_light.9.png b/core/res/res/drawable-hdpi/switch_bg_focused_holo_light.9.png Binary files differindex e05b345f0e2c..479e5042c394 100644 --- a/core/res/res/drawable-hdpi/switch_bg_focused_holo_light.9.png +++ b/core/res/res/drawable-hdpi/switch_bg_focused_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/switch_thumb_activated_holo_dark.9.png b/core/res/res/drawable-hdpi/switch_thumb_activated_holo_dark.9.png Binary files differindex 0bce7679a709..2fc475b37b76 100644 --- a/core/res/res/drawable-hdpi/switch_thumb_activated_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/switch_thumb_activated_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/switch_thumb_activated_holo_light.9.png b/core/res/res/drawable-hdpi/switch_thumb_activated_holo_light.9.png Binary files differindex 3b9c048cbd28..5adecf100027 100644 --- a/core/res/res/drawable-hdpi/switch_thumb_activated_holo_light.9.png +++ b/core/res/res/drawable-hdpi/switch_thumb_activated_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_dark.9.png b/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_dark.9.png Binary files differindex a4bd07454f4c..457fa847ce9e 100644 --- a/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_light.9.png b/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_light.9.png Binary files differindex 587bf4e5c836..c3cfc2999332 100644 --- a/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_light.9.png +++ b/core/res/res/drawable-hdpi/switch_thumb_disabled_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/switch_thumb_holo_dark.9.png b/core/res/res/drawable-hdpi/switch_thumb_holo_dark.9.png Binary files differindex a86be03cad88..d0e18061fba9 100644 --- a/core/res/res/drawable-hdpi/switch_thumb_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/switch_thumb_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/switch_thumb_holo_light.9.png b/core/res/res/drawable-hdpi/switch_thumb_holo_light.9.png Binary files differindex e3b0729e34fc..c30506db3623 100644 --- a/core/res/res/drawable-hdpi/switch_thumb_holo_light.9.png +++ b/core/res/res/drawable-hdpi/switch_thumb_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_dark.9.png b/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_dark.9.png Binary files differindex 4b56420a0a0a..9106687c4eeb 100644 --- a/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_dark.9.png +++ b/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_light.9.png b/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_light.9.png Binary files differindex 741674d5218c..2bdda5624441 100644 --- a/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_light.9.png +++ b/core/res/res/drawable-hdpi/switch_thumb_pressed_holo_light.9.png diff --git a/core/res/res/drawable-hdpi/sym_keyboard_num0_no_plus.png b/core/res/res/drawable-hdpi/sym_keyboard_num0_no_plus.png Binary files differindex 2aad23c99349..0e5f1e2979d6 100644 --- a/core/res/res/drawable-hdpi/sym_keyboard_num0_no_plus.png +++ b/core/res/res/drawable-hdpi/sym_keyboard_num0_no_plus.png diff --git a/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png Binary files differindex 74ed9b5acaa6..38d00db5ced4 100644 --- a/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png Binary files differindex 74ed9b5acaa6..38d00db5ced4 100644 --- a/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_default_disabled_focused_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/btn_default_disabled_holo.9.png b/core/res/res/drawable-mdpi/btn_default_disabled_holo.9.png Binary files differindex abf64938f4e1..85c2c4f8ed6e 100644 --- a/core/res/res/drawable-mdpi/btn_default_disabled_holo.9.png +++ b/core/res/res/drawable-mdpi/btn_default_disabled_holo.9.png diff --git a/core/res/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png Binary files differindex 3b5d85017408..4a6351a45d64 100644 --- a/core/res/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_default_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_default_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_disabled_holo_light.9.png Binary files differindex 3b5d85017408..4a6351a45d64 100644 --- a/core/res/res/drawable-mdpi/btn_default_disabled_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_default_disabled_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/btn_default_focused_holo.9.png b/core/res/res/drawable-mdpi/btn_default_focused_holo.9.png Binary files differindex 71b052b58798..89d7a0e66d53 100644 --- a/core/res/res/drawable-mdpi/btn_default_focused_holo.9.png +++ b/core/res/res/drawable-mdpi/btn_default_focused_holo.9.png diff --git a/core/res/res/drawable-mdpi/btn_default_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_focused_holo_dark.9.png Binary files differindex 215002bc1b45..39950f6cad1d 100644 --- a/core/res/res/drawable-mdpi/btn_default_focused_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_default_focused_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_default_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_focused_holo_light.9.png Binary files differindex 215002bc1b45..39950f6cad1d 100644 --- a/core/res/res/drawable-mdpi/btn_default_focused_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_default_focused_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/btn_default_normal_holo.9.png b/core/res/res/drawable-mdpi/btn_default_normal_holo.9.png Binary files differindex 87c62ff0cbd2..0895d57e89ec 100644 --- a/core/res/res/drawable-mdpi/btn_default_normal_holo.9.png +++ b/core/res/res/drawable-mdpi/btn_default_normal_holo.9.png diff --git a/core/res/res/drawable-mdpi/btn_default_normal_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_normal_holo_dark.9.png Binary files differindex dd8ee9d6beaf..54c635490834 100644 --- a/core/res/res/drawable-mdpi/btn_default_normal_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_default_normal_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_default_normal_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_normal_holo_light.9.png Binary files differindex dd8ee9d6beaf..50070ed45910 100644 --- a/core/res/res/drawable-mdpi/btn_default_normal_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_default_normal_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/btn_default_pressed_holo.9.png b/core/res/res/drawable-mdpi/btn_default_pressed_holo.9.png Binary files differindex 51821fa6f065..6a1b6a139abb 100644 --- a/core/res/res/drawable-mdpi/btn_default_pressed_holo.9.png +++ b/core/res/res/drawable-mdpi/btn_default_pressed_holo.9.png diff --git a/core/res/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png Binary files differindex 2ca4c3b0d8bc..13a1fdd31167 100644 --- a/core/res/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_default_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_default_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/btn_default_pressed_holo_light.9.png Binary files differindex 2ca4c3b0d8bc..13a1fdd31167 100644 --- a/core/res/res/drawable-mdpi/btn_default_pressed_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_default_pressed_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png Binary files differindex 0fa2859ec326..88da06e1d7de 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png Binary files differindex bdc03304cdb2..88da06e1d7de 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_focused_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png Binary files differindex 35aca07cf020..ae2c2c4bfc4b 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png Binary files differindex 3a07479ab446..ae2c2c4bfc4b 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_off_disabled_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png Binary files differindex 575558486b60..db0f9ab68882 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png Binary files differindex b0af68f595b0..db0f9ab68882 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_off_focused_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png Binary files differindex 7c725b27c11b..7abaf3ed0ad9 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png Binary files differindex 93696aaeeb40..7abaf3ed0ad9 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_off_normal_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_dark.9.png Binary files differindex 6dc4f1ed61be..354fd0e2c48f 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_light.9.png Binary files differindex 3a7e25c4a6ac..354fd0e2c48f 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_off_pressed_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png Binary files differindex 5ddcc423c50e..d311c8077ad6 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png Binary files differindex 5ddcc423c50e..d311c8077ad6 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_focused_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png Binary files differindex 6f19f4919f0e..d0fd585c6027 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png Binary files differindex 6f19f4919f0e..d0fd585c6027 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_on_disabled_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png Binary files differindex 1087fe31a834..e27b3ded920e 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png Binary files differindex 1087fe31a834..e27b3ded920e 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_on_focused_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png Binary files differindex 7db7486e384e..cbed62f41d98 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png Binary files differindex 7db7486e384e..cbed62f41d98 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_on_normal_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_dark.9.png Binary files differindex 842d967f41db..16fa3320f7cc 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_light.9.png Binary files differindex 842d967f41db..16fa3320f7cc 100644 --- a/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_light.9.png +++ b/core/res/res/drawable-mdpi/btn_toggle_on_pressed_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/ic_media_next.png b/core/res/res/drawable-mdpi/ic_media_next.png Binary files differindex acef506ba7ad..fcd73d90e762 100644 --- a/core/res/res/drawable-mdpi/ic_media_next.png +++ b/core/res/res/drawable-mdpi/ic_media_next.png diff --git a/core/res/res/drawable-mdpi/ic_media_pause.png b/core/res/res/drawable-mdpi/ic_media_pause.png Binary files differindex 548ba0219311..3e6b2a17b562 100644 --- a/core/res/res/drawable-mdpi/ic_media_pause.png +++ b/core/res/res/drawable-mdpi/ic_media_pause.png diff --git a/core/res/res/drawable-mdpi/ic_media_play.png b/core/res/res/drawable-mdpi/ic_media_play.png Binary files differindex 0fe680647e94..7966bbc5161a 100644 --- a/core/res/res/drawable-mdpi/ic_media_play.png +++ b/core/res/res/drawable-mdpi/ic_media_play.png diff --git a/core/res/res/drawable-mdpi/ic_media_previous.png b/core/res/res/drawable-mdpi/ic_media_previous.png Binary files differindex 940d6a46fa09..b653d05b9f4a 100644 --- a/core/res/res/drawable-mdpi/ic_media_previous.png +++ b/core/res/res/drawable-mdpi/ic_media_previous.png diff --git a/core/res/res/drawable-mdpi/ic_media_stop.png b/core/res/res/drawable-mdpi/ic_media_stop.png Binary files differindex 24bcb709205d..8ea7efee53d6 100644 --- a/core/res/res/drawable-mdpi/ic_media_stop.png +++ b/core/res/res/drawable-mdpi/ic_media_stop.png diff --git a/core/res/res/drawable-mdpi/list_focused_holo.9.png b/core/res/res/drawable-mdpi/list_focused_holo.9.png Binary files differindex 7c0599e3a6fc..00f05d8c97e7 100644 --- a/core/res/res/drawable-mdpi/list_focused_holo.9.png +++ b/core/res/res/drawable-mdpi/list_focused_holo.9.png diff --git a/core/res/res/drawable-mdpi/numberpicker_down_disabled_focused_holo_dark.png b/core/res/res/drawable-mdpi/numberpicker_down_disabled_focused_holo_dark.png Binary files differindex 7d9637a9440b..50f6e98accd9 100644 --- a/core/res/res/drawable-mdpi/numberpicker_down_disabled_focused_holo_dark.png +++ b/core/res/res/drawable-mdpi/numberpicker_down_disabled_focused_holo_dark.png diff --git a/core/res/res/drawable-mdpi/numberpicker_down_disabled_focused_holo_light.png b/core/res/res/drawable-mdpi/numberpicker_down_disabled_focused_holo_light.png Binary files differindex f7409e47336c..67434f6277c5 100644 --- a/core/res/res/drawable-mdpi/numberpicker_down_disabled_focused_holo_light.png +++ b/core/res/res/drawable-mdpi/numberpicker_down_disabled_focused_holo_light.png diff --git a/core/res/res/drawable-mdpi/numberpicker_down_pressed_holo_dark.png b/core/res/res/drawable-mdpi/numberpicker_down_pressed_holo_dark.png Binary files differindex 081ea4ed303f..eb16f8dde140 100644 --- a/core/res/res/drawable-mdpi/numberpicker_down_pressed_holo_dark.png +++ b/core/res/res/drawable-mdpi/numberpicker_down_pressed_holo_dark.png diff --git a/core/res/res/drawable-mdpi/numberpicker_down_pressed_holo_light.png b/core/res/res/drawable-mdpi/numberpicker_down_pressed_holo_light.png Binary files differindex 081ea4ed303f..eb16f8dde140 100644 --- a/core/res/res/drawable-mdpi/numberpicker_down_pressed_holo_light.png +++ b/core/res/res/drawable-mdpi/numberpicker_down_pressed_holo_light.png diff --git a/core/res/res/drawable-mdpi/numberpicker_up_disabled_focused_holo_dark.png b/core/res/res/drawable-mdpi/numberpicker_up_disabled_focused_holo_dark.png Binary files differindex 739a8d7c8896..58a3b64322ac 100644 --- a/core/res/res/drawable-mdpi/numberpicker_up_disabled_focused_holo_dark.png +++ b/core/res/res/drawable-mdpi/numberpicker_up_disabled_focused_holo_dark.png diff --git a/core/res/res/drawable-mdpi/numberpicker_up_disabled_focused_holo_light.png b/core/res/res/drawable-mdpi/numberpicker_up_disabled_focused_holo_light.png Binary files differindex bd440f2840d8..382943b08ac7 100644 --- a/core/res/res/drawable-mdpi/numberpicker_up_disabled_focused_holo_light.png +++ b/core/res/res/drawable-mdpi/numberpicker_up_disabled_focused_holo_light.png diff --git a/core/res/res/drawable-mdpi/numberpicker_up_pressed_holo_dark.png b/core/res/res/drawable-mdpi/numberpicker_up_pressed_holo_dark.png Binary files differindex 0318c5f9e196..bc5e3faef985 100644 --- a/core/res/res/drawable-mdpi/numberpicker_up_pressed_holo_dark.png +++ b/core/res/res/drawable-mdpi/numberpicker_up_pressed_holo_dark.png diff --git a/core/res/res/drawable-mdpi/numberpicker_up_pressed_holo_light.png b/core/res/res/drawable-mdpi/numberpicker_up_pressed_holo_light.png Binary files differindex 0318c5f9e196..bc5e3faef985 100644 --- a/core/res/res/drawable-mdpi/numberpicker_up_pressed_holo_light.png +++ b/core/res/res/drawable-mdpi/numberpicker_up_pressed_holo_light.png diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_focused_dark.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_focused_dark.9.png Binary files differnew file mode 100644 index 000000000000..d12a19660fd7 --- /dev/null +++ b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_focused_dark.9.png diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_focused_light.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_focused_light.9.png Binary files differnew file mode 100644 index 000000000000..27c7977dc66b --- /dev/null +++ b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_focused_light.9.png diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_dark.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_dark.9.png Binary files differindex 84d4c11809e4..99c42c5740c3 100644 --- a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_dark.9.png +++ b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_dark.9.png diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_light.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_light.9.png Binary files differindex d922ef114596..886b044b2566 100644 --- a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_light.9.png +++ b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_normal_light.9.png diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_dark.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_dark.9.png Binary files differindex 8c37c8d7356a..eee058fcfeb4 100644 --- a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_dark.9.png +++ b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_dark.9.png diff --git a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_light.9.png b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_light.9.png Binary files differindex e442c28405b2..1ac24be7fa54 100644 --- a/core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_light.9.png +++ b/core/res/res/drawable-mdpi/quickcontact_badge_overlay_pressed_light.9.png diff --git a/core/res/res/drawable-mdpi/spinner_ab_default_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_ab_default_holo_dark.9.png Binary files differindex 9c99bdabff4c..29aff4d43f71 100644 --- a/core/res/res/drawable-mdpi/spinner_ab_default_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/spinner_ab_default_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/spinner_ab_default_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_ab_default_holo_light.9.png Binary files differindex 81b205a59660..4055f70539b6 100644 --- a/core/res/res/drawable-mdpi/spinner_ab_default_holo_light.9.png +++ b/core/res/res/drawable-mdpi/spinner_ab_default_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_dark.9.png Binary files differindex 3ad668770537..ea4ee042eaf5 100644 --- a/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_light.9.png Binary files differindex fab4c6762af0..f74c02b9e18c 100644 --- a/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_light.9.png +++ b/core/res/res/drawable-mdpi/spinner_ab_disabled_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/spinner_ab_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_ab_focused_holo_dark.9.png Binary files differindex f3ef4823cd9a..09a2992ccaef 100644 --- a/core/res/res/drawable-mdpi/spinner_ab_focused_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/spinner_ab_focused_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/spinner_ab_focused_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_ab_focused_holo_light.9.png Binary files differindex d6772780282b..6536ee63329b 100644 --- a/core/res/res/drawable-mdpi/spinner_ab_focused_holo_light.9.png +++ b/core/res/res/drawable-mdpi/spinner_ab_focused_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_dark.9.png Binary files differindex 6255e2eb9c61..202b5b72ee8e 100644 --- a/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_light.9.png Binary files differindex 1085248704ab..6de0ba8841d2 100644 --- a/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_light.9.png +++ b/core/res/res/drawable-mdpi/spinner_ab_pressed_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/spinner_default_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_default_holo_dark.9.png Binary files differindex f88dcbad908d..48af19222ecc 100644 --- a/core/res/res/drawable-mdpi/spinner_default_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/spinner_default_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/spinner_default_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_default_holo_light.9.png Binary files differindex c75eecee6e3d..b3180cbb69ee 100644 --- a/core/res/res/drawable-mdpi/spinner_default_holo_light.9.png +++ b/core/res/res/drawable-mdpi/spinner_default_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/spinner_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_disabled_holo_dark.9.png Binary files differindex eb23155e7d0f..22eddd8ae0b2 100644 --- a/core/res/res/drawable-mdpi/spinner_disabled_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/spinner_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/spinner_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_disabled_holo_light.9.png Binary files differindex 4318af5e74ed..dad0ec9a263d 100644 --- a/core/res/res/drawable-mdpi/spinner_disabled_holo_light.9.png +++ b/core/res/res/drawable-mdpi/spinner_disabled_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/spinner_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_focused_holo_dark.9.png Binary files differindex dc8f01eca73d..2cdd273bc8d0 100644 --- a/core/res/res/drawable-mdpi/spinner_focused_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/spinner_focused_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/spinner_focused_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_focused_holo_light.9.png Binary files differindex 7d3af8794019..f605db895942 100644 --- a/core/res/res/drawable-mdpi/spinner_focused_holo_light.9.png +++ b/core/res/res/drawable-mdpi/spinner_focused_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/spinner_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/spinner_pressed_holo_dark.9.png Binary files differindex 2f00be8e7163..a69992483058 100644 --- a/core/res/res/drawable-mdpi/spinner_pressed_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/spinner_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/spinner_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/spinner_pressed_holo_light.9.png Binary files differindex 9c48cedeb967..f3c12d792803 100644 --- a/core/res/res/drawable-mdpi/spinner_pressed_holo_light.9.png +++ b/core/res/res/drawable-mdpi/spinner_pressed_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/switch_bg_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/switch_bg_disabled_holo_dark.9.png Binary files differindex a161b03a05b3..76ccb8e96aa0 100644 --- a/core/res/res/drawable-mdpi/switch_bg_disabled_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/switch_bg_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/switch_bg_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/switch_bg_disabled_holo_light.9.png Binary files differindex c637dd1e55e9..1e56c3253d42 100644 --- a/core/res/res/drawable-mdpi/switch_bg_disabled_holo_light.9.png +++ b/core/res/res/drawable-mdpi/switch_bg_disabled_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/switch_bg_focused_holo_dark.9.png b/core/res/res/drawable-mdpi/switch_bg_focused_holo_dark.9.png Binary files differindex 680d1a06a672..914e4337af81 100644 --- a/core/res/res/drawable-mdpi/switch_bg_focused_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/switch_bg_focused_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/switch_bg_focused_holo_light.9.png b/core/res/res/drawable-mdpi/switch_bg_focused_holo_light.9.png Binary files differindex 70da7b343682..89b02735fef0 100644 --- a/core/res/res/drawable-mdpi/switch_bg_focused_holo_light.9.png +++ b/core/res/res/drawable-mdpi/switch_bg_focused_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/switch_thumb_activated_holo_dark.9.png b/core/res/res/drawable-mdpi/switch_thumb_activated_holo_dark.9.png Binary files differindex 3d786c01a66a..0787d1647f55 100644 --- a/core/res/res/drawable-mdpi/switch_thumb_activated_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/switch_thumb_activated_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/switch_thumb_activated_holo_light.9.png b/core/res/res/drawable-mdpi/switch_thumb_activated_holo_light.9.png Binary files differindex 2bad2b8f2df8..0157e68ba1ae 100644 --- a/core/res/res/drawable-mdpi/switch_thumb_activated_holo_light.9.png +++ b/core/res/res/drawable-mdpi/switch_thumb_activated_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_dark.9.png b/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_dark.9.png Binary files differindex f6ed0bf0af0d..51b14d0a5749 100644 --- a/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_light.9.png b/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_light.9.png Binary files differindex a430b7782f13..d68568af5af5 100644 --- a/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_light.9.png +++ b/core/res/res/drawable-mdpi/switch_thumb_disabled_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/switch_thumb_holo_dark.9.png b/core/res/res/drawable-mdpi/switch_thumb_holo_dark.9.png Binary files differindex 6312c599e380..6bf153afaad0 100644 --- a/core/res/res/drawable-mdpi/switch_thumb_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/switch_thumb_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/switch_thumb_holo_light.9.png b/core/res/res/drawable-mdpi/switch_thumb_holo_light.9.png Binary files differindex 208672267053..0d98983e6112 100644 --- a/core/res/res/drawable-mdpi/switch_thumb_holo_light.9.png +++ b/core/res/res/drawable-mdpi/switch_thumb_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_dark.9.png b/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_dark.9.png Binary files differindex e44b1d819b14..3cee7b813f1b 100644 --- a/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_dark.9.png +++ b/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_light.9.png b/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_light.9.png Binary files differindex ee7e37b06d26..43a7c4cf69d3 100644 --- a/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_light.9.png +++ b/core/res/res/drawable-mdpi/switch_thumb_pressed_holo_light.9.png diff --git a/core/res/res/drawable-mdpi/sym_keyboard_num0_no_plus.png b/core/res/res/drawable-mdpi/sym_keyboard_num0_no_plus.png Binary files differindex 91332b17ecf3..d23114daebd7 100644 --- a/core/res/res/drawable-mdpi/sym_keyboard_num0_no_plus.png +++ b/core/res/res/drawable-mdpi/sym_keyboard_num0_no_plus.png diff --git a/core/res/res/drawable-xhdpi/btn_default_disabled_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_default_disabled_focused_holo_dark.9.png Binary files differindex b534256eef94..b7707c6f3371 100644 --- a/core/res/res/drawable-xhdpi/btn_default_disabled_focused_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_default_disabled_focused_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_default_disabled_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_default_disabled_focused_holo_light.9.png Binary files differindex b534256eef94..b7707c6f3371 100644 --- a/core/res/res/drawable-xhdpi/btn_default_disabled_focused_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_default_disabled_focused_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/btn_default_disabled_holo.9.png b/core/res/res/drawable-xhdpi/btn_default_disabled_holo.9.png Binary files differindex aca0a23a86e1..2ed63865a844 100644 --- a/core/res/res/drawable-xhdpi/btn_default_disabled_holo.9.png +++ b/core/res/res/drawable-xhdpi/btn_default_disabled_holo.9.png diff --git a/core/res/res/drawable-xhdpi/btn_default_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_default_disabled_holo_dark.9.png Binary files differindex 137d726e26d2..ffee5e2d03ea 100644 --- a/core/res/res/drawable-xhdpi/btn_default_disabled_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_default_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_default_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_default_disabled_holo_light.9.png Binary files differindex 137d726e26d2..ffee5e2d03ea 100644 --- a/core/res/res/drawable-xhdpi/btn_default_disabled_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_default_disabled_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/btn_default_focused_holo.9.png b/core/res/res/drawable-xhdpi/btn_default_focused_holo.9.png Binary files differindex 7dc088af5eda..702ebc65af14 100644 --- a/core/res/res/drawable-xhdpi/btn_default_focused_holo.9.png +++ b/core/res/res/drawable-xhdpi/btn_default_focused_holo.9.png diff --git a/core/res/res/drawable-xhdpi/btn_default_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_default_focused_holo_dark.9.png Binary files differindex c5bc3ecac07a..30bfa30ac3b7 100644 --- a/core/res/res/drawable-xhdpi/btn_default_focused_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_default_focused_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_default_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_default_focused_holo_light.9.png Binary files differindex c5bc3ecac07a..30bfa30ac3b7 100644 --- a/core/res/res/drawable-xhdpi/btn_default_focused_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_default_focused_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/btn_default_normal_holo.9.png b/core/res/res/drawable-xhdpi/btn_default_normal_holo.9.png Binary files differindex a97c1d324cdb..89ce2df5bc3a 100644 --- a/core/res/res/drawable-xhdpi/btn_default_normal_holo.9.png +++ b/core/res/res/drawable-xhdpi/btn_default_normal_holo.9.png diff --git a/core/res/res/drawable-xhdpi/btn_default_normal_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_default_normal_holo_dark.9.png Binary files differindex ed7e0f419a43..745d53e7a9eb 100644 --- a/core/res/res/drawable-xhdpi/btn_default_normal_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_default_normal_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_default_normal_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_default_normal_holo_light.9.png Binary files differindex ed7e0f419a43..c509934f5ada 100644 --- a/core/res/res/drawable-xhdpi/btn_default_normal_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_default_normal_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/btn_default_pressed_holo.9.png b/core/res/res/drawable-xhdpi/btn_default_pressed_holo.9.png Binary files differindex 25d139a71f3c..b1eab7977039 100644 --- a/core/res/res/drawable-xhdpi/btn_default_pressed_holo.9.png +++ b/core/res/res/drawable-xhdpi/btn_default_pressed_holo.9.png diff --git a/core/res/res/drawable-xhdpi/btn_default_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_default_pressed_holo_dark.9.png Binary files differindex 61f5f6f1f219..417152b4f63e 100644 --- a/core/res/res/drawable-xhdpi/btn_default_pressed_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_default_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_default_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_default_pressed_holo_light.9.png Binary files differindex 61f5f6f1f219..417152b4f63e 100644 --- a/core/res/res/drawable-xhdpi/btn_default_pressed_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_default_pressed_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_dark.9.png Binary files differindex 18aeac6bb3c4..c271216c3223 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_light.9.png Binary files differindex 471b6ea8a803..c271216c3223 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_focused_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_dark.9.png Binary files differindex 393f96726eca..a2d3ecd7efb0 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_light.9.png Binary files differindex 87193af9d2d2..a2d3ecd7efb0 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_off_disabled_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_dark.9.png Binary files differindex 0ad8f3588dd8..80cbb053bcee 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_light.9.png Binary files differindex fc21be150ef7..80cbb053bcee 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_off_focused_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_dark.9.png Binary files differindex 5ff338d65b12..db2cfc564f3f 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_light.9.png Binary files differindex 13214732683e..db2cfc564f3f 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_off_normal_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_pressed_holo_dark.9.png Binary files differindex 9c914b0e440b..5086f4609432 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_off_pressed_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_off_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_off_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_off_pressed_holo_light.9.png Binary files differindex fe28238fd656..5086f4609432 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_off_pressed_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_off_pressed_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_dark.9.png Binary files differindex 455fdb45e4e9..0f5851b6880f 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_light.9.png Binary files differindex 455fdb45e4e9..0f5851b6880f 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_focused_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_dark.9.png Binary files differindex ee8329df7630..74c853f2e53f 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_light.9.png Binary files differindex ee8329df7630..74c853f2e53f 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_on_disabled_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_dark.9.png Binary files differindex ccfb2d00a000..7bd7af5b6b85 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_light.9.png Binary files differindex ccfb2d00a000..7bd7af5b6b85 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_on_focused_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_dark.9.png Binary files differindex ad1f4f0045bd..71dad92384a8 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_light.9.png Binary files differindex ad1f4f0045bd..71dad92384a8 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_on_normal_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_pressed_holo_dark.9.png Binary files differindex 97304afe10b7..1f62eff00d4a 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_on_pressed_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_on_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/btn_toggle_on_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/btn_toggle_on_pressed_holo_light.9.png Binary files differindex 97304afe10b7..1f62eff00d4a 100644 --- a/core/res/res/drawable-xhdpi/btn_toggle_on_pressed_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/btn_toggle_on_pressed_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/ic_media_next.png b/core/res/res/drawable-xhdpi/ic_media_next.png Binary files differindex 726fee7af47b..4def965cec24 100644 --- a/core/res/res/drawable-xhdpi/ic_media_next.png +++ b/core/res/res/drawable-xhdpi/ic_media_next.png diff --git a/core/res/res/drawable-xhdpi/ic_media_pause.png b/core/res/res/drawable-xhdpi/ic_media_pause.png Binary files differindex 8614bff431bb..6bd3d482e111 100644 --- a/core/res/res/drawable-xhdpi/ic_media_pause.png +++ b/core/res/res/drawable-xhdpi/ic_media_pause.png diff --git a/core/res/res/drawable-xhdpi/ic_media_play.png b/core/res/res/drawable-xhdpi/ic_media_play.png Binary files differindex d93e8241970d..ccfef180562c 100644 --- a/core/res/res/drawable-xhdpi/ic_media_play.png +++ b/core/res/res/drawable-xhdpi/ic_media_play.png diff --git a/core/res/res/drawable-xhdpi/ic_media_previous.png b/core/res/res/drawable-xhdpi/ic_media_previous.png Binary files differindex 59f994d0fe53..c4472ae2d9cb 100644 --- a/core/res/res/drawable-xhdpi/ic_media_previous.png +++ b/core/res/res/drawable-xhdpi/ic_media_previous.png diff --git a/core/res/res/drawable-xhdpi/ic_media_stop.png b/core/res/res/drawable-xhdpi/ic_media_stop.png Binary files differindex 00159aaf5e38..89f36950bfb9 100644 --- a/core/res/res/drawable-xhdpi/ic_media_stop.png +++ b/core/res/res/drawable-xhdpi/ic_media_stop.png diff --git a/core/res/res/drawable-xhdpi/list_focused_holo.9.png b/core/res/res/drawable-xhdpi/list_focused_holo.9.png Binary files differindex 690cb1eb61f6..b545f8e57871 100644 --- a/core/res/res/drawable-xhdpi/list_focused_holo.9.png +++ b/core/res/res/drawable-xhdpi/list_focused_holo.9.png diff --git a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_focused_dark.9.png b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_focused_dark.9.png Binary files differnew file mode 100644 index 000000000000..692783468ccc --- /dev/null +++ b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_focused_dark.9.png diff --git a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_focused_light.9.png b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_focused_light.9.png Binary files differnew file mode 100644 index 000000000000..4bce5278ab13 --- /dev/null +++ b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_focused_light.9.png diff --git a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_dark.9.png b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_dark.9.png Binary files differindex 9cf9173bc6fe..99dbfcca6da0 100644 --- a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_dark.9.png +++ b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_dark.9.png diff --git a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_light.9.png b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_light.9.png Binary files differindex c8d8a17e78a6..2d3e5c8784d8 100644 --- a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_light.9.png +++ b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_normal_light.9.png diff --git a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_dark.9.png b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_dark.9.png Binary files differindex e3793f783abe..75c5996bbc81 100644 --- a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_dark.9.png +++ b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_dark.9.png diff --git a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_light.9.png b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_light.9.png Binary files differindex c0be34f0f52d..a2d6ca13fdf1 100644 --- a/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_light.9.png +++ b/core/res/res/drawable-xhdpi/quickcontact_badge_overlay_pressed_light.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_ab_default_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_ab_default_holo_dark.9.png Binary files differindex 5e7551dce8a9..d8929fcd1864 100644 --- a/core/res/res/drawable-xhdpi/spinner_ab_default_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/spinner_ab_default_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_ab_default_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_ab_default_holo_light.9.png Binary files differindex f4586f8e9ea0..9174c4e4bc98 100644 --- a/core/res/res/drawable-xhdpi/spinner_ab_default_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/spinner_ab_default_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_dark.9.png Binary files differindex 86d369da732f..3015d307088f 100644 --- a/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_light.9.png Binary files differindex 1c4983b8b854..126637d1194f 100644 --- a/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/spinner_ab_disabled_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_dark.9.png Binary files differindex edf2573841eb..d45c7a864d9b 100644 --- a/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_light.9.png Binary files differindex 3a165793312b..29036b907a23 100644 --- a/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/spinner_ab_focused_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_dark.9.png Binary files differindex 5253673642fb..2cb34d7f6040 100644 --- a/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_light.9.png Binary files differindex cfb4a9cb4c16..82f752fdc283 100644 --- a/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/spinner_ab_pressed_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_default_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_default_holo_dark.9.png Binary files differindex fab743d10099..e94ce80c9305 100644 --- a/core/res/res/drawable-xhdpi/spinner_default_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/spinner_default_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_default_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_default_holo_light.9.png Binary files differindex 9987f7401c51..f006541bb915 100644 --- a/core/res/res/drawable-xhdpi/spinner_default_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/spinner_default_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_disabled_holo_dark.9.png Binary files differindex 6dcd2d46f5d6..7bfab99ae0d6 100644 --- a/core/res/res/drawable-xhdpi/spinner_disabled_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/spinner_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_disabled_holo_light.9.png Binary files differindex bfddedbfc5d6..1edcc81e4b6b 100644 --- a/core/res/res/drawable-xhdpi/spinner_disabled_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/spinner_disabled_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_focused_holo_dark.9.png Binary files differindex eb1e1b7c5897..ff7b959a050a 100644 --- a/core/res/res/drawable-xhdpi/spinner_focused_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/spinner_focused_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_focused_holo_light.9.png Binary files differindex 00c440cb8c27..156b5ab377cb 100644 --- a/core/res/res/drawable-xhdpi/spinner_focused_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/spinner_focused_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/spinner_pressed_holo_dark.9.png Binary files differindex 28d170f4d4cc..d0ce6e4cf05b 100644 --- a/core/res/res/drawable-xhdpi/spinner_pressed_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/spinner_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/spinner_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/spinner_pressed_holo_light.9.png Binary files differindex d61be5d74ffe..9e9617ee7f28 100644 --- a/core/res/res/drawable-xhdpi/spinner_pressed_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/spinner_pressed_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/switch_bg_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/switch_bg_disabled_holo_dark.9.png Binary files differindex 911acd74fb7d..b23070c17319 100644 --- a/core/res/res/drawable-xhdpi/switch_bg_disabled_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/switch_bg_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/switch_bg_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/switch_bg_disabled_holo_light.9.png Binary files differindex 8ba0f75bdb84..29f177a45421 100644 --- a/core/res/res/drawable-xhdpi/switch_bg_disabled_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/switch_bg_disabled_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/switch_bg_focused_holo_dark.9.png b/core/res/res/drawable-xhdpi/switch_bg_focused_holo_dark.9.png Binary files differindex e30e34d6e417..e85103da2b8e 100644 --- a/core/res/res/drawable-xhdpi/switch_bg_focused_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/switch_bg_focused_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/switch_bg_focused_holo_light.9.png b/core/res/res/drawable-xhdpi/switch_bg_focused_holo_light.9.png Binary files differindex b1f5b2447832..75978bccaf8a 100644 --- a/core/res/res/drawable-xhdpi/switch_bg_focused_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/switch_bg_focused_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/switch_thumb_activated_holo_dark.9.png b/core/res/res/drawable-xhdpi/switch_thumb_activated_holo_dark.9.png Binary files differindex ea53b5f3f1b4..a0e6b20031c4 100644 --- a/core/res/res/drawable-xhdpi/switch_thumb_activated_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/switch_thumb_activated_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/switch_thumb_activated_holo_light.9.png b/core/res/res/drawable-xhdpi/switch_thumb_activated_holo_light.9.png Binary files differindex 8a4b61aa89ec..88235fea32c1 100644 --- a/core/res/res/drawable-xhdpi/switch_thumb_activated_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/switch_thumb_activated_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/switch_thumb_disabled_holo_dark.9.png b/core/res/res/drawable-xhdpi/switch_thumb_disabled_holo_dark.9.png Binary files differindex 6a280dc6cd14..04fb9a173cd6 100644 --- a/core/res/res/drawable-xhdpi/switch_thumb_disabled_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/switch_thumb_disabled_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/switch_thumb_disabled_holo_light.9.png b/core/res/res/drawable-xhdpi/switch_thumb_disabled_holo_light.9.png Binary files differindex 34a93041ac0f..06a14f38394e 100644 --- a/core/res/res/drawable-xhdpi/switch_thumb_disabled_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/switch_thumb_disabled_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/switch_thumb_holo_dark.9.png b/core/res/res/drawable-xhdpi/switch_thumb_holo_dark.9.png Binary files differindex 757fdd4ff02e..af7d63163c1a 100644 --- a/core/res/res/drawable-xhdpi/switch_thumb_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/switch_thumb_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/switch_thumb_holo_light.9.png b/core/res/res/drawable-xhdpi/switch_thumb_holo_light.9.png Binary files differindex 8873ccca1cec..d6ab3eacc864 100644 --- a/core/res/res/drawable-xhdpi/switch_thumb_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/switch_thumb_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/switch_thumb_pressed_holo_dark.9.png b/core/res/res/drawable-xhdpi/switch_thumb_pressed_holo_dark.9.png Binary files differindex d22226ed6c75..5a8e807c93f2 100644 --- a/core/res/res/drawable-xhdpi/switch_thumb_pressed_holo_dark.9.png +++ b/core/res/res/drawable-xhdpi/switch_thumb_pressed_holo_dark.9.png diff --git a/core/res/res/drawable-xhdpi/switch_thumb_pressed_holo_light.9.png b/core/res/res/drawable-xhdpi/switch_thumb_pressed_holo_light.9.png Binary files differindex c94248c01b1a..392f3dce3311 100644 --- a/core/res/res/drawable-xhdpi/switch_thumb_pressed_holo_light.9.png +++ b/core/res/res/drawable-xhdpi/switch_thumb_pressed_holo_light.9.png diff --git a/core/res/res/drawable-xhdpi/sym_keyboard_num0_no_plus.png b/core/res/res/drawable-xhdpi/sym_keyboard_num0_no_plus.png Binary files differindex c477cf125a2f..95b542d11d07 100644 --- a/core/res/res/drawable-xhdpi/sym_keyboard_num0_no_plus.png +++ b/core/res/res/drawable-xhdpi/sym_keyboard_num0_no_plus.png diff --git a/core/res/res/drawable/quickcontact_badge_overlay_dark.xml b/core/res/res/drawable/quickcontact_badge_overlay_dark.xml index 972488d576e4..6bd7403580da 100644 --- a/core/res/res/drawable/quickcontact_badge_overlay_dark.xml +++ b/core/res/res/drawable/quickcontact_badge_overlay_dark.xml @@ -16,13 +16,13 @@ <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item - android:state_focused="false" - android:state_selected="false" - android:state_pressed="false" - android:drawable="@drawable/quickcontact_badge_overlay_normal_dark" /> - - <item android:state_pressed="true" android:drawable="@drawable/quickcontact_badge_overlay_pressed_dark" /> + <item + android:state_pressed="false" + android:state_focused="true" + android:drawable="@drawable/quickcontact_badge_overlay_focused_dark" /> + <item + android:drawable="@drawable/quickcontact_badge_overlay_normal_dark" /> </selector> diff --git a/core/res/res/drawable/quickcontact_badge_overlay_light.xml b/core/res/res/drawable/quickcontact_badge_overlay_light.xml index bf95d52807a9..cf7f9168f5e7 100644 --- a/core/res/res/drawable/quickcontact_badge_overlay_light.xml +++ b/core/res/res/drawable/quickcontact_badge_overlay_light.xml @@ -16,13 +16,13 @@ <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item - android:state_focused="false" - android:state_selected="false" - android:state_pressed="false" - android:drawable="@drawable/quickcontact_badge_overlay_normal_light" /> - - <item android:state_pressed="true" android:drawable="@drawable/quickcontact_badge_overlay_pressed_light" /> + <item + android:state_pressed="false" + android:state_focused="true" + android:drawable="@drawable/quickcontact_badge_overlay_focused_light" /> + <item + android:drawable="@drawable/quickcontact_badge_overlay_normal_light" /> </selector> diff --git a/core/res/res/drawable/tab_indicator_ab_holo.xml b/core/res/res/drawable/tab_indicator_ab_holo.xml new file mode 100644 index 000000000000..d8a575013c39 --- /dev/null +++ b/core/res/res/drawable/tab_indicator_ab_holo.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <!-- Non focused states --> + <item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@color/transparent" /> + <item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_holo" /> + + <!-- Focused states --> + <item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/list_focused_holo" /> + <item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/tab_selected_focused_holo" /> + + <!-- Pressed --> + <!-- Non focused states --> + <item android:state_focused="false" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/list_pressed_holo_dark" /> + <item android:state_focused="false" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_holo" /> + + <!-- Focused states --> + <item android:state_focused="true" android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/tab_unselected_pressed_holo" /> + <item android:state_focused="true" android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/tab_selected_pressed_holo" /> +</selector> diff --git a/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml b/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml index ee1ce5faf5db..b58f0812801f 100644 --- a/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml +++ b/core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml @@ -50,20 +50,56 @@ android:layout_centerVertical="true" android:layout_marginRight="155dip"> - <!-- Password entry field --> - <EditText android:id="@+id/passwordEntry" - android:layout_height="wrap_content" + + <LinearLayout + android:orientation="horizontal" android:layout_width="match_parent" - android:singleLine="true" - android:textStyle="normal" - android:inputType="textPassword" - android:gravity="center" - android:textSize="24sp" - android:textAppearance="?android:attr/textAppearanceMedium" - android:background="@drawable/lockscreen_password_field_dark" - android:textColor="#ffffffff" - android:privateImeOptions="com.google.android.inputmethod.latin.forceAscii" - /> + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:background="@drawable/lockscreen_password_field_dark"> + + <EditText android:id="@+id/passwordEntry" + android:layout_height="wrap_content" + android:layout_width="0dip" + android:layout_weight="1" + android:gravity="center" + android:layout_gravity="center" + android:layout_marginLeft="@dimen/keyguard_lockscreen_pin_margin_left" + android:singleLine="true" + android:textStyle="normal" + android:inputType="textPassword" + android:textSize="24sp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:background="@null" + android:textColor="#ffffffff" + android:imeOptions="flagNoFullscreen|actionDone" + android:privateImeOptions="com.google.android.inputmethod.latin.forceAscii" + /> + + <!-- This delete button is only visible for numeric PIN entry --> + <ImageButton android:id="@+id/pinDel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@android:drawable/ic_input_delete" + android:clickable="true" + android:padding="8dip" + android:layout_gravity="center" + android:background="?android:attr/selectableItemBackground" + android:visibility="gone" + /> + + <ImageView android:id="@+id/switch_ime_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_lockscreen_ime" + android:clickable="true" + android:padding="8dip" + android:layout_gravity="center" + android:background="?android:attr/selectableItemBackground" + android:visibility="gone" + /> + + </LinearLayout> <!-- Numeric keyboard --> <com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard" @@ -71,7 +107,7 @@ android:layout_height="330dip" android:background="#40000000" android:layout_marginTop="5dip" - android:keyBackground="@drawable/btn_keyboard_key_fulltrans" + android:keyBackground="@drawable/btn_keyboard_key_ics" android:visibility="gone" /> </LinearLayout> diff --git a/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml b/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml index 254dd3e21501..cadb5f8b02fc 100644 --- a/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml +++ b/core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml @@ -44,22 +44,56 @@ android:gravity="center"> <!-- Password entry field --> - <EditText android:id="@+id/passwordEntry" - android:layout_height="wrap_content" + <LinearLayout + android:orientation="horizontal" android:layout_width="330dip" - android:singleLine="true" - android:textStyle="normal" - android:inputType="textPassword" - android:gravity="center" + android:layout_height="wrap_content" android:layout_gravity="center" - android:textSize="24sp" android:layout_marginTop="120dip" android:layout_marginBottom="5dip" - android:textAppearance="?android:attr/textAppearanceMedium" - android:background="@drawable/lockscreen_password_field_dark" - android:textColor="#ffffffff" - android:privateImeOptions="com.google.android.inputmethod.latin.forceAscii" - /> + android:background="@drawable/lockscreen_password_field_dark"> + + <EditText android:id="@+id/passwordEntry" + android:layout_height="wrap_content" + android:layout_width="0dip" + android:layout_weight="1" + android:singleLine="true" + android:textStyle="normal" + android:inputType="textPassword" + android:gravity="center" + android:layout_gravity="center" + android:layout_marginLeft="@dimen/keyguard_lockscreen_pin_margin_left" + android:textSize="24sp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:background="@null" + android:textColor="#ffffffff" + android:privateImeOptions="com.google.android.inputmethod.latin.forceAscii" + /> + + <!-- This delete button is only visible for numeric PIN entry --> + <ImageButton android:id="@+id/pinDel" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@android:drawable/ic_input_delete" + android:clickable="true" + android:padding="8dip" + android:layout_gravity="center" + android:background="?android:attr/selectableItemBackground" + android:visibility="gone" + /> + + <ImageView android:id="@+id/switch_ime_button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@drawable/ic_lockscreen_ime" + android:clickable="true" + android:padding="8dip" + android:layout_gravity="center" + android:background="?android:attr/selectableItemBackground" + android:visibility="gone" + /> + + </LinearLayout> <View android:layout_width="match_parent" @@ -72,7 +106,7 @@ android:layout_width="330dip" android:layout_height="260dip" android:background="#40000000" - android:keyBackground="@drawable/btn_keyboard_key_fulltrans" + android:keyBackground="@drawable/btn_keyboard_key_ics" android:layout_marginBottom="80dip" /> diff --git a/core/res/res/layout/keyguard_screen_password_landscape.xml b/core/res/res/layout/keyguard_screen_password_landscape.xml index 62f59f658480..ba0c22f10041 100644 --- a/core/res/res/layout/keyguard_screen_password_landscape.xml +++ b/core/res/res/layout/keyguard_screen_password_landscape.xml @@ -143,6 +143,8 @@ android:layout_width="0dip" android:layout_weight="1" android:gravity="center" + android:layout_marginLeft="@dimen/keyguard_lockscreen_pin_margin_left" + android:layout_gravity="center_vertical" android:singleLine="true" android:textStyle="normal" android:inputType="textPassword" diff --git a/core/res/res/layout/keyguard_screen_password_portrait.xml b/core/res/res/layout/keyguard_screen_password_portrait.xml index 597cfe77571f..f6933c3924de 100644 --- a/core/res/res/layout/keyguard_screen_password_portrait.xml +++ b/core/res/res/layout/keyguard_screen_password_portrait.xml @@ -109,6 +109,8 @@ android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center_horizontal" + android:layout_gravity="center_vertical" + android:layout_marginLeft="@dimen/keyguard_lockscreen_pin_margin_left" android:singleLine="true" android:textStyle="normal" android:inputType="textPassword" diff --git a/core/res/res/values-bg/strings.xml b/core/res/res/values-bg/strings.xml index 269e348b28ab..24802e2f9635 100644 --- a/core/res/res/values-bg/strings.xml +++ b/core/res/res/values-bg/strings.xml @@ -1169,8 +1169,7 @@ <string name="description_target_camera" msgid="969071997552486814">"Камера"</string> <string name="description_target_silent" msgid="893551287746522182">"Тих режим"</string> <string name="description_target_soundon" msgid="30052466675500172">"Включване на звука"</string> - <!-- no translation found for description_target_unlock_tablet (3833195335629795055) --> - <skip /> + <string name="description_target_unlock_tablet" msgid="3833195335629795055">"Прокарайте пръст, за да отключите."</string> <string name="keyboard_headset_required_to_hear_password" msgid="5913502399391940888">"Включете слушалки, за да чуете клавишите за паролата на висок глас."</string> <string name="keyboard_password_character_no_headset" msgid="2859873770886153678">"Точка."</string> <string name="action_bar_home_description" msgid="5293600496601490216">"Придвижване към „Начало“"</string> diff --git a/core/res/res/values-da/strings.xml b/core/res/res/values-da/strings.xml index 788b285816ef..97ad227d183a 100644 --- a/core/res/res/values-da/strings.xml +++ b/core/res/res/values-da/strings.xml @@ -1169,8 +1169,7 @@ <string name="description_target_camera" msgid="969071997552486814">"Kamera"</string> <string name="description_target_silent" msgid="893551287746522182">"Lydløs"</string> <string name="description_target_soundon" msgid="30052466675500172">"Lyd slået til"</string> - <!-- no translation found for description_target_unlock_tablet (3833195335629795055) --> - <skip /> + <string name="description_target_unlock_tablet" msgid="3833195335629795055">"Glid hurtigt henover for at låse op."</string> <string name="keyboard_headset_required_to_hear_password" msgid="5913502399391940888">"Tilslut et headset for at få læst taster højt, når du indtaster en adgangskode."</string> <string name="keyboard_password_character_no_headset" msgid="2859873770886153678">"Punktum."</string> <string name="action_bar_home_description" msgid="5293600496601490216">"Naviger hjem"</string> diff --git a/core/res/res/values-de/strings.xml b/core/res/res/values-de/strings.xml index 71c6da5f3e3b..b4a3c92715cf 100644 --- a/core/res/res/values-de/strings.xml +++ b/core/res/res/values-de/strings.xml @@ -282,7 +282,7 @@ <string name="permlab_signalPersistentProcesses" msgid="4255467255488653854">"Linux-Signale an Apps senden"</string> <string name="permdesc_signalPersistentProcesses" msgid="3565530463215015289">"Ermöglicht der App, das Senden des gelieferten Signals an alle anhaltenden Prozesse zu fordern"</string> <string name="permlab_persistentActivity" msgid="8659652042401085862">"Apps permanent ausführen"</string> - <string name="permdesc_persistentActivity" msgid="5037199778265006008">"Ermöglicht einer App, eigene Komponenten persistent zu machen, damit das System diese nicht für andere Anwendungen nutzen kann"</string> + <string name="permdesc_persistentActivity" msgid="5037199778265006008">"Ermöglicht einer App, eigene Komponenten permanent zu machen, damit das System diese nicht für andere Apps nutzen kann"</string> <string name="permlab_deletePackages" msgid="3343439331576348805">"Apps löschen"</string> <string name="permdesc_deletePackages" msgid="3634943677518723314">"Ermöglicht einer App, Android-Pakete zu löschen. Schädliche Anwendungen können so wichtige Anwendungen löschen."</string> <string name="permlab_clearAppUserData" msgid="2192134353540277878">"Daten anderer Apps löschen"</string> @@ -340,7 +340,7 @@ <string name="permlab_writeCalendar" msgid="8438874755193825647">"Ohne das Wissen der Eigentümer Kalendertermine hinzufügen oder ändern und E-Mails an Gäste senden"</string> <string name="permdesc_writeCalendar" msgid="5368129321997977226">"Ermöglicht einer App das Senden von Termineinladungen als Kalendereigentümer und das Hinzufügen, Entfernen und Ändern von Terminen, die Sie auf Ihrem Gerät bearbeiten können, einschließlich der Termine von Freunden oder Kollegen. Schädliche Apps mit dieser Berechtigung können Spam-E-Mails senden, die von Kalendereigentümern zu kommen scheinen, Termine ohne das Wissen der Eigentümer ändern oder falsche Termine hinzufügen."</string> <string name="permlab_accessMockLocation" msgid="8688334974036823330">"Simulierte Standortquellen für Testzwecke"</string> - <string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Erstellt falsche Standortquellen für Testzwecke. Schädliche Anwendungen können so den von den echten Standortquellen wie GPS oder Netzwerkanbieter zurückgegebenen Standort und/oder Status überschreiben."</string> + <string name="permdesc_accessMockLocation" msgid="7648286063459727252">"Erstellt simulierte Standortquellen für Testzwecke. Schädliche Anwendungen können so den von den echten Standortquellen wie GPS oder Netzwerkanbieter zurückgegebenen Standort und/oder Status überschreiben."</string> <string name="permlab_accessLocationExtraCommands" msgid="2836308076720553837">"Auf zusätzliche Dienstanbieterbefehle für Standort zugreifen"</string> <string name="permdesc_accessLocationExtraCommands" msgid="1948144701382451721">"Zugriff auf zusätzliche Dienstanbieterbefehle für Standort. Schädliche Anwendungen könnten so die Funktionsweise von GPS oder anderen Standortquellen beeinträchtigen."</string> <string name="permlab_installLocationProvider" msgid="6578101199825193873">"Berechtigung zur Installation eines Standortanbieters"</string> diff --git a/core/res/res/values-en-rGB/strings.xml b/core/res/res/values-en-rGB/strings.xml index dfc0916e854e..5896467226c5 100644 --- a/core/res/res/values-en-rGB/strings.xml +++ b/core/res/res/values-en-rGB/strings.xml @@ -151,7 +151,7 @@ <string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"Sound is OFF"</string> <string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"Sound is ON"</string> <string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Airplane mode"</string> - <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Aiplane mode is ON"</string> + <string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Airplane mode is ON"</string> <string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Airplane mode is OFF"</string> <string name="status_bar_notification_info_overflow" msgid="5301981741705354993">"999+"</string> <string name="safeMode" msgid="2788228061547930246">"Safe mode"</string> diff --git a/core/res/res/values-fa/strings.xml b/core/res/res/values-fa/strings.xml index f24e64cc333b..f7dd60bcb3db 100644 --- a/core/res/res/values-fa/strings.xml +++ b/core/res/res/values-fa/strings.xml @@ -1169,7 +1169,7 @@ <string name="description_target_camera" msgid="969071997552486814">"دوربین"</string> <string name="description_target_silent" msgid="893551287746522182">"ساکت"</string> <string name="description_target_soundon" msgid="30052466675500172">"صدا روشن"</string> - <string name="description_target_unlock_tablet" msgid="3833195335629795055">"برای بازگشایی قفل، انگشت خود را روی صفحه بلغزانید."</string> + <string name="description_target_unlock_tablet" msgid="3833195335629795055">"برای بازگشایی قفل، بلغزانید."</string> <string name="keyboard_headset_required_to_hear_password" msgid="5913502399391940888">"برای شنیدن کلیدهای گذرواژه که با صدای بلند خوانده میشوند، از هدست استفاده کنید."</string> <string name="keyboard_password_character_no_headset" msgid="2859873770886153678">"نقطه."</string> <string name="action_bar_home_description" msgid="5293600496601490216">"رفتن به صفحه اصلی"</string> diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml index 3c90e0999efb..4985388eba68 100644 --- a/core/res/res/values-hr/strings.xml +++ b/core/res/res/values-hr/strings.xml @@ -1169,8 +1169,7 @@ <string name="description_target_camera" msgid="969071997552486814">"Fotoaparat"</string> <string name="description_target_silent" msgid="893551287746522182">"Bešumno"</string> <string name="description_target_soundon" msgid="30052466675500172">"Zvuk je uključen"</string> - <!-- no translation found for description_target_unlock_tablet (3833195335629795055) --> - <skip /> + <string name="description_target_unlock_tablet" msgid="3833195335629795055">"Prijeđite prstima da biste otključali."</string> <string name="keyboard_headset_required_to_hear_password" msgid="5913502399391940888">"Priključite slušalice da biste čuli tipke zaporke izgovorene naglas."</string> <string name="keyboard_password_character_no_headset" msgid="2859873770886153678">"Točka."</string> <string name="action_bar_home_description" msgid="5293600496601490216">"Kreni na početnu"</string> diff --git a/core/res/res/values-pt-rPT/strings.xml b/core/res/res/values-pt-rPT/strings.xml index 2fd2cfc12929..0169ea2f92ea 100644 --- a/core/res/res/values-pt-rPT/strings.xml +++ b/core/res/res/values-pt-rPT/strings.xml @@ -632,7 +632,7 @@ <string name="relationTypeSister" msgid="1735983554479076481">"Irmã"</string> <string name="relationTypeSpouse" msgid="394136939428698117">"Cônjuge"</string> <string name="sipAddressTypeCustom" msgid="2473580593111590945">"Personalizado"</string> - <string name="sipAddressTypeHome" msgid="6093598181069359295">"Página inicial"</string> + <string name="sipAddressTypeHome" msgid="6093598181069359295">"Residência"</string> <string name="sipAddressTypeWork" msgid="6920725730797099047">"Emprego"</string> <string name="sipAddressTypeOther" msgid="4408436162950119849">"Outro"</string> <string name="keyguard_password_enter_pin_code" msgid="3731488827218876115">"Introduzir código PIN"</string> @@ -1014,7 +1014,7 @@ <string name="extmedia_format_button_format" msgid="4131064560127478695">"Formatar"</string> <string name="adb_active_notification_title" msgid="6729044778949189918">"Depuração USB ligada"</string> <string name="adb_active_notification_message" msgid="8470296818270110396">"Seleccione para desactivar depuração USB."</string> - <string name="select_input_method" msgid="6865512749462072765">"Seleccionar método de entrada"</string> + <string name="select_input_method" msgid="6865512749462072765">"Selecionar método de entrada"</string> <string name="configure_input_methods" msgid="6324843080254191535">"Configurar métodos de entrada"</string> <string name="fast_scroll_alphabet" msgid="5433275485499039199">" ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> <string name="fast_scroll_numeric_alphabet" msgid="4030170524595123610">" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"</string> diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml index 3670e536339c..6334bcd2d2c8 100644 --- a/core/res/res/values-ro/strings.xml +++ b/core/res/res/values-ro/strings.xml @@ -1169,8 +1169,7 @@ <string name="description_target_camera" msgid="969071997552486814">"Cameră foto"</string> <string name="description_target_silent" msgid="893551287746522182">"Silenţios"</string> <string name="description_target_soundon" msgid="30052466675500172">"Sunet activat"</string> - <!-- no translation found for description_target_unlock_tablet (3833195335629795055) --> - <skip /> + <string name="description_target_unlock_tablet" msgid="3833195335629795055">"Glisaţi pentru a debloca."</string> <string name="keyboard_headset_required_to_hear_password" msgid="5913502399391940888">"Conectaţi un set căşti-microfon pentru a auzi tastele apăsate când introduceţi parola."</string> <string name="keyboard_password_character_no_headset" msgid="2859873770886153678">"Punct."</string> <string name="action_bar_home_description" msgid="5293600496601490216">"Navigaţi la ecranul de pornire"</string> diff --git a/core/res/res/values-ru/strings.xml b/core/res/res/values-ru/strings.xml index 24269e7d89bb..d66c2d446323 100644 --- a/core/res/res/values-ru/strings.xml +++ b/core/res/res/values-ru/strings.xml @@ -1080,7 +1080,7 @@ <string name="submit" msgid="1602335572089911941">"Отправить"</string> <string name="car_mode_disable_notification_title" msgid="3164768212003864316">"Включен режим \"Штурман\""</string> <string name="car_mode_disable_notification_message" msgid="668663626721675614">"Чтобы выйти, нажмите здесь."</string> - <string name="tethered_notification_title" msgid="3146694234398202601">"USB-модем или точка доступа Wi-Fi активны"</string> + <string name="tethered_notification_title" msgid="3146694234398202601">"USB-модем/точка доступа Wi-Fi используется"</string> <string name="tethered_notification_message" msgid="3067108323903048927">"Нажмите для настройки"</string> <string name="back_button_label" msgid="2300470004503343439">"Назад"</string> <string name="next_button_label" msgid="1080555104677992408">"Далее"</string> diff --git a/core/res/res/values-sr/strings.xml b/core/res/res/values-sr/strings.xml index 157a3fcaad17..da78c176d2db 100644 --- a/core/res/res/values-sr/strings.xml +++ b/core/res/res/values-sr/strings.xml @@ -1169,8 +1169,7 @@ <string name="description_target_camera" msgid="969071997552486814">"Камера"</string> <string name="description_target_silent" msgid="893551287746522182">"Нечујно"</string> <string name="description_target_soundon" msgid="30052466675500172">"Укључи звук"</string> - <!-- no translation found for description_target_unlock_tablet (3833195335629795055) --> - <skip /> + <string name="description_target_unlock_tablet" msgid="3833195335629795055">"Превуците да бисте откључали."</string> <string name="keyboard_headset_required_to_hear_password" msgid="5913502399391940888">"Укључите слушалице да бисте чули наглас изговорене тастере за лозинку."</string> <string name="keyboard_password_character_no_headset" msgid="2859873770886153678">"Тачка."</string> <string name="action_bar_home_description" msgid="5293600496601490216">"Кретање до Почетне"</string> diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index fa1864866bdf..82ef68aef302 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -169,6 +169,9 @@ <!-- Size of top margin on Clock font to edge on unlock LockScreen --> <dimen name="keyguard_lockscreen_status_line_clockfont_bottom_margin">12dip</dimen> + <!-- Padding on left margin of PIN text entry field to center it when del button is showing --> + <dimen name="keyguard_lockscreen_pin_margin_left">40dip</dimen> + <!-- Minimum popup width for selecting an activity in ActivityChooserDialog/ActivityChooserView. --> <dimen name="activity_chooser_popup_min_width">200dip</dimen> diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml index 8d95d86e5e9a..949f01f910b3 100644 --- a/core/res/res/values/styles.xml +++ b/core/res/res/values/styles.xml @@ -1823,6 +1823,7 @@ please see styles_device_defaults.xml. </style> <style name="Widget.Holo.Tab" parent="Widget.Holo.ActionBar.TabView"> + <item name="android:background">@android:drawable/tab_indicator_holo</item> <item name="android:layout_width">0dip</item> <item name="android:layout_weight">1</item> <item name="android:minWidth">80dip</item> @@ -1910,7 +1911,7 @@ please see styles_device_defaults.xml. </style> <style name="Widget.Holo.ActionBar.TabView" parent="Widget.ActionBar.TabView"> - <item name="android:background">@drawable/tab_indicator_holo</item> + <item name="android:background">@drawable/tab_indicator_ab_holo</item> <item name="android:paddingLeft">16dip</item> <item name="android:paddingRight">16dip</item> </style> @@ -2277,6 +2278,10 @@ please see styles_device_defaults.xml. </style> <style name="Widget.Holo.Light.Tab" parent="Widget.Holo.Light.ActionBar.TabView"> + <item name="android:background">@android:drawable/tab_indicator_holo</item> + <item name="android:layout_width">0dip</item> + <item name="android:layout_weight">1</item> + <item name="android:minWidth">80dip</item> </style> <style name="Widget.Holo.Light.ActionBar.TabBar" parent="Widget.Holo.ActionBar.TabBar"> diff --git a/core/res/res/xml-xlarge/password_kbd_numeric.xml b/core/res/res/xml-xlarge/password_kbd_numeric.xml index 3745672a5808..b2704f609e0e 100755 --- a/core/res/res/xml-xlarge/password_kbd_numeric.xml +++ b/core/res/res/xml-xlarge/password_kbd_numeric.xml @@ -49,12 +49,10 @@ </Row> <Row android:rowEdgeFlags="bottom"> + <Key android:codes="48" android:keyIcon="@drawable/sym_keyboard_num0_no_plus" + android:keyWidth="66.66%p" android:keyEdgeFlags="left"/> <Key android:codes="10" android:keyIcon="@drawable/sym_keyboard_ok" - android:keyEdgeFlags="left"/> - <Key android:codes="48" android:keyIcon="@drawable/sym_keyboard_num0_no_plus"/> - <Key android:codes="-5" android:keyIcon="@drawable/sym_keyboard_delete" - android:iconPreview="@drawable/sym_keyboard_feedback_delete" - android:isRepeatable="true" android:keyEdgeFlags="right"/> + android:keyEdgeFlags="right"/> </Row> </Keyboard> diff --git a/media/java/android/media/videoeditor/MediaImageItem.java b/media/java/android/media/videoeditor/MediaImageItem.java index a862d003ce50..590b4ae223d5 100755 --- a/media/java/android/media/videoeditor/MediaImageItem.java +++ b/media/java/android/media/videoeditor/MediaImageItem.java @@ -154,7 +154,7 @@ public class MediaImageItem extends MediaItem { final Bitmap imageBitmap; - if (mHeight > maxResolution.second) { + if (mWidth > maxResolution.first || mHeight > maxResolution.second) { /** * We need to scale the image */ @@ -971,14 +971,13 @@ public class MediaImageItem extends MediaItem { /** * Create the bitmap from file */ - if (nativeWidth / bitmapWidth > 1) { - - final BitmapFactory.Options options = new BitmapFactory.Options(); - options.inSampleSize = nativeWidth / (int)bitmapWidth; - srcBitmap = BitmapFactory.decodeFile(filename, options); - } else { - srcBitmap = BitmapFactory.decodeFile(filename); - } + int sampleSize = (int) Math.ceil(Math.max( + (float) nativeWidth / bitmapWidth, + (float) nativeHeight / bitmapHeight)); + sampleSize = nextPowerOf2(sampleSize); + final BitmapFactory.Options options = new BitmapFactory.Options(); + options.inSampleSize = sampleSize; + srcBitmap = BitmapFactory.decodeFile(filename, options); } else { bitmapWidth = width; bitmapHeight = height; @@ -1009,4 +1008,14 @@ public class MediaImageItem extends MediaItem { srcBitmap.recycle(); return bitmap; } + + public static int nextPowerOf2(int n) { + n -= 1; + n |= n >>> 16; + n |= n >>> 8; + n |= n >>> 4; + n |= n >>> 2; + n |= n >>> 1; + return n + 1; + } } diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp index 1ba79e57edb3..e4de20adae60 100644 --- a/media/libstagefright/CameraSourceTimeLapse.cpp +++ b/media/libstagefright/CameraSourceTimeLapse.cpp @@ -257,6 +257,12 @@ bool CameraSourceTimeLapse::skipFrameAndModifyTimeStamp(int64_t *timestampUs) { mForceRead = false; *timestampUs = mLastFrameTimestampUs + mTimeBetweenTimeLapseVideoFramesUs; + + // Really make sure that this video recording frame will not be dropped. + if (*timestampUs < mStartTimeUs) { + LOGI("set timestampUs to start time stamp %lld us", mStartTimeUs); + *timestampUs = mStartTimeUs; + } return false; } } diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml index fecef3dff2d2..46f4c39030b0 100644 --- a/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml +++ b/packages/SystemUI/res/layout-sw600dp/status_bar_notification_panel_title.xml @@ -39,39 +39,39 @@ <ImageView android:id="@+id/bluetooth" - android:layout_height="32dp" - android:layout_width="32dp" + android:layout_height="wrap_content" + android:layout_width="wrap_content" android:scaleType="centerInside" - android:baseline="22dp" + android:baseline="18dp" android:visibility="gone" android:contentDescription="@null" /> <FrameLayout android:id="@+id/netwerk" - android:layout_height="32dp" - android:layout_width="32dp" + android:layout_height="wrap_content" + android:layout_width="wrap_content" android:layout_marginRight="4dp" > <ImageView android:id="@+id/network_signal" - android:layout_height="match_parent" - android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_width="wrap_content" android:contentDescription="@null" /> <ImageView android:id="@+id/network_type" - android:layout_height="match_parent" - android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_width="wrap_content" android:contentDescription="@null" /> <ImageView android:id="@+id/network_direction" - android:layout_height="match_parent" - android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_width="wrap_content" android:contentDescription="@null" /> @@ -91,12 +91,14 @@ <ImageView android:id="@+id/battery" - android:layout_height="32dp" - android:layout_width="32dp" + android:layout_height="wrap_content" + android:layout_width="wrap_content" android:scaleType="centerInside" android:layout_toRightOf="@id/network_text" android:layout_alignBaseline="@id/network_signal" - android:baseline="22dp" + android:baseline="18dp" + android:layout_marginLeft="8dp" + android:layout_marginRight="8dp" android:contentDescription="@null" /> diff --git a/packages/SystemUI/res/values-ru/strings.xml b/packages/SystemUI/res/values-ru/strings.xml index 947ebb47958d..a8e7d0deb188 100644 --- a/packages/SystemUI/res/values-ru/strings.xml +++ b/packages/SystemUI/res/values-ru/strings.xml @@ -110,7 +110,7 @@ <string name="accessibility_data_connection_edge" msgid="4477457051631979278">"Edge"</string> <string name="accessibility_data_connection_wifi" msgid="2324496756590645221">"Wi-Fi"</string> <string name="accessibility_no_sim" msgid="8274017118472455155">"SIM-карта отсутствует."</string> - <string name="accessibility_bluetooth_tether" msgid="4102784498140271969">"Общий Bluetooth-модем."</string> + <string name="accessibility_bluetooth_tether" msgid="4102784498140271969">"Bluetooth-модем"</string> <string name="accessibility_airplane_mode" msgid="834748999790763092">"Режим полета."</string> <!-- String.format failed for translation --> <!-- no translation found for accessibility_battery_level (7451474187113371965) --> diff --git a/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java b/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java index 3ad716b7117d..06cd69ecbad8 100644 --- a/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java +++ b/policy/src/com/android/internal/policy/impl/PasswordUnlockScreen.java @@ -35,15 +35,18 @@ import android.text.InputType; import android.text.TextWatcher; import android.text.method.DigitsKeyListener; import android.text.method.TextKeyListener; +import android.view.Gravity; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; +import android.view.ViewGroup.LayoutParams; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodSubtype; import android.widget.EditText; import android.widget.LinearLayout; +import android.widget.Space; import android.widget.TextView; import android.widget.TextView.OnEditorActionListener; @@ -114,6 +117,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED, 0) != 0); + boolean imeOrDeleteButtonVisible = false; if (mIsAlpha) { // We always use the system IME for alpha keyboard, so hide lockscreen's soft keyboard mKeyboardHelper.setKeyboardMode(PasswordEntryKeyboardHelper.KEYBOARD_MODE_ALPHA); @@ -129,6 +133,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen View pinDelete = findViewById(R.id.pinDel); if (pinDelete != null) { pinDelete.setVisibility(View.VISIBLE); + imeOrDeleteButtonVisible = true; pinDelete.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { @@ -181,6 +186,7 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen Context.INPUT_METHOD_SERVICE); if (mIsAlpha && switchImeButton != null && hasMultipleEnabledIMEsOrSubtypes(imm, false)) { switchImeButton.setVisibility(View.VISIBLE); + imeOrDeleteButtonVisible = true; switchImeButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { mCallback.pokeWakelock(); // Leave the screen on a bit longer @@ -188,6 +194,16 @@ public class PasswordUnlockScreen extends LinearLayout implements KeyguardScreen } }); } + + // If no icon is visible, reset the left margin on the password field so the text is + // still centered. + if (!imeOrDeleteButtonVisible) { + android.view.ViewGroup.LayoutParams params = mPasswordEntry.getLayoutParams(); + if (params instanceof MarginLayoutParams) { + ((MarginLayoutParams)params).leftMargin = 0; + mPasswordEntry.setLayoutParams(params); + } + } } /** diff --git a/preloaded-classes b/preloaded-classes index 31d49ce2851a..c29ba1560dba 100644 --- a/preloaded-classes +++ b/preloaded-classes @@ -18,7 +18,12 @@ android.accounts.IAccountManagerResponse android.accounts.IAccountManagerResponse$Stub android.animation.Animator android.animation.Animator$AnimatorListener +android.animation.AnimatorInflater android.animation.AnimatorListenerAdapter +android.animation.AnimatorSet +android.animation.AnimatorSet$AnimatorSetListener +android.animation.AnimatorSet$Builder +android.animation.AnimatorSet$Node android.animation.FloatEvaluator android.animation.FloatKeyframeSet android.animation.IntEvaluator @@ -57,6 +62,7 @@ android.app.ActivityThread$CreateServiceData android.app.ActivityThread$GcIdler android.app.ActivityThread$H android.app.ActivityThread$Idler +android.app.ActivityThread$Profiler android.app.ActivityThread$ProviderClientRecord android.app.ActivityThread$ProviderRefCount android.app.ActivityThread$ReceiverData @@ -71,6 +77,8 @@ android.app.ApplicationLoaders android.app.ApplicationPackageManager android.app.ApplicationPackageManager$ResourceName android.app.ApplicationThreadNative +android.app.BackStackRecord +android.app.BackStackRecord$Op android.app.ContextImpl android.app.ContextImpl$1 android.app.ContextImpl$10 @@ -111,9 +119,15 @@ android.app.ContextImpl$StaticServiceFetcher android.app.Dialog android.app.Dialog$1 android.app.Dialog$ListenersHandler +android.app.DialogFragment +android.app.Fragment android.app.FragmentManager +android.app.FragmentManager$BackStackEntry android.app.FragmentManagerImpl android.app.FragmentManagerImpl$1 +android.app.FragmentManagerImpl$2 +android.app.FragmentManagerImpl$3 +android.app.FragmentTransaction android.app.IActivityManager android.app.IActivityManager$ContentProviderHolder android.app.IActivityManager$ContentProviderHolder$1 @@ -134,6 +148,10 @@ android.app.Instrumentation android.app.IntentReceiverLeaked android.app.IntentService android.app.IntentService$ServiceHandler +android.app.ListActivity +android.app.ListActivity$1 +android.app.ListActivity$2 +android.app.ListFragment android.app.LoadedApk android.app.LoadedApk$ReceiverDispatcher android.app.LoadedApk$ReceiverDispatcher$Args @@ -328,6 +346,7 @@ android.emoji.EmojiFactory android.graphics.AvoidXfermode android.graphics.Bitmap android.graphics.Bitmap$1 +android.graphics.Bitmap$2 android.graphics.Bitmap$BitmapFinalizer android.graphics.Bitmap$Config android.graphics.BitmapFactory @@ -719,6 +738,7 @@ android.text.style.LineHeightSpan android.text.style.MetricAffectingSpan android.text.style.ParagraphStyle android.text.style.ReplacementSpan +android.text.style.SpellCheckSpan android.text.style.StyleSpan android.text.style.SuggestionSpan android.text.style.UpdateAppearance @@ -870,6 +890,7 @@ android.view.View$OnLongClickListener android.view.View$OnTouchListener android.view.View$PerformClick android.view.View$ScrollabilityCache +android.view.View$TransformationInfo android.view.View$UnsetPressedState android.view.ViewConfiguration android.view.ViewGroup @@ -934,6 +955,7 @@ android.view.inputmethod.EditorInfo$1 android.view.inputmethod.ExtractedText android.view.inputmethod.ExtractedText$1 android.view.inputmethod.InputConnection +android.view.inputmethod.InputConnectionWrapper android.view.inputmethod.InputMethodManager android.view.inputmethod.InputMethodManager$1 android.view.inputmethod.InputMethodManager$ControlledInputConnectionWrapper @@ -946,12 +968,16 @@ android.webkit.WebViewCore android.widget.AbsListView android.widget.AbsListView$1 android.widget.AbsListView$2 +android.widget.AbsListView$3 android.widget.AbsListView$AdapterDataSetObserver android.widget.AbsListView$CheckForTap +android.widget.AbsListView$FlingRunnable +android.widget.AbsListView$FlingRunnable$1 android.widget.AbsListView$LayoutParams android.widget.AbsListView$OnScrollListener android.widget.AbsListView$PerformClick android.widget.AbsListView$RecycleBin +android.widget.AbsListView$RecyclerListener android.widget.AbsListView$SavedState android.widget.AbsListView$SavedState$1 android.widget.AbsListView$SelectionBoundsAdjuster @@ -975,13 +1001,19 @@ android.widget.CheckBox android.widget.Checkable android.widget.CheckedTextView android.widget.CompoundButton +android.widget.CompoundButton$OnCheckedChangeListener android.widget.CursorAdapter android.widget.CursorFilter$CursorFilterClient +android.widget.EdgeEffect android.widget.EdgeGlow android.widget.EditText android.widget.ExpandableListView +android.widget.FastScroller +android.widget.FastScroller$1 +android.widget.FastScroller$ScrollFade android.widget.Filter android.widget.Filter$FilterListener +android.widget.Filter$FilterResults android.widget.Filter$ResultsHandler android.widget.Filterable android.widget.FrameLayout @@ -1030,17 +1062,30 @@ android.widget.SearchView android.widget.Spinner android.widget.SpinnerAdapter android.widget.StackView +android.widget.Switch android.widget.TabHost +android.widget.TabHost$ContentStrategy +android.widget.TabHost$FactoryContentStrategy +android.widget.TabHost$IndicatorStrategy +android.widget.TabHost$LabelAndIconIndicatorStrategy +android.widget.TabHost$OnTabChangeListener +android.widget.TabHost$TabContentFactory +android.widget.TabHost$TabSpec +android.widget.TabHost$ViewIndicatorStrategy android.widget.TabWidget +android.widget.TabWidget$OnTabSelectionChanged +android.widget.TabWidget$TabClickListener android.widget.TableLayout android.widget.TableRow android.widget.TextView +android.widget.TextView$2 android.widget.TextView$3 android.widget.TextView$Blink android.widget.TextView$BufferType android.widget.TextView$ChangeWatcher android.widget.TextView$CharWrapper android.widget.TextView$Drawables +android.widget.TextView$EasyEditSpanController android.widget.TextView$InputContentType android.widget.TextView$InputMethodState android.widget.TextView$OnEditorActionListener diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index 69560e5743c9..96e8eb980fd6 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -2066,7 +2066,16 @@ uint32_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track // The first time a track is added we wait // for all its buffers to be filled before processing it mAudioMixer->setActiveTrack(track->name()); - if (cblk->framesReady() && track->isReady() && + // make sure that we have enough frames to mix one full buffer + uint32_t minFrames = 1; + if (!track->isStopped() && !track->isPausing()) { + if (t->sampleRate() == (int)mSampleRate) { + minFrames = mFrameCount; + } else { + minFrames = (mFrameCount * t->sampleRate()) / mSampleRate + 1; + } + } + if ((cblk->framesReady() >= minFrames) && track->isReady() && !track->isPaused() && !track->isTerminated()) { //LOGV("track %d u=%08x, s=%08x [OK] on thread %p", track->name(), cblk->user, cblk->server, this); diff --git a/services/java/com/android/server/connectivity/Tethering.java b/services/java/com/android/server/connectivity/Tethering.java index e49acaf4d119..423a78fff4b8 100644 --- a/services/java/com/android/server/connectivity/Tethering.java +++ b/services/java/com/android/server/connectivity/Tethering.java @@ -81,6 +81,9 @@ public class Tethering extends INetworkManagementEventObserver.Stub { private String[] mTetherableBluetoothRegexs; private Collection<Integer> mUpstreamIfaceTypes; + // used to synchronize public access to members + private Object mPublicSync; + private static final Integer MOBILE_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE); private static final Integer HIPRI_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE_HIPRI); private static final Integer DUN_TYPE = new Integer(ConnectivityManager.TYPE_MOBILE_DUN); @@ -135,6 +138,8 @@ public class Tethering extends INetworkManagementEventObserver.Stub { mConnService = connService; mLooper = looper; + mPublicSync = new Object(); + mIfaces = new HashMap<String, TetherInterfaceSM>(); // make our own thread so we don't anr the system @@ -172,18 +177,25 @@ public class Tethering extends INetworkManagementEventObserver.Stub { } void updateConfiguration() { - mTetherableUsbRegexs = mContext.getResources().getStringArray( + String[] tetherableUsbRegexs = mContext.getResources().getStringArray( com.android.internal.R.array.config_tether_usb_regexs); - mTetherableWifiRegexs = mContext.getResources().getStringArray( + String[] tetherableWifiRegexs = mContext.getResources().getStringArray( com.android.internal.R.array.config_tether_wifi_regexs); - mTetherableBluetoothRegexs = mContext.getResources().getStringArray( + String[] tetherableBluetoothRegexs = mContext.getResources().getStringArray( com.android.internal.R.array.config_tether_bluetooth_regexs); int ifaceTypes[] = mContext.getResources().getIntArray( com.android.internal.R.array.config_tether_upstream_types); - mUpstreamIfaceTypes = new ArrayList(); + Collection<Integer> upstreamIfaceTypes = new ArrayList(); for (int i : ifaceTypes) { - mUpstreamIfaceTypes.add(new Integer(i)); + upstreamIfaceTypes.add(new Integer(i)); + } + + synchronized (mPublicSync) { + mTetherableUsbRegexs = tetherableUsbRegexs; + mTetherableWifiRegexs = tetherableWifiRegexs; + mTetherableBluetoothRegexs = tetherableBluetoothRegexs; + mUpstreamIfaceTypes = upstreamIfaceTypes; } // check if the upstream type list needs to be modified due to secure-settings @@ -194,17 +206,17 @@ public class Tethering extends INetworkManagementEventObserver.Stub { if (VDBG) Log.d(TAG, "interfaceStatusChanged " + iface + ", " + up); boolean found = false; boolean usb = false; - if (isWifi(iface)) { - found = true; - } else if (isUsb(iface)) { - found = true; - usb = true; - } else if (isBluetooth(iface)) { - found = true; - } - if (found == false) return; + synchronized (mPublicSync) { + if (isWifi(iface)) { + found = true; + } else if (isUsb(iface)) { + found = true; + usb = true; + } else if (isBluetooth(iface)) { + found = true; + } + if (found == false) return; - synchronized (mIfaces) { TetherInterfaceSM sm = mIfaces.get(iface); if (up) { if (sm == null) { @@ -231,46 +243,52 @@ public class Tethering extends INetworkManagementEventObserver.Stub { } private boolean isUsb(String iface) { - for (String regex : mTetherableUsbRegexs) { - if (iface.matches(regex)) return true; + synchronized (mPublicSync) { + for (String regex : mTetherableUsbRegexs) { + if (iface.matches(regex)) return true; + } + return false; } - return false; } public boolean isWifi(String iface) { - for (String regex : mTetherableWifiRegexs) { - if (iface.matches(regex)) return true; + synchronized (mPublicSync) { + for (String regex : mTetherableWifiRegexs) { + if (iface.matches(regex)) return true; + } + return false; } - return false; } public boolean isBluetooth(String iface) { - for (String regex : mTetherableBluetoothRegexs) { - if (iface.matches(regex)) return true; + synchronized (mPublicSync) { + for (String regex : mTetherableBluetoothRegexs) { + if (iface.matches(regex)) return true; + } + return false; } - return false; } public void interfaceAdded(String iface) { if (VDBG) Log.d(TAG, "interfaceAdded " + iface); boolean found = false; boolean usb = false; - if (isWifi(iface)) { - found = true; - } - if (isUsb(iface)) { - found = true; - usb = true; - } - if (isBluetooth(iface)) { - found = true; - } - if (found == false) { - if (VDBG) Log.d(TAG, iface + " is not a tetherable iface, ignoring"); - return; - } + synchronized (mPublicSync) { + if (isWifi(iface)) { + found = true; + } + if (isUsb(iface)) { + found = true; + usb = true; + } + if (isBluetooth(iface)) { + found = true; + } + if (found == false) { + if (VDBG) Log.d(TAG, iface + " is not a tetherable iface, ignoring"); + return; + } - synchronized (mIfaces) { TetherInterfaceSM sm = mIfaces.get(iface); if (sm != null) { if (VDBG) Log.d(TAG, "active iface (" + iface + ") reported as added, ignoring"); @@ -285,7 +303,7 @@ public class Tethering extends INetworkManagementEventObserver.Stub { public void interfaceRemoved(String iface) { if (VDBG) Log.d(TAG, "interfaceRemoved " + iface); - synchronized (mIfaces) { + synchronized (mPublicSync) { TetherInterfaceSM sm = mIfaces.get(iface); if (sm == null) { if (VDBG) { @@ -303,7 +321,7 @@ public class Tethering extends INetworkManagementEventObserver.Stub { public int tether(String iface) { if (DBG) Log.d(TAG, "Tethering " + iface); TetherInterfaceSM sm = null; - synchronized (mIfaces) { + synchronized (mPublicSync) { sm = mIfaces.get(iface); } if (sm == null) { @@ -321,7 +339,7 @@ public class Tethering extends INetworkManagementEventObserver.Stub { public int untether(String iface) { if (DBG) Log.d(TAG, "Untethering " + iface); TetherInterfaceSM sm = null; - synchronized (mIfaces) { + synchronized (mPublicSync) { sm = mIfaces.get(iface); } if (sm == null) { @@ -338,16 +356,19 @@ public class Tethering extends INetworkManagementEventObserver.Stub { public int getLastTetherError(String iface) { TetherInterfaceSM sm = null; - synchronized (mIfaces) { + synchronized (mPublicSync) { sm = mIfaces.get(iface); + if (sm == null) { + Log.e(TAG, "Tried to getLastTetherError on an unknown iface :" + iface + + ", ignoring"); + return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE; + } + return sm.getLastError(); } - if (sm == null) { - Log.e(TAG, "Tried to getLastTetherError on an unknown iface :" + iface + ", ignoring"); - return ConnectivityManager.TETHER_ERROR_UNKNOWN_IFACE; - } - return sm.getLastError(); } + // TODO - move all private methods used only by the state machine into the state machine + // to clarify what needs synchronized protection. private void sendTetherStateChangedBroadcast() { try { if (!mConnService.isTetheringSupported()) return; @@ -363,7 +384,7 @@ public class Tethering extends INetworkManagementEventObserver.Stub { boolean usbTethered = false; boolean bluetoothTethered = false; - synchronized (mIfaces) { + synchronized (mPublicSync) { Set ifaces = mIfaces.keySet(); for (Object iface : ifaces) { TetherInterfaceSM sm = mIfaces.get(iface); @@ -469,7 +490,7 @@ public class Tethering extends INetworkManagementEventObserver.Stub { public void onReceive(Context content, Intent intent) { String action = intent.getAction(); if (action.equals(UsbManager.ACTION_USB_STATE)) { - synchronized (Tethering.this) { + synchronized (Tethering.this.mPublicSync) { boolean usbConnected = intent.getBooleanExtra(UsbManager.USB_CONNECTED, false); mRndisEnabled = intent.getBooleanExtra(UsbManager.USB_FUNCTION_RNDIS, false); // start tethering if we have a request pending @@ -545,6 +566,7 @@ public class Tethering extends INetworkManagementEventObserver.Stub { return true; } + // TODO - return copies so people can't tamper public String[] getTetherableUsbRegexs() { return mTetherableUsbRegexs; } @@ -561,7 +583,7 @@ public class Tethering extends INetworkManagementEventObserver.Stub { if (VDBG) Log.d(TAG, "setUsbTethering(" + enable + ")"); UsbManager usbManager = (UsbManager)mContext.getSystemService(Context.USB_SERVICE); - synchronized (this) { + synchronized (mPublicSync) { if (enable) { if (mRndisEnabled) { tetherUsb(true); @@ -581,11 +603,14 @@ public class Tethering extends INetworkManagementEventObserver.Stub { } public int[] getUpstreamIfaceTypes() { - updateConfiguration(); - int values[] = new int[mUpstreamIfaceTypes.size()]; - Iterator<Integer> iterator = mUpstreamIfaceTypes.iterator(); - for (int i=0; i < mUpstreamIfaceTypes.size(); i++) { - values[i] = iterator.next(); + int values[]; + synchronized (mPublicSync) { + updateConfiguration(); + values = new int[mUpstreamIfaceTypes.size()]; + Iterator<Integer> iterator = mUpstreamIfaceTypes.iterator(); + for (int i=0; i < mUpstreamIfaceTypes.size(); i++) { + values[i] = iterator.next(); + } } return values; } @@ -593,43 +618,46 @@ public class Tethering extends INetworkManagementEventObserver.Stub { public void checkDunRequired() { int secureSetting = Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.TETHER_DUN_REQUIRED, 2); - // 2 = not set, 0 = DUN not required, 1 = DUN required - if (secureSetting != 2) { - int requiredApn = (secureSetting == 1 ? - ConnectivityManager.TYPE_MOBILE_DUN : - ConnectivityManager.TYPE_MOBILE_HIPRI); - if (requiredApn == ConnectivityManager.TYPE_MOBILE_DUN) { - while (mUpstreamIfaceTypes.contains(MOBILE_TYPE)) { - mUpstreamIfaceTypes.remove(MOBILE_TYPE); - } - while (mUpstreamIfaceTypes.contains(HIPRI_TYPE)) { - mUpstreamIfaceTypes.remove(HIPRI_TYPE); - } - if (mUpstreamIfaceTypes.contains(DUN_TYPE) == false) { - mUpstreamIfaceTypes.add(DUN_TYPE); + synchronized (mPublicSync) { + // 2 = not set, 0 = DUN not required, 1 = DUN required + if (secureSetting != 2) { + int requiredApn = (secureSetting == 1 ? + ConnectivityManager.TYPE_MOBILE_DUN : + ConnectivityManager.TYPE_MOBILE_HIPRI); + if (requiredApn == ConnectivityManager.TYPE_MOBILE_DUN) { + while (mUpstreamIfaceTypes.contains(MOBILE_TYPE)) { + mUpstreamIfaceTypes.remove(MOBILE_TYPE); + } + while (mUpstreamIfaceTypes.contains(HIPRI_TYPE)) { + mUpstreamIfaceTypes.remove(HIPRI_TYPE); + } + if (mUpstreamIfaceTypes.contains(DUN_TYPE) == false) { + mUpstreamIfaceTypes.add(DUN_TYPE); + } + } else { + while (mUpstreamIfaceTypes.contains(DUN_TYPE)) { + mUpstreamIfaceTypes.remove(DUN_TYPE); + } + if (mUpstreamIfaceTypes.contains(MOBILE_TYPE) == false) { + mUpstreamIfaceTypes.add(MOBILE_TYPE); + } + if (mUpstreamIfaceTypes.contains(HIPRI_TYPE) == false) { + mUpstreamIfaceTypes.add(HIPRI_TYPE); + } } + } + if (mUpstreamIfaceTypes.contains(DUN_TYPE)) { + mPreferredUpstreamMobileApn = ConnectivityManager.TYPE_MOBILE_DUN; } else { - while (mUpstreamIfaceTypes.contains(DUN_TYPE)) { - mUpstreamIfaceTypes.remove(DUN_TYPE); - } - if (mUpstreamIfaceTypes.contains(MOBILE_TYPE) == false) { - mUpstreamIfaceTypes.add(MOBILE_TYPE); - } - if (mUpstreamIfaceTypes.contains(HIPRI_TYPE) == false) { - mUpstreamIfaceTypes.add(HIPRI_TYPE); - } + mPreferredUpstreamMobileApn = ConnectivityManager.TYPE_MOBILE_HIPRI; } } - if (mUpstreamIfaceTypes.contains(DUN_TYPE)) { - mPreferredUpstreamMobileApn = ConnectivityManager.TYPE_MOBILE_DUN; - } else { - mPreferredUpstreamMobileApn = ConnectivityManager.TYPE_MOBILE_HIPRI; - } } + // TODO review API - maybe return ArrayList<String> here and below? public String[] getTetheredIfaces() { ArrayList<String> list = new ArrayList<String>(); - synchronized (mIfaces) { + synchronized (mPublicSync) { Set keys = mIfaces.keySet(); for (Object key : keys) { TetherInterfaceSM sm = mIfaces.get(key); @@ -647,7 +675,7 @@ public class Tethering extends INetworkManagementEventObserver.Stub { public String[] getTetheredIfacePairs() { final ArrayList<String> list = Lists.newArrayList(); - synchronized (mIfaces) { + synchronized (mPublicSync) { for (TetherInterfaceSM sm : mIfaces.values()) { if (sm.isTethered()) { list.add(sm.mMyUpstreamIfaceName); @@ -660,7 +688,7 @@ public class Tethering extends INetworkManagementEventObserver.Stub { public String[] getTetherableIfaces() { ArrayList<String> list = new ArrayList<String>(); - synchronized (mIfaces) { + synchronized (mPublicSync) { Set keys = mIfaces.keySet(); for (Object key : keys) { TetherInterfaceSM sm = mIfaces.get(key); @@ -678,7 +706,7 @@ public class Tethering extends INetworkManagementEventObserver.Stub { public String[] getErroredIfaces() { ArrayList<String> list = new ArrayList<String>(); - synchronized (mIfaces) { + synchronized (mPublicSync) { Set keys = mIfaces.keySet(); for (Object key : keys) { TetherInterfaceSM sm = mIfaces.get(key); @@ -777,43 +805,54 @@ public class Tethering extends INetworkManagementEventObserver.Stub { return res; } - public synchronized int getLastError() { - return mLastError; + public int getLastError() { + synchronized (Tethering.this.mPublicSync) { + return mLastError; + } } - private synchronized void setLastError(int error) { - mLastError = error; + private void setLastError(int error) { + synchronized (Tethering.this.mPublicSync) { + mLastError = error; - if (isErrored()) { - if (mUsb) { - // note everything's been unwound by this point so nothing to do on - // further error.. - Tethering.this.configureUsbIface(false); + if (isErrored()) { + if (mUsb) { + // note everything's been unwound by this point so nothing to do on + // further error.. + Tethering.this.configureUsbIface(false); + } } } } - // synchronized between this getter and the following setter - public synchronized boolean isAvailable() { - return mAvailable; + public boolean isAvailable() { + synchronized (Tethering.this.mPublicSync) { + return mAvailable; + } } - private synchronized void setAvailable(boolean available) { - mAvailable = available; + private void setAvailable(boolean available) { + synchronized (Tethering.this.mPublicSync) { + mAvailable = available; + } } - // synchronized between this getter and the following setter - public synchronized boolean isTethered() { - return mTethered; + public boolean isTethered() { + synchronized (Tethering.this.mPublicSync) { + return mTethered; + } } - private synchronized void setTethered(boolean tethered) { - mTethered = tethered; + private void setTethered(boolean tethered) { + synchronized (Tethering.this.mPublicSync) { + mTethered = tethered; + } } - // synchronized between this getter and the following setter - public synchronized boolean isErrored() { - return (mLastError != ConnectivityManager.TETHER_ERROR_NO_ERROR); + public boolean isErrored() { + synchronized (Tethering.this.mPublicSync) { + return (mLastError != ConnectivityManager.TETHER_ERROR_NO_ERROR); + } } class InitialState extends State { @@ -922,7 +961,7 @@ public class Tethering extends INetworkManagementEventObserver.Stub { sendTetherStateChangedBroadcast(); } - void cleanupUpstream() { + private void cleanupUpstream() { if (mMyUpstreamIfaceName != null) { // note that we don't care about errors here. // sometimes interfaces are gone before we get @@ -1237,21 +1276,23 @@ public class Tethering extends INetworkManagementEventObserver.Stub { updateConfiguration(); - if (VDBG) { - Log.d(TAG, "chooseUpstreamType has upstream iface types:"); - for (Integer netType : mUpstreamIfaceTypes) { - Log.d(TAG, " " + netType); + synchronized (mPublicSync) { + if (VDBG) { + Log.d(TAG, "chooseUpstreamType has upstream iface types:"); + for (Integer netType : mUpstreamIfaceTypes) { + Log.d(TAG, " " + netType); + } } - } - for (Integer netType : mUpstreamIfaceTypes) { - NetworkInfo info = null; - try { - info = mConnService.getNetworkInfo(netType.intValue()); - } catch (RemoteException e) { } - if ((info != null) && info.isConnected()) { - upType = netType.intValue(); - break; + for (Integer netType : mUpstreamIfaceTypes) { + NetworkInfo info = null; + try { + info = mConnService.getNetworkInfo(netType.intValue()); + } catch (RemoteException e) { } + if ((info != null) && info.isConnected()) { + upType = netType.intValue(); + break; + } } } @@ -1479,14 +1520,14 @@ public class Tethering extends INetworkManagementEventObserver.Stub { return; } - pw.println("mUpstreamIfaceTypes: "); - for (Integer netType : mUpstreamIfaceTypes) { - pw.println(" " + netType); - } + synchronized (mPublicSync) { + pw.println("mUpstreamIfaceTypes: "); + for (Integer netType : mUpstreamIfaceTypes) { + pw.println(" " + netType); + } - pw.println(); - pw.println("Tether state:"); - synchronized (mIfaces) { + pw.println(); + pw.println("Tether state:"); for (Object o : mIfaces.values()) { pw.println(" "+o.toString()); } diff --git a/services/java/com/android/server/wm/ScreenRotationAnimation.java b/services/java/com/android/server/wm/ScreenRotationAnimation.java index 131f11c19fbd..8fc9a70faad9 100644 --- a/services/java/com/android/server/wm/ScreenRotationAnimation.java +++ b/services/java/com/android/server/wm/ScreenRotationAnimation.java @@ -88,13 +88,14 @@ class ScreenRotationAnimation { try { try { mSurface = new Surface(session, 0, "FreezeSurface", - -1, mWidth, mHeight, PixelFormat.OPAQUE, Surface.FX_SURFACE_SCREENSHOT); + -1, mWidth, mHeight, PixelFormat.OPAQUE, Surface.FX_SURFACE_SCREENSHOT | Surface.HIDDEN); if (mSurface == null || !mSurface.isValid()) { // Screenshot failed, punt. mSurface = null; return; } mSurface.setLayer(FREEZE_LAYER + 1); + mSurface.show(); } catch (Surface.OutOfResourcesException e) { Slog.w(TAG, "Unable to allocate freeze surface", e); } diff --git a/services/surfaceflinger/LayerScreenshot.cpp b/services/surfaceflinger/LayerScreenshot.cpp index e30ccbf6bfbb..68e66606ed1f 100644 --- a/services/surfaceflinger/LayerScreenshot.cpp +++ b/services/surfaceflinger/LayerScreenshot.cpp @@ -27,6 +27,7 @@ #include "SurfaceFlinger.h" #include "DisplayHardware/DisplayHardware.h" + namespace android { // --------------------------------------------------------------------------- @@ -45,23 +46,64 @@ LayerScreenshot::~LayerScreenshot() } } +status_t LayerScreenshot::captureLocked() { + GLfloat u, v; + status_t result = mFlinger->renderScreenToTextureLocked(0, &mTextureName, &u, &v); + if (result != NO_ERROR) { + return result; + } + initTexture(u, v); + return NO_ERROR; +} + status_t LayerScreenshot::capture() { GLfloat u, v; status_t result = mFlinger->renderScreenToTexture(0, &mTextureName, &u, &v); if (result != NO_ERROR) { return result; } + initTexture(u, v); + return NO_ERROR; +} +void LayerScreenshot::initTexture(GLfloat u, GLfloat v) { glBindTexture(GL_TEXTURE_2D, mTextureName); glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameterx(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - mTexCoords[0] = 0; mTexCoords[1] = v; mTexCoords[2] = 0; mTexCoords[3] = 0; mTexCoords[4] = u; mTexCoords[5] = 0; mTexCoords[6] = u; mTexCoords[7] = v; +} - return NO_ERROR; +void LayerScreenshot::initStates(uint32_t w, uint32_t h, uint32_t flags) { + LayerBaseClient::initStates(w, h, flags); + if (!(flags & ISurfaceComposer::eHidden)) { + capture(); + } +} + +uint32_t LayerScreenshot::doTransaction(uint32_t flags) +{ + const Layer::State& draw(drawingState()); + const Layer::State& curr(currentState()); + + if (draw.flags & ISurfaceComposer::eLayerHidden) { + if (!(curr.flags & ISurfaceComposer::eLayerHidden)) { + // we're going from hidden to visible + status_t err = captureLocked(); + if (err != NO_ERROR) { + LOGW("createScreenshotSurface failed (%s)", strerror(-err)); + } + } + } else if (curr.flags & ISurfaceComposer::eLayerHidden) { + // we're going from visible to hidden + if (mTextureName) { + glDeleteTextures(1, &mTextureName); + mTextureName = 0; + } + } + return LayerBaseClient::doTransaction(flags); } void LayerScreenshot::onDraw(const Region& clip) const diff --git a/services/surfaceflinger/LayerScreenshot.h b/services/surfaceflinger/LayerScreenshot.h index e3a2b1975215..ab9004741fca 100644 --- a/services/surfaceflinger/LayerScreenshot.h +++ b/services/surfaceflinger/LayerScreenshot.h @@ -41,12 +41,18 @@ public: status_t capture(); + virtual void initStates(uint32_t w, uint32_t h, uint32_t flags); + virtual uint32_t doTransaction(uint32_t flags); virtual void onDraw(const Region& clip) const; virtual bool isOpaque() const { return false; } virtual bool isSecure() const { return false; } virtual bool isProtectedByApp() const { return false; } virtual bool isProtectedByDRM() const { return false; } virtual const char* getTypeId() const { return "LayerScreenshot"; } + +private: + status_t captureLocked(); + void initTexture(GLfloat u, GLfloat v); }; // --------------------------------------------------------------------------- diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index a6d4147c1952..8f4fdb8fed5c 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1360,11 +1360,6 @@ sp<LayerScreenshot> SurfaceFlinger::createScreenshotSurface( uint32_t w, uint32_t h, uint32_t flags) { sp<LayerScreenshot> layer = new LayerScreenshot(this, display, client); - status_t err = layer->capture(); - if (err != NO_ERROR) { - layer.clear(); - LOGW("createScreenshotSurface failed (%s)", strerror(-err)); - } return layer; } diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h index ea5bfa718f32..17028dbb64fa 100644 --- a/services/surfaceflinger/SurfaceFlinger.h +++ b/services/surfaceflinger/SurfaceFlinger.h @@ -186,6 +186,8 @@ public: status_t renderScreenToTexture(DisplayID dpy, GLuint* textureName, GLfloat* uOut, GLfloat* vOut); + status_t renderScreenToTextureLocked(DisplayID dpy, + GLuint* textureName, GLfloat* uOut, GLfloat* vOut); status_t postMessageAsync(const sp<MessageBase>& msg, nsecs_t reltime=0, uint32_t flags = 0); @@ -328,8 +330,6 @@ private: status_t turnElectronBeamOnImplLocked(int32_t mode); status_t electronBeamOffAnimationImplLocked(); status_t electronBeamOnAnimationImplLocked(); - status_t renderScreenToTextureLocked(DisplayID dpy, - GLuint* textureName, GLfloat* uOut, GLfloat* vOut); void debugFlashRegions(); void debugShowFPS() const; diff --git a/telephony/java/com/android/internal/telephony/CallManager.java b/telephony/java/com/android/internal/telephony/CallManager.java index 171b3714d527..3dd57ee742f2 100644 --- a/telephony/java/com/android/internal/telephony/CallManager.java +++ b/telephony/java/com/android/internal/telephony/CallManager.java @@ -379,18 +379,19 @@ public final class CallManager { mode = AudioManager.MODE_RINGTONE; break; case OFFHOOK: - Phone fgPhone = getFgPhone(); - // While foreground call is in DIALING, - // ALERTING, ACTIVE and DISCONNECTING state - if (getActiveFgCallState() != Call.State.IDLE - && getActiveFgCallState() != Call.State.DISCONNECTED) { - if (fgPhone instanceof SipPhone) { - // enable IN_COMMUNICATION audio mode for sipPhone - mode = AudioManager.MODE_IN_COMMUNICATION; - } else { - // enable IN_CALL audio mode for telephony - mode = AudioManager.MODE_IN_CALL; - } + Phone offhookPhone = getFgPhone(); + if (getActiveFgCallState() == Call.State.IDLE) { + // There is no active Fg calls, the OFFHOOK state + // is set by the Bg call. So set the phone to bgPhone. + offhookPhone = getBgPhone(); + } + + if (offhookPhone instanceof SipPhone) { + // enable IN_COMMUNICATION audio mode for sipPhone + mode = AudioManager.MODE_IN_COMMUNICATION; + } else { + // enable IN_CALL audio mode for telephony + mode = AudioManager.MODE_IN_CALL; } break; } diff --git a/tests/FrameworkPerf/AndroidManifest.xml b/tests/FrameworkPerf/AndroidManifest.xml index aa663f3b78f2..e88f4fb6e02f 100644 --- a/tests/FrameworkPerf/AndroidManifest.xml +++ b/tests/FrameworkPerf/AndroidManifest.xml @@ -13,6 +13,10 @@ </activity> <service android:name="SchedulerService"> </service> + <service android:name="TestService" android:process=":test"> + </service> + <service android:name="LocalTestService"> + </service> <receiver android:name="Receiver" android:exported="true"> </receiver> </application> diff --git a/tests/FrameworkPerf/res/layout/main.xml b/tests/FrameworkPerf/res/layout/main.xml index 62b1a7ae36a5..781264881ceb 100644 --- a/tests/FrameworkPerf/res/layout/main.xml +++ b/tests/FrameworkPerf/res/layout/main.xml @@ -91,6 +91,11 @@ android:layout_height="wrap_content" android:text="@string/stop" /> + <CheckBox android:id="@+id/local" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Local" + /> </LinearLayout> <TextView android:id="@+id/log" diff --git a/tests/FrameworkPerf/src/com/android/frameworkperf/FrameworkPerfActivity.java b/tests/FrameworkPerf/src/com/android/frameworkperf/FrameworkPerfActivity.java index 39799024f41f..22eb5794230d 100644 --- a/tests/FrameworkPerf/src/com/android/frameworkperf/FrameworkPerfActivity.java +++ b/tests/FrameworkPerf/src/com/android/frameworkperf/FrameworkPerfActivity.java @@ -17,43 +17,28 @@ package com.android.frameworkperf; import android.app.Activity; -import android.content.Context; +import android.content.ComponentName; import android.content.Intent; -import android.content.pm.PackageManager; -import android.content.res.TypedArray; -import android.content.res.XmlResourceParser; -import android.graphics.Bitmap; -import android.graphics.BitmapFactory; +import android.content.ServiceConnection; import android.os.Bundle; -import android.os.FileUtils; import android.os.Handler; -import android.os.Looper; +import android.os.IBinder; +import android.os.Message; +import android.os.Messenger; import android.os.PowerManager; -import android.os.Process; -import android.os.SystemClock; -import android.util.AttributeSet; -import android.util.DisplayMetrics; +import android.os.RemoteException; import android.util.Log; -import android.util.Xml; -import android.view.LayoutInflater; import android.view.View; import android.view.WindowManager; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; +import android.widget.CheckBox; import android.widget.Spinner; import android.widget.TextView; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.RandomAccessFile; import java.util.ArrayList; -import org.xmlpull.v1.XmlPullParser; -import org.xmlpull.v1.XmlPullParserException; - /** * So you thought sync used up your battery life. */ @@ -61,147 +46,71 @@ public class FrameworkPerfActivity extends Activity implements AdapterView.OnItemSelectedListener { static final String TAG = "Perf"; - final Handler mHandler = new Handler(); - Spinner mFgSpinner; Spinner mBgSpinner; TextView mTestTime; Button mStartButton; Button mStopButton; + CheckBox mLocalCheckBox; TextView mLog; PowerManager.WakeLock mPartialWakeLock; long mMaxRunTime = 5000; boolean mStarted; - final TestRunner mRunner = new TestRunner(); - - final Op[] mOpPairs = new Op[] { - new MethodCallOp(), new NoOp(), - new MethodCallOp(), new CpuOp(), - new MethodCallOp(), new SchedulerOp(), - new MethodCallOp(), new GcOp(), - new MethodCallOp(), new CreateFileOp(), - new MethodCallOp(), new CreateWriteFileOp(), - new MethodCallOp(), new CreateWriteSyncFileOp(), - new MethodCallOp(), new WriteFileOp(), - new MethodCallOp(), new ReadFileOp(), - new SchedulerOp(), new SchedulerOp(), - new GcOp(), new NoOp(), - new IpcOp(), new NoOp(), - new IpcOp(), new CpuOp(), - new IpcOp(), new SchedulerOp(), - new IpcOp(), new GcOp(), - new IpcOp(), new CreateFileOp(), - new IpcOp(), new CreateWriteFileOp(), - new IpcOp(), new CreateWriteSyncFileOp(), - new IpcOp(), new WriteFileOp(), - new IpcOp(), new ReadFileOp(), - new CreateFileOp(), new NoOp(), - new CreateWriteFileOp(), new NoOp(), - new CreateWriteSyncFileOp(), new NoOp(), - new WriteFileOp(), new NoOp(), - new ReadFileOp(), new NoOp(), - new WriteFileOp(), new CreateWriteFileOp(), - new ReadFileOp(), new CreateWriteFileOp(), - new WriteFileOp(), new CreateWriteSyncFileOp(), - new ReadFileOp(), new CreateWriteSyncFileOp(), - new WriteFileOp(), new WriteFileOp(), - new WriteFileOp(), new ReadFileOp(), - new ReadFileOp(), new WriteFileOp(), - new ReadFileOp(), new ReadFileOp(), - new OpenXmlResOp(), new NoOp(), - new ReadXmlAttrsOp(), new NoOp(), - new ParseXmlResOp(), new NoOp(), - new ParseLargeXmlResOp(), new NoOp(), - new LayoutInflaterOp(), new NoOp(), - new LayoutInflaterLargeOp(), new NoOp(), - new LayoutInflaterViewOp(), new NoOp(), - new LayoutInflaterButtonOp(), new NoOp(), - new LayoutInflaterImageButtonOp(), new NoOp(), - new CreateBitmapOp(), new NoOp(), - new CreateRecycleBitmapOp(), new NoOp(), - new LoadSmallBitmapOp(), new NoOp(), - new LoadRecycleSmallBitmapOp(), new NoOp(), - new LoadLargeBitmapOp(), new NoOp(), - new LoadRecycleLargeBitmapOp(), new NoOp(), - new LoadSmallScaledBitmapOp(), new NoOp(), - new LoadLargeScaledBitmapOp(), new NoOp(), - }; - - final Op[] mAvailOps = new Op[] { - null, - new NoOp(), - new CpuOp(), - new SchedulerOp(), - new MethodCallOp(), - new IpcOp(), - new CreateFileOp(), - new CreateWriteFileOp(), - new CreateWriteSyncFileOp(), - new WriteFileOp(), - new ReadFileOp(), - new OpenXmlResOp(), - new ReadXmlAttrsOp(), - new ParseXmlResOp(), - new ParseLargeXmlResOp(), - new LayoutInflaterOp(), - new LayoutInflaterLargeOp(), - new LayoutInflaterViewOp(), - new LayoutInflaterButtonOp(), - new LayoutInflaterImageButtonOp(), - new CreateBitmapOp(), - new CreateRecycleBitmapOp(), - new LoadSmallBitmapOp(), - new LoadRecycleSmallBitmapOp(), - new LoadLargeBitmapOp(), - new LoadRecycleLargeBitmapOp(), - new LoadSmallScaledBitmapOp(), - new LoadLargeScaledBitmapOp(), - }; - final String[] mAvailOpLabels; final String[] mAvailOpDescriptions; - Op mFgTest; - Op mBgTest; + int mFgTestIndex = -1; + int mBgTestIndex = -1; + TestService.Op mFgTest; + TestService.Op mBgTest; int mCurOpIndex = 0; + TestConnection mCurConnection; - class RunResult { - final String name; - final String fgLongName; - final String bgLongName; - final long fgTime; - final long fgOps; - final long bgTime; - final long bgOps; + final ArrayList<RunResult> mResults = new ArrayList<RunResult>(); - RunResult(TestRunner op) { - name = op.getName(); - fgLongName = op.getForegroundLongName(); - bgLongName = op.getBackgroundLongName(); - fgTime = op.getForegroundTime(); - fgOps = op.getForegroundOps(); - bgTime = op.getBackgroundTime(); - bgOps = op.getBackgroundOps(); - } + class TestConnection implements ServiceConnection { + Messenger mService; - float getFgMsPerOp() { - return fgOps != 0 ? (fgTime / (float)fgOps) : 0; + @Override public void onServiceConnected(ComponentName name, IBinder service) { + mService = new Messenger(service); + dispatchCurOp(this); } - float getBgMsPerOp() { - return bgOps != 0 ? (bgTime / (float)bgOps) : 0; + @Override public void onServiceDisconnected(ComponentName name) { } } - final ArrayList<RunResult> mResults = new ArrayList<RunResult>(); + static final int MSG_CONTINUE = 1000; + + final Handler mHandler = new Handler() { + @Override public void handleMessage(Message msg) { + switch (msg.what) { + case TestService.RES_TEST_FINISHED: { + Bundle bundle = (Bundle)msg.obj; + bundle.setClassLoader(getClassLoader()); + RunResult res = (RunResult)bundle.getParcelable("res"); + completeCurOp(res); + } break; + case TestService.RES_TERMINATED: { + // Give a little time for things to settle down. + sendMessageDelayed(obtainMessage(MSG_CONTINUE), 500); + } break; + case MSG_CONTINUE: { + startCurOp(); + } break; + } + } + }; + + final Messenger mMessenger = new Messenger(mHandler); public FrameworkPerfActivity() { - mAvailOpLabels = new String[mAvailOps.length]; - mAvailOpDescriptions = new String[mAvailOps.length]; - for (int i=0; i<mAvailOps.length; i++) { - Op op = mAvailOps[i]; + mAvailOpLabels = new String[TestService.mAvailOps.length]; + mAvailOpDescriptions = new String[TestService.mAvailOps.length]; + for (int i=0; i<TestService.mAvailOps.length; i++) { + TestService.Op op = TestService.mAvailOps[i]; if (op == null) { mAvailOpLabels[i] = "All"; mAvailOpDescriptions[i] = "All tests"; @@ -251,6 +160,7 @@ public class FrameworkPerfActivity extends Activity } }); mStopButton.setEnabled(false); + mLocalCheckBox = (CheckBox)findViewById(R.id.local); mLog = (TextView)findViewById(R.id.log); @@ -262,11 +172,13 @@ public class FrameworkPerfActivity extends Activity @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { if (parent == mFgSpinner || parent == mBgSpinner) { - Op op = mAvailOps[position]; + TestService.Op op = TestService.mAvailOps[position]; if (parent == mFgSpinner) { + mFgTestIndex = position; mFgTest = op; ((TextView)findViewById(R.id.fgtext)).setText(mAvailOpDescriptions[position]); } else { + mBgTestIndex = position; mBgTest = op; ((TextView)findViewById(R.id.bgtext)).setText(mAvailOpDescriptions[position]); } @@ -291,64 +203,108 @@ public class FrameworkPerfActivity extends Activity } } - void startCurOp() { - Op fgOp, bgOp; - if (mFgTest == null && mBgTest == null) { - fgOp = mOpPairs[mCurOpIndex]; - bgOp = mOpPairs[mCurOpIndex+1]; - } else if (mFgTest != null && mBgTest != null) { - fgOp = mFgTest; - bgOp = mBgTest; - } else if (mFgTest != null) { + void dispatchCurOp(TestConnection conn) { + if (mCurConnection != conn) { + Log.w(TAG, "Dispatching on invalid connection: " + conn); + return; + } + TestArgs args = new TestArgs(); + args.maxTime = mMaxRunTime; + if (mFgTestIndex == 0 && mBgTestIndex == 0) { + args.combOp = mCurOpIndex; + } else if (mFgTestIndex != 0 && mBgTestIndex != 0) { + args.fgOp = mFgTestIndex; + args.bgOp = mBgTestIndex; + } else { // Skip null test. if (mCurOpIndex == 0) { mCurOpIndex = 1; } - fgOp = mFgTest; - bgOp = mAvailOps[mCurOpIndex]; + if (mFgTestIndex != 0) { + args.fgOp = mFgTestIndex; + args.bgOp = mCurOpIndex; + } else { + args.fgOp = mCurOpIndex; + args.bgOp = mFgTestIndex; + } + } + Bundle bundle = new Bundle(); + bundle.putParcelable("args", args); + Message msg = Message.obtain(null, TestService.CMD_START_TEST, bundle); + msg.replyTo = mMessenger; + try { + conn.mService.send(msg); + } catch (RemoteException e) { + Log.i(TAG, "Failure communicating with service", e); + } + } + + void completeCurOp(RunResult result) { + log(String.format("%s: fg=%d*%gms/op (%dms) / bg=%d*%gms/op (%dms)", + result.name, result.fgOps, result.getFgMsPerOp(), result.fgTime, + result.bgOps, result.getBgMsPerOp(), result.bgTime)); + mResults.add(result); + if (!mStarted) { + log("Stop"); + stopRunning(); + return; + } + if (mFgTest != null && mBgTest != null) { + log("Finished"); + stopRunning(); + return; + } + if (mFgTest == null && mBgTest == null) { + mCurOpIndex+=2; + if (mCurOpIndex >= TestService.mOpPairs.length) { + log("Finished"); + stopRunning(); + return; + } } else { - // Skip null test. - if (mCurOpIndex == 0) { - mCurOpIndex = 1; + mCurOpIndex++; + if (mCurOpIndex >= TestService.mAvailOps.length) { + log("Finished"); + stopRunning(); + return; } - fgOp = mAvailOps[mCurOpIndex]; - bgOp = mBgTest; } - mRunner.run(mHandler, fgOp, bgOp, new Runnable() { - @Override public void run() { - RunResult result = new RunResult(mRunner); - log(String.format("%s: fg=%d*%gms/op (%dms) / bg=%d*%gms/op (%dms)", - result.name, result.fgOps, result.getFgMsPerOp(), result.fgTime, - result.bgOps, result.getBgMsPerOp(), result.bgTime)); - mResults.add(result); - if (!mStarted) { - log("Stop"); - stopRunning(); - return; - } - if (mFgTest != null && mBgTest != null) { - log("Finished"); - stopRunning(); - return; - } - if (mFgTest == null && mBgTest == null) { - mCurOpIndex+=2; - if (mCurOpIndex >= mOpPairs.length) { - log("Finished"); - stopRunning(); - return; - } - } else { - mCurOpIndex++; - if (mCurOpIndex >= mAvailOps.length) { - log("Finished"); - stopRunning(); - return; - } + startCurOp(); + } + + void disconnect() { + if (mCurConnection != null) { + unbindService(mCurConnection); + if (mCurConnection.mService != null) { + Message msg = Message.obtain(null, TestService.CMD_TERMINATE); + msg.replyTo = mMessenger; + try { + mCurConnection.mService.send(msg); + } catch (RemoteException e) { + Log.i(TAG, "Failure communicating with service", e); } - startCurOp(); } - }); + mCurConnection = null; + } + } + + void startCurOp() { + if (mCurConnection != null) { + disconnect(); + } + if (mStarted) { + mHandler.removeMessages(TestService.RES_TEST_FINISHED); + mHandler.removeMessages(TestService.RES_TERMINATED); + mHandler.removeMessages(MSG_CONTINUE); + mCurConnection = new TestConnection(); + Intent intent; + if (mLocalCheckBox.isChecked()) { + intent = new Intent(this, LocalTestService.class); + } else { + intent = new Intent(this, TestService.class); + } + bindService(intent, mCurConnection, BIND_AUTO_CREATE|BIND_IMPORTANT); + } } void startRunning() { @@ -357,6 +313,7 @@ public class FrameworkPerfActivity extends Activity mStarted = true; mStartButton.setEnabled(false); mStopButton.setEnabled(true); + mLocalCheckBox.setEnabled(false); mTestTime.setEnabled(false); mFgSpinner.setEnabled(false); mBgSpinner.setEnabled(false); @@ -371,9 +328,11 @@ public class FrameworkPerfActivity extends Activity void stopRunning() { if (mStarted) { + disconnect(); mStarted = false; mStartButton.setEnabled(true); mStopButton.setEnabled(false); + mLocalCheckBox.setEnabled(true); mTestTime.setEnabled(true); mFgSpinner.setEnabled(true); mBgSpinner.setEnabled(true); @@ -412,842 +371,4 @@ public class FrameworkPerfActivity extends Activity mLog.setText(mLog.getText() + "\n" + s); Log.i(TAG, s); } - - enum BackgroundMode { - NOTHING, - CPU, - SCHEDULER - }; - - public class TestRunner { - Handler mHandler; - Op mForegroundOp; - Op mBackgroundOp; - Runnable mDoneCallback; - - RunnerThread mBackgroundThread; - RunnerThread mForegroundThread; - long mStartTime; - - boolean mBackgroundRunning; - boolean mForegroundRunning; - - long mBackgroundEndTime; - long mBackgroundOps; - long mForegroundEndTime; - long mForegroundOps; - - public TestRunner() { - } - - public String getForegroundName() { - return mForegroundOp.getName(); - } - - public String getBackgroundName() { - return mBackgroundOp.getName(); - } - - public String getName() { - String fgName = mForegroundOp.getName(); - String bgName = mBackgroundOp.getName(); - StringBuilder res = new StringBuilder(); - if (fgName != null) { - res.append(fgName); - res.append("Fg"); - } - if (bgName != null) { - res.append(bgName); - res.append("Bg"); - } - return res.toString(); - } - - public String getForegroundLongName() { - return mForegroundOp.getLongName(); - } - - public String getBackgroundLongName() { - return mBackgroundOp.getLongName(); - } - - public void run(Handler handler, Op foreground, Op background, Runnable doneCallback) { - mHandler = handler; - mForegroundOp = foreground; - mBackgroundOp = background; - mDoneCallback = doneCallback; - mBackgroundThread = new RunnerThread("background", new Runnable() { - @Override public void run() { - boolean running; - int ops = 0; - do { - running = mBackgroundOp.onRun(); - ops++; - } while (evalRepeat(running, true) && running); - mBackgroundEndTime = SystemClock.uptimeMillis(); - mBackgroundOps = ops * mBackgroundOp.getOpsPerRun(); - threadFinished(false); - } - }, Process.THREAD_PRIORITY_BACKGROUND); - mForegroundThread = new RunnerThread("background", new Runnable() { - @Override public void run() { - boolean running; - int ops = 0; - do { - running = mForegroundOp.onRun(); - ops++; - } while (evalRepeat(true, running) && running); - mForegroundEndTime = SystemClock.uptimeMillis(); - mForegroundOps = ops * mForegroundOp.getOpsPerRun(); - threadFinished(true); - } - }, Process.THREAD_PRIORITY_FOREGROUND); - - mForegroundOp.onInit(FrameworkPerfActivity.this, true); - mBackgroundOp.onInit(FrameworkPerfActivity.this, false); - - synchronized (this) { - mStartTime = SystemClock.uptimeMillis(); - mBackgroundRunning = true; - mForegroundRunning = true; - } - - mBackgroundThread.start(); - mForegroundThread.start(); - } - - public long getForegroundTime() { - return mForegroundEndTime-mStartTime; - } - - public long getForegroundOps() { - return mForegroundOps; - } - - public long getBackgroundTime() { - return mBackgroundEndTime-mStartTime; - } - - public long getBackgroundOps() { - return mBackgroundOps; - } - - private boolean evalRepeat(boolean bgRunning, boolean fgRunning) { - synchronized (this) { - if (!bgRunning) { - mBackgroundRunning = false; - } - if (!fgRunning) { - mForegroundRunning = false; - } - if (!mBackgroundRunning && !mForegroundRunning) { - return false; - } - long now = SystemClock.uptimeMillis(); - if (now > (mStartTime+mMaxRunTime)) { - return false; - } - return true; - } - } - - private void threadFinished(boolean foreground) { - synchronized (this) { - if (foreground) { - mForegroundRunning = false; - } else { - mBackgroundRunning = false; - } - if (!mBackgroundRunning && !mForegroundRunning) { - mHandler.post(new Runnable() { - @Override public void run() { - mForegroundOp.onTerm(FrameworkPerfActivity.this); - mBackgroundOp.onTerm(FrameworkPerfActivity.this); - if (mDoneCallback != null) { - mDoneCallback.run(); - } - } - }); - } - } - } - } - - class RunnerThread extends Thread { - private final Runnable mOp; - private final int mPriority; - - RunnerThread(String name, Runnable op, int priority) { - super(name); - mOp = op; - mPriority = priority; - } - - public void run() { - Process.setThreadPriority(mPriority); - mOp.run(); - } - } - - static public abstract class Op { - final String mName; - final String mLongName; - - public Op(String name, String longName) { - mName = name; - mLongName = longName; - } - - public String getName() { - return mName; - } - - public String getLongName() { - return mLongName; - } - - void onInit(Context context, boolean foreground) { - } - - abstract boolean onRun(); - - void onTerm(Context context) { - } - - int getOpsPerRun() { - return 1; - } - } - - static class NoOp extends Op { - NoOp() { - super(null, "Nothing"); - } - - boolean onRun() { - return false; - } - - int getOpsPerRun() { - return 0; - } - } - - static class CpuOp extends Op { - CpuOp() { - super("CPU", "Consume CPU"); - } - - boolean onRun() { - return true; - } - } - - static class SchedulerOp extends Op { - SchedulerOp() { - super("Sched", "Change scheduler group"); - } - - boolean onRun() { - Process.setThreadPriority(Process.THREAD_PRIORITY_FOREGROUND); - Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND); - return true; - } - } - - static class GcOp extends Op { - GcOp() { - super("Gc", "Run garbage collector"); - } - - boolean onRun() { - byte[] stuff = new byte[1024*1024]; - return true; - } - } - - static class MethodCallOp extends Op { - MethodCallOp() { - super("MethodCall", "Method call"); - } - - boolean onRun() { - final int N = getOpsPerRun(); - for (int i=0; i<N; i++) { - someFunc(i); - } - return true; - } - - int someFunc(int foo) { - return 0; - } - - int getOpsPerRun() { - return 500; - } - } - - static class IpcOp extends Op { - PackageManager mPm; - String mProcessName; - - IpcOp() { - super("Ipc", "IPC to system process"); - } - - void onInit(Context context, boolean foreground) { - mPm = context.getPackageManager(); - mProcessName = context.getApplicationInfo().processName; - } - - boolean onRun() { - final int N = getOpsPerRun(); - for (int i=0; i<N; i++) { - mPm.queryContentProviders(mProcessName, Process.myUid(), 0); - } - return true; - } - - int getOpsPerRun() { - return 100; - } - } - - static class OpenXmlResOp extends Op { - Context mContext; - - OpenXmlResOp() { - super("OpenXmlRes", "Open (and close) an XML resource"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - XmlResourceParser parser = mContext.getResources().getLayout(R.xml.simple); - parser.close(); - return true; - } - } - - static class ReadXmlAttrsOp extends Op { - Context mContext; - XmlResourceParser mParser; - AttributeSet mAttrs; - - ReadXmlAttrsOp() { - super("ReadXmlAttrs", "Read attributes from an XML tag"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - mParser = mContext.getResources().getLayout(R.xml.simple); - mAttrs = Xml.asAttributeSet(mParser); - - int eventType; - try { - // Find the first <item> tag. - eventType = mParser.getEventType(); - String tagName; - do { - if (eventType == XmlPullParser.START_TAG) { - tagName = mParser.getName(); - if (tagName.equals("item")) { - break; - } - } - eventType = mParser.next(); - } while (eventType != XmlPullParser.END_DOCUMENT); - } catch (XmlPullParserException e) { - throw new RuntimeException("I died", e); - } catch (IOException e) { - throw new RuntimeException("I died", e); - } - } - - void onTerm(Context context) { - mParser.close(); - } - - boolean onRun() { - TypedArray a = mContext.obtainStyledAttributes(mAttrs, - com.android.internal.R.styleable.MenuItem); - a.recycle(); - return true; - } - } - - static class ParseXmlResOp extends Op { - Context mContext; - - ParseXmlResOp() { - super("ParseXmlRes", "Parse compiled XML resource"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - SimpleInflater inf = new SimpleInflater(mContext); - inf.inflate(R.xml.simple); - return true; - } - } - - static class ParseLargeXmlResOp extends Op { - Context mContext; - - ParseLargeXmlResOp() { - super("ParseLargeXmlRes", "Parse large XML resource"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - SimpleInflater inf = new SimpleInflater(mContext); - inf.inflate(R.xml.simple_large); - return true; - } - } - - static class LayoutInflaterOp extends Op { - Context mContext; - - LayoutInflaterOp() { - super("LayoutInflater", "Inflate layout resource"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - if (Looper.myLooper() == null) { - Looper.prepare(); - } - LayoutInflater inf = (LayoutInflater)mContext.getSystemService( - Context.LAYOUT_INFLATER_SERVICE); - inf.inflate(R.layout.small_layout, null); - return true; - } - } - - static class LayoutInflaterLargeOp extends Op { - Context mContext; - - LayoutInflaterLargeOp() { - super("LayoutInflaterLarge", "Inflate large layout resource"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - if (Looper.myLooper() == null) { - Looper.prepare(); - } - LayoutInflater inf = (LayoutInflater)mContext.getSystemService( - Context.LAYOUT_INFLATER_SERVICE); - inf.inflate(R.layout.large_layout, null); - return true; - } - } - - static class LayoutInflaterViewOp extends Op { - Context mContext; - - LayoutInflaterViewOp() { - super("LayoutInflaterView", "Inflate layout with 50 View objects"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - if (Looper.myLooper() == null) { - Looper.prepare(); - } - LayoutInflater inf = (LayoutInflater)mContext.getSystemService( - Context.LAYOUT_INFLATER_SERVICE); - inf.inflate(R.layout.view_layout, null); - return true; - } - } - - static class LayoutInflaterButtonOp extends Op { - Context mContext; - - LayoutInflaterButtonOp() { - super("LayoutInflaterButton", "Inflate layout with 50 Button objects"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - if (Looper.myLooper() == null) { - Looper.prepare(); - } - LayoutInflater inf = (LayoutInflater)mContext.getSystemService( - Context.LAYOUT_INFLATER_SERVICE); - inf.inflate(R.layout.button_layout, null); - return true; - } - } - - static class LayoutInflaterImageButtonOp extends Op { - Context mContext; - - LayoutInflaterImageButtonOp() { - super("LayoutInflaterImageButton", "Inflate layout with 50 ImageButton objects"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - if (Looper.myLooper() == null) { - Looper.prepare(); - } - LayoutInflater inf = (LayoutInflater)mContext.getSystemService( - Context.LAYOUT_INFLATER_SERVICE); - inf.inflate(R.layout.image_button_layout, null); - return true; - } - } - - static class CreateBitmapOp extends Op { - Context mContext; - - CreateBitmapOp() { - super("CreateBitmap", "Create a Bitmap"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - BitmapFactory.Options opts = new BitmapFactory.Options(); - opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; - Bitmap bm = Bitmap.createBitmap(16, 16, Bitmap.Config.ARGB_8888); - return true; - } - } - - static class CreateRecycleBitmapOp extends Op { - Context mContext; - - CreateRecycleBitmapOp() { - super("CreateRecycleBitmap", "Create and recycle a Bitmap"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - BitmapFactory.Options opts = new BitmapFactory.Options(); - opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; - Bitmap bm = Bitmap.createBitmap(16, 16, Bitmap.Config.ARGB_8888); - bm.recycle(); - return true; - } - } - - static class LoadSmallBitmapOp extends Op { - Context mContext; - - LoadSmallBitmapOp() { - super("LoadSmallBitmap", "Load small raw bitmap"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - BitmapFactory.Options opts = new BitmapFactory.Options(); - opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; - Bitmap bm = BitmapFactory.decodeResource(mContext.getResources(), - R.drawable.stat_sample, opts); - return true; - } - } - - static class LoadRecycleSmallBitmapOp extends Op { - Context mContext; - - LoadRecycleSmallBitmapOp() { - super("LoadRecycleSmallBitmap", "Load and recycle small raw bitmap"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - BitmapFactory.Options opts = new BitmapFactory.Options(); - opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; - Bitmap bm = BitmapFactory.decodeResource(mContext.getResources(), - R.drawable.stat_sample, opts); - bm.recycle(); - return true; - } - } - - static class LoadLargeBitmapOp extends Op { - Context mContext; - - LoadLargeBitmapOp() { - super("LoadLargeBitmap", "Load large raw bitmap"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - BitmapFactory.Options opts = new BitmapFactory.Options(); - opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; - Bitmap bm = BitmapFactory.decodeResource(mContext.getResources(), - R.drawable.wallpaper_goldengate, opts); - return true; - } - } - - static class LoadRecycleLargeBitmapOp extends Op { - Context mContext; - - LoadRecycleLargeBitmapOp() { - super("LoadRecycleLargeBitmap", "Load and recycle large raw bitmap"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - BitmapFactory.Options opts = new BitmapFactory.Options(); - opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; - Bitmap bm = BitmapFactory.decodeResource(mContext.getResources(), - R.drawable.wallpaper_goldengate, opts); - bm.recycle(); - return true; - } - } - - static class LoadSmallScaledBitmapOp extends Op { - Context mContext; - - LoadSmallScaledBitmapOp() { - super("LoadSmallScaledBitmap", "Load small raw bitmap that is scaled for density"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - BitmapFactory.Options opts = new BitmapFactory.Options(); - opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; - Bitmap bm = BitmapFactory.decodeResource(mContext.getResources(), - R.drawable.stat_sample_scale, opts); - return true; - } - } - - static class LoadLargeScaledBitmapOp extends Op { - Context mContext; - - LoadLargeScaledBitmapOp() { - super("LoadLargeScaledBitmap", "Load large raw bitmap that is scaled for density"); - } - - void onInit(Context context, boolean foreground) { - mContext = context; - } - - boolean onRun() { - BitmapFactory.Options opts = new BitmapFactory.Options(); - opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; - Bitmap bm = BitmapFactory.decodeResource(mContext.getResources(), - R.drawable.wallpaper_goldengate_scale, opts); - return true; - } - } - - static class CreateFileOp extends Op { - File mFile; - - CreateFileOp() { - super("CreateFile", "Create and delete a file"); - } - - void onInit(Context context, boolean foreground) { - mFile = context.getFileStreamPath(foreground ? "test-fg.file" : "test-bg.file"); - mFile.delete(); - } - - boolean onRun() { - try { - mFile.createNewFile(); - } catch (IOException e) { - Log.w(TAG, "Failure creating " + mFile, e); - } - mFile.delete(); - return true; - } - } - - static class CreateWriteFileOp extends Op { - File mFile; - - CreateWriteFileOp() { - super("CreateWriteFile", "Create, write, and delete a file"); - } - - void onInit(Context context, boolean foreground) { - mFile = context.getFileStreamPath(foreground ? "test-fg.file" : "test-bg.file"); - mFile.delete(); - } - - boolean onRun() { - try { - FileOutputStream fos = new FileOutputStream(mFile); - fos.write(1); - fos.close(); - } catch (IOException e) { - Log.w(TAG, "Failure creating " + mFile, e); - } - mFile.delete(); - return true; - } - } - - static class CreateWriteSyncFileOp extends Op { - File mFile; - - CreateWriteSyncFileOp() { - super("CreateWriteSyncFile", "Create, write, sync, and delete a file"); - } - - void onInit(Context context, boolean foreground) { - mFile = context.getFileStreamPath(foreground ? "test-fg.file" : "test-bg.file"); - mFile.delete(); - } - - boolean onRun() { - try { - FileOutputStream fos = new FileOutputStream(mFile); - fos.write(1); - fos.flush(); - FileUtils.sync(fos); - fos.close(); - } catch (IOException e) { - Log.w(TAG, "Failure creating " + mFile, e); - } - mFile.delete(); - return true; - } - } - - static class WriteFileOp extends Op { - File mFile; - RandomAccessFile mRAF; - byte[] mBuffer; - - WriteFileOp() { - super("WriteFile", "Truncate and write a 64k file"); - } - - void onInit(Context context, boolean foreground) { - mBuffer = new byte[1024*64]; - for (int i=0; i<mBuffer.length; i++) { - mBuffer[i] = (byte)i; - } - mFile = context.getFileStreamPath(foreground ? "test-fg.file" : "test-bg.file"); - mFile.delete(); - try { - mRAF = new RandomAccessFile(mFile, "rw"); - } catch (FileNotFoundException e) { - Log.w(TAG, "Failure creating " + mFile, e); - } - } - - boolean onRun() { - try { - mRAF.seek(0); - mRAF.setLength(0); - mRAF.write(mBuffer); - } catch (IOException e) { - Log.w(TAG, "Failure writing " + mFile, e); - } - return true; - } - - void onTerm(Context context) { - try { - mRAF.close(); - } catch (IOException e) { - Log.w(TAG, "Failure closing " + mFile, e); - } - mFile.delete(); - } - } - - static class ReadFileOp extends Op { - File mFile; - RandomAccessFile mRAF; - byte[] mBuffer; - - ReadFileOp() { - super("ReadFile", "Seek and read a 64k file"); - } - - void onInit(Context context, boolean foreground) { - mBuffer = new byte[1024*64]; - for (int i=0; i<mBuffer.length; i++) { - mBuffer[i] = (byte)i; - } - mFile = context.getFileStreamPath(foreground ? "test-fg.file" : "test-bg.file"); - mFile.delete(); - try { - mRAF = new RandomAccessFile(mFile, "rw"); - mRAF.seek(0); - mRAF.setLength(0); - mRAF.write(mBuffer); - } catch (IOException e) { - Log.w(TAG, "Failure creating " + mFile, e); - } - } - - boolean onRun() { - try { - mRAF.seek(0); - mRAF.read(mBuffer); - } catch (IOException e) { - Log.w(TAG, "Failure reading " + mFile, e); - } - return true; - } - - void onTerm(Context context) { - try { - mRAF.close(); - } catch (IOException e) { - Log.w(TAG, "Failure closing " + mFile, e); - } - mFile.delete(); - } - } } diff --git a/tests/FrameworkPerf/src/com/android/frameworkperf/LocalTestService.java b/tests/FrameworkPerf/src/com/android/frameworkperf/LocalTestService.java new file mode 100644 index 000000000000..09c6be8343ad --- /dev/null +++ b/tests/FrameworkPerf/src/com/android/frameworkperf/LocalTestService.java @@ -0,0 +1,6 @@ +package com.android.frameworkperf; + +public class LocalTestService extends TestService { + void terminate() { + } +} diff --git a/tests/FrameworkPerf/src/com/android/frameworkperf/RunResult.java b/tests/FrameworkPerf/src/com/android/frameworkperf/RunResult.java new file mode 100644 index 000000000000..d14e434c90df --- /dev/null +++ b/tests/FrameworkPerf/src/com/android/frameworkperf/RunResult.java @@ -0,0 +1,85 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.frameworkperf; + +import android.os.Parcel; +import android.os.Parcelable; + +public class RunResult implements Parcelable { + final String name; + final String fgLongName; + final String bgLongName; + final long fgTime; + final long fgOps; + final long bgTime; + final long bgOps; + + RunResult(TestService.TestRunner op) { + name = op.getName(); + fgLongName = op.getForegroundLongName(); + bgLongName = op.getBackgroundLongName(); + fgTime = op.getForegroundTime(); + fgOps = op.getForegroundOps(); + bgTime = op.getBackgroundTime(); + bgOps = op.getBackgroundOps(); + } + + RunResult(Parcel source) { + name = source.readString(); + fgLongName = source.readString(); + bgLongName = source.readString(); + fgTime = source.readLong(); + fgOps = source.readLong(); + bgTime = source.readLong(); + bgOps = source.readLong(); + } + + float getFgMsPerOp() { + return fgOps != 0 ? (fgTime / (float)fgOps) : 0; + } + + float getBgMsPerOp() { + return bgOps != 0 ? (bgTime / (float)bgOps) : 0; + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeString(name); + dest.writeString(fgLongName); + dest.writeString(bgLongName); + dest.writeLong(fgTime); + dest.writeLong(fgOps); + dest.writeLong(bgTime); + dest.writeLong(bgOps); + } + + public static final Parcelable.Creator<RunResult> CREATOR + = new Parcelable.Creator<RunResult>() { + public RunResult createFromParcel(Parcel in) { + return new RunResult(in); + } + + public RunResult[] newArray(int size) { + return new RunResult[size]; + } + }; +}
\ No newline at end of file diff --git a/tests/FrameworkPerf/src/com/android/frameworkperf/TestArgs.java b/tests/FrameworkPerf/src/com/android/frameworkperf/TestArgs.java new file mode 100644 index 000000000000..f2f7c5675bcf --- /dev/null +++ b/tests/FrameworkPerf/src/com/android/frameworkperf/TestArgs.java @@ -0,0 +1,61 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.frameworkperf; + +import android.os.Parcel; +import android.os.Parcelable; + +public class TestArgs implements Parcelable { + long maxTime; + int combOp = -1; + int fgOp = -1; + int bgOp = -1; + + public TestArgs() { + } + + public TestArgs(Parcel source) { + maxTime = source.readLong(); + combOp = source.readInt(); + fgOp = source.readInt(); + bgOp = source.readInt(); + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeLong(maxTime); + dest.writeInt(combOp); + dest.writeInt(fgOp); + dest.writeInt(bgOp); + } + + public static final Parcelable.Creator<TestArgs> CREATOR + = new Parcelable.Creator<TestArgs>() { + public TestArgs createFromParcel(Parcel in) { + return new TestArgs(in); + } + + public TestArgs[] newArray(int size) { + return new TestArgs[size]; + } + }; +} diff --git a/tests/FrameworkPerf/src/com/android/frameworkperf/TestService.java b/tests/FrameworkPerf/src/com/android/frameworkperf/TestService.java new file mode 100644 index 000000000000..ce27b65e8fd1 --- /dev/null +++ b/tests/FrameworkPerf/src/com/android/frameworkperf/TestService.java @@ -0,0 +1,1037 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.frameworkperf; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.RandomAccessFile; + +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; + +import android.app.Service; +import android.content.Context; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.content.res.TypedArray; +import android.content.res.XmlResourceParser; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.os.Bundle; +import android.os.FileUtils; +import android.os.Handler; +import android.os.IBinder; +import android.os.Looper; +import android.os.Message; +import android.os.Messenger; +import android.os.Process; +import android.os.RemoteException; +import android.os.SystemClock; +import android.util.AttributeSet; +import android.util.DisplayMetrics; +import android.util.Log; +import android.util.Xml; +import android.view.LayoutInflater; + +public class TestService extends Service { + static final String TAG = "Perf"; + + final static Op[] mOpPairs = new Op[] { + new MethodCallOp(), new NoOp(), + new MethodCallOp(), new CpuOp(), + new MethodCallOp(), new SchedulerOp(), + new MethodCallOp(), new GcOp(), + new MethodCallOp(), new CreateFileOp(), + new MethodCallOp(), new CreateWriteFileOp(), + new MethodCallOp(), new CreateWriteSyncFileOp(), + new MethodCallOp(), new WriteFileOp(), + new MethodCallOp(), new ReadFileOp(), + new SchedulerOp(), new SchedulerOp(), + new GcOp(), new NoOp(), + new IpcOp(), new NoOp(), + new IpcOp(), new CpuOp(), + new IpcOp(), new SchedulerOp(), + new IpcOp(), new GcOp(), + new IpcOp(), new CreateFileOp(), + new IpcOp(), new CreateWriteFileOp(), + new IpcOp(), new CreateWriteSyncFileOp(), + new IpcOp(), new WriteFileOp(), + new IpcOp(), new ReadFileOp(), + new CreateFileOp(), new NoOp(), + new CreateWriteFileOp(), new NoOp(), + new CreateWriteSyncFileOp(), new NoOp(), + new WriteFileOp(), new NoOp(), + new ReadFileOp(), new NoOp(), + new WriteFileOp(), new CreateWriteFileOp(), + new ReadFileOp(), new CreateWriteFileOp(), + new WriteFileOp(), new CreateWriteSyncFileOp(), + new ReadFileOp(), new CreateWriteSyncFileOp(), + new WriteFileOp(), new WriteFileOp(), + new WriteFileOp(), new ReadFileOp(), + new ReadFileOp(), new WriteFileOp(), + new ReadFileOp(), new ReadFileOp(), + new OpenXmlResOp(), new NoOp(), + new ReadXmlAttrsOp(), new NoOp(), + new ParseXmlResOp(), new NoOp(), + new ParseLargeXmlResOp(), new NoOp(), + new LayoutInflaterOp(), new NoOp(), + new LayoutInflaterLargeOp(), new NoOp(), + new LayoutInflaterViewOp(), new NoOp(), + new LayoutInflaterButtonOp(), new NoOp(), + new LayoutInflaterImageButtonOp(), new NoOp(), + new CreateBitmapOp(), new NoOp(), + new CreateRecycleBitmapOp(), new NoOp(), + new LoadSmallBitmapOp(), new NoOp(), + new LoadRecycleSmallBitmapOp(), new NoOp(), + new LoadLargeBitmapOp(), new NoOp(), + new LoadRecycleLargeBitmapOp(), new NoOp(), + new LoadSmallScaledBitmapOp(), new NoOp(), + new LoadLargeScaledBitmapOp(), new NoOp(), + }; + + final static Op[] mAvailOps = new Op[] { + null, + new NoOp(), + new CpuOp(), + new SchedulerOp(), + new MethodCallOp(), + new IpcOp(), + new CreateFileOp(), + new CreateWriteFileOp(), + new CreateWriteSyncFileOp(), + new WriteFileOp(), + new ReadFileOp(), + new OpenXmlResOp(), + new ReadXmlAttrsOp(), + new ParseXmlResOp(), + new ParseLargeXmlResOp(), + new LayoutInflaterOp(), + new LayoutInflaterLargeOp(), + new LayoutInflaterViewOp(), + new LayoutInflaterButtonOp(), + new LayoutInflaterImageButtonOp(), + new CreateBitmapOp(), + new CreateRecycleBitmapOp(), + new LoadSmallBitmapOp(), + new LoadRecycleSmallBitmapOp(), + new LoadLargeBitmapOp(), + new LoadRecycleLargeBitmapOp(), + new LoadSmallScaledBitmapOp(), + new LoadLargeScaledBitmapOp(), + }; + + static final int CMD_START_TEST = 1; + static final int CMD_TERMINATE = 2; + + static final int RES_TEST_FINISHED = 1; + static final int RES_TERMINATED = 2; + + final Handler mHandler = new Handler() { + @Override public void handleMessage(Message msg) { + switch (msg.what) { + case CMD_START_TEST: { + Bundle bundle = (Bundle)msg.obj; + bundle.setClassLoader(getClassLoader()); + final TestArgs args = (TestArgs)bundle.getParcelable("args"); + final Messenger replyTo = msg.replyTo; + mRunner.run(this, args, new Runnable() { + @Override public void run() { + if (replyTo != null) { + Message msg = Message.obtain(null, RES_TEST_FINISHED); + Bundle bundle = new Bundle(); + bundle.putParcelable("res", new RunResult(mRunner)); + msg.obj = bundle; + try { + replyTo.send(msg); + } catch (RemoteException e) { + } + } + } + }); + } break; + case CMD_TERMINATE: { + if (msg.replyTo != null) { + Message reply = Message.obtain(null, RES_TERMINATED); + try { + msg.replyTo.send(reply); + } catch (RemoteException e) { + } + } + terminate(); + } + } + } + }; + + final TestRunner mRunner = new TestRunner(); + + @Override + public IBinder onBind(Intent intent) { + return (new Messenger(mHandler)).getBinder(); + } + + void terminate() { + Process.killProcess(Process.myPid()); + } + + enum BackgroundMode { + NOTHING, + CPU, + SCHEDULER + }; + + public class TestRunner { + Handler mHandler; + long mMaxRunTime; + Op mForegroundOp; + Op mBackgroundOp; + Runnable mDoneCallback; + + RunnerThread mBackgroundThread; + RunnerThread mForegroundThread; + long mStartTime; + + boolean mBackgroundRunning; + boolean mForegroundRunning; + + long mBackgroundEndTime; + long mBackgroundOps; + long mForegroundEndTime; + long mForegroundOps; + + public TestRunner() { + } + + public String getForegroundName() { + return mForegroundOp.getName(); + } + + public String getBackgroundName() { + return mBackgroundOp.getName(); + } + + public String getName() { + String fgName = mForegroundOp.getName(); + String bgName = mBackgroundOp.getName(); + StringBuilder res = new StringBuilder(); + if (fgName != null) { + res.append(fgName); + res.append("Fg"); + } + if (bgName != null) { + res.append(bgName); + res.append("Bg"); + } + return res.toString(); + } + + public String getForegroundLongName() { + return mForegroundOp.getLongName(); + } + + public String getBackgroundLongName() { + return mBackgroundOp.getLongName(); + } + + public void run(Handler handler, TestArgs args, Runnable doneCallback) { + mHandler = handler; + mMaxRunTime = args.maxTime; + if (args.combOp >= 0) { + mForegroundOp = mOpPairs[args.combOp]; + mBackgroundOp = mOpPairs[args.combOp+1]; + } else { + mForegroundOp = mAvailOps[args.fgOp]; + mBackgroundOp = mAvailOps[args.bgOp]; + } + mDoneCallback = doneCallback; + mBackgroundThread = new RunnerThread("background", new Runnable() { + @Override public void run() { + boolean running; + int ops = 0; + do { + running = mBackgroundOp.onRun(); + ops++; + } while (evalRepeat(running, true) && running); + mBackgroundEndTime = SystemClock.uptimeMillis(); + mBackgroundOps = ops * mBackgroundOp.getOpsPerRun(); + threadFinished(false); + } + }, Process.THREAD_PRIORITY_BACKGROUND); + mForegroundThread = new RunnerThread("background", new Runnable() { + @Override public void run() { + boolean running; + int ops = 0; + do { + running = mForegroundOp.onRun(); + ops++; + } while (evalRepeat(true, running) && running); + mForegroundEndTime = SystemClock.uptimeMillis(); + mForegroundOps = ops * mForegroundOp.getOpsPerRun(); + threadFinished(true); + } + }, Process.THREAD_PRIORITY_FOREGROUND); + + mForegroundOp.onInit(TestService.this, true); + mBackgroundOp.onInit(TestService.this, false); + + synchronized (this) { + mStartTime = SystemClock.uptimeMillis(); + mBackgroundRunning = true; + mForegroundRunning = true; + } + + mBackgroundThread.start(); + mForegroundThread.start(); + } + + public long getForegroundTime() { + return mForegroundEndTime-mStartTime; + } + + public long getForegroundOps() { + return mForegroundOps; + } + + public long getBackgroundTime() { + return mBackgroundEndTime-mStartTime; + } + + public long getBackgroundOps() { + return mBackgroundOps; + } + + private boolean evalRepeat(boolean bgRunning, boolean fgRunning) { + synchronized (this) { + if (!bgRunning) { + mBackgroundRunning = false; + } + if (!fgRunning) { + mForegroundRunning = false; + } + if (!mBackgroundRunning && !mForegroundRunning) { + return false; + } + long now = SystemClock.uptimeMillis(); + if (now > (mStartTime+mMaxRunTime)) { + return false; + } + return true; + } + } + + private void threadFinished(boolean foreground) { + synchronized (this) { + if (foreground) { + mForegroundRunning = false; + } else { + mBackgroundRunning = false; + } + if (!mBackgroundRunning && !mForegroundRunning) { + mHandler.post(new Runnable() { + @Override public void run() { + mForegroundOp.onTerm(TestService.this); + mBackgroundOp.onTerm(TestService.this); + if (mDoneCallback != null) { + mDoneCallback.run(); + } + } + }); + } + } + } + } + + class RunnerThread extends Thread { + private final Runnable mOp; + private final int mPriority; + + RunnerThread(String name, Runnable op, int priority) { + super(name); + mOp = op; + mPriority = priority; + } + + public void run() { + Process.setThreadPriority(mPriority); + mOp.run(); + } + } + + static public abstract class Op { + final String mName; + final String mLongName; + + public Op(String name, String longName) { + mName = name; + mLongName = longName; + } + + public String getName() { + return mName; + } + + public String getLongName() { + return mLongName; + } + + void onInit(Context context, boolean foreground) { + } + + abstract boolean onRun(); + + void onTerm(Context context) { + } + + int getOpsPerRun() { + return 1; + } + } + + static class NoOp extends Op { + NoOp() { + super(null, "Nothing"); + } + + boolean onRun() { + return false; + } + + int getOpsPerRun() { + return 0; + } + } + + static class CpuOp extends Op { + CpuOp() { + super("CPU", "Consume CPU"); + } + + boolean onRun() { + return true; + } + } + + static class SchedulerOp extends Op { + SchedulerOp() { + super("Sched", "Change scheduler group"); + } + + boolean onRun() { + Process.setThreadPriority(Process.THREAD_PRIORITY_FOREGROUND); + Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND); + return true; + } + } + + static class GcOp extends Op { + GcOp() { + super("Gc", "Run garbage collector"); + } + + boolean onRun() { + byte[] stuff = new byte[1024*1024]; + return true; + } + } + + static class MethodCallOp extends Op { + MethodCallOp() { + super("MethodCall", "Method call"); + } + + boolean onRun() { + final int N = getOpsPerRun(); + for (int i=0; i<N; i++) { + someFunc(i); + } + return true; + } + + int someFunc(int foo) { + return 0; + } + + int getOpsPerRun() { + return 500; + } + } + + static class IpcOp extends Op { + PackageManager mPm; + String mProcessName; + + IpcOp() { + super("Ipc", "IPC to system process"); + } + + void onInit(Context context, boolean foreground) { + mPm = context.getPackageManager(); + mProcessName = context.getApplicationInfo().processName; + } + + boolean onRun() { + final int N = getOpsPerRun(); + for (int i=0; i<N; i++) { + mPm.queryContentProviders(mProcessName, Process.myUid(), 0); + } + return true; + } + + int getOpsPerRun() { + return 100; + } + } + + static class OpenXmlResOp extends Op { + Context mContext; + + OpenXmlResOp() { + super("OpenXmlRes", "Open (and close) an XML resource"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + XmlResourceParser parser = mContext.getResources().getLayout(R.xml.simple); + parser.close(); + return true; + } + } + + static class ReadXmlAttrsOp extends Op { + Context mContext; + XmlResourceParser mParser; + AttributeSet mAttrs; + + ReadXmlAttrsOp() { + super("ReadXmlAttrs", "Read attributes from an XML tag"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + mParser = mContext.getResources().getLayout(R.xml.simple); + mAttrs = Xml.asAttributeSet(mParser); + + int eventType; + try { + // Find the first <item> tag. + eventType = mParser.getEventType(); + String tagName; + do { + if (eventType == XmlPullParser.START_TAG) { + tagName = mParser.getName(); + if (tagName.equals("item")) { + break; + } + } + eventType = mParser.next(); + } while (eventType != XmlPullParser.END_DOCUMENT); + } catch (XmlPullParserException e) { + throw new RuntimeException("I died", e); + } catch (IOException e) { + throw new RuntimeException("I died", e); + } + } + + void onTerm(Context context) { + mParser.close(); + } + + boolean onRun() { + TypedArray a = mContext.obtainStyledAttributes(mAttrs, + com.android.internal.R.styleable.MenuItem); + a.recycle(); + return true; + } + } + + static class ParseXmlResOp extends Op { + Context mContext; + + ParseXmlResOp() { + super("ParseXmlRes", "Parse compiled XML resource"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + SimpleInflater inf = new SimpleInflater(mContext); + inf.inflate(R.xml.simple); + return true; + } + } + + static class ParseLargeXmlResOp extends Op { + Context mContext; + + ParseLargeXmlResOp() { + super("ParseLargeXmlRes", "Parse large XML resource"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + SimpleInflater inf = new SimpleInflater(mContext); + inf.inflate(R.xml.simple_large); + return true; + } + } + + static class LayoutInflaterOp extends Op { + Context mContext; + + LayoutInflaterOp() { + super("LayoutInflater", "Inflate layout resource"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + if (Looper.myLooper() == null) { + Looper.prepare(); + } + LayoutInflater inf = (LayoutInflater)mContext.getSystemService( + Context.LAYOUT_INFLATER_SERVICE); + inf.inflate(R.layout.small_layout, null); + return true; + } + } + + static class LayoutInflaterLargeOp extends Op { + Context mContext; + + LayoutInflaterLargeOp() { + super("LayoutInflaterLarge", "Inflate large layout resource"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + if (Looper.myLooper() == null) { + Looper.prepare(); + } + LayoutInflater inf = (LayoutInflater)mContext.getSystemService( + Context.LAYOUT_INFLATER_SERVICE); + inf.inflate(R.layout.large_layout, null); + return true; + } + } + + static class LayoutInflaterViewOp extends Op { + Context mContext; + + LayoutInflaterViewOp() { + super("LayoutInflaterView", "Inflate layout with 50 View objects"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + if (Looper.myLooper() == null) { + Looper.prepare(); + } + LayoutInflater inf = (LayoutInflater)mContext.getSystemService( + Context.LAYOUT_INFLATER_SERVICE); + inf.inflate(R.layout.view_layout, null); + return true; + } + } + + static class LayoutInflaterButtonOp extends Op { + Context mContext; + + LayoutInflaterButtonOp() { + super("LayoutInflaterButton", "Inflate layout with 50 Button objects"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + if (Looper.myLooper() == null) { + Looper.prepare(); + } + LayoutInflater inf = (LayoutInflater)mContext.getSystemService( + Context.LAYOUT_INFLATER_SERVICE); + inf.inflate(R.layout.button_layout, null); + return true; + } + } + + static class LayoutInflaterImageButtonOp extends Op { + Context mContext; + + LayoutInflaterImageButtonOp() { + super("LayoutInflaterImageButton", "Inflate layout with 50 ImageButton objects"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + if (Looper.myLooper() == null) { + Looper.prepare(); + } + LayoutInflater inf = (LayoutInflater)mContext.getSystemService( + Context.LAYOUT_INFLATER_SERVICE); + inf.inflate(R.layout.image_button_layout, null); + return true; + } + } + + static class CreateBitmapOp extends Op { + Context mContext; + + CreateBitmapOp() { + super("CreateBitmap", "Create a Bitmap"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + BitmapFactory.Options opts = new BitmapFactory.Options(); + opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; + Bitmap bm = Bitmap.createBitmap(16, 16, Bitmap.Config.ARGB_8888); + return true; + } + } + + static class CreateRecycleBitmapOp extends Op { + Context mContext; + + CreateRecycleBitmapOp() { + super("CreateRecycleBitmap", "Create and recycle a Bitmap"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + BitmapFactory.Options opts = new BitmapFactory.Options(); + opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; + Bitmap bm = Bitmap.createBitmap(16, 16, Bitmap.Config.ARGB_8888); + bm.recycle(); + return true; + } + } + + static class LoadSmallBitmapOp extends Op { + Context mContext; + + LoadSmallBitmapOp() { + super("LoadSmallBitmap", "Load small raw bitmap"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + BitmapFactory.Options opts = new BitmapFactory.Options(); + opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; + Bitmap bm = BitmapFactory.decodeResource(mContext.getResources(), + R.drawable.stat_sample, opts); + return true; + } + } + + static class LoadRecycleSmallBitmapOp extends Op { + Context mContext; + + LoadRecycleSmallBitmapOp() { + super("LoadRecycleSmallBitmap", "Load and recycle small raw bitmap"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + BitmapFactory.Options opts = new BitmapFactory.Options(); + opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; + Bitmap bm = BitmapFactory.decodeResource(mContext.getResources(), + R.drawable.stat_sample, opts); + bm.recycle(); + return true; + } + } + + static class LoadLargeBitmapOp extends Op { + Context mContext; + + LoadLargeBitmapOp() { + super("LoadLargeBitmap", "Load large raw bitmap"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + BitmapFactory.Options opts = new BitmapFactory.Options(); + opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; + Bitmap bm = BitmapFactory.decodeResource(mContext.getResources(), + R.drawable.wallpaper_goldengate, opts); + return true; + } + } + + static class LoadRecycleLargeBitmapOp extends Op { + Context mContext; + + LoadRecycleLargeBitmapOp() { + super("LoadRecycleLargeBitmap", "Load and recycle large raw bitmap"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + BitmapFactory.Options opts = new BitmapFactory.Options(); + opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; + Bitmap bm = BitmapFactory.decodeResource(mContext.getResources(), + R.drawable.wallpaper_goldengate, opts); + bm.recycle(); + return true; + } + } + + static class LoadSmallScaledBitmapOp extends Op { + Context mContext; + + LoadSmallScaledBitmapOp() { + super("LoadSmallScaledBitmap", "Load small raw bitmap that is scaled for density"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + BitmapFactory.Options opts = new BitmapFactory.Options(); + opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; + Bitmap bm = BitmapFactory.decodeResource(mContext.getResources(), + R.drawable.stat_sample_scale, opts); + return true; + } + } + + static class LoadLargeScaledBitmapOp extends Op { + Context mContext; + + LoadLargeScaledBitmapOp() { + super("LoadLargeScaledBitmap", "Load large raw bitmap that is scaled for density"); + } + + void onInit(Context context, boolean foreground) { + mContext = context; + } + + boolean onRun() { + BitmapFactory.Options opts = new BitmapFactory.Options(); + opts.inScreenDensity = DisplayMetrics.DENSITY_DEVICE; + Bitmap bm = BitmapFactory.decodeResource(mContext.getResources(), + R.drawable.wallpaper_goldengate_scale, opts); + return true; + } + } + + static class CreateFileOp extends Op { + File mFile; + + CreateFileOp() { + super("CreateFile", "Create and delete a file"); + } + + void onInit(Context context, boolean foreground) { + mFile = context.getFileStreamPath(foreground ? "test-fg.file" : "test-bg.file"); + mFile.delete(); + } + + boolean onRun() { + try { + mFile.createNewFile(); + } catch (IOException e) { + Log.w(TAG, "Failure creating " + mFile, e); + } + mFile.delete(); + return true; + } + } + + static class CreateWriteFileOp extends Op { + File mFile; + + CreateWriteFileOp() { + super("CreateWriteFile", "Create, write, and delete a file"); + } + + void onInit(Context context, boolean foreground) { + mFile = context.getFileStreamPath(foreground ? "test-fg.file" : "test-bg.file"); + mFile.delete(); + } + + boolean onRun() { + try { + FileOutputStream fos = new FileOutputStream(mFile); + fos.write(1); + fos.close(); + } catch (IOException e) { + Log.w(TAG, "Failure creating " + mFile, e); + } + mFile.delete(); + return true; + } + } + + static class CreateWriteSyncFileOp extends Op { + File mFile; + + CreateWriteSyncFileOp() { + super("CreateWriteSyncFile", "Create, write, sync, and delete a file"); + } + + void onInit(Context context, boolean foreground) { + mFile = context.getFileStreamPath(foreground ? "test-fg.file" : "test-bg.file"); + mFile.delete(); + } + + boolean onRun() { + try { + FileOutputStream fos = new FileOutputStream(mFile); + fos.write(1); + fos.flush(); + FileUtils.sync(fos); + fos.close(); + } catch (IOException e) { + Log.w(TAG, "Failure creating " + mFile, e); + } + mFile.delete(); + return true; + } + } + + static class WriteFileOp extends Op { + File mFile; + RandomAccessFile mRAF; + byte[] mBuffer; + + WriteFileOp() { + super("WriteFile", "Truncate and write a 64k file"); + } + + void onInit(Context context, boolean foreground) { + mBuffer = new byte[1024*64]; + for (int i=0; i<mBuffer.length; i++) { + mBuffer[i] = (byte)i; + } + mFile = context.getFileStreamPath(foreground ? "test-fg.file" : "test-bg.file"); + mFile.delete(); + try { + mRAF = new RandomAccessFile(mFile, "rw"); + } catch (FileNotFoundException e) { + Log.w(TAG, "Failure creating " + mFile, e); + } + } + + boolean onRun() { + try { + mRAF.seek(0); + mRAF.setLength(0); + mRAF.write(mBuffer); + } catch (IOException e) { + Log.w(TAG, "Failure writing " + mFile, e); + } + return true; + } + + void onTerm(Context context) { + try { + mRAF.close(); + } catch (IOException e) { + Log.w(TAG, "Failure closing " + mFile, e); + } + mFile.delete(); + } + } + + static class ReadFileOp extends Op { + File mFile; + RandomAccessFile mRAF; + byte[] mBuffer; + + ReadFileOp() { + super("ReadFile", "Seek and read a 64k file"); + } + + void onInit(Context context, boolean foreground) { + mBuffer = new byte[1024*64]; + for (int i=0; i<mBuffer.length; i++) { + mBuffer[i] = (byte)i; + } + mFile = context.getFileStreamPath(foreground ? "test-fg.file" : "test-bg.file"); + mFile.delete(); + try { + mRAF = new RandomAccessFile(mFile, "rw"); + mRAF.seek(0); + mRAF.setLength(0); + mRAF.write(mBuffer); + } catch (IOException e) { + Log.w(TAG, "Failure creating " + mFile, e); + } + } + + boolean onRun() { + try { + mRAF.seek(0); + mRAF.read(mBuffer); + } catch (IOException e) { + Log.w(TAG, "Failure reading " + mFile, e); + } + return true; + } + + void onTerm(Context context) { + try { + mRAF.close(); + } catch (IOException e) { + Log.w(TAG, "Failure closing " + mFile, e); + } + mFile.delete(); + } + } +} |