diff options
author | Jeff Sharkey <jsharkey@android.com> | 2014-05-29 18:03:22 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2014-05-29 18:03:22 -0700 |
commit | a312c03fd830c489ffc81fad0812826b093b73ee (patch) | |
tree | 7562a82de9ab19ffa0f1f5a2f9c9b83f91b81257 /cmds/bu/src/com | |
parent | 05ad48206a082057e17723d32493c153faa6881e (diff) | |
download | frameworks_base-a312c03fd830c489ffc81fad0812826b093b73ee.zip frameworks_base-a312c03fd830c489ffc81fad0812826b093b73ee.tar.gz frameworks_base-a312c03fd830c489ffc81fad0812826b093b73ee.tar.bz2 |
Read data from stdin/stdout to follow adb change.
Change-Id: I29ee5e05a538c6836f18b9cc9331c74f41936b29
Diffstat (limited to 'cmds/bu/src/com')
-rw-r--r-- | cmds/bu/src/com/android/commands/bu/Backup.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cmds/bu/src/com/android/commands/bu/Backup.java b/cmds/bu/src/com/android/commands/bu/Backup.java index 2673031..4503726 100644 --- a/cmds/bu/src/com/android/commands/bu/Backup.java +++ b/cmds/bu/src/com/android/commands/bu/Backup.java @@ -20,6 +20,7 @@ import android.app.backup.IBackupManager; import android.os.ParcelFileDescriptor; import android.os.RemoteException; import android.os.ServiceManager; +import android.system.OsConstants; import android.util.Log; import java.io.IOException; @@ -50,13 +51,11 @@ public final class Backup { return; } - int socketFd = Integer.parseInt(nextArg()); - String arg = nextArg(); if (arg.equals("backup")) { - doFullBackup(socketFd); + doFullBackup(OsConstants.STDOUT_FILENO); } else if (arg.equals("restore")) { - doFullRestore(socketFd); + doFullRestore(OsConstants.STDIN_FILENO); } else { Log.e(TAG, "Invalid operation '" + arg + "'"); } |