SystemUI asset update.

- Updated location icons.
- Updated no-sim, plumb up to QS.
- Updated zen mode synthetic notification icon.
- Updated color inversion icons.

Change-Id: I4849fbe11683feab37160c3d23502b01035de66a
This commit is contained in:
John Spurlock
2014-06-11 10:59:11 -04:00
parent 542588e3ba
commit 899f439a29
27 changed files with 71 additions and 305 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 932 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -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="24dp"
android:height="24dp"/>
<viewport
android:viewportWidth="24.0"
android:viewportHeight="24.0"/>
android:viewportWidth="48.0"
android:viewportHeight="48.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"/>
android:pathData="M4.0,24.0c0.0,11.0 9.0,20.0 20.0,20.0s20.0,-9.0 20.0,-20.0S35.0,4.0 24.0,4.0S4.0,13.0 4.0,24.0zM36.6,33.8L14.2,11.4C16.9,9.3 20.3,8.0 24.0,8.0c8.8,0.0 16.0,7.2 16.0,16.0C40.0,27.7 38.7,31.1 36.6,33.8zM8.0,24.0c0.0,-3.7 1.3,-7.1 3.4,-9.8L33.8,36.6C31.1,38.7 27.7,40.0 24.0,40.0C15.2,40.0 8.0,32.8 8.0,24.0z"/>
</vector>

View File

@@ -1,28 +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.
-->
<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="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>

View File

@@ -19,10 +19,10 @@ Copyright (C) 2014 The Android Open Source Project
android:height="64dp"/>
<viewport
android:viewportWidth="24.0"
android:viewportHeight="24.0"/>
android:viewportWidth="48.0"
android:viewportHeight="48.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"/>
android:fill="#4DFFFFFF"
android:pathData="M41.3,41.7L36.6,37.0L24.0,24.5l-7.1,-7.1L14.0,14.5L8.5,9.0L6.0,11.5l5.6,5.6c-5.1,6.3 -4.7,15.5 1.1,21.4c3.1,3.1 7.2,4.7 11.3,4.7c3.6,0.0 7.1,-1.2 10.1,-3.6l5.4,5.4l2.5,-2.5L41.3,41.7zM24.0,39.2c-3.2,0.0 -6.2,-1.2 -8.5,-3.5c-2.3,-2.3 -3.5,-5.3 -3.5,-8.5c0.0,-2.6 0.9,-5.1 2.4,-7.2l9.6,9.6L24.0,39.2zM24.0,10.2l0.0,9.2l14.5,14.5c2.7,-5.9 1.7,-13.1 -3.2,-18.0L24.0,4.5l0.0,0.0l0.0,0.0L16.6,12.0l2.8,2.8L24.0,10.2z"/>
</vector>

View File

@@ -19,10 +19,10 @@ Copyright (C) 2014 The Android Open Source Project
android:height="64dp"/>
<viewport
android:viewportWidth="24.0"
android:viewportHeight="24.0"/>
android:viewportWidth="48.0"
android:viewportHeight="48.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"/>
android:pathData="M35.3,15.9L24.0,4.5l0.0,0.0l0.0,0.0L12.7,15.9c-6.2,6.2 -6.2,16.4 0.0,22.6c3.1,3.1 7.2,4.7 11.3,4.7s8.2,-1.6 11.3,-4.7C41.6,32.2 41.6,22.1 35.3,15.9zM24.0,39.2L24.0,39.2c-3.2,0.0 -6.2,-1.2 -8.5,-3.5c-2.3,-2.3 -3.5,-5.3 -3.5,-8.5s1.2,-6.2 3.5,-8.5l8.5,-8.5L24.0,39.2z"/>
</vector>

View File

@@ -1,28 +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.
-->
<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>

View File

@@ -1,28 +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.
-->
<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>

View File

@@ -1,31 +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.
-->
<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:fill="#4DFFFFFF"/>
</vector>

View File

@@ -1,28 +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.
-->
<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:fill="#4DFFFFFF"/>
</vector>

View File

@@ -1,28 +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.
-->
<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:fill="#4DFFFFFF"/>
</vector>

View File

@@ -1,28 +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.
-->
<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:fill="#4DFFFFFF"/>
</vector>

View File

@@ -1,28 +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.
-->
<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:fill="#4DFFFFFF"/>
</vector>

View File

@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014 The Android Open Source Project
@@ -14,18 +13,19 @@ Copyright (C) 2014 The Android Open Source Project
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>
<vector xmlns:android="http://schemas.android.com/apk/res/android" >
<size
android:width="64dp"
android:height="64dp"/>
<viewport
android:viewportWidth="48.0"
android:viewportHeight="48.0"/>
<path
android:fill="#4DFFFFFF"
android:pathData="M24.0,13.0c2.8,0.0 5.0,2.2 5.0,5.0c0.0,1.5 -0.7,2.8 -1.7,3.7l7.3,7.3c2.0,-3.7 3.4,-7.6 3.4,-11.0c0.0,-7.7 -6.3,-14.0 -14.0,-14.0c-4.0,0.0 -7.5,1.6 -10.1,4.3l6.4,6.4C21.2,13.6 22.5,13.0 24.0,13.0zM32.7,32.2l-9.3,-9.3l-0.2,-0.2L6.5,6.0L4.0,8.5l6.4,6.4c-0.2,1.0 -0.4,2.0 -0.4,3.1c0.0,10.5 14.0,26.0 14.0,26.0s3.3,-3.7 6.8,-8.7l6.7,6.7l2.5,-2.5L32.7,32.2z"/>
<path
android:pathData="M23.5,22.9l0.0,0.0 -0.20000076,-0.19999886z"
android:fill="#4DFFFFFF"/>
</vector>

View File

@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014 The Android Open Source Project
@@ -14,18 +13,16 @@ Copyright (C) 2014 The Android Open Source Project
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>
<vector xmlns:android="http://schemas.android.com/apk/res/android" >
<size
android:width="64dp"
android:height="64dp"/>
<viewport
android:viewportWidth="48.0"
android:viewportHeight="48.0"/>
<path
android:fill="#FFFFFFFF"
android:pathData="M24.0,4.0c-7.7,0.0 -14.0,6.3 -14.0,14.0c0.0,10.5 14.0,26.0 14.0,26.0s14.0,-15.5 14.0,-26.0C38.0,10.3 31.7,4.0 24.0,4.0zM24.0,23.0c-2.8,0.0 -5.0,-2.2 -5.0,-5.0s2.2,-5.0 5.0,-5.0c2.8,0.0 5.0,2.2 5.0,5.0S26.8,23.0 24.0,23.0z"/>
</vector>

View File

@@ -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="18dp"
android:height="18dp"/>
<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="#4DFFFFFF"/>
android:fill="#4DFFFFFF"
android:pathData="M19.0,5.0c0.0,-1.1 -0.9,-2.0 -2.0,-2.0l-7.0,0.0L7.7,5.3L19.0,16.7L19.0,5.0zM3.7,3.9L2.4,5.2L5.0,7.8L5.0,19.0c0.0,1.1 0.9,2.0 2.0,2.0l10.0,0.0c0.4,0.0 0.7,-0.1 1.0,-0.3l1.9,1.9l1.3,-1.3L3.7,3.9z"/>
</vector>

View File

@@ -287,6 +287,7 @@ public abstract class QSTile<TState extends State> implements Listenable {
public boolean activityIn;
public boolean activityOut;
public int overlayIconId;
public boolean filter;
@Override
public boolean copyTo(State other) {
@@ -300,6 +301,7 @@ public abstract class QSTile<TState extends State> implements Listenable {
o.activityIn = activityIn;
o.activityOut = activityOut;
o.overlayIconId = overlayIconId;
o.filter = filter;
return super.copyTo(other) || changed;
}
@@ -311,6 +313,7 @@ public abstract class QSTile<TState extends State> implements Listenable {
rt.insert(rt.length() - 1, ",activityIn=" + activityIn);
rt.insert(rt.length() - 1, ",activityOut=" + activityOut);
rt.insert(rt.length() - 1, ",overlayIconId=" + overlayIconId);
rt.insert(rt.length() - 1, ",filter=" + filter);
return rt;
}
}

View File

@@ -93,12 +93,12 @@ public final class SignalTileView extends QSTileView {
final SignalState s = (SignalState) state;
mSignal.setImageDrawable(null); // force refresh
mSignal.setImageResource(s.iconId);
mSignal.setColorFilter(FILTER);
mSignal.setColorFilter(s.filter ? FILTER : null);
if (s.overlayIconId > 0) {
mOverlay.setVisibility(VISIBLE);
mOverlay.setImageDrawable(null); // force refresh
mOverlay.setImageResource(s.overlayIconId);
mOverlay.setColorFilter(FILTER);
mOverlay.setColorFilter(s.filter ? FILTER : null);
} else {
mOverlay.setVisibility(GONE);
}

View File

@@ -72,12 +72,15 @@ public class CellularTile extends QSTile<QSTile.SignalState> {
if (cb == null) return;
final Resources r = mContext.getResources();
state.iconId = cb.enabled && (cb.mobileSignalIconId > 0)
state.iconId = cb.noSim
? R.drawable.stat_sys_no_sim
: cb.enabled && (cb.mobileSignalIconId > 0)
? cb.mobileSignalIconId
: R.drawable.ic_qs_signal_no_signal;
state.overlayIconId = cb.enabled && (cb.dataTypeIconId > 0) && !cb.wifiEnabled
? cb.dataTypeIconId
: 0;
state.filter = state.iconId != R.drawable.stat_sys_no_sim;
state.activityIn = cb.enabled && cb.activityIn;
state.activityOut = cb.enabled && cb.activityOut;
@@ -117,6 +120,7 @@ public class CellularTile extends QSTile<QSTile.SignalState> {
boolean activityIn;
boolean activityOut;
String enabledDesc;
boolean noSim;
}
private final NetworkSignalChangedCallback mCallback = new NetworkSignalChangedCallback() {
@@ -134,7 +138,7 @@ public class CellularTile extends QSTile<QSTile.SignalState> {
int mobileSignalIconId,
String mobileSignalContentDescriptionId, int dataTypeIconId,
boolean activityIn, boolean activityOut,
String dataTypeContentDescriptionId, String description) {
String dataTypeContentDescriptionId, String description, boolean noSim) {
final CallbackInfo info = new CallbackInfo(); // TODO pool?
info.enabled = enabled;
info.wifiEnabled = mWifiEnabled;
@@ -145,6 +149,7 @@ public class CellularTile extends QSTile<QSTile.SignalState> {
info.activityIn = activityIn;
info.activityOut = activityOut;
info.enabledDesc = description;
info.noSim = noSim;
refreshState(info);
}

View File

@@ -71,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.iconId = R.drawable.ic_qs_color_inversion;
state.iconId = enabled ? R.drawable.ic_qs_inversion_on : R.drawable.ic_qs_inversion_off;
}
}

View File

@@ -16,9 +16,6 @@
package com.android.systemui.qs.tiles;
import android.content.res.Resources;
import android.graphics.drawable.AnimationDrawable;
import com.android.systemui.R;
import com.android.systemui.qs.QSTile;
import com.android.systemui.statusbar.policy.LocationController;
@@ -63,28 +60,15 @@ public class LocationTile extends QSTile<QSTile.BooleanState> {
protected void handleUpdateState(BooleanState state, Object arg) {
final boolean locationEnabled = mController.isLocationEnabled();
state.visible = true;
if (state.value != locationEnabled) {
state.value = locationEnabled;
final Resources res = mContext.getResources();
final AnimationDrawable d = (AnimationDrawable) res.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();
}
});
}
state.value = locationEnabled;
if (locationEnabled) {
if (state.icon == null) state.iconId = R.drawable.ic_qs_location_01;
state.iconId = R.drawable.ic_qs_location_on;
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 {
if (state.icon == null) state.iconId = R.drawable.ic_qs_location_11;
state.iconId = R.drawable.ic_qs_location_off;
state.label = mContext.getString(R.string.quick_settings_location_label);
state.contentDescription = mContext.getString(
R.string.accessibility_quick_settings_location,

View File

@@ -87,6 +87,7 @@ public class WifiTile extends QSTile<QSTile.SignalState> {
state.connected = wifiConnected;
state.activityIn = cb.enabled && cb.activityIn;
state.activityOut = cb.enabled && cb.activityOut;
state.filter = true;
final String signalContentDescription;
final Resources r = mContext.getResources();
if (wifiConnected) {
@@ -159,7 +160,7 @@ public class WifiTile extends QSTile<QSTile.SignalState> {
int mobileSignalIconId,
String mobileSignalContentDescriptionId, int dataTypeIconId,
boolean activityIn, boolean activityOut,
String dataTypeContentDescriptionId, String description) {
String dataTypeContentDescriptionId, String description, boolean noSim) {
// noop
}

View File

@@ -111,7 +111,7 @@ public class InterceptedNotifications {
return;
}
final Notification n = new Notification.Builder(mContext)
.setSmallIcon(R.drawable.ic_qs_zen_on)
.setSmallIcon(R.drawable.ic_notify_zen)
.setContentTitle(mContext.getResources().getQuantityString(
R.plurals.zen_mode_notification_title,
mIntercepted.size(), mIntercepted.size()))

View File

@@ -30,7 +30,7 @@ public interface NetworkController {
void onMobileDataSignalChanged(boolean enabled, int mobileSignalIconId,
String mobileSignalContentDescriptionId, int dataTypeIconId,
boolean activityIn, boolean activityOut,
String dataTypeContentDescriptionId, String description);
String dataTypeContentDescriptionId, String description, boolean noSim);
void onAirplaneModeChanged(boolean enabled);
}
}

View File

@@ -87,6 +87,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
int mQSDataTypeIconId;
int mAirplaneIconId;
boolean mDataActive;
boolean mNoSim;
int mLastSignalLevel;
boolean mShowPhoneRSSIForData = false;
boolean mShowAtLeastThreeGees = false;
@@ -349,18 +350,18 @@ public class NetworkControllerImpl extends BroadcastReceiver
if (isEmergencyOnly()) {
cb.onMobileDataSignalChanged(false, mQSPhoneSignalIconId,
mContentDescriptionPhoneSignal, mQSDataTypeIconId, mobileIn, mobileOut,
mContentDescriptionDataType, null);
mContentDescriptionDataType, null, mNoSim);
} else {
if (mIsWimaxEnabled && mWimaxConnected) {
// Wimax is special
cb.onMobileDataSignalChanged(true, mQSPhoneSignalIconId,
mContentDescriptionPhoneSignal, mQSDataTypeIconId, mobileIn, mobileOut,
mContentDescriptionDataType, mNetworkName);
mContentDescriptionDataType, mNetworkName, mNoSim);
} else {
// Normal mobile data
cb.onMobileDataSignalChanged(mHasMobileDataFeature, mQSPhoneSignalIconId,
mContentDescriptionPhoneSignal, mQSDataTypeIconId, mobileIn, mobileOut,
mContentDescriptionDataType, mNetworkName);
mContentDescriptionDataType, mNetworkName, mNoSim);
}
}
cb.onAirplaneModeChanged(mAirplaneMode);
@@ -736,6 +737,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
// GSM case, we have to check also the sim state
if (mSimState == IccCardConstants.State.READY ||
mSimState == IccCardConstants.State.UNKNOWN) {
mNoSim = false;
if (hasService() && mDataState == TelephonyManager.DATA_CONNECTED) {
switch (mDataActivity) {
case TelephonyManager.DATA_ACTIVITY_IN:
@@ -758,6 +760,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
}
} else {
iconId = R.drawable.stat_sys_no_sim;
mNoSim = true;
visible = false; // no SIM? no data
}
} else {