1 /*
2  * Copyright (C) 2024 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 
17 package com.android.traceur;
18 
19 public final class MessageConstants {
20     // Message bundle `what` values to signal to BindableTraceService what action to take
21     public static final int START_WHAT = 0;
22     public static final int STOP_WHAT = 1;
23     public static final int SHARE_WHAT = 2;
24 
25     // Package / Service names so Traceur and SystemUI can interact with each other
26     // and grant URI permissions accordingly
27     public static final String TRACING_APP_PACKAGE_NAME = "com.android.traceur";
28     public static final String TRACING_APP_ACTIVITY = TRACING_APP_PACKAGE_NAME +
29             ".BindableTraceService";
30     public static final String SYSTEM_UI_PACKAGE_NAME = "com.android.systemui";
31 
32     // The winscope and perfetto extras are for uris that Traceur is allowing SystemUI to share.
33     public static final String EXTRA_WINSCOPE = TRACING_APP_PACKAGE_NAME + ".WINSCOPE_ZIP";
34     public static final String EXTRA_PERFETTO = TRACING_APP_PACKAGE_NAME + ".PERFETTO";
35 
36     // Trace type is used during trace start to tell Traceur which type of trace the user has
37     // selected (battery, performance, ui, thermal, etc.)
38     public static final String INTENT_EXTRA_TRACE_TYPE = TRACING_APP_PACKAGE_NAME + ".trace_type";
39 }
40