am fcf1edf4: QuickSettings: visual updates.
* commit 'fcf1edf414ac04e44205c98dc64a82e67147dc32': QuickSettings: visual updates.
This commit is contained in:
@ -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>
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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"
|
||||
|
@ -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" />
|
||||
|
@ -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" />
|
||||
|
@ -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>
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user