Remove summary text for Backup & reset.
Remove the SummaryProvider from PrivacySettings so that it will not show the summary for the Backup & reset settings. Bug: 29519430 Change-Id: Idf41c2f794391f81bf864ade0db9087c2e3e1c0e
This commit is contained in:
@@ -218,51 +218,6 @@ public class PrivacySettings extends SettingsPreferenceFragment implements Index
|
||||
return R.string.help_url_backup_reset;
|
||||
}
|
||||
|
||||
private static class SummaryProvider implements SummaryLoader.SummaryProvider {
|
||||
|
||||
private final Context mContext;
|
||||
private final SummaryLoader mSummaryLoader;
|
||||
|
||||
public SummaryProvider(Context context, SummaryLoader summaryLoader) {
|
||||
mContext = context;
|
||||
mSummaryLoader = summaryLoader;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setListening(boolean listening) {
|
||||
if (listening) {
|
||||
IBackupManager backupManager = IBackupManager.Stub.asInterface(
|
||||
ServiceManager.getService(Context.BACKUP_SERVICE));
|
||||
try {
|
||||
boolean backupEnabled = backupManager.isBackupEnabled();
|
||||
if (backupEnabled) {
|
||||
String transport = backupManager.getCurrentTransport();
|
||||
String configSummary = backupManager.getDestinationString(transport);
|
||||
if (configSummary != null) {
|
||||
mSummaryLoader.setSummary(this, configSummary);
|
||||
} else {
|
||||
mSummaryLoader.setSummary(this, mContext.getString(
|
||||
R.string.backup_configure_account_default_summary));
|
||||
}
|
||||
} else {
|
||||
mSummaryLoader.setSummary(this, mContext.getString(
|
||||
R.string.backup_disabled));
|
||||
}
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static final SummaryLoader.SummaryProviderFactory SUMMARY_PROVIDER_FACTORY
|
||||
= new SummaryLoader.SummaryProviderFactory() {
|
||||
@Override
|
||||
public SummaryLoader.SummaryProvider createSummaryProvider(Activity activity,
|
||||
SummaryLoader summaryLoader) {
|
||||
return new SummaryProvider(activity, summaryLoader);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* For Search.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user