2 * Copyright (C) 2013 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 package launcher_backup;
21 option java_package = "com.android.launcher3.backup";
22 option java_outer_classname = "BackupProtos";
31 required Type type = 1;
32 optional string name = 2; // keep this short
33 optional int64 id = 3;
34 optional int64 checksum = 4;
37 message CheckedMessage {
38 required bytes payload = 1;
39 required int64 checksum = 2;
42 message DeviceProfieData {
43 required float desktop_rows = 1;
44 required float desktop_cols = 2;
45 required float hotseat_count = 3;
46 required int32 allapps_rank = 4;
50 required int32 app_version = 1;
52 // Time when the backup was created
55 // Total bytes written during the last backup
56 // OBSOLETE: A state may contain entries which are already present in the backup
57 // and were not written in the last backup
58 optional int64 bytes = 3;
60 // Total entries written during the last backup
61 // OBSOLETE: A state may contain entries which are already present in the backup
62 // and were not written in the last backup
63 optional int32 rows = 4;
65 // Valid keys for this state
68 // Backup format version.
69 optional int32 backup_version = 6 [default = 1];
71 optional DeviceProfieData profile = 7;
75 // Type of the app, this target represents
86 required int64 id = 1;
87 required int32 itemType = 2;
88 optional string title = 3;
89 optional int32 container = 4;
90 optional int32 screen = 5;
91 optional int32 cellX = 6;
92 optional int32 cellY = 7;
93 optional int32 spanX = 8;
94 optional int32 spanY = 9;
95 optional int32 displayMode = 10;
96 optional int32 appWidgetId = 11;
97 optional string appWidgetProvider = 12;
98 optional string intent = 13;
99 optional string uri = 14;
100 optional int32 iconType = 15;
101 optional string iconPackage = 16;
102 optional string iconResource = 17;
103 optional bytes icon = 18;
105 // Added in backup version 4
106 optional TargetType targetType = 19 [default = TARGET_NONE];
107 optional int32 rank = 20;
111 required int64 id = 1;
112 optional int32 rank = 2;
116 required int32 dpi = 1;
117 required bytes data = 2;
121 required string provider = 1;
122 optional string label = 2;
123 optional bool configure = 3;
124 optional Resource icon = 4;
125 optional Resource preview = 5;
127 // Added in backup version 3
128 // Assume that a widget is resizable upto 2x2 if no data is available
129 optional int32 minSpanX = 6 [default = 2];
130 optional int32 minSpanY = 7 [default = 2];