Don't sync from adapters that haven't opted in to restricted accounts

SyncManager should not allow syncing of data from apps that haven't opted
in to viewing restricted accounts in limited users.

Override getIsSyncable() to check if the sync adapter has the manifest
entry to enable restricted accounts of that account type. Return the default
isSyncable state if the adapter has opted in, otherwise return 0 for false.

Bug: 8566533
Change-Id: I3777f1e4fdb8debe1724ab083272e2d9bd2e63f2
2 files changed