Merge "Use frameworks wifi icons instead of sysui"
This commit is contained in:
committed by
Android (Google) Code Review
commit
009bd1bfe3
@@ -1,28 +0,0 @@
|
||||
<!--
|
||||
Copyright (C) 2017 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="29.5dp"
|
||||
android:viewportWidth="25.6"
|
||||
android:viewportHeight="23.6">
|
||||
<group
|
||||
android:translateX="0.8"
|
||||
android:translateY="-1.1">
|
||||
<path
|
||||
android:pathData="M23.66,8.11c0.39,-0.48 0.29,-1.19 -0.22,-1.54C21.67,5.36 17.55,3 12,3 6.44,3 2.33,5.36 0.56,6.57c-0.51,0.35 -0.61,1.06 -0.23,1.54L11.16,21.6c0.42,0.53 1.23,0.53 1.66,0L23.66,8.11z"
|
||||
android:fillColor="#FFFFFFFF"/>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -1,28 +0,0 @@
|
||||
<!--
|
||||
Copyright (C) 2017 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="29.5dp"
|
||||
android:viewportWidth="25.6"
|
||||
android:viewportHeight="23.6">
|
||||
<group
|
||||
android:translateX="0.8"
|
||||
android:translateY="-0.9">
|
||||
<path
|
||||
android:pathData="M23.66,8.11c0.39,-0.48 0.29,-1.19 -0.22,-1.54C21.67,5.36 17.55,3 12,3 6.44,3 2.33,5.36 0.56,6.57c-0.51,0.35 -0.61,1.06 -0.23,1.54L11.16,21.6c0.42,0.53 1.23,0.53 1.66,0L23.66,8.11z"
|
||||
android:fillColor="#4DFFFFFF"/>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -1,31 +0,0 @@
|
||||
<!--
|
||||
Copyright (C) 2017 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="29.5dp"
|
||||
android:viewportWidth="25.6"
|
||||
android:viewportHeight="23.6">
|
||||
<group
|
||||
android:translateX="0.8"
|
||||
android:translateY="-0.9">
|
||||
<path
|
||||
android:pathData="M23.66,8.11c0.39,-0.48 0.29,-1.19 -0.22,-1.54C21.67,5.36 17.55,3 12,3 6.44,3 2.33,5.36 0.56,6.57c-0.51,0.35 -0.61,1.06 -0.23,1.54L11.16,21.6c0.42,0.53 1.23,0.53 1.66,0L23.66,8.11z"
|
||||
android:fillColor="#4DFFFFFF"/>
|
||||
<path
|
||||
android:pathData="M12.82,21.6l5.11,-6.36A8.942,8.942 0,0 0,12 13c-2.28,0 -4.35,0.85 -5.94,2.25l5.1,6.35c0.43,0.53 1.23,0.53 1.66,0z"
|
||||
android:fillColor="#FFFFFFFF"/>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -1,31 +0,0 @@
|
||||
<!--
|
||||
Copyright (C) 2017 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="29.5dp"
|
||||
android:viewportWidth="25.6"
|
||||
android:viewportHeight="23.6">
|
||||
<group
|
||||
android:translateX="0.8"
|
||||
android:translateY="-0.9">
|
||||
<path
|
||||
android:pathData="M23.66,8.11c0.39,-0.48 0.29,-1.19 -0.22,-1.54C21.67,5.36 17.55,3 12,3 6.44,3 2.33,5.36 0.56,6.57c-0.51,0.35 -0.61,1.06 -0.23,1.54L11.16,21.6c0.42,0.53 1.23,0.53 1.66,0L23.66,8.11z"
|
||||
android:fillColor="#4DFFFFFF"/>
|
||||
<path
|
||||
android:pathData="M12.82,21.6l6.99,-8.7C17.71,11.1 14.99,10 12,10c-2.99,0 -5.72,1.1 -7.82,2.91l6.98,8.7c0.43,0.52 1.23,0.52 1.66,-0.01z"
|
||||
android:fillColor="#FFFFFFFF"/>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -1,31 +0,0 @@
|
||||
<!--
|
||||
Copyright (C) 2017 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="29.5dp"
|
||||
android:viewportWidth="25.6"
|
||||
android:viewportHeight="23.6">
|
||||
<group
|
||||
android:translateX="0.8"
|
||||
android:translateY="-0.9">
|
||||
<path
|
||||
android:pathData="M23.66,8.11c0.39,-0.48 0.29,-1.19 -0.22,-1.54C21.67,5.36 17.55,3 12,3 6.44,3 2.33,5.36 0.56,6.57c-0.51,0.35 -0.61,1.06 -0.23,1.54L11.16,21.6c0.42,0.53 1.23,0.53 1.66,0L23.66,8.11z"
|
||||
android:fillColor="#4DFFFFFF"/>
|
||||
<path
|
||||
android:pathData="M12.82,21.6l8.25,-10.26A13.961,13.961 0,0 0,12 8c-3.46,0 -6.63,1.26 -9.07,3.35l8.23,10.26c0.43,0.52 1.23,0.52 1.66,-0.01z"
|
||||
android:fillColor="#FFFFFFFF"/>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -1,28 +0,0 @@
|
||||
<!--
|
||||
Copyright (C) 2017 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="29.5dp"
|
||||
android:viewportWidth="25.6"
|
||||
android:viewportHeight="23.6">
|
||||
<group
|
||||
android:translateX="0.8"
|
||||
android:translateY="-0.9">
|
||||
<path
|
||||
android:pathData="M23.66,8.11c0.39,-0.48 0.29,-1.19 -0.22,-1.54C21.67,5.36 17.55,3 12,3 6.44,3 2.33,5.36 0.56,6.57c-0.51,0.35 -0.61,1.06 -0.23,1.54L11.16,21.6c0.42,0.53 1.23,0.53 1.66,0L23.66,8.11z"
|
||||
android:fillColor="#FFFFFFFF"/>
|
||||
</group>
|
||||
</vector>
|
||||
@@ -47,6 +47,7 @@ import com.android.systemui.statusbar.policy.NetworkController;
|
||||
import com.android.systemui.statusbar.policy.NetworkController.AccessPointController;
|
||||
import com.android.systemui.statusbar.policy.NetworkController.IconState;
|
||||
import com.android.systemui.statusbar.policy.NetworkController.SignalCallback;
|
||||
import com.android.systemui.statusbar.policy.WifiIcons;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -190,7 +191,7 @@ public class WifiTile extends QSTileImpl<SignalState> {
|
||||
} else if (!state.value) {
|
||||
state.slash.isSlashed = true;
|
||||
state.state = Tile.STATE_INACTIVE;
|
||||
state.icon = ResourceIcon.get(R.drawable.ic_qs_wifi_disabled);
|
||||
state.icon = ResourceIcon.get(WifiIcons.QS_WIFI_DISABLED);
|
||||
state.label = r.getString(R.string.quick_settings_wifi_label);
|
||||
} else if (wifiConnected) {
|
||||
state.icon = ResourceIcon.get(cb.wifiSignalIconId);
|
||||
|
||||
@@ -28,7 +28,6 @@ import android.util.Log;
|
||||
import com.android.settingslib.wifi.AccessPoint;
|
||||
import com.android.settingslib.wifi.WifiTracker;
|
||||
import com.android.settingslib.wifi.WifiTracker.WifiListener;
|
||||
import com.android.systemui.R;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
@@ -43,13 +42,7 @@ public class AccessPointControllerImpl
|
||||
// network credentials. This is used by quick settings for secured networks.
|
||||
private static final String EXTRA_START_CONNECT_SSID = "wifi_start_connect_ssid";
|
||||
|
||||
private static final int[] ICONS = {
|
||||
R.drawable.ic_qs_wifi_full_0,
|
||||
R.drawable.ic_qs_wifi_full_1,
|
||||
R.drawable.ic_qs_wifi_full_2,
|
||||
R.drawable.ic_qs_wifi_full_3,
|
||||
R.drawable.ic_qs_wifi_full_4,
|
||||
};
|
||||
private static final int[] ICONS = WifiIcons.WIFI_FULL_ICONS;
|
||||
|
||||
private final Context mContext;
|
||||
private final ArrayList<AccessPointCallback> mCallbacks = new ArrayList<AccessPointCallback>();
|
||||
|
||||
@@ -32,19 +32,24 @@ public class WifiIcons {
|
||||
R.drawable.stat_sys_wifi_signal_4_fully }
|
||||
};
|
||||
|
||||
static final int[] WIFI_FULL_ICONS = {
|
||||
com.android.internal.R.drawable.ic_wifi_signal_0,
|
||||
com.android.internal.R.drawable.ic_wifi_signal_1,
|
||||
com.android.internal.R.drawable.ic_wifi_signal_2,
|
||||
com.android.internal.R.drawable.ic_wifi_signal_3,
|
||||
com.android.internal.R.drawable.ic_wifi_signal_4
|
||||
};
|
||||
|
||||
public static final int[][] QS_WIFI_SIGNAL_STRENGTH = {
|
||||
{ R.drawable.ic_qs_wifi_0,
|
||||
R.drawable.ic_qs_wifi_1,
|
||||
R.drawable.ic_qs_wifi_2,
|
||||
R.drawable.ic_qs_wifi_3,
|
||||
R.drawable.ic_qs_wifi_4 },
|
||||
{ R.drawable.ic_qs_wifi_full_0,
|
||||
R.drawable.ic_qs_wifi_full_1,
|
||||
R.drawable.ic_qs_wifi_full_2,
|
||||
R.drawable.ic_qs_wifi_full_3,
|
||||
R.drawable.ic_qs_wifi_full_4 }
|
||||
WIFI_FULL_ICONS
|
||||
};
|
||||
|
||||
public static final int QS_WIFI_DISABLED = com.android.internal.R.drawable.ic_wifi_signal_0;
|
||||
static final int QS_WIFI_NO_NETWORK = R.drawable.ic_qs_wifi_no_network;
|
||||
static final int WIFI_NO_NETWORK = R.drawable.stat_sys_wifi_signal_null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user