Merge "Fixup App Compaction CL nits." into qt-dev
diff --git a/Android.bp b/Android.bp
index 5b8e6e1..7cc2f30 100644
--- a/Android.bp
+++ b/Android.bp
@@ -436,6 +436,7 @@
"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/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java
index bd38327..c2aec6a 100644
--- a/core/java/android/view/WindowManager.java
+++ b/core/java/android/view/WindowManager.java
@@ -1746,7 +1746,7 @@
* what the other flags are.
* @hide
*/
- public static final int PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND = 0x00020000;
+ public static final int PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS = 0x00020000;
/**
* Flag to indicate that this window needs Sustained Performance Mode if
@@ -1877,8 +1877,8 @@
equals = PRIVATE_FLAG_LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME,
name = "LAYOUT_CHILD_WINDOW_IN_PARENT_FRAME"),
@ViewDebug.FlagToString(
- mask = PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND,
- equals = PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND,
+ mask = PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS,
+ equals = PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS,
name = "FORCE_DRAW_STATUS_BAR_BACKGROUND"),
@ViewDebug.FlagToString(
mask = PRIVATE_FLAG_SUSTAINED_PERFORMANCE_MODE,
diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java
index 625814d..66a6329 100644
--- a/core/java/com/android/internal/policy/DecorView.java
+++ b/core/java/com/android/internal/policy/DecorView.java
@@ -38,7 +38,6 @@
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION;
import static android.view.WindowManager.LayoutParams.TYPE_DRAWN_APPLICATION;
-
import static com.android.internal.policy.PhoneWindow.FEATURE_OPTIONS_PANEL;
import android.animation.Animator;
@@ -53,6 +52,7 @@
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Color;
+import android.graphics.Insets;
import android.graphics.LinearGradient;
import android.graphics.Outline;
import android.graphics.Paint;
@@ -205,8 +205,8 @@
private final Interpolator mShowInterpolator;
private final Interpolator mHideInterpolator;
private final int mBarEnterExitDuration;
- final boolean mForceWindowDrawsStatusBarBackground;
- private final int mSemiTransparentStatusBarColor;
+ final boolean mForceWindowDrawsBarBackgrounds;
+ private final int mSemiTransparentBarColor;
private final BackgroundFallback mBackgroundFallback = new BackgroundFallback();
@@ -242,6 +242,8 @@
private boolean mWindowResizeCallbacksAdded = false;
private Drawable.Callback mLastBackgroundDrawableCb = null;
private BackdropFrameRenderer mBackdropFrameRenderer = null;
+ private Drawable mOriginalBackgroundDrawable;
+ private Drawable mLastOriginalBackgroundDrawable;
private Drawable mResizingBackgroundDrawable;
private Drawable mCaptionBackgroundDrawable;
private Drawable mUserCaptionBackgroundDrawable;
@@ -257,6 +259,8 @@
private final int mResizeShadowSize;
private final Paint mVerticalResizeShadowPaint = new Paint();
private final Paint mHorizontalResizeShadowPaint = new Paint();
+ private Insets mBackgroundInsets = Insets.NONE;
+ private Insets mLastBackgroundInsets = Insets.NONE;
DecorView(Context context, int featureId, PhoneWindow window,
WindowManager.LayoutParams params) {
@@ -270,10 +274,10 @@
mBarEnterExitDuration = context.getResources().getInteger(
R.integer.dock_enter_exit_duration);
- mForceWindowDrawsStatusBarBackground = context.getResources().getBoolean(
+ mForceWindowDrawsBarBackgrounds = context.getResources().getBoolean(
R.bool.config_forceWindowDrawsStatusBarBackground)
&& context.getApplicationInfo().targetSdkVersion >= N;
- mSemiTransparentStatusBarColor = context.getResources().getColor(
+ mSemiTransparentBarColor = context.getResources().getColor(
R.color.system_bar_background_semi_transparent, null /* theme */);
updateAvailableWidth();
@@ -948,8 +952,9 @@
}
public void setWindowBackground(Drawable drawable) {
- if (getBackground() != drawable) {
- setBackgroundDrawable(drawable);
+ if (mOriginalBackgroundDrawable != drawable) {
+ mOriginalBackgroundDrawable = drawable;
+ updateBackgroundDrawable();
if (drawable != null) {
mResizingBackgroundDrawable = enforceNonTranslucentBackground(drawable,
mWindow.isTranslucent() || mWindow.isShowingWallpaper());
@@ -1114,9 +1119,10 @@
boolean navBarToLeftEdge = isNavBarToLeftEdge(mLastBottomInset, mLastLeftInset);
int navBarSize = getNavBarSize(mLastBottomInset, mLastRightInset, mLastLeftInset);
updateColorViewInt(mNavigationColorViewState, sysUiVisibility,
- mWindow.mNavigationBarColor, mWindow.mNavigationBarDividerColor, navBarSize,
+ calculateNavigationBarColor(), mWindow.mNavigationBarDividerColor, navBarSize,
navBarToRightEdge || navBarToLeftEdge, navBarToLeftEdge,
- 0 /* sideInset */, animate && !disallowAnimate, false /* force */);
+ 0 /* sideInset */, animate && !disallowAnimate,
+ mForceWindowDrawsBarBackgrounds);
boolean statusBarNeedsRightInset = navBarToRightEdge
&& mNavigationColorViewState.present;
@@ -1128,24 +1134,34 @@
calculateStatusBarColor(), 0, mLastTopInset,
false /* matchVertical */, statusBarNeedsLeftInset, statusBarSideInset,
animate && !disallowAnimate,
- mForceWindowDrawsStatusBarBackground);
+ mForceWindowDrawsBarBackgrounds);
}
- // When we expand the window with FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, we still need
- // to ensure that the rest of the view hierarchy doesn't notice it, unless they've
- // explicitly asked for it.
- boolean consumingNavBar =
- (attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0
+ // When we expand the window with FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS or
+ // mForceWindowDrawsBarBackgrounds, we still need to ensure that the rest of the view
+ // hierarchy doesn't notice it, unless they've explicitly asked for it.
+ //
+ // Note: We don't need to check for IN_SCREEN or INSET_DECOR because unlike the status bar,
+ // these flags wouldn't make the window draw behind the navigation bar, unless
+ // LAYOUT_HIDE_NAVIGATION was set.
+ boolean forceConsumingNavBar = (mForceWindowDrawsBarBackgrounds
+ && (attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0
&& (sysUiVisibility & SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) == 0
- && (sysUiVisibility & SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0
+ && (sysUiVisibility & SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0)
|| mLastShouldAlwaysConsumeSystemBars;
+ boolean consumingNavBar =
+ ((attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0
+ && (sysUiVisibility & SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) == 0
+ && (sysUiVisibility & SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0)
+ || forceConsumingNavBar;
+
// If we didn't request fullscreen layout, but we still got it because of the
- // mForceWindowDrawsStatusBarBackground flag, also consume top inset.
+ // mForceWindowDrawsBarBackgrounds flag, also consume top inset.
boolean consumingStatusBar = (sysUiVisibility & SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN) == 0
&& (attrs.flags & FLAG_LAYOUT_IN_SCREEN) == 0
&& (attrs.flags & FLAG_LAYOUT_INSET_DECOR) == 0
- && mForceWindowDrawsStatusBarBackground
+ && mForceWindowDrawsBarBackgrounds
&& mLastTopInset != 0
|| mLastShouldAlwaysConsumeSystemBars;
@@ -1176,21 +1192,63 @@
}
}
+ if (forceConsumingNavBar) {
+ mBackgroundInsets = Insets.of(mLastLeftInset, 0, mLastRightInset, mLastBottomInset);
+ } else {
+ mBackgroundInsets = Insets.NONE;
+ }
+ updateBackgroundDrawable();
+
if (insets != null) {
insets = insets.consumeStableInsets();
}
return insets;
}
- private int calculateStatusBarColor() {
- return calculateStatusBarColor(mWindow.getAttributes().flags,
- mSemiTransparentStatusBarColor, mWindow.mStatusBarColor);
+ /**
+ * Updates the background drawable, applying padding to it in case we {@link #mBackgroundInsets}
+ * are set.
+ */
+ private void updateBackgroundDrawable() {
+ if (mBackgroundInsets.equals(mLastBackgroundInsets)
+ && mLastOriginalBackgroundDrawable == mOriginalBackgroundDrawable) {
+ return;
+ }
+ if (mBackgroundInsets.equals(Insets.NONE)) {
+ setBackground(mOriginalBackgroundDrawable);
+ } else {
+ setBackground(new InsetDrawable(mOriginalBackgroundDrawable,
+ mBackgroundInsets.left, mBackgroundInsets.top,
+ mBackgroundInsets.right, mBackgroundInsets.bottom) {
+
+ /**
+ * Return inner padding so we don't apply the padding again in
+ * {@link DecorView#drawableChanged()}
+ */
+ @Override
+ public boolean getPadding(Rect padding) {
+ return getDrawable().getPadding(padding);
+ }
+ });
+ }
+ mLastBackgroundInsets = mBackgroundInsets;
+ mLastOriginalBackgroundDrawable = mOriginalBackgroundDrawable;
}
- public static int calculateStatusBarColor(int flags, int semiTransparentStatusBarColor,
- int statusBarColor) {
- return (flags & FLAG_TRANSLUCENT_STATUS) != 0 ? semiTransparentStatusBarColor
- : (flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0 ? statusBarColor
+ private int calculateStatusBarColor() {
+ return calculateBarColor(mWindow.getAttributes().flags, FLAG_TRANSLUCENT_STATUS,
+ mSemiTransparentBarColor, mWindow.mStatusBarColor);
+ }
+
+ private int calculateNavigationBarColor() {
+ return calculateBarColor(mWindow.getAttributes().flags, FLAG_TRANSLUCENT_NAVIGATION,
+ mSemiTransparentBarColor, mWindow.mNavigationBarColor);
+ }
+
+ public static int calculateBarColor(int flags, int translucentFlag, int semiTransparentBarColor,
+ int barColor) {
+ return (flags & translucentFlag) != 0 ? semiTransparentBarColor
+ : (flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0 ? barColor
: Color.BLACK;
}
diff --git a/core/java/com/android/internal/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java
index 890ee86..04559e4 100644
--- a/core/java/com/android/internal/policy/PhoneWindow.java
+++ b/core/java/com/android/internal/policy/PhoneWindow.java
@@ -31,7 +31,7 @@
import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT;
import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER;
-import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS;
import android.annotation.NonNull;
import android.annotation.UnsupportedAppUsage;
@@ -2469,8 +2469,8 @@
setFlags(FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS,
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS & ~getForcedWindowFlags());
}
- if (mDecor.mForceWindowDrawsStatusBarBackground) {
- params.privateFlags |= PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND;
+ if (mDecor.mForceWindowDrawsBarBackgrounds) {
+ params.privateFlags |= PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS;
}
}
if (a.getBoolean(R.styleable.Window_windowLightStatusBar, false)) {
diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
index 3437614..5fee2c9 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.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 @@
// ---- 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 0000000..ec2e604
--- /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 0000000..b47ef12
--- /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 e732a8d..cab8be3 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 3d006953..54b68ae 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 2cce9e9..52f5895 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 d3b3d3a..8e51ed2 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 aca4551..04b63af 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/core/res/res/values/config.xml b/core/res/res/values/config.xml
index ec2a6ae..21f5acb 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1302,12 +1302,6 @@
<!-- Disable lockscreen rotation by default -->
<bool name="config_enableLockScreenRotation">false</bool>
- <!-- Enable lockscreen translucent decor by default -->
- <bool name="config_enableLockScreenTranslucentDecor">true</bool>
-
- <!-- Enable translucent decor by default -->
- <bool name="config_enableTranslucentDecor">true</bool>
-
<!-- Is the device capable of hot swapping an UICC Card -->
<bool name="config_hotswapCapable">false</bool>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 3e23640..fb7be77 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1717,8 +1717,6 @@
<java-symbol type="bool" name="config_enableCarDockHomeLaunch" />
<java-symbol type="bool" name="config_enableLockBeforeUnlockScreen" />
<java-symbol type="bool" name="config_enableLockScreenRotation" />
- <java-symbol type="bool" name="config_enableLockScreenTranslucentDecor" />
- <java-symbol type="bool" name="config_enableTranslucentDecor" />
<java-symbol type="bool" name="config_forceShowSystemBars" />
<java-symbol type="bool" name="config_lidControlsScreenLock" />
<java-symbol type="bool" name="config_lidControlsSleep" />
diff --git a/packages/SystemUI/res-keyguard/values/alias.xml b/packages/SystemUI/res-keyguard/values/alias.xml
index 1c63c79..6d49b1f 100644
--- a/packages/SystemUI/res-keyguard/values/alias.xml
+++ b/packages/SystemUI/res-keyguard/values/alias.xml
@@ -28,9 +28,6 @@
<!-- Alias used to reference framework configuration for screen rotation. -->
<item type="bool" name="config_enableLockScreenRotation">@*android:bool/config_enableLockScreenRotation</item>
- <!-- Alias used to reference framework configuration for translucent decor. -->
- <item type="bool" name="config_enableLockScreenTranslucentDecor">@*android:bool/config_enableLockScreenTranslucentDecor</item>
-
<!-- Alias used to reference framework activity duration. -->
<item type="integer" name="config_activityDefaultDur">@*android:integer/config_activityDefaultDur</item>
diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_1.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_1.xml
index 675dfc9..694b0dd 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 c9a7eb8..dcb3fa8 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 a6facae..d68a2f6 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 2eae8f5..886cc35 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 30024dd..0000000
--- 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 cb87cae..3c45761 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 e59e7f4..0000000
--- 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 56ca422..0000000
--- 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 737d5a0..0000000
--- 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 e5b0d1a..0000000
--- 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 5d64570..0000000
--- 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 b3ee86e..0000000
--- 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 012e742..0000000
--- 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 9b919c1..0000000
--- 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 5a61d2a..0000000
--- 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 144af5a..0000000
--- 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 6c9f983..0000000
--- 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 330daa4..0000000
--- 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 c419b90..35cce25 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 a02469e..95a4da6 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 3e40cfc..15df1f1 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 @@
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 @@
// 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 8642ca4..0000000
--- 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 c5751c3..3516279 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 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.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 @@
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 @@
}
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 @@
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 @@
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 @@
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 99269cf..02ee243 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 @@
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 e5defae..b34e24e 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.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.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 @@
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 @@
// 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 @@
// 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 f629863..9db109d 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 @@
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 @@
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 4a69cd7..17d9cbe 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 @@
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/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
index af58b19..c6f6c50 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 @@
/**
* 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 @@
}
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 @@
updateRuleForRestrictPowerUL(uid);
}
updateRulesForPowerRestrictionsUL(uid);
- updateNetworkStats(uid, false);
+ return true;
}
}
+ return false;
}
// adjust stats accounting based on foreground status
@@ -4552,21 +4554,26 @@
}
}
}
-
};
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 @@
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 0493ae90..aaf3df3 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.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 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 @@
// ================================================================================
// 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/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index bbb857f..6ae7720 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -49,7 +49,7 @@
import static android.view.WindowManager.LayoutParams.LAST_SUB_WINDOW;
import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT;
import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
-import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_STATUS_BAR_VISIBLE_TRANSPARENT;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_INHERIT_TRANSLUCENT_DECOR;
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_SCREEN_DECOR;
@@ -211,7 +211,6 @@
private final boolean mCarDockEnablesAccelerometer;
private final boolean mDeskDockEnablesAccelerometer;
- private final boolean mTranslucentDecorEnabled;
private final AccessibilityManager mAccessibilityManager;
private final ImmersiveModeConfirmation mImmersiveModeConfirmation;
private final ScreenshotHelper mScreenshotHelper;
@@ -434,7 +433,6 @@
final Resources r = mContext.getResources();
mCarDockEnablesAccelerometer = r.getBoolean(R.bool.config_carDockEnablesAccelerometer);
mDeskDockEnablesAccelerometer = r.getBoolean(R.bool.config_deskDockEnablesAccelerometer);
- mTranslucentDecorEnabled = r.getBoolean(R.bool.config_enableTranslucentDecor);
mForceShowSystemBarsFromExternal = r.getBoolean(R.bool.config_forceShowSystemBars);
mAccessibilityManager = (AccessibilityManager) mContext.getSystemService(
@@ -1287,14 +1285,12 @@
private static int getImpliedSysUiFlagsForLayout(LayoutParams attrs) {
int impliedFlags = 0;
- if ((attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0) {
- impliedFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
- }
- final boolean forceWindowDrawsStatusBarBackground =
- (attrs.privateFlags & PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND) != 0;
+ final boolean forceWindowDrawsBarBackgrounds =
+ (attrs.privateFlags & PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS) != 0
+ && attrs.height == MATCH_PARENT && attrs.width == MATCH_PARENT;
if ((attrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0
- || forceWindowDrawsStatusBarBackground
- && attrs.height == MATCH_PARENT && attrs.width == MATCH_PARENT) {
+ || forceWindowDrawsBarBackgrounds) {
+ impliedFlags |= View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
impliedFlags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
}
return impliedFlags;
@@ -1396,9 +1392,6 @@
navTranslucent &= !immersiveSticky; // transient trumps translucent
boolean isKeyguardShowing = isStatusBarKeyguard()
&& !mService.mPolicy.isKeyguardOccluded();
- if (!isKeyguardShowing) {
- navTranslucent &= areTranslucentBarsAllowed();
- }
boolean statusBarForcesShowingNavigation = !isKeyguardShowing && mStatusBar != null
&& (mStatusBar.getAttrs().privateFlags
& PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION) != 0;
@@ -1560,9 +1553,6 @@
boolean statusBarTransient = (sysui & View.STATUS_BAR_TRANSIENT) != 0;
boolean statusBarTranslucent = (sysui
& (View.STATUS_BAR_TRANSLUCENT | View.STATUS_BAR_TRANSPARENT)) != 0;
- if (!isKeyguardShowing) {
- statusBarTranslucent &= areTranslucentBarsAllowed();
- }
// If the status bar is hidden, we don't want to cause windows behind it to scroll.
if (mStatusBar.isVisibleLw() && !statusBarTransient) {
@@ -1915,13 +1905,14 @@
&& (fl & FLAG_FULLSCREEN) == 0
&& (fl & FLAG_TRANSLUCENT_STATUS) == 0
&& (fl & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0
- && (pfl & PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND) == 0) {
+ && (pfl & PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS) == 0) {
// Ensure policy decor includes status bar
dcf.top = displayFrames.mStable.top;
}
if ((fl & FLAG_TRANSLUCENT_NAVIGATION) == 0
&& (sysUiFl & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0
- && (fl & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0) {
+ && (fl & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0
+ && (pfl & PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS) == 0) {
// Ensure policy decor includes navigation bar
dcf.bottom = displayFrames.mStable.bottom;
dcf.right = displayFrames.mStable.right;
@@ -3148,6 +3139,8 @@
drawsStatusBarBackground(vis, mTopFullscreenOpaqueWindowState);
final boolean dockedDrawsStatusBarBackground =
drawsStatusBarBackground(dockedVis, mTopDockedOpaqueWindowState);
+ final boolean fullscreenDrawsNavBarBackground =
+ drawsNavigationBarBackground(vis, mTopFullscreenOpaqueWindowState);
// prevent status bar interaction from clearing certain flags
int type = win.getAttrs().type;
@@ -3167,12 +3160,12 @@
if (fullscreenDrawsStatusBarBackground && dockedDrawsStatusBarBackground) {
vis |= View.STATUS_BAR_TRANSPARENT;
vis &= ~View.STATUS_BAR_TRANSLUCENT;
- } else if ((!areTranslucentBarsAllowed() && fullscreenTransWin != mStatusBar)
- || forceOpaqueStatusBar) {
+ } else if (forceOpaqueStatusBar) {
vis &= ~(View.STATUS_BAR_TRANSLUCENT | View.STATUS_BAR_TRANSPARENT);
}
- vis = configureNavBarOpacity(vis, dockedStackVisible, freeformStackVisible, resizing);
+ vis = configureNavBarOpacity(vis, dockedStackVisible, freeformStackVisible, resizing,
+ fullscreenDrawsNavBarBackground);
// update status bar
boolean immersiveSticky =
@@ -3256,8 +3249,9 @@
return vis;
}
- private boolean drawsStatusBarBackground(int vis, WindowState win) {
- if (!mStatusBarController.isTransparentAllowed(win)) {
+ private boolean drawsBarBackground(int vis, WindowState win, BarController controller,
+ int translucentFlag) {
+ if (!controller.isTransparentAllowed(win)) {
return false;
}
if (win == null) {
@@ -3267,9 +3261,17 @@
final boolean drawsSystemBars =
(win.getAttrs().flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0;
final boolean forceDrawsSystemBars =
- (win.getAttrs().privateFlags & PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND) != 0;
+ (win.getAttrs().privateFlags & PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS) != 0;
- return forceDrawsSystemBars || drawsSystemBars && (vis & View.STATUS_BAR_TRANSLUCENT) == 0;
+ return forceDrawsSystemBars || drawsSystemBars && (vis & translucentFlag) == 0;
+ }
+
+ private boolean drawsStatusBarBackground(int vis, WindowState win) {
+ return drawsBarBackground(vis, win, mStatusBarController, FLAG_TRANSLUCENT_STATUS);
+ }
+
+ private boolean drawsNavigationBarBackground(int vis, WindowState win) {
+ return drawsBarBackground(vis, win, mNavigationBarController, FLAG_TRANSLUCENT_NAVIGATION);
}
/**
@@ -3277,10 +3279,13 @@
* on the nav bar opacity rules chosen by {@link #mNavBarOpacityMode}.
*/
private int configureNavBarOpacity(int visibility, boolean dockedStackVisible,
- boolean freeformStackVisible, boolean isDockedDividerResizing) {
+ boolean freeformStackVisible, boolean isDockedDividerResizing,
+ boolean fullscreenDrawsBackground) {
if (mNavBarOpacityMode == NAV_BAR_OPAQUE_WHEN_FREEFORM_OR_DOCKED) {
if (dockedStackVisible || freeformStackVisible || isDockedDividerResizing) {
visibility = setNavBarOpaqueFlag(visibility);
+ } else if (fullscreenDrawsBackground) {
+ visibility = setNavBarTransparentFlag(visibility);
}
} else if (mNavBarOpacityMode == NAV_BAR_TRANSLUCENT_WHEN_FREEFORM_OPAQUE_OTHERWISE) {
if (isDockedDividerResizing) {
@@ -3292,9 +3297,6 @@
}
}
- if (!areTranslucentBarsAllowed()) {
- visibility &= ~View.NAVIGATION_BAR_TRANSLUCENT;
- }
return visibility;
}
@@ -3307,6 +3309,11 @@
return visibility | View.NAVIGATION_BAR_TRANSLUCENT;
}
+ private int setNavBarTransparentFlag(int visibility) {
+ visibility &= ~View.NAVIGATION_BAR_TRANSLUCENT;
+ return visibility | View.NAVIGATION_BAR_TRANSPARENT;
+ }
+
private void clearClearableFlagsLw() {
int newVal = mResettingSystemUiFlags | View.SYSTEM_UI_CLEARABLE_FLAGS;
if (newVal != mResettingSystemUiFlags) {
@@ -3338,16 +3345,6 @@
return (systemUiFlags & disableNavigationBar) == disableNavigationBar;
}
- /**
- * @return whether the navigation or status bar can be made translucent
- *
- * This should return true unless touch exploration is not enabled or
- * R.boolean.config_enableTranslucentDecor is false.
- */
- private boolean areTranslucentBarsAllowed() {
- return mTranslucentDecorEnabled;
- }
-
boolean shouldRotateSeamlessly(DisplayRotation displayRotation, int oldRotation,
int newRotation) {
// For the upside down rotation we don't rotate seamlessly as the navigation
diff --git a/services/core/java/com/android/server/wm/TaskSnapshotSurface.java b/services/core/java/com/android/server/wm/TaskSnapshotSurface.java
index dafed9e..39b5662 100644
--- a/services/core/java/com/android/server/wm/TaskSnapshotSurface.java
+++ b/services/core/java/com/android/server/wm/TaskSnapshotSurface.java
@@ -29,8 +29,10 @@
import static android.view.WindowManager.LayoutParams.FLAG_SECURE;
import static android.view.WindowManager.LayoutParams.FLAG_SLIPPERY;
import static android.view.WindowManager.LayoutParams.FLAG_SPLIT_TOUCH;
+import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION;
+import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
import static android.view.WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;
-import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
import static com.android.internal.policy.DecorView.NAVIGATION_BAR_COLOR_VIEW_ATTRIBUTES;
@@ -104,7 +106,7 @@
| FLAG_SCALED
| FLAG_SECURE;
- private static final int PRIVATE_FLAG_INHERITS = PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND;
+ private static final int PRIVATE_FLAG_INHERITS = PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS;
private static final String TAG = TAG_WITH_CLASS_NAME ? "SnapshotStartingWindow" : TAG_WM;
private static final int MSG_REPORT_DRAW = 0;
@@ -493,10 +495,12 @@
mWindowPrivateFlags = windowPrivateFlags;
mSysUiVis = sysUiVis;
final Context context = ActivityThread.currentActivityThread().getSystemUiContext();
- mStatusBarColor = DecorView.calculateStatusBarColor(windowFlags,
- context.getColor(R.color.system_bar_background_semi_transparent),
- statusBarColor);
- mNavigationBarColor = navigationBarColor;
+ final int semiTransparent = context.getColor(
+ R.color.system_bar_background_semi_transparent);
+ mStatusBarColor = DecorView.calculateBarColor(windowFlags, FLAG_TRANSLUCENT_STATUS,
+ semiTransparent, statusBarColor);
+ mNavigationBarColor = DecorView.calculateBarColor(windowFlags,
+ FLAG_TRANSLUCENT_NAVIGATION, semiTransparent, navigationBarColor);
mStatusBarPaint.setColor(mStatusBarColor);
mNavigationBarPaint.setColor(navigationBarColor);
}
@@ -507,10 +511,10 @@
}
int getStatusBarColorViewHeight() {
- final boolean forceStatusBarBackground =
- (mWindowPrivateFlags & PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND) != 0;
+ final boolean forceBarBackground =
+ (mWindowPrivateFlags & PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS) != 0;
if (STATUS_BAR_COLOR_VIEW_ATTRIBUTES.isVisible(
- mSysUiVis, mStatusBarColor, mWindowFlags, forceStatusBarBackground)) {
+ mSysUiVis, mStatusBarColor, mWindowFlags, forceBarBackground)) {
return getColorViewTopInset(mStableInsets.top, mContentInsets.top);
} else {
return 0;
@@ -518,8 +522,10 @@
}
private boolean isNavigationBarColorViewVisible() {
+ final boolean forceBarBackground =
+ (mWindowPrivateFlags & PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS) != 0;
return NAVIGATION_BAR_COLOR_VIEW_ATTRIBUTES.isVisible(
- mSysUiVis, mNavigationBarColor, mWindowFlags, false /* force */);
+ mSysUiVis, mNavigationBarColor, mWindowFlags, forceBarBackground);
}
void drawDecors(Canvas c, @Nullable Rect alreadyDrawnFrame) {
diff --git a/services/net/java/android/net/ipmemorystore/OnBlobRetrievedListener.java b/services/net/java/android/net/ipmemorystore/OnBlobRetrievedListener.java
index 9685ff6..22978a2 100644
--- a/services/net/java/android/net/ipmemorystore/OnBlobRetrievedListener.java
+++ b/services/net/java/android/net/ipmemorystore/OnBlobRetrievedListener.java
@@ -30,12 +30,15 @@
/** Converts this OnBlobRetrievedListener to a parcelable object */
@NonNull
- static IOnBlobRetrievedListener toAIDL(final OnBlobRetrievedListener listener) {
+ static IOnBlobRetrievedListener toAIDL(@NonNull final OnBlobRetrievedListener listener) {
return new IOnBlobRetrievedListener.Stub() {
@Override
public void onBlobRetrieved(final StatusParcelable statusParcelable, final String l2Key,
final String name, final Blob blob) {
- listener.onBlobRetrieved(new Status(statusParcelable), l2Key, name, blob);
+ // NonNull, but still don't crash the system server if null
+ if (null != listener) {
+ listener.onBlobRetrieved(new Status(statusParcelable), l2Key, name, blob);
+ }
}
};
}
diff --git a/services/net/java/android/net/ipmemorystore/OnL2KeyResponseListener.java b/services/net/java/android/net/ipmemorystore/OnL2KeyResponseListener.java
index 80209c5..9e7c1c8 100644
--- a/services/net/java/android/net/ipmemorystore/OnL2KeyResponseListener.java
+++ b/services/net/java/android/net/ipmemorystore/OnL2KeyResponseListener.java
@@ -30,12 +30,15 @@
/** Converts this OnL2KeyResponseListener to a parcelable object */
@NonNull
- static IOnL2KeyResponseListener toAIDL(final OnL2KeyResponseListener listener) {
+ static IOnL2KeyResponseListener toAIDL(@NonNull final OnL2KeyResponseListener listener) {
return new IOnL2KeyResponseListener.Stub() {
@Override
public void onL2KeyResponse(final StatusParcelable statusParcelable,
final String l2Key) {
- listener.onL2KeyResponse(new Status(statusParcelable), l2Key);
+ // NonNull, but still don't crash the system server if null
+ if (null != listener) {
+ listener.onL2KeyResponse(new Status(statusParcelable), l2Key);
+ }
}
};
}
diff --git a/services/net/java/android/net/ipmemorystore/OnNetworkAttributesRetrievedListener.java b/services/net/java/android/net/ipmemorystore/OnNetworkAttributesRetrievedListener.java
index f0f6f40..59da268 100644
--- a/services/net/java/android/net/ipmemorystore/OnNetworkAttributesRetrievedListener.java
+++ b/services/net/java/android/net/ipmemorystore/OnNetworkAttributesRetrievedListener.java
@@ -31,15 +31,18 @@
/** Converts this OnNetworkAttributesRetrievedListener to a parcelable object */
@NonNull
static IOnNetworkAttributesRetrievedListener toAIDL(
- final OnNetworkAttributesRetrievedListener listener) {
+ @NonNull final OnNetworkAttributesRetrievedListener listener) {
return new IOnNetworkAttributesRetrievedListener.Stub() {
@Override
public void onNetworkAttributesRetrieved(final StatusParcelable statusParcelable,
final String l2Key,
final NetworkAttributesParcelable networkAttributesParcelable) {
- listener.onNetworkAttributesRetrieved(
- new Status(statusParcelable), l2Key,
- new NetworkAttributes(networkAttributesParcelable));
+ // NonNull, but still don't crash the system server if null
+ if (null != listener) {
+ listener.onNetworkAttributesRetrieved(
+ new Status(statusParcelable), l2Key,
+ new NetworkAttributes(networkAttributesParcelable));
+ }
}
};
}
diff --git a/services/net/java/android/net/ipmemorystore/OnSameL3NetworkResponseListener.java b/services/net/java/android/net/ipmemorystore/OnSameL3NetworkResponseListener.java
index ba1e0e6..0154fd2 100644
--- a/services/net/java/android/net/ipmemorystore/OnSameL3NetworkResponseListener.java
+++ b/services/net/java/android/net/ipmemorystore/OnSameL3NetworkResponseListener.java
@@ -30,14 +30,18 @@
/** Converts this OnSameL3NetworkResponseListener to a parcelable object */
@NonNull
- static IOnSameL3NetworkResponseListener toAIDL(final OnSameL3NetworkResponseListener listener) {
+ static IOnSameL3NetworkResponseListener toAIDL(
+ @NonNull final OnSameL3NetworkResponseListener listener) {
return new IOnSameL3NetworkResponseListener.Stub() {
@Override
public void onSameL3NetworkResponse(final StatusParcelable statusParcelable,
final SameL3NetworkResponseParcelable sameL3NetworkResponseParcelable) {
- listener.onSameL3NetworkResponse(
- new Status(statusParcelable),
- new SameL3NetworkResponse(sameL3NetworkResponseParcelable));
+ // NonNull, but still don't crash the system server if null
+ if (null != listener) {
+ listener.onSameL3NetworkResponse(
+ new Status(statusParcelable),
+ new SameL3NetworkResponse(sameL3NetworkResponseParcelable));
+ }
}
};
}
diff --git a/services/net/java/android/net/ipmemorystore/OnStatusListener.java b/services/net/java/android/net/ipmemorystore/OnStatusListener.java
index 0de1666..824b7b0 100644
--- a/services/net/java/android/net/ipmemorystore/OnStatusListener.java
+++ b/services/net/java/android/net/ipmemorystore/OnStatusListener.java
@@ -17,6 +17,7 @@
package android.net.ipmemorystore;
import android.annotation.NonNull;
+import android.annotation.Nullable;
/**
* A listener for the IpMemoryStore to return a status to a client.
@@ -30,11 +31,13 @@
/** Converts this OnStatusListener to a parcelable object */
@NonNull
- static IOnStatusListener toAIDL(final OnStatusListener listener) {
+ static IOnStatusListener toAIDL(@Nullable final OnStatusListener listener) {
return new IOnStatusListener.Stub() {
@Override
public void onComplete(final StatusParcelable statusParcelable) {
- listener.onComplete(new Status(statusParcelable));
+ if (null != listener) {
+ listener.onComplete(new Status(statusParcelable));
+ }
}
};
}
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 46d0761..231025c 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 @@
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/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java
index 03969da..e90f094 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayPolicyLayoutTests.java
@@ -27,7 +27,7 @@
import static android.view.WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_NEVER;
-import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND;
+import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS;
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_NOTHING;
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION;
@@ -142,20 +142,20 @@
}
@Test
- public void layoutWindowLw_appWontDrawBars_forceStatus() throws Exception {
+ public void layoutWindowLw_appWontDrawBars_forceStatusAndNav() throws Exception {
synchronized (mWm.mGlobalLock) {
mWindow.mAttrs.flags &= ~FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS;
- mWindow.mAttrs.privateFlags |= PRIVATE_FLAG_FORCE_DRAW_STATUS_BAR_BACKGROUND;
+ mWindow.mAttrs.privateFlags |= PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS;
addWindow(mWindow);
mDisplayPolicy.beginLayoutLw(mFrames, 0 /* UI mode */);
mDisplayPolicy.layoutWindowLw(mWindow, null, mFrames);
- assertInsetByTopBottom(mWindow.getParentFrame(), 0, NAV_BAR_HEIGHT);
+ assertInsetByTopBottom(mWindow.getParentFrame(), 0, 0);
assertInsetByTopBottom(mWindow.getStableFrameLw(), STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT);
assertInsetByTopBottom(mWindow.getContentFrameLw(), STATUS_BAR_HEIGHT, NAV_BAR_HEIGHT);
- assertInsetByTopBottom(mWindow.getDecorFrame(), 0, NAV_BAR_HEIGHT);
- assertInsetByTopBottom(mWindow.getDisplayFrameLw(), 0, NAV_BAR_HEIGHT);
+ assertInsetByTopBottom(mWindow.getDecorFrame(), 0, 0);
+ assertInsetByTopBottom(mWindow.getDisplayFrameLw(), 0, 0);
}
}