launcher_dump.proto 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. */
  16. syntax = "proto2";
  17. option java_package = "com.android.launcher3.model";
  18. option java_outer_classname = "LauncherDumpProto";
  19. package model;
  20. message DumpTarget {
  21. enum Type {
  22. NONE = 0;
  23. ITEM = 1;
  24. CONTAINER = 2;
  25. }
  26. optional Type type = 1;
  27. optional int32 page_id = 2;
  28. optional int32 grid_x = 3;
  29. optional int32 grid_y = 4;
  30. // For container types only
  31. optional ContainerType container_type = 5;
  32. // For item types only
  33. optional ItemType item_type = 6;
  34. optional string package_name = 7; // All ItemTypes except UNKNOWN type
  35. optional string component = 8; // All ItemTypes except UNKNOWN type
  36. optional string item_id = 9; // For Pinned Shortcuts and appWidgetId
  37. optional int32 span_x = 10 [default = 1];// Used for ItemType.WIDGET
  38. optional int32 span_y = 11 [default = 1];// Used for ItemType.WIDGET
  39. optional UserType user_type = 12;
  40. }
  41. // Used to define what type of item a Target would represent.
  42. enum ItemType {
  43. UNKNOWN_ITEMTYPE = 0; // Launcher specific items
  44. APP_ICON = 1; // Regular app icons
  45. WIDGET = 2; // Elements from AppWidgetManager
  46. SHORTCUT = 3; // ShortcutManager
  47. }
  48. // Used to define what type of container a Target would represent.
  49. enum ContainerType {
  50. UNKNOWN_CONTAINERTYPE = 0;
  51. WORKSPACE = 1;
  52. HOTSEAT = 2;
  53. FOLDER = 3;
  54. }
  55. // Used to define what type of control a Target would represent.
  56. enum UserType {
  57. DEFAULT = 0;
  58. WORK = 1;
  59. }
  60. // Main message;
  61. message LauncherImpression {
  62. repeated DumpTarget targets = 1;
  63. }