Loading core/java/android/view/View.java +8 −1 Original line number Diff line number Diff line Loading @@ -2772,10 +2772,17 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ public static final int NAVIGATION_BAR_TRANSLUCENT = 0x80000000; /** * @hide * * Makes system ui transparent. */ public static final int SYSTEM_UI_TRANSPARENT = 0x00008000; /** * @hide */ public static final int PUBLIC_STATUS_BAR_VISIBILITY_MASK = 0x0000FFFF; public static final int PUBLIC_STATUS_BAR_VISIBILITY_MASK = 0x00007FFF; /** * These are the system UI flags that can be cleared by events outside Loading core/java/android/view/Window.java +17 −30 Original line number Diff line number Diff line Loading @@ -642,9 +642,7 @@ public abstract class Window { final WindowManager.LayoutParams attrs = getAttributes(); attrs.width = width; attrs.height = height; if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } /** Loading @@ -661,9 +659,7 @@ public abstract class Window { { final WindowManager.LayoutParams attrs = getAttributes(); attrs.gravity = gravity; if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } /** Loading @@ -675,9 +671,7 @@ public abstract class Window { public void setType(int type) { final WindowManager.LayoutParams attrs = getAttributes(); attrs.type = type; if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } /** Loading @@ -700,9 +694,7 @@ public abstract class Window { attrs.format = mDefaultWindowFormat; mHaveWindowFormat = false; } if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } /** Loading @@ -715,9 +707,7 @@ public abstract class Window { public void setWindowAnimations(int resId) { final WindowManager.LayoutParams attrs = getAttributes(); attrs.windowAnimations = resId; if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } /** Loading @@ -735,9 +725,7 @@ public abstract class Window { } else { mHasSoftInputMode = false; } if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } /** Loading Loading @@ -793,14 +781,19 @@ public abstract class Window { attrs.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SET_NEEDS_MENU_KEY; } mForcedWindowFlags |= mask; if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } private void setPrivateFlags(int flags, int mask) { final WindowManager.LayoutParams attrs = getAttributes(); attrs.privateFlags = (attrs.privateFlags & ~mask) | (flags & mask); dispatchWindowAttributesChanged(attrs); } /** * {@hide} */ protected void dispatchWindowAttributesChanged(WindowManager.LayoutParams attrs) { if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } Loading @@ -818,9 +811,7 @@ public abstract class Window { final WindowManager.LayoutParams attrs = getAttributes(); attrs.dimAmount = amount; mHaveDimAmount = true; if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } /** Loading @@ -835,9 +826,7 @@ public abstract class Window { */ public void setAttributes(WindowManager.LayoutParams a) { mWindowAttributes.copyFrom(a); if (mCallback != null) { mCallback.onWindowAttributesChanged(mWindowAttributes); } dispatchWindowAttributesChanged(mWindowAttributes); } /** Loading Loading @@ -1269,9 +1258,7 @@ public abstract class Window { if (!mHaveWindowFormat) { final WindowManager.LayoutParams attrs = getAttributes(); attrs.format = format; if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } } Loading packages/SystemUI/res/values/colors.xml +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ <drawable name="system_bar_background">@color/system_bar_background_opaque</drawable> <color name="system_bar_background_opaque">#ff000000</color> <color name="system_bar_background_semi_transparent">#66000000</color> <!-- 40% black --> <color name="system_bar_background_transparent">#00000000</color> <color name="notification_panel_solid_background">#ff000000</color> <drawable name="status_bar_recents_app_thumbnail_background">#88000000</drawable> <color name="status_bar_recents_app_label_color">#ffffffff</color> Loading packages/SystemUI/res/values/styles.xml +3 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,9 @@ <!-- Alternate Recents theme --> <style name="RecentsTheme" parent="@android:style/Theme.DeviceDefault.Wallpaper.NoTitleBar"> <item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentNavigation">true</item> <item name="android:statusBarColor">@android:color/transparent</item> <item name="android:navigationBarColor">@android:color/transparent</item> <item name="android:windowDrawsSystemBarBackgrounds">true</item> <item name="android:windowAnimationStyle">@style/Animation.RecentsActivity</item> </style> Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java +10 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ public class BarTransitions { public static final int MODE_SEMI_TRANSPARENT = 1; public static final int MODE_TRANSLUCENT = 2; public static final int MODE_LIGHTS_OUT = 3; public static final int MODE_TRANSPARENT = 4; public static final int LIGHTS_IN_DURATION = 250; public static final int LIGHTS_OUT_DURATION = 750; Loading @@ -69,7 +70,8 @@ public class BarTransitions { public void transitionTo(int mode, boolean animate) { // low-end devices do not support translucent modes, fallback to opaque if (!HIGH_END && (mode == MODE_SEMI_TRANSPARENT || mode == MODE_TRANSLUCENT)) { if (!HIGH_END && (mode == MODE_SEMI_TRANSPARENT || mode == MODE_TRANSLUCENT || mode == MODE_TRANSPARENT)) { mode = MODE_OPAQUE; } if (mMode == mode) return; Loading Loading @@ -97,6 +99,7 @@ public class BarTransitions { if (mode == MODE_SEMI_TRANSPARENT) return "MODE_SEMI_TRANSPARENT"; if (mode == MODE_TRANSLUCENT) return "MODE_TRANSLUCENT"; if (mode == MODE_LIGHTS_OUT) return "MODE_LIGHTS_OUT"; if (mode == MODE_TRANSPARENT) return "MODE_TRANSPARENT"; throw new IllegalArgumentException("Unknown mode " + mode); } Loading @@ -111,6 +114,7 @@ public class BarTransitions { private static class BarBackgroundDrawable extends Drawable { private final int mOpaque; private final int mSemiTransparent; private final int mTransparent; private final Drawable mGradient; private final TimeInterpolator mInterpolator; Loading @@ -130,9 +134,11 @@ public class BarTransitions { if (DEBUG_COLORS) { mOpaque = 0xff0000ff; mSemiTransparent = 0x7f0000ff; mTransparent = 0x2f0000ff; } else { mOpaque = res.getColor(R.color.system_bar_background_opaque); mSemiTransparent = res.getColor(R.color.system_bar_background_semi_transparent); mTransparent = res.getColor(R.color.system_bar_background_transparent); } mGradient = res.getDrawable(gradientResourceId); mInterpolator = new LinearInterpolator(); Loading Loading @@ -184,9 +190,11 @@ public class BarTransitions { public void draw(Canvas canvas) { int targetGradientAlpha = 0, targetColor = 0; if (mMode == MODE_TRANSLUCENT) { targetGradientAlpha = 0xff; targetColor = mSemiTransparent; } else if (mMode == MODE_SEMI_TRANSPARENT) { targetColor = mSemiTransparent; } else if (mMode == MODE_TRANSPARENT) { targetColor = mTransparent; } else { targetColor = mOpaque; } Loading Loading
core/java/android/view/View.java +8 −1 Original line number Diff line number Diff line Loading @@ -2772,10 +2772,17 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ public static final int NAVIGATION_BAR_TRANSLUCENT = 0x80000000; /** * @hide * * Makes system ui transparent. */ public static final int SYSTEM_UI_TRANSPARENT = 0x00008000; /** * @hide */ public static final int PUBLIC_STATUS_BAR_VISIBILITY_MASK = 0x0000FFFF; public static final int PUBLIC_STATUS_BAR_VISIBILITY_MASK = 0x00007FFF; /** * These are the system UI flags that can be cleared by events outside Loading
core/java/android/view/Window.java +17 −30 Original line number Diff line number Diff line Loading @@ -642,9 +642,7 @@ public abstract class Window { final WindowManager.LayoutParams attrs = getAttributes(); attrs.width = width; attrs.height = height; if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } /** Loading @@ -661,9 +659,7 @@ public abstract class Window { { final WindowManager.LayoutParams attrs = getAttributes(); attrs.gravity = gravity; if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } /** Loading @@ -675,9 +671,7 @@ public abstract class Window { public void setType(int type) { final WindowManager.LayoutParams attrs = getAttributes(); attrs.type = type; if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } /** Loading @@ -700,9 +694,7 @@ public abstract class Window { attrs.format = mDefaultWindowFormat; mHaveWindowFormat = false; } if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } /** Loading @@ -715,9 +707,7 @@ public abstract class Window { public void setWindowAnimations(int resId) { final WindowManager.LayoutParams attrs = getAttributes(); attrs.windowAnimations = resId; if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } /** Loading @@ -735,9 +725,7 @@ public abstract class Window { } else { mHasSoftInputMode = false; } if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } /** Loading Loading @@ -793,14 +781,19 @@ public abstract class Window { attrs.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SET_NEEDS_MENU_KEY; } mForcedWindowFlags |= mask; if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } private void setPrivateFlags(int flags, int mask) { final WindowManager.LayoutParams attrs = getAttributes(); attrs.privateFlags = (attrs.privateFlags & ~mask) | (flags & mask); dispatchWindowAttributesChanged(attrs); } /** * {@hide} */ protected void dispatchWindowAttributesChanged(WindowManager.LayoutParams attrs) { if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } Loading @@ -818,9 +811,7 @@ public abstract class Window { final WindowManager.LayoutParams attrs = getAttributes(); attrs.dimAmount = amount; mHaveDimAmount = true; if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } /** Loading @@ -835,9 +826,7 @@ public abstract class Window { */ public void setAttributes(WindowManager.LayoutParams a) { mWindowAttributes.copyFrom(a); if (mCallback != null) { mCallback.onWindowAttributesChanged(mWindowAttributes); } dispatchWindowAttributesChanged(mWindowAttributes); } /** Loading Loading @@ -1269,9 +1258,7 @@ public abstract class Window { if (!mHaveWindowFormat) { final WindowManager.LayoutParams attrs = getAttributes(); attrs.format = format; if (mCallback != null) { mCallback.onWindowAttributesChanged(attrs); } dispatchWindowAttributesChanged(attrs); } } Loading
packages/SystemUI/res/values/colors.xml +1 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ <drawable name="system_bar_background">@color/system_bar_background_opaque</drawable> <color name="system_bar_background_opaque">#ff000000</color> <color name="system_bar_background_semi_transparent">#66000000</color> <!-- 40% black --> <color name="system_bar_background_transparent">#00000000</color> <color name="notification_panel_solid_background">#ff000000</color> <drawable name="status_bar_recents_app_thumbnail_background">#88000000</drawable> <color name="status_bar_recents_app_label_color">#ffffffff</color> Loading
packages/SystemUI/res/values/styles.xml +3 −2 Original line number Diff line number Diff line Loading @@ -22,8 +22,9 @@ <!-- Alternate Recents theme --> <style name="RecentsTheme" parent="@android:style/Theme.DeviceDefault.Wallpaper.NoTitleBar"> <item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentNavigation">true</item> <item name="android:statusBarColor">@android:color/transparent</item> <item name="android:navigationBarColor">@android:color/transparent</item> <item name="android:windowDrawsSystemBarBackgrounds">true</item> <item name="android:windowAnimationStyle">@style/Animation.RecentsActivity</item> </style> Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/BarTransitions.java +10 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ public class BarTransitions { public static final int MODE_SEMI_TRANSPARENT = 1; public static final int MODE_TRANSLUCENT = 2; public static final int MODE_LIGHTS_OUT = 3; public static final int MODE_TRANSPARENT = 4; public static final int LIGHTS_IN_DURATION = 250; public static final int LIGHTS_OUT_DURATION = 750; Loading @@ -69,7 +70,8 @@ public class BarTransitions { public void transitionTo(int mode, boolean animate) { // low-end devices do not support translucent modes, fallback to opaque if (!HIGH_END && (mode == MODE_SEMI_TRANSPARENT || mode == MODE_TRANSLUCENT)) { if (!HIGH_END && (mode == MODE_SEMI_TRANSPARENT || mode == MODE_TRANSLUCENT || mode == MODE_TRANSPARENT)) { mode = MODE_OPAQUE; } if (mMode == mode) return; Loading Loading @@ -97,6 +99,7 @@ public class BarTransitions { if (mode == MODE_SEMI_TRANSPARENT) return "MODE_SEMI_TRANSPARENT"; if (mode == MODE_TRANSLUCENT) return "MODE_TRANSLUCENT"; if (mode == MODE_LIGHTS_OUT) return "MODE_LIGHTS_OUT"; if (mode == MODE_TRANSPARENT) return "MODE_TRANSPARENT"; throw new IllegalArgumentException("Unknown mode " + mode); } Loading @@ -111,6 +114,7 @@ public class BarTransitions { private static class BarBackgroundDrawable extends Drawable { private final int mOpaque; private final int mSemiTransparent; private final int mTransparent; private final Drawable mGradient; private final TimeInterpolator mInterpolator; Loading @@ -130,9 +134,11 @@ public class BarTransitions { if (DEBUG_COLORS) { mOpaque = 0xff0000ff; mSemiTransparent = 0x7f0000ff; mTransparent = 0x2f0000ff; } else { mOpaque = res.getColor(R.color.system_bar_background_opaque); mSemiTransparent = res.getColor(R.color.system_bar_background_semi_transparent); mTransparent = res.getColor(R.color.system_bar_background_transparent); } mGradient = res.getDrawable(gradientResourceId); mInterpolator = new LinearInterpolator(); Loading Loading @@ -184,9 +190,11 @@ public class BarTransitions { public void draw(Canvas canvas) { int targetGradientAlpha = 0, targetColor = 0; if (mMode == MODE_TRANSLUCENT) { targetGradientAlpha = 0xff; targetColor = mSemiTransparent; } else if (mMode == MODE_SEMI_TRANSPARENT) { targetColor = mSemiTransparent; } else if (mMode == MODE_TRANSPARENT) { targetColor = mTransparent; } else { targetColor = mOpaque; } Loading