Add metric id for anomaly fragments.

1. PowerUsageAnomalyDetails
2. AnomalyDialogFragment

Bug: 37681923
Test: Build

Change-Id: Ia82fde0fa3e61b6284dc18db3018dd223a0e435b
(cherry picked from commit 725562c7484439172dece19c72b5c76943144638)
(cherry picked from commit 2fd1c9839c08144d51c498baf2bff3fff020c6ee)
diff --git a/src/com/android/settings/fuelgauge/PowerUsageAnomalyDetails.java b/src/com/android/settings/fuelgauge/PowerUsageAnomalyDetails.java
index bf4c2af..0d73511 100644
--- a/src/com/android/settings/fuelgauge/PowerUsageAnomalyDetails.java
+++ b/src/com/android/settings/fuelgauge/PowerUsageAnomalyDetails.java
@@ -125,8 +125,7 @@
 
     @Override
     public int getMetricsCategory() {
-        //TODO(b/37681923): add correct metrics category
-        return 0;
+        return MetricsProto.MetricsEvent.FUELGAUGE_ANOMALY_DETAIL;
     }
 
     void refreshUi() {
diff --git a/src/com/android/settings/fuelgauge/anomaly/AnomalyDialogFragment.java b/src/com/android/settings/fuelgauge/anomaly/AnomalyDialogFragment.java
index 69d03b9..8bea04e 100644
--- a/src/com/android/settings/fuelgauge/anomaly/AnomalyDialogFragment.java
+++ b/src/com/android/settings/fuelgauge/anomaly/AnomalyDialogFragment.java
@@ -23,6 +23,7 @@
 import android.os.Bundle;
 import android.support.annotation.VisibleForTesting;
 
+import com.android.internal.logging.nano.MetricsProto;
 import com.android.settings.R;
 import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
 import com.android.settings.fuelgauge.anomaly.action.AnomalyAction;
@@ -79,8 +80,7 @@
 
     @Override
     public int getMetricsCategory() {
-        // TODO(b/37681923): add anomaly metric id
-        return 0;
+        return MetricsProto.MetricsEvent.DIALOG_HANDLE_ANOMALY;
     }
 
     @Override