Files
lawnchair/protos/launcher_atom.proto
thiruram 62c7b5c8f7 Adds WW logging for QSB search results & all-apps predicted row.
SearchResultContainer represents apps rows displayed within QSB search results for both default scenario(without search term) and actual search result(with search term).

SearchResultContainer is used for both homescreen QSB and all-apps QSB.

Follow up CLs will add searchOrigin and queryLength in SearchResultContainer

Bug: 152978018
Change-Id: Id5f96490686c4141e3e6b2516907ac0505a777e6
2020-05-27 20:29:40 -07:00

224 lines
7.2 KiB
Protocol Buffer

/*
* Copyright (C) 2020 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.logger";
option java_outer_classname = "LauncherAtom";
//
// ItemInfos
message ItemInfo {
oneof Item {
Application application = 1;
Task task = 2;
Shortcut shortcut = 3;
Widget widget = 4;
FolderIcon folder_icon = 9;
}
// When used for launch event, stores the global predictive rank
optional int32 rank = 5;
// Stores whether the Item belows to non primary user
optional bool is_work = 6;
// Item can be child node to parent container or parent containers (nested)
optional ContainerInfo container_info = 7;
// Stores the origin of the Item
optional Origin source = 8;
}
// Represents various launcher surface where items are placed.
message ContainerInfo {
oneof Container {
WorkspaceContainer workspace = 1;
HotseatContainer hotseat = 2;
FolderContainer folder = 3;
AllAppsContainer all_apps_container = 4;
WidgetsContainer widgets_container = 5;
PredictionContainer prediction_container = 6;
SearchResultContainer search_result_container = 7;
}
}
// Represents the apps list sorted alphabetically inside the all-apps view.
message AllAppsContainer {
}
message WidgetsContainer {
}
// Represents the predicted apps row(top row) in the all-apps view.
message PredictionContainer {
}
// Represents the apps container within search results.
message SearchResultContainer {
}
enum Origin {
UNKNOWN = 0;
DEFAULT_LAYOUT = 1; // icon automatically placed in workspace, folder, hotseat
BACKUP_RESTORE = 2; // icon layout restored from backup
PINITEM = 3; // from another app (e.g., Chrome's "Add to Home screen")
ALLAPPS_ATOZ = 4; // within launcher surface, all aps a-z
WIDGETS = 5; // within launcher, widgets tray
ADD_TO_HOMESCREEN = 6; // play install + launcher home setting
ALLAPPS_PREDICTION = 7; // from prediction bar in all apps container
HOTSEAT_PREDICTION = 8; // from prediction bar in hotseat container
}
// Main app icons
message Application {
optional string package_name = 1;
optional string component_name = 2;
}
// Legacy shortcuts and shortcuts handled by ShortcutManager
message Shortcut {
optional string shortcut_name = 1;
}
// AppWidgets handled by AppWidgetManager
message Widget {
optional int32 span_x = 1 [default = 1];
optional int32 span_y = 2 [default = 1];
optional int32 app_widget_id = 3;
optional string package_name = 4; // only populated during snapshot if from workspace
optional string component_name = 5; // only populated during snapshot if from workspace
}
// Tasks handled by PackageManager
message Task {
optional string package_name = 1;
optional string component_name = 2;
optional int32 index = 3;
}
// Represents folder in a closed state.
message FolderIcon {
// Number of items inside folder.
optional int32 cardinality = 1;
// State of the folder label before the event.
optional FromState from_label_state = 2;
// State of the folder label after the event.
optional ToState to_label_state = 3;
// Details about actual folder label.
// Populated when folder label is not a PII.
optional string label_info = 4;
}
//////////////////////////////////////////////
// Containers
message WorkspaceContainer {
optional int32 page_index = 1 [default = -2]; // range [-1, l], 0 is the index of the main homescreen
optional int32 grid_x = 2 [default = -1]; // [0, m], m varies based on the display density and resolution
optional int32 grid_y = 3 [default = -1]; // [0, n], n varies based on the display density and resolution
}
message HotseatContainer {
optional int32 index = 1;
}
message FolderContainer {
optional int32 page_index = 1 [default = -1];
optional int32 grid_x = 2 [default = -1];
optional int32 grid_y = 3 [default = -1];
oneof ParentContainer {
WorkspaceContainer workspace = 4;
HotseatContainer hotseat = 5;
}
}
// Represents state of EditText field before update.
enum FromState {
// Default value.
// Used when a FromState is not applicable, for example, during folder creation.
FROM_STATE_UNSPECIFIED = 0;
// EditText was empty.
// Eg: When a folder label is updated from empty string.
FROM_EMPTY = 1;
// EditText was non-empty and manually entered by the user.
// Eg: When a folder label is updated from a user-entered value.
FROM_CUSTOM = 2;
// EditText was non-empty and one of the suggestions.
// Eg: When a folder label is updated from a suggested value.
FROM_SUGGESTED = 3;
}
// Represents state of EditText field after update.
enum ToState {
// Default value.
// Used when ToState is not applicable, for example, when folder label is updated to a different
// value when folder label suggestion feature is disabled.
TO_STATE_UNSPECIFIED = 0;
// User attempted to change the EditText, but was not changed.
UNCHANGED = 1;
// New label matches with primary(aka top) suggestion.
TO_SUGGESTION0 = 2;
// New value matches with second top suggestion even though the top suggestion was non-empty.
TO_SUGGESTION1_WITH_VALID_PRIMARY = 3;
// New value matches with second top suggestion given that top suggestion was empty.
TO_SUGGESTION1_WITH_EMPTY_PRIMARY = 4;
// New value matches with third top suggestion even though the top suggestion was non-empty.
TO_SUGGESTION2_WITH_VALID_PRIMARY = 5;
// New value matches with third top suggestion given that top suggestion was empty.
TO_SUGGESTION2_WITH_EMPTY_PRIMARY = 6;
// New value matches with 4th top suggestion even though the top suggestion was non-empty.
TO_SUGGESTION3_WITH_VALID_PRIMARY = 7;
// New value matches with 4th top suggestion given that top suggestion was empty.
TO_SUGGESTION3_WITH_EMPTY_PRIMARY = 8;
// New value is empty even though the top suggestion was non-empty.
TO_EMPTY_WITH_VALID_PRIMARY = 9;
// New value is empty given that top suggestion was empty.
TO_EMPTY_WITH_VALID_SUGGESTIONS_AND_EMPTY_PRIMARY = 10;
// New value is empty given that no suggestions were provided.
TO_EMPTY_WITH_EMPTY_SUGGESTIONS = 11;
// New value is empty given that suggestions feature was disabled.
TO_EMPTY_WITH_SUGGESTIONS_DISABLED = 12;
// New value is non-empty and does not match with any of the suggestions even though the top suggestion was non-empty.
TO_CUSTOM_WITH_VALID_PRIMARY = 13;
// New value is non-empty and not match with any suggestions given that top suggestion was empty.
TO_CUSTOM_WITH_VALID_SUGGESTIONS_AND_EMPTY_PRIMARY = 14;
// New value is non-empty and also no suggestions were provided.
TO_CUSTOM_WITH_EMPTY_SUGGESTIONS = 15;
// New value is non-empty and also suggestions feature was disable.
TO_CUSTOM_WITH_SUGGESTIONS_DISABLED = 16;
}