diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-10-26 07:12:13 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-10-26 07:12:13 +0000 |
commit | 0151abc2f1d148e713c3d976cd5678551d747ab8 (patch) | |
tree | dd85224df6ce507773e36743cc710ce1779af18f | |
parent | 03afa3d979eb36f45ec8cbc358367f9b59efeb00 (diff) | |
parent | debc3f4106d649132f21c3ffac716f1ec344472a (diff) | |
download | analytics-library-0151abc2f1d148e713c3d976cd5678551d747ab8.tar.gz |
Snap for 11006628 from debc3f4106d649132f21c3ffac716f1ec344472a to studio-iguana-release
Change-Id: Ib7ccc09cf9959ecfca01aa8972ef85beb6a46499
-rw-r--r-- | crash/lint_baseline.xml | 16 | ||||
-rw-r--r-- | inspector/lint_baseline.xml | 13 | ||||
-rw-r--r-- | protos/src/main/proto/analytics_enums.proto | 5 | ||||
-rw-r--r-- | protos/src/main/proto/studio_stats.proto | 220 | ||||
-rw-r--r-- | publisher/lint_baseline.xml | 13 | ||||
-rw-r--r-- | shared/lint_baseline.xml | 9 | ||||
-rw-r--r-- | tracker/lint_baseline.xml | 23 |
7 files changed, 229 insertions, 70 deletions
diff --git a/crash/lint_baseline.xml b/crash/lint_baseline.xml index cb2e4a5..0697862 100644 --- a/crash/lint_baseline.xml +++ b/crash/lint_baseline.xml @@ -1,20 +1,26 @@ <?xml version="1.0" encoding="UTF-8"?> -<issues format="5" by="lint 4.2.0-dev"> +<issues format="6" by="lint 8.3.0-dev" type="baseline" client="" dependencies="true" name="" variant="all" version="8.3.0-dev"> <issue id="ConstantLocale" - message="Assigning `Locale.getDefault()` to a final static field is suspicious; this code will not work correctly if the user changes locale while the app is running"> + message="Assigning `Locale.getDefault()` to a final static field is suspicious; this code will not work correctly if the user changes locale while the app is running" + errorLine1=" private static final String LOCALE = Locale.getDefault() == null ? "unknown" : Locale.getDefault().toString();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> <location file="src/main/java/com/android/tools/analytics/crash/GoogleCrashReporter.java" - line="60"/> + line="69" + column="40"/> </issue> <issue id="ConstantLocale" - message="Assigning `Locale.getDefault()` to a final static field is suspicious; this code will not work correctly if the user changes locale while the app is running"> + message="Assigning `Locale.getDefault()` to a final static field is suspicious; this code will not work correctly if the user changes locale while the app is running" + errorLine1=" private static final String LOCALE = Locale.getDefault() == null ? "unknown" : Locale.getDefault().toString();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> <location file="src/main/java/com/android/tools/analytics/crash/GoogleCrashReporter.java" - line="60"/> + line="69" + column="82"/> </issue> </issues> diff --git a/inspector/lint_baseline.xml b/inspector/lint_baseline.xml index b04e711..fe181e0 100644 --- a/inspector/lint_baseline.xml +++ b/inspector/lint_baseline.xml @@ -1,11 +1,4 @@ -<!-- -This is an empty baseline file, used by modules that don't have any preexisting Lint issues. +<?xml version="1.0" encoding="UTF-8"?> +<issues format="6" by="lint 8.3.0-dev" type="baseline" client="" dependencies="true" name="" variant="all" version="8.3.0-dev"> -It exists, because providing a baseline is how Bazel targets opt into running Lint on their -source code, and to allow the introduction of new lint checks without having to fix every -problem before being able to land the check. - -Please don't add anything here. If your change introduces a Lint warning, suppress it with -@Suppress (in Koltin) or @SuppressWarnings (in Java) and include a comment explaining why -Lint was wrong. Please also consider fixing Lint if you see false positives. ---> +</issues> diff --git a/protos/src/main/proto/analytics_enums.proto b/protos/src/main/proto/analytics_enums.proto index 5791975..5e7066f 100644 --- a/protos/src/main/proto/analytics_enums.proto +++ b/protos/src/main/proto/analytics_enums.proto @@ -863,4 +863,9 @@ enum VariantPropertiesMethodType { MISSING_DIMENSION_STRATEGY = 136; DEBUGGABLE = 137; TESTED_APKS = 138; + SINGLE_TO_LISTEN_TO = 139; + MULTIPLE_TO_LISTEN_TO = 140; + WIRED_WITH_MULTIPLE = 141; + LIFECYCLE_TASKS = 142; + REGISTER_PRE_BUILD = 143; } diff --git a/protos/src/main/proto/studio_stats.proto b/protos/src/main/proto/studio_stats.proto index 5d821f9..6c5eb8e 100644 --- a/protos/src/main/proto/studio_stats.proto +++ b/protos/src/main/proto/studio_stats.proto @@ -627,6 +627,9 @@ message AndroidStudioEvent { // set when kind = SML_AI_EXCLUDE_EVENT optional SmlAiExcludeEvent sml_ai_exclude_event = 181; + // set when kind = I_DEVICE_USAGE_EVENT + optional IDeviceUsageEvent i_device_usage_event = 182; + enum EventCategory { // The event was not grouped into any specific category (default). NO_EVENT_CATEGORY = 0; @@ -1424,6 +1427,9 @@ message AndroidStudioEvent { // Event for Studio Bot aiexclude effects SML_AI_EXCLUDE_EVENT = 297; + + // Event for IDevice interface usage + I_DEVICE_USAGE_EVENT = 298; } // Represents different Performance Monitoring types. @@ -1760,6 +1766,13 @@ message AndroidStudioEvent { MULTIPLE_ANDROID_PLUGIN_VERSIONS = 38; ANDROID_SYNC_NO_VALID_NATIVE_ABI_FOUND = 39; ANDROID_SYNC_NO_VARIANTS_FOUND = 40; + ANDROID_SYNC_JDK_IMPORT_CHECK = 41; + // Next 2 are health check values helping to detect that some reasons remain + // unreported properly. Ideally counts of these should be next to 0. Report + // this when no specific value was reported but build issue was generated. + BUILD_ISSUE_CREATED_UNKNOWN_FAILURE = 42; + // Same as above but we also see it was generated by Android Studio code. + ANDROID_BUILD_ISSUE_CREATED_UNKNOWN_FAILURE = 43; } // IDE brand containing the android plugin @@ -5650,10 +5663,23 @@ message VisualLintEvent { CANCEL_BACKGROUND_ANALYSIS = 9; } + // Possible origins for visual lint event + enum EventOrigin { + UNKNOWN_ORIGIN = 0; + XML_LINTING = 1; + UI_CHECK = 2; + } + // The type of the visual lint issue affected by this event optional IssueType issue_type = 1; // The kind of event affecting the issue optional IssueEvent issue_event = 2; + // The origin that triggered the visual lint event + optional EventOrigin event_origin = 3; + // The time it took for UI Check mode to start in ms + optional int64 ui_check_start_time_ms = 4; + // The number of visible previews in UI Check + optional int32 visible_previews_number = 5; } message UniversalProblemsPanelEvent { @@ -5678,6 +5704,8 @@ message UniversalProblemsPanelEvent { PROJECT_ERRORS = 2; // This is the shared issue panel, used by compose, layout editor, etc. DESIGN_TOOLS = 3; + // UI Check mode tab + UI_CHECK = 4; } // Event of triggering navigatable of an issue. This is usually done by double @@ -13479,65 +13507,107 @@ message SmlResponseMetadata { } message SmlCompletionEvent { + // DEPRECATED Use CompletionAggregateEvent instead message CompletionRequest { - enum Trigger { - UNKNOWN = 0; - - // User explicitly triggered completion - USER = 1; + option deprecated = true; - // Completion was automatically triggered - AUTOMATIC = 2; + enum Trigger { + UNKNOWN = 0 [deprecated = true]; + USER = 1 [deprecated = true]; + AUTOMATIC = 2 [deprecated = true]; } - optional Trigger trigger = 1; - optional EditorFileType file_type = 2; - - // Length of prefix (# of chars before cursor) included in the request - optional uint32 prefix_length = 3; - - // Length of suffix (# of chars after cursor) included in the request - optional uint32 suffix_length = 4; + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional Trigger trigger = 1 [deprecated = true]; + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional EditorFileType file_type = 2 [deprecated = true]; + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional uint32 prefix_length = 3 [deprecated = true]; + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional uint32 suffix_length = 4 [deprecated = true]; } + // DEPRECATED Use CompletionAggregateEvent instead message CompletionError { - optional int32 status_code = 1; + option deprecated = true; + + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional int32 status_code = 1 [deprecated = true]; } + // DEPRECATED Use CompletionAggregateEvent instead message CompletionResult { - optional SmlResponseMetadata metadata = 1; - optional uint64 latency_ms = 2; - optional int32 num_completions = 3; + option deprecated = true; + + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional SmlResponseMetadata metadata = 1 [deprecated = true]; + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional uint64 latency_ms = 2 [deprecated = true]; + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional int32 num_completions = 3 [deprecated = true]; } + // DEPRECATED Use CompletionAggregateEvent instead message CompletionResponse { - oneof response { - CompletionResult result = 1; - CompletionError backend_error = 2; - } + option deprecated = true; + + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional CompletionResult result = 1 [deprecated = true]; + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional CompletionError backend_error = 2 [deprecated = true]; } + // DEPRECATED Use CompletionAggregateEvent instead message CompletionShown { - optional SmlResponseMetadata metadata = 1; - optional int32 shown_suggestion_index = 2; + option deprecated = true; + + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional SmlResponseMetadata metadata = 1 [deprecated = true]; + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional int32 shown_suggestion_index = 2 [deprecated = true]; } + // DEPRECATED Use CompletionAggregateEvent instead message CompletionAccepted { - optional SmlResponseMetadata metadata = 1; + option deprecated = true; - // Index of the accepted suggestion from the multiple suggestions in the - // response - optional int32 accepted_suggestion_index = 2; + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional SmlResponseMetadata metadata = 1 [deprecated = true]; + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional int32 accepted_suggestion_index = 2 [deprecated = true]; + // Historical: Not used starting with Android Studio 2023.2.1.11 + optional int32 accepted_suggestion_length = 3 [deprecated = true]; + } + + message CompletionAggregateEvent { + enum Trigger { + UNKNOWN = 0; + + // User explicitly triggered completion + USER = 1; - // Length (# of chars) of the accepted suggestion - optional int32 accepted_suggestion_length = 3; + // Completion was automatically triggered + AUTOMATIC = 2; + } + + optional string model_id = 1; + optional Trigger trigger = 2; + optional EditorFileType file_type = 3; + optional uint32 completions_shown = 4; + optional uint32 completions_accepted = 5; + optional Histogram latencies_ms = 6; } oneof completion { - CompletionRequest request = 1; - CompletionResponse response = 2; - CompletionShown shown = 3; - CompletionAccepted accepted = 4; + // Historical: Not used starting with Android Studio 2023.2.1.11 + CompletionRequest request = 1 [deprecated = true]; + // Historical: Not used starting with Android Studio 2023.2.1.11 + CompletionResponse response = 2 [deprecated = true]; + // Historical: Not used starting with Android Studio 2023.2.1.11 + CompletionShown shown = 3 [deprecated = true]; + // Historical: Not used starting with Android Studio 2023.2.1.11 + CompletionAccepted accepted = 4 [deprecated = true]; + CompletionAggregateEvent aggregate = 5; } } @@ -13747,6 +13817,86 @@ message SmlAiExcludeEvent { optional bool context_blocked = 4; } +message IDeviceUsageEvent { + // Identifier of the `IDevice` method + enum Method { + METHOD_UNSPECIFIED = 0; + GET_NAME = 1; + EXECUTE_SHELL_COMMAND_1 = 2; + EXECUTE_SHELL_COMMAND_2 = 3; + EXECUTE_SHELL_COMMAND_3 = 4; + EXECUTE_SHELL_COMMAND_4 = 5; + EXECUTE_SHELL_COMMAND_5 = 6; + GET_SYSTEM_PROPERTY = 7; + GET_SERIAL_NUMBER = 8; + GET_AVD_NAME = 9; + GET_AVD_PATH = 10; + GET_AVD_DATA = 11; + CREATE_AVD_DATA = 12; + GET_STATE = 13; + GET_PROPERTIES = 14; + GET_PROPERTY_COUNT = 15; + GET_PROPERTY = 16; + ARE_PROPERTIES_SET = 17; + SUPPORTS_FEATURE_1 = 18; + SUPPORTS_FEATURE_2 = 19; + SERVICES = 20; + TO_STRING = 21; + IS_ONLINE = 22; + IS_EMULATOR = 23; + IS_OFFLINE = 24; + IS_BOOT_LOADER = 25; + GET_CLIENTS = 26; + GET_CLIENT = 27; + GET_PROFILEABLE_CLIENTS = 28; + CREATE_FORWARD_1 = 29; + CREATE_FORWARD_2 = 30; + REMOVE_FORWARD = 31; + GET_CLIENT_NAME = 32; + PUSH_FILE = 33; + PULL_FILE = 34; + INSTALL_PACKAGE_1 = 35; + INSTALL_PACKAGE_2 = 36; + INSTALL_PACKAGE_3 = 37; + INSTALL_PACKAGES_1 = 38; + INSTALL_PACKAGES_2 = 39; + GET_LAST_INSTALL_METRICS = 40; + SYNC_PACKAGE_TO_DEVICE = 41; + INSTALL_REMOTE_PACKAGE = 42; + REMOVE_REMOTE_PACKAGE = 43; + UNINSTALL_PACKAGE = 44; + UNINSTALL_APP = 45; + ROOT = 46; + FORCE_STOP = 47; + KILL = 48; + IS_ROOT = 49; + GET_ABIS = 50; + GET_DENSITY = 51; + GET_VERSION = 52; + EXECUTE_REMOTE_COMMAND_1 = 53; + EXECUTE_REMOTE_COMMAND_2 = 54; + EXECUTE_REMOTE_COMMAND_3 = 55; + EXECUTE_REMOTE_COMMAND_4 = 56; + RAW_EXEC2 = 57; + } + + // Whether this event is coming from `AdblibIDeviceWrapper` or `DeviceImpl` + enum SourceType { + SOURCE_TYPE_UNSPECIFIED = 0; + DEVICE_IMPL = 1; + ADBLIB_I_DEVICE_WRAPPER = 2; + } + + // 'IDevice' method + optional Method method = 1; + + // `IDevice` implementation + optional SourceType source_type = 2; + + // Whether method threw an exception + optional bool is_exception = 3; +} + message KotlinSupportDeclined { // template renderer used optional AndroidStudioEvent.TemplateRenderer template_renderer = 1; diff --git a/publisher/lint_baseline.xml b/publisher/lint_baseline.xml index b04e711..fe181e0 100644 --- a/publisher/lint_baseline.xml +++ b/publisher/lint_baseline.xml @@ -1,11 +1,4 @@ -<!-- -This is an empty baseline file, used by modules that don't have any preexisting Lint issues. +<?xml version="1.0" encoding="UTF-8"?> +<issues format="6" by="lint 8.3.0-dev" type="baseline" client="" dependencies="true" name="" variant="all" version="8.3.0-dev"> -It exists, because providing a baseline is how Bazel targets opt into running Lint on their -source code, and to allow the introduction of new lint checks without having to fix every -problem before being able to land the check. - -Please don't add anything here. If your change introduces a Lint warning, suppress it with -@Suppress (in Koltin) or @SuppressWarnings (in Java) and include a comment explaining why -Lint was wrong. Please also consider fixing Lint if you see false positives. ---> +</issues> diff --git a/shared/lint_baseline.xml b/shared/lint_baseline.xml index 2feccab..10ff5db 100644 --- a/shared/lint_baseline.xml +++ b/shared/lint_baseline.xml @@ -1,12 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> -<issues format="5" by="lint 4.2.0-dev"> +<issues format="6" by="lint 8.3.0-dev" type="baseline" client="" dependencies="true" name="" variant="all" version="8.3.0-dev"> <issue id="DefaultLocale" - message="Implicitly using the default locale is a common source of bugs: Use `toLowerCase(Locale)` instead. For strings meant to be internal use `Locale.ROOT`, otherwise `Locale.getDefault()`."> + message="Implicitly using the default locale is a common source of bugs: Use `toLowerCase(Locale)` instead. For strings meant to be internal use `Locale.ROOT`, otherwise `Locale.getDefault()`." + errorLine1=" val os = Environment.instance.getSystemProperty(Environment.SystemProperty.OS_NAME)!!.toLowerCase()" + errorLine2=" ~~~~~~~~~~~"> <location file="src/main/java/com/android/tools/analytics/CommonMetricsData.kt" - line="57"/> + line="68" + column="93"/> </issue> </issues> diff --git a/tracker/lint_baseline.xml b/tracker/lint_baseline.xml index 7b46f3a..99c8dba 100644 --- a/tracker/lint_baseline.xml +++ b/tracker/lint_baseline.xml @@ -1,28 +1,37 @@ <?xml version="1.0" encoding="UTF-8"?> -<issues format="5" by="lint 7.2.0-dev"> +<issues format="6" by="lint 8.3.0-dev" type="baseline" client="" dependencies="true" name="" variant="all" version="8.3.0-dev"> <issue id="VisibleForTests" - message="This method should only be accessed from tests or within private scope"> + message="This method should only be accessed from tests or within private scope" + errorLine1=" writer = JournalingUsageTracker(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> <location file="src/main/java/com/android/tools/analytics/UsageTracker.kt" - line="273"/> + line="273" + column="26"/> </issue> <issue id="VisibleForTests" - message="This method should only be accessed from tests or within private scope"> + message="This method should only be accessed from tests or within private scope" + errorLine1=" studioEvent.studioSessionId = UsageTracker.sessionId" + errorLine2=" ~~~~~~~~~"> <location file="src/main/java/com/android/tools/analytics/UsageTrackerWriter.kt" - line="43"/> + line="43" + column="52"/> </issue> <issue id="VisibleForTests" - message="This method should only be accessed from tests or within private scope"> + message="This method should only be accessed from tests or within private scope" + errorLine1=" studioEvent.studioSessionId = UsageTracker.sessionId" + errorLine2=" ~~~~~~~~~"> <location file="src/main/java/com/android/tools/analytics/UsageTrackerWriter.kt" - line="43"/> + line="43" + column="52"/> </issue> </issues> |