Zen: Distinct icon for DND = total silence.
Bug: 21032320 Change-Id: I0c7b8564c38b420081ee60ee244058b8039febf7
This commit is contained in:
29
packages/SystemUI/res/drawable/ic_dnd_total_silence.xml
Normal file
29
packages/SystemUI/res/drawable/ic_dnd_total_silence.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<!--
|
||||
Copyright (C) 2015 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.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0"
|
||||
android:width="24dp" >
|
||||
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0s10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM12.0,20.5c-4.7,0.0 -8.5,-3.8 -8.5,-8.5S7.3,3.5 12.0,3.5s8.5,3.8 8.5,8.5S16.7,20.5 12.0,20.5z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M12.0,6.0c-3.3,0.0 -6.0,2.7 -6.0,6.0c0.0,3.3 2.7,6.0 6.0,6.0s6.0,-2.7 6.0,-6.0C18.0,8.7 15.4,6.0 12.0,6.0zM15.0,13.0L9.0,13.0l0.0,-2.0l6.0,0.0L15.0,13.0z"/>
|
||||
|
||||
</vector>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
Copyright (C) 2015 The Android Open Source Project
|
||||
Copyright (C) 2015 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
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
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<!--
|
||||
Copyright (C) 2015 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.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="64dp"
|
||||
android:height="64dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0s10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM12.0,20.5c-4.7,0.0 -8.5,-3.8 -8.5,-8.5S7.3,3.5 12.0,3.5s8.5,3.8 8.5,8.5S16.7,20.5 12.0,20.5z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M12.0,6.0c-3.3,0.0 -6.0,2.7 -6.0,6.0c0.0,3.3 2.7,6.0 6.0,6.0s6.0,-2.7 6.0,-6.0C18.0,8.7 15.4,6.0 12.0,6.0zM15.0,13.0L9.0,13.0l0.0,-2.0l6.0,0.0L15.0,13.0z"/>
|
||||
|
||||
</vector>
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
Copyright (C) 2015 The Android Open Source Project
|
||||
Copyright (C) 2015 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
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
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<!--
|
||||
Copyright (C) 2015 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.
|
||||
-->
|
||||
<inset xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:insetLeft="2.5dp"
|
||||
android:insetRight="2.5dp">
|
||||
<vector
|
||||
android:width="17dp"
|
||||
android:height="17dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M12.0,2.0C6.5,2.0 2.0,6.5 2.0,12.0s4.5,10.0 10.0,10.0s10.0,-4.5 10.0,-10.0S17.5,2.0 12.0,2.0zM12.0,20.5c-4.7,0.0 -8.5,-3.8 -8.5,-8.5S7.3,3.5 12.0,3.5s8.5,3.8 8.5,8.5S16.7,20.5 12.0,20.5z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M12.0,6.0c-3.3,0.0 -6.0,2.7 -6.0,6.0c0.0,3.3 2.7,6.0 6.0,6.0s6.0,-2.7 6.0,-6.0C18.0,8.7 15.4,6.0 12.0,6.0zM15.0,13.0L9.0,13.0l0.0,-2.0l6.0,0.0L15.0,13.0z"/>
|
||||
</vector>
|
||||
</inset>
|
||||
@@ -41,8 +41,7 @@
|
||||
android:layout_width="@dimen/volume_button_size"
|
||||
android:layout_height="@dimen/volume_button_size"
|
||||
android:layout_marginEnd="7dp"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_dnd" />
|
||||
android:scaleType="center" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -112,7 +112,7 @@ public class DndTile extends QSTile<QSTile.BooleanState> {
|
||||
R.string.accessibility_quick_settings_dnd_priority_on);
|
||||
break;
|
||||
case Global.ZEN_MODE_NO_INTERRUPTIONS:
|
||||
state.icon = ResourceIcon.get(R.drawable.ic_qs_dnd_on);
|
||||
state.icon = ResourceIcon.get(R.drawable.ic_qs_dnd_on_total_silence);
|
||||
state.label = mContext.getString(R.string.quick_settings_dnd_none_label);
|
||||
state.contentDescription = mContext.getString(
|
||||
R.string.accessibility_quick_settings_dnd_none_on);
|
||||
|
||||
@@ -219,7 +219,8 @@ public class PhoneStatusBarPolicy {
|
||||
|
||||
if (DndTile.isVisible(mContext) || DndTile.isCombinedIcon(mContext)) {
|
||||
zenVisible = mZen != Global.ZEN_MODE_OFF;
|
||||
zenIconId = R.drawable.stat_sys_dnd;
|
||||
zenIconId = mZen == Global.ZEN_MODE_NO_INTERRUPTIONS
|
||||
? R.drawable.stat_sys_dnd_total_silence : R.drawable.stat_sys_dnd;
|
||||
zenDescription = mContext.getString(R.string.quick_settings_dnd_label);
|
||||
} else if (mZen == Global.ZEN_MODE_NO_INTERRUPTIONS) {
|
||||
zenVisible = true;
|
||||
|
||||
@@ -21,6 +21,7 @@ import android.provider.Settings.Global;
|
||||
import android.service.notification.ZenModeConfig;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -38,6 +39,7 @@ public class ZenFooter extends LinearLayout {
|
||||
private final Context mContext;
|
||||
private final SpTexts mSpTexts;
|
||||
|
||||
private ImageView mIcon;
|
||||
private TextView mSummaryLine1;
|
||||
private TextView mSummaryLine2;
|
||||
private TextView mEndNowButton;
|
||||
@@ -55,6 +57,7 @@ public class ZenFooter extends LinearLayout {
|
||||
@Override
|
||||
protected void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
mIcon = (ImageView) findViewById(R.id.volume_zen_icon);
|
||||
mSummaryLine1 = (TextView) findViewById(R.id.volume_zen_summary_line_1);
|
||||
mSummaryLine2 = (TextView) findViewById(R.id.volume_zen_summary_line_2);
|
||||
mEndNowButton = (TextView) findViewById(R.id.volume_zen_end_now);
|
||||
@@ -115,6 +118,7 @@ public class ZenFooter extends LinearLayout {
|
||||
}
|
||||
|
||||
public void update() {
|
||||
mIcon.setImageResource(isZenNone() ? R.drawable.ic_dnd_total_silence : R.drawable.ic_dnd);
|
||||
final String line1 =
|
||||
isZenPriority() ? mContext.getString(R.string.interruption_level_priority)
|
||||
: isZenAlarms() ? mContext.getString(R.string.interruption_level_alarms)
|
||||
|
||||
Reference in New Issue
Block a user