summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'packages/SystemUI/src/com')
-rw-r--r--packages/SystemUI/src/com/android/systemui/ImageWallpaper.java13
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java34
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java60
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java6
4 files changed, 74 insertions, 39 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
index 0671e44..a98c4dc 100644
--- a/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
+++ b/packages/SystemUI/src/com/android/systemui/ImageWallpaper.java
@@ -261,6 +261,19 @@ public class ImageWallpaper extends WallpaperService {
}
}
+ @Override
+ public void onSurfaceRedrawNeeded(SurfaceHolder holder) {
+ if (DEBUG) {
+ Log.d(TAG, "onSurfaceRedrawNeeded:");
+ }
+ super.onSurfaceRedrawNeeded(holder);
+
+ synchronized (mLock) {
+ mRedrawNeeded = true;
+ drawFrameLocked();
+ }
+ }
+
void drawFrameLocked() {
if (!mVisible) {
if (DEBUG) {
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 3fea0a0..12e749d 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -1376,12 +1376,34 @@ public class PhoneStatusBar extends BaseStatusBar {
private void setStatusBarLowProfile(boolean lightsOut) {
if (mLightsOutAnimation == null) {
- mLightsOutAnimation = ObjectAnimator.ofFloat(mStatusBarContents, View.ALPHA, 0);
- mLightsOutAnimation.setDuration(750);
-
- mLightsOnAnimation = new AnimatorSet();
- mLightsOnAnimation = ObjectAnimator.ofFloat(mStatusBarContents, View.ALPHA, 1);
- mLightsOnAnimation.setDuration(250);
+ final View notifications = mStatusBarView.findViewById(R.id.notification_icon_area);
+ final View systemIcons = mStatusBarView.findViewById(R.id.statusIcons);
+ final View signal = mStatusBarView.findViewById(R.id.signal_cluster);
+ final View battery = mStatusBarView.findViewById(R.id.battery);
+ final View clock = mStatusBarView.findViewById(R.id.clock);
+
+ final AnimatorSet lightsOutAnim = new AnimatorSet();
+ lightsOutAnim.playTogether(
+ ObjectAnimator.ofFloat(notifications, View.ALPHA, 0),
+ ObjectAnimator.ofFloat(systemIcons, View.ALPHA, 0),
+ ObjectAnimator.ofFloat(signal, View.ALPHA, 0),
+ ObjectAnimator.ofFloat(battery, View.ALPHA, 0.5f),
+ ObjectAnimator.ofFloat(clock, View.ALPHA, 0.5f)
+ );
+ lightsOutAnim.setDuration(750);
+
+ final AnimatorSet lightsOnAnim = new AnimatorSet();
+ lightsOnAnim.playTogether(
+ ObjectAnimator.ofFloat(notifications, View.ALPHA, 1),
+ ObjectAnimator.ofFloat(systemIcons, View.ALPHA, 1),
+ ObjectAnimator.ofFloat(signal, View.ALPHA, 1),
+ ObjectAnimator.ofFloat(battery, View.ALPHA, 1),
+ ObjectAnimator.ofFloat(clock, View.ALPHA, 1)
+ );
+ lightsOnAnim.setDuration(250);
+
+ mLightsOutAnimation = lightsOutAnim;
+ mLightsOnAnimation = lightsOnAnim;
}
mLightsOutAnimation.cancel();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
index f3c2df1..d63d517 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
@@ -71,6 +71,7 @@ import java.util.ArrayList;
*
*/
class QuickSettings {
+ public static final boolean SHOW_IME_TILE = false;
private Context mContext;
private PanelBar mBar;
@@ -274,12 +275,7 @@ class QuickSettings {
timeTile.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- // TODO: Jump into the clock application
- Intent intent = new Intent();
- intent.setComponent(new ComponentName(
- "com.google.android.deskclock",
- "com.android.deskclock.DeskClock"));
- startSettingsActivity(intent);
+ startSettingsActivity(android.provider.Settings.ACTION_DATE_SETTINGS);
}
});
mModel.addTimeTile(timeTile, new QuickSettingsModel.RefreshCallback() {
@@ -566,32 +562,34 @@ class QuickSettings {
});
parent.addView(wifiDisplayTile);
- // IME
- QuickSettingsTileView imeTile = (QuickSettingsTileView)
- inflater.inflate(R.layout.quick_settings_tile, parent, false);
- imeTile.setContent(R.layout.quick_settings_tile_ime, inflater);
- imeTile.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- try {
- mBar.collapseAllPanels(true);
- Intent intent = new Intent(Settings.ACTION_SHOW_INPUT_METHOD_PICKER);
- PendingIntent pendingIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
- pendingIntent.send();
- } catch (Exception e) {}
- }
- });
- mModel.addImeTile(imeTile, new QuickSettingsModel.RefreshCallback() {
- @Override
- public void refreshView(QuickSettingsTileView view, State state) {
- TextView tv = (TextView) view.findViewById(R.id.ime_textview);
- if (state.label != null) {
- tv.setText(state.label);
+ if (SHOW_IME_TILE) {
+ // IME
+ QuickSettingsTileView imeTile = (QuickSettingsTileView)
+ inflater.inflate(R.layout.quick_settings_tile, parent, false);
+ imeTile.setContent(R.layout.quick_settings_tile_ime, inflater);
+ imeTile.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ try {
+ mBar.collapseAllPanels(true);
+ Intent intent = new Intent(Settings.ACTION_SHOW_INPUT_METHOD_PICKER);
+ PendingIntent pendingIntent = PendingIntent.getBroadcast(mContext, 0, intent, 0);
+ pendingIntent.send();
+ } catch (Exception e) {}
}
- view.setVisibility(state.enabled ? View.VISIBLE : View.GONE);
- }
- });
- parent.addView(imeTile);
+ });
+ mModel.addImeTile(imeTile, new QuickSettingsModel.RefreshCallback() {
+ @Override
+ public void refreshView(QuickSettingsTileView view, State state) {
+ TextView tv = (TextView) view.findViewById(R.id.ime_textview);
+ if (state.label != null) {
+ tv.setText(state.label);
+ }
+ view.setVisibility(state.enabled ? View.VISIBLE : View.GONE);
+ }
+ });
+ parent.addView(imeTile);
+ }
// Bug reports
QuickSettingsTileView bugreportTile = (QuickSettingsTileView)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
index 5adfeb1..6b9a321 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettingsModel.java
@@ -184,7 +184,7 @@ class QuickSettingsModel implements BluetoothStateChangeCallback,
private State mLocationState = new State();
private QuickSettingsTileView mImeTile;
- private RefreshCallback mImeCallback;
+ private RefreshCallback mImeCallback = null;
private State mImeState = new State();
private QuickSettingsTileView mRotationLockTile;
@@ -551,7 +551,9 @@ class QuickSettingsModel implements BluetoothStateChangeCallback,
mImeState.enabled = (visible && needsToShowImeSwitchOngoingNotification(imm));
mImeState.label = getCurrentInputMethodName(mContext, mContext.getContentResolver(),
imm, imis, mContext.getPackageManager());
- mImeCallback.refreshView(mImeTile, mImeState);
+ if (mImeCallback != null) {
+ mImeCallback.refreshView(mImeTile, mImeState);
+ }
}
private static String getCurrentInputMethodName(Context context, ContentResolver resolver,
InputMethodManager imm, List<InputMethodInfo> imis, PackageManager pm) {