class UserBackupManagerService {

    public void backupNow() {
        mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP, "backupNow");

        long oldId = Binder.clearCallingIdentity();
        try {
            final PowerSaveState result =
                    mPowerManager.getPowerSaveState(ServiceType.KEYVALUE_BACKUP);
            if (result.batterySaverEnabled) {
                if (DEBUG) Slog.v(TAG, "Not running backup while in battery save mode");
                // Try again in several hours.
                KeyValueBackupJob.schedule(mUserId, mContext, mConstants);
            } else {
                if (DEBUG) Slog.v(TAG, "Scheduling immediate backup pass");
                synchronized (mQueueLock) {
                    // Fire the intent that kicks off the whole shebang...
                    try {
                        mRunBackupIntent.send();
                    } catch (PendingIntent.CanceledException e) {
                        // should never happen
                        Slog.e(TAG, "run-backup intent cancelled!");
                    }

                    // ...and cancel any pending scheduled job, because we've just superseded it
                    KeyValueBackupJob.cancel(mUserId, mContext);
                }
            }
        } finally {
            Binder.restoreCallingIdentity(oldId);
        }
    }

    private  UserBackupManagerService(
            @UserIdInt int userId,
            Context context,
            Trampoline parent,
            HandlerThread userBackupThread,
            File baseStateDir,
            File dataDir,
            TransportManager transportManager);

}