Loading packages/SystemUI/res/layout/bubble_expanded_view.xml +8 −6 Original line number Diff line number Diff line Loading @@ -33,13 +33,15 @@ android:layout_height="wrap_content" android:animateLayoutChanges="true"> <ImageView <com.android.systemui.statusbar.AlphaOptimizedButton style="@android:style/Widget.Material.Button.Borderless" android:id="@+id/settings_button" android:layout_width="@dimen/bubble_header_icon_size" android:layout_height="@dimen/bubble_header_icon_size" android:src="@drawable/ic_settings" android:scaleType="center" android:layout_gravity="end"/> android:layout_gravity="end" android:layout_width="wrap_content" android:layout_height="wrap_content" android:focusable="true" android:text="@string/manage_bubbles_text" android:textColor="?attr/wallpaperTextColor"/> <include layout="@layout/bubble_permission_view" android:id="@+id/permission_layout" Loading packages/SystemUI/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2414,6 +2414,8 @@ <!-- Text for asking the user whether bubbles (floating app content) should be enabled for an app. [CHAR LIMIT=NONE] --> <string name="bubbles_prompt">Allow bubbles from <xliff:g id="app_name" example="YouTube">%1$s</xliff:g>?</string> <!-- The text for the manage bubbles link. [CHAR LIMIT=NONE] --> <string name="manage_bubbles_text">Manage</string> <!-- Text used for button allowing user to opt out of bubbles [CHAR LIMIT=20] --> <string name="no_bubbles">Deny</string> <!-- Text used for button allowing user to approve / enable bubbles [CHAR LIMIT=20] --> Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +4 −20 Original line number Diff line number Diff line Loading @@ -40,11 +40,8 @@ import android.content.res.TypedArray; import android.graphics.Color; import android.graphics.Insets; import android.graphics.Point; import android.graphics.drawable.AdaptiveIconDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.InsetDrawable; import android.graphics.drawable.ShapeDrawable; import android.os.RemoteException; import android.os.ServiceManager; Loading @@ -66,6 +63,7 @@ import com.android.systemui.Dependency; import com.android.systemui.Interpolators; import com.android.systemui.R; import com.android.systemui.recents.TriangleShape; import com.android.systemui.statusbar.AlphaOptimizedButton; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.stack.ExpandableViewState; Loading @@ -80,7 +78,7 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList private View mPointerView; private int mPointerMargin; private ImageView mSettingsIcon; private AlphaOptimizedButton mSettingsIcon; // Permission view private View mPermissionView; Loading @@ -100,8 +98,6 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList private int mSettingsIconHeight; private int mBubbleHeight; private int mPermissionHeight; private int mIconInset; private Drawable mSettingsIconDrawable; private int mPointerWidth; private int mPointerHeight; Loading Loading @@ -218,10 +214,7 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList mSettingsIconHeight = getContext().getResources().getDimensionPixelSize( R.dimen.bubble_expanded_header_height); mSettingsIcon = findViewById(R.id.settings_button); mIconInset = getResources().getDimensionPixelSize(R.dimen.bubble_icon_inset); mSettingsIcon.setOnClickListener(this); // Save initial drawable to create adaptive icons that will take its place. mSettingsIconDrawable = mSettingsIcon.getDrawable(); mPermissionHeight = getContext().getResources().getDimensionPixelSize( R.dimen.bubble_permission_height); Loading Loading @@ -377,16 +370,6 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList int foregroundColor = ta.getColor(1, Color.BLACK /* default */); ta.recycle(); // Must clear tint first - otherwise tint updates inconsistently. mSettingsIconDrawable.setTintList(null); mSettingsIconDrawable.setTint(foregroundColor); InsetDrawable foreground = new InsetDrawable(mSettingsIconDrawable, mIconInset); ColorDrawable background = new ColorDrawable(backgroundColor); AdaptiveIconDrawable adaptiveIcon = new AdaptiveIconDrawable(background, foreground); mSettingsIcon.setImageDrawable(adaptiveIcon); // Update permission prompt color. mPermissionView.setBackground(createPermissionBackground(backgroundColor)); mPermissionPrompt.setTextColor(foregroundColor); Loading Loading @@ -649,11 +632,12 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList } private Intent getSettingsIntent(String packageName, final int appUid) { final Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS); final Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_BUBBLE_SETTINGS); intent.putExtra(Settings.EXTRA_APP_PACKAGE, packageName); intent.putExtra(Settings.EXTRA_APP_UID, appUid); intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); return intent; } Loading Loading
packages/SystemUI/res/layout/bubble_expanded_view.xml +8 −6 Original line number Diff line number Diff line Loading @@ -33,13 +33,15 @@ android:layout_height="wrap_content" android:animateLayoutChanges="true"> <ImageView <com.android.systemui.statusbar.AlphaOptimizedButton style="@android:style/Widget.Material.Button.Borderless" android:id="@+id/settings_button" android:layout_width="@dimen/bubble_header_icon_size" android:layout_height="@dimen/bubble_header_icon_size" android:src="@drawable/ic_settings" android:scaleType="center" android:layout_gravity="end"/> android:layout_gravity="end" android:layout_width="wrap_content" android:layout_height="wrap_content" android:focusable="true" android:text="@string/manage_bubbles_text" android:textColor="?attr/wallpaperTextColor"/> <include layout="@layout/bubble_permission_view" android:id="@+id/permission_layout" Loading
packages/SystemUI/res/values/strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -2414,6 +2414,8 @@ <!-- Text for asking the user whether bubbles (floating app content) should be enabled for an app. [CHAR LIMIT=NONE] --> <string name="bubbles_prompt">Allow bubbles from <xliff:g id="app_name" example="YouTube">%1$s</xliff:g>?</string> <!-- The text for the manage bubbles link. [CHAR LIMIT=NONE] --> <string name="manage_bubbles_text">Manage</string> <!-- Text used for button allowing user to opt out of bubbles [CHAR LIMIT=20] --> <string name="no_bubbles">Deny</string> <!-- Text used for button allowing user to approve / enable bubbles [CHAR LIMIT=20] --> Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleExpandedView.java +4 −20 Original line number Diff line number Diff line Loading @@ -40,11 +40,8 @@ import android.content.res.TypedArray; import android.graphics.Color; import android.graphics.Insets; import android.graphics.Point; import android.graphics.drawable.AdaptiveIconDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; import android.graphics.drawable.InsetDrawable; import android.graphics.drawable.ShapeDrawable; import android.os.RemoteException; import android.os.ServiceManager; Loading @@ -66,6 +63,7 @@ import com.android.systemui.Dependency; import com.android.systemui.Interpolators; import com.android.systemui.R; import com.android.systemui.recents.TriangleShape; import com.android.systemui.statusbar.AlphaOptimizedButton; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.stack.ExpandableViewState; Loading @@ -80,7 +78,7 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList private View mPointerView; private int mPointerMargin; private ImageView mSettingsIcon; private AlphaOptimizedButton mSettingsIcon; // Permission view private View mPermissionView; Loading @@ -100,8 +98,6 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList private int mSettingsIconHeight; private int mBubbleHeight; private int mPermissionHeight; private int mIconInset; private Drawable mSettingsIconDrawable; private int mPointerWidth; private int mPointerHeight; Loading Loading @@ -218,10 +214,7 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList mSettingsIconHeight = getContext().getResources().getDimensionPixelSize( R.dimen.bubble_expanded_header_height); mSettingsIcon = findViewById(R.id.settings_button); mIconInset = getResources().getDimensionPixelSize(R.dimen.bubble_icon_inset); mSettingsIcon.setOnClickListener(this); // Save initial drawable to create adaptive icons that will take its place. mSettingsIconDrawable = mSettingsIcon.getDrawable(); mPermissionHeight = getContext().getResources().getDimensionPixelSize( R.dimen.bubble_permission_height); Loading Loading @@ -377,16 +370,6 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList int foregroundColor = ta.getColor(1, Color.BLACK /* default */); ta.recycle(); // Must clear tint first - otherwise tint updates inconsistently. mSettingsIconDrawable.setTintList(null); mSettingsIconDrawable.setTint(foregroundColor); InsetDrawable foreground = new InsetDrawable(mSettingsIconDrawable, mIconInset); ColorDrawable background = new ColorDrawable(backgroundColor); AdaptiveIconDrawable adaptiveIcon = new AdaptiveIconDrawable(background, foreground); mSettingsIcon.setImageDrawable(adaptiveIcon); // Update permission prompt color. mPermissionView.setBackground(createPermissionBackground(backgroundColor)); mPermissionPrompt.setTextColor(foregroundColor); Loading Loading @@ -649,11 +632,12 @@ public class BubbleExpandedView extends LinearLayout implements View.OnClickList } private Intent getSettingsIntent(String packageName, final int appUid) { final Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS); final Intent intent = new Intent(Settings.ACTION_APP_NOTIFICATION_BUBBLE_SETTINGS); intent.putExtra(Settings.EXTRA_APP_PACKAGE, packageName); intent.putExtra(Settings.EXTRA_APP_UID, appUid); intent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); return intent; } Loading