diff options
22 files changed, 107 insertions, 107 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/ExpandHelper.java b/packages/SystemUI/src/com/android/systemui/ExpandHelper.java index fa1e3fe..4fd8aee 100644 --- a/packages/SystemUI/src/com/android/systemui/ExpandHelper.java +++ b/packages/SystemUI/src/com/android/systemui/ExpandHelper.java @@ -109,7 +109,7 @@ public class ExpandHelper implements Gefingerpoken, OnClickListener { private View mScrollView; - private OnScaleGestureListener mScaleGestureListener + private OnScaleGestureListener mScaleGestureListener = new ScaleGestureDetector.SimpleOnScaleGestureListener() { @Override public boolean onScaleBegin(ScaleGestureDetector detector) { diff --git a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java index ca6a06f..6fa863d 100644 --- a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java +++ b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java @@ -140,7 +140,7 @@ public class ImageWallpaper extends WallpaperService { "\nvoid main(void) {\n" + " gl_FragColor = texture2D(texture, outTexCoords);\n" + "}\n\n"; - + private static final int FLOAT_SIZE_BYTES = 4; private static final int TRIANGLE_VERTICES_DATA_STRIDE_BYTES = 5 * FLOAT_SIZE_BYTES; private static final int TRIANGLE_VERTICES_DATA_POS_OFFSET = 0; @@ -184,7 +184,7 @@ public class ImageWallpaper extends WallpaperService { } super.onCreate(surfaceHolder); - + // TODO: Don't need this currently because the wallpaper service // will restart the image wallpaper whenever the image changes. //IntentFilter filter = new IntentFilter(Intent.ACTION_WALLPAPER_CHANGED); @@ -512,44 +512,44 @@ public class ImageWallpaper extends WallpaperService { private int loadTexture(Bitmap bitmap) { int[] textures = new int[1]; - + glActiveTexture(GL_TEXTURE0); glGenTextures(1, textures, 0); checkGlError(); - + int texture = textures[0]; glBindTexture(GL_TEXTURE_2D, texture); checkGlError(); - + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - + GLUtils.texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bitmap, GL_UNSIGNED_BYTE, 0); checkGlError(); return texture; } - + private int buildProgram(String vertex, String fragment) { int vertexShader = buildShader(vertex, GL_VERTEX_SHADER); if (vertexShader == 0) return 0; - + int fragmentShader = buildShader(fragment, GL_FRAGMENT_SHADER); if (fragmentShader == 0) return 0; - + int program = glCreateProgram(); glAttachShader(program, vertexShader); checkGlError(); - + glAttachShader(program, fragmentShader); checkGlError(); - + glLinkProgram(program); checkGlError(); - + int[] status = new int[1]; glGetProgramiv(program, GL_LINK_STATUS, status, 0); if (status[0] != GL_TRUE) { @@ -560,19 +560,19 @@ public class ImageWallpaper extends WallpaperService { glDeleteProgram(program); return 0; } - + return program; } private int buildShader(String source, int type) { int shader = glCreateShader(type); - + glShaderSource(shader, source); checkGlError(); - + glCompileShader(shader); checkGlError(); - + int[] status = new int[1]; glGetShaderiv(shader, GL_COMPILE_STATUS, status, 0); if (status[0] != GL_TRUE) { @@ -581,7 +581,7 @@ public class ImageWallpaper extends WallpaperService { glDeleteShader(shader); return 0; } - + return shader; } @@ -608,24 +608,24 @@ public class ImageWallpaper extends WallpaperService { private boolean initGL(SurfaceHolder surfaceHolder) { mEgl = (EGL10) EGLContext.getEGL(); - + mEglDisplay = mEgl.eglGetDisplay(EGL_DEFAULT_DISPLAY); if (mEglDisplay == EGL_NO_DISPLAY) { throw new RuntimeException("eglGetDisplay failed " + GLUtils.getEGLErrorString(mEgl.eglGetError())); } - + int[] version = new int[2]; if (!mEgl.eglInitialize(mEglDisplay, version)) { throw new RuntimeException("eglInitialize failed " + GLUtils.getEGLErrorString(mEgl.eglGetError())); } - + mEglConfig = chooseEglConfig(); if (mEglConfig == null) { throw new RuntimeException("eglConfig not initialized"); } - + mEglContext = createContext(mEgl, mEglDisplay, mEglConfig); if (mEglContext == EGL_NO_CONTEXT) { throw new RuntimeException("createContext failed " + @@ -667,7 +667,7 @@ public class ImageWallpaper extends WallpaperService { throw new RuntimeException("createWindowSurface failed " + GLUtils.getEGLErrorString(error)); } - + if (!mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext)) { throw new RuntimeException("eglMakeCurrent failed " + GLUtils.getEGLErrorString(mEgl.eglGetError())); @@ -675,13 +675,13 @@ public class ImageWallpaper extends WallpaperService { return true; } - - + + EGLContext createContext(EGL10 egl, EGLDisplay eglDisplay, EGLConfig eglConfig) { int[] attrib_list = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE }; - return egl.eglCreateContext(eglDisplay, eglConfig, EGL_NO_CONTEXT, attrib_list); + return egl.eglCreateContext(eglDisplay, eglConfig, EGL_NO_CONTEXT, attrib_list); } - + private EGLConfig chooseEglConfig() { int[] configsCount = new int[1]; EGLConfig[] configs = new EGLConfig[1]; diff --git a/packages/SystemUI/src/com/android/systemui/LoadAverageService.java b/packages/SystemUI/src/com/android/systemui/LoadAverageService.java index 37e974b..efbee5b 100644 --- a/packages/SystemUI/src/com/android/systemui/LoadAverageService.java +++ b/packages/SystemUI/src/com/android/systemui/LoadAverageService.java @@ -33,18 +33,18 @@ import com.android.internal.os.ProcessStats; public class LoadAverageService extends Service { private View mView; - + private static final class Stats extends ProcessStats { String mLoadText; int mLoadWidth; - + private final Paint mPaint; - + Stats(Paint paint) { super(false); mPaint = paint; } - + @Override public void onLoadChanged(float load1, float load5, float load15) { mLoadText = load1 + " / " + load5 + " / " + load15; @@ -56,7 +56,7 @@ public class LoadAverageService extends Service { return (int)mPaint.measureText(name); } } - + private class LoadView extends View { private Handler mHandler = new Handler() { @Override @@ -71,7 +71,7 @@ public class LoadAverageService extends Service { }; private final Stats mStats; - + private Paint mLoadPaint; private Paint mAddedPaint; private Paint mRemovedPaint; @@ -186,7 +186,7 @@ public class LoadAverageService extends Service { final int irqTime = stats.getLastIrqTime(); final int softIrqTime = stats.getLastSoftIrqTime(); final int idleTime = stats.getLastIdleTime(); - + final int totalTime = userTime+systemTime+iowaitTime+irqTime+softIrqTime+idleTime; if (totalTime == 0) { return; @@ -269,7 +269,7 @@ public class LoadAverageService extends Service { maxWidth = st.nameWidth; } } - + int neededWidth = mPaddingLeft + mPaddingRight + maxWidth; int neededHeight = mPaddingTop + mPaddingBottom + (mFH*(1+NW)); if (neededWidth != mNeededWidth || neededHeight != mNeededHeight) { diff --git a/packages/SystemUI/src/com/android/systemui/SystemUI.java b/packages/SystemUI/src/com/android/systemui/SystemUI.java index fec7329..cb624ad 100644 --- a/packages/SystemUI/src/com/android/systemui/SystemUI.java +++ b/packages/SystemUI/src/com/android/systemui/SystemUI.java @@ -28,7 +28,7 @@ public abstract class SystemUI { public Map<Class<?>, Object> mComponents; public abstract void start(); - + protected void onConfigurationChanged(Configuration newConfig) { } diff --git a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java index e084dac..a08eb9b 100644 --- a/packages/SystemUI/src/com/android/systemui/power/PowerUI.java +++ b/packages/SystemUI/src/com/android/systemui/power/PowerUI.java @@ -283,7 +283,7 @@ public class PowerUI extends SystemUI { d.show(); mInvalidChargerDialog = d; } - + public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.print("mLowBatteryAlertCloseLevel="); pw.println(mLowBatteryAlertCloseLevel); diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java index 5617520..119299f 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java @@ -222,12 +222,12 @@ class SaveImageInBackgroundTask extends AsyncTask<SaveImageInBackgroundData, Voi sharingIntent.putExtra(Intent.EXTRA_SUBJECT, subject); Intent chooserIntent = Intent.createChooser(sharingIntent, null); - chooserIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK + chooserIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); mNotificationBuilder.addAction(R.drawable.ic_menu_share, r.getString(com.android.internal.R.string.share), - PendingIntent.getActivity(context, 0, chooserIntent, + PendingIntent.getActivity(context, 0, chooserIntent, PendingIntent.FLAG_CANCEL_CURRENT)); OutputStream out = resolver.openOutputStream(uri); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java index 8b50a38..5bda813 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java @@ -166,7 +166,7 @@ public class StatusBarIconView extends AnimatedImageView { /** * Returns the right icon to use for this item, respecting the iconId and * iconPackage (if set) - * + * * @param context Context to use to get resources if iconPackage is not set * @return Drawable for this item, or null if the package or item could not * be found @@ -193,7 +193,7 @@ public class StatusBarIconView extends AnimatedImageView { if (icon.iconId == 0) { return null; } - + try { return r.getDrawable(icon.iconId); } catch (RuntimeException e) { @@ -285,7 +285,7 @@ public class StatusBarIconView extends AnimatedImageView { } public String toString() { - return "StatusBarIconView(slot=" + mSlot + " icon=" + mIcon + return "StatusBarIconView(slot=" + mSlot + " icon=" + mIcon + " notification=" + mNotification + ")"; } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java index 9eaee30..de33b87 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java @@ -370,11 +370,11 @@ public class NavigationBarView extends LinearLayout { @Override public void onFinishInflate() { - mRotatedViews[Surface.ROTATION_0] = + mRotatedViews[Surface.ROTATION_0] = mRotatedViews[Surface.ROTATION_180] = findViewById(R.id.rot0); mRotatedViews[Surface.ROTATION_90] = findViewById(R.id.rot90); - + mRotatedViews[Surface.ROTATION_270] = NAVBAR_ALWAYS_AT_RIGHT ? findViewById(R.id.rot90) : findViewById(R.id.rot270); @@ -434,7 +434,7 @@ public class NavigationBarView extends LinearLayout { @Override protected void onLayout (boolean changed, int left, int top, int right, int bottom) { if (DEBUG) Log.d(TAG, String.format( - "onLayout: %s (%d,%d,%d,%d)", + "onLayout: %s (%d,%d,%d,%d)", changed?"changed":"notchanged", left, top, right, bottom)); super.onLayout(changed, left, top, right, bottom); } @@ -450,7 +450,7 @@ public class NavigationBarView extends LinearLayout { return super.onInterceptTouchEvent(ev); } */ - + private String getResourceName(int resId) { if (resId != 0) { @@ -491,7 +491,7 @@ public class NavigationBarView extends LinearLayout { getWindowVisibleDisplayFrame(r); final boolean offscreen = r.right > size.x || r.bottom > size.y; - pw.println(" window: " + pw.println(" window: " + r.toShortString() + " " + visibilityToString(getWindowVisibility()) + (offscreen ? " OFFSCREEN!" : "")); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java index 751d944..d55754b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java @@ -198,7 +198,7 @@ public class PanelBar extends FrameLayout { } if (DEBUG) LOG("collapseAllPanels: animate=%s waiting=%s", animate, waiting); if (!waiting && mState != STATE_CLOSED) { - // it's possible that nothing animated, so we replicate the termination + // it's possible that nothing animated, so we replicate the termination // conditions of panelExpansionChanged here go(STATE_CLOSED); onAllPanelsCollapsed(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java index cf7f9c6..3a17c9c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java @@ -226,7 +226,7 @@ public class PanelView extends FrameLayout { return; } if (mPeekAnimator == null) { - mPeekAnimator = ObjectAnimator.ofFloat(this, + mPeekAnimator = ObjectAnimator.ofFloat(this, "expandedHeight", mPeekHeight) .setDuration(250); } @@ -339,7 +339,7 @@ public class PanelView extends FrameLayout { mFlingGestureMaxOutputVelocityPx = res.getDimension(R.dimen.fling_gesture_max_output_velocity); - mPeekHeight = res.getDimension(R.dimen.peek_height) + mPeekHeight = res.getDimension(R.dimen.peek_height) + getPaddingBottom() // our window might have a dropshadow - (mHandleView == null ? 0 : mHandleView.getPaddingTop()); // the handle might have a topshadow } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index fd99f5b..6eadd2b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -147,7 +147,7 @@ public class PhoneStatusBar extends BaseStatusBar { private float mExpandAccelPx; // classic value: 2000px/s/s private float mCollapseAccelPx; // classic value: 2000px/s/s (will be negated to collapse "up") - private float mFlingGestureMaxOutputVelocityPx; // how fast can it really go? (should be a little + private float mFlingGestureMaxOutputVelocityPx; // how fast can it really go? (should be a little // faster than mSelfCollapseVelocityPx) PhoneStatusBarPolicy mIconPolicy; @@ -173,11 +173,11 @@ public class PhoneStatusBar extends BaseStatusBar { // viewgroup containing the normal contents of the statusbar LinearLayout mStatusBarContents; - + // right-hand icons LinearLayout mSystemIconArea; - - // left-hand icons + + // left-hand icons LinearLayout mStatusIcons; // the icons themselves IconMerger mNotificationIcons; @@ -204,7 +204,7 @@ public class PhoneStatusBar extends BaseStatusBar { // top bar View mNotificationPanelHeader; - View mDateTimeView; + View mDateTimeView; View mClearButton; ImageView mSettingsButton, mNotificationButton; @@ -264,7 +264,7 @@ public class PhoneStatusBar extends BaseStatusBar { // XXX: gesture research private final GestureRecorder mGestureRec = DEBUG_GESTURES - ? new GestureRecorder("/sdcard/statusbar_gestures.dat") + ? new GestureRecorder("/sdcard/statusbar_gestures.dat") : null; private int mNavigationIconHints = 0; @@ -391,7 +391,7 @@ public class PhoneStatusBar extends BaseStatusBar { mStatusBarView = (PhoneStatusBarView) mStatusBarWindow.findViewById(R.id.status_bar); mStatusBarView.setBar(this); - + PanelHolder holder = (PanelHolder) mStatusBarWindow.findViewById(R.id.panel_holder); mStatusBarView.setPanelHolder(holder); @@ -629,7 +629,7 @@ public class PhoneStatusBar extends BaseStatusBar { } } - mClingShown = ! (DEBUG_CLINGS + mClingShown = ! (DEBUG_CLINGS || !Prefs.read(mContext).getBoolean(Prefs.SHOWN_QUICK_SETTINGS_HELP, false)); if (!ENABLE_NOTIFICATION_PANEL_CLING || ActivityManager.isRunningInTestHarness()) { @@ -1080,7 +1080,7 @@ public class PhoneStatusBar extends BaseStatusBar { protected void updateCarrierLabelVisibility(boolean force) { if (!mShowCarrierInPanel) return; - // The idea here is to only show the carrier label when there is enough room to see it, + // The idea here is to only show the carrier label when there is enough room to see it, // i.e. when there aren't enough notifications to fill the panel. if (DEBUG) { Log.d(TAG, String.format("pileh=%d scrollh=%d carrierh=%d", @@ -1092,7 +1092,7 @@ public class PhoneStatusBar extends BaseStatusBar { !(emergencyCallsShownElsewhere && mNetworkController.isEmergencyOnly()) && mPile.getHeight() < (mNotificationPanel.getHeight() - mCarrierLabelHeight - mNotificationHeaderHeight) && mScrollView.getVisibility() == View.VISIBLE; - + if (force || mCarrierLabelVisible != makeVisible) { mCarrierLabelVisible = makeVisible; if (DEBUG) { @@ -1131,8 +1131,8 @@ public class PhoneStatusBar extends BaseStatusBar { + " any=" + any + " clearable=" + clearable); } - if (mHasFlipSettings - && mFlipSettingsView != null + if (mHasFlipSettings + && mFlipSettingsView != null && mFlipSettingsView.getVisibility() == View.VISIBLE && mScrollView.getVisibility() != View.VISIBLE) { // the flip settings panel is unequivocally showing; we should not be shown @@ -1444,7 +1444,7 @@ public class PhoneStatusBar extends BaseStatusBar { a.setStartDelay(d); return a; } - + public Animator start(Animator a) { a.start(); return a; @@ -1573,7 +1573,7 @@ public class PhoneStatusBar extends BaseStatusBar { interpolator(mAccelerateInterpolator, ObjectAnimator.ofFloat(mScrollView, View.SCALE_X, 1f, 0f) ) - .setDuration(FLIP_DURATION_OUT), + .setDuration(FLIP_DURATION_OUT), mScrollView, View.INVISIBLE)); mSettingsButtonAnim = start( setVisibilityWhenDone( @@ -1674,13 +1674,13 @@ public class PhoneStatusBar extends BaseStatusBar { /** * Enables or disables layers on the children of the notifications pile. - * + * * When layers are enabled, this method attempts to enable layers for the minimal * number of children. Only children visible when the notification area is fully * expanded will receive a layer. The technique used in this method might cause * more children than necessary to get a layer (at most one extra child with the * current UI.) - * + * * @param layerType {@link View#LAYER_TYPE_NONE} or {@link View#LAYER_TYPE_HARDWARE} */ private void setPileLayers(int layerType) { @@ -1693,7 +1693,7 @@ public class PhoneStatusBar extends BaseStatusBar { } break; case View.LAYER_TYPE_HARDWARE: - final int[] location = new int[2]; + final int[] location = new int[2]; mNotificationPanel.getLocationInWindow(location); final int left = location[0]; @@ -1803,9 +1803,9 @@ public class PhoneStatusBar extends BaseStatusBar { // Cling (first-run help) handling. // The cling is supposed to show the first time you drag, or even tap, the status bar. - // It should show the notification panel, then fade in after half a second, giving you + // It should show the notification panel, then fade in after half a second, giving you // an explanation of what just happened, as well as teach you how to access quick - // settings (another drag). The user can dismiss the cling by clicking OK or by + // settings (another drag). The user can dismiss the cling by clicking OK or by // dragging quick settings into view. final int act = event.getActionMasked(); if (mSuppressStatusBarDrags) { @@ -2284,7 +2284,7 @@ public class PhoneStatusBar extends BaseStatusBar { void updateDisplaySize() { mDisplay.getMetrics(mDisplayMetrics); if (DEBUG_GESTURES) { - mGestureRec.tag("display", + mGestureRec.tag("display", String.format("%dx%d", mDisplayMetrics.widthPixels, mDisplayMetrics.heightPixels)); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java index 2a65381..d2e7bd6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java @@ -114,9 +114,9 @@ public class PhoneStatusBarView extends PanelBar { if (mFullWidthNotifications) { // No double swiping. If either panel is open, nothing else can be pulled down. - return ((mSettingsPanel == null ? 0 : mSettingsPanel.getExpandedHeight()) - + mNotificationPanel.getExpandedHeight() > 0) - ? null + return ((mSettingsPanel == null ? 0 : mSettingsPanel.getExpandedHeight()) + + mNotificationPanel.getExpandedHeight() > 0) + ? null : mNotificationPanel; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java index a784f37..a6ce288 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/Ticker.java @@ -38,7 +38,7 @@ import java.util.ArrayList; public abstract class Ticker { private static final int TICKER_SEGMENT_DELAY = 3000; - + private Context mContext; private Handler mHandler = new Handler(); private ArrayList<Segment> mSegments = new ArrayList(); @@ -216,15 +216,15 @@ public abstract class Ticker { if (initialCount == 0 && mSegments.size() > 0) { Segment seg = mSegments.get(0); seg.first = false; - + mIconSwitcher.setAnimateFirstView(false); mIconSwitcher.reset(); mIconSwitcher.setImageDrawable(seg.icon); - + mTextSwitcher.setAnimateFirstView(false); mTextSwitcher.reset(); mTextSwitcher.setText(seg.getText()); - + tickerStarting(); scheduleAdvance(); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java index 452ff489..575b44e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryController.java @@ -71,7 +71,7 @@ public class BatteryController extends BroadcastReceiver { boolean plugged = false; switch (status) { - case BatteryManager.BATTERY_STATUS_CHARGING: + case BatteryManager.BATTERY_STATUS_CHARGING: case BatteryManager.BATTERY_STATUS_FULL: plugged = true; break; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java index e5816cd..93fb14f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java @@ -192,7 +192,7 @@ public class Clock extends TextView { return formatted; } } - + return result; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java index 27a3a15..847f997 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java @@ -63,7 +63,7 @@ public class DateView extends TextView { mAttachedToWindow = true; setUpdates(); } - + @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java index dbf9957..f6ac4a8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java @@ -40,10 +40,10 @@ public class HeadsUpNotificationView extends LinearLayout implements SwipeHelper Rect mTmpRect = new Rect(); private SwipeHelper mSwipeHelper; - + BaseStatusBar mBar; private ViewGroup mContentHolder; - + private Notification mHeadsUp; private OnClickListener mOnClickListener; @@ -62,14 +62,14 @@ public class HeadsUpNotificationView extends LinearLayout implements SwipeHelper float densityScale = getResources().getDisplayMetrics().density; float pagingTouchSlop = ViewConfiguration.get(getContext()).getScaledPagingTouchSlop(); mSwipeHelper = new SwipeHelper(SwipeHelper.X, this, densityScale, pagingTouchSlop); - + mContentHolder = (ViewGroup) findViewById(R.id.contentHolder); if (mHeadsUp != null) { // whoops, we're on already! applyContent(mHeadsUp, mOnClickListener); } } - + public void setBar(BaseStatusBar bar) { mBar = bar; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java index fc77be1..f325957 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java @@ -81,7 +81,7 @@ public class KeyButtonView extends ImageView { defStyle, 0); mCode = a.getInteger(R.styleable.KeyButtonView_keyCode, 0); - + mSupportsLongpress = a.getBoolean(R.styleable.KeyButtonView_keyRepeat, true); mGlowBG = a.getDrawable(R.styleable.KeyButtonView_glowBackground); @@ -90,7 +90,7 @@ public class KeyButtonView extends ImageView { mGlowWidth = mGlowBG.getIntrinsicWidth(); mGlowHeight = mGlowBG.getIntrinsicHeight(); } - + a.recycle(); setClickable(true); @@ -180,7 +180,7 @@ public class KeyButtonView extends ImageView { } final AnimatorSet as = mPressedAnim = new AnimatorSet(); if (pressed) { - if (mGlowScale < GLOW_MAX_SCALE_FACTOR) + if (mGlowScale < GLOW_MAX_SCALE_FACTOR) mGlowScale = GLOW_MAX_SCALE_FACTOR; if (mGlowAlpha < BUTTON_QUIESCENT_ALPHA) mGlowAlpha = BUTTON_QUIESCENT_ALPHA; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationController.java index 63f1254..c5563da 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationController.java @@ -88,7 +88,7 @@ public class LocationController extends BroadcastReceiver { textResId = R.string.gps_notification_searching_text; visible = true; } - + try { if (visible) { Intent gpsIntent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS); @@ -108,14 +108,14 @@ public class LocationController extends BroadcastReceiver { // Notification.Builder will helpfully fill these out for you no matter what you do n.tickerView = null; n.tickerText = null; - + n.priority = Notification.PRIORITY_HIGH; int[] idOut = new int[1]; mNotificationService.enqueueNotificationWithTag( mContext.getPackageName(), mContext.getBasePackageName(), - null, - GPS_NOTIFICATION_ID, + null, + GPS_NOTIFICATION_ID, n, idOut, UserHandle.USER_ALL); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java index cd8445c..92c57c8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java @@ -36,8 +36,8 @@ import com.android.systemui.statusbar.NotificationData; import java.util.HashMap; -public class NotificationRowLayout - extends LinearLayout +public class NotificationRowLayout + extends LinearLayout implements SwipeHelper.Callback, ExpandHelper.Callback { private static final String TAG = "NotificationRowLayout"; @@ -55,7 +55,7 @@ public class NotificationRowLayout HashMap<View, ValueAnimator> mDisappearingViews = new HashMap<View, ValueAnimator>(); private SwipeHelper mSwipeHelper; - + private OnSizeChangedListener mOnSizeChangedListener; // Flag set during notification removal animation to avoid causing too much work until @@ -74,7 +74,7 @@ public class NotificationRowLayout mRealLayoutTransition = new LayoutTransition(); mRealLayoutTransition.setAnimateParentHierarchy(true); setLayoutTransitionsEnabled(true); - + setOrientation(LinearLayout.VERTICAL); if (DEBUG) { diff --git a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java index b75f8b3..2c36ab7 100644 --- a/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java +++ b/packages/SystemUI/src/com/android/systemui/usb/StorageNotification.java @@ -41,7 +41,7 @@ public class StorageNotification extends SystemUI { /** * The notification that is shown when a USB mass storage host - * is connected. + * is connected. * <p> * This is lazily created, so use {@link #setUsbStorageNotification()}. */ @@ -217,7 +217,7 @@ public class StorageNotification extends SystemUI { setMediaStorageNotification( com.android.internal.R.string.ext_media_unmountable_notification_title, com.android.internal.R.string.ext_media_unmountable_notification_message, - com.android.internal.R.drawable.stat_notify_sdcard_usb, true, false, pi); + com.android.internal.R.drawable.stat_notify_sdcard_usb, true, false, pi); updateUsbMassStorageNotification(mUmsAvailable); } else if (newState.equals(Environment.MEDIA_REMOVED)) { /* @@ -283,7 +283,7 @@ public class StorageNotification extends SystemUI { if (notificationManager == null) { return; } - + if (visible) { Resources r = Resources.getSystem(); CharSequence title = r.getText(titleId); @@ -300,7 +300,7 @@ public class StorageNotification extends SystemUI { } else { mUsbStorageNotification.defaults &= ~Notification.DEFAULT_SOUND; } - + mUsbStorageNotification.flags = Notification.FLAG_ONGOING_EVENT; mUsbStorageNotification.tickerText = title; @@ -329,7 +329,7 @@ public class StorageNotification extends SystemUI { mUsbStorageNotification.fullScreenIntent = pi; } } - + final int notificationId = mUsbStorageNotification.icon; if (visible) { notificationManager.notifyAsUser(null, notificationId, mUsbStorageNotification, @@ -373,7 +373,7 @@ public class StorageNotification extends SystemUI { final int notificationId = mMediaStorageNotification.icon; notificationManager.cancel(notificationId); } - + if (visible) { Resources r = Resources.getSystem(); CharSequence title = r.getText(titleId); @@ -402,7 +402,7 @@ public class StorageNotification extends SystemUI { mMediaStorageNotification.icon = icon; mMediaStorageNotification.setLatestEventInfo(mContext, title, message, pi); } - + final int notificationId = mMediaStorageNotification.icon; if (visible) { notificationManager.notifyAsUser(null, notificationId, diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java index 65315f3..0ed2a54 100644 --- a/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java +++ b/packages/SystemUI/src/com/android/systemui/usb/UsbStorageActivity.java @@ -94,7 +94,7 @@ public class UsbStorageActivity extends Activity switchDisplay(on); } }; - + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -105,7 +105,7 @@ public class UsbStorageActivity extends Activity Log.w(TAG, "Failed to get StorageManager"); } } - + mUIHandler = new Handler(); HandlerThread thr = new HandlerThread("SystemUI UsbStorageActivity"); @@ -184,7 +184,7 @@ public class UsbStorageActivity extends Activity @Override protected void onPause() { super.onPause(); - + unregisterReceiver(mUsbStateReceiver); if (mStorageManager == null && mStorageListener != null) { mStorageManager.unregisterListener(mStorageListener); @@ -256,7 +256,7 @@ public class UsbStorageActivity extends Activity // will be hidden once USB mass storage kicks in (or fails) } }); - + // things to do elsewhere mAsyncStorageHandler.post(new Runnable() { @Override |