diff --git a/apps/SdkSetup/AndroidManifest.xml b/apps/SdkSetup/AndroidManifest.xml index 966eeb106..5ceddcdc3 100644 --- a/apps/SdkSetup/AndroidManifest.xml +++ b/apps/SdkSetup/AndroidManifest.xml @@ -31,5 +31,6 @@ + diff --git a/apps/SdkSetup/src/com/android/sdksetup/DefaultActivity.java b/apps/SdkSetup/src/com/android/sdksetup/DefaultActivity.java index 56f43a461..e87533dbc 100644 --- a/apps/SdkSetup/src/com/android/sdksetup/DefaultActivity.java +++ b/apps/SdkSetup/src/com/android/sdksetup/DefaultActivity.java @@ -17,10 +17,14 @@ package com.android.sdksetup; import android.app.Activity; +import android.app.backup.IBackupManager; import android.content.ComponentName; +import android.content.Context; import android.content.pm.PackageManager; import android.location.LocationManager; import android.os.Bundle; +import android.os.RemoteException; +import android.os.ServiceManager; import android.provider.Settings; /** @@ -43,6 +47,16 @@ public class DefaultActivity extends Activity { // enable install from non market Settings.Secure.putInt(getContentResolver(), Settings.Secure.INSTALL_NON_MARKET_APPS, 1); + // provision the backup manager. + IBackupManager bm = IBackupManager.Stub.asInterface( + ServiceManager.getService(Context.BACKUP_SERVICE)); + if (bm != null) { + try { + bm.setBackupProvisioned(true); + } catch (RemoteException e) { + } + } + // remove this activity from the package manager. PackageManager pm = getPackageManager(); ComponentName name = new ComponentName(this, DefaultActivity.class);