Merge "Add logging when entity header buttons are clicked" into oc-dr1-dev

This commit is contained in:
TreeHugger Robot
2017-06-20 23:23:38 +00:00
committed by Android (Google) Code Review
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);
}
});