import android.app.backup.BackupManager; ... public void requestBackup() { BackupManager bm = new BackupManager(this); bm.dataChanged(); }
@Override public ClusterManager cloneFromTemplate() { BackupManager result = new BackupManager(); clone(result); result.mExpireSessionsOnShutdown = mExpireSessionsOnShutdown; result.mapSendOptions = mapSendOptions; result.rpcTimeout = rpcTimeout; return result; }
@Override public ClusterManager cloneFromTemplate() { BackupManager result = new BackupManager(); clone(result); result.mapSendOptions = mapSendOptions; result.rpcTimeout = rpcTimeout; result.terminateOnStartFailure = terminateOnStartFailure; return result; }
@Override public ClusterManager cloneFromTemplate() { BackupManager result = new BackupManager(); clone(result); result.mapSendOptions = mapSendOptions; result.rpcTimeout = rpcTimeout; result.terminateOnStartFailure = terminateOnStartFailure; result.accessTimeout = accessTimeout; return result; }
if (android.os.Build.VERSION.SDK_INT >= 8) { BackupManager bm = new BackupManager(this); bm.dataChanged(); }
/** * Observes the wallpaper for changes and notifies all IWallpaperServiceCallbacks * that the wallpaper has changed. The CREATE is triggered when there is no * wallpaper set and is created for the first time. The CLOSE_WRITE is triggered * everytime the wallpaper is changed. */ private final FileObserver mWallpaperObserver = new FileObserver( WALLPAPER_DIR.getAbsolutePath(), CREATE | CLOSE_WRITE | DELETE | DELETE_SELF) { @Override public void onEvent(int event, String path) { if (path == null) { return; } synchronized (mLock) { // changing the wallpaper means we'll need to back up the new one long origId = Binder.clearCallingIdentity(); BackupManager bm = new BackupManager(mContext); bm.dataChanged(); Binder.restoreCallingIdentity(origId); File changedFile = new File(WALLPAPER_DIR, path); if (WALLPAPER_FILE.equals(changedFile)) { notifyCallbacksLocked(); } } } };