diff options
Diffstat (limited to 'packages')
223 files changed, 2633 insertions, 666 deletions
diff --git a/packages/InputDevices/res/raw/keyboard_layout_latvian_qwerty.kcm b/packages/InputDevices/res/raw/keyboard_layout_latvian_qwerty.kcm new file mode 100644 index 0000000..d4bc0c0 --- /dev/null +++ b/packages/InputDevices/res/raw/keyboard_layout_latvian_qwerty.kcm @@ -0,0 +1,362 @@ +# Copyright (C) 2014 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. + +# +# Latvian (QWERTY-US-intl based) keyboard layout. +# + +type OVERLAY + +map key 86 BACKSLASH +map key 43 POUND + +### ROW 1 + +key GRAVE { + label: '\u0300' + base: '\u0300' + shift: '\u0303' + ralt: '-' +} + +key 1 { + label: '1' + base: '1' + shift: '!' + ralt: '\u00a0' +} + +key 2 { + label: '2' + base: '2' + shift: '@' + ralt: '\u00ab' +} + +key 3 { + label: '3' + base: '3' + shift: '#' + ralt: '\u00bb' +} + +key 4 { + label: '4' + base: '4' + shift: '$' + ralt: '\u20ac' + ralt+shift: '\u00a7' +} + +key 5 { + label: '5' + base: '5' + shift: '%' + ralt+shift: '\u00b0' +} + +key 6 { + label: '6' + base: '6' + shift: '\u0302' + ralt: '\u2019' +} + +key 7 { + label: '7' + base: '7' + shift: '&' + ralt+shift: '\u00b1' +} + +key 8 { + label: '8' + base: '8' + shift: '*' + ralt+shift: '\u00d7' +} + +key 9 { + label: '9' + base: '9' + shift: '(' +} + +key 0 { + label: '0' + base: '0' + shift: ')' +} + +key MINUS { + label: '-' + base: '-' + shift: '_' + ralt: '\u2013' + ralt+shift: '\u2014' +} + +key EQUALS { + label: '=' + base: '=' + shift: '+' +} + +### ROW 2 + +key Q { + label: 'Q' + base: 'q' + shift, capslock: 'Q' +} + +key W { + label: 'W' + base: 'w' + shift, capslock: 'W' +} + +key E { + label: 'E' + base: 'e' + shift, capslock: 'E' + ralt: '\u0113' + shift+ralt, ralt+capslock: '\u0112' +} + +key R { + label: 'R' + base: 'r' + shift, capslock: 'R' + ralt: '\u0157' + shift+ralt, ralt+capslock: '\u0156' +} + +key T { + label: 'T' + base: 't' + shift, capslock: 'T' +} + +key Y { + label: 'Y' + base: 'y' + shift, capslock: 'Y' +} + +key U { + label: 'U' + base: 'u' + shift, capslock: 'U' + ralt: '\u016b' + shift+ralt, ralt+capslock: '\u016a' +} + +key I { + label: 'I' + base: 'i' + shift, capslock: 'I' + ralt: '\u012b' + shift+ralt, ralt+capslock: '\u012a' +} + +key O { + label: 'O' + base: 'o' + shift, capslock: 'O' + ralt: '\u00f5' + shift+ralt, ralt+capslock: '\u00d5' +} + +key P { + label: 'P' + base: 'p' + shift, capslock: 'P' +} + +key LEFT_BRACKET { + label: '[' + base: '[' + shift: '{' +} + +key RIGHT_BRACKET { + label: ']' + base: ']' + shift: '}' +} + + +### ROW 3 + +key A { + label: 'A' + base: 'a' + shift, capslock: 'A' + ralt: '\u0101' + shift+ralt, ralt+capslock: '\u0100' +} + +key S { + label: 'S' + base: 's' + shift, capslock: 'S' + ralt: '\u0161' + shift+ralt, ralt+capslock: '\u0160' +} + +key D { + label: 'D' + base: 'd' + shift, capslock: 'D' +} + +key F { + label: 'F' + base: 'f' + shift, capslock: 'F' +} + +key G { + label: 'G' + base: 'g' + shift, capslock: 'G' + ralt: '\u0123' + shift+ralt, ralt+capslock: '\u0122' +} + +key H { + label: 'H' + base: 'h' + shift, capslock: 'H' +} + +key J { + label: 'J' + base: 'j' + shift, capslock: 'J' +} + +key K { + label: 'K' + base: 'k' + shift, capslock: 'K' + ralt: '\u0137' + shift+ralt, ralt+capslock: '\u0136' +} + +key L { + label: 'L' + base: 'l' + shift, capslock: 'L' + ralt: '\u013c' + shift+ralt, ralt+capslock: '\u013b' +} + +key SEMICOLON { + label: ';' + base: ';' + shift: ':' +} + +key APOSTROPHE { + label: '\'' + base: '\'' + shift: '"' + ralt: '\u0301' + shift+ralt: '\u0308' +} + +key POUND { + label: '\u00b0' + base: '\u00b0' + shift: '|' +} + +### ROW 4 + +key BACKSLASH { + label: '\\' + base: '\\' + shift: '|' + ralt: '\u00ac' + shift+ralt: '\u00a6' +} + +key Z { + label: 'Z' + base: 'z' + shift, capslock: 'Z' + ralt: '\u017e' + shift+ralt, ralt+capslock: '\u017d' +} + +key X { + label: 'X' + base: 'x' + shift, capslock: 'X' +} + +key C { + label: 'C' + base: 'c' + shift, capslock: 'C' + ralt: '\u010d' + shift+ralt, ralt+capslock: '\u010c' +} + +key V { + label: 'V' + base: 'v' + shift, capslock: 'V' +} + +key B { + label: 'B' + base: 'b' + shift, capslock: 'B' +} + +key N { + label: 'N' + base: 'n' + shift, capslock: 'N' + ralt: '\u0146' + shift+ralt, ralt+capslock: '\u0145' +} + +key M { + label: 'M' + base: 'm' + shift, capslock: 'M' +} + +key COMMA { + label: ',' + base: ',' + shift: '<' +} + +key PERIOD { + label: '.' + base: '.' + shift: '>' +} + +key SLASH { + label: '/' + base: '/' + shift: '?' + ralt: '\u00bf' +} diff --git a/packages/InputDevices/res/values/strings.xml b/packages/InputDevices/res/values/strings.xml index 6239336..968961a 100644 --- a/packages/InputDevices/res/values/strings.xml +++ b/packages/InputDevices/res/values/strings.xml @@ -113,4 +113,7 @@ <!-- Spanish (Latin) keyboard layout label. [CHAR LIMIT=35] --> <string name="keyboard_layout_spanish_latin">Spanish (Latin)</string> + + <!-- Latvian keyboard layout label. [CHAR LIMIT=35] --> + <string name="keyboard_layout_latvian">Latvian</string> </resources> diff --git a/packages/InputDevices/res/xml/keyboard_layouts.xml b/packages/InputDevices/res/xml/keyboard_layouts.xml index dc1db0b..6f7253c 100644 --- a/packages/InputDevices/res/xml/keyboard_layouts.xml +++ b/packages/InputDevices/res/xml/keyboard_layouts.xml @@ -143,4 +143,8 @@ <keyboard-layout android:name="keyboard_layout_spanish_latin" android:label="@string/keyboard_layout_spanish_latin" android:keyboardLayout="@raw/keyboard_layout_spanish_latin" /> + + <keyboard-layout android:name="keyboard_layout_latvian" + android:label="@string/keyboard_layout_latvian" + android:keyboardLayout="@raw/keyboard_layout_latvian_qwerty" /> </keyboard-layouts> diff --git a/packages/Keyguard/res/layout/keyguard_status_view.xml b/packages/Keyguard/res/layout/keyguard_status_view.xml index 0d943ed..f79819f 100644 --- a/packages/Keyguard/res/layout/keyguard_status_view.xml +++ b/packages/Keyguard/res/layout/keyguard_status_view.xml @@ -28,8 +28,6 @@ androidprv:layout_maxWidth="@dimen/keyguard_security_width" androidprv:layout_maxHeight="@dimen/keyguard_security_height" android:gravity="center_horizontal|top" - android:layout_marginTop="48dp" - android:layout_marginBottom="32dp" android:contentDescription="@string/keyguard_accessibility_status"> <LinearLayout android:layout_width="match_parent" diff --git a/packages/Keyguard/res/values-sw600dp-land/dimens.xml b/packages/Keyguard/res/values-sw600dp-land/dimens.xml index 5507e5f..5615ff7 100644 --- a/packages/Keyguard/res/values-sw600dp-land/dimens.xml +++ b/packages/Keyguard/res/values-sw600dp-land/dimens.xml @@ -23,4 +23,8 @@ <!-- Size of margin on the right of keyguard's status view --> <dimen name="kg_status_line_font_right_margin">16dp</dimen> + + <!-- Overload default clock widget parameters --> + <dimen name="widget_big_font_size">88dp</dimen> + <dimen name="bottom_text_spacing_digital">-24dp</dimen> </resources>
\ No newline at end of file diff --git a/packages/Keyguard/res/values-sw600dp/dimens.xml b/packages/Keyguard/res/values-sw600dp/dimens.xml index 25e86e1..a5e93dc 100644 --- a/packages/Keyguard/res/values-sw600dp/dimens.xml +++ b/packages/Keyguard/res/values-sw600dp/dimens.xml @@ -63,8 +63,9 @@ <dimen name="keyguard_muliuser_selector_margin">12dp</dimen> <!-- Overload default clock widget parameters --> - <dimen name="widget_label_font_size">16dp</dimen> - <dimen name="widget_big_font_size">141dp</dimen> + <dimen name="widget_big_font_size">96dp</dimen> + <dimen name="widget_label_font_size">16sp</dimen> + <dimen name="bottom_text_spacing_digital">-24dp</dimen> <!-- EmergencyCarrierArea overlap - amount to overlap the emergency button and carrier text. Should be 0 on devices with plenty of room (e.g. tablets) --> diff --git a/packages/Keyguard/res/values-sw720dp/dimens.xml b/packages/Keyguard/res/values-sw720dp/dimens.xml index 30b979c..c487072 100644 --- a/packages/Keyguard/res/values-sw720dp/dimens.xml +++ b/packages/Keyguard/res/values-sw720dp/dimens.xml @@ -61,7 +61,4 @@ <!-- Height of the sliding KeyguardSecurityContainer (includes 2x keyguard_security_view_margin) --> <dimen name="keyguard_security_height">420dp</dimen> - <!-- Default clock parameters --> - <dimen name="widget_label_font_size">19dp</dimen> - </resources> diff --git a/packages/Keyguard/res/values/dimens.xml b/packages/Keyguard/res/values/dimens.xml index c05f834..6224aed 100644 --- a/packages/Keyguard/res/values/dimens.xml +++ b/packages/Keyguard/res/values/dimens.xml @@ -155,10 +155,10 @@ <dimen name="eca_overlap">-10dip</dimen> <!-- Default clock parameters --> - <dimen name="bottom_text_spacing_digital">-8dp</dimen> + <dimen name="bottom_text_spacing_digital">-18dp</dimen> <dimen name="label_font_size">14dp</dimen> - <dimen name="widget_label_font_size">14dp</dimen> - <dimen name="widget_big_font_size">60dp</dimen> + <dimen name="widget_label_font_size">14sp</dimen> + <dimen name="widget_big_font_size">68dp</dimen> <dimen name="big_font_size">120dp</dimen> </resources> diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java index 8425c48..94edc07 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityContainer.java @@ -42,6 +42,8 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe private boolean mIsBouncing; private SecurityCallback mSecurityCallback; + private final KeyguardUpdateMonitor mUpdateMonitor; + // Used to notify the container when something interesting happens. public interface SecurityCallback { public boolean dismiss(boolean authenticated); @@ -62,6 +64,7 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe super(context, attrs, defStyle); mSecurityModel = new KeyguardSecurityModel(context); mLockPatternUtils = new LockPatternUtils(context); + mUpdateMonitor = KeyguardUpdateMonitor.getInstance(mContext); } public void setSecurityCallback(SecurityCallback callback) { @@ -303,7 +306,9 @@ public class KeyguardSecurityContainer extends FrameLayout implements KeyguardSe boolean showNextSecurityScreenOrFinish(boolean authenticated) { if (DEBUG) Log.d(TAG, "showNextSecurityScreenOrFinish(" + authenticated + ")"); boolean finish = false; - if (SecurityMode.None == mCurrentSecuritySelection) { + if (mUpdateMonitor.getUserHasTrust(mLockPatternUtils.getCurrentUser())) { + finish = true; + } else if (SecurityMode.None == mCurrentSecuritySelection) { SecurityMode securityMode = mSecurityModel.getSecurityMode(); // Allow an alternate, such as biometric unlock securityMode = mSecurityModel.getAlternateFor(securityMode); diff --git a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java index 2d492db..5ef41c9 100644 --- a/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java +++ b/packages/Keyguard/src/com/android/keyguard/KeyguardSecurityModel.java @@ -83,8 +83,6 @@ public class KeyguardSecurityModel { } else if (simState == IccCardConstants.State.PUK_REQUIRED && mLockPatternUtils.isPukUnlockScreenEnable()) { mode = SecurityMode.SimPuk; - } else if (updateMonitor.getUserHasTrust(mLockPatternUtils.getCurrentUser())) { - mode = SecurityMode.None; } else { final int security = mLockPatternUtils.getKeyguardStoredPasswordQuality(); switch (security) { diff --git a/packages/Keyguard/test/SampleTrustAgent/AndroidManifest.xml b/packages/Keyguard/test/SampleTrustAgent/AndroidManifest.xml index 1511911..7904927 100644 --- a/packages/Keyguard/test/SampleTrustAgent/AndroidManifest.xml +++ b/packages/Keyguard/test/SampleTrustAgent/AndroidManifest.xml @@ -22,6 +22,7 @@ <service android:name=".SampleTrustAgent" android:label="@string/app_name" + android:permission="android.permission.BIND_TRUST_AGENT" android:exported="true"> <intent-filter> <action android:name="android.service.trust.TrustAgentService" /> diff --git a/packages/Keyguard/test/SampleTrustAgent/res/xml/sample_trust_agent.xml b/packages/Keyguard/test/SampleTrustAgent/res/xml/sample_trust_agent.xml index b48e011..b363ab4 100644 --- a/packages/Keyguard/test/SampleTrustAgent/res/xml/sample_trust_agent.xml +++ b/packages/Keyguard/test/SampleTrustAgent/res/xml/sample_trust_agent.xml @@ -14,5 +14,5 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License --> -<trust_agent xmlns:android="http://schemas.android.com/apk/res/android" +<trust-agent xmlns:android="http://schemas.android.com/apk/res/android" android:settingsActivity=".SampleTrustAgentSettings" /> diff --git a/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgent.java b/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgent.java index 25406d6..a51ea75 100644 --- a/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgent.java +++ b/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgent.java @@ -31,7 +31,7 @@ public class SampleTrustAgent extends TrustAgentService { LocalBroadcastManager mLocalBroadcastManager; - private static final String ACTION_ENABLE_TRUST = "action.sample_trust_agent.enable_trust"; + private static final String ACTION_GRANT_TRUST = "action.sample_trust_agent.grant_trust"; private static final String ACTION_REVOKE_TRUST = "action.sample_trust_agent.revoke_trust"; private static final String EXTRA_MESSAGE = "extra.message"; @@ -45,14 +45,14 @@ public class SampleTrustAgent extends TrustAgentService { public void onCreate() { super.onCreate(); IntentFilter filter = new IntentFilter(); - filter.addAction(ACTION_ENABLE_TRUST); + filter.addAction(ACTION_GRANT_TRUST); filter.addAction(ACTION_REVOKE_TRUST); mLocalBroadcastManager = LocalBroadcastManager.getInstance(this); mLocalBroadcastManager.registerReceiver(mReceiver, filter); } @Override - protected void onUnlockAttempt(boolean successful) { + public void onUnlockAttempt(boolean successful) { if (getReportUnlockAttempts(this)) { Toast.makeText(this, "onUnlockAttempt(successful=" + successful + ")", Toast.LENGTH_SHORT).show(); @@ -69,8 +69,8 @@ public class SampleTrustAgent extends TrustAgentService { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); - if (ACTION_ENABLE_TRUST.equals(action)) { - enableTrust(intent.getStringExtra(EXTRA_MESSAGE), + if (ACTION_GRANT_TRUST.equals(action)) { + grantTrust(intent.getStringExtra(EXTRA_MESSAGE), intent.getLongExtra(EXTRA_DURATION, 0), false /* initiatedByUser */); } else if (ACTION_REVOKE_TRUST.equals(action)) { @@ -79,9 +79,9 @@ public class SampleTrustAgent extends TrustAgentService { } }; - public static void sendEnableTrust(Context context, + public static void sendGrantTrust(Context context, String message, long durationMs, Bundle extra) { - Intent intent = new Intent(ACTION_ENABLE_TRUST); + Intent intent = new Intent(ACTION_GRANT_TRUST); intent.putExtra(EXTRA_MESSAGE, message); intent.putExtra(EXTRA_DURATION, durationMs); intent.putExtra(EXTRA_EXTRA, extra); diff --git a/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgentSettings.java b/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgentSettings.java index 0a6f675..8e293fb 100644 --- a/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgentSettings.java +++ b/packages/Keyguard/test/SampleTrustAgent/src/com/android/trustagent/test/SampleTrustAgentSettings.java @@ -19,7 +19,6 @@ package com.android.trustagent.test; import android.annotation.Nullable; import android.app.Activity; import android.os.Bundle; -import android.preference.CheckBoxPreference; import android.view.View; import android.widget.CheckBox; import android.widget.CompoundButton; @@ -53,7 +52,7 @@ public class SampleTrustAgentSettings extends Activity implements View.OnClickLi public void onClick(View v) { int id = v.getId(); if (id == R.id.enable_trust) { - SampleTrustAgent.sendEnableTrust(this, "SampleTrustAgent", TRUST_DURATION_MS, + SampleTrustAgent.sendGrantTrust(this, "SampleTrustAgent", TRUST_DURATION_MS, null /* extra */); } else if (id == R.id.revoke_trust) { SampleTrustAgent.sendRevokeTrust(this); diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_off.png Binary files differdeleted file mode 100644 index 6f48fe8..0000000 --- a/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_on.png Binary files differdeleted file mode 100644 index 5f2e95a..0000000 --- a/packages/SystemUI/res/drawable-hdpi/ic_qs_airplane_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_not_connected.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_not_connected.png Binary files differdeleted file mode 100644 index e417a19..0000000 --- a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_not_connected.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_off.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_off.png Binary files differdeleted file mode 100644 index f325220..0000000 --- a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_on.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_on.png Binary files differdeleted file mode 100644 index ee88a1b..0000000 --- a/packages/SystemUI/res/drawable-hdpi/ic_qs_bluetooth_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_0.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_0.png Binary files differdeleted file mode 100644 index 48606a8..0000000 --- a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_0.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_1.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_1.png Binary files differdeleted file mode 100644 index d006f13..0000000 --- a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_1.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_2.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_2.png Binary files differdeleted file mode 100644 index 867947b..0000000 --- a/packages/SystemUI/res/drawable-hdpi/ic_qs_cast_connecting_2.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_color_space_alpha.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_color_space_alpha.png Binary files differdeleted file mode 100644 index fe6dc52..0000000 --- a/packages/SystemUI/res/drawable-hdpi/ic_qs_color_space_alpha.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_inversion_alpha.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_inversion_alpha.png Binary files differdeleted file mode 100644 index aea75c1..0000000 --- a/packages/SystemUI/res/drawable-hdpi/ic_qs_inversion_alpha.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_location_off.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_location_off.png Binary files differdeleted file mode 100644 index 189f27b..0000000 --- a/packages/SystemUI/res/drawable-hdpi/ic_qs_location_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/ic_qs_location_on.png b/packages/SystemUI/res/drawable-hdpi/ic_qs_location_on.png Binary files differdeleted file mode 100644 index b03d30c..0000000 --- a/packages/SystemUI/res/drawable-hdpi/ic_qs_location_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_silent.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_silent.png Binary files differdeleted file mode 100644 index 58f67d0..0000000 --- a/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_silent.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_vibrate.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_vibrate.png Binary files differdeleted file mode 100644 index b794c9a..0000000 --- a/packages/SystemUI/res/drawable-hdpi/stat_sys_ringer_vibrate.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_zen_full.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_zen_full.png Binary files differdeleted file mode 100644 index fa23e85..0000000 --- a/packages/SystemUI/res/drawable-hdpi/stat_sys_zen_full.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_zen_limited.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_zen_limited.png Binary files differdeleted file mode 100644 index aa8635c..0000000 --- a/packages/SystemUI/res/drawable-hdpi/stat_sys_zen_limited.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_qs_airplane_off.png Binary files differdeleted file mode 100644 index c36809b..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_qs_airplane_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_qs_airplane_on.png Binary files differdeleted file mode 100644 index 6158c01..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-hdpi/ic_qs_airplane_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-hdpi/stat_sys_ringer_silent.png b/packages/SystemUI/res/drawable-ldrtl-hdpi/stat_sys_ringer_silent.png Binary files differdeleted file mode 100644 index f3e9da2..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-hdpi/stat_sys_ringer_silent.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-hdpi/stat_sys_ringer_vibrate.png b/packages/SystemUI/res/drawable-ldrtl-hdpi/stat_sys_ringer_vibrate.png Binary files differdeleted file mode 100644 index a90aef9..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-hdpi/stat_sys_ringer_vibrate.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_qs_airplane_off.png Binary files differdeleted file mode 100644 index 084799a..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_qs_airplane_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_qs_airplane_on.png Binary files differdeleted file mode 100644 index c37ba79..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-mdpi/ic_qs_airplane_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-mdpi/stat_sys_ringer_silent.png b/packages/SystemUI/res/drawable-ldrtl-mdpi/stat_sys_ringer_silent.png Binary files differdeleted file mode 100644 index b05bf78..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-mdpi/stat_sys_ringer_silent.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-mdpi/stat_sys_ringer_vibrate.png b/packages/SystemUI/res/drawable-ldrtl-mdpi/stat_sys_ringer_vibrate.png Binary files differdeleted file mode 100644 index 2f782cf..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-mdpi/stat_sys_ringer_vibrate.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_qs_airplane_off.png Binary files differdeleted file mode 100644 index 714f07e..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_qs_airplane_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_qs_airplane_on.png Binary files differdeleted file mode 100644 index d59f0e9..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-xhdpi/ic_qs_airplane_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-xhdpi/stat_sys_ringer_silent.png b/packages/SystemUI/res/drawable-ldrtl-xhdpi/stat_sys_ringer_silent.png Binary files differdeleted file mode 100644 index 8299301..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-xhdpi/stat_sys_ringer_silent.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-xhdpi/stat_sys_ringer_vibrate.png b/packages/SystemUI/res/drawable-ldrtl-xhdpi/stat_sys_ringer_vibrate.png Binary files differdeleted file mode 100644 index e171d53..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-xhdpi/stat_sys_ringer_vibrate.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_qs_airplane_off.png Binary files differdeleted file mode 100644 index 6fc556d..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_qs_airplane_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_qs_airplane_on.png Binary files differdeleted file mode 100644 index a2342fc..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/ic_qs_airplane_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/stat_sys_ringer_silent.png b/packages/SystemUI/res/drawable-ldrtl-xxhdpi/stat_sys_ringer_silent.png Binary files differdeleted file mode 100644 index 1c847da..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/stat_sys_ringer_silent.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/stat_sys_ringer_vibrate.png b/packages/SystemUI/res/drawable-ldrtl-xxhdpi/stat_sys_ringer_vibrate.png Binary files differdeleted file mode 100644 index d0ab910..0000000 --- a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/stat_sys_ringer_vibrate.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_off.png Binary files differdeleted file mode 100644 index 95df4d45..0000000 --- a/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_on.png Binary files differdeleted file mode 100644 index 251fc30..0000000 --- a/packages/SystemUI/res/drawable-mdpi/ic_qs_airplane_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_not_connected.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_not_connected.png Binary files differdeleted file mode 100644 index b01b27f..0000000 --- a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_not_connected.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_off.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_off.png Binary files differdeleted file mode 100644 index 541e801..0000000 --- a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_on.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_on.png Binary files differdeleted file mode 100644 index 0acf3a4..0000000 --- a/packages/SystemUI/res/drawable-mdpi/ic_qs_bluetooth_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_0.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_0.png Binary files differdeleted file mode 100644 index 25fc759..0000000 --- a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_0.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_1.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_1.png Binary files differdeleted file mode 100644 index 9dfc3c6..0000000 --- a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_1.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_2.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_2.png Binary files differdeleted file mode 100644 index 82f4113..0000000 --- a/packages/SystemUI/res/drawable-mdpi/ic_qs_cast_connecting_2.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_color_space_alpha.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_color_space_alpha.png Binary files differdeleted file mode 100644 index 18b6029..0000000 --- a/packages/SystemUI/res/drawable-mdpi/ic_qs_color_space_alpha.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_inversion_alpha.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_inversion_alpha.png Binary files differdeleted file mode 100644 index b6ea14e..0000000 --- a/packages/SystemUI/res/drawable-mdpi/ic_qs_inversion_alpha.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_location_off.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_location_off.png Binary files differdeleted file mode 100644 index b692107..0000000 --- a/packages/SystemUI/res/drawable-mdpi/ic_qs_location_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/ic_qs_location_on.png b/packages/SystemUI/res/drawable-mdpi/ic_qs_location_on.png Binary files differdeleted file mode 100644 index 867c57d..0000000 --- a/packages/SystemUI/res/drawable-mdpi/ic_qs_location_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_silent.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_silent.png Binary files differdeleted file mode 100644 index 1e05a91..0000000 --- a/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_silent.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_vibrate.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_vibrate.png Binary files differdeleted file mode 100644 index f4afa52..0000000 --- a/packages/SystemUI/res/drawable-mdpi/stat_sys_ringer_vibrate.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_zen_full.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_zen_full.png Binary files differdeleted file mode 100644 index b0185a5..0000000 --- a/packages/SystemUI/res/drawable-mdpi/stat_sys_zen_full.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_zen_limited.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_zen_limited.png Binary files differdeleted file mode 100644 index 949ab10..0000000 --- a/packages/SystemUI/res/drawable-mdpi/stat_sys_zen_limited.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_off.png Binary files differdeleted file mode 100644 index 4411097..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_on.png Binary files differdeleted file mode 100644 index 79e4ff6..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_airplane_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_not_connected.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_not_connected.png Binary files differdeleted file mode 100644 index ce965c2..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_not_connected.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_off.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_off.png Binary files differdeleted file mode 100644 index c798fd6..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_on.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_on.png Binary files differdeleted file mode 100644 index ac5b09d..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_bluetooth_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_0.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_0.png Binary files differdeleted file mode 100644 index 945c606..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_0.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_1.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_1.png Binary files differdeleted file mode 100644 index 0a3f73e..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_1.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_2.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_2.png Binary files differdeleted file mode 100644 index 398cbef..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_cast_connecting_2.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_color_space_alpha.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_color_space_alpha.png Binary files differdeleted file mode 100644 index 95cf67f..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_color_space_alpha.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_inversion_alpha.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_inversion_alpha.png Binary files differdeleted file mode 100644 index efd8b9e..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_inversion_alpha.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_location_off.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_location_off.png Binary files differdeleted file mode 100644 index 7ce8f83..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_location_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/ic_qs_location_on.png b/packages/SystemUI/res/drawable-xhdpi/ic_qs_location_on.png Binary files differdeleted file mode 100644 index 6300bdc..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/ic_qs_location_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_ringer_silent.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_ringer_silent.png Binary files differdeleted file mode 100644 index 662d062..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_ringer_silent.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_ringer_vibrate.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_ringer_vibrate.png Binary files differdeleted file mode 100644 index 18be9c0..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_ringer_vibrate.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_zen_full.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_zen_full.png Binary files differdeleted file mode 100644 index 7f7cb63..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_zen_full.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_zen_limited.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_zen_limited.png Binary files differdeleted file mode 100644 index abdeb3b..0000000 --- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_zen_limited.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_airplane_off.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_airplane_off.png Binary files differdeleted file mode 100644 index 65b0204..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_airplane_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_airplane_on.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_airplane_on.png Binary files differdeleted file mode 100644 index dd16165..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_airplane_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_not_connected.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_not_connected.png Binary files differdeleted file mode 100644 index c5b7333..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_not_connected.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_off.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_off.png Binary files differdeleted file mode 100644 index 1045e07..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_on.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_on.png Binary files differdeleted file mode 100644 index 7c20110..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_bluetooth_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_0.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_0.png Binary files differdeleted file mode 100644 index 4621d18..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_0.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_1.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_1.png Binary files differdeleted file mode 100644 index a1ab61b..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_1.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_2.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_2.png Binary files differdeleted file mode 100644 index ea42a7f..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_cast_connecting_2.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_color_space_alpha.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_color_space_alpha.png Binary files differdeleted file mode 100644 index 7f441c8..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_color_space_alpha.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_inversion_alpha.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_inversion_alpha.png Binary files differdeleted file mode 100644 index ce9bae2..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_inversion_alpha.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_location_off.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_location_off.png Binary files differdeleted file mode 100644 index c14c1bb..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_location_off.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_location_on.png b/packages/SystemUI/res/drawable-xxhdpi/ic_qs_location_on.png Binary files differdeleted file mode 100644 index d6d4c70..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/ic_qs_location_on.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_ringer_silent.png b/packages/SystemUI/res/drawable-xxhdpi/stat_sys_ringer_silent.png Binary files differdeleted file mode 100644 index aabf0aa..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_ringer_silent.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_ringer_vibrate.png b/packages/SystemUI/res/drawable-xxhdpi/stat_sys_ringer_vibrate.png Binary files differdeleted file mode 100644 index 654c2a5..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_ringer_vibrate.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_zen_full.png b/packages/SystemUI/res/drawable-xxhdpi/stat_sys_zen_full.png Binary files differdeleted file mode 100644 index afe85b4..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_zen_full.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_zen_limited.png b/packages/SystemUI/res/drawable-xxhdpi/stat_sys_zen_limited.png Binary files differdeleted file mode 100644 index 5e5053f..0000000 --- a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_zen_limited.png +++ /dev/null diff --git a/packages/SystemUI/res/drawable/ic_qs_airplane_off.xml b/packages/SystemUI/res/drawable/ic_qs_airplane_off.xml new file mode 100644 index 0000000..9f0ec67 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_airplane_off.xml @@ -0,0 +1,35 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:fill="#00000000" + android:stroke="#CCCCCC" + android:strokeWidth="1.0" + android:pathData="M10.2,9.0"/> + <path + android:fill="#00000000" + android:stroke="#CCCCCC" + android:strokeWidth="1.0" + android:pathData="M21.0,16.0l0.0,-2.0l-8.0,-5.0L13.0,3.5C13.0,2.7 12.3,2.0 11.5,2.0C10.7,2.0 10.0,2.7 10.0,3.5L10.0,9.0l-8.0,5.0l0.0,2.0l8.0,-2.5L10.0,19.0l-2.0,1.5L8.0,22.0l3.5,-1.0l3.5,1.0l0.0,-1.5L13.0,19.0l0.0,-5.5L21.0,16.0z"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_airplane.xml b/packages/SystemUI/res/drawable/ic_qs_airplane_on.xml index ffe571f..95c20bb 100644 --- a/packages/SystemUI/res/drawable/ic_qs_airplane.xml +++ b/packages/SystemUI/res/drawable/ic_qs_airplane_on.xml @@ -23,9 +23,9 @@ Copyright (C) 2014 The Android Open Source Project android:viewportHeight="24.0"/> <path - android:fill="#FF000000" + android:fill="#FFFFFFFF" android:pathData="M10.2,9.0"/> <path - android:fill="#FF000000" + android:fill="#FFFFFFFF" android:pathData="M21.0,16.0l0.0,-2.0l-8.0,-5.0L13.0,3.5C13.0,2.7 12.3,2.0 11.5,2.0C10.7,2.0 10.0,2.7 10.0,3.5L10.0,9.0l-8.0,5.0l0.0,2.0l8.0,-2.5L10.0,19.0l-2.0,1.5L8.0,22.0l3.5,-1.0l3.5,1.0l0.0,-1.5L13.0,19.0l0.0,-5.5L21.0,16.0z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_bluetooth.xml b/packages/SystemUI/res/drawable/ic_qs_bluetooth_connected.xml index 22d0dcf..61a7777 100644 --- a/packages/SystemUI/res/drawable/ic_qs_bluetooth.xml +++ b/packages/SystemUI/res/drawable/ic_qs_bluetooth_connected.xml @@ -23,6 +23,6 @@ Copyright (C) 2014 The Android Open Source Project android:viewportHeight="24.0"/> <path - android:fill="#FF000000" + android:fill="#FFFFFFFF" android:pathData="M17.7,7.7L12.0,2.0l-1.0,0.0l0.0,7.6L6.4,5.0L5.0,6.4l5.6,5.6L5.0,17.6L6.4,19.0l4.6,-4.6L11.0,22.0l1.0,0.0l5.7,-5.7L13.4,12.0L17.7,7.7zM13.0,5.8l1.9,1.9L13.0,9.6L13.0,5.8zM14.9,16.3L13.0,18.2l0.0,-3.8L14.9,16.3z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_bluetooth_off.xml b/packages/SystemUI/res/drawable/ic_qs_bluetooth_off.xml new file mode 100644 index 0000000..7ac1cb9 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_bluetooth_off.xml @@ -0,0 +1,30 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:fill="#00000000" + android:stroke="#CCCCCC" + android:strokeWidth="1.0" + android:pathData="M17.7,7.7L12.0,2.0l-1.0,0.0l0.0,7.6L6.4,5.0L5.0,6.4l5.6,5.6L5.0,17.6L6.4,19.0l4.6,-4.6L11.0,22.0l1.0,0.0l5.7,-5.7L13.4,12.0L17.7,7.7zM13.0,5.8l1.9,1.9L13.0,9.6L13.0,5.8zM14.9,16.3L13.0,18.2l0.0,-3.8L14.9,16.3z"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_location.xml b/packages/SystemUI/res/drawable/ic_qs_bluetooth_on.xml index e6e98a0..61a7777 100644 --- a/packages/SystemUI/res/drawable/ic_qs_location.xml +++ b/packages/SystemUI/res/drawable/ic_qs_bluetooth_on.xml @@ -23,6 +23,6 @@ Copyright (C) 2014 The Android Open Source Project android:viewportHeight="24.0"/> <path - android:fill="#FF000000" - android:pathData="M12.0,2.0C8.1,2.0 5.0,5.1 5.0,9.0c0.0,5.2 7.0,13.0 7.0,13.0s7.0,-7.8 7.0,-13.0C19.0,5.1 15.9,2.0 12.0,2.0zM12.0,11.5c-1.4,0.0 -2.5,-1.1 -2.5,-2.5s1.1,-2.5 2.5,-2.5c1.4,0.0 2.5,1.1 2.5,2.5S13.4,11.5 12.0,11.5z"/> + android:fill="#FFFFFFFF" + android:pathData="M17.7,7.7L12.0,2.0l-1.0,0.0l0.0,7.6L6.4,5.0L5.0,6.4l5.6,5.6L5.0,17.6L6.4,19.0l4.6,-4.6L11.0,22.0l1.0,0.0l5.7,-5.7L13.4,12.0L17.7,7.7zM13.0,5.8l1.9,1.9L13.0,9.6L13.0,5.8zM14.9,16.3L13.0,18.2l0.0,-3.8L14.9,16.3z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_bugreport.xml b/packages/SystemUI/res/drawable/ic_qs_bugreport.xml index 2dfe183..2958848 100644 --- a/packages/SystemUI/res/drawable/ic_qs_bugreport.xml +++ b/packages/SystemUI/res/drawable/ic_qs_bugreport.xml @@ -23,6 +23,6 @@ Copyright (C) 2014 The Android Open Source Project android:viewportHeight="24.0"/> <path - android:fill="#FF000000" + android:fill="#FFFFFFFF" android:pathData="M20.0,8.0l-2.8,0.0c-0.5,-0.8 -1.1,-1.5 -1.8,-2.0L17.0,4.4L15.6,3.0l-2.2,2.2C13.0,5.1 12.5,5.0 12.0,5.0s-1.0,0.1 -1.4,0.2L8.4,3.0L7.0,4.4L8.6,6.0C7.9,6.5 7.3,7.2 6.8,8.0L4.0,8.0l0.0,2.0l2.1,0.0C6.0,10.3 6.0,10.7 6.0,11.0l0.0,1.0L4.0,12.0l0.0,2.0l2.0,0.0l0.0,1.0c0.0,0.3 0.0,0.7 0.1,1.0L4.0,16.0l0.0,2.0l2.8,0.0c1.0,1.8 3.0,3.0 5.2,3.0s4.2,-1.2 5.2,-3.0L20.0,18.0l0.0,-2.0l-2.1,0.0c0.1,-0.3 0.1,-0.7 0.1,-1.0l0.0,-1.0l2.0,0.0l0.0,-2.0l-2.0,0.0l0.0,-1.0c0.0,-0.3 0.0,-0.7 -0.1,-1.0L20.0,10.0L20.0,8.0zM14.0,16.0l-4.0,0.0l0.0,-2.0l4.0,0.0L14.0,16.0zM14.0,12.0l-4.0,0.0l0.0,-2.0l4.0,0.0L14.0,12.0z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_cast_connecting.xml b/packages/SystemUI/res/drawable/ic_qs_cast_connecting.xml deleted file mode 100644 index 70db2a9..0000000 --- a/packages/SystemUI/res/drawable/ic_qs_cast_connecting.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* - * Copyright 2013, 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. - */ ---> -<animation-list - xmlns:android="http://schemas.android.com/apk/res/android" - android:oneshot="false"> - <item android:drawable="@drawable/ic_qs_cast_connecting_0" android:duration="500" /> - <item android:drawable="@drawable/ic_qs_cast_connecting_1" android:duration="500" /> - <item android:drawable="@drawable/ic_qs_cast_connecting_2" android:duration="500" /> - <item android:drawable="@drawable/ic_qs_cast_connecting_1" android:duration="500" /> -</animation-list> diff --git a/packages/SystemUI/res/drawable/ic_qs_cast_off.xml b/packages/SystemUI/res/drawable/ic_qs_cast_off.xml new file mode 100644 index 0000000..130c639 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_cast_off.xml @@ -0,0 +1,30 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:fill="#00000000" + android:stroke="#CCCCCC" + android:strokeWidth="1.0" + android:pathData="M21.0,3.0L3.0,3.0C1.9,3.0 1.0,3.9 1.0,5.0l0.0,3.0l2.0,0.0L3.0,5.0l18.0,0.0l0.0,14.0l-7.0,0.0l0.0,2.0l7.0,0.0c1.1,0.0 2.0,-0.9 2.0,-2.0L23.0,5.0C23.0,3.9 22.1,3.0 21.0,3.0zM1.0,18.0l0.0,3.0l3.0,0.0C4.0,19.3 2.7,18.0 1.0,18.0zM1.0,14.0l0.0,2.0c2.8,0.0 5.0,2.2 5.0,5.0l2.0,0.0C8.0,17.1 4.9,14.0 1.0,14.0zM1.0,10.0l0.0,2.0c5.0,0.0 9.0,4.0 9.0,9.0l2.0,0.0C12.0,14.9 7.1,10.0 1.0,10.0z"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_cast.xml b/packages/SystemUI/res/drawable/ic_qs_cast_on.xml index 6f2840b..6c82b1c 100644 --- a/packages/SystemUI/res/drawable/ic_qs_cast.xml +++ b/packages/SystemUI/res/drawable/ic_qs_cast_on.xml @@ -23,6 +23,6 @@ Copyright (C) 2014 The Android Open Source Project android:viewportHeight="24.0"/> <path - android:fill="#FF000000" + android:fill="#FFFFFFFF" android:pathData="M21.0,3.0L3.0,3.0C1.9,3.0 1.0,3.9 1.0,5.0l0.0,3.0l2.0,0.0L3.0,5.0l18.0,0.0l0.0,14.0l-7.0,0.0l0.0,2.0l7.0,0.0c1.1,0.0 2.0,-0.9 2.0,-2.0L23.0,5.0C23.0,3.9 22.1,3.0 21.0,3.0zM1.0,18.0l0.0,3.0l3.0,0.0C4.0,19.3 2.7,18.0 1.0,18.0zM1.0,14.0l0.0,2.0c2.8,0.0 5.0,2.2 5.0,5.0l2.0,0.0C8.0,17.1 4.9,14.0 1.0,14.0zM1.0,10.0l0.0,2.0c5.0,0.0 9.0,4.0 9.0,9.0l2.0,0.0C12.0,14.9 7.1,10.0 1.0,10.0z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_close.xml b/packages/SystemUI/res/drawable/ic_qs_close.xml index c2c72c8..dd43e6c 100644 --- a/packages/SystemUI/res/drawable/ic_qs_close.xml +++ b/packages/SystemUI/res/drawable/ic_qs_close.xml @@ -23,6 +23,6 @@ Copyright (C) 2014 The Android Open Source Project android:viewportHeight="24.0"/> <path - android:fill="#FF000000" + 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"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_invert_colors.xml b/packages/SystemUI/res/drawable/ic_qs_color_inversion.xml index 7c92052..dc30a53 100644 --- a/packages/SystemUI/res/drawable/ic_qs_invert_colors.xml +++ b/packages/SystemUI/res/drawable/ic_qs_color_inversion.xml @@ -23,6 +23,6 @@ Copyright (C) 2014 The Android Open Source Project android:viewportHeight="24.0"/> <path - android:fill="#FF000000" + android:fill="#FFFFFFFF" android:pathData="M18.939,7.244c-5.887,-5.885 -6.214,-6.214 -6.222,-6.222l-0.707,-0.737L5.088,7.207c-2.914,2.915 -3.74,6.629 -2.266,10.19c1.541,3.719 5.312,6.316 9.174,6.317l0.0,0.0c3.861,-0.001 7.636,-2.603 9.179,-6.328C22.646,13.834 21.832,10.138 18.939,7.244zM4.67,16.632c-1.149,-2.776 -0.481,-5.696 1.832,-8.011l5.494,-5.492c0.0,0.002 0.002,0.003 0.003,0.004l0.0,18.582c-0.001,0.0 -0.002,0.0 -0.003,0.0C8.922,21.714 5.91,19.624 4.67,16.632z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_color_space_off.xml b/packages/SystemUI/res/drawable/ic_qs_color_space_off.xml deleted file mode 100644 index cf34ba6..0000000 --- a/packages/SystemUI/res/drawable/ic_qs_color_space_off.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2014 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. ---> - -<bitmap xmlns:android="http://schemas.android.com/apk/res/android" - android:src="@drawable/ic_qs_color_space_alpha" - android:tint="@color/ic_qs_off" /> diff --git a/packages/SystemUI/res/drawable/ic_qs_color_space_on.xml b/packages/SystemUI/res/drawable/ic_qs_color_space_on.xml deleted file mode 100644 index 1806688..0000000 --- a/packages/SystemUI/res/drawable/ic_qs_color_space_on.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2014 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. ---> - -<bitmap xmlns:android="http://schemas.android.com/apk/res/android" - android:src="@drawable/ic_qs_color_space_alpha" - android:tint="@color/ic_qs_on" /> diff --git a/packages/SystemUI/res/drawable/ic_qs_hotspot_off.xml b/packages/SystemUI/res/drawable/ic_qs_hotspot_off.xml new file mode 100644 index 0000000..7a62212 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_hotspot_off.xml @@ -0,0 +1,30 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:fill="#00000000" + android:stroke="#CCCCCC" + android:strokeWidth="1.0" + android:pathData="M12.0,11.0c-1.1,0.0 -2.0,0.9 -2.0,2.0c0.0,1.1 0.9,2.0 2.0,2.0c1.1,0.0 2.0,-0.9 2.0,-2.0C14.0,11.9 13.1,11.0 12.0,11.0zM18.0,13.0c0.0,-3.3 -2.7,-6.0 -6.0,-6.0c-3.3,0.0 -6.0,2.7 -6.0,6.0c0.0,2.2 1.2,4.1 3.0,5.2l1.0,-1.7c-1.2,-0.7 -2.0,-2.0 -2.0,-3.4c0.0,-2.2 1.8,-4.0 4.0,-4.0s4.0,1.8 4.0,4.0c0.0,1.5 -0.8,2.8 -2.0,3.4l1.0,1.7C16.8,17.1 18.0,15.2 18.0,13.0zM12.0,3.0C6.5,3.0 2.0,7.5 2.0,13.0c0.0,3.7 2.0,6.9 5.0,8.6l1.0,-1.7c-2.4,-1.4 -4.0,-4.0 -4.0,-6.9c0.0,-4.4 3.6,-8.0 8.0,-8.0s8.0,3.6 8.0,8.0c0.0,3.0 -1.6,5.5 -4.0,6.9l1.0,1.7c3.0,-1.7 5.0,-5.0 5.0,-8.6C22.0,7.5 17.5,3.0 12.0,3.0z"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_hotspot.xml b/packages/SystemUI/res/drawable/ic_qs_hotspot_on.xml index 965e3c1..3ccdd81 100644 --- a/packages/SystemUI/res/drawable/ic_qs_hotspot.xml +++ b/packages/SystemUI/res/drawable/ic_qs_hotspot_on.xml @@ -23,6 +23,6 @@ Copyright (C) 2014 The Android Open Source Project android:viewportHeight="24.0"/> <path - android:fill="#FF000000" + android:fill="#FFFFFFFF" android:pathData="M12.0,11.0c-1.1,0.0 -2.0,0.9 -2.0,2.0c0.0,1.1 0.9,2.0 2.0,2.0c1.1,0.0 2.0,-0.9 2.0,-2.0C14.0,11.9 13.1,11.0 12.0,11.0zM18.0,13.0c0.0,-3.3 -2.7,-6.0 -6.0,-6.0c-3.3,0.0 -6.0,2.7 -6.0,6.0c0.0,2.2 1.2,4.1 3.0,5.2l1.0,-1.7c-1.2,-0.7 -2.0,-2.0 -2.0,-3.4c0.0,-2.2 1.8,-4.0 4.0,-4.0s4.0,1.8 4.0,4.0c0.0,1.5 -0.8,2.8 -2.0,3.4l1.0,1.7C16.8,17.1 18.0,15.2 18.0,13.0zM12.0,3.0C6.5,3.0 2.0,7.5 2.0,13.0c0.0,3.7 2.0,6.9 5.0,8.6l1.0,-1.7c-2.4,-1.4 -4.0,-4.0 -4.0,-6.9c0.0,-4.4 3.6,-8.0 8.0,-8.0s8.0,3.6 8.0,8.0c0.0,3.0 -1.6,5.5 -4.0,6.9l1.0,1.7c3.0,-1.7 5.0,-5.0 5.0,-8.6C22.0,7.5 17.5,3.0 12.0,3.0z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_inversion_off.xml b/packages/SystemUI/res/drawable/ic_qs_inversion_off.xml deleted file mode 100644 index 9018a90..0000000 --- a/packages/SystemUI/res/drawable/ic_qs_inversion_off.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2014 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. ---> - -<bitmap xmlns:android="http://schemas.android.com/apk/res/android" - android:src="@drawable/ic_qs_inversion_alpha" - android:tint="@color/ic_qs_off" /> diff --git a/packages/SystemUI/res/drawable/ic_qs_inversion_on.xml b/packages/SystemUI/res/drawable/ic_qs_inversion_on.xml deleted file mode 100644 index 9110201..0000000 --- a/packages/SystemUI/res/drawable/ic_qs_inversion_on.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2014 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. ---> - -<bitmap xmlns:android="http://schemas.android.com/apk/res/android" - android:src="@drawable/ic_qs_inversion_alpha" - android:tint="@color/ic_qs_on" /> diff --git a/packages/SystemUI/res/drawable/ic_qs_location_01.xml b/packages/SystemUI/res/drawable/ic_qs_location_01.xml new file mode 100644 index 0000000..ff37d9a --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_location_01.xml @@ -0,0 +1,28 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:fill="#FFFFFFFF" + android:pathData="M12.0,2.0C8.13,2.0 5.0,5.13 5.0,9.0c0.0,5.25 7.0,13.0 7.0,13.0s7.0,-7.75 7.0,-13.0C19.0,5.13 15.87,2.0 12.0,2.0zM12.0,11.5c-1.38,0.0 -2.5,-1.12 -2.5,-2.5s1.12,-2.5 2.5,-2.5c1.38,0.0 2.5,1.12 2.5,2.5S13.38,11.5 12.0,11.5z"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_location_02.xml b/packages/SystemUI/res/drawable/ic_qs_location_02.xml new file mode 100644 index 0000000..bb4465f --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_location_02.xml @@ -0,0 +1,28 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:fill="#FFFFFFFF" + android:pathData="M12.0,4.0c-3.48,0.0 -6.3,2.82 -6.3,6.3C5.7,15.02 12.0,22.0 12.0,22.0s6.3,-6.98 6.3,-11.7C18.3,6.82 15.48,4.0 12.0,4.0zM12.0,12.55c-1.24,0.0 -2.25,-1.01 -2.25,-2.25S10.76,8.05 12.0,8.05c1.24,0.0 2.25,1.01 2.25,2.25S13.24,12.55 12.0,12.55z"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_location_03.xml b/packages/SystemUI/res/drawable/ic_qs_location_03.xml new file mode 100644 index 0000000..956a8c3 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_location_03.xml @@ -0,0 +1,28 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:fill="#FFFFFFFF" + android:pathData="M12.0,7.0c-2.9,0.0 -5.25,2.35 -5.25,5.25C6.75,16.19 12.0,22.0 12.0,22.0s5.25,-5.81 5.25,-9.75C17.25,9.35 14.9,7.0 12.0,7.0zM12.0,14.12c-1.04,0.0 -1.88,-0.84 -1.88,-1.88s0.84,-1.88 1.88,-1.88c1.04,0.0 1.87,0.84 1.87,1.88S13.04,14.12 12.0,14.12z"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_location_04.xml b/packages/SystemUI/res/drawable/ic_qs_location_04.xml new file mode 100644 index 0000000..0c0fb3b --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_location_04.xml @@ -0,0 +1,28 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:fill="#FFFFFFFF" + android:pathData="M12.0,10.0c-2.32,0.0 -4.2,1.88 -4.2,4.2C7.8,17.35 12.0,22.0 12.0,22.0s4.2,-4.65 4.2,-7.8C16.2,11.88 14.32,10.0 12.0,10.0zM12.0,15.7c-0.83,0.0 -1.5,-0.67 -1.5,-1.5s0.67,-1.5 1.5,-1.5c0.83,0.0 1.5,0.67 1.5,1.5S12.83,15.7 12.0,15.7z"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_location_05.xml b/packages/SystemUI/res/drawable/ic_qs_location_05.xml new file mode 100644 index 0000000..1a21e2f --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_location_05.xml @@ -0,0 +1,28 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:fill="#FFFFFFFF" + android:pathData="M12.0,13.0c-1.74,0.0 -3.15,1.41 -3.15,3.15C8.85,18.51 12.0,22.0 12.0,22.0s3.15,-3.49 3.15,-5.85C15.15,14.41 13.74,13.0 12.0,13.0zM12.0,17.27c-0.62,0.0 -1.13,-0.5 -1.13,-1.12c0.0,-0.62 0.5,-1.12 1.13,-1.12c0.62,0.0 1.12,0.5 1.12,1.12C13.12,16.77 12.62,17.27 12.0,17.27z"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_location_06.xml b/packages/SystemUI/res/drawable/ic_qs_location_06.xml new file mode 100644 index 0000000..25c9ae5 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_location_06.xml @@ -0,0 +1,33 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:fill="#FFFFFFFF" + android:pathData="M12.0,16.0c-1.16,0.0 -2.1,0.94 -2.1,2.1C9.9,19.67 12.0,22.0 12.0,22.0s2.1,-2.33 2.1,-3.9C14.1,16.94 13.16,16.0 12.0,16.0zM12.0,18.85c-0.41,0.0 -0.75,-0.34 -0.75,-0.75s0.34,-0.75 0.75,-0.75c0.41,0.0 0.75,0.34 0.75,0.75S12.41,18.85 12.0,18.85z"/> + <path + android:pathData="M11.99,15c-1.35,0,-2.45,1.1,-2.45,2.45 c0,1.84,2.45,4.55,2.45,4.55s2.45,-2.71,2.45,-4.55C14.44,16.1,13.34,15,11.99,15z M11.99,18.33c-0.48,0,-0.88,-0.39,-0.88,-0.88 s0.39,-0.88,0.88,-0.88c0.48,0,0.87,0.39,0.87,0.88S12.47,18.33,11.99,18.33z" + android:strokeWidth=".35" + android:fill="#00000000" + android:stroke="#CCCCCC"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_location_07.xml b/packages/SystemUI/res/drawable/ic_qs_location_07.xml new file mode 100644 index 0000000..a69c3a2 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_location_07.xml @@ -0,0 +1,30 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:pathData="M12,9c-2.51,0,-4.55,2.04,-4.55,4.55 C7.45,16.96,12,22,12,22s4.55,-5.04,4.55,-8.45C16.55,11.04,14.51,9,12,9z M12,15.18c-0.9,0,-1.63,-0.73,-1.63,-1.62 s0.73,-1.62,1.63,-1.62c0.9,0,1.62,0.73,1.62,1.62S12.9,15.18,12,15.18z" + android:strokeWidth="0.65" + android:fill="#00000000" + android:stroke="#CCCCCC"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_location_08.xml b/packages/SystemUI/res/drawable/ic_qs_location_08.xml new file mode 100644 index 0000000..c89c047 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_location_08.xml @@ -0,0 +1,30 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:pathData="M12,6c-3.09,0,-5.6,2.51,-5.6,5.6 C6.4,15.8,12,22,12,22s5.6,-6.2,5.6,-10.4C17.6,8.51,15.09,6,12,6z M12,13.6c-1.1,0,-2,-0.9,-2,-2s0.9,-2,2,-2c1.1,0,2,0.9,2,2 S13.1,13.6,12,13.6z" + android:strokeWidth="0.8" + android:fill="#00000000" + android:stroke="#CCCCCC"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_location_09.xml b/packages/SystemUI/res/drawable/ic_qs_location_09.xml new file mode 100644 index 0000000..96bb6ce --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_location_09.xml @@ -0,0 +1,30 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:pathData="M12,4c-3.48,0,-6.3,2.82,-6.3,6.3 C5.7,15.02,12,22,12,22s6.3,-6.98,6.3,-11.7C18.3,6.82,15.48,4,12,4z M12,12.55c-1.24,0,-2.25,-1.01,-2.25,-2.25S10.76,8.05,12,8.05 c1.24,0,2.25,1.01,2.25,2.25S13.24,12.55,12,12.55z" + android:strokeWidth="0.9" + android:fill="#00000000" + android:stroke="#CCCCCC"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_location_10.xml b/packages/SystemUI/res/drawable/ic_qs_location_10.xml new file mode 100644 index 0000000..aced4bd --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_location_10.xml @@ -0,0 +1,30 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:pathData="M12,3C8.33,3,5.35,5.98,5.35,9.65 C5.35,14.64,12,22,12,22s6.65,-7.36,6.65,-12.35C18.65,5.98,15.67,3,12,3z M12,12.02c-1.31,0,-2.38,-1.06,-2.38,-2.38 S10.69,7.28,12,7.28c1.31,0,2.37,1.06,2.37,2.37S13.31,12.02,12,12.02z" + android:strokeWidth="0.95" + android:fill="#00000000" + android:stroke="#CCCCCC"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_location_11.xml b/packages/SystemUI/res/drawable/ic_qs_location_11.xml new file mode 100644 index 0000000..578308e --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_location_11.xml @@ -0,0 +1,30 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:pathData="M12,2C8.13,2,5,5.13,5,9c0,5.25,7,13,7,13s7,-7.75,7,-13 C19,5.13,15.87,2,12,2z M12,11.5c-1.38,0,-2.5,-1.12,-2.5,-2.5s1.12,-2.5,2.5,-2.5c1.38,0,2.5,1.12,2.5,2.5S13.38,11.5,12,11.5z" + android:fill="#00000000" + android:stroke="#CCCCCC" + android:strokeWidth="1.0"/> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_location_off.xml b/packages/SystemUI/res/drawable/ic_qs_location_off.xml new file mode 100644 index 0000000..d28d347 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_location_off.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2014 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. +--> +<animation-list + xmlns:android="http://schemas.android.com/apk/res/android" + android:oneshot="true"> + <item android:drawable="@drawable/ic_qs_location_01" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_02" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_03" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_04" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_05" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_06" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_07" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_08" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_09" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_10" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_11" android:duration="16" /> +</animation-list> diff --git a/packages/SystemUI/res/drawable/ic_qs_location_on.xml b/packages/SystemUI/res/drawable/ic_qs_location_on.xml new file mode 100644 index 0000000..72512ac --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_location_on.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2014 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. +--> +<animation-list + xmlns:android="http://schemas.android.com/apk/res/android" + android:oneshot="true"> + <item android:drawable="@drawable/ic_qs_location_11" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_10" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_09" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_08" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_07" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_06" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_05" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_04" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_03" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_02" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_location_01" android:duration="16" /> +</animation-list> diff --git a/packages/SystemUI/res/drawable/ic_qs_minus.xml b/packages/SystemUI/res/drawable/ic_qs_minus.xml index 8323e89..376cc28 100644 --- a/packages/SystemUI/res/drawable/ic_qs_minus.xml +++ b/packages/SystemUI/res/drawable/ic_qs_minus.xml @@ -23,6 +23,6 @@ Copyright (C) 2014 The Android Open Source Project android:viewportHeight="24.0"/> <path - android:fill="#FF000000" + android:fill="#FFFFFFFF" android:pathData="M7.0,11.0l0.0,2.0l10.0,0.0l0.0,-2.0L7.0,11.0zM12.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.0zM12.0,20.0c-4.4,0.0 -8.0,-3.6 -8.0,-8.0s3.6,-8.0 8.0,-8.0c4.4,0.0 8.0,3.6 8.0,8.0S16.4,20.0 12.0,20.0z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_plus.xml b/packages/SystemUI/res/drawable/ic_qs_plus.xml index 84cd72a..a315f7f 100644 --- a/packages/SystemUI/res/drawable/ic_qs_plus.xml +++ b/packages/SystemUI/res/drawable/ic_qs_plus.xml @@ -23,6 +23,6 @@ Copyright (C) 2014 The Android Open Source Project android:viewportHeight="24.0"/> <path - android:fill="#FF000000" + android:fill="#FFFFFFFF" android:pathData="M13.0,7.0l-2.0,0.0l0.0,4.0L7.0,11.0l0.0,2.0l4.0,0.0l0.0,4.0l2.0,0.0l0.0,-4.0l4.0,0.0l0.0,-2.0l-4.0,0.0L13.0,7.0zM12.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.0zM12.0,20.0c-4.4,0.0 -8.0,-3.6 -8.0,-8.0s3.6,-8.0 8.0,-8.0c4.4,0.0 8.0,3.6 8.0,8.0S16.4,20.0 12.0,20.0z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_ringer_audible.xml b/packages/SystemUI/res/drawable/ic_qs_ringer_audible.xml index fa6f20c..3a20c58 100644 --- a/packages/SystemUI/res/drawable/ic_qs_ringer_audible.xml +++ b/packages/SystemUI/res/drawable/ic_qs_ringer_audible.xml @@ -23,6 +23,6 @@ Copyright (C) 2014 The Android Open Source Project android:viewportHeight="24.0"/> <path - android:fill="#FF000000" - android:pathData="M3.0,9.0c0.0,0.0 0.0,6.0 0.0,6.0l4.0,0.0l5.0,5.0L12.0,4.0L7.0,9.0L3.0,9.0zM16.5,12.0c0.0,-1.8 -1.0,-3.3 -2.5,-4.0L14.0,16.0C15.5,15.3 16.5,13.8 16.5,12.0zM14.0,3.2l0.0,2.1c2.9,0.9 5.0,3.5 5.0,6.7s-2.1,5.8 -5.0,6.7l0.0,2.1c4.0,-0.9 7.0,-4.5 7.0,-8.8S18.0,4.1 14.0,3.2z"/> + android:fill="#FFFFFFFF" + android:pathData="M6.6,3.6L5.2,2.2C2.8,4.0 1.2,6.8 1.0,10.0l2.0,0.0C3.2,7.3 4.5,5.0 6.6,3.6zM20.0,10.0l2.0,0.0c-0.2,-3.2 -1.7,-6.0 -4.1,-7.8l-1.4,1.4C18.5,5.0 19.8,7.3 20.0,10.0zM18.0,10.5c0.0,-3.1 -2.1,-5.6 -5.0,-6.3L13.0,3.5C13.0,2.7 12.3,2.0 11.5,2.0C10.7,2.0 10.0,2.7 10.0,3.5l0.0,0.7c-2.9,0.7 -5.0,3.2 -5.0,6.3L5.0,16.0l-2.0,2.0l0.0,1.0l17.0,0.0l0.0,-1.0l-2.0,-2.0L18.0,10.5zM11.5,22.0c0.1,0.0 0.3,0.0 0.4,0.0c0.7,-0.1 1.2,-0.6 1.4,-1.2c0.1,-0.2 0.2,-0.5 0.2,-0.8l-4.0,0.0C9.5,21.1 10.4,22.0 11.5,22.0z" /> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_ringer_silent.xml b/packages/SystemUI/res/drawable/ic_qs_ringer_silent.xml index 0665196..dd6be76 100644 --- a/packages/SystemUI/res/drawable/ic_qs_ringer_silent.xml +++ b/packages/SystemUI/res/drawable/ic_qs_ringer_silent.xml @@ -23,6 +23,6 @@ Copyright (C) 2014 The Android Open Source Project android:viewportHeight="24.0"/> <path - android:fill="#FF000000" - android:pathData="M16.5,12.0c0.0,-1.8 -1.0,-3.3 -2.5,-4.0l0.0,2.2l2.5,2.5C16.5,12.4 16.5,12.2 16.5,12.0zM19.0,12.0c0.0,0.9 -0.2,1.8 -0.5,2.6l1.5,1.5c0.7,-1.2 1.0,-2.7 1.0,-4.2c0.0,-4.3 -3.0,-7.9 -7.0,-8.8l0.0,2.1C16.9,6.2 19.0,8.8 19.0,12.0zM4.3,3.0L3.0,4.3L7.7,9.0L3.0,9.0c0.0,0.0 0.0,6.0 0.0,6.0l4.0,0.0l5.0,5.0l0.0,-6.7l4.3,4.3c-0.7,0.5 -1.4,0.9 -2.3,1.2l0.0,2.1c1.4,-0.3 2.6,-0.9 3.7,-1.8l2.0,2.0l1.3,-1.3l-9.0,-9.0L4.3,3.0zM12.0,4.0L9.9,6.1L12.0,8.2L12.0,4.0z"/> + android:fill="#FFFFFFFF" + android:pathData="M11.5,22.0c1.1,0.0 2.0,-0.9 2.0,-2.0l-4.0,0.0C9.5,21.1 10.4,22.0 11.5,22.0zM18.0,10.5c0.0,-3.1 -2.1,-5.6 -5.0,-6.3L13.0,3.5C13.0,2.7 12.3,2.0 11.5,2.0C10.7,2.0 10.0,2.7 10.0,3.5l0.0,0.7C9.5,4.3 9.0,4.5 8.6,4.7l9.4,9.4L18.0,10.5zM17.7,19.0l2.0,2.0l1.3,-1.3L4.3,3.0L3.0,4.3l2.9,2.9C5.3,8.2 5.0,9.3 5.0,10.5L5.0,16.0l-2.0,2.0l0.0,1.0L17.7,19.0z" /> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_ringer_vibrate.xml b/packages/SystemUI/res/drawable/ic_qs_ringer_vibrate.xml index 299a2ef..96d20e8 100644 --- a/packages/SystemUI/res/drawable/ic_qs_ringer_vibrate.xml +++ b/packages/SystemUI/res/drawable/ic_qs_ringer_vibrate.xml @@ -23,6 +23,6 @@ Copyright (C) 2014 The Android Open Source Project android:viewportHeight="24.0"/> <path - android:fill="#FF000000" + android:fill="#FFFFFFFF" android:pathData="M0.0,15.0l2.0,0.0L2.0,9.0L0.0,9.0L0.0,15.0zM3.0,17.0l2.0,0.0L5.0,7.0L3.0,7.0L3.0,17.0zM22.0,9.0l0.0,6.0l2.0,0.0L24.0,9.0L22.0,9.0zM19.0,17.0l2.0,0.0L21.0,7.0l-2.0,0.0L19.0,17.0zM16.5,3.0l-9.0,0.0C6.7,3.0 6.0,3.7 6.0,4.5l0.0,15.0C6.0,20.3 6.7,21.0 7.5,21.0l9.0,0.0c0.8,0.0 1.5,-0.7 1.5,-1.5l0.0,-15.0C18.0,3.7 17.3,3.0 16.5,3.0zM16.0,19.0L8.0,19.0L8.0,5.0l8.0,0.0L16.0,19.0z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_01.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_01.xml index a6c2cf8..a6c2cf8 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_01.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_01.xml diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_02.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_02.xml index 4107c46..4107c46 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_02.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_02.xml diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_03.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_03.xml index 127296c..127296c 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_03.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_03.xml diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_04.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_04.xml index d00262a..d00262a 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_04.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_04.xml diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_05.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_05.xml index 570f51f..570f51f 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_05.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_05.xml diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_06.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_06.xml index aaf9356..aaf9356 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_06.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_06.xml diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_07.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_07.xml index 330ce6a..330ce6a 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_07.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_07.xml diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_08.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_08.xml index 1c7f1a1..1c7f1a1 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_08.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_08.xml diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_09.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_09.xml index ebfbad6..ebfbad6 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_09.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_09.xml diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_10.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_10.xml index 21dda8c..21dda8c 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_10.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_10.xml diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_11.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_11.xml index f4186fe..f4186fe 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_11.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_11.xml diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_12.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_12.xml index d408e28..d408e28 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_12.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_12.xml diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_13.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_13.xml index 1ac6b39..1ac6b39 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_13.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_13.xml diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_14.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_14.xml index c43e363..c43e363 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_14.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_14.xml diff --git a/packages/SystemUI/res/drawable/ic_rotate_24_15.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_15.xml index 22fa428..22fa428 100644 --- a/packages/SystemUI/res/drawable/ic_rotate_24_15.xml +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_15.xml diff --git a/packages/SystemUI/res/drawable/ic_qs_rotation_locked.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_locked.xml new file mode 100644 index 0000000..75e20f0 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_locked.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2014 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. +--> +<animation-list + xmlns:android="http://schemas.android.com/apk/res/android" + android:oneshot="true"> + <item android:drawable="@drawable/ic_qs_rotation_01" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_02" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_03" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_04" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_05" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_06" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_07" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_08" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_09" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_10" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_11" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_12" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_13" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_14" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_15" android:duration="16" /> +</animation-list> diff --git a/packages/SystemUI/res/drawable/ic_qs_rotation_unlocked.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_unlocked.xml new file mode 100644 index 0000000..a1cedb9 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_rotation_unlocked.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2014 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. +--> +<animation-list + xmlns:android="http://schemas.android.com/apk/res/android" + android:oneshot="true"> + <item android:drawable="@drawable/ic_qs_rotation_15" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_14" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_13" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_12" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_11" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_10" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_09" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_08" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_07" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_06" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_05" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_04" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_03" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_02" android:duration="16" /> + <item android:drawable="@drawable/ic_qs_rotation_01" android:duration="16" /> +</animation-list> diff --git a/packages/SystemUI/res/drawable/ic_qs_zen_off.xml b/packages/SystemUI/res/drawable/ic_qs_zen_off.xml new file mode 100644 index 0000000..73886ec --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_zen_off.xml @@ -0,0 +1,30 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + 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" /> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_zen_on.xml b/packages/SystemUI/res/drawable/ic_qs_zen_on.xml new file mode 100644 index 0000000..8dff318 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_qs_zen_on.xml @@ -0,0 +1,28 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="64dp" + android:height="64dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <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" /> +</vector> diff --git a/packages/SystemUI/res/drawable/ic_rotate_locked_anim.xml b/packages/SystemUI/res/drawable/ic_rotate_locked_anim.xml deleted file mode 100644 index e14a1ce..0000000 --- a/packages/SystemUI/res/drawable/ic_rotate_locked_anim.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2014 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. ---> -<animation-list - xmlns:android="http://schemas.android.com/apk/res/android" - android:oneshot="true"> - <item android:drawable="@drawable/ic_rotate_24_01" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_02" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_03" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_04" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_05" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_06" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_07" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_08" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_09" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_10" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_11" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_12" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_13" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_14" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_15" android:duration="16" /> -</animation-list> diff --git a/packages/SystemUI/res/drawable/ic_rotate_unlocked_anim.xml b/packages/SystemUI/res/drawable/ic_rotate_unlocked_anim.xml deleted file mode 100644 index 63b8c5f..0000000 --- a/packages/SystemUI/res/drawable/ic_rotate_unlocked_anim.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -Copyright (C) 2014 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. ---> -<animation-list - xmlns:android="http://schemas.android.com/apk/res/android" - android:oneshot="true"> - <item android:drawable="@drawable/ic_rotate_24_15" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_14" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_13" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_12" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_11" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_10" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_09" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_08" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_07" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_06" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_05" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_04" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_03" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_02" android:duration="16" /> - <item android:drawable="@drawable/ic_rotate_24_01" android:duration="16" /> -</animation-list> diff --git a/packages/SystemUI/res/drawable/ic_qs_zen.xml b/packages/SystemUI/res/drawable/stat_sys_ringer_silent.xml index 059c068..5efd8ec 100644 --- a/packages/SystemUI/res/drawable/ic_qs_zen.xml +++ b/packages/SystemUI/res/drawable/stat_sys_ringer_silent.xml @@ -15,14 +15,14 @@ Copyright (C) 2014 The Android Open Source Project --> <vector xmlns:android="http://schemas.android.com/apk/res/android" > <size - android:width="64dp" - android:height="64dp"/> + android:width="19dp" + android:height="19dp"/> <viewport android:viewportWidth="24.0" android:viewportHeight="24.0"/> <path - android:fill="#FF000000" - android:pathData="M11.5,22.0c1.1,0.0 2.0,-0.9 2.0,-2.0l-4.0,0.0C9.5,21.1 10.4,22.0 11.5,22.0zM18.0,16.0l0.0,-5.5c0.0,-3.1 -2.1,-5.6 -5.0,-6.3L13.0,3.5C13.0,2.7 12.3,2.0 11.5,2.0C10.7,2.0 10.0,2.7 10.0,3.5l0.0,0.7c-2.9,0.7 -5.0,3.2 -5.0,6.3L5.0,16.0l-2.0,2.0l0.0,1.0l17.0,0.0l0.0,-1.0L18.0,16.0zM14.0,9.8l-2.8,3.4L14.0,13.200001L14.0,15.0L9.0,15.0l0.0,-1.8l2.8,-3.4L9.0,9.799999L9.0,8.0l5.0,0.0L14.0,9.8z"/> + android:fill="#FFFFFFFF" + android:pathData="M11.5,22.0c1.1,0.0 2.0,-0.9 2.0,-2.0l-4.0,0.0C9.5,21.1 10.4,22.0 11.5,22.0zM18.0,10.5c0.0,-3.1 -2.1,-5.6 -5.0,-6.3L13.0,3.5C13.0,2.7 12.3,2.0 11.5,2.0C10.7,2.0 10.0,2.7 10.0,3.5l0.0,0.7C9.5,4.3 9.0,4.5 8.6,4.7l9.4,9.4L18.0,10.5zM17.7,19.0l2.0,2.0l1.3,-1.3L4.3,3.0L3.0,4.3l2.9,2.9C5.3,8.2 5.0,9.3 5.0,10.5L5.0,16.0l-2.0,2.0l0.0,1.0L17.7,19.0z" /> </vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml b/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml new file mode 100644 index 0000000..e1d63c3 --- /dev/null +++ b/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml @@ -0,0 +1,28 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="20dp" + android:height="20dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <path + android:fill="#FFFFFFFF" + android:pathData="M0.0,15.0l2.0,0.0L2.0,9.0L0.0,9.0L0.0,15.0zM3.0,17.0l2.0,0.0L5.0,7.0L3.0,7.0L3.0,17.0zM22.0,9.0l0.0,6.0l2.0,0.0L24.0,9.0L22.0,9.0zM19.0,17.0l2.0,0.0L21.0,7.0l-2.0,0.0L19.0,17.0zM16.5,3.0l-9.0,0.0C6.7,3.0 6.0,3.7 6.0,4.5l0.0,15.0C6.0,20.3 6.7,21.0 7.5,21.0l9.0,0.0c0.8,0.0 1.5,-0.7 1.5,-1.5l0.0,-15.0C18.0,3.7 17.3,3.0 16.5,3.0zM16.0,19.0L8.0,19.0L8.0,5.0l8.0,0.0L16.0,19.0z"/> +</vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_ringer_zen.xml b/packages/SystemUI/res/drawable/stat_sys_ringer_zen.xml new file mode 100644 index 0000000..afab88f --- /dev/null +++ b/packages/SystemUI/res/drawable/stat_sys_ringer_zen.xml @@ -0,0 +1,28 @@ +<!-- +Copyright (C) 2014 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" > + <size + android:width="19dp" + android:height="19dp"/> + + <viewport + android:viewportWidth="24.0" + android:viewportHeight="24.0"/> + + <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" /> +</vector> diff --git a/packages/SystemUI/res/layout/qs_zen_mode_detail.xml b/packages/SystemUI/res/layout/qs_zen_mode_detail.xml index 2df6d43..b73874a 100644 --- a/packages/SystemUI/res/layout/qs_zen_mode_detail.xml +++ b/packages/SystemUI/res/layout/qs_zen_mode_detail.xml @@ -19,8 +19,9 @@ android:layout_height="match_parent" android:background="@color/system_secondary_color" > - <com.android.systemui.qs.QSImageView + <ImageView android:id="@android:id/button1" + android:src="@drawable/ic_qs_close" android:layout_width="64dp" android:layout_height="64dp" android:layout_alignParentStart="true" diff --git a/packages/SystemUI/res/layout/qs_zen_mode_detail_condition.xml b/packages/SystemUI/res/layout/qs_zen_mode_detail_condition.xml index a5c8903..7e02bee 100644 --- a/packages/SystemUI/res/layout/qs_zen_mode_detail_condition.xml +++ b/packages/SystemUI/res/layout/qs_zen_mode_detail_condition.xml @@ -38,8 +38,9 @@ android:maxLines="1" android:text="@string/accessibility_back" /> - <com.android.systemui.qs.QSImageView + <ImageView android:id="@android:id/button1" + android:src="@drawable/ic_qs_plus" android:layout_width="64dp" android:layout_height="64dp" android:layout_alignParentEnd="true" @@ -47,8 +48,9 @@ android:padding="@dimen/quick_settings_panel_padding" android:paddingRight="0px" /> - <com.android.systemui.qs.QSImageView + <ImageView android:id="@android:id/button2" + android:src="@drawable/ic_qs_minus" android:layout_width="64dp" android:layout_height="64dp" android:layout_alignParentEnd="true" diff --git a/packages/SystemUI/res/layout/status_bar.xml b/packages/SystemUI/res/layout/status_bar.xml index 585658e..eaa2558 100644 --- a/packages/SystemUI/res/layout/status_bar.xml +++ b/packages/SystemUI/res/layout/status_bar.xml @@ -61,11 +61,6 @@ android:src="@drawable/stat_notify_more" android:visibility="gone" /> - <com.android.systemui.statusbar.StatusBarIconView android:id="@+id/modeIcon" - android:layout_width="@dimen/status_bar_icon_size" - android:layout_height="match_parent" - android:visibility="gone" - /> <com.android.systemui.statusbar.phone.IconMerger android:id="@+id/notificationIcons" android:layout_width="match_parent" android:layout_height="match_parent" diff --git a/packages/SystemUI/res/layout/status_bar_notification_keyguard_overflow.xml b/packages/SystemUI/res/layout/status_bar_notification_keyguard_overflow.xml index 30eedee..8348e9b 100644 --- a/packages/SystemUI/res/layout/status_bar_notification_keyguard_overflow.xml +++ b/packages/SystemUI/res/layout/status_bar_notification_keyguard_overflow.xml @@ -18,7 +18,7 @@ <com.android.systemui.statusbar.NotificationOverflowContainer xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" - android:layout_height="40dp" + android:layout_height="@dimen/notification_summary_height" android:focusable="true" android:clickable="true" > diff --git a/packages/SystemUI/res/layout/status_bar_notification_speed_bump.xml b/packages/SystemUI/res/layout/status_bar_notification_speed_bump.xml new file mode 100644 index 0000000..ff8800c --- /dev/null +++ b/packages/SystemUI/res/layout/status_bar_notification_speed_bump.xml @@ -0,0 +1,65 @@ +<!-- + ~ Copyright (C) 2014 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 + --> + +<!-- Extends FrameLayout --> +<com.android.systemui.statusbar.SpeedBumpView + xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:focusable="true" + android:clickable="true" + android:visibility="gone" + > + <LinearLayout + android:layout_width="match_parent" + android:layout_height="@dimen/speed_bump_height_collapsed" + android:layout_gravity="top" + android:orientation="horizontal"> + <View + android:id="@+id/speedbump_line_left" + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_weight="1" + android:background="#6fdddddd" + android:layout_gravity="center_vertical"/> + <com.android.systemui.statusbar.SpeedBumpDotsLayout + android:id="@+id/speed_bump_dots_layout" + android:layout_width="34dp" + android:layout_marginStart="8dp" + android:layout_marginEnd="8dp" + android:layout_height="match_parent" + android:layout_weight="0"/> + <View + android:id="@+id/speedbump_line_right" + android:layout_width="0dp" + android:layout_height="1dp" + android:layout_weight="1" + android:background="#6fdddddd" + android:layout_gravity="center_vertical"/> + </LinearLayout> + <TextView + android:id="@+id/speed_bump_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="top|center_horizontal" + android:fontFamily="sans-serif-condensed" + android:textSize="15sp" + android:singleLine="true" + android:textColor="#eeeeee" + android:visibility="invisible" + android:text="@string/speed_bump_explanation" + android:paddingTop="4dp" /> +</com.android.systemui.statusbar.SpeedBumpView> diff --git a/packages/SystemUI/res/values-sw600dp-land/values-land-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp-land/dimens.xml index e440de1..b510fef 100644 --- a/packages/SystemUI/res/values-sw600dp-land/values-land-sw600dp/dimens.xml +++ b/packages/SystemUI/res/values-sw600dp-land/dimens.xml @@ -18,4 +18,7 @@ <resources> <!-- Recent Applications parameters --> <dimen name="status_bar_recents_app_label_width">190dip</dimen> + + <fraction name="keyguard_clock_y_fraction_max">37%</fraction> + <fraction name="keyguard_clock_y_fraction_min">14%</fraction> </resources> diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml index 7372181..22815f3 100644 --- a/packages/SystemUI/res/values-sw600dp/dimens.xml +++ b/packages/SystemUI/res/values-sw600dp/dimens.xml @@ -48,4 +48,15 @@ <!-- Width of the zen mode interstitial dialog. --> <dimen name="zen_mode_dialog_width">384dp</dimen> + + <!-- The fraction of the screen height where the clock on the Keyguard has its center. The + max value is used when no notifications are displaying, and the min value is when the + highest possible number of notifications are showing. --> + <fraction name="keyguard_clock_y_fraction_max">34%</fraction> + <fraction name="keyguard_clock_y_fraction_min">25%</fraction> + + <!-- The margin between the clock and the notifications on Keyguard. See + keyguard_clock_height_fraction_* for the difference between min and max.--> + <dimen name="keyguard_clock_notifications_margin_min">32dp</dimen> + <dimen name="keyguard_clock_notifications_margin_max">32dp</dimen> </resources> diff --git a/packages/SystemUI/res/values-sw720dp-land/dimens.xml b/packages/SystemUI/res/values-sw720dp-land/dimens.xml new file mode 100644 index 0000000..2532dd6 --- /dev/null +++ b/packages/SystemUI/res/values-sw720dp-land/dimens.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2014 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 + --> +<resources> + <!-- The fraction of the screen height where the clock on the Keyguard has its center. The + min value is used when no notifications are displaying, and the max value is when the + highest possible number of notifications are showing. --> + <fraction name="keyguard_clock_y_fraction_max">35%</fraction> + <fraction name="keyguard_clock_y_fraction_min">20%</fraction> +</resources> diff --git a/packages/SystemUI/res/values-sw720dp/config.xml b/packages/SystemUI/res/values-sw720dp/config.xml index 7cf711a..d8bb8d7d 100644 --- a/packages/SystemUI/res/values-sw720dp/config.xml +++ b/packages/SystemUI/res/values-sw720dp/config.xml @@ -35,5 +35,9 @@ <!-- Transposes the search bar layout in landscape --> <bool name="recents_transpose_search_layout_with_orientation">false</bool> + + <!-- The maximum count of notifications on Keyguard. The rest will be collapsed in an overflow + card. --> + <integer name="keyguard_max_notification_count">5</integer> </resources> diff --git a/packages/SystemUI/res/values-sw720dp/dimens.xml b/packages/SystemUI/res/values-sw720dp/dimens.xml index a1c5b66..7695b12 100644 --- a/packages/SystemUI/res/values-sw720dp/dimens.xml +++ b/packages/SystemUI/res/values-sw720dp/dimens.xml @@ -65,5 +65,11 @@ <!-- Where to place the app icon over the thumbnail --> <dimen name="status_bar_recents_app_icon_left_margin">0dp</dimen> <dimen name="status_bar_recents_app_icon_top_margin">8dp</dimen> + + <!-- The fraction of the screen height where the clock on the Keyguard has its center. The + max value is used when no notifications are displaying, and the min value is when the + highest possible number of notifications are showing. --> + <fraction name="keyguard_clock_y_fraction_max">35%</fraction> + <fraction name="keyguard_clock_y_fraction_min">25%</fraction> </resources> diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml index 7de1bd0..77b4843 100644 --- a/packages/SystemUI/res/values/colors.xml +++ b/packages/SystemUI/res/values/colors.xml @@ -22,6 +22,7 @@ <drawable name="system_bar_background">@color/system_bar_background_opaque</drawable> <color name="system_bar_background_opaque">#ff000000</color> <color name="system_bar_background_semi_transparent">#66000000</color> <!-- 40% black --> + <color name="system_bar_background_transparent">#00000000</color> <color name="notification_panel_solid_background">#ff000000</color> <drawable name="status_bar_recents_app_thumbnail_background">#88000000</drawable> <color name="status_bar_recents_app_label_color">#ffffffff</color> @@ -40,8 +41,6 @@ <color name="system_secondary_color">#ff384248</color> <color name="system_accent_color">#ff7fcac3</color> <color name="system_error_color">#fff0592b</color> - <color name="quick_settings_tile_icon_enabled">#ffffffff</color> - <color name="quick_settings_tile_icon_disabled">#ffcccccc</color> <color name="quick_settings_tile_divider">#ff888888</color> <color name="quick_settings_tile_text">#FFFFFFFF</color> <color name="status_bar_clock_color">#FFFFFFFF</color> @@ -57,6 +56,18 @@ <!-- Tint color for the content on the notification overflow card. --> <color name="keyguard_overflow_content_color">#ff666666</color> + <!-- The color of the red speed bump dot --> + <color name="speed_bump_dot_red">#ffd50000</color> + + <!-- The color of the blue speed bump dot --> + <color name="speed_bump_dot_blue">#ff2962ff</color> + + <!-- The color of the yellow speed bump dot --> + <color name="speed_bump_dot_yellow">#ffffd600</color> + + <!-- The color of the green speed bump dot --> + <color name="speed_bump_dot_green">#ff00c853</color> + <!-- The default recents task bar background color. --> <color name="recents_task_bar_default_background_color">#e6444444</color> <!-- The default recents task bar text color. --> diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 79612e0..29955dd 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -82,6 +82,9 @@ <!-- Height of a medium notification in the status bar --> <dimen name="notification_mid_height">128dp</dimen> + <!-- Height of a the summary ("more card") notification on keyguard. --> + <dimen name="notification_summary_height">40dp</dimen> + <!-- size at which Notification icons will be drawn in the status bar --> <dimen name="status_bar_icon_drawing_size">18dip</dimen> @@ -260,6 +263,15 @@ <!-- The padding between the individual notification cards. --> <dimen name="notification_padding">4dp</dimen> + <!-- The height of the collapsed speed bump view. --> + <dimen name="speed_bump_height_collapsed">24dp</dimen> + + <!-- The padding inset the explanation text needs compared to the collapsed height --> + <dimen name="speed_bump_text_padding_inset">10dp</dimen> + + <!-- The height of the speed bump dots. --> + <dimen name="speed_bump_dots_height">5dp</dimen> + <!-- The total height of the stack in its collapsed size (i.e. when quick settings is open) --> <dimen name="collapsed_stack_height">94dp</dimen> @@ -272,7 +284,6 @@ <dimen name="quick_settings_tmp_scrim_stroke_width">8dp</dimen> <dimen name="quick_settings_tmp_scrim_text_size">30dp</dimen> <dimen name="quick_settings_panel_padding">16dp</dimen> - <dimen name="quick_settings_tile_icon_outline">2dp</dimen> <dimen name="quick_settings_tile_text_size">12sp</dimen> <dimen name="quick_settings_tile_divider_height">1dp</dimen> @@ -280,4 +291,16 @@ <!-- Minimum distance the user has to drag down to go to the full shade. --> <dimen name="keyguard_drag_down_min_distance">100dp</dimen> + + <!-- The fraction of the screen height where the clock on the Keyguard has its center. The + max value is used when no notifications are displaying, and the min value is when the + highest possible number of notifications are showing. --> + <fraction name="keyguard_clock_y_fraction_max">29.5%</fraction> + <fraction name="keyguard_clock_y_fraction_min">18%</fraction> + + <!-- The margin between the clock and the notifications on Keyguard. See + keyguard_clock_height_fraction_* for the difference between min and max.--> + <dimen name="keyguard_clock_notifications_margin_min">22dp</dimen> + <dimen name="keyguard_clock_notifications_margin_max">36dp</dimen> + </resources> diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index a50a0ac..b3829a3 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -553,6 +553,9 @@ <item quantity="other">%d more</item> </plurals> + <!-- An explanation for the visual speed bump in the notifications, which will appear when you click on it. [CHAR LIMIT=50] --> + <string name="speed_bump_explanation">Less urgent notifications below</string> + <!-- Shows to explain the double tap interaction with notifications: After tapping a notification on Keyguard, this will explain users to tap again to launch a notification. [CHAR LIMIT=60] --> <string name="notification_tap_again">Tap again to open</string> diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml index 1273e74..19888a8 100644 --- a/packages/SystemUI/res/values/styles.xml +++ b/packages/SystemUI/res/values/styles.xml @@ -22,8 +22,9 @@ <!-- Alternate Recents theme --> <style name="RecentsTheme" parent="@android:style/Theme.DeviceDefault.Wallpaper.NoTitleBar"> - <item name="android:windowTranslucentStatus">true</item> - <item name="android:windowTranslucentNavigation">true</item> + <item name="android:statusBarColor">@android:color/transparent</item> + <item name="android:navigationBarColor">@android:color/transparent</item> + <item name="android:windowDrawsSystemBarBackgrounds">true</item> <item name="android:windowAnimationStyle">@style/Animation.RecentsActivity</item> </style> @@ -192,4 +193,9 @@ </style> <style name="QSBorderless" parent="@android:style/Widget.Quantum.Button.Borderless" /> + + <style name="QSBorderless.Tiny"> + <item name="android:minHeight">12dip</item> + <item name="android:minWidth">12dip</item> + </style> </resources> diff --git a/packages/SystemUI/src/com/android/systemui/qs/FilterCanvas.java b/packages/SystemUI/src/com/android/systemui/qs/FilterCanvas.java deleted file mode 100644 index 05c8ee3..0000000 --- a/packages/SystemUI/src/com/android/systemui/qs/FilterCanvas.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2014 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. - */ - -package com.android.systemui.qs; - -import android.graphics.Canvas; -import android.graphics.Matrix; -import android.graphics.Paint; -import android.graphics.Path; -import android.graphics.Rect; - -/** Canvas that forwards calls to another canvas. Can be subclassed to transform drawing calls. - * Temporary solution to runtime modification of a single drawable shape into two - * enabled & disabled versions. See QSImageView. **/ -public class FilterCanvas extends Canvas { - private final Canvas mCanvas; - - public FilterCanvas(Canvas c) { - mCanvas = c; - } - - @Override - public void drawPath(Path path, Paint paint) { - mCanvas.drawPath(path, paint); - } - - @Override - public int getSaveCount() { - return mCanvas.getSaveCount(); - } - - @Override - public int save() { - return mCanvas.save(); - } - - @Override - public void translate(float dx, float dy) { - mCanvas.translate(dx, dy); - } - - @Override - public boolean clipRect(int left, int top, int right, int bottom) { - return mCanvas.clipRect(left, top, right, bottom); - } - - @Override - public boolean clipRect(Rect rect) { - return mCanvas.clipRect(rect); - } - - @Override - public void concat(Matrix matrix) { - mCanvas.concat(matrix); - } - - @Override - public void restoreToCount(int saveCount) { - mCanvas.restoreToCount(saveCount); - } - - @Override - public void drawRect(Rect r, Paint paint) { - mCanvas.drawRect(r, paint); - } -}
\ No newline at end of file diff --git a/packages/SystemUI/src/com/android/systemui/qs/GlobalSetting.java b/packages/SystemUI/src/com/android/systemui/qs/GlobalSetting.java index 1e15b9f..c169df0 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/GlobalSetting.java +++ b/packages/SystemUI/src/com/android/systemui/qs/GlobalSetting.java @@ -21,10 +21,10 @@ import android.database.ContentObserver; import android.os.Handler; import android.provider.Settings.Global; -import com.android.systemui.statusbar.policy.Disposable; +import com.android.systemui.statusbar.policy.Listenable; /** Helper for managing a global setting. **/ -public abstract class GlobalSetting extends ContentObserver implements Disposable { +public abstract class GlobalSetting extends ContentObserver implements Listenable { private final Context mContext; private final String mSettingName; @@ -34,8 +34,6 @@ public abstract class GlobalSetting extends ContentObserver implements Disposabl super(handler); mContext = context; mSettingName = settingName; - mContext.getContentResolver().registerContentObserver( - Global.getUriFor(mSettingName), false, this); } public int getValue() { @@ -47,8 +45,13 @@ public abstract class GlobalSetting extends ContentObserver implements Disposabl } @Override - public void dispose() { - mContext.getContentResolver().unregisterContentObserver(this); + public void setListening(boolean listening) { + if (listening) { + mContext.getContentResolver().registerContentObserver( + Global.getUriFor(mSettingName), false, this); + } else { + mContext.getContentResolver().unregisterContentObserver(this); + } } @Override diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSImageView.java b/packages/SystemUI/src/com/android/systemui/qs/QSImageView.java deleted file mode 100644 index ed67560..0000000 --- a/packages/SystemUI/src/com/android/systemui/qs/QSImageView.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2014 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. - */ - -package com.android.systemui.qs; - -import android.content.Context; -import android.content.res.Resources; -import android.graphics.Canvas; -import android.graphics.Paint; -import android.graphics.Paint.Style; -import android.graphics.Path; -import android.graphics.drawable.Drawable; -import android.graphics.drawable.VectorDrawable; -import android.util.AttributeSet; -import android.widget.ImageView; - -import com.android.systemui.R; - -/** ImageView that performs runtime modification of vector drawables (using FilterCanvas). **/ -public class QSImageView extends ImageView { - - private final int mOutlineWidth; - private final int mColorEnabled; - private final int mColorDisabled; - private FilterCanvas mFilterCanvas; - private Canvas mCanvas; - private boolean mEnabledVersion = true; - private boolean mFilter; - - public QSImageView(Context context) { - this(context, null); - } - - public QSImageView(Context context, AttributeSet attrs) { - super(context, attrs); - final Resources res = context.getResources(); - mOutlineWidth = res.getDimensionPixelSize(R.dimen.quick_settings_tile_icon_outline); - mColorEnabled = res.getColor(R.color.quick_settings_tile_icon_enabled); - mColorDisabled = res.getColor(R.color.quick_settings_tile_icon_disabled); - } - - public void setEnabledVersion(boolean enabledVersion) { - mEnabledVersion = enabledVersion; - invalidate(); - } - - @Override - public void setImageDrawable(Drawable drawable) { - mFilter = drawable instanceof VectorDrawable; - super.setImageDrawable(drawable); - } - - @Override - public void setImageResource(int resId) { - setImageDrawable(mContext.getDrawable(resId)); - } - - @Override - public void draw(Canvas canvas) { - if (mFilter) { - if (canvas != mCanvas) { - mCanvas = canvas; - mFilterCanvas = new QSFilterCanvas(canvas); - } - super.draw(mFilterCanvas); - } else { - super.draw(canvas); - } - } - - private class QSFilterCanvas extends FilterCanvas { - public QSFilterCanvas(Canvas c) { - super(c); - } - - @Override - public void drawPath(Path path, Paint paint) { - if (mEnabledVersion) { - paint.setColor(mColorEnabled); - } else { - paint.setStyle(Style.STROKE); - paint.setStrokeJoin(Paint.Join.ROUND); - paint.setColor(mColorDisabled); - paint.setStrokeWidth(mOutlineWidth); - } - super.drawPath(path, paint); - } - } -} diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java index afb5483..6176eb6 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java @@ -80,7 +80,10 @@ public class QSPanel extends ViewGroup { showDetail(false /*show*/, mDetailRecord); } for (TileRecord r : mRecords) { - r.tile.setShown(expanded); + r.tile.setListening(expanded); + if (expanded) { + r.tile.refreshState(); + } } } @@ -125,6 +128,7 @@ public class QSPanel extends ViewGroup { } }; r.tileView.init(click, clickSecondary); + r.tile.refreshState(); mRecords.add(r); addView(r.tileView); @@ -156,24 +160,29 @@ public class QSPanel extends ViewGroup { mCellHeight = (int)(mCellWidth / TILE_ASPECT); mLargeCellWidth = (int)(mCellWidth * LARGE_TILE_FACTOR); mLargeCellHeight = (int)(mCellHeight * LARGE_TILE_FACTOR); - int r = 0; - int c = 0; + int r = -1; + int c = -1; int rows = 0; + boolean rowIsDual = false; for (TileRecord record : mRecords) { if (record.tileView.getVisibility() == GONE) continue; + // wrap to next column if we've reached the max # of columns + // also don't allow dual + single tiles on the same row + if (r == -1 || c == (mColumns - 1) || rowIsDual != record.tile.supportsDualTargets()) { + r++; + c = 0; + rowIsDual = record.tile.supportsDualTargets(); + } else { + c++; + } record.row = r; record.col = c; rows = r + 1; - c++; - if (c == mColumns /*end of normal column*/ || r == 0 && c == 2 /*end of 1st column*/) { - c = 0; - r++; - } } for (TileRecord record : mRecords) { if (record.tileView.getVisibility() == GONE) continue; - record.tileView.setDual(record.row == 0); + record.tileView.setDual(record.tile.supportsDualTargets()); final int cw = record.row == 0 ? mLargeCellWidth : mCellWidth; final int ch = record.row == 0 ? mLargeCellHeight : mCellHeight; record.tileView.measure(exactly(cw), exactly(ch)); diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java index 05f308d..835a5c4 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSTile.java @@ -19,7 +19,6 @@ package com.android.systemui.qs; import android.content.Context; import android.content.Intent; import android.graphics.drawable.Drawable; -import android.graphics.drawable.VectorDrawable; import android.os.Handler; import android.os.Looper; import android.os.Message; @@ -30,7 +29,7 @@ import android.view.ViewGroup; import com.android.systemui.qs.QSTile.State; import com.android.systemui.statusbar.policy.BluetoothController; import com.android.systemui.statusbar.policy.CastController; -import com.android.systemui.statusbar.policy.Disposable; +import com.android.systemui.statusbar.policy.Listenable; import com.android.systemui.statusbar.policy.LocationController; import com.android.systemui.statusbar.policy.NetworkController; import com.android.systemui.statusbar.policy.RotationLockController; @@ -47,8 +46,10 @@ import java.util.Objects; * handleUpdateState. Callbacks affecting state should use refreshState to trigger another * state update pass on tile looper. */ -public abstract class QSTile<TState extends State> implements Disposable { - private final String TAG = "QSTile." + getClass().getSimpleName(); +public abstract class QSTile<TState extends State> implements Listenable { + protected final String TAG = "QSTile." + getClass().getSimpleName(); + protected static final boolean DEBUG = false; + public static final int FEEDBACK_START_DELAY = 400; protected final Host mHost; protected final Context mContext; @@ -69,6 +70,10 @@ public abstract class QSTile<TState extends State> implements Disposable { mHandler = new H(host.getLooper()); } + public boolean supportsDualTargets() { + return false; + } + public Host getHost() { return mHost; } @@ -111,10 +116,6 @@ public abstract class QSTile<TState extends State> implements Disposable { mHandler.obtainMessage(H.USER_SWITCH, newUserId).sendToTarget(); } - public void setShown(boolean shown) { - mHandler.obtainMessage(H.SHOWN, shown ? 1 : 0, 0).sendToTarget(); - } - // call only on tile worker looper private void handleSetCallback(Callback callback) { @@ -126,10 +127,6 @@ public abstract class QSTile<TState extends State> implements Disposable { // optional } - protected void handleShown(boolean shown) { - // optional, discouraged - } - protected void handleRefreshState(Object arg) { handleUpdateState(mTmpState, arg); final boolean changed = mTmpState.copyTo(mState); @@ -161,7 +158,6 @@ public abstract class QSTile<TState extends State> implements Disposable { private static final int REFRESH_STATE = 4; private static final int SHOW_DETAIL = 5; private static final int USER_SWITCH = 6; - private static final int SHOWN = 7; private H(Looper looper) { super(looper); @@ -189,9 +185,6 @@ public abstract class QSTile<TState extends State> implements Disposable { } else if (msg.what == USER_SWITCH) { name = "handleUserSwitch"; handleUserSwitch(msg.arg1); - } else if (msg.what == SHOWN) { - name = "handleShown"; - handleShown(msg.arg1 != 0); } } catch (Throwable t) { final String error = "Error in " + name; @@ -212,7 +205,6 @@ public abstract class QSTile<TState extends State> implements Disposable { void collapsePanels(); Looper getLooper(); Context getContext(); - VectorDrawable getVectorDrawable(int resId); BluetoothController getBluetoothController(); LocationController getLocationController(); RotationLockController getRotationLockController(); diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java index 17a95fb..4cfb636 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileView.java @@ -25,9 +25,11 @@ import android.os.Handler; import android.os.Looper; import android.os.Message; import android.util.TypedValue; +import android.view.ContextThemeWrapper; import android.view.Gravity; import android.view.View; import android.view.ViewGroup; +import android.widget.ImageView; import android.widget.ImageView.ScaleType; import android.widget.TextView; @@ -43,9 +45,9 @@ public class QSTileView extends ViewGroup { protected final Context mContext; private final View mIcon; private final View mDivider; - private final TextView mLabel; private final H mHandler = new H(); + private TextView mLabel; private boolean mDual; private OnClickListener mClickPrimary; private OnClickListener mClickSecondary; @@ -55,14 +57,7 @@ public class QSTileView extends ViewGroup { mContext = context; final Resources res = context.getResources(); - mLabel = new TextView(mContext); - mLabel.setId(android.R.id.title); - mLabel.setTextColor(res.getColor(R.color.quick_settings_tile_text)); - mLabel.setGravity(Gravity.CENTER); - mLabel.setTypeface(CONDENSED); - mLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX, - res.getDimensionPixelSize(R.dimen.quick_settings_tile_text_size)); - addView(mLabel); + recreateLabel(); setClipChildren(false); mIcon = createIcon(); @@ -78,8 +73,33 @@ public class QSTileView extends ViewGroup { setBackground(getSelectableBackground()); } + private void recreateLabel() { + CharSequence labelText = null; + if (mLabel != null) { + labelText = mLabel.getText(); + removeView(mLabel); + } + final Resources res = mContext.getResources(); + mLabel = new TextView(mDual ? new ContextThemeWrapper(mContext, R.style.QSBorderless_Tiny) + : mContext); + mLabel.setId(android.R.id.title); + mLabel.setTextColor(res.getColor(R.color.quick_settings_tile_text)); + mLabel.setGravity(Gravity.CENTER); + mLabel.setTypeface(CONDENSED); + mLabel.setTextSize(TypedValue.COMPLEX_UNIT_PX, + res.getDimensionPixelSize(R.dimen.quick_settings_tile_text_size)); + if (labelText != null) { + mLabel.setText(labelText); + } + addView(mLabel); + } + public void setDual(boolean dual) { + final boolean changed = dual != mDual; mDual = dual; + if (changed) { + recreateLabel(); + } if (mDual) { setOnClickListener(mClickPrimary); mLabel.setClickable(true); @@ -98,7 +118,7 @@ public class QSTileView extends ViewGroup { } protected View createIcon() { - QSImageView icon = new QSImageView(mContext); + final ImageView icon = new ImageView(mContext); icon.setId(android.R.id.icon); icon.setScaleType(ScaleType.CENTER_INSIDE); return icon; @@ -120,9 +140,10 @@ public class QSTileView extends ViewGroup { final int iconSpec = exactly((int)mLabel.getTextSize() * 2); mIcon.measure(iconSpec, iconSpec); mLabel.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(h, MeasureSpec.AT_MOST)); - mLabel.measure(widthMeasureSpec, exactly(mLabel.getMeasuredHeight() + p * 2)); if (mDual) { mDivider.measure(widthMeasureSpec, exactly(mDivider.getLayoutParams().height)); + } else { + mLabel.measure(widthMeasureSpec, exactly(mLabel.getMeasuredHeight() + p * 2)); } setMeasuredDimension(w, h); } @@ -156,15 +177,12 @@ public class QSTileView extends ViewGroup { } protected void handleStateChanged(QSTile.State state) { - if (mIcon instanceof QSImageView) { - QSImageView qsiv = (QSImageView) mIcon; + if (mIcon instanceof ImageView) { + ImageView iv = (ImageView) mIcon; if (state.icon != null) { - qsiv.setImageDrawable(state.icon); + iv.setImageDrawable(state.icon); } else if (state.iconId > 0) { - qsiv.setImageResource(state.iconId); - } - if (state.icon != null && state instanceof QSTile.BooleanState) { - qsiv.setEnabledVersion(((QSTile.BooleanState)state).value); + iv.setImageResource(state.iconId); } } mLabel.setText(state.label); diff --git a/packages/SystemUI/src/com/android/systemui/qs/SecureSetting.java b/packages/SystemUI/src/com/android/systemui/qs/SecureSetting.java index 4debaa9..3ed3d30 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/SecureSetting.java +++ b/packages/SystemUI/src/com/android/systemui/qs/SecureSetting.java @@ -21,10 +21,10 @@ import android.database.ContentObserver; import android.os.Handler; import android.provider.Settings.Secure; -import com.android.systemui.statusbar.policy.Disposable; +import com.android.systemui.statusbar.policy.Listenable; /** Helper for managing a secure setting. **/ -public abstract class SecureSetting extends ContentObserver implements Disposable { +public abstract class SecureSetting extends ContentObserver implements Listenable { private final Context mContext; private final String mSettingName; @@ -38,8 +38,7 @@ public abstract class SecureSetting extends ContentObserver implements Disposabl } public void rebindForCurrentUser() { - mContext.getContentResolver().registerContentObserver( - Secure.getUriFor(mSettingName), false, this); + setListening(true); } public int getValue() { @@ -51,8 +50,13 @@ public abstract class SecureSetting extends ContentObserver implements Disposabl } @Override - public void dispose() { - mContext.getContentResolver().unregisterContentObserver(this); + public void setListening(boolean listening) { + if (listening) { + mContext.getContentResolver().registerContentObserver( + Secure.getUriFor(mSettingName), false, this); + } else { + mContext.getContentResolver().unregisterContentObserver(this); + } } @Override diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java index 5fe8422..c0f9bf2 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java @@ -39,11 +39,6 @@ public class AirplaneModeTile extends QSTile<QSTile.BooleanState> { handleRefreshState(value); } }; - - final IntentFilter filter = new IntentFilter(); - filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED); - mContext.registerReceiver(mReceiver, filter); - refreshState(); } @Override @@ -70,7 +65,6 @@ public class AirplaneModeTile extends QSTile<QSTile.BooleanState> { state.value = airplaneMode; state.visible = true; state.label = mContext.getString(R.string.quick_settings_airplane_mode_label); - state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_airplane); if (airplaneMode) { state.iconId = R.drawable.ic_qs_airplane_on; state.contentDescription = mContext.getString( @@ -84,9 +78,15 @@ public class AirplaneModeTile extends QSTile<QSTile.BooleanState> { } } - public void dispose() { - mSetting.dispose(); - mContext.unregisterReceiver(mReceiver); + public void setListening(boolean listening) { + if (listening) { + final IntentFilter filter = new IntentFilter(); + filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED); + mContext.registerReceiver(mReceiver, filter); + } else { + mContext.unregisterReceiver(mReceiver); + } + mSetting.setListening(listening); } private final BroadcastReceiver mReceiver = new BroadcastReceiver() { diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java index 60a6047..7335ab4 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java @@ -33,7 +33,11 @@ public class BluetoothTile extends QSTile<QSTile.BooleanState> { public BluetoothTile(Host host) { super(host); mController = host.getBluetoothController(); - mController.addStateChangedCallback(mCallback); + } + + @Override + public boolean supportsDualTargets() { + return true; } @Override @@ -42,8 +46,12 @@ public class BluetoothTile extends QSTile<QSTile.BooleanState> { } @Override - public void dispose() { - mController.removeStateChangedCallback(mCallback); + public void setListening(boolean listening) { + if (listening) { + mController.addStateChangedCallback(mCallback); + } else { + mController.removeStateChangedCallback(mCallback); + } } @Override @@ -64,14 +72,13 @@ public class BluetoothTile extends QSTile<QSTile.BooleanState> { final boolean connected = mController.isBluetoothConnected(); state.visible = supported; state.value = enabled; - state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_bluetooth); final String stateContentDescription; if (enabled) { if (connected) { - state.iconId = R.drawable.ic_qs_bluetooth_on; + state.iconId = R.drawable.ic_qs_bluetooth_connected; stateContentDescription = mContext.getString(R.string.accessibility_desc_connected); } else { - state.iconId = R.drawable.ic_qs_bluetooth_not_connected; + state.iconId = R.drawable.ic_qs_bluetooth_on; stateContentDescription = mContext.getString(R.string.accessibility_desc_on); } state.label = mContext.getString(R.string.quick_settings_bluetooth_label); diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/BugreportTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/BugreportTile.java index 0e9b9a7..bfd416d 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/BugreportTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/BugreportTile.java @@ -51,21 +51,25 @@ public class BugreportTile extends QSTile<QSTile.State> { } @Override - public void dispose() { - mSetting.dispose(); + public void setListening(boolean listening) { + mSetting.setListening(listening); } @Override protected void handleClick() { - mHost.collapsePanels(); - mUiHandler.post(mShowDialog); + mHandler.postDelayed(new Runnable() { + @Override + public void run() { + mHost.collapsePanels(); + mUiHandler.post(mShowDialog); + } + }, FEEDBACK_START_DELAY); } @Override protected void handleUpdateState(State state, Object pushArg) { state.visible = mSetting.getValue() != 0; - state.iconId = com.android.internal.R.drawable.stat_sys_adb; - state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_bugreport); + state.iconId = R.drawable.ic_qs_bugreport; state.label = mContext.getString(com.android.internal.R.string.bugreport_title); } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java index a3eaa2c..907c77e 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CastTile.java @@ -35,14 +35,9 @@ public class CastTile extends QSTile<QSTile.BooleanState> { private final CastController mController; - private boolean mShown; - public CastTile(Host host) { super(host); mController = host.getCastController(); - if (mController != null) { - mController.addCallback(mCallback); - } } @Override @@ -51,9 +46,14 @@ public class CastTile extends QSTile<QSTile.BooleanState> { } @Override - public void dispose() { + public void setListening(boolean listening) { if (mController == null) return; - mController.removeCallback(mCallback); + if (listening) { + mController.addCallback(mCallback); + } else { + mController.removeCallback(mCallback); + } + mController.setDiscovering(listening); } @Override @@ -64,17 +64,13 @@ public class CastTile extends QSTile<QSTile.BooleanState> { } @Override - protected void handleShown(boolean shown) { - if (mShown == shown) return; - if (mController == null) return; - mShown = shown; - mController.setDiscovering(mShown); - } - - @Override protected void handleClick() { - mHost.collapsePanels(); - mUiHandler.post(mShowDialog); + mHandler.postDelayed(new Runnable() { + public void run() { + mHost.collapsePanels(); + mUiHandler.post(mShowDialog); + } + }, FEEDBACK_START_DELAY); } @Override @@ -82,13 +78,13 @@ public class CastTile extends QSTile<QSTile.BooleanState> { state.visible = true; state.label = mContext .getString(R.string.quick_settings_remote_display_no_connection_label); - state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_cast); if (arg instanceof CallbackInfo) { final CallbackInfo cb = (CallbackInfo) arg; if (cb.connectedRouteName != null) { state.value = !cb.connecting; } } + state.iconId = state.value ? R.drawable.ic_qs_cast_on : R.drawable.ic_qs_cast_off; } private static class CallbackInfo { diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java index 86a4e79..182a0ce 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java @@ -38,7 +38,6 @@ public class CellularTile extends QSTile<QSTile.SignalState> { public CellularTile(Host host) { super(host); mController = host.getNetworkController(); - mController.addNetworkSignalChangedCallback(mCallback); } @Override @@ -47,8 +46,12 @@ public class CellularTile extends QSTile<QSTile.SignalState> { } @Override - public void dispose() { - mController.removeNetworkSignalChangedCallback(mCallback); + public void setListening(boolean listening) { + if (listening) { + mController.addNetworkSignalChangedCallback(mCallback); + } else { + mController.removeNetworkSignalChangedCallback(mCallback); + } } @Override diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/ColorInversionTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/ColorInversionTile.java index 66740af..5301362 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/ColorInversionTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/ColorInversionTile.java @@ -39,8 +39,6 @@ public class ColorInversionTile extends QSTile<QSTile.BooleanState> { handleRefreshState(value); } }; - - refreshState(); } @Override @@ -49,8 +47,8 @@ public class ColorInversionTile extends QSTile<QSTile.BooleanState> { } @Override - public void dispose() { - mSetting.dispose(); + public void setListening(boolean listening) { + mSetting.setListening(listening); } @Override @@ -73,6 +71,6 @@ public class ColorInversionTile extends QSTile<QSTile.BooleanState> { state.visible = mVisible; state.value = enabled; state.label = mContext.getString(R.string.quick_settings_inversion_label); - state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_invert_colors); + state.iconId = R.drawable.ic_qs_color_inversion; } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java index 1a67afc..f2ba558 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/HotspotTile.java @@ -42,7 +42,7 @@ public class HotspotTile extends QSTile<QSTile.State> { } @Override - public void dispose() { + public void setListening(boolean listening) { } @@ -55,6 +55,6 @@ public class HotspotTile extends QSTile<QSTile.State> { protected void handleUpdateState(State state, Object arg) { state.visible = mController != null; state.label = mContext.getString(R.string.quick_settings_hotspot_label); - state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_hotspot); + state.iconId = R.drawable.ic_qs_hotspot_off; } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java index d32f98f..c5ad9e6 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/LocationTile.java @@ -16,6 +16,8 @@ package com.android.systemui.qs.tiles; +import android.graphics.drawable.AnimationDrawable; + import com.android.systemui.R; import com.android.systemui.qs.QSTile; import com.android.systemui.statusbar.policy.LocationController; @@ -29,7 +31,6 @@ public class LocationTile extends QSTile<QSTile.BooleanState> { public LocationTile(Host host) { super(host); mController = host.getLocationController(); - mController.addSettingsChangedCallback(mCallback); } @Override @@ -37,8 +38,13 @@ public class LocationTile extends QSTile<QSTile.BooleanState> { return new BooleanState(); } - public void dispose() { - mController.removeSettingsChangedCallback(mCallback); + @Override + public void setListening(boolean listening) { + if (listening) { + mController.addSettingsChangedCallback(mCallback); + } else { + mController.removeSettingsChangedCallback(mCallback); + } } @Override @@ -56,16 +62,27 @@ public class LocationTile extends QSTile<QSTile.BooleanState> { protected void handleUpdateState(BooleanState state, Object arg) { final boolean locationEnabled = mController.isLocationEnabled(); state.visible = true; - state.value = locationEnabled; - state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_location); + if (state.value != locationEnabled) { + state.value = locationEnabled; + final AnimationDrawable d = (AnimationDrawable) mContext.getDrawable(locationEnabled + ? R.drawable.ic_qs_location_on + : R.drawable.ic_qs_location_off); + state.icon = d; + mUiHandler.post(new Runnable() { + @Override + public void run() { + d.start(); + } + }); + } if (locationEnabled) { - state.iconId = R.drawable.ic_qs_location_on; + if (state.icon == null) state.iconId = R.drawable.ic_qs_location_01; state.label = mContext.getString(R.string.quick_settings_location_label); state.contentDescription = mContext.getString( R.string.accessibility_quick_settings_location, mContext.getString(R.string.accessibility_desc_on)); } else { - state.iconId = R.drawable.ic_qs_location_off; + if (state.icon == null) state.iconId = R.drawable.ic_qs_location_11; state.label = mContext.getString(R.string.quick_settings_location_off_label); state.contentDescription = mContext.getString( R.string.accessibility_quick_settings_location, diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/RingerModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/RingerModeTile.java index 36a579c..c5e9b52 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/RingerModeTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/RingerModeTile.java @@ -33,8 +33,6 @@ public class RingerModeTile extends QSTile<RingerModeTile.IntState> { public RingerModeTile(Host host) { super(host); mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); - final IntentFilter filter = new IntentFilter(AudioManager.RINGER_MODE_CHANGED_ACTION); - mContext.registerReceiver(mReceiver, filter); } @Override @@ -43,8 +41,13 @@ public class RingerModeTile extends QSTile<RingerModeTile.IntState> { } @Override - public void dispose() { - mContext.unregisterReceiver(mReceiver); + public void setListening(boolean listening) { + if (listening) { + final IntentFilter filter = new IntentFilter(AudioManager.RINGER_MODE_CHANGED_ACTION); + mContext.registerReceiver(mReceiver, filter); + } else { + mContext.unregisterReceiver(mReceiver); + } } @Override @@ -64,13 +67,13 @@ public class RingerModeTile extends QSTile<RingerModeTile.IntState> { state.visible = true; state.value = ringerMode; if (ringerMode == AudioManager.RINGER_MODE_VIBRATE) { - state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_ringer_vibrate); + state.iconId = R.drawable.ic_qs_ringer_vibrate; state.label = "Vibrate"; } else if (ringerMode == AudioManager.RINGER_MODE_SILENT) { - state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_ringer_silent); + state.iconId = R.drawable.ic_qs_ringer_silent; state.label = "Silent"; } else { - state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_ringer_audible); + state.iconId = R.drawable.ic_qs_ringer_audible; state.label = "Audible"; } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java index d075299..1b0967b 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/RotationLockTile.java @@ -33,8 +33,6 @@ public class RotationLockTile extends QSTile<QSTile.BooleanState> { public RotationLockTile(Host host) { super(host); mController = host.getRotationLockController(); - if (mController == null) return; - mController.addRotationLockControllerCallback(mCallback); } @Override @@ -42,9 +40,13 @@ public class RotationLockTile extends QSTile<QSTile.BooleanState> { return new BooleanState(); } - public void dispose() { + public void setListening(boolean listening) { if (mController == null) return; - mController.removeRotationLockControllerCallback(mCallback); + if (listening) { + mController.addRotationLockControllerCallback(mCallback); + } else { + mController.removeRotationLockControllerCallback(mCallback); + } } @Override @@ -61,8 +63,8 @@ public class RotationLockTile extends QSTile<QSTile.BooleanState> { if (state.value != rotationLocked) { state.value = rotationLocked; final AnimationDrawable d = (AnimationDrawable) mContext.getDrawable(rotationLocked - ? R.drawable.ic_rotate_locked_anim - : R.drawable.ic_rotate_unlocked_anim); + ? R.drawable.ic_qs_rotation_locked + : R.drawable.ic_qs_rotation_unlocked); state.icon = d; mUiHandler.post(new Runnable() { @Override @@ -80,12 +82,12 @@ public class RotationLockTile extends QSTile<QSTile.BooleanState> { : R.string.quick_settings_rotation_locked_label; state.label = mContext.getString(label); if (state.icon == null) { - state.icon = mContext.getDrawable(R.drawable.ic_rotate_24_15); + state.icon = mContext.getDrawable(R.drawable.ic_qs_rotation_15); } } else { state.label = mContext.getString(R.string.quick_settings_rotation_unlocked_label); if (state.icon == null) { - state.icon = mContext.getDrawable(R.drawable.ic_rotate_24_01); + state.icon = mContext.getDrawable(R.drawable.ic_qs_rotation_01); } } } diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java index e08a6fa..ef7fb89 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java @@ -20,6 +20,7 @@ import android.content.Context; import android.content.Intent; import android.content.res.Resources; import android.provider.Settings; +import android.util.Log; import com.android.systemui.R; import com.android.systemui.qs.QSTile; @@ -37,7 +38,11 @@ public class WifiTile extends QSTile<QSTile.SignalState> { public WifiTile(Host host) { super(host); mController = host.getNetworkController(); - mController.addNetworkSignalChangedCallback(mCallback); + } + + @Override + public boolean supportsDualTargets() { + return true; } @Override @@ -46,8 +51,12 @@ public class WifiTile extends QSTile<QSTile.SignalState> { } @Override - public void dispose() { - mController.removeNetworkSignalChangedCallback(mCallback); + public void setListening(boolean listening) { + if (listening) { + mController.addNetworkSignalChangedCallback(mCallback); + } else { + mController.removeNetworkSignalChangedCallback(mCallback); + } } @Override @@ -67,8 +76,9 @@ public class WifiTile extends QSTile<QSTile.SignalState> { @Override protected void handleUpdateState(SignalState state, Object arg) { - if (arg == null) return; state.visible = true; + if (DEBUG) Log.d(TAG, "handleUpdateState arg=" + arg); + if (arg == null) return; CallbackInfo cb = (CallbackInfo) arg; boolean wifiConnected = cb.enabled && (cb.wifiSignalIconId > 0) && (cb.enabledDesc != null); @@ -114,6 +124,18 @@ public class WifiTile extends QSTile<QSTile.SignalState> { boolean activityIn; boolean activityOut; String wifiSignalContentDescription; + + @Override + public String toString() { + return new StringBuilder("CallbackInfo[") + .append("enabled=").append(enabled) + .append(",wifiSignalIconId=").append(wifiSignalIconId) + .append(",enabledDesc=").append(enabledDesc) + .append(",activityIn=").append(activityIn) + .append(",activityOut=").append(activityOut) + .append(",wifiSignalContentDescription=").append(wifiSignalContentDescription) + .append(']').toString(); + } } private final NetworkSignalChangedCallback mCallback = new NetworkSignalChangedCallback() { @@ -121,6 +143,7 @@ public class WifiTile extends QSTile<QSTile.SignalState> { public void onWifiSignalChanged(boolean enabled, int wifiSignalIconId, boolean activityIn, boolean activityOut, String wifiSignalContentDescriptionId, String description) { + if (DEBUG) Log.d(TAG, "onWifiSignalChanged enabled=" + enabled); final CallbackInfo info = new CallbackInfo(); info.enabled = enabled; info.wifiSignalIconId = wifiSignalIconId; diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeDetail.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeDetail.java index dceb856..2edefe7 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeDetail.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeDetail.java @@ -32,6 +32,7 @@ import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; +import android.widget.ImageView; import android.widget.ListView; import android.widget.RadioButton; import android.widget.RelativeLayout; @@ -39,7 +40,6 @@ import android.widget.Switch; import android.widget.TextView; import com.android.systemui.R; -import com.android.systemui.qs.QSImageView; import com.android.systemui.qs.QSTile; import com.android.systemui.statusbar.policy.ZenModeController; @@ -72,9 +72,7 @@ public class ZenModeDetail extends RelativeLayout { mContext = getContext(); mController = mHost.getZenModeController(); - final QSImageView close = (QSImageView) findViewById(android.R.id.button1); - close.setImageDrawable(mHost.getVectorDrawable(R.drawable.ic_qs_close)); - close.setEnabledVersion(true); + final ImageView close = (ImageView) findViewById(android.R.id.button1); close.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -239,9 +237,7 @@ public class ZenModeDetail extends RelativeLayout { title.setText(condition.summary); title.setEnabled(enabled); title.setAlpha(enabled ? 1 : .5f); - final QSImageView button1 = (QSImageView) row.findViewById(android.R.id.button1); - button1.setImageDrawable(mHost.getVectorDrawable(R.drawable.ic_qs_minus)); - button1.setEnabledVersion(true); + final ImageView button1 = (ImageView) row.findViewById(android.R.id.button1); button1.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { @@ -250,9 +246,7 @@ public class ZenModeDetail extends RelativeLayout { } }); - final QSImageView button2 = (QSImageView) row.findViewById(android.R.id.button2); - button2.setImageDrawable(mHost.getVectorDrawable(R.drawable.ic_qs_plus)); - button2.setEnabledVersion(true); + final ImageView button2 = (ImageView) row.findViewById(android.R.id.button2); button2.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeTile.java index 83918e8..bfa9c19 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/ZenModeTile.java @@ -17,6 +17,7 @@ package com.android.systemui.qs.tiles; import android.content.Context; +import android.util.Log; import android.view.ContextThemeWrapper; import android.view.LayoutInflater; import android.view.View; @@ -33,7 +34,6 @@ public class ZenModeTile extends QSTile<QSTile.BooleanState> { public ZenModeTile(Host host) { super(host); mController = host.getZenModeController(); - mController.addCallback(mCallback); } @Override @@ -51,8 +51,12 @@ public class ZenModeTile extends QSTile<QSTile.BooleanState> { } @Override - public void dispose() { - mController.removeCallback(mCallback); + public void setListening(boolean listening) { + if (listening) { + mController.addCallback(mCallback); + } else { + mController.removeCallback(mCallback); + } } @Override @@ -69,14 +73,14 @@ public class ZenModeTile extends QSTile<QSTile.BooleanState> { final boolean zen = arg instanceof Boolean ? (Boolean)arg : mController.isZen(); state.value = zen; state.visible = true; - state.iconId = R.drawable.stat_sys_zen_limited; - state.icon = mHost.getVectorDrawable(R.drawable.ic_qs_zen); + state.iconId = zen ? R.drawable.ic_qs_zen_on : R.drawable.ic_qs_zen_off; state.label = mContext.getString(R.string.zen_mode_title); } private final ZenModeController.Callback mCallback = new ZenModeController.Callback() { @Override public void onZenChanged(boolean zen) { + if (DEBUG) Log.d(TAG, "onZenChanged " + zen); refreshState(zen); } }; diff --git a/packages/SystemUI/src/com/android/systemui/recent/Recents.java b/packages/SystemUI/src/com/android/systemui/recent/Recents.java index d3e949f..00c43e8 100644 --- a/packages/SystemUI/src/com/android/systemui/recent/Recents.java +++ b/packages/SystemUI/src/com/android/systemui/recent/Recents.java @@ -43,14 +43,12 @@ public class Recents extends SystemUI implements RecentsComponent { private static final boolean DEBUG = true; // Which recents to use - boolean mUseAlternateRecents; + boolean mUseAlternateRecents = true; AlternateRecentsComponent mAlternateRecents; boolean mBootCompleted = false; @Override public void start() { - Configuration config = mContext.getResources().getConfiguration(); - mUseAlternateRecents = (config.smallestScreenWidthDp < 600); if (mUseAlternateRecents) { if (mAlternateRecents == null) { mAlternateRecents = new AlternateRecentsComponent(mContext); diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsTaskLoader.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsTaskLoader.java index 1ca0476..1c12ac2 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsTaskLoader.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsTaskLoader.java @@ -400,15 +400,14 @@ public class RecentsTaskLoader { ActivityInfo info = ssp.getActivityInfo(t.baseIntent.getComponent(), t.userId); if (info == null) continue; - ActivityManager.RecentsActivityValues av = t.activityValues; + ActivityManager.TaskDescription av = t.taskDescription; String activityLabel = null; BitmapDrawable activityIcon = null; int activityColor = 0; if (av != null) { - activityLabel = (av.label != null ? av.label.toString() : - ssp.getActivityLabel(info)); - activityIcon = (av.icon != null) ? new BitmapDrawable(res, av.icon) : null; - activityColor = av.colorPrimary; + activityLabel = (av.getLabel() != null ? av.getLabel() : ssp.getActivityLabel(info)); + activityIcon = (av.getIcon() != null) ? new BitmapDrawable(res, av.getIcon()) : null; + activityColor = av.getPrimaryColor(); } else { activityLabel = ssp.getActivityLabel(info); } diff --git a/packages/SystemUI/src/com/android/systemui/recents/SystemServicesProxy.java b/packages/SystemUI/src/com/android/systemui/recents/SystemServicesProxy.java index 8d82883..59d0ea6 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/SystemServicesProxy.java +++ b/packages/SystemUI/src/com/android/systemui/recents/SystemServicesProxy.java @@ -96,18 +96,19 @@ public class SystemServicesProxy { int packageIndex = i % Constants.DebugFlags.App.SystemServicesProxyMockPackageCount; ComponentName cn = new ComponentName("com.android.test" + packageIndex, "com.android.test" + i + ".Activity"); + String description = "" + i + " - " + + Long.toString(Math.abs(new Random().nextLong()), 36); // Create the recent task info ActivityManager.RecentTaskInfo rti = new ActivityManager.RecentTaskInfo(); rti.id = rti.persistentId = i; rti.baseIntent = new Intent(); rti.baseIntent.setComponent(cn); - rti.activityValues = new ActivityManager.RecentsActivityValues(); - rti.description = "" + i + " - " + - Long.toString(Math.abs(new Random().nextLong()), 36); + rti.description = description; if (i % 2 == 0) { - rti.activityValues.label = rti.description; - rti.activityValues.icon = Bitmap.createBitmap(mDummyIcon); - rti.activityValues.colorPrimary = new Random().nextInt(); + rti.taskDescription = new ActivityManager.TaskDescription(description, + Bitmap.createBitmap(mDummyIcon), new Random().nextInt()); + } else { + rti.taskDescription = new ActivityManager.TaskDescription(); } tasks.add(rti); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java index 91df9ef..5e8c769 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java @@ -21,6 +21,7 @@ import android.animation.AnimatorListenerAdapter; import android.animation.ObjectAnimator; import android.content.Context; import android.graphics.Canvas; +import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.view.MotionEvent; @@ -45,6 +46,9 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView private int mBgResId = R.drawable.notification_quantum_bg; private int mDimmedBgResId = R.drawable.notification_quantum_bg_dim; + private int mBgTint = 0; + private int mDimmedBgTint = 0; + /** * Flag to indicate that the notification has been touched once and the second touch will * click it. @@ -209,17 +213,23 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView * @param bgResId The background resource to use in normal state. * @param dimmedBgResId The background resource to use in dimmed state. */ - public void setBackgroundResourceIds(int bgResId, int dimmedBgResId) { + public void setBackgroundResourceIds(int bgResId, int bgTint, int dimmedBgResId, int dimmedTint) { mBgResId = bgResId; + mBgTint = bgTint; mDimmedBgResId = dimmedBgResId; + mDimmedBgTint = dimmedTint; updateBackgroundResource(); } + public void setBackgroundResourceIds(int bgResId, int dimmedBgResId) { + setBackgroundResourceIds(bgResId, 0, dimmedBgResId, 0); + } + private void fadeBackgroundResource() { if (mDimmed) { - setBackgroundDimmed(mDimmedBgResId); + setBackgroundDimmed(mDimmedBgResId, mDimmedBgTint); } else { - setBackgroundNormal(mBgResId); + setBackgroundNormal(mBgResId, mBgTint); } int startAlpha = mDimmed ? 255 : 0; int endAlpha = mDimmed ? 0 : 255; @@ -256,12 +266,12 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView private void updateBackgroundResource() { if (mDimmed) { - setBackgroundDimmed(mDimmedBgResId); + setBackgroundDimmed(mDimmedBgResId, mDimmedBgTint); mBackgroundDimmed.setAlpha(255); setBackgroundNormal(null); } else { setBackgroundDimmed(null); - setBackgroundNormal(mBgResId); + setBackgroundNormal(mBgResId, mBgTint); mBackgroundNormal.setAlpha(255); } } @@ -295,12 +305,20 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView invalidate(); } - private void setBackgroundNormal(int drawableResId) { - setBackgroundNormal(getResources().getDrawable(drawableResId)); + private void setBackgroundNormal(int drawableResId, int tintColor) { + final Drawable d = getResources().getDrawable(drawableResId); + if (tintColor != 0) { + d.setColorFilter(tintColor, PorterDuff.Mode.SRC_ATOP); + } + setBackgroundNormal(d); } - private void setBackgroundDimmed(int drawableResId) { - setBackgroundDimmed(getResources().getDrawable(drawableResId)); + private void setBackgroundDimmed(int drawableResId, int tintColor) { + final Drawable d = getResources().getDrawable(drawableResId); + if (tintColor != 0) { + d.setColorFilter(tintColor, PorterDuff.Mode.SRC_ATOP); + } + setBackgroundDimmed(d); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index b079265..7918dec 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -429,14 +429,16 @@ public abstract class BaseStatusBar extends SystemUI implements protected void applyLegacyRowBackground(StatusBarNotification sbn, NotificationData.Entry entry) { + int version = 0; + try { + ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(sbn.getPackageName(), 0); + version = info.targetSdkVersion; + } catch (NameNotFoundException ex) { + Log.e(TAG, "Failed looking up ApplicationInfo for " + sbn.getPackageName(), ex); + } + if (entry.expanded.getId() != com.android.internal.R.id.status_bar_latest_event_content) { - int version = 0; - try { - ApplicationInfo info = mContext.getPackageManager().getApplicationInfo(sbn.getPackageName(), 0); - version = info.targetSdkVersion; - } catch (NameNotFoundException ex) { - Log.e(TAG, "Failed looking up ApplicationInfo for " + sbn.getPackageName(), ex); - } + // Using custom RemoteViews if (version > 0 && version < Build.VERSION_CODES.GINGERBREAD) { entry.row.setBackgroundResource(R.drawable.notification_row_legacy_bg); } else if (version < Build.VERSION_CODES.L) { @@ -903,6 +905,7 @@ public abstract class BaseStatusBar extends SystemUI implements entry.row = row; entry.row.setHeightRange(mRowMinHeight, mRowMaxHeight); entry.row.setOnActivatedListener(this); + entry.row.setIsBelowSpeedBump(isBelowSpeedBump(entry.notification)); entry.expanded = contentViewLocal; entry.expandedPublic = publicViewLocal; entry.setBigContentView(bigContentViewLocal); @@ -1065,8 +1068,8 @@ public abstract class BaseStatusBar extends SystemUI implements if (DEBUG) { Log.d(TAG, "addNotificationViews: added at " + pos); } - updateRowStates(); updateNotificationIcons(); + updateRowStates(); } private void addNotificationViews(IBinder key, StatusBarNotification notification) { @@ -1086,6 +1089,7 @@ public abstract class BaseStatusBar extends SystemUI implements mKeyguardIconOverflowContainer.getIconsView().removeAllViews(); int n = mNotificationData.size(); int visibleNotifications = 0; + int speedBumpIndex = -1; boolean onKeyguard = mState == StatusBarState.KEYGUARD; for (int i = n-1; i >= 0; i--) { NotificationData.Entry entry = mNotificationData.get(i); @@ -1113,6 +1117,10 @@ public abstract class BaseStatusBar extends SystemUI implements entry.row.setVisibility(View.VISIBLE); visibleNotifications++; } + if (entry.row.getVisibility() != View.GONE && speedBumpIndex == -1 + && entry.row.isBelowSpeedBump() ) { + speedBumpIndex = n - 1 - i; + } } if (onKeyguard && mKeyguardIconOverflowContainer.getIconsView().getChildCount() > 0) { @@ -1120,6 +1128,8 @@ public abstract class BaseStatusBar extends SystemUI implements } else { mKeyguardIconOverflowContainer.setVisibility(View.GONE); } + + mStackScroller.updateSpeedBumpIndex(speedBumpIndex); } private boolean shouldShowOnKeyguard(StatusBarNotification sbn) { @@ -1335,9 +1345,19 @@ public abstract class BaseStatusBar extends SystemUI implements } else { entry.row.setOnClickListener(null); } + boolean wasBelow = entry.row.isBelowSpeedBump(); + boolean nowBelow = isBelowSpeedBump(notification); + if (wasBelow != nowBelow) { + entry.row.setIsBelowSpeedBump(nowBelow); + } entry.row.notifyContentUpdated(); } + private boolean isBelowSpeedBump(StatusBarNotification notification) { + return notification.getNotification().priority == + Notification.PRIORITY_MIN; + } + protected void notifyHeadsUpScreenOn(boolean screenOn) { if (!screenOn && mInterruptingNotificationEntry != null) { mHandler.sendEmptyMessage(MSG_ESCALATE_HEADS_UP); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index 39f2bb9..f6c80fc 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -52,6 +52,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private NotificationContentView mPublicLayout; private NotificationContentView mPrivateLayout; private int mMaxExpandHeight; + private boolean mIsBelowSpeedBump; public ExpandableNotificationRow(Context context, AttributeSet attrs) { super(context, attrs); @@ -244,6 +245,14 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mPrivateLayout.setClipTopAmount(clipTopAmount); } + public boolean isBelowSpeedBump() { + return mIsBelowSpeedBump; + } + + public void setIsBelowSpeedBump(boolean isBelow) { + this.mIsBelowSpeedBump = isBelow; + } + public void notifyContentUpdated() { mPrivateLayout.notifyContentUpdated(); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java index 4bd0e1c..061396d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java @@ -40,11 +40,15 @@ public abstract class ExpandableView extends FrameLayout { protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); if (!mActualHeightInitialized && mActualHeight == 0) { - mActualHeight = getHeight(); + mActualHeight = getInitialHeight(); } mActualHeightInitialized = true; } + protected int getInitialHeight() { + return getHeight(); + } + @Override public boolean dispatchTouchEvent(MotionEvent ev) { if (filterMotionEvent(ev)) { @@ -146,6 +150,10 @@ public abstract class ExpandableView extends FrameLayout { } } + public boolean isTransparent() { + return false; + } + /** * A listener notifying when {@link #getActualHeight} changes. */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java b/packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java index 6401695..9c39002 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java @@ -89,7 +89,7 @@ public class InterceptedNotifications { return; } final Notification n = new Notification.Builder(mContext) - .setSmallIcon(R.drawable.stat_sys_zen_limited) + .setSmallIcon(R.drawable.ic_qs_zen_on) .setContentTitle(mContext.getResources().getQuantityString( R.plurals.zen_mode_notification_title, mIntercepted.size(), mIntercepted.size())) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpDotView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpDotView.java new file mode 100644 index 0000000..3ca021a --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpDotView.java @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2014 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 + */ + +package com.android.systemui.statusbar; + +import android.content.Context; +import android.graphics.Canvas; +import android.graphics.Outline; +import android.graphics.Paint; +import android.util.AttributeSet; +import android.view.View; + +/** + * An single dot of the {@link com.android.systemui.statusbar.SpeedBumpDotsLayout} + */ +public class SpeedBumpDotView extends View { + + private final Paint mPaint = new Paint(); + + public SpeedBumpDotView(Context context, AttributeSet attrs) { + super(context, attrs); + mPaint.setAntiAlias(true); + } + + @Override + protected void onDraw(Canvas canvas) { + float radius = getWidth() / 2.0f; + canvas.drawCircle(radius, radius, radius, mPaint); + } + + public void setColor(int color) { + mPaint.setColor(color); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpDotsAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpDotsAlgorithm.java new file mode 100644 index 0000000..cac6327 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpDotsAlgorithm.java @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2014 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 + */ + +package com.android.systemui.statusbar; + +import android.content.Context; +import android.view.View; +import com.android.systemui.R; + +/** + * The Algorithm of the {@link com.android.systemui.statusbar.SpeedBumpDotsLayout} which can be + * queried for {@link * com.android.systemui.statusbar.SpeedBumpDotsState} + */ +public class SpeedBumpDotsAlgorithm { + + private final float mDotRadius; + + public SpeedBumpDotsAlgorithm(Context context) { + mDotRadius = context.getResources().getDimensionPixelSize(R.dimen.speed_bump_dots_height) + / 2.0f; + } + + public void getState(SpeedBumpDotsState resultState) { + + // First reset the current state and ensure that every View has a ViewState + resultState.resetViewStates(); + + SpeedBumpDotsLayout hostView = resultState.getHostView(); + boolean currentlyVisible = hostView.isCurrentlyVisible(); + resultState.setActiveState(currentlyVisible + ? SpeedBumpDotsState.SHOWN + : SpeedBumpDotsState.HIDDEN); + int hostWidth = hostView.getWidth(); + float layoutWidth = hostWidth - 2 * mDotRadius; + int childCount = hostView.getChildCount(); + float paddingBetween = layoutWidth / (childCount - 1); + float centerY = hostView.getHeight() / 2.0f; + for (int i = 0; i < childCount; i++) { + View child = hostView.getChildAt(i); + SpeedBumpDotsState.ViewState viewState = resultState.getViewStateForView(child); + if (currentlyVisible) { + float xTranslation = i * paddingBetween; + viewState.xTranslation = xTranslation; + viewState.yTranslation = calculateYTranslation(hostView, centerY, xTranslation, + layoutWidth); + } else { + viewState.xTranslation = layoutWidth / 2; + viewState.yTranslation = centerY - mDotRadius; + } + viewState.alpha = currentlyVisible ? 1.0f : 0.0f; + viewState.scale = currentlyVisible ? 1.0f : 0.5f; + } + } + + private float calculateYTranslation(SpeedBumpDotsLayout hostView, float centerY, + float xTranslation, float layoutWidth) { + float t = hostView.getAnimationProgress(); + if (t == 0.0f || t == 1.0f) { + return centerY - mDotRadius; + } + float damping = (0.5f -Math.abs(0.5f - t)) * 1.3f; + float partialOffset = xTranslation / layoutWidth; + float indentFactor = (float) (Math.sin((t + partialOffset * 1.5f) * - Math.PI) * damping); + return (1.0f - indentFactor) * centerY - mDotRadius; + } + +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpDotsLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpDotsLayout.java new file mode 100644 index 0000000..ddf5215 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpDotsLayout.java @@ -0,0 +1,136 @@ +/* + * Copyright (C) 2014 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 + */ + +package com.android.systemui.statusbar; + +import android.animation.TimeAnimator; +import android.animation.ValueAnimator; +import android.content.Context; +import android.graphics.Canvas; +import android.util.AttributeSet; +import android.view.View; +import android.view.ViewGroup; +import android.view.animation.AccelerateDecelerateInterpolator; +import com.android.systemui.R; + +/** + * A layout with a certain number of dots which are integrated in the + * {@link com.android.systemui.statusbar.SpeedBumpView} + */ +public class SpeedBumpDotsLayout extends ViewGroup { + + private static final float DOT_CLICK_ANIMATION_LENGTH = 300; + private final int mDotSize; + private final SpeedBumpDotsAlgorithm mAlgorithm = new SpeedBumpDotsAlgorithm(getContext()); + private final SpeedBumpDotsState mCurrentState = new SpeedBumpDotsState(this); + private boolean mIsCurrentlyVisible = true; + private final ValueAnimator mClickAnimator; + private float mAnimationProgress; + private ValueAnimator.AnimatorUpdateListener mClickUpdateListener + = new ValueAnimator.AnimatorUpdateListener() { + @Override + public void onAnimationUpdate(ValueAnimator animation) { + mAnimationProgress = animation.getAnimatedFraction(); + updateChildren(); + } + }; + + public SpeedBumpDotsLayout(Context context, AttributeSet attrs) { + super(context, attrs); + mDotSize = getResources().getDimensionPixelSize(R.dimen.speed_bump_dots_height); + createDots(context, attrs); + mClickAnimator = TimeAnimator.ofFloat(0, DOT_CLICK_ANIMATION_LENGTH); + mClickAnimator.setInterpolator(new AccelerateDecelerateInterpolator()); + mClickAnimator.addUpdateListener(mClickUpdateListener); + } + + private void createDots(Context context, AttributeSet attrs) { + SpeedBumpDotView blueDot = new SpeedBumpDotView(context, attrs); + blueDot.setColor(getResources().getColor(R.color.speed_bump_dot_blue)); + addView(blueDot); + + SpeedBumpDotView redDot = new SpeedBumpDotView(context, attrs); + redDot.setColor(getResources().getColor(R.color.speed_bump_dot_red)); + addView(redDot); + + SpeedBumpDotView yellowDot = new SpeedBumpDotView(context, attrs); + yellowDot.setColor(getResources().getColor(R.color.speed_bump_dot_yellow)); + addView(yellowDot); + + SpeedBumpDotView greenDot = new SpeedBumpDotView(context, attrs); + greenDot.setColor(getResources().getColor(R.color.speed_bump_dot_green)); + addView(greenDot); + } + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + int childWidthSpec = MeasureSpec.makeMeasureSpec(mDotSize, + MeasureSpec.getMode(widthMeasureSpec)); + int childHeightSpec = MeasureSpec.makeMeasureSpec(mDotSize, + MeasureSpec.getMode(heightMeasureSpec)); + measureChildren(childWidthSpec, childHeightSpec); + } + + @Override + protected void onLayout(boolean changed, int l, int t, int r, int b) { + int childCount = getChildCount(); + for (int i = 0; i < childCount; i++) { + View child = getChildAt(i); + child.layout(0, 0, mDotSize, mDotSize); + } + if (changed) { + updateChildren(); + } + } + + private void updateChildren() { + mAlgorithm.getState(mCurrentState); + mCurrentState.apply(); + } + + public void performVisibilityAnimation(boolean visible) { + if (mClickAnimator.isRunning()) { + mClickAnimator.cancel(); + } + mIsCurrentlyVisible = visible; + mAlgorithm.getState(mCurrentState); + mCurrentState.animateToState(); + } + + public void setInvisible() { + mIsCurrentlyVisible = false; + mAlgorithm.getState(mCurrentState); + mCurrentState.apply(); + } + + public boolean isCurrentlyVisible() { + return mIsCurrentlyVisible; + } + + public void performDotClickAnimation() { + if (mClickAnimator.isRunning()) { + // don't perform an animation if it's running already + return; + } + mClickAnimator.start(); + } + + + public float getAnimationProgress() { + return mAnimationProgress; + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpDotsState.java b/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpDotsState.java new file mode 100644 index 0000000..06a7f95 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpDotsState.java @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2014 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 + */ + +package com.android.systemui.statusbar; + +import android.view.View; +import android.view.ViewPropertyAnimator; +import android.view.animation.AnimationUtils; +import android.view.animation.Interpolator; + +import java.util.HashMap; +import java.util.Map; + +/** + * A state of a {@link com.android.systemui.statusbar.SpeedBumpDotsLayout} + */ +public class SpeedBumpDotsState { + + public static final int HIDDEN = 1; + public static final int SHOWN = 2; + private static final int VISIBILITY_ANIMATION_DELAY_PER_ELEMENT = 80; + + private final SpeedBumpDotsLayout mHostView; + private final HashMap<View, ViewState> mStateMap = new HashMap<View, ViewState>(); + private final Interpolator mFastOutSlowInInterpolator; + private int mActiveState = 0; + + public SpeedBumpDotsState(SpeedBumpDotsLayout hostLayout) { + mHostView = hostLayout; + mFastOutSlowInInterpolator = AnimationUtils + .loadInterpolator(hostLayout.getContext(), + android.R.interpolator.fast_out_slow_in); + } + + public SpeedBumpDotsLayout getHostView() { + return mHostView; + } + + public void resetViewStates() { + int numChildren = mHostView.getChildCount(); + for (int i = 0; i < numChildren; i++) { + View child = mHostView.getChildAt(i); + ViewState viewState = mStateMap.get(child); + if (viewState == null) { + viewState = new ViewState(); + mStateMap.put(child, viewState); + } + } + } + + public ViewState getViewStateForView(View requestedView) { + return mStateMap.get(requestedView); + } + + public void apply() { + int childCount = mHostView.getChildCount(); + for (int i = 0; i < childCount; i++) { + View child = mHostView.getChildAt(i); + ViewState viewState = mStateMap.get(child); + float translationX = child.getTranslationX(); + float translationY = child.getTranslationY(); + float scale = child.getScaleX(); + float alpha = child.getAlpha(); + if (translationX != viewState.xTranslation) { + child.setTranslationX(viewState.xTranslation); + } + if (translationY != viewState.yTranslation) { + child.setTranslationY(viewState.yTranslation); + } + if (scale != viewState.scale) { + child.setScaleX(viewState.scale); + child.setScaleY(viewState.scale); + } + if (alpha != viewState.alpha) { + child.setAlpha(viewState.alpha); + } + } + } + + public void animateToState() { + int childCount = mHostView.getChildCount(); + int middleIndex = (childCount - 1) / 2; + long delayPerElement = VISIBILITY_ANIMATION_DELAY_PER_ELEMENT; + boolean isAppearing = getActiveState() == SHOWN; + boolean isDisappearing = getActiveState() == HIDDEN; + for (int i = 0; i < childCount; i++) { + int delayIndex; + if (i <= middleIndex) { + delayIndex = i * 2; + } else { + int distToMiddle = i - middleIndex; + delayIndex = (childCount - 1) - (distToMiddle - 1) * 2; + } + long startDelay = 0; + if (isAppearing || isDisappearing) { + if (isDisappearing) { + delayIndex = childCount - 1 - delayIndex; + } + startDelay = delayIndex * delayPerElement; + } + View child = mHostView.getChildAt(i); + ViewState viewState = mStateMap.get(child); + child.animate().setInterpolator(mFastOutSlowInInterpolator) + .setStartDelay(startDelay) + .alpha(viewState.alpha).withLayer() + .translationX(viewState.xTranslation) + .translationY(viewState.yTranslation) + .scaleX(viewState.scale).scaleY(viewState.scale); + } + } + + public int getActiveState() { + return mActiveState; + } + + public void setActiveState(int mActiveState) { + this.mActiveState = mActiveState; + } + + public static class ViewState { + float xTranslation; + float yTranslation; + float alpha; + float scale; + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpView.java new file mode 100644 index 0000000..8ae503a --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/statusbar/SpeedBumpView.java @@ -0,0 +1,265 @@ +/* + * Copyright (C) 2014 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 + */ + +package com.android.systemui.statusbar; + +import android.animation.Animator; +import android.animation.AnimatorListenerAdapter; +import android.animation.ValueAnimator; +import android.content.Context; +import android.graphics.Outline; +import android.util.AttributeSet; +import android.view.View; +import android.view.animation.AnimationUtils; +import android.view.animation.Interpolator; +import android.widget.TextView; +import com.android.systemui.R; + +/** + * The view representing the separation between important and less important notifications + */ +public class SpeedBumpView extends ExpandableView implements View.OnClickListener { + + private final int mCollapsedHeight; + private final int mDotsHeight; + private final int mTextPaddingInset; + private SpeedBumpDotsLayout mDots; + private View mLineLeft; + private View mLineRight; + private boolean mIsExpanded; + private boolean mDividerVisible = true; + private ValueAnimator mCurrentAnimator; + private final Interpolator mFastOutSlowInInterpolator; + private float mCenterX; + private TextView mExplanationText; + private boolean mExplanationTextVisible = false; + private AnimatorListenerAdapter mHideExplanationListener = new AnimatorListenerAdapter() { + private boolean mCancelled; + + @Override + public void onAnimationEnd(Animator animation) { + if (!mCancelled) { + mExplanationText.setVisibility(View.INVISIBLE); + } + } + + @Override + public void onAnimationCancel(Animator animation) { + mCancelled = true; + } + + @Override + public void onAnimationStart(Animator animation) { + mCancelled = false; + } + }; + private Animator.AnimatorListener mAnimationFinishedListener = new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + mCurrentAnimator = null; + } + }; + + public SpeedBumpView(Context context, AttributeSet attrs) { + super(context, attrs); + mCollapsedHeight = getResources() + .getDimensionPixelSize(R.dimen.speed_bump_height_collapsed); + mTextPaddingInset = getResources().getDimensionPixelSize( + R.dimen.speed_bump_text_padding_inset); + mDotsHeight = getResources().getDimensionPixelSize(R.dimen.speed_bump_dots_height); + setOnClickListener(this); + mFastOutSlowInInterpolator = AnimationUtils.loadInterpolator(getContext(), + android.R.interpolator.fast_out_slow_in); + } + + @Override + protected void onFinishInflate() { + super.onFinishInflate(); + mDots = (SpeedBumpDotsLayout) findViewById(R.id.speed_bump_dots_layout); + mLineLeft = findViewById(R.id.speedbump_line_left); + mLineRight = findViewById(R.id.speedbump_line_right); + mExplanationText = (TextView) findViewById(R.id.speed_bump_text); + resetExplanationText(); + + } + + @Override + protected int getInitialHeight() { + return mCollapsedHeight; + } + + @Override + public int getIntrinsicHeight() { + return getActualHeight(); + } + + @Override + protected void onLayout(boolean changed, int left, int top, int right, int bottom) { + super.onLayout(changed, left, top, right, bottom); + Outline outline = new Outline(); + mCenterX = getWidth() / 2; + float centerY = getHeight() / 2; + // TODO: hide outline better + // Temporary workaround to hide outline on a transparent view + int outlineLeft = (int) (mCenterX - getResources().getDisplayMetrics().densityDpi * 8); + int outlineTop = (int) (centerY - mDotsHeight / 2); + outline.setOval(outlineLeft, outlineTop, outlineLeft + mDotsHeight, + outlineTop + mDotsHeight); + setOutline(outline); + mLineLeft.setPivotX(mLineLeft.getWidth()); + mLineLeft.setPivotY(mLineLeft.getHeight() / 2); + mLineRight.setPivotX(0); + mLineRight.setPivotY(mLineRight.getHeight() / 2); + } + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + measureChildren(widthMeasureSpec, heightMeasureSpec); + int height = mCollapsedHeight + mExplanationText.getMeasuredHeight() - mTextPaddingInset; + setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec), height); + } + + @Override + public void onClick(View v) { + if (mCurrentAnimator != null) { + return; + } + int startValue = mIsExpanded ? getMaxHeight() : mCollapsedHeight; + int endValue = mIsExpanded ? mCollapsedHeight : getMaxHeight(); + mCurrentAnimator = ValueAnimator.ofInt(startValue, endValue); + mCurrentAnimator.setInterpolator(mFastOutSlowInInterpolator); + mCurrentAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { + @Override + public void onAnimationUpdate(ValueAnimator animation) { + setActualHeight((int) animation.getAnimatedValue()); + } + }); + mCurrentAnimator.addListener(mAnimationFinishedListener); + mCurrentAnimator.start(); + mIsExpanded = !mIsExpanded; + mDots.performDotClickAnimation(); + animateExplanationTextInternal(mIsExpanded); + } + + private void animateExplanationTextInternal(boolean visible) { + if (mExplanationTextVisible != visible) { + float translationY = 0.0f; + float scale = 0.5f; + float alpha = 0.0f; + boolean needsHideListener = true; + if (visible) { + mExplanationText.setVisibility(VISIBLE); + translationY = mDots.getBottom() - mTextPaddingInset; + scale = 1.0f; + alpha = 1.0f; + needsHideListener = false; + } + mExplanationText.animate().setInterpolator(mFastOutSlowInInterpolator) + .alpha(alpha) + .scaleX(scale) + .scaleY(scale) + .translationY(translationY) + .setListener(needsHideListener ? mHideExplanationListener : null) + .withLayer(); + mExplanationTextVisible = visible; + } + } + + @Override + public boolean isTransparent() { + return true; + } + + public void performVisibilityAnimation(boolean nowVisible) { + animateDivider(nowVisible); + + // Animate explanation Text + if (mIsExpanded) { + animateExplanationTextInternal(nowVisible); + } + } + + public void animateDivider(boolean nowVisible) { + if (nowVisible != mDividerVisible) { + // Animate dividers + float endValue = nowVisible ? 1.0f : 0.0f; + float endTranslationXLeft = nowVisible ? 0.0f : mCenterX - mLineLeft.getRight(); + float endTranslationXRight = nowVisible ? 0.0f : mCenterX - mLineRight.getLeft(); + mLineLeft.animate() + .alpha(endValue) + .withLayer() + .scaleX(endValue) + .scaleY(endValue) + .translationX(endTranslationXLeft) + .setInterpolator(mFastOutSlowInInterpolator); + mLineRight.animate() + .alpha(endValue) + .withLayer() + .scaleX(endValue) + .scaleY(endValue) + .translationX(endTranslationXRight) + .setInterpolator(mFastOutSlowInInterpolator); + + // Animate dots + mDots.performVisibilityAnimation(nowVisible); + mDividerVisible = nowVisible; + } + } + + public void setInvisible() { + float endTranslationXLeft = mCenterX - mLineLeft.getRight(); + float endTranslationXRight = mCenterX - mLineRight.getLeft(); + mLineLeft.setAlpha(0.0f); + mLineLeft.setScaleX(0.0f); + mLineLeft.setScaleY(0.0f); + mLineLeft.setTranslationX(endTranslationXLeft); + mLineRight.setAlpha(0.0f); + mLineRight.setScaleX(0.0f); + mLineRight.setScaleY(0.0f); + mLineRight.setTranslationX(endTranslationXRight); + mDots.setInvisible(); + resetExplanationText(); + + mDividerVisible = false; + } + + public void collapse() { + if (mIsExpanded) { + setActualHeight(mCollapsedHeight); + mIsExpanded = false; + } + resetExplanationText(); + } + + public void animateExplanationText(boolean nowVisible) { + if (mIsExpanded) { + animateExplanationTextInternal(nowVisible); + } + } + + private void resetExplanationText() { + mExplanationText.setTranslationY(0); + mExplanationText.setVisibility(INVISIBLE); + mExplanationText.setAlpha(0.0f); + mExplanationText.setScaleX(0.5f); + mExplanationText.setScaleY(0.5f); + mExplanationTextVisible = false; + } + + public boolean isExpanded() { + return mIsExpanded; + } +} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java index eb63a54..a41ec22 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java @@ -43,6 +43,7 @@ public class BarTransitions { public static final int MODE_SEMI_TRANSPARENT = 1; public static final int MODE_TRANSLUCENT = 2; public static final int MODE_LIGHTS_OUT = 3; + public static final int MODE_TRANSPARENT = 4; public static final int LIGHTS_IN_DURATION = 250; public static final int LIGHTS_OUT_DURATION = 750; @@ -69,7 +70,8 @@ public class BarTransitions { public void transitionTo(int mode, boolean animate) { // low-end devices do not support translucent modes, fallback to opaque - if (!HIGH_END && (mode == MODE_SEMI_TRANSPARENT || mode == MODE_TRANSLUCENT)) { + if (!HIGH_END && (mode == MODE_SEMI_TRANSPARENT || mode == MODE_TRANSLUCENT + || mode == MODE_TRANSPARENT)) { mode = MODE_OPAQUE; } if (mMode == mode) return; @@ -97,6 +99,7 @@ public class BarTransitions { if (mode == MODE_SEMI_TRANSPARENT) return "MODE_SEMI_TRANSPARENT"; if (mode == MODE_TRANSLUCENT) return "MODE_TRANSLUCENT"; if (mode == MODE_LIGHTS_OUT) return "MODE_LIGHTS_OUT"; + if (mode == MODE_TRANSPARENT) return "MODE_TRANSPARENT"; throw new IllegalArgumentException("Unknown mode " + mode); } @@ -111,6 +114,7 @@ public class BarTransitions { private static class BarBackgroundDrawable extends Drawable { private final int mOpaque; private final int mSemiTransparent; + private final int mTransparent; private final Drawable mGradient; private final TimeInterpolator mInterpolator; @@ -130,9 +134,11 @@ public class BarTransitions { if (DEBUG_COLORS) { mOpaque = 0xff0000ff; mSemiTransparent = 0x7f0000ff; + mTransparent = 0x2f0000ff; } else { mOpaque = res.getColor(R.color.system_bar_background_opaque); mSemiTransparent = res.getColor(R.color.system_bar_background_semi_transparent); + mTransparent = res.getColor(R.color.system_bar_background_transparent); } mGradient = res.getDrawable(gradientResourceId); mInterpolator = new LinearInterpolator(); @@ -184,9 +190,11 @@ public class BarTransitions { public void draw(Canvas canvas) { int targetGradientAlpha = 0, targetColor = 0; if (mMode == MODE_TRANSLUCENT) { - targetGradientAlpha = 0xff; + targetColor = mSemiTransparent; } else if (mMode == MODE_SEMI_TRANSPARENT) { targetColor = mSemiTransparent; + } else if (mMode == MODE_TRANSPARENT) { + targetColor = mTransparent; } else { targetColor = mOpaque; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java index 869edff..0a3fdef 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/DemoStatusIcons.java @@ -60,7 +60,8 @@ public class DemoStatusIcons extends LinearLayout implements DemoMode { } else if (mDemoMode && command.equals(COMMAND_STATUS)) { String volume = args.getString("volume"); if (volume != null) { - int iconId = volume.equals("silent") ? R.drawable.stat_sys_ringer_silent + int iconId = volume.equals("zen") ? R.drawable.stat_sys_ringer_zen + : volume.equals("silent") ? R.drawable.stat_sys_ringer_silent : volume.equals("vibrate") ? R.drawable.stat_sys_ringer_vibrate : 0; updateSlot("volume", null, iconId); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java index a0582ee..c83b479 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarTransitions.java @@ -61,7 +61,7 @@ public final class NavigationBarTransitions extends BarTransitions { @Override public void transitionTo(int mode, boolean animate) { mRequestedMode = mode; - if (mVertical && mode == MODE_TRANSLUCENT) { + if (mVertical && (mode == MODE_TRANSLUCENT || mode == MODE_TRANSPARENT)) { // translucent mode not allowed when vertical mode = MODE_OPAQUE; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index b9f5ab2..19252c0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -18,6 +18,8 @@ package com.android.systemui.statusbar.phone; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; +import android.animation.ObjectAnimator; +import android.animation.PropertyValuesHolder; import android.animation.ValueAnimator; import android.content.Context; import android.util.AttributeSet; @@ -25,6 +27,7 @@ import android.view.MotionEvent; import android.view.VelocityTracker; import android.view.View; import android.view.ViewGroup; +import android.view.ViewTreeObserver; import android.view.accessibility.AccessibilityEvent; import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; @@ -36,12 +39,11 @@ import com.android.systemui.statusbar.FlingAnimationUtils; import com.android.systemui.statusbar.GestureRecorder; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.stack.NotificationStackScrollLayout; +import com.android.systemui.statusbar.stack.StackStateAnimator; public class NotificationPanelView extends PanelView implements ExpandableView.OnHeightChangedListener, ObservableScrollView.Listener, View.OnClickListener { - public static final boolean DEBUG_GESTURES = true; - private static final int EXPANSION_ANIMATION_LENGTH = 375; PhoneStatusBar mStatusBar; private StatusBarHeaderView mHeader; @@ -80,6 +82,20 @@ public class NotificationPanelView extends PanelView implements private FlingAnimationUtils mFlingAnimationUtils; private int mStatusBarMinHeight; + private int mClockNotificationsMarginMin; + private int mClockNotificationsMarginMax; + private float mClockYFractionMin; + private float mClockYFractionMax; + private Interpolator mFastOutSlowInInterpolator; + private ObjectAnimator mClockAnimator; + private int mClockAnimationTarget = -1; + + /** + * The number (fractional) of notifications the "more" card counts when calculating how many + * notifications are currently visible for the y positioning of the clock. + */ + private float mMoreCardNotificationAmount; + public NotificationPanelView(Context context, AttributeSet attrs) { super(context, attrs); } @@ -113,9 +129,27 @@ public class NotificationPanelView extends PanelView implements mNotificationStackScroller = (NotificationStackScrollLayout) findViewById(R.id.notification_stack_scroller); mNotificationStackScroller.setOnHeightChangedListener(this); + mFastOutSlowInInterpolator = AnimationUtils.loadInterpolator(getContext(), + android.R.interpolator.fast_out_slow_in); + } + + @Override + protected void loadDimens() { + super.loadDimens(); mNotificationTopPadding = getResources().getDimensionPixelSize( R.dimen.notifications_top_padding); mMinStackHeight = getResources().getDimensionPixelSize(R.dimen.collapsed_stack_height); + mClockNotificationsMarginMin = getResources().getDimensionPixelSize( + R.dimen.keyguard_clock_notifications_margin_min); + mClockNotificationsMarginMax = getResources().getDimensionPixelSize( + R.dimen.keyguard_clock_notifications_margin_max); + mClockYFractionMin = + getResources().getFraction(R.fraction.keyguard_clock_y_fraction_min, 1, 1); + mClockYFractionMax = + getResources().getFraction(R.fraction.keyguard_clock_y_fraction_max, 1, 1); + mMoreCardNotificationAmount = + (float) getResources().getDimensionPixelSize(R.dimen.notification_summary_height) / + getResources().getDimensionPixelSize(R.dimen.notification_min_height); mFlingAnimationUtils = new FlingAnimationUtils(getContext()); mStatusBarMinHeight = getResources().getDimensionPixelSize( com.android.internal.R.dimen.status_bar_height); @@ -124,15 +158,8 @@ public class NotificationPanelView extends PanelView implements @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { super.onLayout(changed, left, top, right, bottom); - int keyguardBottomMargin = - ((MarginLayoutParams) mKeyguardStatusView.getLayoutParams()).bottomMargin; if (!mQsExpanded) { - mStackScrollerIntrinsicPadding = mStatusBar.getBarState() == StatusBarState.KEYGUARD - ? mKeyguardStatusView.getBottom() + keyguardBottomMargin - : mHeader.getBottom() + mNotificationTopPadding; - mNotificationStackScroller.setTopPadding(mStackScrollerIntrinsicPadding, - mAnimateNextTopPaddingChange); - mAnimateNextTopPaddingChange = false; + positionClockAndNotifications(); } // Calculate quick setting heights. @@ -143,8 +170,81 @@ public class NotificationPanelView extends PanelView implements } } - public void animateNextTopPaddingChange() { + /** + * Positions the clock and notifications dynamically depending on how many notifications are + * showing. + */ + private void positionClockAndNotifications() { + boolean animateClock = mNotificationStackScroller.isAddOrRemoveAnimationPending(); + if (mStatusBar.getBarState() != StatusBarState.KEYGUARD) { + mStackScrollerIntrinsicPadding = mHeader.getBottom() + mNotificationTopPadding; + } else { + int notificationCount = mNotificationStackScroller.getNotGoneChildCount(); + int y = getClockY(notificationCount) - mKeyguardStatusView.getHeight()/2; + int padding = getClockNotificationsPadding(notificationCount); + if (animateClock || mClockAnimator != null) { + startClockAnimation(y); + } else { + mKeyguardStatusView.setY(y); + } + mStackScrollerIntrinsicPadding = y + mKeyguardStatusView.getHeight() + padding; + } + mNotificationStackScroller.setTopPadding(mStackScrollerIntrinsicPadding, + mAnimateNextTopPaddingChange || animateClock); + mAnimateNextTopPaddingChange = false; + } + + private void startClockAnimation(int y) { + if (mClockAnimationTarget == y) { + return; + } + mClockAnimationTarget = y; + getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() { + @Override + public boolean onPreDraw() { + getViewTreeObserver().removeOnPreDrawListener(this); + if (mClockAnimator != null) { + mClockAnimator.removeAllListeners(); + mClockAnimator.cancel(); + } + mClockAnimator = + ObjectAnimator.ofFloat(mKeyguardStatusView, View.Y, mClockAnimationTarget); + mClockAnimator.setInterpolator(mFastOutSlowInInterpolator); + mClockAnimator.setDuration(StackStateAnimator.ANIMATION_DURATION_STANDARD); + mClockAnimator.addListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationEnd(Animator animation) { + mClockAnimator = null; + mClockAnimationTarget = -1; + } + }); + StackStateAnimator.startInstantly(mClockAnimator); + return true; + } + }); + } + + private int getClockNotificationsPadding(int notificationCount) { + float t = notificationCount + / (mStatusBar.getMaxKeyguardNotifications() + mMoreCardNotificationAmount); + t = Math.min(t, 1.0f); + return (int) (t * mClockNotificationsMarginMin + (1 - t) * mClockNotificationsMarginMax); + } + + private float getClockYFraction(int notificationCount) { + float t = notificationCount + / (mStatusBar.getMaxKeyguardNotifications() + mMoreCardNotificationAmount); + t = Math.min(t, 1.0f); + return (1 - t) * mClockYFractionMax + t * mClockYFractionMin; + } + + private int getClockY(int notificationCount) { + return (int) (getClockYFraction(notificationCount) * getHeight()); + } + + public void animateToFullShade() { mAnimateNextTopPaddingChange = true; + mNotificationStackScroller.goToFullShade(); requestLayout(); } 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 8c70517..517f763 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java @@ -20,6 +20,7 @@ import android.animation.ObjectAnimator; import android.animation.TimeAnimator; import android.animation.TimeAnimator.TimeListener; import android.content.Context; +import android.content.res.Configuration; import android.content.res.Resources; import android.util.AttributeSet; import android.util.Log; @@ -218,7 +219,7 @@ public class PanelView extends FrameLayout { }; private float mVel, mAccel; - protected int mMaxPanelHeight = 0; + protected int mMaxPanelHeight = -1; private String mViewName; private float mInitialTouchY; private float mInitialTouchX; @@ -321,7 +322,7 @@ public class PanelView extends FrameLayout { setOnHierarchyChangeListener(mHierarchyListener); } - private void loadDimens() { + protected void loadDimens() { final Resources res = getContext().getResources(); mSelfExpandVelocityPx = res.getDimension(R.dimen.self_expand_velocity); @@ -582,8 +583,14 @@ public class PanelView extends FrameLayout { @Override protected void onFinishInflate() { super.onFinishInflate(); + loadDimens(); + } + @Override + protected void onConfigurationChanged(Configuration newConfig) { + super.onConfigurationChanged(newConfig); loadDimens(); + mMaxPanelHeight = -1; } public void fling(float vel, boolean always) { @@ -617,7 +624,8 @@ public class PanelView extends FrameLayout { // Did one of our children change size? int newHeight = getMeasuredHeight(); - if (newHeight != mMaxPanelHeight) { + if (newHeight > mMaxPanelHeight) { + // we only adapt the max height if it's bigger mMaxPanelHeight = newHeight; // If the user isn't actively poking us, let's rubberband to the content if (!mTracking && !mTimeAnimator.isStarted() @@ -706,6 +714,7 @@ public class PanelView extends FrameLayout { * @return the default implementation simply returns the maximum height. */ protected int getMaxPanelHeight() { + mMaxPanelHeight = Math.max(mMaxPanelHeight, getHeight()); return mMaxPanelHeight; } 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 842627c..1072e49 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -26,6 +26,7 @@ import static com.android.systemui.statusbar.phone.BarTransitions.MODE_LIGHTS_OU import static com.android.systemui.statusbar.phone.BarTransitions.MODE_OPAQUE; import static com.android.systemui.statusbar.phone.BarTransitions.MODE_SEMI_TRANSPARENT; import static com.android.systemui.statusbar.phone.BarTransitions.MODE_TRANSLUCENT; +import static com.android.systemui.statusbar.phone.BarTransitions.MODE_TRANSPARENT; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; @@ -105,6 +106,7 @@ import com.android.systemui.statusbar.NotificationData; import com.android.systemui.statusbar.NotificationData.Entry; import com.android.systemui.statusbar.NotificationOverflowContainer; import com.android.systemui.statusbar.SignalClusterView; +import com.android.systemui.statusbar.SpeedBumpView; import com.android.systemui.statusbar.StatusBarIconView; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.policy.BatteryController; @@ -221,8 +223,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, IconMerger mNotificationIcons; // [+> View mMoreIcon; - // mode indicator icon - ImageView mModeIcon; // expanded notifications NotificationPanelView mNotificationPanel; // the sliding/resizing panel within the notification window @@ -486,13 +486,14 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, @Override public void setZenMode(int mode) { super.setZenMode(mode); - if (mModeIcon == null) return; if (!isDeviceProvisioned()) return; final boolean zen = mode != Settings.Global.ZEN_MODE_OFF; - mModeIcon.setVisibility(zen ? View.VISIBLE : View.GONE); if (!zen) { mIntercepted.releaseIntercepted(); } + if (mIconPolicy != null) { + mIconPolicy.setZenMode(zen); + } } @Override @@ -616,8 +617,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, mNotificationIcons = (IconMerger)mStatusBarView.findViewById(R.id.notificationIcons); mMoreIcon = mStatusBarView.findViewById(R.id.moreIcon); mNotificationIcons.setOverflowIndicator(mMoreIcon); - mModeIcon = (ImageView)mStatusBarView.findViewById(R.id.modeIcon); - mModeIcon.setImageResource(R.drawable.stat_sys_zen_limited); mStatusBarContents = (LinearLayout)mStatusBarView.findViewById(R.id.status_bar_contents); mTickerView = mStatusBarView.findViewById(R.id.ticker); @@ -633,6 +632,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, mKeyguardIconOverflowContainer.setOnClickListener(mOverflowClickListener); mStackScroller.addView(mKeyguardIconOverflowContainer); + SpeedBumpView speedBump = (SpeedBumpView) LayoutInflater.from(mContext).inflate( + R.layout.status_bar_notification_speed_bump, mStackScroller, false); + mStackScroller.setSpeedBumpView(speedBump); + mExpandedContents = mStackScroller; mHeader = (StatusBarHeaderView) mStatusBarWindow.findViewById(R.id.header); @@ -1149,7 +1152,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, ArrayList<View> toRemove = new ArrayList<View>(); for (int i=0; i< mStackScroller.getChildCount(); i++) { View child = mStackScroller.getChildAt(i); - if (!toShow.contains(child) && child != mKeyguardIconOverflowContainer) { + if (!toShow.contains(child) && child instanceof ExpandableNotificationRow) { toRemove.add(child); } } @@ -1870,6 +1873,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, private int barMode(int vis, int transientFlag, int translucentFlag) { return (vis & transientFlag) != 0 ? MODE_SEMI_TRANSPARENT : (vis & translucentFlag) != 0 ? MODE_TRANSLUCENT + : (vis & View.SYSTEM_UI_TRANSPARENT) != 0 ? MODE_TRANSPARENT : (vis & View.SYSTEM_UI_FLAG_LOW_PROFILE) != 0 ? MODE_LIGHTS_OUT : MODE_OPAQUE; } @@ -2558,13 +2562,13 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, || (mDisabled & StatusBarManager.DISABLE_SEARCH) != 0; } - public void postStartSettingsActivity(final Intent intent) { - mHandler.post(new Runnable() { + public void postStartSettingsActivity(final Intent intent, int delay) { + mHandler.postDelayed(new Runnable() { @Override public void run() { handleStartSettingsActivity(intent, true /*onlyProvisioned*/); } - }); + }, delay); } private void handleStartSettingsActivity(Intent intent, boolean onlyProvisioned) { @@ -2580,7 +2584,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } public void startSettingsActivity(String action) { - postStartSettingsActivity(new Intent(action)); + postStartSettingsActivity(new Intent(action), 0); } private static class FastColorDrawable extends Drawable { @@ -2720,7 +2724,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, setBarState(StatusBarState.SHADE); if (mLeaveOpenOnKeyguardHide) { mLeaveOpenOnKeyguardHide = false; - mNotificationPanel.animateNextTopPaddingChange(); + mNotificationPanel.animateToFullShade(); } else { instantCollapseNotificationPanel(); } @@ -2892,7 +2896,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, mLeaveOpenOnKeyguardHide = true; showBouncer(); } else { - mNotificationPanel.animateNextTopPaddingChange(); + mNotificationPanel.animateToFullShade(); setBarState(StatusBarState.SHADE_LOCKED); updateKeyguardState(); } @@ -2915,4 +2919,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, public void reattachSystemIcons() { mSystemIconArea.addView(mSystemIcons, 0); } + + public void onScreenTurnedOff() { + mStackScroller.setAnimationsEnabled(false); + } + + public void onScreenTurnedOn() { + mStackScroller.setAnimationsEnabled(true); + } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java index 194774d..b6f5ae0 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java @@ -63,6 +63,9 @@ public class PhoneStatusBarPolicy { // ringer volume private boolean mVolumeVisible; + // zen mode + private boolean mZen; + // bluetooth device status private boolean mBluetoothEnabled = false; @@ -152,6 +155,11 @@ public class PhoneStatusBarPolicy { updateVolume(); } + public void setZenMode(boolean zen) { + mZen = zen; + updateVolume(); + } + private final void updateAlarm(Intent intent) { boolean alarmSet = intent.getBooleanExtra("alarmSet", false); mService.setIconVisibility("alarm_clock", alarmSet); @@ -195,11 +203,15 @@ public class PhoneStatusBarPolicy { AudioManager audioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); final int ringerMode = audioManager.getRingerMode(); final boolean visible = ringerMode == AudioManager.RINGER_MODE_SILENT || - ringerMode == AudioManager.RINGER_MODE_VIBRATE; + ringerMode == AudioManager.RINGER_MODE_VIBRATE || + mZen; final int iconId; String contentDescription = null; - if (ringerMode == AudioManager.RINGER_MODE_VIBRATE) { + if (mZen) { + iconId = R.drawable.stat_sys_ringer_zen; + contentDescription = mContext.getString(R.string.zen_mode_title); + } else if (ringerMode == AudioManager.RINGER_MODE_VIBRATE) { iconId = R.drawable.stat_sys_ringer_vibrate; contentDescription = mContext.getString(R.string.accessibility_ringer_vibrate); } else { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java index 8406565..8520f40 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarTransitions.java @@ -68,7 +68,8 @@ public final class PhoneStatusBarTransitions extends BarTransitions { } private boolean isOpaque(int mode) { - return !(mode == MODE_SEMI_TRANSPARENT || mode == MODE_TRANSLUCENT); + return !(mode == MODE_SEMI_TRANSPARENT || mode == MODE_TRANSLUCENT + || mode == MODE_TRANSPARENT); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java index 1fe3be5..7029898 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QSTileHost.java @@ -18,7 +18,6 @@ package com.android.systemui.statusbar.phone; import android.content.Context; import android.content.Intent; -import android.graphics.drawable.VectorDrawable; import android.os.HandlerThread; import android.os.Looper; @@ -113,7 +112,7 @@ public class QSTileHost implements QSTile.Host { @Override public void startSettingsActivity(final Intent intent) { - mStatusBar.postStartSettingsActivity(intent); + mStatusBar.postStartSettingsActivity(intent, QSTile.FEEDBACK_START_DELAY); } @Override @@ -137,11 +136,6 @@ public class QSTileHost implements QSTile.Host { } @Override - public VectorDrawable getVectorDrawable(int resId) { - return (VectorDrawable) mContext.getDrawable(resId); - } - - @Override public BluetoothController getBluetoothController() { return mBluetooth; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java index 2305445..36b063b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarHeaderView.java @@ -86,6 +86,7 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL (ImageView) findViewById(R.id.brightness_icon), (ToggleSlider) findViewById(R.id.brightness_slider)); loadDimens(); + updateVisibilities(); } private void loadDimens() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index 77b760e..1040c15 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -125,11 +125,13 @@ public class StatusBarKeyguardViewManager { public void onScreenTurnedOff() { mScreenOn = false; + mPhoneStatusBar.onScreenTurnedOff(); mBouncer.onScreenTurnedOff(); } public void onScreenTurnedOn(final IKeyguardShowCallback callback) { mScreenOn = true; + mPhoneStatusBar.onScreenTurnedOn(); if (callback != null) { callbackAfterDraw(callback); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java index 46a637b..b7bf6cd 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java @@ -75,8 +75,7 @@ public class StatusBarWindowManager { | WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH - | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION - | WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, + | WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, PixelFormat.TRANSLUCENT); mLp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED; mLp.gravity = Gravity.TOP; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java index 1c7119f..5a19881 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java @@ -59,6 +59,7 @@ public class BluetoothControllerImpl extends BroadcastReceiver implements Blueto public void addStateChangedCallback(BluetoothStateChangeCallback cb) { mChangeCallbacks.add(cb); + fireCallback(cb); } @Override @@ -131,7 +132,11 @@ public class BluetoothControllerImpl extends BroadcastReceiver implements Blueto private void fireCallbacks() { for (BluetoothStateChangeCallback cb : mChangeCallbacks) { - cb.onBluetoothStateChange(mEnabled); + fireCallback(cb); } } + + private void fireCallback(BluetoothStateChangeCallback cb) { + cb.onBluetoothStateChange(mEnabled); + } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java index 33a85b1..bcd865c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java @@ -28,6 +28,10 @@ public class CastControllerImpl implements CastController { private final ArrayList<Callback> mCallbacks = new ArrayList<Callback>(); private final MediaRouter mMediaRouter; + private boolean mEnabled; + private boolean mConnecting; + private String mConnectedRouteName; + public CastControllerImpl(Context context) { mMediaRouter = (MediaRouter) context.getSystemService(Context.MEDIA_ROUTER_SERVICE); } @@ -35,6 +39,7 @@ public class CastControllerImpl implements CastController { @Override public void addCallback(Callback callback) { mCallbacks.add(callback); + fireStateChanged(callback); } @Override @@ -76,12 +81,23 @@ public class CastControllerImpl implements CastController { if (connectedRoute != null) { connectedRouteName = connectedRoute.getName().toString(); } - fireStateChanged(enabled, connecting, connectedRouteName); + synchronized(mCallbacks) { + mEnabled = enabled; + mConnecting = connecting; + mConnectedRouteName = connectedRouteName; + } + fireStateChanged(); } - private void fireStateChanged(boolean enabled, boolean connecting, String connectedRouteName) { + private void fireStateChanged() { for (Callback callback : mCallbacks) { - callback.onStateChanged(enabled, connecting, connectedRouteName); + fireStateChanged(callback); + } + } + + private void fireStateChanged(Callback callback) { + synchronized(mCallbacks) { + callback.onStateChanged(mEnabled, mConnecting, mConnectedRouteName); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Disposable.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Listenable.java index 158e9c1..4fa59fd 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Disposable.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Listenable.java @@ -16,7 +16,7 @@ package com.android.systemui.statusbar.policy; -/** Common interface for items requiring manual cleanup. **/ -public interface Disposable { - void dispose(); +/** Common interface for components with an active listening state. **/ +public interface Listenable { + void setListening(boolean listening); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java index 9e5ad18..d5b2548 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java @@ -92,6 +92,7 @@ public class LocationControllerImpl extends BroadcastReceiver implements Locatio */ public void addSettingsChangedCallback(LocationSettingsChangeCallback cb) { mSettingsChangeCallbacks.add(cb); + locationSettingsChanged(cb); } public void removeSettingsChangedCallback(LocationSettingsChangeCallback cb) { @@ -204,6 +205,10 @@ public class LocationControllerImpl extends BroadcastReceiver implements Locatio } } + private void locationSettingsChanged(LocationSettingsChangeCallback cb) { + cb.onLocationSettingsChanged(isLocationEnabled()); + } + @Override public void onReceive(Context context, Intent intent) { final String action = intent.getAction(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RotationLockController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RotationLockController.java index 1eb678d..93c4691 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RotationLockController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RotationLockController.java @@ -16,7 +16,7 @@ package com.android.systemui.statusbar.policy; -public interface RotationLockController extends Disposable { +public interface RotationLockController extends Listenable { int getRotationLockOrientation(); boolean isRotationLockAffordanceVisible(); boolean isRotationLocked(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RotationLockControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RotationLockControllerImpl.java index caa07ef..c3bcd94 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RotationLockControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RotationLockControllerImpl.java @@ -39,12 +39,12 @@ public final class RotationLockControllerImpl implements RotationLockController public RotationLockControllerImpl(Context context) { mContext = context; - RotationPolicy.registerRotationPolicyListener(mContext, - mRotationPolicyListener, UserHandle.USER_ALL); + setListening(true); } public void addRotationLockControllerCallback(RotationLockControllerCallback callback) { mCallbacks.add(callback); + notifyChanged(callback); } public void removeRotationLockControllerCallback(RotationLockControllerCallback callback) { @@ -68,14 +68,23 @@ public final class RotationLockControllerImpl implements RotationLockController } @Override - public void dispose() { - RotationPolicy.unregisterRotationPolicyListener(mContext, mRotationPolicyListener); + public void setListening(boolean listening) { + if (listening) { + RotationPolicy.registerRotationPolicyListener(mContext, mRotationPolicyListener, + UserHandle.USER_ALL); + } else { + RotationPolicy.unregisterRotationPolicyListener(mContext, mRotationPolicyListener); + } } private void notifyChanged() { for (RotationLockControllerCallback callback : mCallbacks) { - callback.onRotationLockStateChanged(RotationPolicy.isRotationLocked(mContext), - RotationPolicy.isRotationLockToggleVisible(mContext)); + notifyChanged(callback); } } + + private void notifyChanged(RotationLockControllerCallback callback) { + callback.onRotationLockStateChanged(RotationPolicy.isRotationLocked(mContext), + RotationPolicy.isRotationLockToggleVisible(mContext)); + } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java index d760f78..adf2935 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java @@ -52,6 +52,7 @@ public class ZenModeControllerImpl implements ZenModeController { fireZenChanged(value != 0); } }; + mSetting.setListening(true); mNoMan = INotificationManager.Stub.asInterface( ServiceManager.getService(Context.NOTIFICATION_SERVICE)); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java index deab757..b21e12c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/AmbientState.java @@ -30,6 +30,7 @@ public class AmbientState { private View mActivatedChild; private float mOverScrollTopAmount; private float mOverScrollBottomAmount; + private int mSpeedBumpIndex = -1; public int getScrollY() { return mScrollY; @@ -86,4 +87,12 @@ public class AmbientState { public float getOverScrollAmount(boolean top) { return top ? mOverScrollTopAmount : mOverScrollBottomAmount; } + + public int getSpeedBumpIndex() { + return mSpeedBumpIndex; + } + + public void setSpeedBumpIndex(int speedBumpIndex) { + mSpeedBumpIndex = speedBumpIndex; + } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index fbb6695..58ada75 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -39,6 +39,7 @@ import com.android.systemui.R; import com.android.systemui.SwipeHelper; import com.android.systemui.statusbar.ExpandableNotificationRow; import com.android.systemui.statusbar.ExpandableView; +import com.android.systemui.statusbar.SpeedBumpView; import com.android.systemui.statusbar.stack.StackScrollState.ViewState; import com.android.systemui.statusbar.policy.ScrollAdapter; @@ -107,6 +108,7 @@ public class NotificationStackScrollLayout extends ViewGroup = new ArrayList<AnimationEvent>(); private ArrayList<View> mSwipedOutViews = new ArrayList<View>(); private final StackStateAnimator mStateAnimator = new StackStateAnimator(this); + private boolean mAnimationsEnabled; /** * The raw amount of the overScroll on the top, which is not rubber-banded. @@ -126,6 +128,8 @@ public class NotificationStackScrollLayout extends ViewGroup private boolean mActivateNeedsAnimation; private boolean mIsExpanded = true; private boolean mChildrenUpdateRequested; + private SpeedBumpView mSpeedBumpView; + private boolean mIsExpansionChanging; private ViewTreeObserver.OnPreDrawListener mChildrenUpdater = new ViewTreeObserver.OnPreDrawListener() { @Override @@ -244,6 +248,22 @@ public class NotificationStackScrollLayout extends ViewGroup requestChildrenUpdate(); } + public void updateSpeedBumpIndex(int newIndex) { + int currentIndex = indexOfChild(mSpeedBumpView); + + // If we are currently layouted before the new speed bump index, we have to decrease it. + boolean validIndex = newIndex > 0; + if (newIndex > getChildCount() - 1) { + validIndex = false; + newIndex = -1; + } + if (validIndex && currentIndex != newIndex) { + changeViewPosition(mSpeedBumpView, newIndex); + } + updateSpeedBump(validIndex); + mAmbientState.setSpeedBumpIndex(newIndex); + } + public void setChildLocationsChangedListener(OnChildLocationsChangedListener listener) { mListener = listener; } @@ -333,7 +353,7 @@ public class NotificationStackScrollLayout extends ViewGroup mTopPadding = topPadding; updateAlgorithmHeightAndPadding(); updateContentHeight(); - if (animate) { + if (animate && mAnimationsEnabled && mIsExpanded) { mTopPaddingNeedsAnimation = true; mNeedsAnimation = true; } @@ -421,9 +441,11 @@ public class NotificationStackScrollLayout extends ViewGroup public void onChildSnappedBack(View animView) { mAmbientState.onDragFinished(animView); if (!mDragAnimPendingChildren.contains(animView)) { - mSnappedBackChildren.add(animView); + if (mAnimationsEnabled) { + mSnappedBackChildren.add(animView); + mNeedsAnimation = true; + } requestChildrenUpdate(); - mNeedsAnimation = true; } else { // We start the swipe and snap back in the same frame, we don't want any animation mDragAnimPendingChildren.remove(animView); @@ -432,10 +454,12 @@ public class NotificationStackScrollLayout extends ViewGroup public void onBeginDrag(View v) { setSwipingInProgress(true); - mDragAnimPendingChildren.add(v); mAmbientState.onBeginDrag(v); + if (mAnimationsEnabled) { + mDragAnimPendingChildren.add(v); + mNeedsAnimation = true; + } requestChildrenUpdate(); - mNeedsAnimation = true; } public void onDragCancelled(View v) { @@ -942,6 +966,21 @@ public class NotificationStackScrollLayout extends ViewGroup return null; } + /** + * @return the number of children which have visibility unequal to GONE + */ + public int getNotGoneChildCount() { + int childCount = getChildCount(); + int count = 0; + for (int i = 0; i < childCount; i++) { + View child = getChildAt(i); + if (child.getVisibility() != View.GONE) { + count++; + } + } + return count; + } + private int getMaxExpandHeight(View view) { if (view instanceof ExpandableNotificationRow) { ExpandableNotificationRow row = (ExpandableNotificationRow) view; @@ -1044,8 +1083,11 @@ public class NotificationStackScrollLayout extends ViewGroup mCurrentStackScrollState.removeViewStateForView(child); mStackScrollAlgorithm.notifyChildrenChanged(this); updateScrollStateForRemovedChild(child); - if (mIsExpanded) { + generateRemoveAnimation(child); + } + private void generateRemoveAnimation(View child) { + if (mIsExpanded && mAnimationsEnabled) { if (!mChildrenToAddAnimated.contains(child)) { // Generate Animations mChildrenToRemoveAnimated.add(child); @@ -1103,8 +1145,17 @@ public class NotificationStackScrollLayout extends ViewGroup } } + public void setAnimationsEnabled(boolean animationsEnabled) { + mAnimationsEnabled = animationsEnabled; + } + + public boolean isAddOrRemoveAnimationPending() { + return mNeedsAnimation + && (!mChildrenToAddAnimated.isEmpty() || !mChildrenToRemoveAnimated.isEmpty()); + } + public void generateAddAnimation(View child) { - if (mIsExpanded) { + if (mIsExpanded && mAnimationsEnabled) { // Generate Animations mChildrenToAddAnimated.add(child); @@ -1120,7 +1171,9 @@ public class NotificationStackScrollLayout extends ViewGroup */ public void changeViewPosition(View child, int newIndex) { if (child != null && child.getParent() == this) { - // TODO: handle this + removeView(child); + addView(child, newIndex); + // TODO: handle events } } @@ -1362,10 +1415,12 @@ public class NotificationStackScrollLayout extends ViewGroup } public void onExpansionStarted() { + mIsExpansionChanging = true; mStackScrollAlgorithm.onExpansionStarted(mCurrentStackScrollState); } public void onExpansionStopped() { + mIsExpansionChanging = false; mStackScrollAlgorithm.onExpansionStopped(); } @@ -1374,6 +1429,7 @@ public class NotificationStackScrollLayout extends ViewGroup mStackScrollAlgorithm.setIsExpanded(isExpanded); if (!isExpanded) { mOwnScrollY = 0; + mSpeedBumpView.collapse(); } } @@ -1404,7 +1460,7 @@ public class NotificationStackScrollLayout extends ViewGroup mStackScrollAlgorithm.setDimmed(dimmed); mAmbientState.setDimmed(dimmed); updatePadding(dimmed); - if (animate) { + if (animate && mAnimationsEnabled) { mDimmedNeedsAnimation = true; mNeedsAnimation = true; } @@ -1416,8 +1472,10 @@ public class NotificationStackScrollLayout extends ViewGroup */ public void setActivatedChild(View activatedChild) { mAmbientState.setActivatedChild(activatedChild); - mActivateNeedsAnimation = true; - mNeedsAnimation = true; + if (mAnimationsEnabled) { + mActivateNeedsAnimation = true; + mNeedsAnimation = true; + } requestChildrenUpdate(); } @@ -1432,6 +1490,34 @@ public class NotificationStackScrollLayout extends ViewGroup } } + public void setSpeedBumpView(SpeedBumpView speedBumpView) { + mSpeedBumpView = speedBumpView; + addView(speedBumpView); + } + + private void updateSpeedBump(boolean visible) { + int newVisibility = visible ? VISIBLE : GONE; + int oldVisibility = mSpeedBumpView.getVisibility(); + if (newVisibility != oldVisibility) { + mSpeedBumpView.setVisibility(newVisibility); + if (visible) { + mSpeedBumpView.collapse(); + // Make invisible to ensure that the appear animation is played. + mSpeedBumpView.setInvisible(); + if (!mIsExpansionChanging) { + generateAddAnimation(mSpeedBumpView); + } + } else { + mSpeedBumpView.performVisibilityAnimation(false); + generateRemoveAnimation(mSpeedBumpView); + } + } + } + + public void goToFullShade() { + updateSpeedBump(true); + } + /** * A listener that is notified when some child locations might have changed. */ diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java index 8fc26d8..011411c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackScrollState.java @@ -23,6 +23,7 @@ import android.view.View; import android.view.ViewGroup; import com.android.systemui.statusbar.ExpandableView; +import com.android.systemui.statusbar.SpeedBumpView; import java.util.HashMap; import java.util.Map; @@ -167,11 +168,48 @@ public class StackScrollState { clipHeight, (int) (newHeight - (previousNotificationStart - newYTranslation))); - previousNotificationStart = newYTranslation + child.getClipTopAmount(); - previousNotificationEnd = newNotificationEnd; - previousNotificationIsSwiped = child.getTranslationX() != 0; + if (!child.isTransparent()) { + // Only update the previous values if we are not transparent, + // otherwise we would clip to a transparent view. + previousNotificationStart = newYTranslation + child.getClipTopAmount(); + previousNotificationEnd = newNotificationEnd; + previousNotificationIsSwiped = child.getTranslationX() != 0; + } + + if(child instanceof SpeedBumpView) { + performSpeedBumpAnimation(i, (SpeedBumpView) child, newNotificationEnd, + newYTranslation); + } + } + } + } + + private void performSpeedBumpAnimation(int i, SpeedBumpView speedBump, float speedBumpEnd, + float speedBumpStart) { + View nextChild = getNextChildNotGone(i); + if (nextChild != null) { + ViewState nextState = getViewStateForView(nextChild); + boolean startIsAboveNext = nextState.yTranslation > speedBumpStart; + speedBump.animateDivider(startIsAboveNext); + + // handle expanded case + if (speedBump.isExpanded()) { + boolean endIsAboveNext = nextState.yTranslation > speedBumpEnd; + speedBump.animateExplanationText(endIsAboveNext); + } + + } + } + + private View getNextChildNotGone(int childIndex) { + int childCount = mHostView.getChildCount(); + for (int i = childIndex + 1; i < childCount; i++) { + View child = mHostView.getChildAt(i); + if (child.getVisibility() != View.GONE) { + return child; } } + return null; } /** diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java index 5ac51f8..a9dcdd6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java @@ -434,7 +434,7 @@ public class StackStateAnimator { /** * Start an animator instantly instead of waiting on the next synchronization frame */ - private void startInstantly(ValueAnimator animator) { + public static void startInstantly(ValueAnimator animator) { animator.start(); animator.setCurrentPlayTime(0); } |
