• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
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
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
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.
15 */
16syntax = "proto2";
17
18option java_package = "com.android.launcher3.model";
19option java_outer_classname = "LauncherDumpProto";
20
21package model;
22
23message DumpTarget {
24  enum Type {
25    NONE = 0;
26    ITEM = 1;
27    CONTAINER = 2;
28  }
29
30  optional Type type = 1;
31  optional int32 page_id = 2;
32  optional int32 grid_x = 3;
33  optional int32 grid_y = 4;
34
35  // For container types only
36  optional ContainerType container_type = 5;
37
38  // For item types only
39  optional ItemType item_type = 6;
40
41  optional string package_name = 7; // All ItemTypes except UNKNOWN type
42  optional string component = 8;   // All ItemTypes except UNKNOWN type
43  optional string item_id = 9; // For Pinned Shortcuts and appWidgetId
44
45  optional int32 span_x = 10 [default = 1];// Used for ItemType.WIDGET
46  optional int32 span_y = 11 [default = 1];// Used for ItemType.WIDGET
47  optional UserType user_type = 12;
48}
49
50// Used to define what type of item a Target would represent.
51enum ItemType {
52  UNKNOWN_ITEMTYPE = 0;  // Launcher specific items
53  APP_ICON = 1; // Regular app icons
54  WIDGET = 2;   // Elements from AppWidgetManager
55  SHORTCUT = 3; // ShortcutManager
56}
57
58// Used to define what type of container a Target would represent.
59enum ContainerType {
60  UNKNOWN_CONTAINERTYPE = 0;
61  WORKSPACE = 1;
62  HOTSEAT = 2;
63  FOLDER = 3;
64}
65
66// Used to define what type of control a Target would represent.
67enum UserType {
68  DEFAULT = 0;
69  WORK = 1;
70}
71
72// Main message;
73message LauncherImpression {
74  repeated DumpTarget targets = 1;
75}
76