OSDN Git Service

Disable the sync now menu while no any synced item
authorSunny Shao <sunnyshao@google.com>
Mon, 16 Mar 2020 14:16:33 +0000 (22:16 +0800)
committerSunny Shao <sunnyshao@google.com>
Thu, 19 Mar 2020 12:58:29 +0000 (20:58 +0800)
commit0030d78b623af4407d38d611ca9da3b9880563c9
tree8bb87eacd4bb28f1128aebdb5d8eec0c311b01fb
parent856079384aebb77589c67f5db34df67bd9e3c39c
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
src/com/android/settings/accounts/AccountSyncPreferenceController.java
src/com/android/settings/accounts/AccountSyncSettings.java
tests/robotests/src/com/android/settings/accounts/AccountSyncSettingsTest.java