Loading packages/SystemUI/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1261,6 +1261,9 @@ <!-- Notification: Control panel: Label for button that dismisses control panel. [CHAR LIMIT=NONE] --> <string name="notification_done">Done</string> <!-- Notification: Gear: Content description for the gear. [CHAR LIMIT=NONE] --> <string name="notification_gear_accessibility"><xliff:g id="app_name" example="YouTube">%1$s</xliff:g> notification controls</string> <!-- SysUI Tuner: Color and appearance screen title [CHAR LIMIT=50] --> <string name="color_and_appearance">Color and appearance</string> Loading packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +15 −0 Original line number Diff line number Diff line Loading @@ -1527,6 +1527,21 @@ public abstract class BaseStatusBar extends SystemUI implements row.setHeadsUpManager(mHeadsUpManager); row.setRemoteInputController(mRemoteInputController); row.setOnExpandClickListener(this); // Get the app name final String pkg = sbn.getPackageName(); String appname = pkg; try { final ApplicationInfo info = pmUser.getApplicationInfo(pkg, PackageManager.GET_UNINSTALLED_PACKAGES | PackageManager.GET_DISABLED_COMPONENTS); if (info != null) { appname = String.valueOf(pmUser.getApplicationLabel(info)); } } catch (NameNotFoundException e) { // Do nothing } row.setAppName(appname); } workAroundBadLayerDrawableOpacity(row); Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +10 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private NotificationGuts mGuts; private NotificationData.Entry mEntry; private StatusBarNotification mStatusBarNotification; private String mAppName; private boolean mIsHeadsUp; private boolean mLastChronometerRunning = true; private NotificationHeaderView mNotificationHeader; Loading Loading @@ -287,6 +288,13 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mPrivateLayout.setRemoteInputController(r); } public void setAppName(String appName) { mAppName = appName; if (mSettingsIconRow != null) { mSettingsIconRow.setAppName(mAppName); } } public void addChildNotification(ExpandableNotificationRow row) { addChildNotification(row, -1); } Loading Loading @@ -566,6 +574,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mSettingsIconRow = (NotificationSettingsIconRow) LayoutInflater.from(mContext).inflate( R.layout.notification_settings_icon_row, this, false); mSettingsIconRow.setNotificationRowParent(ExpandableNotificationRow.this); mSettingsIconRow.setAppName(mAppName); mSettingsIconRow.setVisibility(oldSettings.getVisibility()); addView(mSettingsIconRow, settingsIndex); Loading Loading @@ -683,6 +692,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { public void onInflate(ViewStub stub, View inflated) { mSettingsIconRow = (NotificationSettingsIconRow) inflated; mSettingsIconRow.setNotificationRowParent(ExpandableNotificationRow.this); mSettingsIconRow.setAppName(mAppName); } }); mGutsStub = (ViewStub) findViewById(R.id.notification_guts_stub); Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationSettingsIconRow.java +8 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.content.Context; import android.content.res.Resources; import android.util.AttributeSet; import android.view.View; import android.widget.FrameLayout; Loading Loading @@ -105,6 +106,13 @@ public class NotificationSettingsIconRow extends FrameLayout implements View.OnC mParent = parent; } public void setAppName(String appName) { Resources res = getResources(); String description = String.format(res.getString(R.string.notification_gear_accessibility), appName); mGearIcon.setContentDescription(description); } public ExpandableNotificationRow getNotificationParent() { return mParent; } Loading Loading
packages/SystemUI/res/values/strings.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1261,6 +1261,9 @@ <!-- Notification: Control panel: Label for button that dismisses control panel. [CHAR LIMIT=NONE] --> <string name="notification_done">Done</string> <!-- Notification: Gear: Content description for the gear. [CHAR LIMIT=NONE] --> <string name="notification_gear_accessibility"><xliff:g id="app_name" example="YouTube">%1$s</xliff:g> notification controls</string> <!-- SysUI Tuner: Color and appearance screen title [CHAR LIMIT=50] --> <string name="color_and_appearance">Color and appearance</string> Loading
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +15 −0 Original line number Diff line number Diff line Loading @@ -1527,6 +1527,21 @@ public abstract class BaseStatusBar extends SystemUI implements row.setHeadsUpManager(mHeadsUpManager); row.setRemoteInputController(mRemoteInputController); row.setOnExpandClickListener(this); // Get the app name final String pkg = sbn.getPackageName(); String appname = pkg; try { final ApplicationInfo info = pmUser.getApplicationInfo(pkg, PackageManager.GET_UNINSTALLED_PACKAGES | PackageManager.GET_DISABLED_COMPONENTS); if (info != null) { appname = String.valueOf(pmUser.getApplicationLabel(info)); } } catch (NameNotFoundException e) { // Do nothing } row.setAppName(appname); } workAroundBadLayerDrawableOpacity(row); Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +10 −0 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { private NotificationGuts mGuts; private NotificationData.Entry mEntry; private StatusBarNotification mStatusBarNotification; private String mAppName; private boolean mIsHeadsUp; private boolean mLastChronometerRunning = true; private NotificationHeaderView mNotificationHeader; Loading Loading @@ -287,6 +288,13 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mPrivateLayout.setRemoteInputController(r); } public void setAppName(String appName) { mAppName = appName; if (mSettingsIconRow != null) { mSettingsIconRow.setAppName(mAppName); } } public void addChildNotification(ExpandableNotificationRow row) { addChildNotification(row, -1); } Loading Loading @@ -566,6 +574,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { mSettingsIconRow = (NotificationSettingsIconRow) LayoutInflater.from(mContext).inflate( R.layout.notification_settings_icon_row, this, false); mSettingsIconRow.setNotificationRowParent(ExpandableNotificationRow.this); mSettingsIconRow.setAppName(mAppName); mSettingsIconRow.setVisibility(oldSettings.getVisibility()); addView(mSettingsIconRow, settingsIndex); Loading Loading @@ -683,6 +692,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView { public void onInflate(ViewStub stub, View inflated) { mSettingsIconRow = (NotificationSettingsIconRow) inflated; mSettingsIconRow.setNotificationRowParent(ExpandableNotificationRow.this); mSettingsIconRow.setAppName(mAppName); } }); mGutsStub = (ViewStub) findViewById(R.id.notification_guts_stub); Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationSettingsIconRow.java +8 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.content.Context; import android.content.res.Resources; import android.util.AttributeSet; import android.view.View; import android.widget.FrameLayout; Loading Loading @@ -105,6 +106,13 @@ public class NotificationSettingsIconRow extends FrameLayout implements View.OnC mParent = parent; } public void setAppName(String appName) { Resources res = getResources(); String description = String.format(res.getString(R.string.notification_gear_accessibility), appName); mGearIcon.setContentDescription(description); } public ExpandableNotificationRow getNotificationParent() { return mParent; } Loading