Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 726eb822 authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

Fix the broken build

Change-Id: I2750cde454a6604f33b910ac8b31fd07bba567bb
parent dadb304b
Loading
Loading
Loading
Loading
+122 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2016 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.userevent.nano";
option java_outer_classname = "LauncherLogProto";

package userevent;

message Target {
  enum Type {
    NONE = 0;
    ITEM = 1;
    CONTROL = 2;
    CONTAINER = 3;
  }

  optional Type type = 1;

  // For container type and item type
  // Used mainly for ContainerType.FOLDER, ItemType.*
  optional Target parent = 2;
  optional int32 page_index = 3;
  optional int32 rank = 4;
  optional int32 grid_x = 5;
  optional int32 grid_y = 6;

  // For container types only
  optional ContainerType container_type = 7;
  optional int32 cardinality = 8;

  // For control types only
  optional ControlType control_type = 9;

  // For item types only
  optional ItemType item_type = 10;
  optional int32 package_name_hash = 11;
  optional int32 component_hash = 12;      // Used for ItemType.WIDGET
  optional int32 intent_hash = 13;         // Used for ItemType.SHORTCUT
  optional int32 span_x = 14 [default = 1];// Used for ItemType.WIDGET
  optional int32 span_y = 15 [default = 1];// Used for ItemType.WIDGET
}

enum ItemType {
  APP_ICON = 0;
  SHORTCUT = 1;
  WIDGET = 2;
  FOLDER_ICON = 3;
}

enum ContainerType {
  WORKSPACE = 0;
  HOTSEAT = 1;
  FOLDER = 2;
  ALLAPPS = 3;
  WIDGETS = 4;
  OVERVIEW = 5;
  PREDICTION = 6;
  SEARCHRESULT = 7;
}

enum ControlType {
  ALL_APPS_BUTTON = 0;
  WIDGETS_BUTTON = 1;
  WALLPAPER_BUTTON = 2;
  SETTINGS_BUTTON = 3;
  REMOVE_TARGET = 4;
  UNINSTALL_TARGET = 5;
  APPINFO_TARGET = 6;
  RESIZE_HANDLE = 7;
  FAST_SCROLL_HANDLE = 8;
  // HOME, BACK, GO_TO_PLAYSTORE
}

message Action {
  enum Type {
    TOUCH = 0;
    AUTOMATED = 1;
    // SOFT_KEYBOARD, HARD_KEYBOARD, ASSIST
  }
  enum Touch {
    TAP = 0;
    LONGPRESS = 1;
    DRAGDROP = 2;
    SWIPE = 3;
    FLING = 4;
    PINCH = 5;
  }
  optional Type type = 1;
  optional Touch touch = 2;
}

//
// Context free grammar of typical user interaction:
//         Action (Touch) + Target
//         Action (Touch) + Target + Target
//
message LauncherEvent {

  required Action action = 1;

  // List of targets that touch actions can be operated on.
  optional Target src_target = 2;
  optional Target dest_target = 3;

  optional int64 action_duration_millis = 4;
  optional int64 elapsed_container_millis = 5;
  optional int64 elapsed_session_millis = 6;
}