Merge "Add Tron logging for open/close App Disambig" into nyc-mr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
f4f15d582a
@@ -69,9 +69,13 @@ import android.widget.ImageView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.internal.logging.MetricsProto;
|
||||
import com.android.internal.widget.ResolverDrawerLayout;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
@@ -359,6 +363,11 @@ public class ResolverActivity extends Activity {
|
||||
if (isVoiceInteraction()) {
|
||||
onSetupVoiceInteraction();
|
||||
}
|
||||
MetricsLogger.action(this, mAdapter.hasFilteredItem()
|
||||
? MetricsProto.MetricsEvent.ACTION_SHOW_APP_DISAMBIG_APP_FEATURED
|
||||
: MetricsProto.MetricsEvent.ACTION_SHOW_APP_DISAMBIG_NONE_FEATURED,
|
||||
intent.getAction() + ":" + intent.getType() + ":"
|
||||
+ Arrays.toString(intent.getCategories().toArray()));
|
||||
}
|
||||
|
||||
public final void setFilteredComponents(ComponentName[] components) {
|
||||
@@ -649,6 +658,19 @@ public class ResolverActivity extends Activity {
|
||||
|
||||
TargetInfo target = mAdapter.targetInfoForPosition(which, filtered);
|
||||
if (onTargetSelected(target, always)) {
|
||||
if (always && filtered) {
|
||||
MetricsLogger.action(
|
||||
this, MetricsProto.MetricsEvent.ACTION_APP_DISAMBIG_ALWAYS);
|
||||
} else if (filtered) {
|
||||
MetricsLogger.action(
|
||||
this, MetricsProto.MetricsEvent.ACTION_APP_DISAMBIG_JUST_ONCE);
|
||||
} else {
|
||||
MetricsLogger.action(
|
||||
this, MetricsProto.MetricsEvent.ACTION_APP_DISAMBIG_TAP);
|
||||
}
|
||||
MetricsLogger.action(this, mAdapter.hasFilteredItem()
|
||||
? MetricsProto.MetricsEvent.ACTION_HIDE_APP_DISAMBIG_APP_FEATURED
|
||||
: MetricsProto.MetricsEvent.ACTION_HIDE_APP_DISAMBIG_NONE_FEATURED);
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2191,6 +2191,33 @@ message MetricsEvent {
|
||||
// CATEGORY: SETTINGS
|
||||
ACCOUNTS_WORK_PROFILE_SETTINGS = 401;
|
||||
|
||||
// ------- Begin N App Disambig Shade -----
|
||||
// Application disambig shade opened or closed with a featured app.
|
||||
// These are actually visibility events, but visible/hidden doesn't
|
||||
// take a package, so these are being logged as actions.
|
||||
// Package: Calling app on open, called app on close
|
||||
ACTION_SHOW_APP_DISAMBIG_APP_FEATURED = 402;
|
||||
ACTION_HIDE_APP_DISAMBIG_APP_FEATURED = 403;
|
||||
|
||||
// Application disambig shade opened or closed without a featured app.
|
||||
// These are actually visibility events, but visible/hidden doesn't
|
||||
// take a package, so these are being logged as actions.
|
||||
// Package: Calling app on open, called app on close
|
||||
ACTION_SHOW_APP_DISAMBIG_NONE_FEATURED = 404;
|
||||
ACTION_HIDE_APP_DISAMBIG_NONE_FEATURED = 405;
|
||||
|
||||
// User opens in an app by pressing “Always” in the application disambig shade.
|
||||
// Subtype: Index of selection
|
||||
ACTION_APP_DISAMBIG_ALWAYS = 406;
|
||||
|
||||
// User opens in an app by pressing “Just Once” in the application disambig shade.
|
||||
// Subtype: Index of selection
|
||||
ACTION_APP_DISAMBIG_JUST_ONCE = 407;
|
||||
|
||||
// User opens in an app by tapping on its name in the application disambig shade.
|
||||
// Subtype: Index of selection
|
||||
ACTION_APP_DISAMBIG_TAP = 408;
|
||||
|
||||
// Add new aosp constants above this line.
|
||||
// END OF AOSP CONSTANTS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user