Clean up DND slice in search.

- Remove the controller in SoundSettings, just use the common one.
- Update a bunch of IDs so ZenModeSliceBuilder maps to the toggle
  button in zen_mode_settings.xml

This is needed so the slice intent (left target when shown in search)
is the same as what we index from search side. Previously the search
indexer is finding zen_mode from sound page but the slice itself is
reporting a deep link into zenModeSettings page.

Fixes: 130437726
Test: robotest

Change-Id: Ic41d2d93afa1f748e3282e23010199a0fa078645
This commit is contained in:
Fan Zhang
2019-04-12 15:31:25 -07:00
parent 76ffb2df02
commit 7df6445c3e
8 changed files with 19 additions and 100 deletions

View File

@@ -19,8 +19,6 @@ package com.android.settings.slices;
import static android.provider.SettingsSlicesContract.KEY_LOCATION;
import static android.provider.SettingsSlicesContract.KEY_WIFI;
import static com.android.settings.notification.ZenModeSoundSettingsPreferenceController.ZEN_MODE_KEY;
import android.content.ContentResolver;
import android.net.Uri;
import android.provider.SettingsSlicesContract;
@@ -43,6 +41,7 @@ import com.android.settings.location.LocationSlice;
import com.android.settings.media.MediaOutputIndicatorSlice;
import com.android.settings.media.MediaOutputSlice;
import com.android.settings.network.telephony.MobileDataSlice;
import com.android.settings.notification.ZenModeButtonPreferenceController;
import com.android.settings.wifi.calling.WifiCallingSliceHelper;
import com.android.settings.wifi.slice.ContextualWifiSlice;
import com.android.settings.wifi.slice.WifiSlice;
@@ -298,7 +297,7 @@ public class CustomSliceRegistry {
.scheme(ContentResolver.SCHEME_CONTENT)
.authority(SettingsSliceProvider.SLICE_AUTHORITY)
.appendPath(SettingsSlicesContract.PATH_SETTING_ACTION)
.appendPath(ZEN_MODE_KEY)
.appendPath(ZenModeButtonPreferenceController.KEY)
.build();
/**