summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Susi Kharraz-Post <susikp@google.com> 2020-04-13 08:09:15 -0400
committer Susi Kharraz-Post <susikp@google.com> 2020-04-13 10:05:29 -0400
commit3ddadd8f3c4637c1e3188a5ee21b7acea9b6d2af (patch)
tree6a40261904f50bdcee3d8f4ee113c8da5d4afa4a
parentaec74e1a6260a0898a29662daab58f48fb968eb2 (diff)
Rename sharesheet started atom proto fields.
When copying over the fields into Google3 the linter failed on two field names that are camel case rather than snake case. Changing here so the two match. In addition, one of the enum fields didn't have a default value. Bug: 147508495 Test: compiles + ChooserActivityTest runs Change-Id: Iacec9654350763e691a4a10087f693839fd5ea83
-rw-r--r--cmds/statsd/src/atoms.proto5
-rw-r--r--core/java/com/android/internal/app/ChooserActivityLogger.java3
2 files changed, 5 insertions, 3 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto
index 453ddeb332af..1f090fda2ce7 100644
--- a/cmds/statsd/src/atoms.proto
+++ b/cmds/statsd/src/atoms.proto
@@ -9249,12 +9249,13 @@ message SharesheetStarted {
optional bool is_workprofile = 7;
enum SharesheetPreviewType { // Constants from ChooserActivity.java
+ CONTENT_PREVIEW_TYPE_UNKNOWN = 0; // Default for proto 2 / 3 compatibility.
CONTENT_PREVIEW_IMAGE = 1; // The preview shown in the sharesheet is an image.
CONTENT_PREVIEW_FILE = 2; // The preview shown in the sharesheet is a file.
CONTENT_PREVIEW_TEXT = 3; // The preview shown in the sharesheet is text.
}
// How the sharesheet preview is presented.
- optional SharesheetPreviewType previewType = 8;
+ optional SharesheetPreviewType preview_type = 8;
enum ResolverActivityIntent { // Intents handled by ResolverActivity.java
INTENT_DEFAULT = 0;
@@ -9267,7 +9268,7 @@ message SharesheetStarted {
INTENT_ACTION_MAIN = 7;
}
// The intent being processed (only SEND and SEND_MULTIPLE are system sharesheet)
- optional ResolverActivityIntent intentType = 9;
+ optional ResolverActivityIntent intent_type = 9;
}
/**
diff --git a/core/java/com/android/internal/app/ChooserActivityLogger.java b/core/java/com/android/internal/app/ChooserActivityLogger.java
index 088973cde3e9..c26bac437915 100644
--- a/core/java/com/android/internal/app/ChooserActivityLogger.java
+++ b/core/java/com/android/internal/app/ChooserActivityLogger.java
@@ -182,7 +182,8 @@ public interface ChooserActivityLogger {
return FrameworkStatsLog.SHARESHEET_STARTED__PREVIEW_TYPE__CONTENT_PREVIEW_FILE;
case ChooserActivity.CONTENT_PREVIEW_TEXT:
default:
- return FrameworkStatsLog.SHARESHEET_STARTED__PREVIEW_TYPE__CONTENT_PREVIEW_TEXT;
+ return FrameworkStatsLog
+ .SHARESHEET_STARTED__PREVIEW_TYPE__CONTENT_PREVIEW_TYPE_UNKNOWN;
}
}