summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2013-10-03 17:47:22 -0400
committerChris Wren <cwren@android.com>2013-10-04 10:46:04 -0400
commit978194c6082770ec6474a08223bad69c4a451a31 (patch)
tree9a86a628fa067c7b763fa055d1cd65349c63f473
parentb1fd63b843c520bbdcd97dec83efabe1a73ad0ea (diff)
downloadandroid_packages_apps_Trebuchet-978194c6082770ec6474a08223bad69c4a451a31.zip
android_packages_apps_Trebuchet-978194c6082770ec6474a08223bad69c4a451a31.tar.gz
android_packages_apps_Trebuchet-978194c6082770ec6474a08223bad69c4a451a31.tar.bz2
leave the padding on the backupkeys
this was self-consistent on the device, but the host tool treats lack of padding in a different way. Bug:10778984 Change-Id: I47f653a98f23ff0ce54218d100e0c8e2f92b67fa
-rw-r--r--src/com/android/launcher3/LauncherBackupAgent.java2
-rw-r--r--util/com/android/launcher3/DecoderRing.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/LauncherBackupAgent.java b/src/com/android/launcher3/LauncherBackupAgent.java
index cb0dd49..4d06f9c 100644
--- a/src/com/android/launcher3/LauncherBackupAgent.java
+++ b/src/com/android/launcher3/LauncherBackupAgent.java
@@ -644,7 +644,7 @@ public class LauncherBackupAgent extends BackupAgent {
/** keys need to be strings, serialize and encode. */
private String keyToBackupKey(Key key) {
- return Base64.encodeToString(Key.toByteArray(key), Base64.NO_WRAP | Base64.NO_PADDING);
+ return Base64.encodeToString(Key.toByteArray(key), Base64.NO_WRAP);
}
/** keys need to be strings, decode and parse. */
diff --git a/util/com/android/launcher3/DecoderRing.java b/util/com/android/launcher3/DecoderRing.java
index cde845e..b7349fe 100644
--- a/util/com/android/launcher3/DecoderRing.java
+++ b/util/com/android/launcher3/DecoderRing.java
@@ -100,7 +100,7 @@ class DecoderRing {
if (type == Key.class) {
Key key = new Key();
try {
- MessageNano.mergeFrom(key, byteStream.toByteArray());
+ key = Key.parseFrom(byteStream.toByteArray());
} catch (InvalidProtocolBufferNanoException e) {
System.err.println("failed to parse proto: " + e);
System.exit(1);