Display channel/group names only.
Test: manual Change-Id: I7da68f71ddb78f3150ebc64af40310de65cd010c
This commit is contained in:
@@ -251,25 +251,4 @@ abstract public class NotificationSettingsBase extends SettingsPreferenceFragmen
|
||||
return getContext().getString(R.string.notification_importance_high);
|
||||
}
|
||||
}
|
||||
|
||||
protected CharSequence getNotificationGroupLabel(NotificationChannelGroup group) {
|
||||
return getLabel(group.getName(), group.getNameResId());
|
||||
}
|
||||
|
||||
protected CharSequence getNotificationChannelLabel(NotificationChannel channel) {
|
||||
return getLabel(channel.getName(), channel.getNameResId());
|
||||
}
|
||||
|
||||
private CharSequence getLabel(CharSequence name, int nameResId) {
|
||||
if (!TextUtils.isEmpty(name)) {
|
||||
return name;
|
||||
}
|
||||
try {
|
||||
ApplicationInfo info = mPm.getApplicationInfoAsUser(mAppRow.pkg, 0, mAppRow.userId);
|
||||
return mPm.getText(mAppRow.pkg, nameResId, info);
|
||||
} catch (NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user