Clean up BackupSettingsHelper.getSummary()
Backup item in System page no longer has summary. Bug: 310513318 Test: m RunSettingsRoboTests Change-Id: I0bb3b9114287546c279a5f30b65fb7081af54e44
This commit is contained in:
@@ -24,7 +24,6 @@ import android.content.Intent;
|
||||
import android.os.RemoteException;
|
||||
import android.os.ServiceManager;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
@@ -50,24 +49,6 @@ public class BackupSettingsHelper {
|
||||
mContext = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* If there is only one profile, show whether the backup is on or off.
|
||||
* Otherwise, show nothing.
|
||||
*/
|
||||
public String getSummary() {
|
||||
UserManager userManager = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
|
||||
if (userManager.getUserProfiles().size() == 1) {
|
||||
try {
|
||||
int resId = mBackupManager.isBackupEnabled()
|
||||
? R.string.backup_summary_state_on : R.string.backup_summary_state_off;
|
||||
return mContext.getText(resId).toString();
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error getting isBackupEnabled", e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an intent to launch backup settings from backup transport if the intent was provided
|
||||
* by the transport. Otherwise returns the intent to launch the default backup settings screen.
|
||||
|
Reference in New Issue
Block a user