diff options
45 files changed, 339 insertions, 715 deletions
diff --git a/Android.bp b/Android.bp index 5b8e6e1b8d32..7cc2f30cc227 100644 --- a/Android.bp +++ b/Android.bp @@ -436,6 +436,7 @@ java_defaults { "core/java/com/android/internal/os/IShellCallback.aidl", "core/java/com/android/internal/statusbar/IStatusBar.aidl", "core/java/com/android/internal/statusbar/IStatusBarService.aidl", + "core/java/com/android/internal/statusbar/RegisterStatusBarResult.aidl", "core/java/com/android/internal/textservice/ISpellCheckerService.aidl", "core/java/com/android/internal/textservice/ISpellCheckerServiceCallback.aidl", "core/java/com/android/internal/textservice/ISpellCheckerSession.aidl", diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index cbb78bf5732c..8986c6fd02c2 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -234,7 +234,7 @@ message Atom { BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported = 159; BluetoothHciTimeoutReported bluetooth_hci_timeout_reported = 160; BluetoothQualityReportReported bluetooth_quality_report_reported = 161; - BluetoothManufacturerInfoReported bluetooth_device_info_reported = 162; + BluetoothDeviceInfoReported bluetooth_device_info_reported = 162; BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported = 163; BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported = 164; BluetoothBondStateChanged bluetooth_bond_state_changed = 165; @@ -1935,7 +1935,7 @@ message BluetoothQualityReportReported { * Logged from: * packages/apps/Bluetooth */ -message BluetoothManufacturerInfoReported { +message BluetoothDeviceInfoReported { // An identifier that can be used to match events for this device. // Currently, this is a salted hash of the MAC address of this Bluetooth device. // Salt: Randomly generated 256 bit value diff --git a/core/java/android/database/CursorWindow.java b/core/java/android/database/CursorWindow.java index 647448caee82..6873577553a7 100644 --- a/core/java/android/database/CursorWindow.java +++ b/core/java/android/database/CursorWindow.java @@ -138,7 +138,7 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { mName = name != null && name.length() != 0 ? name : "<unnamed>"; mWindowPtr = nativeCreate(mName, (int) windowSizeBytes); if (mWindowPtr == 0) { - throw new IllegalStateException(); // Shouldn't happen. + throw new AssertionError(); // Not possible, the native code won't return it. } mCloseGuard.open("close"); recordNewWindow(Binder.getCallingPid(), mWindowPtr); @@ -166,7 +166,7 @@ public class CursorWindow extends SQLiteClosable implements Parcelable { mStartPos = source.readInt(); mWindowPtr = nativeCreateFromParcel(source); if (mWindowPtr == 0) { - throw new IllegalStateException(); // Shouldn't happen. + throw new AssertionError(); // Not possible, the native code won't return it. } mName = nativeGetName(mWindowPtr); mCloseGuard.open("close"); diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java index 10fe52a71d9d..33e51c9fa11c 100644 --- a/core/java/android/hardware/Camera.java +++ b/core/java/android/hardware/Camera.java @@ -271,7 +271,7 @@ public class Camera { * If there is a * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA * logical multi-camera} in the system, to maintain app backward compatibility, this method will - * only expose one camera for every logical camera and underlying physical cameras group. + * only expose one camera per facing for all logical camera and physical camera groups. * Use camera2 API to see all cameras. * * @return total number of accessible camera devices, or 0 if there are no diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl index 343761430762..5fee2c9bbdd3 100644 --- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl +++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl @@ -24,6 +24,7 @@ import android.service.notification.StatusBarNotification; import android.hardware.biometrics.IBiometricServiceReceiverInternal; import com.android.internal.statusbar.IStatusBar; +import com.android.internal.statusbar.RegisterStatusBarResult; import com.android.internal.statusbar.StatusBarIcon; import com.android.internal.statusbar.StatusBarIconList; import com.android.internal.statusbar.NotificationVisibility; @@ -54,10 +55,7 @@ interface IStatusBarService // ---- Methods below are for use by the status bar policy services ---- // You need the STATUS_BAR_SERVICE permission - void registerStatusBar(IStatusBar callbacks, out List<String> iconSlots, - out List<StatusBarIcon> iconList, - out int[] switches, out List<IBinder> binders, out Rect fullscreenStackBounds, - out Rect dockedStackBounds); + RegisterStatusBarResult registerStatusBar(IStatusBar callbacks); void onPanelRevealed(boolean clearNotificationEffects, int numItems); void onPanelHidden(); // Mark current notifications as "seen" and stop ringing, vibrating, blinking. diff --git a/core/java/com/android/internal/statusbar/RegisterStatusBarResult.aidl b/core/java/com/android/internal/statusbar/RegisterStatusBarResult.aidl new file mode 100644 index 000000000000..ec2e60480aea --- /dev/null +++ b/core/java/com/android/internal/statusbar/RegisterStatusBarResult.aidl @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2019 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.internal.statusbar; + +parcelable RegisterStatusBarResult; diff --git a/core/java/com/android/internal/statusbar/RegisterStatusBarResult.java b/core/java/com/android/internal/statusbar/RegisterStatusBarResult.java new file mode 100644 index 000000000000..b47ef125275f --- /dev/null +++ b/core/java/com/android/internal/statusbar/RegisterStatusBarResult.java @@ -0,0 +1,118 @@ +/* + * Copyright (C) 2019 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.internal.statusbar; + +import android.graphics.Rect; +import android.os.IBinder; +import android.os.Parcel; +import android.os.Parcelable; +import android.util.ArrayMap; + +/** + * An immutable data object to return a set of values from StatusBarManagerService to its clients. + */ +public final class RegisterStatusBarResult implements Parcelable { + public final ArrayMap<String, StatusBarIcon> mIcons; + public final int mDisabledFlags1; // switch[0] + public final int mSystemUiVisibility; // switch[1] + public final boolean mMenuVisible; // switch[2] + public final int mImeWindowVis; // switch[3] + public final int mImeBackDisposition; // switch[4] + public final boolean mShowImeSwitcher; // switch[5] + public final int mDisabledFlags2; // switch[6] + public final int mFullscreenStackSysUiVisibility; // switch[7] + public final int mDockedStackSysUiVisibility; // switch[8] + public final IBinder mImeToken; + public final Rect mFullscreenStackBounds; + public final Rect mDockedStackBounds; + + public RegisterStatusBarResult(ArrayMap<String, StatusBarIcon> icons, int disabledFlags1, + int systemUiVisibility, boolean menuVisible, int imeWindowVis, int imeBackDisposition, + boolean showImeSwitcher, int disabledFlags2, int fullscreenStackSysUiVisibility, + int dockedStackSysUiVisibility, IBinder imeToken, Rect fullscreenStackBounds, + Rect dockedStackBounds) { + mIcons = new ArrayMap<>(icons); + mDisabledFlags1 = disabledFlags1; + mSystemUiVisibility = systemUiVisibility; + mMenuVisible = menuVisible; + mImeWindowVis = imeWindowVis; + mImeBackDisposition = imeBackDisposition; + mShowImeSwitcher = showImeSwitcher; + mDisabledFlags2 = disabledFlags2; + mFullscreenStackSysUiVisibility = fullscreenStackSysUiVisibility; + mDockedStackSysUiVisibility = dockedStackSysUiVisibility; + mImeToken = imeToken; + mFullscreenStackBounds = fullscreenStackBounds; + mDockedStackBounds = dockedStackBounds; + } + + @Override + public int describeContents() { + return 0; + } + + @Override + public void writeToParcel(Parcel dest, int flags) { + dest.writeTypedArrayMap(mIcons, flags); + dest.writeInt(mDisabledFlags1); + dest.writeInt(mSystemUiVisibility); + dest.writeBoolean(mMenuVisible); + dest.writeInt(mImeWindowVis); + dest.writeInt(mImeBackDisposition); + dest.writeBoolean(mShowImeSwitcher); + dest.writeInt(mDisabledFlags2); + dest.writeInt(mFullscreenStackSysUiVisibility); + dest.writeInt(mDockedStackSysUiVisibility); + dest.writeStrongBinder(mImeToken); + dest.writeParcelable(mFullscreenStackBounds, flags); + dest.writeParcelable(mDockedStackBounds, flags); + } + + /** + * Used to make this class parcelable. + */ + public static final Parcelable.Creator<RegisterStatusBarResult> CREATOR = + new Parcelable.Creator<RegisterStatusBarResult>() { + @Override + public RegisterStatusBarResult createFromParcel(Parcel source) { + final ArrayMap<String, StatusBarIcon> icons = + source.createTypedArrayMap(StatusBarIcon.CREATOR); + final int disabledFlags1 = source.readInt(); + final int systemUiVisibility = source.readInt(); + final boolean menuVisible = source.readBoolean(); + final int imeWindowVis = source.readInt(); + final int imeBackDisposition = source.readInt(); + final boolean showImeSwitcher = source.readBoolean(); + final int disabledFlags2 = source.readInt(); + final int fullscreenStackSysUiVisibility = source.readInt(); + final int dockedStackSysUiVisibility = source.readInt(); + final IBinder imeToken = source.readStrongBinder(); + final Rect fullscreenStackBounds = Rect.CREATOR.createFromParcel(source); + final Rect dockedStackBounds = Rect.CREATOR.createFromParcel(source); + return new RegisterStatusBarResult(icons, disabledFlags1, systemUiVisibility, + menuVisible, imeWindowVis, imeBackDisposition, showImeSwitcher, + disabledFlags2, fullscreenStackSysUiVisibility, + dockedStackSysUiVisibility, imeToken, fullscreenStackBounds, + dockedStackBounds); + } + + @Override + public RegisterStatusBarResult[] newArray(int size) { + return new RegisterStatusBarResult[size]; + } + }; +} diff --git a/core/res/res/drawable/ic_wifi_signal_0.xml b/core/res/res/drawable/ic_wifi_signal_0.xml index e732a8dbbf20..cab8be3d3482 100644 --- a/core/res/res/drawable/ic_wifi_signal_0.xml +++ b/core/res/res/drawable/ic_wifi_signal_0.xml @@ -15,12 +15,11 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="26dp" - android:height="24dp" - android:viewportWidth="26" - android:viewportHeight="24"> + android:width="24dp" + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> <path - android:fillAlpha="0.3" - android:fillColor="#FFFFFF" - android:pathData="M13.0,22.0L25.6,6.5C25.1,6.1 20.3,2.1 13.0,2.1S0.9,6.1 0.4,6.5L13.0,22.0L13.0,22.0L13.0,22.0L13.0,22.0L13.0,22.0z"/> + android:fillColor="@android:color/white" + android:pathData="M12,4c3.42,0,6.73,1.27,9.3,3.53L12,18.85L2.7,7.53C5.27,5.27,8.58,4,12,4 M12,2C7.25,2,2.97,4.08,0,7.39L12,22L24,7.39 C21.03,4.08,16.75,2,12,2L12,2z" /> </vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_wifi_signal_1.xml b/core/res/res/drawable/ic_wifi_signal_1.xml index 3d006953fcaa..54b68aeaaaee 100644 --- a/core/res/res/drawable/ic_wifi_signal_1.xml +++ b/core/res/res/drawable/ic_wifi_signal_1.xml @@ -15,15 +15,14 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="26dp" + android:width="24dp" android:height="24dp" - android:viewportWidth="26" + android:viewportWidth="24" android:viewportHeight="24"> <path - android:fillAlpha="0.3" - android:fillColor="#FFFFFF" - android:pathData="M13.1,22.0L25.6,6.5C25.1,6.1 20.3,2.1 13.0,2.1S0.9,6.1 0.5,6.5L13.1,22.0L13.1,22.0L13.1,22.0L13.1,22.0L13.1,22.0z"/> + android:fillColor="@android:color/white" + android:pathData="M12,2.01c-4.75,0-9.03,2.08-12,5.39L12,22L24,7.4C21.03,4.09,16.75,2.01,12,2.01z M12,18.86L2.7,7.54 C5.27,5.28,8.58,4.01,12,4.01s6.73,1.27,9.3,3.53L12,18.86z" /> <path - android:fillColor="#FFFFFF" - android:pathData="M13.1,22.0l5.5,-6.8c-0.2,-0.2 -2.3,-1.9 -5.5,-1.9s-5.3,1.8 -5.5,1.9L13.1,22.0L13.1,22.0L13.1,22.0L13.1,22.0L13.1,22.0z"/> -</vector> + android:fillColor="@android:color/white" + android:pathData="M16.42,16.63L12,22l-4.42-5.37c0.15-0.74,0.48-1.43,0.95-1.99C9.35,13.64,10.6,13,12,13s2.65,0.64,3.47,1.64 C15.94,15.2,16.27,15.89,16.42,16.63z" /> +</vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_wifi_signal_2.xml b/core/res/res/drawable/ic_wifi_signal_2.xml index 2cce9e90c02b..52f589502d39 100644 --- a/core/res/res/drawable/ic_wifi_signal_2.xml +++ b/core/res/res/drawable/ic_wifi_signal_2.xml @@ -15,15 +15,14 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="26dp" + android:width="24dp" android:height="24dp" - android:viewportWidth="26" + android:viewportWidth="24" android:viewportHeight="24"> <path - android:fillAlpha="0.3" - android:fillColor="#FFFFFF" - android:pathData="M13.0,22.0L25.6,6.5C25.1,6.1 20.3,2.1 13.0,2.1S0.9,6.1 0.4,6.5L13.0,22.0L13.0,22.0L13.0,22.0L13.0,22.0L13.0,22.0z"/> + android:fillColor="@android:color/white" + android:pathData="M12,2C7.25,2,2.97,4.08,0,7.39L12,22L24,7.39C21.03,4.08,16.75,2,12,2z M12,18.85L2.7,7.53C5.27,5.27,8.58,4,12,4 s6.73,1.27,9.3,3.53L12,18.85z" /> <path - android:fillColor="#FFFFFF" - android:pathData="M13.0,22.0l7.6,-9.4C20.3,12.4 17.4,10.0 13.0,10.0s-7.3,2.4 -7.6,2.7L13.0,22.0L13.0,22.0L13.0,22.0L13.0,22.0L13.0,22.0z"/> -</vector> + android:fillColor="@android:color/white" + android:pathData="M18.61,13.95L12,22l-6.61-8.05c0.33-0.61,0.74-1.17,1.22-1.66c1.36-1.42,3.27-2.3,5.39-2.3s4.03,0.88,5.39,2.3 C17.87,12.78,18.28,13.34,18.61,13.95z" /> +</vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_wifi_signal_3.xml b/core/res/res/drawable/ic_wifi_signal_3.xml index d3b3d3ad6025..8e51ed2f53b6 100644 --- a/core/res/res/drawable/ic_wifi_signal_3.xml +++ b/core/res/res/drawable/ic_wifi_signal_3.xml @@ -15,15 +15,14 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="26dp" + android:width="24dp" android:height="24dp" - android:viewportWidth="26" + android:viewportWidth="24" android:viewportHeight="24"> <path - android:fillAlpha="0.3" - android:fillColor="#FFFFFF" - android:pathData="M13.0,22.0L25.6,6.5C25.1,6.1 20.3,2.1 13.0,2.1S0.9,6.1 0.4,6.5L13.0,22.0L13.0,22.0L13.0,22.0L13.0,22.0L13.0,22.0z"/> + android:fillColor="@android:color/white" + android:pathData="M12,2C7.25,2,2.97,4.08,0,7.39L12,22L24,7.39C21.03,4.08,16.75,2,12,2z M12,18.85L2.7,7.53C5.27,5.27,8.58,4,12,4 s6.73,1.27,9.3,3.53L12,18.85z" /> <path - android:fillColor="#FFFFFF" - android:pathData="M13.0,22.0l9.2,-11.4c-0.4,-0.3 -3.9,-3.2 -9.2,-3.2s-8.9,3.0 -9.2,3.2L13.0,22.0L13.0,22.0L13.0,22.0L13.0,22.0L13.0,22.0z"/> -</vector> + android:fillColor="@android:color/white" + android:pathData="M20.7,11.41L12,22L3.3,11.41c0.38-0.52,0.8-0.99,1.26-1.43C6.49,8.13,9.1,6.99,12,6.99s5.51,1.13,7.44,2.99 C19.9,10.41,20.33,10.89,20.7,11.41z" /> +</vector>
\ No newline at end of file diff --git a/core/res/res/drawable/ic_wifi_signal_4.xml b/core/res/res/drawable/ic_wifi_signal_4.xml index aca4551044ec..04b63af4a372 100644 --- a/core/res/res/drawable/ic_wifi_signal_4.xml +++ b/core/res/res/drawable/ic_wifi_signal_4.xml @@ -15,11 +15,11 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="26dp" + android:width="24dp" android:height="24dp" - android:viewportWidth="26" + android:viewportWidth="24" android:viewportHeight="24"> <path - android:fillColor="#FFFFFF" - android:pathData="M13.0,22.0L25.6,6.5C25.1,6.1 20.3,2.1 13.0,2.1S0.9,6.1 0.4,6.5L13.0,22.0L13.0,22.0L13.0,22.0L13.0,22.0L13.0,22.0z"/> -</vector> + android:fillColor="@android:color/white" + android:pathData="M24,7.39L12,22L0,7.39C2.97,4.08,7.25,2,12,2S21.03,4.08,24,7.39z" /> +</vector>
\ No newline at end of file diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java index 4d63cc8825e3..8b667f772867 100644 --- a/media/java/android/media/MediaFormat.java +++ b/media/java/android/media/MediaFormat.java @@ -416,8 +416,8 @@ public final class MediaFormat { /** * An optional key describing whether encoders prepend headers to sync frames (e.g. * SPS and PPS to IDR frames for H.264). This is an optional parameter that applies only - * to video encoders. A video encoder may not support this feature; check the output - * format to verify that this feature was enabled. + * to video encoders. A video encoder may not support this feature; the component will fail + * to configure in that case. For other components, this key is ignored. * * The value is an integer, with 1 indicating to prepend headers to every sync frames, * or 0 otherwise. The default value is 0. diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_1.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_1.xml index 675dfc947b7e..694b0ddc127f 100644 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_1.xml +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_1.xml @@ -16,17 +16,13 @@ <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" - android:viewportWidth="25.50" - android:viewportHeight="25.50"> - <group - android:translateX="0.77" - android:translateY="0.23" > - <path - android:pathData="M14,12h6.54l3.12,-3.89c0.39,-0.48 0.29,-1.19 -0.22,-1.54C21.67,5.36 17.55,3 12,3C6.44,3 2.33,5.36 0.56,6.57C0.05,6.92 -0.05,7.63 0.33,8.11L11.16,21.6c0.42,0.53 1.23,0.53 1.66,0L14,20.13V12z" - android:fillAlpha="0.3" - android:fillColor="#FFFFFF"/> - <path - android:pathData="M14,20.13l-1.18,1.47c-0.43,0.53 -1.23,0.53 -1.66,0l-5.1,-6.35C7.65,13.85 9.72,13 12,13c0.69,0 1.36,0.08 2,0.23V20.13zM22.71,14.29L22.71,14.29c-0.38,-0.38 -1,-0.39 -1.38,0l-1.82,1.82l-1.82,-1.82c-0.38,-0.38 -1,-0.38 -1.38,0l-0.01,0.01c-0.38,0.38 -0.38,1 0,1.38l1.82,1.82l-1.83,1.83c-0.38,0.38 -0.38,1 0,1.38l0.01,0.01c0.38,0.38 1,0.38 1.38,0l1.83,-1.83l1.83,1.83c0.38,0.38 1,0.38 1.38,0v0c0.38,-0.38 0.38,-1 0,-1.38l-1.83,-1.83l1.83,-1.83C23.09,15.29 23.09,14.67 22.71,14.29z" - android:fillColor="#FFFFFF"/> - </group> + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="@android:color/white" + android:pathData="M22,16.41L20.59,15l-2.09,2.09L16.41,15L15,16.41l2.09,2.09L15,20.59L16.41,22l2.09,-2.08L20.59,22L22,20.59l-2.08,-2.09L22,16.41z"/> + <path + android:fillColor="@android:color/white" + android:pathData="M12,2.01C7.25,2.01 2.97,4.09 0,7.4L7.582,16.625C7.582,16.627 7.58,16.629 7.58,16.631L11.99,22L12,22L13,20.789L13,17.641L13,13.119C12.68,13.039 12.34,13 12,13C10.601,13 9.351,13.64 8.531,14.639L2.699,7.539C5.269,5.279 8.58,4.01 12,4.01C15.42,4.01 18.731,5.279 21.301,7.539L16.811,13L19.4,13L24,7.4C21.03,4.09 16.75,2.01 12,2.01z" + android:fillAlpha="0.3"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_2.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_2.xml index c9a7eb8fd362..dcb3fa82eb5d 100644 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_2.xml +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_2.xml @@ -16,17 +16,13 @@ <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" - android:viewportWidth="25.50" - android:viewportHeight="25.50"> - <group - android:translateX="0.77" - android:translateY="0.23" > - <path - android:pathData="M14,12h6.54l3.12,-3.89c0.39,-0.48 0.29,-1.19 -0.22,-1.54C21.67,5.36 17.55,3 12,3C6.44,3 2.33,5.36 0.56,6.57C0.05,6.92 -0.05,7.63 0.33,8.11L11.16,21.6c0.42,0.53 1.23,0.53 1.66,0L14,20.13V12z" - android:fillAlpha="0.3" - android:fillColor="#FFFFFF"/> - <path - android:pathData="M14,20.13l-1.18,1.47c-0.43,0.53 -1.23,0.53 -1.66,0l-6.98,-8.7C6.28,11.1 9.01,10 12,10c2.45,0 4.72,0.74 6.62,2H14V20.13zM22.71,14.29L22.71,14.29c-0.38,-0.38 -1,-0.39 -1.38,0l-1.82,1.82l-1.82,-1.82c-0.38,-0.38 -1,-0.38 -1.38,0l-0.01,0.01c-0.38,0.38 -0.38,1 0,1.38l1.82,1.82l-1.83,1.83c-0.38,0.38 -0.38,1 0,1.38l0.01,0.01c0.38,0.38 1,0.38 1.38,0l1.83,-1.83l1.83,1.83c0.38,0.38 1,0.38 1.38,0v0c0.38,-0.38 0.38,-1 0,-1.38l-1.83,-1.83l1.83,-1.83C23.09,15.29 23.09,14.67 22.71,14.29z" - android:fillColor="#FFFFFF"/> - </group> + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="@android:color/white" + android:pathData="M22,16.41L20.59,15l-2.09,2.09L16.41,15L15,16.41l2.09,2.09L15,20.59L16.41,22l2.09,-2.08L20.59,22L22,20.59l-2.08,-2.09L22,16.41z"/> + <path + android:fillColor="@android:color/white" + android:pathData="M12,2C7.25,2 2.97,4.081 0,7.391L12,22L13,20.779L13,17.631L13,13L16.801,13L18,13L19.391,13L24,7.391C21.03,4.081 16.75,2 12,2zM12,4C14.747,4 17.423,4.819 19.701,6.313C20.259,6.678 20.795,7.085 21.301,7.529L17.389,12.287C16.029,10.868 14.119,9.99 12,9.99C9.88,9.99 7.969,10.869 6.609,12.289L2.699,7.529C5.269,5.269 8.58,4 12,4z" + android:fillAlpha="0.3"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_3.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_3.xml index a6facaed82d8..d68a2f6fe426 100644 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_3.xml +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_3.xml @@ -16,17 +16,13 @@ <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" - android:viewportWidth="25.50" - android:viewportHeight="25.50"> - <group - android:translateX="0.77" - android:translateY="0.23" > - <path - android:pathData="M14,12h6.54l3.12,-3.89c0.39,-0.48 0.29,-1.19 -0.22,-1.54C21.67,5.36 17.55,3 12,3C6.44,3 2.33,5.36 0.56,6.57C0.05,6.92 -0.05,7.63 0.33,8.11L11.16,21.6c0.42,0.53 1.23,0.53 1.66,0L14,20.13V12z" - android:fillAlpha="0.3" - android:fillColor="#FFFFFF"/> - <path - android:pathData="M14,20.13l-1.18,1.47c-0.43,0.53 -1.23,0.53 -1.66,0L2.93,11.35C5.37,9.26 8.54,8 12,8c3.46,0 6.62,1.26 9.07,3.34L20.54,12H14V20.13zM22.71,14.29L22.71,14.29c-0.38,-0.38 -1,-0.39 -1.38,0l-1.82,1.82l-1.82,-1.82c-0.38,-0.38 -1,-0.38 -1.38,0l-0.01,0.01c-0.38,0.38 -0.38,1 0,1.38l1.82,1.82l-1.83,1.83c-0.38,0.38 -0.38,1 0,1.38l0.01,0.01c0.38,0.38 1,0.38 1.38,0l1.83,-1.83l1.83,1.83c0.38,0.38 1,0.38 1.38,0v0c0.38,-0.38 0.38,-1 0,-1.38l-1.83,-1.83l1.83,-1.83C23.09,15.29 23.09,14.67 22.71,14.29z" - android:fillColor="#FFFFFF"/> - </group> + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="@android:color/white" + android:pathData="M22,16.41L20.59,15l-2.09,2.09L16.41,15L15,16.41l2.09,2.09L15,20.59L16.41,22l2.09,-2.08L20.59,22L22,20.59l-2.08,-2.09L22,16.41z"/> + <path + android:fillColor="@android:color/white" + android:pathData="M12,2C7.25,2 2.97,4.081 0,7.391L3.301,11.41L12,22L13,20.779L13,17.631L13,13L16.801,13L19.391,13L20.699,11.41C20.699,11.409 20.698,11.409 20.697,11.408L24,7.391C21.03,4.081 16.75,2 12,2zM12,4C15.42,4 18.731,5.269 21.301,7.529L19.35,9.9C17.43,8.1 14.86,6.99 12,6.99C9.14,6.99 6.57,8.1 4.65,9.9C4.65,9.901 4.649,9.902 4.648,9.902L2.699,7.529C5.269,5.269 8.58,4 12,4z" + android:fillAlpha="0.3"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_4.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_4.xml index 2eae8f5b3318..886cc3534322 100644 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_4.xml +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_4.xml @@ -16,13 +16,13 @@ <vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" - android:viewportWidth="25.50" - android:viewportHeight="25.50"> - <group - android:translateX="0.77" - android:translateY="0.23" > - <path - android:pathData="M22.71,15.67l-1.83,1.83l1.83,1.83c0.38,0.38 0.38,1 0,1.38v0c-0.38,0.38 -1,0.39 -1.38,0l-1.83,-1.83l-1.83,1.83c-0.38,0.38 -1,0.38 -1.38,0l-0.01,-0.01c-0.38,-0.38 -0.38,-1 0,-1.38l1.83,-1.83l-1.82,-1.82c-0.38,-0.38 -0.38,-1 0,-1.38l0.01,-0.01c0.38,-0.38 1,-0.38 1.38,0l1.82,1.82l1.82,-1.82c0.38,-0.38 1,-0.38 1.38,0l0,0C23.09,14.67 23.09,15.29 22.71,15.67zM14,12h6.54l3.12,-3.89c0.39,-0.48 0.28,-1.19 -0.23,-1.54C21.66,5.36 17.55,3 12,3C6.44,3 2.33,5.36 0.56,6.57C0.05,6.92 -0.05,7.63 0.33,8.11L11.16,21.6c0.42,0.53 1.23,0.53 1.66,0L14,20.13V12z" - android:fillColor="#FFFFFF"/> - </group> + android:viewportWidth="24.0" + android:viewportHeight="24.0"> + <path + android:fillColor="@android:color/white" + android:pathData="M12,2C7.25,2 2.97,4.08 0,7.39L12,22l1,-1.22V13h6.39L24,7.39C21.03,4.08 16.75,2 12,2z" + android:fillAlpha="0.3"/> + <path + android:fillColor="@android:color/white" + android:pathData="M22,16.41L20.59,15l-2.09,2.09L16.41,15L15,16.41l2.09,2.09L15,20.59L16.41,22l2.09,-2.08L20.59,22L22,20.59l-2.08,-2.09L22,16.41z"/> </vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_detail_empty.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_detail_empty.xml deleted file mode 100644 index 30024dd64a3e..000000000000 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_detail_empty.xml +++ /dev/null @@ -1,30 +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" - android:alpha="0.14" - android:tint="?android:attr/colorForeground" > - <group - android:translateX="0.51" - 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="#FFFFFF"/> - </group> -</vector> diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_disconnected.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_disconnected.xml index cb87caeb1b8d..3c45761ca4dd 100644 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_disconnected.xml +++ b/packages/SystemUI/res/drawable/ic_qs_wifi_disconnected.xml @@ -14,19 +14,20 @@ limitations under the License. --> <vector xmlns:android="http://schemas.android.com/apk/res/android" - android:width="26dp" + android:width="24dp" android:height="24dp" - android:viewportWidth="25.6" - android:viewportHeight="23.7"> - <group - android:translateX="0.82" - android:translateY="-1"> - <path - android:pathData="M18.9,20.85c0,-0.61 0.49,-1.1 1.1,-1.1 0.61,0 1.1,0.49 1.1,1.1 0,0.61 -0.49,1.1 -1.1,1.1 -0.61,0 -1.1,-0.49 -1.1,-1.1zM20,10c-1.53,0 -2.84,0.99 -3.31,2.36 -0.19,0.56 0.23,1.14 0.81,1.14 0.36,0 0.72,-0.21 0.84,-0.55 0.23,-0.7 0.89,-1.2 1.66,-1.2 0.97,0 1.75,0.78 1.75,1.75 0,0.48 -0.2,0.92 -0.51,1.24l-1.09,1.1c-0.69,0.69 -0.92,1.38 -0.99,2.2 -0.04,0.51 0.36,0.96 0.88,0.96 0.44,0 0.83,-0.33 0.87,-0.77 0.07,-0.79 0.31,-1.27 1,-1.95l0.78,-0.8c0.5,-0.5 0.82,-1.2 0.82,-1.97C23.5,11.57 21.93,10 20,10z" - android:fillColor="#FFFFFFFF"/> - <path - android:pathData="M14.73,12.88c0,-2.7 2.19,-4.88 4.88,-4.88 1.22,0 2.32,0.46 3.18,1.2l0.88,-1.09c0.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,0l3.88,-4.82a4.862,4.862 0,0 1,-1.97 -3.9z" - android:fillAlpha="0.3" - android:fillColor="#FFFFFFFF"/> - </group> -</vector> + android:viewportWidth="24" + android:viewportHeight="24"> + <path + android:fillColor="@android:color/white" + android:fillAlpha="0.3" + android:strokeAlpha="0.3" + android:strokeWidth="1" + android:pathData="M12,2C7.25,2,2.97,4.08,0,7.39L12,22l3.18-3.87c-0.46-0.57-0.79-1.24-0.98-1.96L12,18.85L2.7,7.53 C5.27,5.27,8.58,4,12,4s6.73,1.27,9.3,3.53l-1.43,1.74c0.76,0.04,1.47,0.24,2.12,0.57L24,7.39C21.03,4.08,16.75,2,12,2z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M 18.63 20.25 H 20.38 V 22 H 18.63 V 20.25 Z" /> + <path + android:fillColor="@android:color/white" + android:pathData="M19.5,11.25c-1.93,0-3.5,1.57-3.5,3.5h1.75c0-0.96,0.79-1.75,1.75-1.75s1.75,0.79,1.75,1.75c0,1.76-2.62,1.54-2.62,4.38 h1.75c0-1.97,2.62-2.19,2.62-4.38C23,12.82,21.43,11.25,19.5,11.25z" /> +</vector>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_no_network.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_no_network.xml deleted file mode 100644 index e59e7f4b61e3..000000000000 --- a/packages/SystemUI/res/drawable/ic_qs_wifi_no_network.xml +++ /dev/null @@ -1,24 +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="29.5dp" - android:viewportWidth="26.0" - android:viewportHeight="24.0"> - <path - android:fillColor="#FFFFFFFF" - android:pathData="M13.000000,2.000000C7.700000,2.000000 3.700000,3.900000 0.400000,6.400000L13.000000,22.000000L25.600000,6.500000C22.299999,4.000000 18.299999,2.000000 13.000000,2.000000zM13.000000,18.600000L3.300000,7.000000l0.000000,0.000000l0.000000,0.000000C6.000000,5.300000 8.700000,4.000000 13.000000,4.000000s7.000000,1.400000 9.700000,3.000000l0.000000,0.000000l0.000000,0.000000L13.000000,18.600000z"/> -</vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml deleted file mode 100644 index 56ca422758fa..000000000000 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml +++ /dev/null @@ -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="16.41dp" - android:height="16.41dp" - android:viewportWidth="21.2" - android:viewportHeight="21.2"> - <group - android:translateX="0.5" - android:translateY="2.0"> - <path - android:pathData="M18.79,9.79c-0.32,-0.32 -0.83,-0.32 -1.15,0L16.43,11l-1.21,-1.21c-0.32,-0.32 -0.83,-0.32 -1.15,0L14.06,9.8l0,0c-0.32,0.32 -0.32,0.83 0,1.15l1.21,1.21l-1.21,1.21l0,0c-0.32,0.32 -0.32,0.83 0,1.15l0.01,0.01c0.32,0.32 0.83,0.32 1.15,0l1.21,-1.21l1.21,1.21c0.32,0.32 0.83,0.32 1.15,0c0.32,-0.32 0.32,-0.83 0,-1.15l-1.21,-1.21l1.21,-1.21C19.1,10.64 19.1,10.13 18.79,9.79z" - android:fillColor="?attr/fillColor"/> - <path - android:pathData="M11.69,7.44h6.27L19.95,5c0.4,-0.49 0.3,-1.22 -0.23,-1.56c-1.6,-1.05 -5.04,-2.9 -9.62,-2.9c-4.59,0 -8.03,1.85 -9.62,2.9C-0.05,3.78 -0.16,4.51 0.24,5l9.02,11.08c0.42,0.52 1.22,0.52 1.64,0l0.78,-0.96V7.44z" - android:fillColor="?attr/backgroundColor"/> - </group> -</vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml deleted file mode 100644 index 737d5a0f3d97..000000000000 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml +++ /dev/null @@ -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="16.25dp" - android:height="15dp" - android:viewportWidth="21.66" - android:viewportHeight="20"> - <group - android:translateX="0.74" - android:translateY="1.2"> - <path - android:pathData="M19.95,5c0.4,-0.49 0.3,-1.22 -0.23,-1.56 -1.6,-1.05 -5.04,-2.9 -9.62,-2.9 -4.59,0 -8.03,1.85 -9.62,2.9C-0.05,3.78 -0.16,4.51 0.24,5l9.02,11.08c0.42,0.52 1.22,0.52 1.64,0L19.95,5z" - android:fillColor="?attr/backgroundColor"/> - </group> -</vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml deleted file mode 100644 index e5b0d1a94890..000000000000 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml +++ /dev/null @@ -1,34 +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="16.41dp" - android:height="16.41dp" - android:viewportWidth="21.7" - android:viewportHeight="21.7"> - <group - android:translateY="2.2" - android:translateX="0.75"> - <path - android:pathData="M11.69,7.44h6.27L19.95,5c0.4,-0.49 0.3,-1.22 -0.23,-1.56c-1.6,-1.05 -5.04,-2.9 -9.62,-2.9c-4.59,0 -8.03,1.85 -9.62,2.9C-0.05,3.78 -0.16,4.51 0.24,5l9.02,11.08c0.42,0.52 1.22,0.52 1.64,0l0.78,-0.96V7.44z" - android:fillColor="?attr/backgroundColor" /> - <path - android:pathData="M5.02,10.86l4.25,5.21c0.42,0.52 1.22,0.52 1.64,0l0.78,-0.96V9.14c-0.51,-0.11 -1.05,-0.17 -1.59,-0.17C8.15,8.97 6.37,9.69 5.02,10.86z" - android:fillColor="?attr/fillColor" /> - <path - android:pathData="M17.57,12.17l1.21,-1.21c0.32,-0.32 0.32,-0.83 0,-1.17c-0.32,-0.32 -0.83,-0.32 -1.15,0L16.43,11l-1.21,-1.21c-0.32,-0.32 -0.83,-0.32 -1.15,0L14.06,9.8c-0.32,0.32 -0.32,0.83 0,1.15l1.21,1.21l-1.21,1.21c-0.32,0.32 -0.32,0.83 0,1.15l0.01,0.01c0.32,0.32 0.83,0.32 1.15,0l1.21,-1.21l1.21,1.21c0.32,0.32 0.83,0.32 1.15,0c0.32,-0.32 0.32,-0.83 0,-1.15L17.57,12.17z" - android:fillColor="?attr/fillColor" /> - </group> -</vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml deleted file mode 100644 index 5d6457044974..000000000000 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml +++ /dev/null @@ -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="16.25dp" - android:height="15dp" - android:viewportWidth="21.66" - android:viewportHeight="20.0"> - <group - android:translateX="0.79" - android:translateY="1.2"> - <path - android:pathData="M19.95,5c0.4,-0.49 0.3,-1.22 -0.23,-1.56 -1.6,-1.05 -5.04,-2.9 -9.62,-2.9 -4.59,0 -8.03,1.85 -9.62,2.9C-0.05,3.78 -0.16,4.51 0.24,5l9.02,11.08c0.42,0.52 1.22,0.52 1.64,0L19.95,5z" - android:fillColor="?attr/backgroundColor"/> - <path - android:pathData="M10.1,8.97c-1.95,0 -3.72,0.72 -5.08,1.9l4.25,5.21c0.42,0.52 1.22,0.52 1.64,0l4.26,-5.22a7.702,7.702 0,0 0,-5.07 -1.89z" - android:fillColor="?attr/fillColor"/> - </group> -</vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml deleted file mode 100644 index b3ee86e5cd6a..000000000000 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml +++ /dev/null @@ -1,34 +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="16.41dp" - android:height="16.41dp" - android:viewportWidth="21.7" - android:viewportHeight="21.7"> - <group - android:translateX="0.75" - android:translateY="2.2" > - <path - android:pathData="M11.69,7.44h6.27L19.95,5c0.4,-0.49 0.3,-1.22 -0.23,-1.56c-1.6,-1.05 -5.04,-2.9 -9.62,-2.9c-4.59,0 -8.03,1.85 -9.62,2.9C-0.05,3.78 -0.16,4.51 0.24,5l9.02,11.08c0.42,0.52 1.22,0.52 1.64,0l0.78,-0.96V7.44z" - android:fillColor="?attr/backgroundColor"/> - <path - android:pathData="M10.09,6.44c-2.55,0 -4.88,0.93 -6.68,2.45l5.85,7.18c0.42,0.52 1.22,0.52 1.64,0l0.78,-0.96V7.44h2.84C13.18,6.8 11.68,6.44 10.09,6.44z" - android:fillColor="?attr/fillColor"/> - <path - android:pathData="M17.57,12.17l1.21,-1.21c0.32,-0.32 0.32,-0.83 0,-1.17c-0.32,-0.32 -0.83,-0.32 -1.15,0L16.43,11l-1.21,-1.21c-0.32,-0.32 -0.83,-0.32 -1.15,0L14.06,9.8c-0.32,0.32 -0.32,0.83 0,1.15l1.21,1.21l-1.21,1.21c-0.32,0.32 -0.32,0.83 0,1.15l0.01,0.01c0.32,0.32 0.83,0.32 1.15,0l1.21,-1.21l1.21,1.21c0.32,0.32 0.83,0.32 1.15,0c0.32,-0.32 0.32,-0.83 0,-1.15L17.57,12.17z" - android:fillColor="?attr/fillColor"/> - </group> -</vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml deleted file mode 100644 index 012e74250e65..000000000000 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml +++ /dev/null @@ -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="16.24dp" -android:height="15dp" -android:viewportWidth="21.86" -android:viewportHeight="20.19"> - <group - android:translateX="0.85" - android:translateY="1.4" > - <path - android:pathData="M19.95,5c0.4,-0.49 0.3,-1.22 -0.23,-1.56 -1.6,-1.05 -5.04,-2.9 -9.62,-2.9 -4.59,0 -8.03,1.85 -9.62,2.9C-0.05,3.78 -0.16,4.51 0.24,5l9.02,11.08c0.42,0.52 1.22,0.52 1.64,0L19.95,5z" - android:fillColor="?attr/backgroundColor" /> - <path - android:pathData="M10.09,6.44c-2.55,0 -4.88,0.93 -6.68,2.45l5.85,7.18c0.42,0.52 1.22,0.52 1.64,0l5.86,-7.19a10.284,10.284 0,0 0,-6.67 -2.44z" - android:fillColor="?attr/fillColor" /> - </group> -</vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml deleted file mode 100644 index 9b919c187913..000000000000 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml +++ /dev/null @@ -1,34 +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="16.41dp" - android:height="16.41dp" - android:viewportWidth="21.7" - android:viewportHeight="21.7"> - <group - android:translateX="0.75" - android:translateY="2.3" > - <path - android:pathData="M11.69,7.44h6.27L19.95,5c0.4,-0.49 0.3,-1.22 -0.23,-1.56c-1.6,-1.05 -5.04,-2.9 -9.62,-2.9c-4.59,0 -8.03,1.85 -9.62,2.9C-0.05,3.78 -0.16,4.51 0.24,5l9.02,11.08c0.42,0.52 1.22,0.52 1.64,0l0.78,-0.96V7.44z" - android:fillColor="?attr/backgroundColor"/> - <path - android:pathData="M10.08,4.75c-2.96,0 -5.66,1.06 -7.74,2.82l6.93,8.5c0.21,0.26 0.51,0.39 0.82,0.39c0.22,0 0.44,-0.07 0.63,-0.2c0.07,-0.05 0.14,-0.11 0.2,-0.19l0.78,-0.96V7.44h5.98C15.6,5.77 12.96,4.75 10.08,4.75z" - android:fillColor="?attr/fillColor"/> - <path - android:pathData="M17.57,12.17l1.21,-1.21c0.32,-0.32 0.32,-0.83 0,-1.17c-0.32,-0.32 -0.83,-0.32 -1.15,0L16.43,11l-1.21,-1.21c-0.32,-0.32 -0.83,-0.32 -1.15,0L14.06,9.8c-0.32,0.32 -0.32,0.83 0,1.15l1.21,1.21l-1.21,1.21c-0.32,0.32 -0.32,0.83 0,1.15l0.01,0.01c0.32,0.32 0.83,0.32 1.15,0l1.21,-1.21l1.21,1.21c0.32,0.32 0.83,0.32 1.15,0c0.32,-0.32 0.32,-0.83 0,-1.15L17.57,12.17z" - android:fillColor="?attr/fillColor"/> - </group> -</vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml deleted file mode 100644 index 5a61d2a69f68..000000000000 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml +++ /dev/null @@ -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="16.27dp" - android:height="15dp" - android:viewportWidth="21.80" - android:viewportHeight="20.1"> - <group - android:translateX="0.81" - android:translateY="1.29" > - <path - android:pathData="M19.95,5c0.4,-0.49 0.3,-1.22 -0.23,-1.56 -1.6,-1.05 -5.04,-2.9 -9.62,-2.9 -4.59,0 -8.03,1.85 -9.62,2.9C-0.05,3.78 -0.16,4.51 0.24,5l9.02,11.08c0.42,0.52 1.22,0.52 1.64,0L19.95,5z" - android:fillColor="?attr/backgroundColor"/> - <path - android:pathData="M10.08,4.75c-2.96,0 -5.66,1.06 -7.74,2.82l6.93,8.5c0.21,0.26 0.51,0.39 0.82,0.39 0.23,0 0.46,-0.07 0.65,-0.22 -0.02,0.02 -0.04,0.03 -0.07,0.05 0.09,-0.06 0.17,-0.13 0.24,-0.22l6.93,-8.5c-2.09,-1.74 -4.8,-2.82 -7.76,-2.82z" - android:fillColor="?attr/fillColor"/> - </group> -</vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml deleted file mode 100644 index 144af5af3bdb..000000000000 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml +++ /dev/null @@ -1,29 +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="16.41dp" - android:height="16.41dp" - android:viewportWidth="21.95" - android:viewportHeight="21.65"> - <group - android:translateX="0.90" - android:translateY="2.25" - > - <path - android:pathData="M11.69,15.12l-0.78,0.96c-0.43,0.52 -1.22,0.52 -1.64,0L0.24,5c-0.4,-0.49 -0.29,-1.22 0.23,-1.56c1.59,-1.05 5.03,-2.9 9.62,-2.9c4.59,0 8.02,1.85 9.62,2.9c0.53,0.35 0.63,1.08 0.23,1.56l-1.99,2.44h-6.27V15.12zM18.79,9.79c-0.32,-0.32 -0.83,-0.32 -1.15,0L16.43,11l-1.21,-1.21c-0.32,-0.32 -0.83,-0.32 -1.15,0L14.06,9.8l0,0c-0.32,0.32 -0.32,0.83 0,1.15l1.21,1.21l-1.21,1.21l0,0c-0.32,0.32 -0.32,0.83 0,1.15l0.01,0.01c0.32,0.32 0.83,0.32 1.15,0l1.21,-1.21l1.21,1.21c0.32,0.32 0.83,0.32 1.15,0c0.32,-0.32 0.32,-0.83 0,-1.15l-1.21,-1.21l1.21,-1.21C19.1,10.64 19.1,10.13 18.79,9.79z" - android:fillColor="?attr/singleToneColor"/> - </group> -</vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml deleted file mode 100644 index 6c9f983b41dd..000000000000 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml +++ /dev/null @@ -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="16.31dp" - android:height="15dp" - android:viewportWidth="21.75" - android:viewportHeight="20.0"> - <group - android:translateX="0.80" - android:translateY="1.25"> - <path - android:pathData="M19.95,5c0.4,-0.49 0.3,-1.22 -0.23,-1.56 -1.6,-1.05 -5.04,-2.9 -9.62,-2.9 -4.59,0 -8.03,1.85 -9.62,2.9C-0.05,3.78 -0.16,4.51 0.24,5l9.02,11.08c0.42,0.52 1.22,0.52 1.64,0L19.95,5z" - android:fillColor="?attr/singleToneColor"/> - </group> -</vector> diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml deleted file mode 100644 index 330daa4d0e7b..000000000000 --- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml +++ /dev/null @@ -1,24 +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="16.25dp" - android:height="17dp" - android:viewportWidth="26.0" - android:viewportHeight="24.0"> - <path - android:fillColor="?attr/backgroundColor" - android:pathData="M13.000000,2.000000C7.700000,2.000000 3.700000,3.900000 0.400000,6.400000L13.000000,22.000000L25.600000,6.500000C22.299999,4.000000 18.299999,2.000000 13.000000,2.000000zM13.000000,18.600000L3.300000,7.000000l0.000000,0.000000l0.000000,0.000000C6.000000,5.300000 8.700000,4.000000 13.000000,4.000000s7.000000,1.400000 9.700000,3.000000l0.000000,0.000000l0.000000,0.000000L13.000000,18.600000z"/> -</vector> diff --git a/packages/SystemUI/res/layout/status_bar_wifi_group.xml b/packages/SystemUI/res/layout/status_bar_wifi_group.xml index c419b907ab17..35cce25d45a7 100644 --- a/packages/SystemUI/res/layout/status_bar_wifi_group.xml +++ b/packages/SystemUI/res/layout/status_bar_wifi_group.xml @@ -59,10 +59,9 @@ android:layout_width="wrap_content" android:gravity="center_vertical" > <com.android.systemui.statusbar.AlphaOptimizedImageView - android:theme="?attr/lightIconTheme" android:id="@+id/wifi_signal" - android:layout_height="wrap_content" - android:layout_width="wrap_content" /> + android:layout_height="@dimen/status_bar_wifi_signal_size" + android:layout_width="@dimen/status_bar_wifi_signal_size" /> </FrameLayout> <View diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index a02469ee9fb9..95a4da670417 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -79,6 +79,9 @@ <!-- Spacing after the wifi signals that is present if there are any icons following it. --> <dimen name="status_bar_wifi_signal_spacer_width">2.5dp</dimen> + <!-- Size of the view displaying the wifi signal icon in the status bar. --> + <dimen name="status_bar_wifi_signal_size">15dp</dimen> + <!-- Spacing before the airplane mode icon if there are any icons preceding it. --> <dimen name="status_bar_airplane_spacer_width">4dp</dimen> 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 3e40cfc0cda2..15df1f161159 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/WifiTile.java @@ -200,7 +200,7 @@ public class WifiTile extends QSTileImpl<SignalState> { state.icon = ResourceIcon.get(R.drawable.ic_qs_wifi_disconnected); state.label = r.getString(R.string.quick_settings_wifi_label); } else { - state.icon = ResourceIcon.get(R.drawable.ic_qs_wifi_no_network); + state.icon = ResourceIcon.get(WifiIcons.QS_WIFI_NO_NETWORK); state.label = r.getString(R.string.quick_settings_wifi_label); } minimalContentDescription.append( @@ -415,14 +415,14 @@ public class WifiTile extends QSTileImpl<SignalState> { // Wi-Fi is off if (!mSignalCallback.mInfo.enabled) { - mItems.setEmptyState(R.drawable.ic_qs_wifi_detail_empty, + mItems.setEmptyState(WifiIcons.QS_WIFI_NO_NETWORK, R.string.wifi_is_off); mItems.setItems(null); return; } // No available access points - mItems.setEmptyState(R.drawable.ic_qs_wifi_detail_empty, + mItems.setEmptyState(WifiIcons.QS_WIFI_NO_NETWORK, R.string.quick_settings_wifi_detail_empty_text); // Build the list diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NeutralGoodDrawable.java b/packages/SystemUI/src/com/android/systemui/statusbar/NeutralGoodDrawable.java deleted file mode 100644 index 8642ca4c7d33..000000000000 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NeutralGoodDrawable.java +++ /dev/null @@ -1,75 +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. - */ - -package com.android.systemui.statusbar; - -import android.content.Context; -import android.graphics.drawable.Drawable; -import android.graphics.drawable.LayerDrawable; -import android.view.ContextThemeWrapper; -import android.view.Gravity; - -import com.android.settingslib.Utils; -import com.android.systemui.R; - -/** - * NeutralGoodDrawable implements a drawable that will load 2 underlying drawable resources, one - * with each the DualToneDarkTheme and DualToneLightTheme, choosing which one based on what - * DarkIconDispatcher tells us about darkness - */ -public class NeutralGoodDrawable extends LayerDrawable { - - public static NeutralGoodDrawable create(Context context, int resId) { - int dualToneLightTheme = Utils.getThemeAttr(context, R.attr.lightIconTheme); - int dualToneDarkTheme = Utils.getThemeAttr(context, R.attr.darkIconTheme); - ContextThemeWrapper light = new ContextThemeWrapper(context, dualToneLightTheme); - ContextThemeWrapper dark = new ContextThemeWrapper(context, dualToneDarkTheme); - - return create(light, dark, resId); - } - - /** - * For the on-the-go young entrepreneurial who wants to cache contexts - * @param light - a context using the R.attr.lightIconTheme - * @param dark - a context using the R.attr.darkIconTheme - * @param resId - the resId for our drawable - */ - public static NeutralGoodDrawable create(Context light, Context dark, int resId) { - return new NeutralGoodDrawable( - new Drawable[] { - light.getDrawable(resId).mutate(), - dark.getDrawable(resId).mutate() }); - } - - protected NeutralGoodDrawable(Drawable []drawables) { - super(drawables); - - for (int i = 0; i < drawables.length; i++) { - setLayerGravity(i, Gravity.CENTER); - } - - mutate(); - setDarkIntensity(0); - } - - public void setDarkIntensity(float intensity) { - - getDrawable(0).setAlpha((int) ((1 - intensity) * 255f)); - getDrawable(1).setAlpha((int) (intensity * 255f)); - - invalidateSelf(); - } -} diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarWifiView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarWifiView.java index c5751c300c01..351627980c08 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarWifiView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarWifiView.java @@ -25,9 +25,7 @@ import static com.android.systemui.statusbar.StatusBarIconView.STATE_ICON; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.Rect; -import android.graphics.drawable.Drawable; import android.util.AttributeSet; -import android.view.ContextThemeWrapper; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -35,7 +33,6 @@ import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; -import com.android.settingslib.Utils; import com.android.systemui.R; import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver; import com.android.systemui.statusbar.phone.StatusBarSignalPolicy.WifiIconState; @@ -59,12 +56,8 @@ public class StatusBarWifiView extends FrameLayout implements DarkReceiver, private View mAirplaneSpacer; private WifiIconState mState; private String mSlot; - private float mDarkIntensity = 0; private int mVisibleState = -1; - private ContextThemeWrapper mDarkContext; - private ContextThemeWrapper mLightContext; - public static StatusBarWifiView fromContext(Context context, String slot) { LayoutInflater inflater = LayoutInflater.from(context); StatusBarWifiView v = (StatusBarWifiView) inflater.inflate(R.layout.status_bar_wifi_group, null); @@ -160,11 +153,6 @@ public class StatusBarWifiView extends FrameLayout implements DarkReceiver, } private void init() { - int dualToneLightTheme = Utils.getThemeAttr(mContext, R.attr.lightIconTheme); - int dualToneDarkTheme = Utils.getThemeAttr(mContext, R.attr.darkIconTheme); - mLightContext = new ContextThemeWrapper(mContext, dualToneLightTheme); - mDarkContext = new ContextThemeWrapper(mContext, dualToneDarkTheme); - mWifiGroup = findViewById(R.id.wifi_group); mWifiIcon = findViewById(R.id.wifi_signal); mIn = findViewById(R.id.wifi_in); @@ -209,10 +197,7 @@ public class StatusBarWifiView extends FrameLayout implements DarkReceiver, private boolean updateState(WifiIconState state) { setContentDescription(state.contentDescription); if (mState.resId != state.resId && state.resId >= 0) { - NeutralGoodDrawable drawable = NeutralGoodDrawable - .create(mLightContext, mDarkContext, state.resId); - drawable.setDarkIntensity(mDarkIntensity); - mWifiIcon.setImageDrawable(drawable); + mWifiIcon.setImageDrawable(mContext.getDrawable(mState.resId)); } mIn.setVisibility(state.activityIn ? View.VISIBLE : View.GONE); @@ -237,10 +222,7 @@ public class StatusBarWifiView extends FrameLayout implements DarkReceiver, private void initViewState() { setContentDescription(mState.contentDescription); if (mState.resId >= 0) { - NeutralGoodDrawable drawable = NeutralGoodDrawable.create( - mLightContext, mDarkContext, mState.resId); - drawable.setDarkIntensity(mDarkIntensity); - mWifiIcon.setImageDrawable(drawable); + mWifiIcon.setImageDrawable(mContext.getDrawable(mState.resId)); } mIn.setVisibility(mState.activityIn ? View.VISIBLE : View.GONE); @@ -257,11 +239,8 @@ public class StatusBarWifiView extends FrameLayout implements DarkReceiver, if (!isInArea(area, this)) { return; } - mDarkIntensity = darkIntensity; - Drawable d = mWifiIcon.getDrawable(); - if (d instanceof NeutralGoodDrawable) { - ((NeutralGoodDrawable)d).setDarkIntensity(darkIntensity); - } + + mWifiIcon.setImageTintList(ColorStateList.valueOf(getTint(area, this, tint))); mIn.setImageTintList(ColorStateList.valueOf(getTint(area, this, tint))); mOut.setImageTintList(ColorStateList.valueOf(getTint(area, this, tint))); mDotView.setDecorColor(tint); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java index 99269cf17141..02ee2433d251 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationIconAreaController.java @@ -215,16 +215,13 @@ public class NotificationIconAreaController implements DarkReceiver, if (entry.isRowDismissed() && hideDismissed) { return false; } - if (hideRepliedMessages && entry.isLastMessageFromReply()) { return false; } - // showAmbient == show in shade but not shelf - if (!showAmbient && entry.shouldSuppressStatusBar()) { + if ((!showAmbient || mFullyDark) && entry.shouldSuppressStatusBar()) { return false; } - return true; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index e5defae1f159..b34e24eee7fe 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -81,7 +81,6 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; -import android.os.IBinder; import android.os.Looper; import android.os.Message; import android.os.PowerManager; @@ -123,7 +122,7 @@ import com.android.internal.colorextraction.ColorExtractor; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.internal.statusbar.IStatusBarService; -import com.android.internal.statusbar.StatusBarIcon; +import com.android.internal.statusbar.RegisterStatusBarResult; import com.android.internal.widget.LockPatternUtils; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.keyguard.KeyguardUpdateMonitorCallback; @@ -690,17 +689,11 @@ public class StatusBar extends SystemUI implements DemoMode, mCommandQueue = getComponent(CommandQueue.class); mCommandQueue.addCallback(this); - int[] switches = new int[9]; - ArrayList<IBinder> binders = new ArrayList<>(); - ArrayList<String> iconSlots = new ArrayList<>(); - ArrayList<StatusBarIcon> icons = new ArrayList<>(); - Rect fullscreenStackBounds = new Rect(); - Rect dockedStackBounds = new Rect(); + RegisterStatusBarResult result = null; try { - mBarService.registerStatusBar(mCommandQueue, iconSlots, icons, switches, binders, - fullscreenStackBounds, dockedStackBounds); + result = mBarService.registerStatusBar(mCommandQueue); } catch (RemoteException ex) { - // If the system process isn't there we're doomed anyway. + ex.rethrowFromSystemServer(); } createAndAddWindows(); @@ -714,28 +707,29 @@ public class StatusBar extends SystemUI implements DemoMode, // Set up the initial notification state. This needs to happen before CommandQueue.disable() setUpPresenter(); - setSystemUiVisibility(mDisplayId, switches[1], switches[7], switches[8], 0xffffffff, - fullscreenStackBounds, dockedStackBounds); - topAppWindowChanged(mDisplayId, switches[2] != 0); + setSystemUiVisibility(mDisplayId, result.mSystemUiVisibility, + result.mFullscreenStackSysUiVisibility, result.mDockedStackSysUiVisibility, + 0xffffffff, result.mFullscreenStackBounds, result.mDockedStackBounds); + topAppWindowChanged(mDisplayId, result.mMenuVisible); // StatusBarManagerService has a back up of IME token and it's restored here. - setImeWindowStatus(mDisplayId, binders.get(0), switches[3], switches[4], switches[5] != 0); + setImeWindowStatus(mDisplayId, result.mImeToken, result.mImeWindowVis, + result.mImeBackDisposition, result.mShowImeSwitcher); // Set up the initial icon state - int N = iconSlots.size(); - for (int i=0; i < N; i++) { - mCommandQueue.setIcon(iconSlots.get(i), icons.get(i)); + int numIcons = result.mIcons.size(); + for (int i = 0; i < numIcons; i++) { + mCommandQueue.setIcon(result.mIcons.keyAt(i), result.mIcons.valueAt(i)); } if (DEBUG) { Log.d(TAG, String.format( "init: icons=%d disabled=0x%08x lights=0x%08x menu=0x%08x imeButton=0x%08x", - icons.size(), - switches[0], - switches[1], - switches[2], - switches[3] - )); + numIcons, + result.mDisabledFlags1, + result.mSystemUiVisibility, + result.mMenuVisible ? 1 : 0, + result.mImeWindowVis)); } IntentFilter internalFilter = new IntentFilter(); @@ -774,9 +768,10 @@ public class StatusBar extends SystemUI implements DemoMode, // set the initial view visibility Dependency.get(InitController.class).addPostInitTask(this::updateAreThereNotifications); - Dependency.get(InitController.class).addPostInitTask(() -> { - setUpDisableFlags(switches[0], switches[6]); - }); + int disabledFlags1 = result.mDisabledFlags1; + int disabledFlags2 = result.mDisabledFlags2; + Dependency.get(InitController.class).addPostInitTask( + () -> setUpDisableFlags(disabledFlags1, disabledFlags2)); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java index f629863c53a9..9db109de369b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/WifiIcons.java @@ -19,18 +19,6 @@ package com.android.systemui.statusbar.policy; import com.android.systemui.R; public class WifiIcons { - static final int[][] WIFI_SIGNAL_STRENGTH = { - { R.drawable.stat_sys_wifi_signal_0, - R.drawable.stat_sys_wifi_signal_1, - R.drawable.stat_sys_wifi_signal_2, - R.drawable.stat_sys_wifi_signal_3, - R.drawable.stat_sys_wifi_signal_4 }, - { R.drawable.stat_sys_wifi_signal_0_fully, - R.drawable.stat_sys_wifi_signal_1_fully, - R.drawable.stat_sys_wifi_signal_2_fully, - R.drawable.stat_sys_wifi_signal_3_fully, - R.drawable.stat_sys_wifi_signal_4_fully } - }; static final int[] WIFI_FULL_ICONS = { com.android.internal.R.drawable.ic_wifi_signal_0, @@ -40,18 +28,23 @@ public class WifiIcons { com.android.internal.R.drawable.ic_wifi_signal_4 }; + private static final int[] WIFI_NO_INTERNET_ICONS = { + 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 + }; + 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 }, + WIFI_NO_INTERNET_ICONS, WIFI_FULL_ICONS - }; + }; + static final int[][] WIFI_SIGNAL_STRENGTH = QS_WIFI_SIGNAL_STRENGTH; 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; + public static final int QS_WIFI_NO_NETWORK = com.android.internal.R.drawable.ic_wifi_signal_0; + static final int WIFI_NO_NETWORK = QS_WIFI_NO_NETWORK; static final int WIFI_LEVEL_COUNT = WIFI_SIGNAL_STRENGTH[0].length; } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java index 4a69cd783a6c..17d9cbe3af07 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java @@ -17,19 +17,14 @@ package com.android.systemui.statusbar.tv; import android.content.Context; -import android.graphics.Rect; -import android.os.IBinder; import android.os.RemoteException; import android.os.ServiceManager; import com.android.internal.statusbar.IStatusBarService; -import com.android.internal.statusbar.StatusBarIcon; import com.android.systemui.SystemUI; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.CommandQueue.Callbacks; -import java.util.ArrayList; - /** * Status bar implementation for "large screen" products that mostly present no on-screen nav */ @@ -43,17 +38,10 @@ public class TvStatusBar extends SystemUI implements Callbacks { putComponent(TvStatusBar.class, this); CommandQueue commandQueue = getComponent(CommandQueue.class); commandQueue.addCallback(this); - int[] switches = new int[9]; - ArrayList<IBinder> binders = new ArrayList<>(); - ArrayList<String> iconSlots = new ArrayList<>(); - ArrayList<StatusBarIcon> icons = new ArrayList<>(); - Rect fullscreenStackBounds = new Rect(); - Rect dockedStackBounds = new Rect(); mBarService = IStatusBarService.Stub.asInterface( ServiceManager.getService(Context.STATUS_BAR_SERVICE)); try { - mBarService.registerStatusBar(commandQueue, iconSlots, icons, switches, binders, - fullscreenStackBounds, dockedStackBounds); + mBarService.registerStatusBar(commandQueue); } catch (RemoteException ex) { // If the system process isn't there we're doomed anyway. } diff --git a/services/core/java/com/android/server/am/AppCompactor.java b/services/core/java/com/android/server/am/AppCompactor.java index 043dc8d00081..13b55dbcad48 100644 --- a/services/core/java/com/android/server/am/AppCompactor.java +++ b/services/core/java/com/android/server/am/AppCompactor.java @@ -278,17 +278,15 @@ public final class AppCompactor { + " full, " + mPersistentCompactionCount + " persistent, " + mBfgsCompactionCount + " BFGS compactions."); - if (mLastCompactionStats != null) { - pw.println(" Tracking last compaction stats for " + mLastCompactionStats.size() - + " processes."); - if (DEBUG_COMPACTION) { - for (Map.Entry<Integer, LastCompactionStats> entry - : mLastCompactionStats.entrySet()) { - int pid = entry.getKey(); - LastCompactionStats stats = entry.getValue(); - pw.println(" " + pid + ": " - + Arrays.toString(stats.getRssAfterCompaction())); - } + pw.println(" Tracking last compaction stats for " + mLastCompactionStats.size() + + " processes."); + if (DEBUG_COMPACTION) { + for (Map.Entry<Integer, LastCompactionStats> entry + : mLastCompactionStats.entrySet()) { + int pid = entry.getKey(); + LastCompactionStats stats = entry.getValue(); + pw.println(" " + pid + ": " + + Arrays.toString(stats.getRssAfterCompaction())); } } } @@ -506,10 +504,6 @@ public final class AppCompactor { } } - @VisibleForTesting static String procStateListToString(Integer... processStates) { - return Arrays.toString(processStates); - } - private static final class LastCompactionStats { private final long[] mRssAfterCompaction; diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java index af58b195a491..c6f6c50a308d 100644 --- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java +++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java @@ -3515,10 +3515,10 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { /** * Process state of UID changed; if needed, will trigger * {@link #updateRulesForDataUsageRestrictionsUL(int)} and - * {@link #updateRulesForPowerRestrictionsUL(int)} + * {@link #updateRulesForPowerRestrictionsUL(int)}. Returns true if the state was updated. */ @GuardedBy("mUidRulesFirstLock") - private void updateUidStateUL(int uid, int uidState) { + private boolean updateUidStateUL(int uid, int uidState) { Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "updateUidStateUL"); try { final int oldUidState = mUidState.get(uid, ActivityManager.PROCESS_STATE_CACHED_EMPTY); @@ -3537,15 +3537,16 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { } updateRulesForPowerRestrictionsUL(uid); } - updateNetworkStats(uid, isUidStateForeground(uidState)); + return true; } } finally { Trace.traceEnd(Trace.TRACE_TAG_NETWORK); } + return false; } @GuardedBy("mUidRulesFirstLock") - private void removeUidStateUL(int uid) { + private boolean removeUidStateUL(int uid) { final int index = mUidState.indexOfKey(uid); if (index >= 0) { final int oldUidState = mUidState.valueAt(index); @@ -3560,9 +3561,10 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { updateRuleForRestrictPowerUL(uid); } updateRulesForPowerRestrictionsUL(uid); - updateNetworkStats(uid, false); + return true; } } + return false; } // adjust stats accounting based on foreground status @@ -4552,21 +4554,26 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { } } } - }; void handleUidChanged(int uid, int procState, long procStateSeq) { Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "onUidStateChanged"); try { + boolean updated; synchronized (mUidRulesFirstLock) { // We received a uid state change callback, add it to the history so that it // will be useful for debugging. mLogger.uidStateChanged(uid, procState, procStateSeq); // Now update the network policy rules as per the updated uid state. - updateUidStateUL(uid, procState); + updated = updateUidStateUL(uid, procState); // Updating the network rules is done, so notify AMS about this. mActivityManagerInternal.notifyNetworkPolicyRulesUpdated(uid, procStateSeq); } + // Do this without the lock held. handleUidChanged() and handleUidGone() are + // called from the handler, so there's no multi-threading issue. + if (updated) { + updateNetworkStats(uid, isUidStateForeground(procState)); + } } finally { Trace.traceEnd(Trace.TRACE_TAG_NETWORK); } @@ -4575,8 +4582,14 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { void handleUidGone(int uid) { Trace.traceBegin(Trace.TRACE_TAG_NETWORK, "onUidGone"); try { + boolean updated; synchronized (mUidRulesFirstLock) { - removeUidStateUL(uid); + updated = removeUidStateUL(uid); + } + // Do this without the lock held. handleUidChanged() and handleUidGone() are + // called from the handler, so there's no multi-threading issue. + if (updated) { + updateNetworkStats(uid, false); } } finally { Trace.traceEnd(Trace.TRACE_TAG_NETWORK); diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java index 0493ae908f12..aaf3df39d429 100644 --- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java +++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java @@ -52,6 +52,7 @@ import com.android.internal.annotations.GuardedBy; import com.android.internal.statusbar.IStatusBar; import com.android.internal.statusbar.IStatusBarService; import com.android.internal.statusbar.NotificationVisibility; +import com.android.internal.statusbar.RegisterStatusBarResult; import com.android.internal.statusbar.StatusBarIcon; import com.android.internal.util.DumpUtils; import com.android.server.LocalServices; @@ -63,7 +64,6 @@ import com.android.server.wm.WindowManagerService; import java.io.FileDescriptor; import java.io.PrintWriter; import java.util.ArrayList; -import java.util.List; /** * A note on locking: We rely on the fact that calls onto mBar are oneway or @@ -1037,37 +1037,27 @@ public class StatusBarManagerService extends IStatusBarService.Stub implements D // ================================================================================ // TODO(b/118592525): refactor it as an IStatusBar API. @Override - public void registerStatusBar(IStatusBar bar, List<String> iconSlots, - List<StatusBarIcon> iconList, int switches[], List<IBinder> binders, - Rect fullscreenStackBounds, Rect dockedStackBounds) { + public RegisterStatusBarResult registerStatusBar(IStatusBar bar) { enforceStatusBarService(); Slog.i(TAG, "registerStatusBar bar=" + bar); mBar = bar; mDeathRecipient.linkToDeath(); notifyBarAttachChanged(); + final ArrayMap<String, StatusBarIcon> icons; synchronized (mIcons) { - for (String slot : mIcons.keySet()) { - iconSlots.add(slot); - iconList.add(mIcons.get(slot)); - } + icons = new ArrayMap<>(mIcons); } synchronized (mLock) { // TODO(b/118592525): Currently, status bar only works on the default display. // Make it aware of multi-display if needed. final UiState state = mDisplayUiState.get(DEFAULT_DISPLAY); - switches[0] = gatherDisableActionsLocked(mCurrentUserId, 1); - switches[1] = state.mSystemUiVisibility; - switches[2] = state.mMenuVisible ? 1 : 0; - switches[3] = state.mImeWindowVis; - switches[4] = state.mImeBackDisposition; - switches[5] = state.mShowImeSwitcher ? 1 : 0; - switches[6] = gatherDisableActionsLocked(mCurrentUserId, 2); - switches[7] = state.mFullscreenStackSysUiVisibility; - switches[8] = state.mDockedStackSysUiVisibility; - binders.add(state.mImeToken); - fullscreenStackBounds.set(state.mFullscreenStackBounds); - dockedStackBounds.set(state.mDockedStackBounds); + return new RegisterStatusBarResult(icons, gatherDisableActionsLocked(mCurrentUserId, 1), + state.mSystemUiVisibility, state.mMenuVisible, state.mImeWindowVis, + state.mImeBackDisposition, state.mShowImeSwitcher, + gatherDisableActionsLocked(mCurrentUserId, 2), + state.mFullscreenStackSysUiVisibility, state.mDockedStackSysUiVisibility, + state.mImeToken, state.mFullscreenStackBounds, state.mDockedStackBounds); } } diff --git a/services/tests/servicestests/src/com/android/server/am/UserControllerTest.java b/services/tests/servicestests/src/com/android/server/am/UserControllerTest.java index 46d076184eef..231025c61c8a 100644 --- a/services/tests/servicestests/src/com/android/server/am/UserControllerTest.java +++ b/services/tests/servicestests/src/com/android/server/am/UserControllerTest.java @@ -484,9 +484,6 @@ public class UserControllerTest { private void waitForHandlerToComplete(Handler handler, long waitTimeMs) throws InterruptedException { - if (!handler.hasMessagesOrCallbacks()) { // if nothing queued, do not wait. - return; - } final Object lock = new Object(); synchronized (lock) { handler.post(() -> { diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java index 9b3796f57d30..140e9c324dfa 100644 --- a/wifi/java/android/net/wifi/WifiManager.java +++ b/wifi/java/android/net/wifi/WifiManager.java @@ -36,11 +36,14 @@ import android.content.pm.ParceledListSlice; import android.net.ConnectivityManager; import android.net.DhcpInfo; import android.net.Network; +import android.net.NetworkCapabilities; +import android.net.NetworkRequest; import android.net.wifi.hotspot2.IProvisioningCallback; import android.net.wifi.hotspot2.OsuProvider; import android.net.wifi.hotspot2.PasspointConfiguration; import android.net.wifi.hotspot2.ProvisioningCallback; import android.os.Binder; +import android.os.Build; import android.os.Handler; import android.os.IBinder; import android.os.Looper; @@ -56,6 +59,7 @@ import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.AsyncChannel; import com.android.internal.util.Protocol; +import com.android.server.net.NetworkPinner; import dalvik.system.CloseGuard; @@ -1895,12 +1899,27 @@ public class WifiManager { */ @Deprecated public boolean enableNetwork(int netId, boolean attemptConnect) { + final boolean pin = attemptConnect && mTargetSdkVersion < Build.VERSION_CODES.LOLLIPOP; + if (pin) { + NetworkRequest request = new NetworkRequest.Builder() + .clearCapabilities() + .addCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN) + .addTransportType(NetworkCapabilities.TRANSPORT_WIFI) + .build(); + NetworkPinner.pin(mContext, request); + } + boolean success; try { success = mService.enableNetwork(netId, attemptConnect, mContext.getOpPackageName()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } + + if (pin && !success) { + NetworkPinner.unpin(); + } + return success; } |