Make the backup manager do nothing when backup is turned off.
This commit is contained in:
@@ -73,6 +73,9 @@ public class BackupManager {
|
|||||||
* {@link android.app.BackupAgent} subclass will be scheduled when you call this method.
|
* {@link android.app.BackupAgent} subclass will be scheduled when you call this method.
|
||||||
*/
|
*/
|
||||||
public void dataChanged() {
|
public void dataChanged() {
|
||||||
|
if (!EVEN_THINK_ABOUT_DOING_RESTORE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
checkServiceBinder();
|
checkServiceBinder();
|
||||||
if (sService != null) {
|
if (sService != null) {
|
||||||
try {
|
try {
|
||||||
@@ -92,6 +95,9 @@ public class BackupManager {
|
|||||||
* permission if the package named in the argument is not the caller's own.
|
* permission if the package named in the argument is not the caller's own.
|
||||||
*/
|
*/
|
||||||
public static void dataChanged(String packageName) {
|
public static void dataChanged(String packageName) {
|
||||||
|
if (!EVEN_THINK_ABOUT_DOING_RESTORE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
checkServiceBinder();
|
checkServiceBinder();
|
||||||
if (sService != null) {
|
if (sService != null) {
|
||||||
try {
|
try {
|
||||||
@@ -110,6 +116,9 @@ public class BackupManager {
|
|||||||
* {@hide}
|
* {@hide}
|
||||||
*/
|
*/
|
||||||
public IRestoreSession beginRestoreSession(String transport) {
|
public IRestoreSession beginRestoreSession(String transport) {
|
||||||
|
if (!EVEN_THINK_ABOUT_DOING_RESTORE) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
IRestoreSession binder = null;
|
IRestoreSession binder = null;
|
||||||
checkServiceBinder();
|
checkServiceBinder();
|
||||||
if (sService != null) {
|
if (sService != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user