Fix title clipped for "Custom settings for schedule"
Set rule to header, switch and action buttons controllers before their isAvailable() is called in onCreate(). Fix: 228262001 Test: manual Change-Id: Idc0ea779ab768497a8426ac847c4bbb2c6c4faea
This commit is contained in:
@@ -48,6 +48,11 @@ public class ZenAutomaticRuleSwitchPreferenceController extends
|
||||
return KEY;
|
||||
}
|
||||
|
||||
void setIdAndRule(String id, AutomaticZenRule rule) {
|
||||
mId = id;
|
||||
mRule = rule;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAvailable() {
|
||||
return mRule != null && mId != null;
|
||||
@@ -74,11 +79,6 @@ public class ZenAutomaticRuleSwitchPreferenceController extends
|
||||
}
|
||||
}
|
||||
|
||||
public void onResume(AutomaticZenRule rule, String id) {
|
||||
mRule = rule;
|
||||
mId = id;
|
||||
}
|
||||
|
||||
public void updateState(Preference preference) {
|
||||
if (mRule != null) {
|
||||
mSwitchBar.updateStatus(mRule.isEnabled());
|
||||
|
Reference in New Issue
Block a user