Merge "Add StyleUIChanged field to atoms.proto"

This commit is contained in:
Hyunyoung Song
2019-02-25 21:59:59 +00:00
committed by Android (Google) Code Review
4 changed files with 87 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ import "frameworks/base/core/proto/android/stats/docsui/docsui_enums.proto";
import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy.proto";
import "frameworks/base/core/proto/android/stats/devicepolicy/device_policy_enums.proto";
import "frameworks/base/core/proto/android/stats/launcher/launcher.proto";
import "frameworks/base/core/proto/android/stats/style/style_enums.proto";
import "frameworks/base/core/proto/android/telecomm/enums.proto";
import "frameworks/base/core/proto/android/telephony/enums.proto";
import "frameworks/base/core/proto/android/view/enums.proto";
@@ -247,6 +248,7 @@ message Atom {
AssistGestureProgressReported assist_gesture_progress_reported = 176;
TouchGestureClassified touch_gesture_classified = 177;
HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true];
StyleUIChanged style_ui_changed = 179;
}
// Pulled events will start at field 10000.
@@ -2349,6 +2351,17 @@ message LauncherUIChanged {
optional bool is_swipe_up_enabled = 5;
}
message StyleUIChanged {
optional android.stats.style.Action action = 1;
optional int32 color_package_hash = 2;
optional int32 font_package_hash = 3;
optional int32 shape_package_hash = 4;
optional int32 clock_package_hash = 5;
optional int32 launcher_grid = 6;
optional int32 wallpaper_category_hash = 7;
optional int32 wallpaper_id_hash = 8;
}
/**
* Logs when Settings UI has changed.
*

View File

@@ -0,0 +1,27 @@
// Copyright (C) 2019 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.
java_library {
name: "styleprotosnano",
proto: {
type: "nano",
output_params: ["store_unknown_fields=true"],
include_dirs: ["external/protobuf/src"],
},
sdk_version: "current",
srcs: [
"*.proto",
],
}

View File

@@ -0,0 +1,34 @@
/*
* Copyright (C) 2019 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";
package android.stats.style;
option java_multiple_files = true;
enum Action {
DEFAULT_ACTION = 0;
ONRESUME = 1;
ONSTOP = 2;
PICKER_SELECT = 3;
PICKER_APPLIED = 4;
WALLPAPER_OPEN_CATEGORY = 5;
WALLPAPER_SELECT = 6;
WALLPAPER_APPLIED = 7;
WALLPAPER_EXPLORE = 8;
WALLPAPER_DOWNLOAD = 9;
WALLPAPER_REMOVE = 10;
}

View File

@@ -32,4 +32,17 @@ public class StatsLogCompat {
StatsLog.write(19, action, srcState, dstState, extension,
swipeUpEnabled);
}
/**
* StatsLog.write(StatsLog.STYLE_EVENT, action, colorPackageHash,
* fontPackageHash, shapePackageHash, clockPackageHash,
* launcherGrid, wallpaperCategoryHash, wallpaperIdHash);
*/
public static void write(int action, int colorPackageHash,
int fontPackageHash, int shapePackageHash, int clockPackageHash,
int launcherGrid, int wallpaperCategoryHash, int wallpaperIdHash) {
StatsLog.write(179, action, colorPackageHash,
fontPackageHash, shapePackageHash, clockPackageHash,
launcherGrid, wallpaperCategoryHash, wallpaperIdHash);
}
}