Move channel listing into a pref controller
And a hidden preference category. This makes
hiding/showing the list a lot cleaner and also allows more
of the code to be tested.
Also delete some unused code that no longer complied after
this refactor.
Fixes: 133443871
Test: atest
Change-Id: I4a5fe0e075019bae2df44a0a9dcec26a40ee6d12
(cherry picked from commit a295d71c94
)
This commit is contained in:
@@ -20,7 +20,7 @@ import static android.app.NotificationManager.IMPORTANCE_LOW;
|
||||
import static android.app.NotificationManager.IMPORTANCE_NONE;
|
||||
import static android.app.slice.Slice.EXTRA_TOGGLE_STATE;
|
||||
|
||||
import static com.android.settings.notification.NotificationSettingsBase.ARG_FROM_SETTINGS;
|
||||
import static com.android.settings.notification.ChannelListPreferenceController.ARG_FROM_SETTINGS;
|
||||
|
||||
import android.app.Application;
|
||||
import android.app.NotificationChannel;
|
||||
@@ -110,7 +110,7 @@ public class NotificationChannelSlice implements CustomSliceable {
|
||||
*
|
||||
* Note:
|
||||
* When the sent count of notification channels is the same, follow the sorting mechanism from
|
||||
* {@link com.android.settings.notification.NotificationSettingsBase#mChannelComparator}.
|
||||
* {@link com.android.settings.notification.ChannelListPreferenceController}.
|
||||
* Since slice view only shows displayable notification channels, so those deleted ones are
|
||||
* excluded from the comparison here.
|
||||
*/
|
||||
@@ -257,7 +257,6 @@ public class NotificationChannelSlice implements CustomSliceable {
|
||||
channelArgs.putInt(AppInfoBase.ARG_PACKAGE_UID, mUid);
|
||||
channelArgs.putString(AppInfoBase.ARG_PACKAGE_NAME, mPackageName);
|
||||
channelArgs.putString(Settings.EXTRA_CHANNEL_ID, channel.getId());
|
||||
channelArgs.putBoolean(ARG_FROM_SETTINGS, true);
|
||||
|
||||
final Intent channelIntent = new SubSettingLauncher(mContext)
|
||||
.setDestination(ChannelNotificationSettings.class.getName())
|
||||
|
Reference in New Issue
Block a user