package com.android.settings.sim;
+import android.app.settings.SettingsEnums;
import android.content.Context;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
}
return result;
}
+
+ @Override
+ public int getMetricsCategory() {
+ return SettingsEnums.DIALOG_CALL_SIM_LIST;
+ }
}
import android.app.Activity;
import android.app.Dialog;
+import android.app.settings.SettingsEnums;
import android.content.DialogInterface;
import android.os.Bundle;
import android.telephony.SubscriptionInfo;
protected SubscriptionManager getSubscriptionManager() {
return getContext().getSystemService(SubscriptionManager.class);
}
+
+ @Override
+ public int getMetricsCategory() {
+ return SettingsEnums.DIALOG_PREFERRED_SIM_PICKER;
+ }
}
import android.os.Bundle;
import androidx.annotation.NonNull;
-import androidx.fragment.app.DialogFragment;
+
+import com.android.settings.core.instrumentation.InstrumentedDialogFragment;
/** Common functionality for showing a dialog in SimDialogActivity. */
-public abstract class SimDialogFragment extends DialogFragment {
+public abstract class SimDialogFragment extends InstrumentedDialogFragment {
private static final String TAG = "SimDialogFragment";
private static final String KEY_TITLE_ID = "title_id";
package com.android.settings.sim;
import android.app.Dialog;
+import android.app.settings.SettingsEnums;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
protected SelectSubscriptionAdapter mAdapter;
@VisibleForTesting
- List<SubscriptionInfo> mSubscriptions;
+ List<SubscriptionInfo> mSubscriptions;
public static SimListDialogFragment newInstance(int dialogType, int titleResId,
boolean includeAskEveryTime) {
builder.setAdapter(mAdapter, this);
}
+ @Override
+ public int getMetricsCategory() {
+ return SettingsEnums.DIALOG_SIM_LIST;
+ }
+
private static class SelectSubscriptionAdapter extends BaseAdapter {
private Context mContext;
private LayoutInflater mInflater;
import com.android.settings.slices.SliceControllerInXmlCodeInspector;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.robolectric.RobolectricTestRunner;
import java.util.List;
-import org.robolectric.RobolectricTestRunner;
/**
* Test suite that scans all classes in app package, and performs different types of code inspection
}
@Test
- @Ignore("b/130897640")
public void runInstrumentableFragmentCodeInspection() {
new InstrumentableFragmentCodeInspector(mClasses).run();
}