Rename SubSettingLauncher.setTitle, add java doc
For make this method usage more clear, setTitle(charSequence) rename as setTitleText, add java doc: it is only for user generated string setTitle(int) rename as setTitleRes. Change-Id: I972cb6a8ff90873dfdc25c23f6dc3d68103c8e4e Fixes: 78347436 Test: make RunSettingsRoboTests
This commit is contained in:
@@ -20,7 +20,6 @@ import static android.app.NotificationManager.IMPORTANCE_LOW;
|
||||
import static android.app.NotificationManager.IMPORTANCE_NONE;
|
||||
import static com.android.settingslib.RestrictedLockUtils.EnforcedAdmin;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationChannelGroup;
|
||||
@@ -286,7 +285,7 @@ abstract public class NotificationSettingsBase extends DashboardFragment {
|
||||
channelPref.setIntent(new SubSettingLauncher(getActivity())
|
||||
.setDestination(ChannelNotificationSettings.class.getName())
|
||||
.setArguments(channelArgs)
|
||||
.setTitle(R.string.notification_channel_title)
|
||||
.setTitleRes(R.string.notification_channel_title)
|
||||
.setSourceMetricsCategory(getMetricsCategory())
|
||||
.toIntent());
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ public class RecentNotifyingAppsPreferenceController extends AbstractPreferenceC
|
||||
|
||||
pref.setIntent(new SubSettingLauncher(mHost.getActivity())
|
||||
.setDestination(AppNotificationSettings.class.getName())
|
||||
.setTitle(R.string.notifications_title)
|
||||
.setTitleRes(R.string.notifications_title)
|
||||
.setArguments(args)
|
||||
.setSourceMetricsCategory(
|
||||
MetricsProto.MetricsEvent.MANAGE_APPLICATIONS_NOTIFICATIONS)
|
||||
|
||||
@@ -59,7 +59,7 @@ public class ZenModeVisEffectsCustomPreferenceController
|
||||
pref.setOnGearClickListener(p -> {
|
||||
new SubSettingLauncher(mContext)
|
||||
.setDestination(ZenModeBlockedEffectsSettings.class.getName())
|
||||
.setTitle(R.string.zen_mode_what_to_block_title)
|
||||
.setTitleRes(R.string.zen_mode_what_to_block_title)
|
||||
.setSourceMetricsCategory(MetricsProto.MetricsEvent.SETTINGS_ZEN_NOTIFICATIONS)
|
||||
.launch();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user