Fix Flicker for ZenCustomRuleSettingsBase
Fix the following flicker on pages under: Notifications -> Do Not Disturb -> Schedules -> [One Schedule] 1. Do Not Disturb behavior 2. (1) -> Create custom settings for this schedule 3. (2) -> Calls 4. (2) -> Messages 5. (2) -> Display options for hidden notifications 6. (4) -> custom Fix: 226523115 Test: On Pixel Phone Change-Id: Ief9963091847d58654f26851616563ae910716a5
This commit is contained in:
@@ -19,9 +19,6 @@ package com.android.settings.notification.zen;
|
||||
import android.app.AutomaticZenRule;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.util.Slog;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.settings.core.PreferenceControllerMixin;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
@@ -37,23 +34,19 @@ abstract class AbstractZenCustomRulePreferenceController extends
|
||||
super(context, key, lifecycle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateState(Preference preference) {
|
||||
if (mId != null) {
|
||||
mRule = mBackend.getAutomaticZenRule(mId);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return mRule != null;
|
||||
}
|
||||
|
||||
public void onResume(AutomaticZenRule rule, String id) {
|
||||
public void setIdAndRule(String id, AutomaticZenRule rule) {
|
||||
mId = id;
|
||||
mRule = rule;
|
||||
}
|
||||
|
||||
public void onResume() {
|
||||
}
|
||||
|
||||
Bundle createBundle() {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(ZenCustomRuleSettings.RULE_ID, mId);
|
||||
|
Reference in New Issue
Block a user