Lines Matching refs:token

396         public long token;
398 public int pmToken; // in post-install restore, the PM's token for this transaction
408 token = _token;
422 token = _token;
436 token = _token;
508 // token is the index of the entry in the pending-operations list.
593 // Utility: build a new random integer token
595 int token;
598 token = mTokenGenerator.nextInt();
600 } while (token < 0);
601 return token;
765 params.observer, params.token, params.pkgInfo, params.pmToken,
890 // Remove the token from the set
902 Slog.d(TAG, "couldn't find params for token " + msg.arg1);
1176 Slog.w(TAG, "Unable to read token file", e);
2089 Slog.w(TAG, "Unable to write token file:", e);
2192 // Get the restore-set token for the best-available restore set for this package:
2195 long token = mAncestralToken;
2198 token = mCurrentToken;
2201 return token;
2218 void prepareOperationTimeout(int token, long interval, BackupRestoreTask callback) {
2219 if (MORE_DEBUG) Slog.v(TAG, "starting timeout: token=" + Integer.toHexString(token)
2222 mCurrentOperations.put(token, new Operation(OP_PENDING, callback));
2224 Message msg = mBackupHandler.obtainMessage(MSG_TIMEOUT, token, 0, callback);
2230 boolean waitUntilOperationComplete(int token) {
2232 + Integer.toHexString(token));
2237 op = mCurrentOperations.get(token);
2257 if (MORE_DEBUG) Slog.v(TAG, "operation " + Integer.toHexString(token)
2262 void handleTimeout(int token, Object obj) {
2266 op = mCurrentOperations.get(token);
2268 if (op == null) Slog.w(TAG, "Timeout of token " + Integer.toHexString(token)
2273 if (DEBUG) Slog.v(TAG, "TIMEOUT: token=" + Integer.toHexString(token));
2275 mCurrentOperations.put(token, op);
2571 // done a backup, we can now record what the current backup dataset token
2574 addBackupTrace("success; recording token");
2581 addBackupTrace("transport threw returning token");
2627 final int token = generateToken();
2662 prepareOperationTimeout(token, TIMEOUT_BACKUP_INTERVAL, this);
2664 agent.doBackup(mSavedState, mBackupData, mNewState, token, mBackupManagerBinder);
2924 int token = generateToken();
2925 prepareOperationTimeout(token, TIMEOUT_FULL_BACKUP_INTERVAL, null);
2926 mService.backupObbs(pkg.packageName, pipes[1], token, mBackupManagerBinder);
2928 success = waitUntilOperationComplete(token);
2947 int token, IBackupManager callbackBinder) {
2952 token, callbackBinder);
3028 int token, boolean sendApk, boolean writeManifest, byte[] widgetData)
3034 mToken = token;
3117 final int token = generateToken();
3119 token, sendApk, !isSharedStorage, widgetBlob);
3133 if (!waitUntilOperationComplete(token)) {
3245 // *N: 4 : integer token identifying which metadata blob
3251 // widgets : metadata token = 0x01FFED01 (BACKUP_WIDGET_METADATA_TOKEN)
4260 ParcelFileDescriptor socket, int token) throws IOException {
4263 mToken = token;
4480 final int token = generateToken();
4482 prepareOperationTimeout(token, TIMEOUT_FULL_BACKUP_INTERVAL, null);
4488 info.mtime, token, mBackupManagerBinder);
4499 mAgent, info, mPipes[0], token);
4504 token, mBackupManagerBinder);
4555 agentSuccess = waitUntilOperationComplete(token);
4869 int token = in.readInt();
4873 + Integer.toHexString(token)
4876 switch (token) {
4890 + Integer.toHexString(token)
5447 ParcelFileDescriptor socket, int token) throws IOException {
5450 mToken = token;
5848 final int token = generateToken();
5850 prepareOperationTimeout(token, TIMEOUT_FULL_BACKUP_INTERVAL, null);
5856 info.mtime, token, mBackupManagerBinder);
5867 mAgent, info, mPipes[0], token);
5872 token, mBackupManagerBinder);
5919 agentSuccess = waitUntilOperationComplete(token);
6210 int token = in.readInt();
6214 + Integer.toHexString(token)
6217 switch (token) {
6231 + Integer.toHexString(token)
6834 // When this is a restore-during-install, this is the token identifying the
7020 * 1. transport.startRestore(token, list-of-packages). If we need @pm@ it is
7309 final int token = generateToken();
7385 prepareOperationTimeout(token, TIMEOUT_RESTORE_INTERVAL, this);
7387 token, mBackupManagerBinder);
7434 final int token = generateToken();
7435 prepareOperationTimeout(token, TIMEOUT_RESTORE_FINISHED_INTERVAL, this);
7436 mAgent.doRestoreFinished(token, mBackupManagerBinder);
7640 // If we have a PM token, we must under all circumstances be sure to
7643 if (MORE_DEBUG) Slog.v(TAG, "finishing PM token " + mPmToken);
8187 final int token = generateToken();
8189 mFullConfirmations.put(token, params);
8193 if (DEBUG) Slog.d(TAG, "Starting backup confirmation UI, token=" + token);
8194 if (!startConfirmationUi(token, FullBackup.FULL_BACKUP_INTENT_ACTION)) {
8196 mFullConfirmations.delete(token);
8204 startConfirmationTimeout(token, params);
8272 final int token = generateToken();
8274 mFullConfirmations.put(token, params);
8278 if (DEBUG) Slog.d(TAG, "Starting restore confirmation UI, token=" + token);
8279 if (!startConfirmationUi(token, FullBackup.FULL_RESTORE_INTENT_ACTION)) {
8281 mFullConfirmations.delete(token);
8289 startConfirmationTimeout(token, params);
8305 boolean startConfirmationUi(int token, String action) {
8310 confIntent.putExtra(FullBackup.CONF_TOKEN_INTENT_EXTRA, token);
8319 void startConfirmationTimeout(int token, FullParams params) {
8323 token, 0, params);
8347 public void acknowledgeFullBackupOrRestore(int token, boolean allow,
8349 if (DEBUG) Slog.d(TAG, "acknowledgeFullBackupOrRestore : token=" + token
8361 params = mFullConfirmations.get(token);
8364 mFullConfirmations.delete(token);
8386 Slog.w(TAG, "Attempted to ack full backup/restore with invalid token");
8670 public void restoreAtInstall(String packageName, int token) {
8681 + " token=" + Integer.toHexString(token)
8706 // steps for 'token' will be issued from the restore handling code.
8723 restoreSet, pkg, token);
8737 mPackageManagerBinder.finishPackageInstall(token);
8802 public void opComplete(int token) {
8803 if (MORE_DEBUG) Slog.v(TAG, "opComplete: " + Integer.toHexString(token));
8806 op = mCurrentOperations.get(token);
8883 public synchronized int restoreAll(long token, IRestoreObserver observer) {
8887 if (DEBUG) Slog.d(TAG, "restoreAll token=" + Long.toHexString(token)
8920 if (token == mRestoreSets[i].token) {
8931 observer, token);
8939 Slog.w(TAG, "Restore token " + Long.toHexString(token) + " not found");
8944 public synchronized int restoreSome(long token, IRestoreObserver observer,
8951 b.append("restoreSome token=");
8952 b.append(Long.toHexString(token));
9002 if (token == mRestoreSets[i].token) {
9012 msg.obj = new RestoreParams(mRestoreTransport, dirName, observer, token,
9021 Slog.w(TAG, "Restore token " + Long.toHexString(token) + " not found");
9067 long token = getAvailableRestoreToken(packageName);
9072 if (token == 0) {
9097 observer, token, app, 0);