Merge "Put Log.wtf's terrible failure in logcat -b main."
diff --git a/core/java/android/content/SyncManager.java b/core/java/android/content/SyncManager.java
index e07dbb8..599429b 100644
--- a/core/java/android/content/SyncManager.java
+++ b/core/java/android/content/SyncManager.java
@@ -17,7 +17,6 @@
package android.content;
import android.os.Bundle;
-import android.os.Debug;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
@@ -246,6 +245,7 @@
Log.v(TAG, "received connectivity action. network info: " + networkInfo);
}
+ final boolean wasConnected = mDataConnectionIsConnected;
// only pay attention to the CONNECTED and DISCONNECTED states.
// if connected, we are connected.
// if disconnected, we may not be connected. in some cases, we may be connected on
@@ -259,16 +259,19 @@
mDataConnectionIsConnected = true;
break;
case DISCONNECTED:
- if (intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false)) {
- mDataConnectionIsConnected = false;
- } else {
- mDataConnectionIsConnected = true;
- }
+ mDataConnectionIsConnected = !intent.getBooleanExtra(
+ ConnectivityManager.EXTRA_NO_CONNECTIVITY, false);
break;
default:
// ignore the rest of the states -- leave our boolean alone.
}
if (mDataConnectionIsConnected) {
+ if (!wasConnected) {
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "Reconnection detected: clearing all backoffs");
+ }
+ mSyncStorageEngine.clearAllBackoffs();
+ }
sendCheckAlarmsMessage();
}
}
diff --git a/core/java/android/content/SyncStorageEngine.java b/core/java/android/content/SyncStorageEngine.java
index 4a4edd2..c8ca6189 100644
--- a/core/java/android/content/SyncStorageEngine.java
+++ b/core/java/android/content/SyncStorageEngine.java
@@ -525,6 +525,33 @@
}
}
+ public void clearAllBackoffs() {
+ boolean changed = false;
+ synchronized (mAuthorities) {
+ for (AccountInfo accountInfo : mAccounts.values()) {
+ for (AuthorityInfo authorityInfo : accountInfo.authorities.values()) {
+ if (authorityInfo.backoffTime != NOT_IN_BACKOFF_MODE
+ || authorityInfo.backoffDelay != NOT_IN_BACKOFF_MODE) {
+ if (Log.isLoggable(TAG, Log.VERBOSE)) {
+ Log.v(TAG, "clearAllBackoffs:"
+ + " authority:" + authorityInfo.authority
+ + " account:" + accountInfo.account.name
+ + " backoffTime was: " + authorityInfo.backoffTime
+ + " backoffDelay was: " + authorityInfo.backoffDelay);
+ }
+ authorityInfo.backoffTime = NOT_IN_BACKOFF_MODE;
+ authorityInfo.backoffDelay = NOT_IN_BACKOFF_MODE;
+ changed = true;
+ }
+ }
+ }
+ }
+
+ if (changed) {
+ reportChange(ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS);
+ }
+ }
+
public void setDelayUntilTime(Account account, String providerName, long delayUntil) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "setDelayUntil: " + account + ", provider " + providerName
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 5f47a2d..bbfcc08 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -432,8 +432,10 @@
* to further, which slows down the refresh rate. Choose 50 to favor the
* current high speed devices. For Dream like devices, 100 is a better
* choice. Maybe make this in the buildspec later.
+ * (Update 12/14/2010: changed to 0 since current device should be able to
+ * handle the raw events and Map team voted to have the raw events too.
*/
- private static final int TOUCH_SENT_INTERVAL = 50;
+ private static final int TOUCH_SENT_INTERVAL = 0;
private int mCurrentTouchInterval = TOUCH_SENT_INTERVAL;
/**
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index cbd98b9..6309cac 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -1464,7 +1464,7 @@
SavedState ss = new SavedState(superState);
- boolean haveChildren = getChildCount() > 0;
+ boolean haveChildren = getChildCount() > 0 && mItemCount > 0;
long selectedId = getSelectedItemId();
ss.selectedId = selectedId;
ss.height = getHeight();
@@ -1479,8 +1479,12 @@
// Remember the position of the first child
View v = getChildAt(0);
ss.viewTop = v.getTop();
- ss.position = mFirstPosition;
- ss.firstId = mAdapter.getItemId(mFirstPosition);
+ int firstPos = mFirstPosition;
+ if (firstPos >= mItemCount) {
+ firstPos = mItemCount - 1;
+ }
+ ss.position = firstPos;
+ ss.firstId = mAdapter.getItemId(firstPos);
} else {
ss.viewTop = 0;
ss.firstId = INVALID_POSITION;
diff --git a/core/java/android/widget/DayPicker.java b/core/java/android/widget/DayPicker.java
index e804022..cdf51f7 100644
--- a/core/java/android/widget/DayPicker.java
+++ b/core/java/android/widget/DayPicker.java
@@ -1091,34 +1091,23 @@
*/
public static final String VIEW_PARAMS_SHOW_WK_NUM = "show_wk_num";
- protected int mDefaultHeight = 32;
-
- protected int mMinHeight = 10;
-
- protected static final int DEFAULT_SELECTED_DAY = -1;
-
- protected static final int DEFAULT_WEEK_START = Calendar.SUNDAY;
-
- protected static final int DEFAULT_NUM_DAYS = 7;
-
protected static final int DEFAULT_SHOW_WK_NUM = 0;
- protected static final int DEFAULT_FOCUS_MONTH = -1;
+ protected final int mWeekSeperatorWidth;
- protected static final int DAY_SEPARATOR_WIDTH = 1;
+ protected final int mNumberTextSize;
- protected int mNumberTextSize = 14;
-
- // affects the padding on the sides of this view
- protected int mPadding = 0;
+ protected final int mWeekDayPadding;
protected final Rect mTempRect = new Rect();
protected final Paint mDrawPaint = new Paint();
- protected Paint mMonthNumDrawPaint = new Paint();
+ protected final Paint mMonthNumDrawPaint = new Paint();
- protected Drawable mSelectedDayLine;
+ protected final Drawable mSelectedDayLine;
+
+ protected final int mSelectedDayLineWidth;
protected final int mSelectionBackgroundColor;
@@ -1130,6 +1119,8 @@
protected final int mWeekNumberColor;
+ protected final int mFirstDayOfweek;
+
// Cache the number strings so we don't have to recompute them each time
protected String[] mDayNumbers;
@@ -1153,22 +1144,19 @@
protected int mWidth;
// The height this view should draw at in pixels, set by height param
- protected int mHeight = mDefaultHeight;
-
- // Whether the week number should be shown
- protected boolean mShowWeekNum = false;
+ protected int mHeight;
// If this view contains the selected day
protected boolean mHasSelectedDay = false;
// Which day is selected [0-6] or -1 if no day is selected
- protected int mSelectedDay = DEFAULT_SELECTED_DAY;
+ protected int mSelectedDay = -1;
// How many days to display
- protected int mNumDays = DEFAULT_NUM_DAYS;
+ protected int mWeekDayCount;
// The number of days + a spot for week number if it is displayed
- protected int mNumCells = mNumDays;
+ protected int mNumCells;
// The left edge of the selected day
protected int mSelectedLeft = -1;
@@ -1183,7 +1171,20 @@
context.getTheme().resolveAttribute(R.attr.dayPickerWeekViewStyle, outTypedValue, true);
TypedArray attributesArray = context.obtainStyledAttributes(outTypedValue.resourceId,
R.styleable.DayPickerWeekView);
-
+ mHeight = attributesArray.getDimensionPixelSize(R.styleable.DayPickerWeekView_height,
+ 26);
+ mNumberTextSize = attributesArray.getDimensionPixelSize(
+ R.styleable.DayPickerWeekView_textSize, 14);
+ mFirstDayOfweek = attributesArray.getInt(R.styleable.DayPickerWeekView_weekStartDay,
+ Calendar.SUNDAY);
+ mNumCells = mWeekDayCount = attributesArray.getInt(
+ R.styleable.DayPickerWeekView_weekDayCount, 7);
+ mShowWeekNumber = attributesArray.getBoolean(R.styleable.DayPickerWeekView_weekDayCount,
+ true);
+ mWeekSeperatorWidth = attributesArray.getDimensionPixelSize(
+ R.styleable.DayPickerWeekView_weekSeperatorWidth, 1);
+ mWeekDayPadding = attributesArray.getDimensionPixelSize(
+ R.styleable.DayPickerWeekView_weekDayPadding, 0);
mSelectionBackgroundColor = attributesArray.getColor(
R.styleable.DayPickerWeekView_selectionBackgroundColor, 0);
mFocusedMonthDateColor = attributesArray.getColor(
@@ -1196,17 +1197,10 @@
R.styleable.DayPickerWeekView_weekNumberColor, 0);
mSelectedDayLine = attributesArray
.getDrawable(R.styleable.DayPickerWeekView_selectedDayLine);
+ mSelectedDayLineWidth = attributesArray.getDimensionPixelSize(
+ R.styleable.DayPickerWeekView_selectedDayLineWidth, 6);
attributesArray.recycle();
- if (sScale == 0) {
- sScale = context.getResources().getDisplayMetrics().density;
- if (sScale != 1) {
- mDefaultHeight *= sScale;
- mMinHeight *= sScale;
- mNumberTextSize *= sScale;
- }
- }
-
// Sets up any standard paints that will be used
setPaintProperties();
}
@@ -1231,26 +1225,23 @@
// We keep the current value for any params not present
if (params.containsKey(VIEW_PARAMS_HEIGHT)) {
mHeight = ((int[]) params.get(VIEW_PARAMS_HEIGHT))[0];
- if (mHeight < mMinHeight) {
- mHeight = mMinHeight;
- }
}
if (params.containsKey(VIEW_PARAMS_SELECTED_DAY)) {
mSelectedDay = ((int[]) params.get(VIEW_PARAMS_SELECTED_DAY))[0];
}
mHasSelectedDay = mSelectedDay != -1;
if (params.containsKey(VIEW_PARAMS_NUM_DAYS)) {
- mNumDays = ((int[]) params.get(VIEW_PARAMS_NUM_DAYS))[0];
+ mWeekDayCount = ((int[]) params.get(VIEW_PARAMS_NUM_DAYS))[0];
}
if (params.containsKey(VIEW_PARAMS_SHOW_WK_NUM)) {
if (((int[]) params.get(VIEW_PARAMS_SHOW_WK_NUM))[0] != 0) {
- mNumCells = mNumDays + 1;
- mShowWeekNum = true;
+ mNumCells = mWeekDayCount + 1;
+ mShowWeekNumber = true;
} else {
- mShowWeekNum = false;
+ mShowWeekNumber = false;
}
} else {
- mNumCells = mShowWeekNum ? mNumDays + 1 : mNumDays;
+ mNumCells = mShowWeekNumber ? mWeekDayCount + 1 : mWeekDayCount;
}
mWeek = ((int[]) params.get(VIEW_PARAMS_WEEK))[0];
mTempCalendar.clear();
@@ -1259,7 +1250,7 @@
if (params.containsKey(VIEW_PARAMS_WEEK_START)) {
mTempCalendar.setFirstDayOfWeek(((int[]) params.get(VIEW_PARAMS_WEEK_START))[0]);
} else {
- mTempCalendar.setFirstDayOfWeek(DEFAULT_WEEK_START);
+ mTempCalendar.setFirstDayOfWeek(Calendar.SUNDAY);
}
// Allocate space for caching the day numbers and focus values
@@ -1268,7 +1259,7 @@
// If we're showing the week number calculate it based on Monday
int i = 0;
- if (mShowWeekNum) {
+ if (mShowWeekNumber) {
mDayNumbers[0] = Integer.toString(mTempCalendar.get(Calendar.WEEK_OF_YEAR));
i++;
}
@@ -1282,7 +1273,7 @@
mMonthOfFirstWeekDay = mTempCalendar.get(Calendar.MONTH);
int focusMonth = params.containsKey(VIEW_PARAMS_FOCUS_MONTH) ? ((int[]) params
- .get(VIEW_PARAMS_FOCUS_MONTH))[0] : DEFAULT_FOCUS_MONTH;
+ .get(VIEW_PARAMS_FOCUS_MONTH))[0] : -1;
for (; i < mNumCells; i++) {
mFocusDay[i] = (mTempCalendar.get(Calendar.MONTH) == focusMonth);
@@ -1348,7 +1339,7 @@
* Returns the number of days this view will display.
*/
public int getNumDays() {
- return mNumDays;
+ return mWeekDayCount;
}
/**
@@ -1358,13 +1349,15 @@
* @param x The x position of the touch eventy
*/
public void getDayFromLocation(float x, Calendar outCalendar) {
- int dayStart = mShowWeekNum ? (mWidth - mPadding * 2) / mNumCells + mPadding : mPadding;
- if (x < dayStart || x > mWidth - mPadding) {
+ int dayStart = mShowWeekNumber ? (mWidth - mWeekDayPadding * 2) / mNumCells
+ + mWeekDayPadding : mWeekDayPadding;
+ if (x < dayStart || x > mWidth - mWeekDayPadding) {
outCalendar.set(0, 0, 0, 0, 0, 0);
return;
}
// Selection is (x - start) / (pixels/day) == (x -s) * day / pixels
- int dayPosition = (int) ((x - dayStart) * mNumDays / (mWidth - dayStart - mPadding));
+ int dayPosition = (int) ((x - dayStart) * mWeekDayCount
+ / (mWidth - dayStart - mWeekDayPadding));
outCalendar.setTimeZone(mFirstDay.getTimeZone());
outCalendar.setTimeInMillis(mFirstDay.getTimeInMillis());
outCalendar.add(Calendar.DAY_OF_MONTH, dayPosition);
@@ -1375,6 +1368,7 @@
drawBackground(canvas);
drawWeekNums(canvas);
drawDaySeparators(canvas);
+ drawSelectedDayLines(canvas);
}
/**
@@ -1390,15 +1384,15 @@
}
mDrawPaint.setColor(mSelectionBackgroundColor);
- mTempRect.top = DAY_SEPARATOR_WIDTH;
+ mTempRect.top = mWeekSeperatorWidth;
mTempRect.bottom = mHeight;
- mTempRect.left = mShowWeekNum ? mPadding + (mWidth - mPadding * 2) / mNumCells
- : mPadding;
+ mTempRect.left = mShowWeekNumber ? mWeekDayPadding + (mWidth - mWeekDayPadding * 2)
+ / mNumCells : mWeekDayPadding;
mTempRect.right = mSelectedLeft - 2;
canvas.drawRect(mTempRect, mDrawPaint);
mTempRect.left = mSelectedRight + 3;
- mTempRect.right = mWidth - mPadding;
+ mTempRect.right = mWidth - mWeekDayPadding;
canvas.drawRect(mTempRect, mDrawPaint);
}
@@ -1410,22 +1404,22 @@
*/
protected void drawWeekNums(Canvas canvas) {
float textHeight = mDrawPaint.getTextSize();
- int y = (int) ((mHeight + textHeight) / 2) - DAY_SEPARATOR_WIDTH;
+ int y = (int) ((mHeight + textHeight) / 2) - mWeekSeperatorWidth;
int nDays = mNumCells;
mDrawPaint.setTextAlign(Align.CENTER);
int i = 0;
int divisor = 2 * nDays;
- if (mShowWeekNum) {
+ if (mShowWeekNumber) {
mDrawPaint.setColor(mWeekNumberColor);
- int x = (mWidth - mPadding * 2) / divisor + mPadding;
+ int x = (mWidth - mWeekDayPadding * 2) / divisor + mWeekDayPadding;
canvas.drawText(mDayNumbers[0], x, y, mDrawPaint);
i++;
}
for (; i < nDays; i++) {
mMonthNumDrawPaint.setColor(mFocusDay[i] ? mFocusedMonthDateColor
: mOtherMonthDateColor);
- int x = (2 * i + 1) * (mWidth - mPadding * 2) / divisor + mPadding;
+ int x = (2 * i + 1) * (mWidth - mWeekDayPadding * 2) / divisor + mWeekDayPadding;
canvas.drawText(mDayNumbers[i], x, y, mMonthNumDrawPaint);
}
}
@@ -1434,22 +1428,41 @@
* Draws a horizontal line for separating the weeks. Override this
* method if you want custom separators.
*
- * @param canvas The canvas to draw on
+ * @param canvas The canvas to draw on.
*/
protected void drawDaySeparators(Canvas canvas) {
- mDrawPaint.setColor(mGridLinesColor);
- mDrawPaint.setStrokeWidth(DAY_SEPARATOR_WIDTH);
- float x = mShowWeekNum ? mPadding + (mWidth - mPadding * 2) / mNumCells : mPadding;
- canvas.drawLine(x, 0, mWidth - mPadding, 0, mDrawPaint);
-
- if (mHasSelectedDay) {
- mSelectedDayLine.setBounds(mSelectedLeft - 2, DAY_SEPARATOR_WIDTH,
- mSelectedLeft + 4, mHeight + 1);
- mSelectedDayLine.draw(canvas);
- mSelectedDayLine.setBounds(mSelectedRight - 3, DAY_SEPARATOR_WIDTH,
- mSelectedRight + 3, mHeight + 1);
- mSelectedDayLine.draw(canvas);
+ // If it is the topmost fully visible child do not draw separator line
+ int firstFullyVisiblePosition = mListView.getFirstVisiblePosition();
+ if (mListView.getChildAt(0).getTop() < 0) {
+ firstFullyVisiblePosition++;
}
+ if (firstFullyVisiblePosition == mWeek) {
+ return;
+ }
+ mDrawPaint.setColor(mGridLinesColor);
+ mDrawPaint.setStrokeWidth(mWeekSeperatorWidth);
+ float x = mShowWeekNumber ? mWeekDayPadding + (mWidth - mWeekDayPadding * 2) / mNumCells
+ : mWeekDayPadding;
+ canvas.drawLine(x, 0, mWidth - mWeekDayPadding, 0, mDrawPaint);
+ }
+
+ /**
+ * Draws the selected day lines if this week has a selected day.
+ *
+ * @param canvas The canvas to draw on
+ */
+ protected void drawSelectedDayLines(Canvas canvas) {
+ if (!mHasSelectedDay) {
+ return;
+ }
+ mSelectedDayLine.setBounds(mSelectedLeft - mSelectedDayLineWidth / 2,
+ mWeekSeperatorWidth,
+ mSelectedLeft + mSelectedDayLineWidth / 2, mHeight);
+ mSelectedDayLine.draw(canvas);
+ mSelectedDayLine.setBounds(mSelectedRight - mSelectedDayLineWidth / 2,
+ mWeekSeperatorWidth,
+ mSelectedRight + mSelectedDayLineWidth / 2, mHeight);
+ mSelectedDayLine.draw(canvas);
}
@Override
@@ -1467,12 +1480,13 @@
if (selectedPosition < 0) {
selectedPosition += 7;
}
- if (mShowWeekNum) {
+ if (mShowWeekNumber) {
selectedPosition++;
}
- mSelectedLeft = selectedPosition * (mWidth - mPadding * 2) / mNumCells + mPadding;
- mSelectedRight = (selectedPosition + 1) * (mWidth - mPadding * 2) / mNumCells
- + mPadding;
+ mSelectedLeft = selectedPosition * (mWidth - mWeekDayPadding * 2) / mNumCells
+ + mWeekDayPadding;
+ mSelectedRight = (selectedPosition + 1) * (mWidth - mWeekDayPadding * 2) / mNumCells
+ + mWeekDayPadding;
}
}
diff --git a/core/java/android/widget/NumberPicker.java b/core/java/android/widget/NumberPicker.java
index 4766c53..7b35b51 100644
--- a/core/java/android/widget/NumberPicker.java
+++ b/core/java/android/widget/NumberPicker.java
@@ -1188,16 +1188,12 @@
/**
* @return The wrapped index <code>selectorIndex</code> value.
- * <p>
- * Note: The absolute value of the argument is never larger than
- * mEnd - mStart.
- * </p>
*/
private int getWrappedSelectorIndex(int selectorIndex) {
if (selectorIndex > mEnd) {
- return mStart + selectorIndex - mEnd - 1;
+ return mStart + (selectorIndex - mEnd) % (mEnd - mStart);
} else if (selectorIndex < mStart) {
- return mEnd + selectorIndex - mStart + 1;
+ return mEnd - (mStart - selectorIndex) % (mEnd - mStart);
}
return selectorIndex;
}
diff --git a/core/java/android/widget/StackView.java b/core/java/android/widget/StackView.java
index 8b2f166..11bdd65 100644
--- a/core/java/android/widget/StackView.java
+++ b/core/java/android/widget/StackView.java
@@ -245,7 +245,7 @@
private void transformViewAtIndex(int index, View view) {
float maxPerspectiveShiftY = getMeasuredHeight() * PERSPECTIVE_SHIFT_FACTOR_Y;
- float maxPerspectiveShiftX = getMeasuredHeight() * PERSPECTIVE_SHIFT_FACTOR_X;
+ float maxPerspectiveShiftX = getMeasuredWidth() * PERSPECTIVE_SHIFT_FACTOR_X;
index = mMaxNumActiveViews - index - 1;
if (index == mMaxNumActiveViews - 1) index--;
diff --git a/core/java/com/android/internal/widget/LockPatternView.java b/core/java/com/android/internal/widget/LockPatternView.java
index f80fbd8..bee8112 100644
--- a/core/java/com/android/internal/widget/LockPatternView.java
+++ b/core/java/com/android/internal/widget/LockPatternView.java
@@ -51,6 +51,7 @@
* "correct" states.
*/
public class LockPatternView extends View {
+ private static final String TAG = "LockPatternView";
// Aspect to use when rendering this view
private static final int ASPECT_SQUARE = 0; // View will be the minimum of width/height
private static final int ASPECT_LOCK_WIDTH = 1; // Fixed width; height will be minimum of (w,h)
@@ -293,7 +294,7 @@
try {
pattern = getResources().getIntArray(id);
} catch (Resources.NotFoundException e) {
- Log.e("LockPatternView", "Vibrate pattern missing, using default", e);
+ Log.e(TAG, "Vibrate pattern missing, using default", e);
}
if (pattern == null) {
return DEFAULT_VIBE_PATTERN;
@@ -444,25 +445,47 @@
mSquareHeight = height / 3.0f;
}
+ private int resolveMeasured(int measureSpec, int desired)
+ {
+ int result = 0;
+ int specSize = MeasureSpec.getSize(measureSpec);
+ switch (MeasureSpec.getMode(measureSpec)) {
+ case MeasureSpec.UNSPECIFIED:
+ result = desired;
+ break;
+ case MeasureSpec.AT_MOST:
+ result = Math.min(specSize, desired);
+ break;
+ case MeasureSpec.EXACTLY:
+ default:
+ result = specSize;
+ }
+ return result;
+ }
+
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
- final int width = MeasureSpec.getSize(widthMeasureSpec);
- final int height = MeasureSpec.getSize(heightMeasureSpec);
- int viewWidth = width;
- int viewHeight = height;
+ final int minimumWidth = 3 * mBitmapCircleDefault.getWidth();
+ final int minimumHeight = 3 * mBitmapCircleDefault.getHeight();
+ int viewWidth = resolveMeasured(widthMeasureSpec, minimumWidth);
+ int viewHeight = resolveMeasured(heightMeasureSpec, minimumHeight);
+
+ int requestedWidth = MeasureSpec.getSize(widthMeasureSpec);
+ int requestedHeight = MeasureSpec.getSize(heightMeasureSpec);
switch (mAspect) {
case ASPECT_SQUARE:
- viewWidth = viewHeight = Math.min(width, height);
+ viewWidth = viewHeight = Math.min(requestedWidth, requestedHeight);
break;
case ASPECT_LOCK_WIDTH:
- viewWidth = width;
- viewHeight = Math.min(width, height);
+ viewWidth = requestedWidth;
+ viewHeight = Math.min(requestedWidth, requestedHeight);
break;
case ASPECT_LOCK_HEIGHT:
- viewWidth = Math.min(width, height);
- viewHeight = height;
+ viewWidth = Math.min(requestedWidth, requestedHeight);
+ viewHeight = requestedHeight;
break;
}
+ // Log.v(TAG, "LockPatternView dimensions: " + viewWidth + "x" + viewHeight);
setMeasuredDimension(viewWidth, viewHeight);
}
diff --git a/core/java/com/android/internal/widget/WaveView.java b/core/java/com/android/internal/widget/WaveView.java
index e9fa06e..4cb3966 100644
--- a/core/java/com/android/internal/widget/WaveView.java
+++ b/core/java/com/android/internal/widget/WaveView.java
@@ -62,6 +62,7 @@
private static final long RESET_TIMEOUT = 3000; // elapsed time of inactivity before we reset
private static final long DELAY_INCREMENT = 15; // increment per wave while tracking motion
private static final long DELAY_INCREMENT2 = 12; // increment per wave while not tracking
+ private static final long WAVE_DELAY = WAVE_DURATION / WAVE_COUNT; // initial propagation delay
private Vibrator mVibrator;
private OnTriggerListener mOnTriggerListener;
@@ -70,9 +71,8 @@
private boolean mFingerDown = false;
private float mRingRadius = 182.0f; // Radius of bitmap ring. Used to snap halo to it
private int mSnapRadius = 136; // minimum threshold for drag unlock
- private int mWaveDelay = 240; // time to delay
private int mWaveCount = WAVE_COUNT; // number of waves
- private long mWaveTimerDelay = mWaveDelay;
+ private long mWaveTimerDelay = WAVE_DELAY;
private int mCurrentWave = 0;
private float mLockCenterX; // center of widget as dictated by widget size
private float mLockCenterY;
@@ -190,7 +190,7 @@
switch (mLockState) {
case STATE_RESET_LOCK:
if (DBG) Log.v(TAG, "State RESET_LOCK");
- mWaveTimerDelay = mWaveDelay;
+ mWaveTimerDelay = WAVE_DELAY;
for (int i = 0; i < mLightWaves.size(); i++) {
//TweenMax.to(mLightWave.get(i), .3, {alpha:0, ease:Quint.easeOut});
DrawableHolder holder = mLightWaves.get(i);
@@ -445,7 +445,7 @@
double distY = mMouseY - mLockCenterY;
int dragDistance = (int) Math.ceil(Math.hypot(distX, distY));
if (mLockState == STATE_ATTEMPTING && dragDistance < mSnapRadius
- && mWaveTimerDelay >= mWaveDelay) {
+ && mWaveTimerDelay >= WAVE_DELAY) {
mWaveTimerDelay = Math.min(WAVE_DURATION, mWaveTimerDelay + DELAY_INCREMENT);
DrawableHolder wave = mLightWaves.get(mCurrentWave);
diff --git a/core/res/res/drawable-hdpi/day_picker_week_view_dayline_holo_dark.9.png b/core/res/res/drawable-hdpi/day_picker_week_view_dayline_holo_dark.9.png
new file mode 100644
index 0000000..2edae8f
--- /dev/null
+++ b/core/res/res/drawable-hdpi/day_picker_week_view_dayline_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/day_picker_week_view_dayline_holo_light.9.png b/core/res/res/drawable-hdpi/day_picker_week_view_dayline_holo_light.9.png
new file mode 100644
index 0000000..2edae8f
--- /dev/null
+++ b/core/res/res/drawable-hdpi/day_picker_week_view_dayline_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/day_picker_week_view_dayline_holo_dark.9.png b/core/res/res/drawable-mdpi/day_picker_week_view_dayline_holo_dark.9.png
new file mode 100644
index 0000000..a8cfd77
--- /dev/null
+++ b/core/res/res/drawable-mdpi/day_picker_week_view_dayline_holo_dark.9.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/day_picker_week_view_dayline_holo_light.9.png b/core/res/res/drawable-mdpi/day_picker_week_view_dayline_holo_light.9.png
new file mode 100644
index 0000000..a8cfd77
--- /dev/null
+++ b/core/res/res/drawable-mdpi/day_picker_week_view_dayline_holo_light.9.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/btn_code_lock_default.png b/core/res/res/drawable-xlarge-mdpi/btn_code_lock_default.png
new file mode 100644
index 0000000..eb4e0be
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/btn_code_lock_default.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/btn_code_lock_touched.png b/core/res/res/drawable-xlarge-mdpi/btn_code_lock_touched.png
new file mode 100644
index 0000000..e56ae5b
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/btn_code_lock_touched.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_drag_direction_green_up.png b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_drag_direction_green_up.png
new file mode 100644
index 0000000..8c3e363
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_drag_direction_green_up.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_drag_direction_red_up.png b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_drag_direction_red_up.png
new file mode 100644
index 0000000..7b3e41b
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_drag_direction_red_up.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_default.png b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_default.png
new file mode 100644
index 0000000..f163742
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_default.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_green.png b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_green.png
new file mode 100644
index 0000000..37abb2f
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_green.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_red.png b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_red.png
new file mode 100644
index 0000000..c6f6fc2
--- /dev/null
+++ b/core/res/res/drawable-xlarge-mdpi/indicator_code_lock_point_area_red.png
Binary files differ
diff --git a/core/res/res/drawable-xlarge-mdpi/unlock_ring.png b/core/res/res/drawable-xlarge-mdpi/unlock_ring.png
index 1ac6d54..0363a8b 100644
--- a/core/res/res/drawable-xlarge-mdpi/unlock_ring.png
+++ b/core/res/res/drawable-xlarge-mdpi/unlock_ring.png
Binary files differ
diff --git a/core/res/res/layout-xlarge/keyguard_screen_unlock_landscape.xml b/core/res/res/layout-xlarge/keyguard_screen_unlock_landscape.xml
index 42636ad..52be82c 100644
--- a/core/res/res/layout-xlarge/keyguard_screen_unlock_landscape.xml
+++ b/core/res/res/layout-xlarge/keyguard_screen_unlock_landscape.xml
@@ -96,8 +96,8 @@
android:gravity="center"
>
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
- android:layout_width="350dip"
- android:layout_height="350dip"
+ android:layout_width="354dip"
+ android:layout_height="354dip"
android:layout_marginTop="90dip"
android:layout_marginRight="90dip"
/>
diff --git a/core/res/res/layout-xlarge/keyguard_screen_unlock_portrait.xml b/core/res/res/layout-xlarge/keyguard_screen_unlock_portrait.xml
index aeed79b..e170a76 100644
--- a/core/res/res/layout-xlarge/keyguard_screen_unlock_portrait.xml
+++ b/core/res/res/layout-xlarge/keyguard_screen_unlock_portrait.xml
@@ -32,7 +32,7 @@
android:orientation="vertical"
android:gravity="center_vertical"
>
-
+
<include layout="@layout/keyguard_screen_status_port" />
<!-- footer -->
@@ -92,8 +92,8 @@
android:gravity="center"
>
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
- android:layout_width="350dip"
- android:layout_height="350dip"
+ android:layout_width="354dip"
+ android:layout_height="354dip"
android:layout_marginTop="50dip"
/>
</LinearLayout>
diff --git a/core/res/res/layout/date_picker_dialog.xml b/core/res/res/layout/date_picker_dialog.xml
index 90de1f5..148e192 100644
--- a/core/res/res/layout/date_picker_dialog.xml
+++ b/core/res/res/layout/date_picker_dialog.xml
@@ -17,12 +17,6 @@
*/
-->
-<!-- Note: We want the DatePicker to take as much space as possible, therefore
- we set the width and height bigger than the max AlertDialog size
- determined by our parent WeightedLinearLayout.
-
- See: alert_dialog.xml
--->
<DatePicker xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/datePicker"
android:layout_gravity="center_horizontal"
diff --git a/core/res/res/layout/day_picker.xml b/core/res/res/layout/day_picker.xml
index 46ab450..a030df8 100644
--- a/core/res/res/layout/day_picker.xml
+++ b/core/res/res/layout/day_picker.xml
@@ -25,7 +25,7 @@
<TextView android:id="@+android:id/month_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
+ android:layout_gravity="center_horizontal"
android:paddingTop="10dip"
android:paddingBottom="10dip"
style="@android:style/TextAppearance.Medium" />
@@ -37,7 +37,7 @@
android:layout_marginBottom="6dip"
android:layout_marginRight="2dip"
android:layout_marginLeft="2dip"
- android:gravity="center">
+ android:gravity="center" >
<TextView android:layout_width="0dip"
android:layout_height="wrap_content"
@@ -50,7 +50,6 @@
android:layout_weight="1"
android:gravity="center"
style="?android:attr/dayPickerWeekDayViewStyle" />
-
<TextView android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -89,12 +88,18 @@
</LinearLayout>
+ <ImageView android:layout_width="match_parent"
+ android:layout_height="1dip"
+ android:scaleType="fitXY"
+ android:gravity="fill_horizontal"
+ android:src="?android:attr/dividerHorizontal" />
+
<ListView android:id="@android:id/list"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:drawSelectorOnTop="false"
- android:cacheColorHint="@android:color/transparent"
- android:fastScrollEnabled="false"
- android:overScrollMode="never" />
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:drawSelectorOnTop="false"
+ android:cacheColorHint="@android:color/transparent"
+ android:fastScrollEnabled="false"
+ android:overScrollMode="never" />
</LinearLayout>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index f10e90f..701b8ca 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -2976,6 +2976,14 @@
<!-- @hide -->
<declare-styleable name="DayPickerWeekView">
+ <attr name="height" />
+ <attr name="weekStartDay" format="integer|reference" />
+ <attr name="weekDayCount" format="integer|reference" />
+ <attr name="showWeekNumber" format="boolean|reference" />
+ <attr name="weekSeperatorWidth" format="dimension" />
+ <attr name="textSize" />
+ <attr name="weekDayPadding" format="dimension" />
+ <attr name="selectedDayLineWidth" format="dimension" />
<attr name="selectionBackgroundColor" format="color|reference" />
<attr name="focusedMonthDateColor" format="color|reference" />
<attr name="otherMonthDateColor" format="color|reference" />
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index fd51c0b..3e75261 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -475,12 +475,20 @@
<!-- @hide -->
<style name="Widget.DayPickerWeekView">
+ <item name="android:height">26dip</item>
+ <item name="android:weekStartDay">1</item>
+ <item name="android:weekDayCount">7</item>
+ <item name="android:showWeekNumber">true</item>
+ <item name="android:weekSeperatorWidth">1dip</item>
+ <item name="android:textSize">14dip</item>
+ <item name="android:weekDayPadding">0dip</item>
+ <item name="android:selectedDayLineWidth">6dip</item>
<item name="android:selectionBackgroundColor">#330099FF</item>
<item name="android:focusedMonthDateColor">#FFFFFFFF</item>
<item name="android:otherMonthDateColor">#66FFFFFF</item>
<item name="android:weekNumberColor">#33FFFFFF</item>
<item name="android:gridLinesColor">#19FFFFFF</item>
- <item name="selectedDayLine">@android:drawable/simple_week_dayline_holo_light</item>
+ <item name="selectedDayLine">@android:drawable/day_picker_week_view_dayline_holo_dark</item>
</style>
<!-- @hide -->
@@ -1436,13 +1444,13 @@
</style>
<!-- @hide -->
- <style name="Widget.Holo.DayPickerWeekView">
+ <style name="Widget.Holo.DayPickerWeekView" parent="Widget.DayPickerWeekView">
<item name="android:selectionBackgroundColor">#330099FF</item>
<item name="android:focusedMonthDateColor">#FFFFFFFF</item>
<item name="android:otherMonthDateColor">#66FFFFFF</item>
<item name="android:weekNumberColor">#33FFFFFF</item>
<item name="android:gridLinesColor">#19FFFFFF</item>
- <item name="selectedDayLine">@android:drawable/simple_week_dayline_holo_light</item>
+ <item name="selectedDayLine">@android:drawable/day_picker_week_view_dayline_holo_dark</item>
</style>
<style name="Widget.Holo.ImageButton" parent="Widget.ImageButton">
@@ -1811,16 +1819,22 @@
<!-- @hide -->
<style name="Widget.Holo.Light.DayPickerWeekView" parent="Widget.DayPickerWeekView">
+ <item name="android:selectionBackgroundColor">#7F080030</item>
+ <item name="android:focusedMonthDateColor">#FF000000</item>
+ <item name="android:otherMonthDateColor">#7F08002B</item>
+ <item name="android:weekNumberColor">#7F080021</item>
+ <item name="android:gridLinesColor">#7F08002A</item>
+ <item name="selectedDayLine">@android:drawable/day_picker_week_view_dayline_holo_light</item>
</style>
<!-- @hide -->
- <style name="Widget.Holo.Light.ImageButton.NumberPickerUpButton" parent="Widget.Holo.Light.ImageButton.NumberPickerUpButton">
- <item name="android:background">@android:drawable/timepicker_up_btn_holo_light</item>
+ <style name="Widget.Holo.Light.ImageButton.NumberPickerUpButton" parent="Widget.Holo.ImageButton.NumberPickerUpButton">
+ <item name="android:src">@android:drawable/timepicker_up_btn_holo_light</item>
</style>
<!-- @hide -->
<style name="Widget.Holo.Light.ImageButton.NumberPickerDownButton" parent="Widget.Holo.ImageButton.NumberPickerDownButton">
- <item name="android:background">@android:drawable/timepicker_down_btn_holo_light</item>
+ <item name="android:src">@android:drawable/timepicker_down_btn_holo_light</item>
</style>
<!-- @hide -->
diff --git a/media/libstagefright/codecs/aacdec/AACDecoder.cpp b/media/libstagefright/codecs/aacdec/AACDecoder.cpp
index 2171a67..208431c 100644
--- a/media/libstagefright/codecs/aacdec/AACDecoder.cpp
+++ b/media/libstagefright/codecs/aacdec/AACDecoder.cpp
@@ -21,8 +21,8 @@
#include "pvmp4audiodecoder_api.h"
+#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/MediaBufferGroup.h>
-#include <media/stagefright/MediaDebug.h>
#include <media/stagefright/MediaDefs.h>
#include <media/stagefright/MetaData.h>
@@ -84,7 +84,7 @@
sp<MetaData> meta = mSource->getFormat();
if (meta->findData(kKeyESDS, &type, &data, &size)) {
ESDS esds((const char *)data, size);
- CHECK_EQ(esds.InitCheck(), OK);
+ CHECK_EQ(esds.InitCheck(), (status_t)OK);
const void *codec_specific_data;
size_t codec_specific_data_size;
@@ -197,7 +197,7 @@
}
MediaBuffer *buffer;
- CHECK_EQ(mBufferGroup->acquire_buffer(&buffer), OK);
+ CHECK_EQ(mBufferGroup->acquire_buffer(&buffer), (status_t)OK);
mConfig->pInputBuffer =
(UChar *)mInputBuffer->data() + mInputBuffer->range_offset();
diff --git a/media/libstagefright/mpeg2ts/ESQueue.cpp b/media/libstagefright/mpeg2ts/ESQueue.cpp
index 1fb7c39..4b4490d 100644
--- a/media/libstagefright/mpeg2ts/ESQueue.cpp
+++ b/media/libstagefright/mpeg2ts/ESQueue.cpp
@@ -45,7 +45,7 @@
mBuffer->setRange(0, 0);
}
- mTimestamps.clear();
+ mRangeInfos.clear();
mFormat.clear();
}
@@ -171,7 +171,17 @@
memcpy(mBuffer->data() + mBuffer->size(), data, size);
mBuffer->setRange(0, mBuffer->size() + size);
- mTimestamps.push_back(timeUs);
+ RangeInfo info;
+ info.mLength = size;
+ info.mTimestampUs = timeUs;
+ mRangeInfos.push_back(info);
+
+#if 0
+ if (mMode == AAC) {
+ LOGI("size = %d, timeUs = %.2f secs", size, timeUs / 1E6);
+ hexdump(data, size);
+ }
+#endif
return OK;
}
@@ -186,6 +196,7 @@
}
sp<ABuffer> ElementaryStreamQueue::dequeueAccessUnitAAC() {
+ Vector<size_t> ranges;
Vector<size_t> frameOffsets;
Vector<size_t> frameSizes;
size_t auSize = 0;
@@ -239,6 +250,7 @@
size_t headerSize = protection_absent ? 7 : 9;
+ ranges.push(aac_frame_length);
frameOffsets.push(offset + headerSize);
frameSizes.push(aac_frame_length - headerSize);
auSize += aac_frame_length - headerSize;
@@ -250,11 +262,23 @@
return NULL;
}
+ int64_t timeUs = -1;
+
+ for (size_t i = 0; i < ranges.size(); ++i) {
+ int64_t tmpUs = fetchTimestamp(ranges.itemAt(i));
+
+ if (i == 0) {
+ timeUs = tmpUs;
+ }
+ }
+
sp<ABuffer> accessUnit = new ABuffer(auSize);
size_t dstOffset = 0;
for (size_t i = 0; i < frameOffsets.size(); ++i) {
+ size_t frameOffset = frameOffsets.itemAt(i);
+
memcpy(accessUnit->data() + dstOffset,
- mBuffer->data() + frameOffsets.itemAt(i),
+ mBuffer->data() + frameOffset,
frameSizes.itemAt(i));
dstOffset += frameSizes.itemAt(i);
@@ -264,15 +288,48 @@
mBuffer->size() - offset);
mBuffer->setRange(0, mBuffer->size() - offset);
- CHECK_GT(mTimestamps.size(), 0u);
- int64_t timeUs = *mTimestamps.begin();
- mTimestamps.erase(mTimestamps.begin());
-
- accessUnit->meta()->setInt64("time", timeUs);
+ if (timeUs >= 0) {
+ accessUnit->meta()->setInt64("time", timeUs);
+ } else {
+ LOGW("no time for AAC access unit");
+ }
return accessUnit;
}
+int64_t ElementaryStreamQueue::fetchTimestamp(size_t size) {
+ int64_t timeUs = -1;
+ bool first = true;
+
+ while (size > 0) {
+ CHECK(!mRangeInfos.empty());
+
+ RangeInfo *info = &*mRangeInfos.begin();
+
+ if (first) {
+ timeUs = info->mTimestampUs;
+ first = false;
+ }
+
+ if (info->mLength > size) {
+ info->mLength -= size;
+
+ if (first) {
+ info->mTimestampUs = -1;
+ }
+
+ size = 0;
+ } else {
+ size -= info->mLength;
+
+ mRangeInfos.erase(mRangeInfos.begin());
+ info = NULL;
+ }
+ }
+
+ return timeUs;
+}
+
// static
sp<MetaData> ElementaryStreamQueue::MakeAACCodecSpecificData(
unsigned profile, unsigned sampling_freq_index,
@@ -410,9 +467,8 @@
mBuffer->setRange(0, mBuffer->size() - nextScan);
- CHECK_GT(mTimestamps.size(), 0u);
- int64_t timeUs = *mTimestamps.begin();
- mTimestamps.erase(mTimestamps.begin());
+ int64_t timeUs = fetchTimestamp(nextScan);
+ CHECK_GE(timeUs, 0ll);
accessUnit->meta()->setInt64("time", timeUs);
diff --git a/media/libstagefright/mpeg2ts/ESQueue.h b/media/libstagefright/mpeg2ts/ESQueue.h
index 9eaf834..adce153 100644
--- a/media/libstagefright/mpeg2ts/ESQueue.h
+++ b/media/libstagefright/mpeg2ts/ESQueue.h
@@ -42,16 +42,25 @@
sp<MetaData> getFormat();
private:
+ struct RangeInfo {
+ int64_t mTimestampUs;
+ size_t mLength;
+ };
+
Mode mMode;
sp<ABuffer> mBuffer;
- List<int64_t> mTimestamps;
+ List<RangeInfo> mRangeInfos;
sp<MetaData> mFormat;
sp<ABuffer> dequeueAccessUnitH264();
sp<ABuffer> dequeueAccessUnitAAC();
+ // consume a logical (compressed) access unit of size "size",
+ // returns its timestamp in us (or -1 if no time information).
+ int64_t fetchTimestamp(size_t size);
+
static sp<MetaData> MakeAACCodecSpecificData(
unsigned profile, unsigned sampling_freq_index,
unsigned channel_configuration);
diff --git a/packages/SystemUI/res/drawable-hdpi/battery_0.png b/packages/SystemUI/res/drawable-hdpi/battery_0.png
deleted file mode 100644
index f4103a8..0000000
--- a/packages/SystemUI/res/drawable-hdpi/battery_0.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/battery_100.png b/packages/SystemUI/res/drawable-hdpi/battery_100.png
deleted file mode 100644
index 061cbe5..0000000
--- a/packages/SystemUI/res/drawable-hdpi/battery_100.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/battery_20.png b/packages/SystemUI/res/drawable-hdpi/battery_20.png
deleted file mode 100644
index 0064027..0000000
--- a/packages/SystemUI/res/drawable-hdpi/battery_20.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/battery_40.png b/packages/SystemUI/res/drawable-hdpi/battery_40.png
deleted file mode 100644
index 10de0e7..0000000
--- a/packages/SystemUI/res/drawable-hdpi/battery_40.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/battery_60.png b/packages/SystemUI/res/drawable-hdpi/battery_60.png
deleted file mode 100644
index aa2b8ef..0000000
--- a/packages/SystemUI/res/drawable-hdpi/battery_60.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/battery_80.png b/packages/SystemUI/res/drawable-hdpi/battery_80.png
deleted file mode 100644
index fe231f0..0000000
--- a/packages/SystemUI/res/drawable-hdpi/battery_80.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/dots_empty.png b/packages/SystemUI/res/drawable-hdpi/dots_empty.png
deleted file mode 100644
index 31e7654..0000000
--- a/packages/SystemUI/res/drawable-hdpi/dots_empty.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/dots_full.png b/packages/SystemUI/res/drawable-hdpi/dots_full.png
deleted file mode 100644
index 8c5c604..0000000
--- a/packages/SystemUI/res/drawable-hdpi/dots_full.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_notification_veto.png b/packages/SystemUI/res/drawable-hdpi/ic_notification_veto.png
deleted file mode 100644
index 395604f..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_notification_veto.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_airplane_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_airplane_off.png
deleted file mode 100644
index c7578f1..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_airplane_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_battery_mini.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_battery_mini.png
deleted file mode 100644
index c541c7c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_battery_mini.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_battery_on.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_battery_on.png
deleted file mode 100644
index 1e55c88..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_battery_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_bluetooth_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_bluetooth_off.png
deleted file mode 100644
index 8045e96..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_bluetooth_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_bluetooth_on.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_bluetooth_on.png
deleted file mode 100644
index 858a191..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_bluetooth_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_auto.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_auto.png
deleted file mode 100644
index 35d9425e..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_auto.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_low.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_low.png
deleted file mode 100644
index 808af5c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_brightness_low.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_close.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_close.png
deleted file mode 100644
index 0ae98d6..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_close.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_default_bg.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_default_bg.png
deleted file mode 100644
index 4272f32..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_default_bg.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_gps_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_gps_off.png
deleted file mode 100644
index 8a4932b..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_gps_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_lightsout.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_lightsout.png
deleted file mode 100644
index 97897b9..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_lightsout.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_avail.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_avail.png
deleted file mode 100644
index 1a2af70..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_avail.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_avail_open.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_avail_open.png
deleted file mode 100644
index cdeadb8..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_avail_open.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_dnd.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_dnd.png
deleted file mode 100644
index 2bccff0..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_dnd.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_none.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_none.png
deleted file mode 100644
index 5417216..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_none.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_none_open.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_none_open.png
deleted file mode 100644
index 544e6ba..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_noti_none_open.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd.png
deleted file mode 100644
index 51b5809..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd_off.png
deleted file mode 100644
index 37ef7e1..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_notification_dnd_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_open.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_open.png
deleted file mode 100644
index 5813a34..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_open.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_press_bg.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_press_bg.png
deleted file mode 100644
index 513f2a2..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_press_bg.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off.png
deleted file mode 100644
index cf5174a..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_lanscape.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_lanscape.png
deleted file mode 100644
index c091489..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_lanscape.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_portrait.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_portrait.png
deleted file mode 100644
index 73a9897..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_rotate_off_portrait.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_off.png
deleted file mode 100644
index efdf566..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_sound_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_mini.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_mini.png
deleted file mode 100644
index 2475eb1..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_mini.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_off.png b/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_off.png
deleted file mode 100644
index fd747a1..0000000
--- a/packages/SystemUI/res/drawable-hdpi/ic_sysbar_wifi_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/shade_bg.png b/packages/SystemUI/res/drawable-hdpi/shade_bg.png
deleted file mode 100644
index 3d00cd0..0000000
--- a/packages/SystemUI/res/drawable-hdpi/shade_bg.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/signal_100.png b/packages/SystemUI/res/drawable-hdpi/signal_100.png
deleted file mode 100644
index 96e52ff..0000000
--- a/packages/SystemUI/res/drawable-hdpi/signal_100.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/signal_20.png b/packages/SystemUI/res/drawable-hdpi/signal_20.png
deleted file mode 100644
index c0f652a..0000000
--- a/packages/SystemUI/res/drawable-hdpi/signal_20.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/signal_40.png b/packages/SystemUI/res/drawable-hdpi/signal_40.png
deleted file mode 100644
index 995dd8e..0000000
--- a/packages/SystemUI/res/drawable-hdpi/signal_40.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/signal_60.png b/packages/SystemUI/res/drawable-hdpi/signal_60.png
deleted file mode 100644
index 51e31ba..0000000
--- a/packages/SystemUI/res/drawable-hdpi/signal_60.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/signal_80.png b/packages/SystemUI/res/drawable-hdpi/signal_80.png
deleted file mode 100644
index afa656e..0000000
--- a/packages/SystemUI/res/drawable-hdpi/signal_80.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_back_default.png b/packages/SystemUI/res/drawable-hdpi/status_bar_back_default.png
deleted file mode 100644
index a9f9540..0000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_back_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_back_pressed.png b/packages/SystemUI/res/drawable-hdpi/status_bar_back_pressed.png
deleted file mode 100644
index b8aa190..0000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_back_pressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_home_default.png b/packages/SystemUI/res/drawable-hdpi/status_bar_home_default.png
deleted file mode 100644
index cb951dd..0000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_home_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_home_pressed.png b/packages/SystemUI/res/drawable-hdpi/status_bar_home_pressed.png
deleted file mode 100644
index a835ad5..0000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_home_pressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_icon_tray.9.png b/packages/SystemUI/res/drawable-hdpi/status_bar_icon_tray.9.png
deleted file mode 100644
index e1f041c..0000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_icon_tray.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_item_app_background_normal.9.png b/packages/SystemUI/res/drawable-hdpi/status_bar_item_app_background_normal.9.png
deleted file mode 100644
index 4fbfa4f..0000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_item_app_background_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_menu_default.png b/packages/SystemUI/res/drawable-hdpi/status_bar_menu_default.png
deleted file mode 100644
index 14779cf..0000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_menu_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_menu_pressed.png b/packages/SystemUI/res/drawable-hdpi/status_bar_menu_pressed.png
deleted file mode 100644
index 6c3d4c9..0000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_menu_pressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_recent_default.png b/packages/SystemUI/res/drawable-hdpi/status_bar_recent_default.png
deleted file mode 100644
index dc4cb51..0000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_recent_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/status_bar_recent_pressed.png b/packages/SystemUI/res/drawable-hdpi/status_bar_recent_pressed.png
deleted file mode 100644
index dc4cb51..0000000
--- a/packages/SystemUI/res/drawable-hdpi/status_bar_recent_pressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_hidenotification_handle.png b/packages/SystemUI/res/drawable-hdpi/sysbar_hidenotification_handle.png
deleted file mode 100644
index 64945d4..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_hidenotification_handle.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_minimeter_bg.png b/packages/SystemUI/res/drawable-hdpi/sysbar_minimeter_bg.png
deleted file mode 100644
index b59bf1d..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_minimeter_bg.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_panel_bg.9.png b/packages/SystemUI/res/drawable-hdpi/sysbar_panel_bg.9.png
deleted file mode 100644
index 2d5ccfa..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_panel_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_panel_recents_bg.9.png b/packages/SystemUI/res/drawable-hdpi/sysbar_panel_recents_bg.9.png
deleted file mode 100644
index cd8120b..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_panel_recents_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_0.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_0.png
deleted file mode 100644
index 8811252..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_0.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_10.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_10.png
deleted file mode 100644
index 9c6d641..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_10.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_100.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_100.png
deleted file mode 100644
index 58f0129..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_100.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_20.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_20.png
deleted file mode 100644
index 440bd50..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_20.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_30.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_30.png
deleted file mode 100644
index cc17a9f..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_30.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_40.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_40.png
deleted file mode 100644
index 87537f7..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_40.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_50.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_50.png
deleted file mode 100644
index 2aa5967..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_50.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_60.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_60.png
deleted file mode 100644
index bedb646..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_60.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_70.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_70.png
deleted file mode 100644
index 9b4a966..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_70.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_80.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_80.png
deleted file mode 100644
index 73ed185..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_80.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_90.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signal_90.png
deleted file mode 100644
index 8e0c706..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_signal_90.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_signalmini_100.png b/packages/SystemUI/res/drawable-hdpi/sysbar_signalmini_100.png
deleted file mode 100644
index d89f8891..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_signalmini_100.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_toggle_bg_off.9.png b/packages/SystemUI/res/drawable-hdpi/sysbar_toggle_bg_off.9.png
deleted file mode 100644
index 9dc0390..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_toggle_bg_off.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/sysbar_toggle_bg_on.9.png b/packages/SystemUI/res/drawable-hdpi/sysbar_toggle_bg_on.9.png
deleted file mode 100644
index 08fe94f..0000000
--- a/packages/SystemUI/res/drawable-hdpi/sysbar_toggle_bg_on.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/system_panel_airplane_default.png b/packages/SystemUI/res/drawable-hdpi/system_panel_airplane_default.png
deleted file mode 100644
index e375ee9..0000000
--- a/packages/SystemUI/res/drawable-hdpi/system_panel_airplane_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/system_panel_brightness_default.png b/packages/SystemUI/res/drawable-hdpi/system_panel_brightness_default.png
deleted file mode 100644
index f62502b..0000000
--- a/packages/SystemUI/res/drawable-hdpi/system_panel_brightness_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/system_panel_orientation_default.png b/packages/SystemUI/res/drawable-hdpi/system_panel_orientation_default.png
deleted file mode 100644
index e887fb8..0000000
--- a/packages/SystemUI/res/drawable-hdpi/system_panel_orientation_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/system_panel_orientation_locked.png b/packages/SystemUI/res/drawable-hdpi/system_panel_orientation_locked.png
deleted file mode 100644
index 58159d5..0000000
--- a/packages/SystemUI/res/drawable-hdpi/system_panel_orientation_locked.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/system_panel_sound_default.png b/packages/SystemUI/res/drawable-hdpi/system_panel_sound_default.png
deleted file mode 100644
index 6e857b5..0000000
--- a/packages/SystemUI/res/drawable-hdpi/system_panel_sound_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-land-hdpi/ic_sysbar_rotate_off.png b/packages/SystemUI/res/drawable-land-hdpi/ic_sysbar_rotate_off.png
deleted file mode 100644
index 66f299c..0000000
--- a/packages/SystemUI/res/drawable-land-hdpi/ic_sysbar_rotate_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-land-mdpi/ic_sysbar_rotate_off.png b/packages/SystemUI/res/drawable-land-mdpi/ic_sysbar_rotate_off.png
deleted file mode 100644
index adaadf7..0000000
--- a/packages/SystemUI/res/drawable-land-mdpi/ic_sysbar_rotate_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/battery_0.png b/packages/SystemUI/res/drawable-mdpi/battery_0.png
deleted file mode 100644
index 00fb261..0000000
--- a/packages/SystemUI/res/drawable-mdpi/battery_0.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/battery_100.png b/packages/SystemUI/res/drawable-mdpi/battery_100.png
deleted file mode 100644
index 600da18..0000000
--- a/packages/SystemUI/res/drawable-mdpi/battery_100.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/battery_20.png b/packages/SystemUI/res/drawable-mdpi/battery_20.png
deleted file mode 100644
index 5545cdb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/battery_20.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/battery_40.png b/packages/SystemUI/res/drawable-mdpi/battery_40.png
deleted file mode 100644
index f57ce03..0000000
--- a/packages/SystemUI/res/drawable-mdpi/battery_40.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/battery_60.png b/packages/SystemUI/res/drawable-mdpi/battery_60.png
deleted file mode 100644
index c8affe2..0000000
--- a/packages/SystemUI/res/drawable-mdpi/battery_60.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/battery_80.png b/packages/SystemUI/res/drawable-mdpi/battery_80.png
deleted file mode 100644
index d877fe1..0000000
--- a/packages/SystemUI/res/drawable-mdpi/battery_80.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/dots_empty.png b/packages/SystemUI/res/drawable-mdpi/dots_empty.png
deleted file mode 100644
index 22ada41..0000000
--- a/packages/SystemUI/res/drawable-mdpi/dots_empty.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/dots_full.png b/packages/SystemUI/res/drawable-mdpi/dots_full.png
deleted file mode 100644
index 2a346d6..0000000
--- a/packages/SystemUI/res/drawable-mdpi/dots_full.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_notification_veto.png b/packages/SystemUI/res/drawable-mdpi/ic_notification_veto.png
deleted file mode 100644
index f6299e9..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_notification_veto.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_airplane_off.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_airplane_off.png
deleted file mode 100644
index d897ba61..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_airplane_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_battery_on.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_battery_on.png
deleted file mode 100644
index 668b472..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_battery_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_bluetooth_off.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_bluetooth_off.png
deleted file mode 100644
index e463ba4..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_bluetooth_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_bluetooth_on.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_bluetooth_on.png
deleted file mode 100644
index 1239d50..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_bluetooth_on.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_brightness_auto.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_brightness_auto.png
deleted file mode 100644
index 37a1533..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_brightness_auto.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_brightness_low.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_brightness_low.png
deleted file mode 100644
index 8a55e3a..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_brightness_low.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_close.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_close.png
deleted file mode 100644
index 53abcbc..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_close.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_default_bg.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_default_bg.png
deleted file mode 100644
index 3e82d4e..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_default_bg.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_gps_off.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_gps_off.png
deleted file mode 100644
index dc2ed34..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_gps_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_lightsout.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_lightsout.png
deleted file mode 100644
index 8a07acc..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_lightsout.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_avail.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_avail.png
deleted file mode 100644
index 9123fef..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_avail.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_avail_open.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_avail_open.png
deleted file mode 100644
index 8e56f2a..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_avail_open.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_dnd.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_dnd.png
deleted file mode 100644
index 80cf99c..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_dnd.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_none.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_none.png
deleted file mode 100644
index e0d018b..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_none.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_none_open.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_none_open.png
deleted file mode 100644
index 5db8c9c..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_noti_none_open.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd.png
deleted file mode 100644
index fe44063..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd_off.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd_off.png
deleted file mode 100644
index 8088a2f..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_notification_dnd_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_open.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_open.png
deleted file mode 100644
index b7d624e..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_open.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_press_bg.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_press_bg.png
deleted file mode 100644
index 0958393..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_press_bg.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off.png
deleted file mode 100644
index 9e6793a..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png
deleted file mode 100644
index 96bf2ec..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png
deleted file mode 100644
index cc56778..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_sound_off.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_sound_off.png
deleted file mode 100644
index bd11e86..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_sound_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_wifi_off.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_wifi_off.png
deleted file mode 100644
index 87acc14..0000000
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_wifi_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/shade_bg.png b/packages/SystemUI/res/drawable-mdpi/shade_bg.png
deleted file mode 100644
index 941d3b1..0000000
--- a/packages/SystemUI/res/drawable-mdpi/shade_bg.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/signal_100.png b/packages/SystemUI/res/drawable-mdpi/signal_100.png
deleted file mode 100644
index 59df547..0000000
--- a/packages/SystemUI/res/drawable-mdpi/signal_100.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/signal_20.png b/packages/SystemUI/res/drawable-mdpi/signal_20.png
deleted file mode 100644
index 3bce724..0000000
--- a/packages/SystemUI/res/drawable-mdpi/signal_20.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/signal_40.png b/packages/SystemUI/res/drawable-mdpi/signal_40.png
deleted file mode 100644
index 570069c..0000000
--- a/packages/SystemUI/res/drawable-mdpi/signal_40.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/signal_60.png b/packages/SystemUI/res/drawable-mdpi/signal_60.png
deleted file mode 100644
index 0cfc7a6..0000000
--- a/packages/SystemUI/res/drawable-mdpi/signal_60.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/signal_80.png b/packages/SystemUI/res/drawable-mdpi/signal_80.png
deleted file mode 100644
index 66201d0..0000000
--- a/packages/SystemUI/res/drawable-mdpi/signal_80.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_0_fully.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_0_fully.png
deleted file mode 100644
index 1c59b2a..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_wifi_signal_0_fully.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_back_default.png b/packages/SystemUI/res/drawable-mdpi/status_bar_back_default.png
deleted file mode 100644
index f99a66d..0000000
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_back_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_back_pressed.png b/packages/SystemUI/res/drawable-mdpi/status_bar_back_pressed.png
deleted file mode 100644
index 94a0649..0000000
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_back_pressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_home_default.png b/packages/SystemUI/res/drawable-mdpi/status_bar_home_default.png
deleted file mode 100644
index 7e8ade5..0000000
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_home_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_home_pressed.png b/packages/SystemUI/res/drawable-mdpi/status_bar_home_pressed.png
deleted file mode 100644
index 7e8ade5..0000000
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_home_pressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_icon_tray.9.png b/packages/SystemUI/res/drawable-mdpi/status_bar_icon_tray.9.png
deleted file mode 100644
index 502acce..0000000
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_icon_tray.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_item_app_background_normal.9.png b/packages/SystemUI/res/drawable-mdpi/status_bar_item_app_background_normal.9.png
deleted file mode 100644
index c079615..0000000
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_item_app_background_normal.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_menu_default.png b/packages/SystemUI/res/drawable-mdpi/status_bar_menu_default.png
deleted file mode 100644
index bf3a755..0000000
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_menu_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_menu_pressed.png b/packages/SystemUI/res/drawable-mdpi/status_bar_menu_pressed.png
deleted file mode 100644
index 15e21d73..0000000
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_menu_pressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_recent_default.png b/packages/SystemUI/res/drawable-mdpi/status_bar_recent_default.png
deleted file mode 100644
index 7de67b0..0000000
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_recent_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/status_bar_recent_pressed.png b/packages/SystemUI/res/drawable-mdpi/status_bar_recent_pressed.png
deleted file mode 100644
index 7de67b0..0000000
--- a/packages/SystemUI/res/drawable-mdpi/status_bar_recent_pressed.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_hidenotification_handle.png b/packages/SystemUI/res/drawable-mdpi/sysbar_hidenotification_handle.png
deleted file mode 100644
index e43edd7..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_hidenotification_handle.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_minimeter_bg.png b/packages/SystemUI/res/drawable-mdpi/sysbar_minimeter_bg.png
deleted file mode 100644
index 0d265fc..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_minimeter_bg.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_panel_bg.9.png b/packages/SystemUI/res/drawable-mdpi/sysbar_panel_bg.9.png
deleted file mode 100644
index 77e034b..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_panel_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_panel_recents_bg.9.png b/packages/SystemUI/res/drawable-mdpi/sysbar_panel_recents_bg.9.png
deleted file mode 100644
index 85726d2..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_panel_recents_bg.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_0.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_0.png
deleted file mode 100644
index 7371571..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_0.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_10.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_10.png
deleted file mode 100644
index 5781e9a..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_10.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_100.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_100.png
deleted file mode 100644
index c65728c..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_100.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_20.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_20.png
deleted file mode 100644
index a249fa2..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_20.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_30.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_30.png
deleted file mode 100644
index 289c088..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_30.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_40.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_40.png
deleted file mode 100644
index f49dbd6..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_40.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_50.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_50.png
deleted file mode 100644
index 2f83e68..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_50.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_60.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_60.png
deleted file mode 100644
index bedc021..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_60.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_70.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_70.png
deleted file mode 100644
index edd8c05..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_70.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_80.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_80.png
deleted file mode 100644
index 148e20c..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_80.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_90.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signal_90.png
deleted file mode 100644
index 5a90ccb..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_signal_90.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_signalmini_100.png b/packages/SystemUI/res/drawable-mdpi/sysbar_signalmini_100.png
deleted file mode 100644
index a5eaa63..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_signalmini_100.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_toggle_bg_off.9.png b/packages/SystemUI/res/drawable-mdpi/sysbar_toggle_bg_off.9.png
deleted file mode 100644
index 94849d8..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_toggle_bg_off.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/sysbar_toggle_bg_on.9.png b/packages/SystemUI/res/drawable-mdpi/sysbar_toggle_bg_on.9.png
deleted file mode 100644
index f11058c..0000000
--- a/packages/SystemUI/res/drawable-mdpi/sysbar_toggle_bg_on.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/system_panel_airplane_default.png b/packages/SystemUI/res/drawable-mdpi/system_panel_airplane_default.png
deleted file mode 100644
index eb87532..0000000
--- a/packages/SystemUI/res/drawable-mdpi/system_panel_airplane_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/system_panel_brightness_default.png b/packages/SystemUI/res/drawable-mdpi/system_panel_brightness_default.png
deleted file mode 100644
index 3bfc83e..0000000
--- a/packages/SystemUI/res/drawable-mdpi/system_panel_brightness_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/system_panel_orientation_default.png b/packages/SystemUI/res/drawable-mdpi/system_panel_orientation_default.png
deleted file mode 100644
index 0d8479c..0000000
--- a/packages/SystemUI/res/drawable-mdpi/system_panel_orientation_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/system_panel_orientation_locked.png b/packages/SystemUI/res/drawable-mdpi/system_panel_orientation_locked.png
deleted file mode 100644
index 8f1d26c..0000000
--- a/packages/SystemUI/res/drawable-mdpi/system_panel_orientation_locked.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/system_panel_sound_default.png b/packages/SystemUI/res/drawable-mdpi/system_panel_sound_default.png
deleted file mode 100644
index 22636d6..0000000
--- a/packages/SystemUI/res/drawable-mdpi/system_panel_sound_default.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-port-hdpi/ic_sysbar_rotate_off.png b/packages/SystemUI/res/drawable-port-hdpi/ic_sysbar_rotate_off.png
deleted file mode 100644
index fcdda31..0000000
--- a/packages/SystemUI/res/drawable-port-hdpi/ic_sysbar_rotate_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-port-mdpi/ic_sysbar_rotate_off.png b/packages/SystemUI/res/drawable-port-mdpi/ic_sysbar_rotate_off.png
deleted file mode 100644
index fdc0ac7..0000000
--- a/packages/SystemUI/res/drawable-port-mdpi/ic_sysbar_rotate_off.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_recent_panel.xml b/packages/SystemUI/res/layout-xlarge/status_bar_recent_panel.xml
index 97cbfca..cc044a1 100644
--- a/packages/SystemUI/res/layout-xlarge/status_bar_recent_panel.xml
+++ b/packages/SystemUI/res/layout-xlarge/status_bar_recent_panel.xml
@@ -27,15 +27,6 @@
android:id="@+id/recents_bg_protect"
android:orientation="vertical">
- <TextView android:id="@+id/recents_no_recents"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/recent_tasks_empty"
- android:textSize="22dip"
- android:gravity="center_horizontal|center_vertical"
- android:visibility="gone">
- </TextView>
-
<View
android:layout_width="match_parent"
android:layout_height="0dip"
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java
index 1301329..e0f37ca 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/RecentAppsPanel.java
@@ -46,6 +46,7 @@
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
+import android.view.animation.AccelerateInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.widget.ImageView;
import android.widget.LinearLayout;
@@ -54,13 +55,15 @@
import com.android.systemui.R;
public class RecentAppsPanel extends LinearLayout implements StatusBarPanel, OnClickListener {
+ private static final int COLLAPSE_DURATION = 360;
private static final String TAG = "RecentAppsPanel";
private static final boolean DEBUG = TabletStatusBar.DEBUG;
private static final int DISPLAY_TASKS_PORTRAIT = 8;
private static final int DISPLAY_TASKS_LANDSCAPE = 5; // number of recent tasks to display
private static final int MAX_TASKS = DISPLAY_TASKS_PORTRAIT + 2; // allow extra for non-apps
+ private static final int STAGGER_ANIMATION_DELAY = 30;
+ private static final long ALPHA_ANIMATION_DURATION = 120;
private TabletStatusBar mBar;
- private TextView mNoRecents;
private LinearLayout mRecentsContainer;
private View mRecentsGlowView;
private ArrayList<ActivityDescription> mActivityDescriptions;
@@ -123,7 +126,6 @@
@Override
protected void onFinishInflate() {
super.onFinishInflate();
- mNoRecents = (TextView) findViewById(R.id.recents_no_recents);
mRecentsContainer = (LinearLayout) findViewById(R.id.recents_container);
mRecentsGlowView = findViewById(R.id.recents_glow);
mBackgroundProtector = (View) findViewById(R.id.recents_bg_protect);
@@ -193,7 +195,10 @@
.resolveActivityInfo(pm, 0);
int numTasks = recentTasks.size();
- for (int i = 0, index = 0; i < numTasks && (index < MAX_TASKS); ++i) {
+
+ // skip the first activity - assume it's either the home screen or the current app.
+ final int first = 1;
+ for (int i = first, index = 0; i < numTasks && (index < MAX_TASKS); ++i) {
final ActivityManager.RecentTaskInfo recentInfo = recentTasks.get(i);
Intent intent = new Intent(recentInfo.baseIntent);
@@ -297,22 +302,21 @@
if (animate) {
view.setAlpha(initialAlpha);
ObjectAnimator anim = ObjectAnimator.ofFloat(view, "alpha", initialAlpha, 1.0f);
- anim.setDuration(200);
- anim.setStartDelay((last-i)*80);
+ anim.setDuration(ALPHA_ANIMATION_DURATION);
+ anim.setStartDelay((last-i) * STAGGER_ANIMATION_DELAY);
anim.setInterpolator(interp);
anims.add(anim);
}
}
int views = mRecentsContainer.getChildCount();
- mNoRecents.setVisibility(View.GONE); // views == 0 ? View.VISIBLE : View.GONE);
mRecentsContainer.setVisibility(views > 0 ? View.VISIBLE : View.GONE);
mRecentsGlowView.setVisibility(views > 0 ? View.VISIBLE : View.GONE);
if (animate && views > 0) {
ObjectAnimator anim = ObjectAnimator.ofFloat(mRecentsGlowView, "alpha",
initialAlpha, 1.0f);
- anim.setDuration((last-first)*80);
+ anim.setDuration((last-first) * STAGGER_ANIMATION_DELAY);
anim.setInterpolator(interp);
anims.add(anim);
}
@@ -320,7 +324,7 @@
if (animate) {
ObjectAnimator anim = ObjectAnimator.ofFloat(mBackgroundProtector, "alpha",
initialAlpha, 1.0f);
- anim.setDuration(last*80);
+ anim.setDuration(last * STAGGER_ANIMATION_DELAY);
anim.setInterpolator(interp);
anims.add(anim);
}
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index 5a0f115..fde68f6 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -804,7 +804,7 @@
Layer::BufferManager::BufferManager(TextureManager& tm)
: mNumBuffers(NUM_BUFFERS), mTextureManager(tm),
- mActiveBuffer(-1), mFailover(false)
+ mActiveBufferIndex(-1), mFailover(false)
{
}
@@ -819,10 +819,10 @@
if (size < mNumBuffers) {
// Move the active texture into slot 0
- BufferData activeBufferData = mBufferData[mActiveBuffer];
- mBufferData[mActiveBuffer] = mBufferData[0];
+ BufferData activeBufferData = mBufferData[mActiveBufferIndex];
+ mBufferData[mActiveBufferIndex] = mBufferData[0];
mBufferData[0] = activeBufferData;
- mActiveBuffer = 0;
+ mActiveBufferIndex = 0;
// Free the buffers that are no longer needed.
for (size_t i = size; i < mNumBuffers; i++) {
@@ -868,37 +868,33 @@
}
status_t Layer::BufferManager::setActiveBufferIndex(size_t index) {
- mActiveBuffer = index;
+ BufferData const * const buffers = mBufferData;
+ Mutex::Autolock _l(mLock);
+ mActiveBuffer = buffers[index].buffer;
+ mActiveBufferIndex = index;
return NO_ERROR;
}
size_t Layer::BufferManager::getActiveBufferIndex() const {
- return mActiveBuffer;
+ return mActiveBufferIndex;
}
Texture Layer::BufferManager::getActiveTexture() const {
Texture res;
- if (mFailover || mActiveBuffer<0) {
+ if (mFailover || mActiveBufferIndex<0) {
res = mFailoverTexture;
} else {
- static_cast<Image&>(res) = mBufferData[mActiveBuffer].texture;
+ static_cast<Image&>(res) = mBufferData[mActiveBufferIndex].texture;
}
return res;
}
sp<GraphicBuffer> Layer::BufferManager::getActiveBuffer() const {
- sp<GraphicBuffer> result;
- const ssize_t activeBuffer = mActiveBuffer;
- if (activeBuffer >= 0) {
- BufferData const * const buffers = mBufferData;
- Mutex::Autolock _l(mLock);
- result = buffers[activeBuffer].buffer;
- }
- return result;
+ return mActiveBuffer;
}
bool Layer::BufferManager::hasActiveBuffer() const {
- return mActiveBuffer >= 0;
+ return mActiveBufferIndex >= 0;
}
sp<GraphicBuffer> Layer::BufferManager::detachBuffer(size_t index)
@@ -943,7 +939,7 @@
const sp<GraphicBuffer>& buffer)
{
status_t err = NO_INIT;
- ssize_t index = mActiveBuffer;
+ ssize_t index = mActiveBufferIndex;
if (index >= 0) {
if (!mFailover) {
Image& texture(mBufferData[index].texture);
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index c367a8d..5444d2f 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -164,7 +164,8 @@
size_t mNumBuffers;
Texture mFailoverTexture;
TextureManager& mTextureManager;
- ssize_t mActiveBuffer;
+ ssize_t mActiveBufferIndex;
+ sp<GraphicBuffer> mActiveBuffer;
bool mFailover;
static status_t destroyTexture(Image* tex, EGLDisplay dpy);
diff --git a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
index f6d7b3a..c75e1b6 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
@@ -18,7 +18,7 @@
import com.android.layoutlib.bridge.Bridge;
import com.android.layoutlib.bridge.impl.DelegateManager;
-import com.android.layoutlib.bridge.impl.Stack;
+import com.android.layoutlib.bridge.impl.GcSnapshot;
import android.graphics.Paint_Delegate.FontInfo;
import android.text.TextUtils;
@@ -26,7 +26,6 @@
import java.awt.AlphaComposite;
import java.awt.BasicStroke;
import java.awt.Color;
-import java.awt.Composite;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.RenderingHints;
@@ -58,7 +57,7 @@
// ---- delegate data ----
private BufferedImage mBufferedImage;
- private final Stack<Graphics2D> mGraphicsStack = new Stack<Graphics2D>();
+ private GcSnapshot mSnapshot = new GcSnapshot();
// ---- Public Helper methods ----
@@ -79,8 +78,8 @@
/**
* Returns the current {@link Graphics2D} used to draw.
*/
- public Graphics2D getGraphics2d() {
- return mGraphicsStack.peek();
+ public GcSnapshot getGcSnapshot() {
+ return mSnapshot;
}
// ---- native methods ----
@@ -120,7 +119,7 @@
return;
}
- canvasDelegate.getGraphics2d().translate(dx, dy);
+ canvasDelegate.getGcSnapshot().translate(dx, dy);
}
/*package*/ static void rotate(Canvas thisCanvas, float degrees) {
@@ -131,7 +130,7 @@
return;
}
- canvasDelegate.getGraphics2d().rotate(Math.toRadians(degrees));
+ canvasDelegate.getGcSnapshot().rotate(Math.toRadians(degrees));
}
/*package*/ static void scale(Canvas thisCanvas, float sx, float sy) {
@@ -142,7 +141,7 @@
return;
}
- canvasDelegate.getGraphics2d().scale(sx, sy);
+ canvasDelegate.getGcSnapshot().scale(sx, sy);
}
/*package*/ static void skew(Canvas thisCanvas, float kx, float ky) {
@@ -154,7 +153,7 @@
}
// get the current top graphics2D object.
- Graphics2D g = canvasDelegate.getGraphics2d();
+ GcSnapshot g = canvasDelegate.getGcSnapshot();
// get its current matrix
AffineTransform currentTx = g.getTransform();
@@ -170,21 +169,16 @@
}
/*package*/ static boolean clipRect(Canvas thisCanvas, RectF rect) {
- return clipRect(thisCanvas,
- (int) rect.left, (int) rect.top, (int) rect.right, (int) rect.bottom);
+ return clipRect(thisCanvas, rect.left, rect.top, rect.right, rect.bottom);
}
/*package*/ static boolean clipRect(Canvas thisCanvas, Rect rect) {
- return clipRect(thisCanvas, rect.left, rect.top, rect.right, rect.bottom);
+ return clipRect(thisCanvas, (float) rect.left, (float) rect.top,
+ (float) rect.right, (float) rect.bottom);
}
/*package*/ static boolean clipRect(Canvas thisCanvas, float left, float top, float right,
float bottom) {
- return clipRect(thisCanvas, (int) left, (int) top, (int) right, (int) bottom);
- }
-
- /*package*/ static boolean clipRect(Canvas thisCanvas, int left, int top, int right,
- int bottom) {
// get the delegate from the native int.
Canvas_Delegate canvasDelegate = sManager.getDelegate(thisCanvas.mNativeCanvas);
if (canvasDelegate == null) {
@@ -195,7 +189,17 @@
return canvasDelegate.clipRect(left, top, right, bottom, Region.Op.INTERSECT.nativeInt);
}
+ /*package*/ static boolean clipRect(Canvas thisCanvas, int left, int top, int right,
+ int bottom) {
+
+ return clipRect(thisCanvas, (float) left, (float) top, (float) right, (float) bottom);
+ }
+
/*package*/ static int save(Canvas thisCanvas) {
+ return save(thisCanvas, Canvas.MATRIX_SAVE_FLAG | Canvas.CLIP_SAVE_FLAG);
+ }
+
+ /*package*/ static int save(Canvas thisCanvas, int saveFlags) {
// get the delegate from the native int.
Canvas_Delegate canvasDelegate = sManager.getDelegate(thisCanvas.mNativeCanvas);
if (canvasDelegate == null) {
@@ -203,21 +207,7 @@
return 0;
}
- // get the current save count
- int count = canvasDelegate.mGraphicsStack.size();
-
- // create a new graphics and add it to the stack
- Graphics2D g = (Graphics2D)canvasDelegate.getGraphics2d().create();
- canvasDelegate.mGraphicsStack.push(g);
-
- // return the old save count
- return count;
-
- }
-
- /*package*/ static int save(Canvas thisCanvas, int saveFlags) {
- // FIXME implement save(flags)
- return save(thisCanvas);
+ return canvasDelegate.save(saveFlags);
}
/*package*/ static void restore(Canvas thisCanvas) {
@@ -228,7 +218,7 @@
return;
}
- canvasDelegate.mGraphicsStack.pop();
+ canvasDelegate.restore();
}
/*package*/ static int getSaveCount(Canvas thisCanvas) {
@@ -239,7 +229,7 @@
return 0;
}
- return canvasDelegate.mGraphicsStack.size();
+ return canvasDelegate.getGcSnapshot().size();
}
/*package*/ static void restoreToCount(Canvas thisCanvas, int saveCount) {
@@ -250,9 +240,7 @@
return;
}
- while (canvasDelegate.mGraphicsStack.size() > saveCount) {
- canvasDelegate.mGraphicsStack.pop();
- }
+ canvasDelegate.restoreTo(saveCount);
}
/*package*/ static void drawPoints(Canvas thisCanvas, float[] pts, int offset, int count,
@@ -282,7 +270,7 @@
}
// get a Graphics2D object configured with the drawing parameters.
- Graphics2D g = canvasDelegate.getCustomGraphics(paintDelegate);
+ Graphics2D g = canvasDelegate.createCustomGraphics(paintDelegate);
try {
for (int i = 0 ; i < count ; i += 4) {
@@ -378,10 +366,10 @@
}
// get the current top graphics2D object.
- Graphics2D g = canvasDelegate.getGraphics2d();
+ GcSnapshot snapshot = canvasDelegate.getGcSnapshot();
// get its current matrix
- AffineTransform currentTx = g.getTransform();
+ AffineTransform currentTx = snapshot.getTransform();
// get the AffineTransform of the given matrix
AffineTransform matrixTx = matrixDelegate.getAffineTransform();
@@ -389,7 +377,7 @@
currentTx.preConcatenate(matrixTx);
// give it to the graphics2D as a new matrix replacing all previous transform
- g.setTransform(currentTx);
+ snapshot.setTransform(currentTx);
}
/*package*/ static void native_setMatrix(int nCanvas, int nMatrix) {
@@ -405,15 +393,16 @@
}
// get the current top graphics2D object.
- Graphics2D g = canvasDelegate.getGraphics2d();
+ GcSnapshot snapshot = canvasDelegate.getGcSnapshot();
// get the AffineTransform of the given matrix
AffineTransform matrixTx = matrixDelegate.getAffineTransform();
// give it to the graphics2D as a new matrix replacing all previous transform
- g.setTransform(matrixTx);
+ snapshot.setTransform(matrixTx);
if (matrixDelegate.hasPerspective()) {
+ assert false;
Bridge.getLog().warning(null,
"android.graphics.Canvas#setMatrix(android.graphics.Matrix) only " +
"supports affine transformations in the Layout Preview.");
@@ -431,9 +420,7 @@
assert false;
}
- return canvasDelegate.clipRect(
- (int) left, (int) top, (int) right, (int) bottom,
- regionOp);
+ return canvasDelegate.clipRect(left, top, right, bottom, regionOp);
}
/*package*/ static boolean native_clipPath(int nativeCanvas,
@@ -465,7 +452,7 @@
return false;
}
- Rectangle rect = canvasDelegate.getGraphics2d().getClipBounds();
+ Rectangle rect = canvasDelegate.getGcSnapshot().getClip().getBounds();
if (rect != null) {
bounds.left = rect.x;
bounds.top = rect.y;
@@ -527,7 +514,7 @@
}
// get a new graphics context.
- Graphics2D graphics = (Graphics2D)canvasDelegate.getGraphics2d().create();
+ Graphics2D graphics = (Graphics2D)canvasDelegate.getGcSnapshot().create();
try {
// reset its transform just in case
graphics.setTransform(new AffineTransform());
@@ -568,12 +555,14 @@
}
// get a Graphics2D object configured with the drawing parameters.
- Graphics2D g = canvasDelegate.getCustomGraphics(paintDelegate);
+ Graphics2D g = canvasDelegate.createCustomGraphics(paintDelegate);
- g.drawLine((int)startX, (int)startY, (int)stopX, (int)stopY);
-
- // dispose Graphics2D object
- g.dispose();
+ try {
+ g.drawLine((int)startX, (int)startY, (int)stopX, (int)stopY);
+ } finally {
+ // dispose Graphics2D object
+ g.dispose();
+ }
}
/*package*/ static void native_drawRect(int nativeCanvas, RectF rect,
@@ -600,23 +589,25 @@
if (right > left && bottom > top) {
// get a Graphics2D object configured with the drawing parameters.
- Graphics2D g = canvasDelegate.getCustomGraphics(paintDelegate);
+ Graphics2D g = canvasDelegate.createCustomGraphics(paintDelegate);
- int style = paintDelegate.getStyle();
+ try {
+ int style = paintDelegate.getStyle();
- // draw
- if (style == Paint.Style.FILL.nativeInt ||
- style == Paint.Style.FILL_AND_STROKE.nativeInt) {
- g.fillRect((int)left, (int)top, (int)(right-left), (int)(bottom-top));
+ // draw
+ if (style == Paint.Style.FILL.nativeInt ||
+ style == Paint.Style.FILL_AND_STROKE.nativeInt) {
+ g.fillRect((int)left, (int)top, (int)(right-left), (int)(bottom-top));
+ }
+
+ if (style == Paint.Style.STROKE.nativeInt ||
+ style == Paint.Style.FILL_AND_STROKE.nativeInt) {
+ g.drawRect((int)left, (int)top, (int)(right-left), (int)(bottom-top));
+ }
+ } finally {
+ // dispose Graphics2D object
+ g.dispose();
}
-
- if (style == Paint.Style.STROKE.nativeInt ||
- style == Paint.Style.FILL_AND_STROKE.nativeInt) {
- g.drawRect((int)left, (int)top, (int)(right-left), (int)(bottom-top));
- }
-
- // dispose Graphics2D object
- g.dispose();
}
}
@@ -638,7 +629,7 @@
if (oval.right > oval.left && oval.bottom > oval.top) {
// get a Graphics2D object configured with the drawing parameters.
- Graphics2D g = canvasDelegate.getCustomGraphics(paintDelegate);
+ Graphics2D g = canvasDelegate.createCustomGraphics(paintDelegate);
int style = paintDelegate.getStyle();
@@ -692,7 +683,7 @@
if (rect.right > rect.left && rect.bottom > rect.top) {
// get a Graphics2D object configured with the drawing parameters.
- Graphics2D g = canvasDelegate.getCustomGraphics(paintDelegate);
+ Graphics2D g = canvasDelegate.createCustomGraphics(paintDelegate);
int style = paintDelegate.getStyle();
@@ -833,7 +824,7 @@
return;
}
- Graphics2D g = (Graphics2D) canvasDelegate.getCustomGraphics(paintDelegate);
+ Graphics2D g = (Graphics2D) canvasDelegate.createCustomGraphics(paintDelegate);
try {
// Paint.TextAlign indicates how the text is positioned relative to X.
// LEFT is the default and there's nothing to do.
@@ -1018,34 +1009,53 @@
* Disposes of the {@link Graphics2D} stack.
*/
private void dispose() {
- while (mGraphicsStack.size() > 0) {
- mGraphicsStack.pop().dispose();
- }
+ mSnapshot.dispose();
}
- private boolean clipRect(int left, int top, int right, int bottom, int regionOp) {
- if (regionOp == Region.Op.INTERSECT.nativeInt) {
- Graphics2D gc = getGraphics2d();
- gc.clipRect(left, top, right - left, bottom - top);
- return gc.getClip().getBounds().isEmpty() == false;
- } else {
- throw new UnsupportedOperationException();
- }
+ private int save(int saveFlags) {
+ // get the current save count
+ int count = mSnapshot.size();
+
+ // create a new snapshot and add it to the stack
+ mSnapshot = new GcSnapshot(mSnapshot, saveFlags);
+
+ // return the old save count
+ return count;
+ }
+
+ /**
+ * Restores the {@link GcSnapshot} to <var>saveCount</var>
+ * @param saveCount the saveCount
+ */
+ private void restoreTo(int saveCount) {
+ mSnapshot = mSnapshot.restoreTo(saveCount);
+ }
+
+ /**
+ * Restores the {@link GcSnapshot} to <var>saveCount</var>
+ * @param saveCount the saveCount
+ */
+ private void restore() {
+ mSnapshot = mSnapshot.restore();
+ }
+
+ private boolean clipRect(float left, float top, float right, float bottom, int regionOp) {
+ return mSnapshot.clipRect(left, top, right, bottom, regionOp);
}
private void setBitmap(BufferedImage image) {
mBufferedImage = image;
- mGraphicsStack.push(mBufferedImage.createGraphics());
+ assert mSnapshot.size() == 1;
+ mSnapshot.setGraphics2D(mBufferedImage.createGraphics());
}
/**
* Creates a new {@link Graphics2D} based on the {@link Paint} parameters.
* <p/>The object must be disposed ({@link Graphics2D#dispose()}) after being used.
*/
- /*package*/ Graphics2D getCustomGraphics(Paint_Delegate paint) {
+ /*package*/ Graphics2D createCustomGraphics(Paint_Delegate paint) {
// make new one
- Graphics2D g = getGraphics2d();
- g = (Graphics2D)g.create();
+ Graphics2D g = getGcSnapshot().create();
// configure it
@@ -1062,6 +1072,7 @@
Shader_Delegate shaderDelegate = Shader_Delegate.getDelegate(paint.getShader());
if (shaderDelegate != null) {
java.awt.Paint shaderPaint = shaderDelegate.getJavaPaint();
+ assert shaderPaint != null;
if (shaderPaint != null) {
g.setPaint(shaderPaint);
useColorPaint = false;
@@ -1113,6 +1124,7 @@
// if xfermode wasn't null, then it's something we don't support. log it.
if (xfermodeDelegate != null) {
+ assert false;
Bridge.getLog().warning(null,
String.format(
"Xfermode '%1$s' is not supported in the Layout Preview.",
@@ -1217,30 +1229,18 @@
int sleft, int stop, int sright, int sbottom,
int dleft, int dtop, int dright, int dbottom) {
- Graphics2D g = canvasDelegate.getGraphics2d();
-
- Composite c = null;
-
- if (paintDelegate != null) {
- if (paintDelegate.isFilterBitmap()) {
- g = (Graphics2D)g.create();
+ Graphics2D g = canvasDelegate.getGcSnapshot().create();
+ try {
+ if (paintDelegate != null && paintDelegate.isFilterBitmap()) {
g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BILINEAR);
}
- }
- g.drawImage(image, dleft, dtop, dright, dbottom,
- sleft, stop, sright, sbottom, null);
-
- if (paintDelegate != null) {
- if (paintDelegate.isFilterBitmap()) {
- g.dispose();
- }
- if (c != null) {
- g.setComposite(c);
- }
+ g.drawImage(image, dleft, dtop, dright, dbottom,
+ sleft, stop, sright, sbottom, null);
+ } finally {
+ g.dispose();
}
}
-
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
index 6b43544..b464f66 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
@@ -195,7 +195,8 @@
setTranslate(d.mValues, dx, dy);
}
- /*package*/ static void native_setScale(int native_object, float sx, float sy, float px, float py) {
+ /*package*/ static void native_setScale(int native_object, float sx, float sy,
+ float px, float py) {
Matrix_Delegate d = sManager.getDelegate(native_object);
if (d == null) {
assert false;
@@ -272,7 +273,8 @@
setRotate(d.mValues, sinValue, cosValue);
}
- /*package*/ static void native_setSkew(int native_object, float kx, float ky, float px, float py) {
+ /*package*/ static void native_setSkew(int native_object, float kx, float ky,
+ float px, float py) {
Matrix_Delegate d = sManager.getDelegate(native_object);
if (d == null) {
assert false;
@@ -364,7 +366,8 @@
return true;
}
- /*package*/ static boolean native_preRotate(int native_object, float degrees, float px, float py) {
+ /*package*/ static boolean native_preRotate(int native_object, float degrees,
+ float px, float py) {
Matrix_Delegate d = sManager.getDelegate(native_object);
if (d == null) {
assert false;
@@ -464,7 +467,8 @@
return true;
}
- /*package*/ static boolean native_postRotate(int native_object, float degrees, float px, float py) {
+ /*package*/ static boolean native_postRotate(int native_object, float degrees,
+ float px, float py) {
Matrix_Delegate d = sManager.getDelegate(native_object);
if (d == null) {
assert false;
@@ -526,7 +530,8 @@
return true;
}
- /*package*/ static boolean native_setRectToRect(int native_object, RectF src, RectF dst, int stf) {
+ /*package*/ static boolean native_setRectToRect(int native_object, RectF src,
+ RectF dst, int stf) {
Matrix_Delegate d = sManager.getDelegate(native_object);
if (d == null) {
assert false;
diff --git a/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java
index 95663ec..fe9bef9 100644
--- a/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java
@@ -160,20 +160,17 @@
Graphics2D graphics;
if (paint_delegate != null) {
- graphics = canvas_delegate.getCustomGraphics(paint_delegate);
+ graphics = canvas_delegate.createCustomGraphics(paint_delegate);
} else {
- graphics = canvas_delegate.getGraphics2d();
+ graphics = canvas_delegate.getGcSnapshot().create();
}
try {
chunkObject.draw(bitmap_delegate.getImage(), graphics,
left, top, right - left, bottom - top, destDensity, srcDensity);
} finally {
- if (paint_delegate != null) {
- graphics.dispose();
- }
+ graphics.dispose();
}
-
}
/*package*/ static int nativeGetTransparentRegion(int bitmap, byte[] chunk, Rect location) {
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/GcSnapshot.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/GcSnapshot.java
new file mode 100644
index 0000000..8c6b1be
--- /dev/null
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/GcSnapshot.java
@@ -0,0 +1,288 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.layoutlib.bridge.impl;
+
+import android.graphics.Canvas;
+import android.graphics.Region;
+
+import java.awt.Graphics2D;
+import java.awt.Shape;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Area;
+import java.awt.geom.Rectangle2D;
+
+/**
+ * Class representing a graphics context snapshot, as well as a context stack as a linked list.
+ * <p>
+ * This is based on top of {@link Graphics2D} but can operate independently if none are available
+ * yet when setting transforms and clip information.
+ *
+ */
+public class GcSnapshot {
+
+ private final GcSnapshot mPrevious;
+ private final int mFlags;
+
+ private Graphics2D mGraphics2D = null;
+ /** temp transform in case transformation are set before a Graphics2D exists */
+ private AffineTransform mTransform = null;
+ /** temp clip in case clipping is set before a Graphics2D exists */
+ private Area mClip = null;
+
+ /**
+ * Creates a new {@link GcSnapshot} on top of another one.
+ * <p/>
+ * This is basically the equivalent of {@link Canvas#save(int)}
+ * @param previous the previous snapshot head.
+ * @param flags the flags regarding what should be saved.
+ */
+ public GcSnapshot(GcSnapshot previous, int flags) {
+ assert previous != null;
+ mPrevious = previous;
+ mFlags = flags;
+ mGraphics2D = (Graphics2D) previous.mGraphics2D.create();
+ }
+
+ /**
+ * Creates the root snapshot.
+ * {@link #setGraphics2D(Graphics2D)} will have to be called on it when possible.
+ */
+ public GcSnapshot() {
+ mPrevious = null;
+ mFlags = 0;
+ }
+
+ public void dispose() {
+ if (mGraphics2D != null) {
+ mGraphics2D.dispose();
+ }
+
+ if (mPrevious != null) {
+ mPrevious.dispose();
+ }
+ }
+
+ /**
+ * Restores the top {@link GcSnapshot}, and returns the next one.
+ */
+ public GcSnapshot restore() {
+ return doRestore();
+ }
+
+ /**
+ * Restores the {@link GcSnapshot} to <var>saveCount</var>.
+ * @param saveCount the saveCount or -1 to only restore 1.
+ *
+ * @return the new head of the Gc snapshot stack.
+ */
+ public GcSnapshot restoreTo(int saveCount) {
+ return doRestoreTo(size(), saveCount);
+ }
+
+ public int size() {
+ if (mPrevious != null) {
+ return mPrevious.size() + 1;
+ }
+
+ return 1;
+ }
+
+ /**
+ * Sets the Graphics2D object for this snapshot if it was created through {@link #GcSnapshot()}.
+ * If any transform or clip information was set before, they are put into the Graphics object.
+ * @param graphics2D the graphics object to set.
+ */
+ public void setGraphics2D(Graphics2D graphics2D) {
+ mGraphics2D = graphics2D;
+ if (mTransform != null) {
+ mGraphics2D.setTransform(mTransform);
+ mTransform = null;
+ }
+
+ if (mClip != null) {
+ mGraphics2D.setClip(mClip);
+ mClip = null;
+ }
+ }
+
+ /**
+ * Creates and return a copy of the current {@link Graphics2D}.
+ * @return a new {@link Graphics2D}.
+ */
+ public Graphics2D create() {
+ assert mGraphics2D != null;
+ return (Graphics2D) mGraphics2D.create();
+ }
+
+ public void translate(float dx, float dy) {
+ if (mGraphics2D != null) {
+ mGraphics2D.translate(dx, dy);
+ } else {
+ if (mTransform == null) {
+ mTransform = new AffineTransform();
+ }
+ mTransform.translate(dx, dy);
+ }
+ }
+
+ public void rotate(double radians) {
+ if (mGraphics2D != null) {
+ mGraphics2D.rotate(radians);
+ } else {
+ if (mTransform == null) {
+ mTransform = new AffineTransform();
+ }
+ mTransform.rotate(radians);
+ }
+ }
+
+ public void scale(float sx, float sy) {
+ if (mGraphics2D != null) {
+ mGraphics2D.scale(sx, sy);
+ } else {
+ if (mTransform == null) {
+ mTransform = new AffineTransform();
+ }
+ mTransform.scale(sx, sy);
+ }
+ }
+
+ public AffineTransform getTransform() {
+ if (mGraphics2D != null) {
+ return mGraphics2D.getTransform();
+ } else {
+ if (mTransform == null) {
+ mTransform = new AffineTransform();
+ }
+ return mTransform;
+ }
+ }
+
+ public void setTransform(AffineTransform transform) {
+ if (mGraphics2D != null) {
+ mGraphics2D.setTransform(transform);
+ } else {
+ if (mTransform == null) {
+ mTransform = new AffineTransform();
+ }
+ mTransform.setTransform(transform);
+ }
+ }
+
+ public boolean clipRect(float left, float top, float right, float bottom, int regionOp) {
+ if (mGraphics2D != null) {
+ if (regionOp == Region.Op.DIFFERENCE.nativeInt) {
+ Area newClip = new Area(mGraphics2D.getClip());
+ newClip.subtract(new Area(
+ new Rectangle2D.Float(left, top, right - left, bottom - top)));
+ mGraphics2D.setClip(newClip);
+
+ } else if (regionOp == Region.Op.INTERSECT.nativeInt) {
+ mGraphics2D.clipRect((int) left, (int) top,
+ (int) (right - left), (int) (bottom - top));
+
+ } else if (regionOp == Region.Op.UNION.nativeInt) {
+ Area newClip = new Area(mGraphics2D.getClip());
+ newClip.add(new Area(
+ new Rectangle2D.Float(left, top, right - left, bottom - top)));
+ mGraphics2D.setClip(newClip);
+
+ } else if (regionOp == Region.Op.XOR.nativeInt) {
+ Area newClip = new Area(mGraphics2D.getClip());
+ newClip.exclusiveOr(new Area(
+ new Rectangle2D.Float(left, top, right - left, bottom - top)));
+ mGraphics2D.setClip(newClip);
+
+ } else if (regionOp == Region.Op.REVERSE_DIFFERENCE.nativeInt) {
+ Area newClip = new Area(
+ new Rectangle2D.Float(left, top, right - left, bottom - top));
+ newClip.subtract(new Area(mGraphics2D.getClip()));
+ mGraphics2D.setClip(newClip);
+ } else if (regionOp == Region.Op.REPLACE.nativeInt) {
+ mGraphics2D.setClip((int) left, (int) top,
+ (int) (right - left), (int) (bottom - top));
+ }
+
+ return mGraphics2D.getClip().getBounds().isEmpty() == false;
+ } else {
+ if (mClip == null) {
+ mClip = new Area();
+ }
+
+ if (regionOp == Region.Op.DIFFERENCE.nativeInt) {
+ //FIXME
+ } else if (regionOp == Region.Op.DIFFERENCE.nativeInt) {
+ } else if (regionOp == Region.Op.INTERSECT.nativeInt) {
+ } else if (regionOp == Region.Op.UNION.nativeInt) {
+ } else if (regionOp == Region.Op.XOR.nativeInt) {
+ } else if (regionOp == Region.Op.REVERSE_DIFFERENCE.nativeInt) {
+ } else if (regionOp == Region.Op.REPLACE.nativeInt) {
+ }
+
+ return mClip.getBounds().isEmpty() == false;
+ }
+ }
+
+ public Shape getClip() {
+ if (mGraphics2D != null) {
+ return mGraphics2D.getClip();
+ } else {
+ if (mClip == null) {
+ mClip = new Area();
+ }
+ return mClip;
+ }
+ }
+
+ private GcSnapshot doRestoreTo(int size, int saveCount) {
+ if (size <= saveCount) {
+ return this;
+ }
+
+ // restore the current one first.
+ GcSnapshot previous = doRestore();
+
+ if (size == saveCount + 1) { // this was the only one that needed restore.
+ return previous;
+ } else {
+ return previous.doRestoreTo(size - 1, saveCount);
+ }
+ }
+
+ private GcSnapshot doRestore() {
+ // if this snapshot does not save everything, then set the previous snapshot
+ // to this snapshot content
+ if (mPrevious != null) {
+ // didn't save the matrix? set the current matrix on the previous snapshot
+ if ((mFlags & Canvas.MATRIX_SAVE_FLAG) == 0) {
+ mPrevious.mGraphics2D.setTransform(getTransform());
+ }
+
+ // didn't save the clip? set the current clip on the previous snapshot
+ if ((mFlags & Canvas.CLIP_SAVE_FLAG) == 0) {
+ mPrevious.mGraphics2D.setClip(mGraphics2D.getClip());
+ }
+ }
+
+ if (mGraphics2D != null) {
+ mGraphics2D.dispose();
+ }
+
+ return mPrevious;
+ }
+
+}