Add mode names to search results dynamically.
The resulting search result takes the user to the modes aggregator page. Flag: android.app.modes_ui Bug: 332937523 Test: ZenModesListPreferenceControllerTest, manual with modes_ui on and off Change-Id: I7372307cb995667f6f7234530a3140f5295ab06a
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.settings.notification.modes;
|
||||
|
||||
import android.app.AutomaticZenRule;
|
||||
import android.app.Flags;
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -55,6 +56,11 @@ abstract class AbstractZenModePreferenceController extends AbstractPreferenceCon
|
||||
return mKey;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return Flags.modesUi();
|
||||
}
|
||||
|
||||
// Called by the parent Fragment onStart, which means it will happen before resume.
|
||||
public void updateZenMode(@NonNull Preference preference, @NonNull ZenMode zenMode) {
|
||||
mZenMode = zenMode;
|
||||
|
||||
Reference in New Issue
Block a user