summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2014-05-29 20:51:09 -0400
committerJohn Spurlock <jspurlock@google.com>2014-05-29 20:51:09 -0400
commit3bd4feec3d5e5c2432a350b9ae4d7f2d8b8c69d8 (patch)
tree5fab4a66ab4a24a2647eb9655fd11dc461611ab1 /packages
parent414a486e4c721f0f8f9f86823a05422acb1c509f (diff)
downloadframeworks_base-3bd4feec3d5e5c2432a350b9ae4d7f2d8b8c69d8.zip
frameworks_base-3bd4feec3d5e5c2432a350b9ae4d7f2d8b8c69d8.tar.gz
frameworks_base-3bd4feec3d5e5c2432a350b9ae4d7f2d8b8c69d8.tar.bz2
QuickSettings: visual updates.
- Update style for do not disturb subhead. - Fix strict mode warning setting zen from volume panel. - Longer delay in volume panel when expanded. - Update zen icons. - Update header peek height. - Update detail pane back icon. Bug:15186962 Change-Id: Icb8b95656f866bf9b0aa076d0b85c019a77e76c0
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/res/drawable/ic_qs_back.xml (renamed from packages/SystemUI/res/drawable/ic_qs_close.xml)2
-rw-r--r--packages/SystemUI/res/drawable/ic_qs_zen_off.xml6
-rw-r--r--packages/SystemUI/res/drawable/ic_qs_zen_on.xml2
-rw-r--r--packages/SystemUI/res/drawable/ic_vol_zen_off.xml6
-rw-r--r--packages/SystemUI/res/drawable/ic_vol_zen_on.xml2
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_ringer_zen.xml2
-rw-r--r--packages/SystemUI/res/layout/qs_detail.xml2
-rw-r--r--packages/SystemUI/res/layout/zen_mode_condition.xml7
-rw-r--r--packages/SystemUI/res/layout/zen_mode_panel.xml9
-rw-r--r--packages/SystemUI/res/values/dimens.xml2
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java17
11 files changed, 35 insertions, 22 deletions
diff --git a/packages/SystemUI/res/drawable/ic_qs_close.xml b/packages/SystemUI/res/drawable/ic_qs_back.xml
index dd43e6c..52039f5 100644
--- a/packages/SystemUI/res/drawable/ic_qs_close.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_back.xml
@@ -24,5 +24,5 @@ Copyright (C) 2014 The Android Open Source Project
<path
android:fill="#FFFFFFFF"
- android:pathData="M19.0,6.4l-1.3999996,-1.4000001 -5.6000004,5.6000004 -5.6,-5.6000004 -1.4000001,1.4000001 5.6000004,5.6 -5.6000004,5.6000004 1.4000001,1.3999996 5.6,-5.6000004 5.6000004,5.6000004 1.3999996,-1.3999996 -5.6000004,-5.6000004z"/>
+ android:pathData="M20.0,11.0L7.8,11.0l5.6,-5.6L12.0,4.0l-8.0,8.0l8.0,8.0l1.4,-1.4L7.8,13.0L20.0,13.0L20.0,11.0z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_zen_off.xml b/packages/SystemUI/res/drawable/ic_qs_zen_off.xml
index 73886ec..88a2c3a 100644
--- a/packages/SystemUI/res/drawable/ic_qs_zen_off.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_zen_off.xml
@@ -23,8 +23,6 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportHeight="24.0"/>
<path
- android:fill="#00000000"
- android:stroke="#CCCCCC"
- android:strokeWidth="1.0"
- android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM4.0,12.0c0.0,-4.4 3.6,-8.0 8.0,-8.0c1.8,0.0 3.5,0.6 4.9,1.7L5.7,16.9C4.6,15.5 4.0,13.8 4.0,12.0zM12.0,20.0c-1.8,0.0 -3.5,-0.6 -4.9,-1.7L18.3,7.1C19.4,8.5 20.0,10.2 20.0,12.0C20.0,16.4 16.4,20.0 12.0,20.0z" />
+ android:fill="#4DFFFFFF"
+ android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM4.0,12.0c0.0,-4.4 3.6,-8.0 8.0,-8.0c1.8,0.0 3.5,0.6 4.9,1.7L5.7,16.9C4.6,15.5 4.0,13.8 4.0,12.0zM12.0,20.0c-1.8,0.0 -3.5,-0.6 -4.9,-1.7L18.3,7.1C19.4,8.5 20.0,10.2 20.0,12.0C20.0,16.4 16.4,20.0 12.0,20.0z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/ic_qs_zen_on.xml b/packages/SystemUI/res/drawable/ic_qs_zen_on.xml
index 8dff318..0e933cf 100644
--- a/packages/SystemUI/res/drawable/ic_qs_zen_on.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_zen_on.xml
@@ -24,5 +24,5 @@ Copyright (C) 2014 The Android Open Source Project
<path
android:fill="#FFFFFFFF"
- android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM4.0,12.0c0.0,-4.4 3.6,-8.0 8.0,-8.0c1.8,0.0 3.5,0.6 4.9,1.7L5.7,16.9C4.6,15.5 4.0,13.8 4.0,12.0zM12.0,20.0c-1.8,0.0 -3.5,-0.6 -4.9,-1.7L18.3,7.1C19.4,8.5 20.0,10.2 20.0,12.0C20.0,16.4 16.4,20.0 12.0,20.0z" />
+ android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM4.0,12.0c0.0,-4.4 3.6,-8.0 8.0,-8.0c1.8,0.0 3.5,0.6 4.9,1.7L5.7,16.9C4.6,15.5 4.0,13.8 4.0,12.0zM12.0,20.0c-1.8,0.0 -3.5,-0.6 -4.9,-1.7L18.3,7.1C19.4,8.5 20.0,10.2 20.0,12.0C20.0,16.4 16.4,20.0 12.0,20.0z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/ic_vol_zen_off.xml b/packages/SystemUI/res/drawable/ic_vol_zen_off.xml
index ea5ab70..51be1a8 100644
--- a/packages/SystemUI/res/drawable/ic_vol_zen_off.xml
+++ b/packages/SystemUI/res/drawable/ic_vol_zen_off.xml
@@ -23,8 +23,6 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportHeight="24.0"/>
<path
- android:fill="#00000000"
- android:stroke="#CCCCCC"
- android:strokeWidth="1.0"
- android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM4.0,12.0c0.0,-4.4 3.6,-8.0 8.0,-8.0c1.8,0.0 3.5,0.6 4.9,1.7L5.7,16.9C4.6,15.5 4.0,13.8 4.0,12.0zM12.0,20.0c-1.8,0.0 -3.5,-0.6 -4.9,-1.7L18.3,7.1C19.4,8.5 20.0,10.2 20.0,12.0C20.0,16.4 16.4,20.0 12.0,20.0z" />
+ android:fill="#4DFFFFFF"
+ android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM4.0,12.0c0.0,-4.4 3.6,-8.0 8.0,-8.0c1.8,0.0 3.5,0.6 4.9,1.7L5.7,16.9C4.6,15.5 4.0,13.8 4.0,12.0zM12.0,20.0c-1.8,0.0 -3.5,-0.6 -4.9,-1.7L18.3,7.1C19.4,8.5 20.0,10.2 20.0,12.0C20.0,16.4 16.4,20.0 12.0,20.0z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/ic_vol_zen_on.xml b/packages/SystemUI/res/drawable/ic_vol_zen_on.xml
index 44024f3..c8c217d 100644
--- a/packages/SystemUI/res/drawable/ic_vol_zen_on.xml
+++ b/packages/SystemUI/res/drawable/ic_vol_zen_on.xml
@@ -24,5 +24,5 @@ Copyright (C) 2014 The Android Open Source Project
<path
android:fill="#FFFFFFFF"
- android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM4.0,12.0c0.0,-4.4 3.6,-8.0 8.0,-8.0c1.8,0.0 3.5,0.6 4.9,1.7L5.7,16.9C4.6,15.5 4.0,13.8 4.0,12.0zM12.0,20.0c-1.8,0.0 -3.5,-0.6 -4.9,-1.7L18.3,7.1C19.4,8.5 20.0,10.2 20.0,12.0C20.0,16.4 16.4,20.0 12.0,20.0z" />
+ android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM4.0,12.0c0.0,-4.4 3.6,-8.0 8.0,-8.0c1.8,0.0 3.5,0.6 4.9,1.7L5.7,16.9C4.6,15.5 4.0,13.8 4.0,12.0zM12.0,20.0c-1.8,0.0 -3.5,-0.6 -4.9,-1.7L18.3,7.1C19.4,8.5 20.0,10.2 20.0,12.0C20.0,16.4 16.4,20.0 12.0,20.0z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_ringer_zen.xml b/packages/SystemUI/res/drawable/stat_sys_ringer_zen.xml
index afab88f..8b104d1 100644
--- a/packages/SystemUI/res/drawable/stat_sys_ringer_zen.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_ringer_zen.xml
@@ -24,5 +24,5 @@ Copyright (C) 2014 The Android Open Source Project
<path
android:fill="#FFFFFFFF"
- android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM4.0,12.0c0.0,-4.4 3.6,-8.0 8.0,-8.0c1.8,0.0 3.5,0.6 4.9,1.7L5.7,16.9C4.6,15.5 4.0,13.8 4.0,12.0zM12.0,20.0c-1.8,0.0 -3.5,-0.6 -4.9,-1.7L18.3,7.1C19.4,8.5 20.0,10.2 20.0,12.0C20.0,16.4 16.4,20.0 12.0,20.0z" />
+ android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0c5.5,0.0 10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM4.0,12.0c0.0,-4.4 3.6,-8.0 8.0,-8.0c1.8,0.0 3.5,0.6 4.9,1.7L5.7,16.9C4.6,15.5 4.0,13.8 4.0,12.0zM12.0,20.0c-1.8,0.0 -3.5,-0.6 -4.9,-1.7L18.3,7.1C19.4,8.5 20.0,10.2 20.0,12.0C20.0,16.4 16.4,20.0 12.0,20.0z"/>
</vector>
diff --git a/packages/SystemUI/res/layout/qs_detail.xml b/packages/SystemUI/res/layout/qs_detail.xml
index e73b431..e1c460c 100644
--- a/packages/SystemUI/res/layout/qs_detail.xml
+++ b/packages/SystemUI/res/layout/qs_detail.xml
@@ -26,7 +26,7 @@
android:layout_alignParentStart="true"
android:contentDescription="@string/accessibility_quick_settings_close"
android:padding="@dimen/qs_panel_padding"
- android:src="@drawable/ic_qs_close" />
+ android:src="@drawable/ic_qs_back" />
<TextView
android:id="@android:id/title"
diff --git a/packages/SystemUI/res/layout/zen_mode_condition.xml b/packages/SystemUI/res/layout/zen_mode_condition.xml
index 8b34400..6d63bb0 100644
--- a/packages/SystemUI/res/layout/zen_mode_condition.xml
+++ b/packages/SystemUI/res/layout/zen_mode_condition.xml
@@ -16,11 +16,14 @@
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="wrap_content" >
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="@dimen/zen_mode_condition_detail_button_padding"
+ android:layout_marginRight="@dimen/zen_mode_condition_detail_button_padding" >
<RadioButton
android:id="@android:id/checkbox"
- android:layout_width="32dp"
+ android:layout_width="40dp"
+ android:layout_marginStart="2dp"
android:layout_height="@dimen/zen_mode_condition_height"
android:layout_alignParentStart="true"
android:gravity="center" />
diff --git a/packages/SystemUI/res/layout/zen_mode_panel.xml b/packages/SystemUI/res/layout/zen_mode_panel.xml
index 0936cc2..0a8f852 100644
--- a/packages/SystemUI/res/layout/zen_mode_panel.xml
+++ b/packages/SystemUI/res/layout/zen_mode_panel.xml
@@ -21,9 +21,7 @@
android:layout_height="wrap_content"
android:background="@color/system_primary_color"
android:orientation="vertical"
- android:paddingTop="@dimen/qs_panel_padding"
- android:paddingLeft="@dimen/qs_panel_padding"
- android:paddingRight="@dimen/qs_panel_padding" >
+ android:paddingTop="@dimen/qs_panel_padding" >
<TextView
android:id="@android:id/title"
@@ -31,8 +29,10 @@
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_marginBottom="8dp"
+ android:layout_marginStart="@dimen/qs_panel_padding"
+ android:layout_marginEnd="@dimen/qs_panel_padding"
android:text="@string/zen_mode_title"
- android:textAppearance="@style/TextAppearance.QS.DetailHeader" />
+ android:textAppearance="@style/TextAppearance.QS.DetailItemPrimary" />
<LinearLayout
android:id="@android:id/content"
@@ -46,6 +46,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
+ android:layout_marginEnd="4dp"
android:layout_gravity="end"
android:text="@string/quick_settings_more_settings"
android:textAppearance="@style/TextAppearance.QS.DetailButton" />
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 8bcde29..4aacd4a 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -197,7 +197,7 @@
<dimen name="qs_dual_tile_padding">12dp</dimen>
<!-- How far the hidden header peeks from the top of the screen when QS is in detail mode. -->
- <dimen name="qs_header_peek_height">16dp</dimen>
+ <dimen name="qs_header_peek_height">8dp</dimen>
<!-- How far the expanded QS panel peeks from the header in collapsed state. -->
<dimen name="qs_peek_height">8dp</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
index 67f3a3d..fae0e01 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumePanel.java
@@ -31,6 +31,7 @@ import android.media.AudioSystem;
import android.media.RingtoneManager;
import android.media.ToneGenerator;
import android.net.Uri;
+import android.os.AsyncTask;
import android.os.Handler;
import android.os.Message;
import android.os.Vibrator;
@@ -76,6 +77,7 @@ public class VolumePanel extends Handler {
private static final int MAX_VOLUME = 100;
private static final int FREE_DELAY = 10000;
private static final int TIMEOUT_DELAY = 3000;
+ private static final int TIMEOUT_DELAY_EXPANDED = 10000;
private static final int MSG_VOLUME_CHANGED = 0;
private static final int MSG_FREE_RESOURCES = 1;
@@ -103,6 +105,7 @@ public class VolumePanel extends Handler {
private boolean mRingIsSilent;
private boolean mVoiceCapable;
private boolean mZenModeCapable;
+ private int mTimeoutDelay = TIMEOUT_DELAY;
// True if we want to play tones on the system stream when the master stream is specified.
private final boolean mPlayMasterStreamTones;
@@ -513,6 +516,7 @@ public class VolumePanel extends Handler {
@Override
public void onInteraction() {
+ resetTimeout();
if (mZenPanelCallback != null) {
mZenPanelCallback.onInteraction();
}
@@ -521,6 +525,8 @@ public class VolumePanel extends Handler {
}
mZenPanel.setVisibility(View.VISIBLE);
mZenPanelDivider.setVisibility(View.VISIBLE);
+ mTimeoutDelay = TIMEOUT_DELAY_EXPANDED;
+ resetTimeout();
}
private void collapse() {
@@ -529,6 +535,8 @@ public class VolumePanel extends Handler {
mZenPanel.setVisibility(View.GONE);
}
mZenPanelDivider.setVisibility(View.GONE);
+ mTimeoutDelay = TIMEOUT_DELAY;
+ resetTimeout();
}
public void updateStates() {
@@ -1082,7 +1090,7 @@ public class VolumePanel extends Handler {
public void resetTimeout() {
if (LOGD) Log.d(mTag, "resetTimeout at " + System.currentTimeMillis());
removeMessages(MSG_TIMEOUT);
- sendEmptyMessageDelayed(MSG_TIMEOUT, TIMEOUT_DELAY);
+ sendEmptyMessageDelayed(MSG_TIMEOUT, mTimeoutDelay);
}
private void forceTimeout() {
@@ -1134,7 +1142,12 @@ public class VolumePanel extends Handler {
public void onClick(View v) {
if (v == mExpandButton && mZenController != null) {
final boolean newZen = !mZenController.isZen();
- mZenController.setZen(newZen);
+ AsyncTask.execute(new Runnable() {
+ @Override
+ public void run() {
+ mZenController.setZen(newZen);
+ }
+ });
if (newZen) {
expand();
} else {