Extract the not-strictly-modes-related parts of ZenModesBackend
So that when it's moved to SettingsLib, it doesn't need to carry that baggage. Bug: 346519570 Test: atest com.android.settings.notification.modes Flag: android.app.modes_ui Change-Id: I7911a521d96f5dbac2c2395171d324b7b54b8b07
This commit is contained in:
@@ -41,6 +41,7 @@ abstract class ZenModesFragmentBase extends RestrictedDashboardFragment {
|
||||
protected Context mContext;
|
||||
|
||||
protected ZenModesBackend mBackend;
|
||||
protected ZenHelperBackend mHelperBackend;
|
||||
|
||||
// Individual pages must implement this method based on what they should do when
|
||||
// the device's zen mode state changes.
|
||||
@@ -59,6 +60,7 @@ abstract class ZenModesFragmentBase extends RestrictedDashboardFragment {
|
||||
public void onAttach(@NonNull Context context) {
|
||||
mContext = context;
|
||||
mBackend = ZenModesBackend.getInstance(context);
|
||||
mHelperBackend = ZenHelperBackend.getInstance(context);
|
||||
super.onAttach(context);
|
||||
mSettingsObserver.register();
|
||||
}
|
||||
|
Reference in New Issue
Block a user