Revert "Migrate to use instrumentation classes from settingslib."
This reverts commit 1546cca529
.
Reason for revert: Broke fingerprint setup flow. b/72267201
Change-Id: I8321265ae64732c526325882ddea51080decddf5
This commit is contained in:
@@ -17,7 +17,6 @@ package com.android.settings;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.app.Fragment;
|
||||
import android.content.Context;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
@@ -39,8 +38,6 @@ public class SettingsDialogFragmentTest {
|
||||
|
||||
private static final int DIALOG_ID = 15;
|
||||
|
||||
@Mock
|
||||
private Context mContext;
|
||||
@Mock
|
||||
private DialogCreatableFragment mDialogCreatable;
|
||||
private SettingsPreferenceFragment.SettingsDialogFragment mDialogFragment;
|
||||
@@ -56,10 +53,9 @@ public class SettingsDialogFragmentTest {
|
||||
|
||||
mDialogFragment =
|
||||
new SettingsPreferenceFragment.SettingsDialogFragment(mDialogCreatable, DIALOG_ID);
|
||||
mDialogFragment.onAttach(mContext);
|
||||
mDialogFragment.getMetricsCategory();
|
||||
|
||||
// getDialogMetricsCategory called in onAttach, and explicitly in test.
|
||||
// getDialogMetricsCategory called in constructor, and explicitly in test.
|
||||
verify(mDialogCreatable, times(2)).getDialogMetricsCategory(DIALOG_ID);
|
||||
}
|
||||
|
||||
@@ -70,7 +66,6 @@ public class SettingsDialogFragmentTest {
|
||||
try {
|
||||
mDialogFragment = new SettingsPreferenceFragment.SettingsDialogFragment(
|
||||
mDialogCreatable, DIALOG_ID);
|
||||
mDialogFragment.onAttach(mContext);
|
||||
} catch (IllegalStateException e) {
|
||||
// getDialogMetricsCategory called in constructor
|
||||
verify(mDialogCreatable).getDialogMetricsCategory(DIALOG_ID);
|
||||
|
Reference in New Issue
Block a user