diff options
| author | 2023-03-08 21:35:52 +0000 | |
|---|---|---|
| committer | 2023-03-08 21:35:52 +0000 | |
| commit | ba90594be4b26f299f190a07f2dd9abddc55a203 (patch) | |
| tree | 782b4766e6ad3b7264d4e144410f7e9b1d1e7cb6 /services/credentials/java | |
| parent | 67cba8f8ac3dd6bae580eef454a676f2ce094085 (diff) | |
| parent | 5cae01d5b32d6ca3dc4f06c9a954a31b812d3f7b (diff) | |
Merge "Browsing Phase Data Type to Store Information" into udc-dev
Diffstat (limited to 'services/credentials/java')
| -rw-r--r-- | services/credentials/java/com/android/server/credentials/metrics/CandidateBrowsingPhaseMetric.java | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/services/credentials/java/com/android/server/credentials/metrics/CandidateBrowsingPhaseMetric.java b/services/credentials/java/com/android/server/credentials/metrics/CandidateBrowsingPhaseMetric.java new file mode 100644 index 000000000000..37ec8f06c3eb --- /dev/null +++ b/services/credentials/java/com/android/server/credentials/metrics/CandidateBrowsingPhaseMetric.java @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2023 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. + */ + +package com.android.server.credentials.metrics; + +/** + * A part of the Candidate Phase, but emitted alongside {@link ChosenProviderMetric}. The user is + * shown various entries from the provider responses, and may selectively browse through many + * entries. It is possible that the initial set of browsing is for a provider that is ultimately + * not chosen. This metric will be gathered PER browsing click, and aggregated, so that we can + * understand where user interaction is more cumbersome, informing us for future improvements. This + * can only be complete when the browsing is finished, ending in a final user choice, or possibly + * a cancellation. Thus, this will be collected and emitted in the final phase, though collection + * will begin in the candidate phase when the user begins browsing options. + */ +public class CandidateBrowsingPhaseMetric { + + private static final String TAG = "CandidateSelectionPhaseMetric"; + private static final int SEQUENCE_ID = 3; + // The session id associated with the API Call this candidate provider is a part of, default -1 + private int mSessionId = -1; + // The EntryEnum that was pressed, defaults to -1 (TODO immediately, generate entry enum). + private int mEntryEnum = -1; + // The provider associated with the press, defaults to -1 + private int mProviderUid = -1; + + /* -- The session ID -- */ + + public void setSessionId(int sessionId) { + mSessionId = sessionId; + } + + public int getSessionId() { + return mSessionId; + } + + /* -- The sequence ID -- */ + + public int getSequenceId() { + return SEQUENCE_ID; + } + + /* -- The Entry of this tap -- */ + + public void setEntryEnum(int entryEnum) { + mEntryEnum = entryEnum; + } + + public int getEntryEnum() { + return mEntryEnum; + } + + /* -- The Provider UID of this Tap -- */ + + public void setProviderUid(int providerUid) { + mProviderUid = providerUid; + } + + public int getProviderUid() { + return mProviderUid; + } +} |