Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/GlobalActionsPanelPlugin.java +10 −0 Original line number Diff line number Diff line Loading @@ -16,7 +16,9 @@ package com.android.systemui.plugins; import android.annotation.Nullable; import android.app.PendingIntent; import android.graphics.drawable.Drawable; import android.view.View; import com.android.systemui.plugins.annotations.DependsOn; Loading Loading @@ -98,5 +100,13 @@ public interface GlobalActionsPanelPlugin extends Plugin { * Invoked when the device is either locked or unlocked. */ void onDeviceLockStateChanged(boolean locked); /** * Optionally returns a drawable to be used as the background for Global Actions. */ @Nullable default Drawable getBackgroundDrawable() { return null; } } } packages/SystemUI/res/drawable/global_action_panel_scrim.xmldeleted 100644 → 0 +0 −26 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ 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 --> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:centerY="0.45" android:startColor="#dc3c4043" android:centerColor="#dc3c4043" android:endColor="#4d3c4043" android:angle="270" /> </shape> No newline at end of file packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +7 −9 Original line number Diff line number Diff line Loading @@ -1576,6 +1576,8 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, new ViewGroup.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); mBackgroundDrawable = mPanelController.getBackgroundDrawable(); mScrimAlpha = 1f; } } Loading @@ -1595,16 +1597,12 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, mGlobalActionsLayout.setRotationListener(this::onRotate); mGlobalActionsLayout.setAdapter(mAdapter); if (!shouldUsePanel()) { if (shouldUsePanel()) { initializePanel(); } if (mBackgroundDrawable == null) { mBackgroundDrawable = new ScrimDrawable(); } mScrimAlpha = ScrimController.GRADIENT_SCRIM_ALPHA; } else { mBackgroundDrawable = mContext.getDrawable( com.android.systemui.R.drawable.global_action_panel_scrim); mScrimAlpha = 1f; initializePanel(); } getWindow().setBackgroundDrawable(mBackgroundDrawable); } Loading Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/GlobalActionsPanelPlugin.java +10 −0 Original line number Diff line number Diff line Loading @@ -16,7 +16,9 @@ package com.android.systemui.plugins; import android.annotation.Nullable; import android.app.PendingIntent; import android.graphics.drawable.Drawable; import android.view.View; import com.android.systemui.plugins.annotations.DependsOn; Loading Loading @@ -98,5 +100,13 @@ public interface GlobalActionsPanelPlugin extends Plugin { * Invoked when the device is either locked or unlocked. */ void onDeviceLockStateChanged(boolean locked); /** * Optionally returns a drawable to be used as the background for Global Actions. */ @Nullable default Drawable getBackgroundDrawable() { return null; } } }
packages/SystemUI/res/drawable/global_action_panel_scrim.xmldeleted 100644 → 0 +0 −26 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ 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 --> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:centerY="0.45" android:startColor="#dc3c4043" android:centerColor="#dc3c4043" android:endColor="#4d3c4043" android:angle="270" /> </shape> No newline at end of file
packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +7 −9 Original line number Diff line number Diff line Loading @@ -1576,6 +1576,8 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, new ViewGroup.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); mBackgroundDrawable = mPanelController.getBackgroundDrawable(); mScrimAlpha = 1f; } } Loading @@ -1595,16 +1597,12 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, mGlobalActionsLayout.setRotationListener(this::onRotate); mGlobalActionsLayout.setAdapter(mAdapter); if (!shouldUsePanel()) { if (shouldUsePanel()) { initializePanel(); } if (mBackgroundDrawable == null) { mBackgroundDrawable = new ScrimDrawable(); } mScrimAlpha = ScrimController.GRADIENT_SCRIM_ALPHA; } else { mBackgroundDrawable = mContext.getDrawable( com.android.systemui.R.drawable.global_action_panel_scrim); mScrimAlpha = 1f; initializePanel(); } getWindow().setBackgroundDrawable(mBackgroundDrawable); } Loading