Use MainSwitchPreference to replace the button style switches.

Fix: 177967926
Fix: 177968295
Fix: 177967925
Fix: 177968078

Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: Ie854de96e5495fa564fb8a097ed4547bbd2b10c5
This commit is contained in:
Stanley Wang
2021-01-29 01:17:43 +08:00
parent 70864998c4
commit 10b7a7d483
25 changed files with 307 additions and 513 deletions

View File

@@ -72,16 +72,16 @@ public class BlockPreferenceController extends NotificationPreferenceController
bar.setDisabledByAdmin(mAdmin);
if (mChannel != null && !isChannelBlockable()) {
bar.setEnabled(false);
bar.setSwitchBarEnabled(false);
}
if (mChannelGroup != null && !isChannelGroupBlockable()) {
bar.setEnabled(false);
bar.setSwitchBarEnabled(false);
}
if (mChannel == null && mAppRow.systemApp
&& (!mAppRow.banned || mAppRow.lockedImportance)) {
bar.setEnabled(false);
bar.setSwitchBarEnabled(false);
}
if (mChannel != null) {