Disable the sync now menu while no any synced item

- Check the number of the switch on for all SyncStateSwitchPreferences to
  enable/disable the sync now menu item.

Fixes: 147030748
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.accounts
Change-Id: I88e4b042e6d236b98866b9e8bff9ec2c64b41b87
This commit is contained in:
Sunny Shao
2020-03-16 22:16:33 +08:00
parent 856079384a
commit 0030d78b62
3 changed files with 77 additions and 10 deletions

View File

@@ -66,8 +66,8 @@ public class AccountSyncPreferenceController extends AbstractPreferenceControlle
new SubSettingLauncher(mContext)
.setDestination(AccountSyncSettings.class.getName())
.setArguments(args)
.setSourceMetricsCategory( SettingsEnums.ACCOUNT)
.setTitleRes( R.string.account_sync_title)
.setSourceMetricsCategory(SettingsEnums.ACCOUNT)
.setTitleRes(R.string.account_sync_title)
.launch();
return true;