1 /* 2 * Copyright (C) 2023 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.server.credentials.metrics; 18 19 /** 20 * A part of the Candidate Phase, but emitted alongside {@link ChosenProviderFinalPhaseMetric}. 21 * The user is shown various entries from the provider responses, and may selectively browse through 22 * many entries. It is possible that the initial set of browsing is for a provider that is 23 * ultimately not chosen. This metric will be gathered PER browsing click, and aggregated, so that 24 * we can understand where user interaction is more cumbersome, informing us for future 25 * improvements. This can only be complete when the browsing is finished, ending in a final user 26 * choice, or possibly a cancellation. Thus, this will be collected and emitted in the final phase, 27 * though collection will begin in the candidate phase when the user begins browsing options. 28 */ 29 public class CandidateBrowsingPhaseMetric { 30 // The EntryEnum that was pressed, defaults to -1 31 private int mEntryEnum = EntryEnum.UNKNOWN.getMetricCode(); 32 // The provider associated with the press, defaults to -1 33 private int mProviderUid = -1; 34 35 /* -- The Entry of this tap -- */ 36 setEntryEnum(int entryEnum)37 public void setEntryEnum(int entryEnum) { 38 mEntryEnum = entryEnum; 39 } 40 getEntryEnum()41 public int getEntryEnum() { 42 return mEntryEnum; 43 } 44 45 /* -- The Provider UID of this Tap -- */ 46 setProviderUid(int providerUid)47 public void setProviderUid(int providerUid) { 48 mProviderUid = providerUid; 49 } 50 getProviderUid()51 public int getProviderUid() { 52 return mProviderUid; 53 } 54 } 55