Lines Matching defs:in
5 * you may not use this file except in compliance with the License.
10 * Unless required by applicable law or agreed to in writing, software
171 * <P>Keys may come back in any order, so each key/value is one complete row of the database.
183 Journal in = readJournal(oldState);
186 long lastBackupTime = in.t;
196 backupFavorites(in, data, out, keys);
197 backupScreens(in, data, out, keys);
198 backupIcons(in, data, out, keys);
199 backupWidgets(in, data, out, keys);
205 out = in;
209 Log.v(TAG, "onBackup: wrote " + out.bytes + "b in " + out.rows + " rows.");
215 * <P>Keys may arrive in any order.
287 * @param in notes from last backup
290 * @param keys keys to mark as clean in the notes for next backup
293 private void backupFavorites(Journal in, BackupDataOutput data, Journal out,
297 Set<String> savedIds = getSavedIdsByType(Key.FAVORITE, in);
302 // Don't backup apps in other profiles for now.
315 if (!savedIds.contains(backupKey) || updateTime >= in.t) {
335 * <P>Keys arrive in any order, so screens and containers may not exist yet.
340 * @param keys keys to mark as clean in the notes for next backup
365 * @param in notes from last backup
368 * @param keys keys to mark as clean in the notes for next backup
371 private void backupScreens(Journal in, BackupDataOutput data, Journal out,
375 Set<String> savedIds = getSavedIdsByType(Key.SCREEN, in);
385 if (DEBUG) Log.d(TAG, "dumping screens after: " + in.t);
393 if (!savedIds.contains(backupKey) || updateTime >= in.t) {
413 * <P>Keys arrive in any order, so children of this screen may already exist.
418 * @param keys keys to mark as clean in the notes for next backup
444 * @param in notes from last backup
447 * @param keys keys to mark as clean in the notes for next backup
450 private void backupIcons(Journal in, BackupDataOutput data, Journal out,
463 Set<String> savedIds = getSavedIdsByType(Key.ICON, in);
466 // Don't backup apps in other profiles for now.
534 * <P>Keys arrive in any order, so shortcuts that use this icon may already exist.
539 * @param keys keys to mark as clean in the notes for next backup
580 * @param in notes from last backup
583 * @param keys keys to mark as clean in the notes for next backup
586 private void backupWidgets(Journal in, BackupDataOutput data, Journal out,
602 Set<String> savedIds = getSavedIdsByType(Key.WIDGET, in);
664 * <P>Keys arrive in any order, so widgets that use this data may already exist.
669 * @param keys keys to mark as clean in the notes for next backup
974 * In the event of any error, just pretend we didn't have a journal,
975 * in that case, do a full backup.
1067 private Set<String> getSavedIdsByType(int type, Journal in) {
1069 for(int i = 0; i < in.key.length; i++) {
1070 Key key = in.key[i];
1092 * In the event of any error, just pretend we didn't have a journal,
1093 * in that case, do a full backup.
1111 /** Wrap a proto in a CheckedMessage and compute the checksum. */
1164 // check if the launcher is in a state to support backup