diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2017-02-06 10:46:24 -0800 |
---|---|---|
committer | Hyunyoung Song <hyunyoungs@google.com> | 2017-04-04 23:06:30 +0000 |
commit | e295acaeb34c474430e68cbfb069a6a6bfea4041 (patch) | |
tree | 7575140da81484b2897ad165da8debd51a986eab /protos | |
parent | ca18746163621211847a2f184d19a6b3e2b4a1c0 (diff) | |
download | packages_apps_Trebuchet-e295acaeb34c474430e68cbfb069a6a6bfea4041.tar.gz packages_apps_Trebuchet-e295acaeb34c474430e68cbfb069a6a6bfea4041.tar.bz2 packages_apps_Trebuchet-e295acaeb34c474430e68cbfb069a6a6bfea4041.zip |
Launcher dump proto that will be used for:
$ adb shell dumpsys activity provider com.android.launcher3/com.android.launcher3.LauncherProvider
To see how the proto is filled: go/launcher-proto-dump
b/31772480
Change-Id: I8e0f1e5e38148a3dfeabd2fc057392193b2625dd
(cherry picked from commit 6aa3729e98502d4cffc40a7e602628b85d558edd)
Diffstat (limited to 'protos')
-rw-r--r-- | protos/launcher_dump.proto | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/protos/launcher_dump.proto b/protos/launcher_dump.proto new file mode 100644 index 000000000..dc8fbda25 --- /dev/null +++ b/protos/launcher_dump.proto @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +syntax = "proto2"; + +option java_package = "com.android.launcher3.model"; +option java_outer_classname = "LauncherDumpProto"; + +package model; + +message DumpTarget { + enum Type { + NONE = 0; + ITEM = 1; + CONTAINER = 2; + } + + optional Type type = 1; + optional int32 page_id = 2; + optional int32 grid_x = 3; + optional int32 grid_y = 4; + + // For container types only + optional ContainerType container_type = 5; + + // For item types only + optional ItemType item_type = 6; + + optional string package_name = 7; // All ItemTypes except UNKNOWN type + optional string component = 8; // All ItemTypes except UNKNOWN type + optional string item_id = 9; // For Pinned Shortcuts and appWidgetId + + optional int32 span_x = 10 [default = 1];// Used for ItemType.WIDGET + optional int32 span_y = 11 [default = 1];// Used for ItemType.WIDGET + optional UserType user_type = 12; +} + +// Used to define what type of item a Target would represent. +enum ItemType { + UNKNOWN_ITEMTYPE = 0; // Launcher specific items + APP_ICON = 1; // Regular app icons + WIDGET = 2; // Elements from AppWidgetManager + SHORTCUT = 3; // ShortcutManager +} + +// Used to define what type of container a Target would represent. +enum ContainerType { + UNKNOWN_CONTAINERTYPE = 0; + WORKSPACE = 1; + HOTSEAT = 2; + FOLDER = 3; +} + +// Used to define what type of control a Target would represent. +enum UserType { + DEFAULT = 0; + WORK = 1; +} + +// Main message; +message LauncherImpression { + repeated DumpTarget targets = 1; +} |