Make QS signal indicator act like a QS signal indicator
It had the behavior of the status bar before, so switch it over to QS behavior but keep status bar icons for the appearance. Ditch the old QS data icons because we no longer need them. Test: runtest systemui Change-Id: I1356bbc19c4874ae467e192b9129136ebd0a37c8 Fixes: 62128809
This commit is contained in:
@@ -1,27 +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"
|
||||
android:width="32.0dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="12.0"
|
||||
android:viewportHeight="12.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M3.500000,11.000000L1.800000,11.000000L1.800000,4.400000L0.200000,5.100000L0.200000,3.700000l3.100000,-1.300000l0.200000,0.000000L3.500000,11.000000z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M8.600000,5.500000l1.200000,-3.000000l1.900000,0.000000L9.700000,6.700000l2.200000,4.300000L9.900000,11.000000L8.700000,7.900000L7.400000,11.000000L5.500000,11.000000l2.100000,-4.300000L5.600000,2.500000l1.900000,0.000000L8.600000,5.500000z"/>
|
||||
</vector>
|
||||
@@ -1,27 +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"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="13.0"
|
||||
android:viewportHeight="13.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M2.000000,6.000000l0.800000,0.000000c0.300000,0.000000 0.500000,-0.100000 0.700000,-0.300000s0.200000,-0.500000 0.200000,-0.900000c0.000000,-0.300000 -0.100000,-0.600000 -0.200000,-0.800000S3.200000,3.700000 2.900000,3.700000C2.700000,3.700000 2.500000,3.800000 2.300000,4.000000S2.100000,4.400000 2.100000,4.700000L0.500000,4.700000C0.500000,4.000000 0.700000,3.400000 1.100000,3.000000s1.000000,-0.600000 1.700000,-0.600000c0.800000,0.000000 1.400000,0.200000 1.900000,0.600000s0.700000,1.000000 0.700000,1.800000c0.000000,0.400000 -0.100000,0.700000 -0.300000,1.100000S4.600000,6.500000 4.300000,6.600000C4.700000,6.800000 5.000000,7.100000 5.200000,7.400000s0.300000,0.700000 0.300000,1.200000c0.000000,0.800000 -0.200000,1.400000 -0.700000,1.800000s-1.100000,0.700000 -1.900000,0.700000c-0.700000,0.000000 -1.300000,-0.200000 -1.800000,-0.600000s-0.700000,-1.000000 -0.700000,-1.800000L2.000000,8.700000C2.000000,9.000000 2.100000,9.300000 2.300000,9.500000s0.400000,0.300000 0.600000,0.300000c0.300000,0.000000 0.500000,-0.100000 0.700000,-0.300000S3.900000,9.000000 3.900000,8.600000c0.000000,-0.500000 -0.100000,-0.800000 -0.300000,-1.000000S3.200000,7.300000 2.800000,7.300000L2.000000,7.300000L2.000000,6.000000z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M12.500000,9.900000c-0.200000,0.400000 -0.600000,0.700000 -1.000000,0.900000s-1.000000,0.400000 -1.800000,0.400000c-0.900000,0.000000 -1.700000,-0.300000 -2.200000,-0.800000S6.700000,9.000000 6.700000,7.900000L6.700000,5.600000c0.000000,-1.100000 0.300000,-1.900000 0.800000,-2.400000s1.200000,-0.800000 2.100000,-0.800000c1.000000,0.000000 1.700000,0.200000 2.100000,0.700000s0.700000,1.200000 0.700000,2.100000l-1.600000,0.000000c0.000000,-0.500000 -0.100000,-0.900000 -0.200000,-1.100000s-0.500000,-0.300000 -0.900000,-0.300000c-0.400000,0.000000 -0.700000,0.200000 -0.900000,0.500000S8.400000,5.000000 8.400000,5.600000l0.000000,2.300000c0.000000,0.700000 0.100000,1.100000 0.300000,1.400000s0.600000,0.500000 1.000000,0.500000c0.300000,0.000000 0.600000,0.000000 0.700000,-0.100000s0.300000,-0.200000 0.400000,-0.300000L10.799999,7.800000L9.600000,7.800000L9.600000,6.600000l2.900000,0.000000L12.500000,9.900000z"/>
|
||||
</vector>
|
||||
@@ -1,27 +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"
|
||||
android:width="32.0dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="12.0"
|
||||
android:viewportHeight="12.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M4.600000,7.800000l0.700000,0.000000l0.000000,1.300000L4.600000,9.100000L4.600000,11.000000L3.000000,11.000000L3.000000,9.200000L0.100000,9.200000L0.000000,8.100000L3.000000,2.500000l1.700000,0.000000L4.700000,7.800000zM1.600000,7.800000L3.000000,7.800000l0.000000,-3.000000L2.900000,5.000000L1.600000,7.800000z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M11.900000,9.900000c-0.200000,0.400000 -0.600000,0.700000 -1.000000,0.900000s-1.000000,0.400000 -1.800000,0.400000c-0.900000,0.000000 -1.700000,-0.300000 -2.200000,-0.800000S6.100000,9.000000 6.100000,7.900000L6.100000,5.600000c0.000000,-1.100000 0.300000,-1.900000 0.800000,-2.400000S8.100000,2.400000 9.000000,2.400000c1.000000,0.000000 1.700000,0.200000 2.100000,0.700000s0.700000,1.200000 0.700000,2.100000l-1.600000,0.000000c0.000000,-0.500000 -0.100000,-0.900000 -0.200000,-1.100000S9.500000,3.700000 9.000000,3.700000c-0.400000,0.000000 -0.700000,0.200000 -0.900000,0.500000S7.700000,5.000000 7.700000,5.600000l0.000000,2.300000c0.000000,0.700000 0.100000,1.100000 0.300000,1.400000s0.600000,0.500000 1.000000,0.500000c0.300000,0.000000 0.600000,0.000000 0.700000,-0.100000s0.300000,-0.200000 0.400000,-0.300000L10.099999,7.800000L9.000000,7.800000L9.000000,6.600000l2.900000,0.000000L11.900000,9.900000z"/>
|
||||
</vector>
|
||||
@@ -1,30 +0,0 @@
|
||||
<!--
|
||||
Copyright (C) 2016 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32.0dp"
|
||||
android:height="32.0dp"
|
||||
android:viewportWidth="19.0"
|
||||
android:viewportHeight="19.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M4.6,7.8l0.7,0.0l0.0,1.3L4.6,9.1L4.6,11.0L3.0,11.0L3.0,9.2L0.1,9.2L0.0,8.2l3.0,-5.7l1.7,0.0L4.6,7.8L4.6,7.8zM1.7,7.8L3.0,7.8l0.0,-3.0L2.9,5.0L1.7,7.8z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M11.9,9.9c-0.2,0.4 -0.6,0.7 -1.0,0.9s-1.0,0.4 -1.8,0.4c-0.9,0.0 -1.7,-0.3 -2.2,-0.8S6.1,9.0 6.1,7.9L6.1,5.6c0.0,-1.1 0.3,-1.9 0.8,-2.4S8.2,2.4 9.0,2.4c1.0,0.0 1.7,0.2 2.1,0.7s0.7,1.2 0.7,2.1l-1.6,0.0c0.0,-0.5 -0.1,-0.9 -0.2,-1.1S9.5,3.7 9.0,3.7c-0.4,0.0 -0.7,0.2 -0.9,0.5S7.8,5.0 7.8,5.6l0.0,2.3c0.0,0.7 0.1,1.1 0.3,1.4c0.2,0.3 0.6,0.5 1.0,0.5c0.3,0.0 0.6,0.0 0.7,-0.1s0.3,-0.2 0.4,-0.3L10.2,7.8L9.0,7.8L9.0,6.6l2.9,0.0L11.9,9.9z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M17.7,4.4l-1.900001,0.0 0.0,-1.9 -1.2,0.0 0.0,1.9 -1.900001,0.0 0.0,1.2 1.900001,0.0 0.0,1.9 1.2,0.0 0.0,-1.9 1.900001,0.0z"/>
|
||||
</vector>
|
||||
@@ -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"
|
||||
android:autoMirrored="true"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M21.799999,22.299999l-1.199999,-1.299999 0.000000,0.000000 -9.600000,-10.000000 0.000000,0.000000 -6.400000,-6.700000 -1.300000,1.300000 6.400000,6.700000 -8.700000,8.700000 16.900000,0.000000 2.600000,2.700001z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M21.000000,1.000000l-8.600000,8.600000 8.600000,9.100000z"/>
|
||||
</vector>
|
||||
@@ -1,27 +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"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="13.0"
|
||||
android:viewportHeight="13.0">
|
||||
<group
|
||||
android:translateX="3.5" >
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M4.400000,7.300000L1.700000,7.300000l0.000000,2.400000l3.300000,0.000000L5.000000,11.000000L0.000000,11.000000L0.000000,2.500000l4.900000,0.000000l0.000000,1.300000L1.700000,3.800000l0.000000,2.100000l2.800000,0.000000L4.500000,7.300000z"/>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -1,26 +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"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="13.0"
|
||||
android:viewportHeight="13.0">
|
||||
<group android:translateX="3.5" >
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M6.500000,9.900000c-0.200000,0.400000 -0.600000,0.700000 -1.000000,0.900000s-1.000000,0.400000 -1.800000,0.400000c-0.900000,0.000000 -1.700000,-0.300000 -2.200000,-0.800000S0.700000,9.000000 0.700000,7.900000L0.700000,5.600000c0.000000,-1.100000 0.300000,-1.900000 0.800000,-2.400000s1.200000,-0.800000 2.100000,-0.800000c1.000000,0.000000 1.700000,0.200000 2.100000,0.700000s0.700000,1.200000 0.700000,2.100000L4.700000,5.200000c0.000000,-0.500000 -0.100000,-0.900000 -0.200000,-1.100000S4.000000,3.700000 3.600000,3.700000c-0.400000,0.000000 -0.700000,0.200000 -0.900000,0.500000S2.300000,5.000000 2.300000,5.600000l0.000000,2.300000c0.000000,0.700000 0.100000,1.100000 0.300000,1.400000s0.600000,0.500000 1.000000,0.500000c0.300000,0.000000 0.600000,0.000000 0.700000,-0.100000s0.300000,-0.200000 0.400000,-0.300000L4.700000,7.800000L3.500000,7.800000L3.500000,6.600000l2.900000,0.000000L6.400000,9.900000z"/>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -1,27 +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"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="13.0"
|
||||
android:viewportHeight="13.0">
|
||||
<group
|
||||
android:translateX="3.5" >
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M6.000000,11.000000L4.400000,11.000000L4.400000,7.500000L1.700000,7.500000L1.700000,11.000000L0.000000,11.000000L0.000000,2.500000l1.700000,0.000000l0.000000,3.700000l2.700000,0.000000L4.400000,2.500000L6.000000,2.500000L6.000000,11.000000z"/>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -1,30 +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"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="13.0"
|
||||
android:viewportHeight="13.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M2.000000,9.700000l2.000000,0.000000L4.000000,11.000000L0.300000,11.000000L0.300000,2.500000L2.000000,2.500000L2.000000,9.700000z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M8.300000,3.800000L7.000000,3.800000L7.000000,11.000000L5.300000,11.000000L5.300000,3.800000L4.000000,3.800000L4.000000,2.500000l4.300000,0.000000L8.300000,3.800000z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M12.400000,7.300000l-1.700000,0.000000l0.000000,2.400000l2.100000,0.000000L12.799999,11.000000L9.000000,11.000000L9.000000,2.500000l3.700000,0.000000l0.000000,1.300000l-2.100000,0.000000l0.000000,2.100000l1.700000,0.000000L12.300000,7.300000z"/>
|
||||
</vector>
|
||||
@@ -1,33 +0,0 @@
|
||||
<!--
|
||||
Copyright (C) 2016 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32.0dp"
|
||||
android:height="32.0dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M2.0,9.7l2.0,0.0L4.0,11.0L0.4,11.0L0.4,2.5L2.0,2.5L2.0,9.7z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M8.3,3.8L7.0,3.8L7.0,11.0L5.4,11.0L5.4,3.8L4.0,3.8L4.0,2.5l4.3,0.0L8.3,3.8z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M12.4,7.3l-1.7,0.0l0.0,2.4l2.1,0.0L12.799999,11.0L9.0,11.0L9.0,2.5l3.7,0.0l0.0,1.3l-2.1,0.0l0.0,2.1l1.7,0.0L12.4,7.3L12.4,7.3z"/>
|
||||
<path
|
||||
android:fillColor="#FFFFFFFF"
|
||||
android:pathData="M18.4,4.4l-1.9,0.0 0.0,-1.9 -1.2,0.0 0.0,1.9 -1.900001,0.0 0.0,1.2 1.900001,0.0 0.0,1.9 1.2,0.0 0.0,-1.9 1.9,0.0z"/>
|
||||
</vector>
|
||||
@@ -23,13 +23,11 @@ import android.support.annotation.VisibleForTesting;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextClock;
|
||||
|
||||
import com.android.settingslib.Utils;
|
||||
import com.android.systemui.BatteryMeterView;
|
||||
import com.android.systemui.Dependency;
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.R.id;
|
||||
import com.android.systemui.plugins.ActivityStarter;
|
||||
import com.android.systemui.qs.QSDetail.Callback;
|
||||
import com.android.systemui.statusbar.SignalClusterView;
|
||||
@@ -79,7 +77,7 @@ public class QuickStatusBarHeader extends RelativeLayout {
|
||||
battery.setForceShowPercent(true);
|
||||
// Don't show the Wi-Fi indicator here, because it is shown just below in the tile.
|
||||
SignalClusterView signalCluster = findViewById(R.id.signal_cluster);
|
||||
signalCluster.setForceBlockWifi();
|
||||
signalCluster.setQsSignalCluster();
|
||||
|
||||
mActivityStarter = Dependency.get(ActivityStarter.class);
|
||||
}
|
||||
|
||||
@@ -121,6 +121,7 @@ public class SignalClusterView extends LinearLayout implements NetworkController
|
||||
private boolean mBlockEthernet;
|
||||
private boolean mActivityEnabled;
|
||||
private boolean mForceBlockWifi;
|
||||
private boolean mQsSignal;
|
||||
|
||||
public SignalClusterView(Context context) {
|
||||
this(context, null);
|
||||
@@ -152,9 +153,10 @@ public class SignalClusterView extends LinearLayout implements NetworkController
|
||||
updateActivityEnabled();
|
||||
}
|
||||
|
||||
public void setForceBlockWifi() {
|
||||
public void setQsSignalCluster() {
|
||||
mForceBlockWifi = true;
|
||||
mBlockWifi = true;
|
||||
mQsSignal = true;
|
||||
if (isAttachedToWindow()) {
|
||||
// Re-register to get new callbacks.
|
||||
mNetworkController.removeCallback(this);
|
||||
@@ -299,19 +301,23 @@ public class SignalClusterView extends LinearLayout implements NetworkController
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType,
|
||||
public void setMobileDataIndicators(IconState icon, IconState qsIcon, int type,
|
||||
int qsType, boolean activityIn, boolean activityOut, String typeContentDescription,
|
||||
String description, boolean isWide, int subId, boolean roaming) {
|
||||
PhoneState state = getState(subId);
|
||||
if (state == null) {
|
||||
return;
|
||||
}
|
||||
state.mMobileVisible = statusIcon.visible && !mBlockMobile;
|
||||
state.mMobileStrengthId = statusIcon.icon;
|
||||
state.mMobileTypeId = statusType;
|
||||
state.mMobileDescription = statusIcon.contentDescription;
|
||||
if (mQsSignal) {
|
||||
icon = qsIcon;
|
||||
type = qsType;
|
||||
}
|
||||
state.mMobileVisible = icon.visible && !mBlockMobile;
|
||||
state.mMobileStrengthId = icon.icon;
|
||||
state.mMobileTypeId = type;
|
||||
state.mMobileDescription = icon.contentDescription;
|
||||
state.mMobileTypeDescription = typeContentDescription;
|
||||
state.mIsMobileTypeIconWide = statusType != 0 && isWide;
|
||||
state.mIsMobileTypeIconWide = type != 0 && isWide;
|
||||
state.mRoaming = roaming;
|
||||
state.mActivityIn = activityIn && mActivityEnabled;
|
||||
state.mActivityOut = activityOut && mActivityEnabled;
|
||||
|
||||
@@ -252,11 +252,6 @@ public class MobileSignalController extends SignalController<
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getQsCurrentIconId() {
|
||||
return getCurrentIconId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notifyListeners(SignalCallback callback) {
|
||||
MobileIconGroup icons = getIcons();
|
||||
@@ -276,9 +271,9 @@ public class MobileSignalController extends SignalController<
|
||||
String description = null;
|
||||
// Only send data sim callbacks to QS.
|
||||
if (mCurrentState.dataSim) {
|
||||
qsTypeIcon = showDataIcon ? icons.mQsDataType : 0;
|
||||
qsTypeIcon = showDataIcon ? icons.mDataType : 0;
|
||||
qsIcon = new IconState(mCurrentState.enabled
|
||||
&& !mCurrentState.isEmergency, getQsCurrentIconId(), contentDescription);
|
||||
&& !mCurrentState.isEmergency, getCurrentIconId(), contentDescription);
|
||||
description = mCurrentState.isEmergency ? null : mCurrentState.networkName;
|
||||
}
|
||||
boolean activityIn = mCurrentState.dataConnected
|
||||
|
||||
@@ -22,16 +22,6 @@ import com.android.systemui.statusbar.policy.MobileSignalController.MobileIconGr
|
||||
class TelephonyIcons {
|
||||
//***** Data connection icons
|
||||
|
||||
static final int QS_DATA_G = R.drawable.ic_qs_signal_g;
|
||||
static final int QS_DATA_3G = R.drawable.ic_qs_signal_3g;
|
||||
static final int QS_DATA_E = R.drawable.ic_qs_signal_e;
|
||||
static final int QS_DATA_H = R.drawable.ic_qs_signal_h;
|
||||
static final int QS_DATA_1X = R.drawable.ic_qs_signal_1x;
|
||||
static final int QS_DATA_4G = R.drawable.ic_qs_signal_4g;
|
||||
static final int QS_DATA_4G_PLUS = R.drawable.ic_qs_signal_4g_plus;
|
||||
static final int QS_DATA_LTE = R.drawable.ic_qs_signal_lte;
|
||||
static final int QS_DATA_LTE_PLUS = R.drawable.ic_qs_signal_lte_plus;
|
||||
|
||||
static final int FLIGHT_MODE_ICON = R.drawable.stat_sys_airplane_mode;
|
||||
|
||||
static final int ICON_LTE = R.drawable.stat_sys_data_fully_connected_lte;
|
||||
@@ -46,8 +36,6 @@ class TelephonyIcons {
|
||||
|
||||
static final int ICON_DATA_DISABLED = R.drawable.stat_sys_data_disabled;
|
||||
|
||||
static final int QS_ICON_DATA_DISABLED = R.drawable.ic_qs_data_disabled;
|
||||
|
||||
static final MobileIconGroup CARRIER_NETWORK_CHANGE = new MobileIconGroup(
|
||||
"CARRIER_NETWORK_CHANGE",
|
||||
null,
|
||||
@@ -75,7 +63,7 @@ class TelephonyIcons {
|
||||
R.string.accessibility_data_connection_3g,
|
||||
TelephonyIcons.ICON_3G,
|
||||
true,
|
||||
TelephonyIcons.QS_DATA_3G
|
||||
TelephonyIcons.ICON_3G
|
||||
);
|
||||
|
||||
static final MobileIconGroup WFC = new MobileIconGroup(
|
||||
@@ -114,7 +102,7 @@ class TelephonyIcons {
|
||||
R.string.accessibility_data_connection_edge,
|
||||
TelephonyIcons.ICON_E,
|
||||
false,
|
||||
TelephonyIcons.QS_DATA_E
|
||||
TelephonyIcons.ICON_E
|
||||
);
|
||||
|
||||
static final MobileIconGroup ONE_X = new MobileIconGroup(
|
||||
@@ -129,7 +117,7 @@ class TelephonyIcons {
|
||||
R.string.accessibility_data_connection_cdma,
|
||||
TelephonyIcons.ICON_1X,
|
||||
true,
|
||||
TelephonyIcons.QS_DATA_1X
|
||||
TelephonyIcons.ICON_1X
|
||||
);
|
||||
|
||||
static final MobileIconGroup G = new MobileIconGroup(
|
||||
@@ -144,7 +132,7 @@ class TelephonyIcons {
|
||||
R.string.accessibility_data_connection_gprs,
|
||||
TelephonyIcons.ICON_G,
|
||||
false,
|
||||
TelephonyIcons.QS_DATA_G
|
||||
TelephonyIcons.ICON_G
|
||||
);
|
||||
|
||||
static final MobileIconGroup H = new MobileIconGroup(
|
||||
@@ -159,7 +147,7 @@ class TelephonyIcons {
|
||||
R.string.accessibility_data_connection_3_5g,
|
||||
TelephonyIcons.ICON_H,
|
||||
false,
|
||||
TelephonyIcons.QS_DATA_H
|
||||
TelephonyIcons.ICON_H
|
||||
);
|
||||
|
||||
static final MobileIconGroup FOUR_G = new MobileIconGroup(
|
||||
@@ -174,7 +162,7 @@ class TelephonyIcons {
|
||||
R.string.accessibility_data_connection_4g,
|
||||
TelephonyIcons.ICON_4G,
|
||||
true,
|
||||
TelephonyIcons.QS_DATA_4G
|
||||
TelephonyIcons.ICON_4G
|
||||
);
|
||||
|
||||
static final MobileIconGroup FOUR_G_PLUS = new MobileIconGroup(
|
||||
@@ -189,7 +177,7 @@ class TelephonyIcons {
|
||||
R.string.accessibility_data_connection_4g_plus,
|
||||
TelephonyIcons.ICON_4G_PLUS,
|
||||
true,
|
||||
TelephonyIcons.QS_DATA_4G_PLUS
|
||||
TelephonyIcons.ICON_4G_PLUS
|
||||
);
|
||||
|
||||
static final MobileIconGroup LTE = new MobileIconGroup(
|
||||
@@ -204,7 +192,7 @@ class TelephonyIcons {
|
||||
R.string.accessibility_data_connection_lte,
|
||||
TelephonyIcons.ICON_LTE,
|
||||
true,
|
||||
TelephonyIcons.QS_DATA_LTE
|
||||
TelephonyIcons.ICON_LTE
|
||||
);
|
||||
|
||||
static final MobileIconGroup LTE_PLUS = new MobileIconGroup(
|
||||
@@ -219,7 +207,7 @@ class TelephonyIcons {
|
||||
R.string.accessibility_data_connection_lte_plus,
|
||||
TelephonyIcons.ICON_LTE_PLUS,
|
||||
true,
|
||||
TelephonyIcons.QS_DATA_LTE_PLUS
|
||||
TelephonyIcons.ICON_LTE_PLUS
|
||||
);
|
||||
|
||||
static final MobileIconGroup DATA_DISABLED = new MobileIconGroup(
|
||||
@@ -234,7 +222,7 @@ class TelephonyIcons {
|
||||
R.string.accessibility_cell_data_off,
|
||||
TelephonyIcons.ICON_DATA_DISABLED,
|
||||
false,
|
||||
TelephonyIcons.QS_ICON_DATA_DISABLED
|
||||
TelephonyIcons.ICON_DATA_DISABLED
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ public class CallbackHandlerTest extends SysuiTestCase {
|
||||
String typeDescription = "Test 1";
|
||||
String description = "Test 2";
|
||||
int type = R.drawable.stat_sys_data_fully_connected_1x;
|
||||
int qsType = R.drawable.ic_qs_signal_1x;
|
||||
int qsType = type;
|
||||
boolean wide = true;
|
||||
int subId = 5;
|
||||
boolean roaming = true;
|
||||
|
||||
@@ -70,7 +70,7 @@ public class NetworkControllerBaseTest extends SysuiTestCase {
|
||||
protected static final int DEFAULT_SIGNAL_STRENGTH = DEFAULT_LEVEL;
|
||||
protected static final int DEFAULT_QS_SIGNAL_STRENGTH = DEFAULT_LEVEL;
|
||||
protected static final int DEFAULT_ICON = TelephonyIcons.ICON_3G;
|
||||
protected static final int DEFAULT_QS_ICON = TelephonyIcons.QS_DATA_3G;
|
||||
protected static final int DEFAULT_QS_ICON = DEFAULT_ICON;
|
||||
|
||||
protected NetworkControllerImpl mNetworkController;
|
||||
protected MobileSignalController mMobileSignalController;
|
||||
|
||||
@@ -25,7 +25,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
|
||||
setupDefaultSignal();
|
||||
|
||||
verifyDataIndicators(TelephonyIcons.ICON_3G,
|
||||
TelephonyIcons.QS_DATA_3G);
|
||||
TelephonyIcons.ICON_3G);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -35,7 +35,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
|
||||
TelephonyManager.NETWORK_TYPE_GSM);
|
||||
|
||||
verifyDataIndicators(TelephonyIcons.ICON_G,
|
||||
TelephonyIcons.QS_DATA_G);
|
||||
TelephonyIcons.ICON_G);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -45,7 +45,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
|
||||
TelephonyManager.NETWORK_TYPE_CDMA);
|
||||
|
||||
verifyDataIndicators(TelephonyIcons.ICON_1X,
|
||||
TelephonyIcons.QS_DATA_1X);
|
||||
TelephonyIcons.ICON_1X);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -55,7 +55,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
|
||||
TelephonyManager.NETWORK_TYPE_EDGE);
|
||||
|
||||
verifyDataIndicators(TelephonyIcons.ICON_E,
|
||||
TelephonyIcons.QS_DATA_E);
|
||||
TelephonyIcons.ICON_E);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -65,7 +65,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
|
||||
TelephonyManager.NETWORK_TYPE_LTE);
|
||||
|
||||
verifyDataIndicators(TelephonyIcons.ICON_LTE,
|
||||
TelephonyIcons.QS_DATA_LTE);
|
||||
TelephonyIcons.ICON_LTE);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -75,7 +75,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
|
||||
TelephonyManager.NETWORK_TYPE_HSPA);
|
||||
|
||||
verifyDataIndicators(TelephonyIcons.ICON_H,
|
||||
TelephonyIcons.QS_DATA_H);
|
||||
TelephonyIcons.ICON_H);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -104,7 +104,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
|
||||
TelephonyManager.NETWORK_TYPE_LTE);
|
||||
|
||||
verifyDataIndicators(TelephonyIcons.ICON_4G,
|
||||
TelephonyIcons.QS_DATA_4G);
|
||||
TelephonyIcons.ICON_4G);
|
||||
}
|
||||
|
||||
@Ignore("Flaky")
|
||||
@@ -117,7 +117,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
|
||||
setConnectivity(NetworkCapabilities.TRANSPORT_CELLULAR, false, false);
|
||||
|
||||
verifyDataIndicators(TelephonyIcons.ICON_DATA_DISABLED,
|
||||
TelephonyIcons.QS_ICON_DATA_DISABLED);
|
||||
TelephonyIcons.ICON_DATA_DISABLED);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -148,7 +148,7 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
|
||||
mNetworkController.handleConfigurationChanged();
|
||||
|
||||
verifyDataIndicators(TelephonyIcons.ICON_4G,
|
||||
TelephonyIcons.QS_DATA_4G);
|
||||
TelephonyIcons.ICON_4G);
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -158,13 +158,13 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest {
|
||||
TelephonyManager.NETWORK_TYPE_LTE);
|
||||
|
||||
verifyDataIndicators(TelephonyIcons.ICON_LTE,
|
||||
TelephonyIcons.QS_DATA_LTE);
|
||||
TelephonyIcons.ICON_LTE);
|
||||
|
||||
when(mServiceState.getDataNetworkType())
|
||||
.thenReturn(TelephonyManager.NETWORK_TYPE_HSPA);
|
||||
updateServiceState();
|
||||
verifyDataIndicators(TelephonyIcons.ICON_H,
|
||||
TelephonyIcons.QS_DATA_H);
|
||||
TelephonyIcons.ICON_H);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -214,7 +214,7 @@ public class NetworkControllerSignalTest extends NetworkControllerBaseTest {
|
||||
|
||||
verifyLastQsMobileDataIndicators(true,
|
||||
testStrength,
|
||||
TelephonyIcons.QS_DATA_1X, false, false);
|
||||
TelephonyIcons.ICON_1X, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user