Skip to content

Commit 4367b12

Browse files
committed
Fix password constraint page crash in P- devices
Change-Id: Ia810fc71fcf14ff440ccf4d653b89bce9836f13d FIX: 73987583
1 parent 9947f2a commit 4367b12

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/src/main/java/com/afwsamples/testdpc/policy/keyguard/PasswordBlacklistFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
import java.util.Date;
4242
import java.util.List;
4343

44-
@TargetApi(Build.VERSION_CODES.N)
44+
@TargetApi(28)
4545
public class PasswordBlacklistFragment extends BaseManageComponentFragment<Void>
4646
implements EditDeleteArrayAdapter.OnEditButtonClickListener<String> {
4747

app/src/main/java/com/afwsamples/testdpc/policy/keyguard/PasswordConstraintsFragment.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import android.content.Intent;
2525
import android.net.Uri;
2626
import android.os.Bundle;
27+
import android.support.v4.os.BuildCompat;
2728
import android.support.v7.preference.EditTextPreference;
2829
import android.support.v7.preference.ListPreference;
2930
import android.support.v7.preference.Preference;
@@ -211,7 +212,9 @@ public void onResume() {
211212

212213
// Settings that may have been changed by other users need updating.
213214
updateExpirationTimes();
214-
refreshBlacklistPreferences();
215+
if (BuildCompat.isAtLeastP()) {
216+
refreshBlacklistPreferences();
217+
}
215218
}
216219

217220
@Override

0 commit comments

Comments
 (0)