Add logging when entity header buttons are clicked

Change-Id: I673e5b4a6c5f8736bbec72e259a82acb3f514828
Fix: 62709062
Test: make RunSettingsRoboTests
This commit is contained in:
Fan Zhang
2017-06-19 12:31:30 -07:00
parent 6dfafa5d95
commit a74337c627
3 changed files with 18 additions and 3 deletions

View File

@@ -52,6 +52,10 @@ import com.android.settingslib.core.lifecycle.Lifecycle;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent
.ACTION_OPEN_APP_NOTIFICATION_SETTING;
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.ACTION_OPEN_APP_SETTING;
public class EntityHeaderController {
@IntDef({ActionType.ACTION_NONE,
@@ -310,6 +314,9 @@ public class EntityHeaderController {
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FeatureFactory.getFactory(mAppContext).getMetricsFeatureProvider()
.actionWithSource(mAppContext, mMetricsCategory,
ACTION_OPEN_APP_NOTIFICATION_SETTING);
mFragment.startActivity(mAppNotifPrefIntent);
}
});
@@ -327,6 +334,9 @@ public class EntityHeaderController {
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FeatureFactory.getFactory(mAppContext).getMetricsFeatureProvider()
.actionWithSource(mAppContext, mMetricsCategory,
ACTION_OPEN_APP_SETTING);
mFragment.startActivity(intent);
}
});