Fix crash in fingerprint settings when rotating
Fragments always need empty constructors. Bug: 23806551 Change-Id: Ib22a89be60f799d70caf1acf2ac95a20e6be9675
This commit is contained in:
@@ -528,7 +528,6 @@ public class FingerprintSettings extends SubSettings {
|
|||||||
|
|
||||||
public static class RenameDeleteDialog extends DialogFragment {
|
public static class RenameDeleteDialog extends DialogFragment {
|
||||||
|
|
||||||
private final Context mContext;
|
|
||||||
private Fingerprint mFp;
|
private Fingerprint mFp;
|
||||||
private EditText mDialogTextField;
|
private EditText mDialogTextField;
|
||||||
private String mFingerName;
|
private String mFingerName;
|
||||||
@@ -536,10 +535,6 @@ public class FingerprintSettings extends SubSettings {
|
|||||||
private int mTextSelectionStart;
|
private int mTextSelectionStart;
|
||||||
private int mTextSelectionEnd;
|
private int mTextSelectionEnd;
|
||||||
|
|
||||||
public RenameDeleteDialog(Context context) {
|
|
||||||
mContext = context;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||||
mFp = getArguments().getParcelable("fingerprint");
|
mFp = getArguments().getParcelable("fingerprint");
|
||||||
@@ -562,7 +557,7 @@ public class FingerprintSettings extends SubSettings {
|
|||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Log.v(TAG, "rename " + name + " to " + newName);
|
Log.v(TAG, "rename " + name + " to " + newName);
|
||||||
}
|
}
|
||||||
MetricsLogger.action(mContext,
|
MetricsLogger.action(getContext(),
|
||||||
MetricsLogger.ACTION_FINGERPRINT_RENAME,
|
MetricsLogger.ACTION_FINGERPRINT_RENAME,
|
||||||
mFp.getFingerId());
|
mFp.getFingerId());
|
||||||
FingerprintSettingsFragment parent
|
FingerprintSettingsFragment parent
|
||||||
@@ -607,7 +602,7 @@ public class FingerprintSettings extends SubSettings {
|
|||||||
|
|
||||||
private void onDeleteClick(DialogInterface dialog) {
|
private void onDeleteClick(DialogInterface dialog) {
|
||||||
if (DEBUG) Log.v(TAG, "Removing fpId=" + mFp.getFingerId());
|
if (DEBUG) Log.v(TAG, "Removing fpId=" + mFp.getFingerId());
|
||||||
MetricsLogger.action(mContext, MetricsLogger.ACTION_FINGERPRINT_DELETE,
|
MetricsLogger.action(getContext(), MetricsLogger.ACTION_FINGERPRINT_DELETE,
|
||||||
mFp.getFingerId());
|
mFp.getFingerId());
|
||||||
FingerprintSettingsFragment parent
|
FingerprintSettingsFragment parent
|
||||||
= (FingerprintSettingsFragment) getTargetFragment();
|
= (FingerprintSettingsFragment) getTargetFragment();
|
||||||
|
Reference in New Issue
Block a user