diff options
author | Luis Vidal <lvidal@cyngn.com> | 2016-08-05 12:54:12 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-08-09 10:22:31 -0700 |
commit | d47d2e4ff6972e262139f368a108ce8ac0b6577d (patch) | |
tree | 21042e4df5d6cd7677fa67f91b1e074960e18c24 /src | |
parent | e6a33946a6684b0ab8e7540c6276cca5486c3c0d (diff) | |
download | packages_apps_Settings-d47d2e4ff6972e262139f368a108ce8ac0b6577d.zip packages_apps_Settings-d47d2e4ff6972e262139f368a108ce8ac0b6577d.tar.gz packages_apps_Settings-d47d2e4ff6972e262139f368a108ce8ac0b6577d.tar.bz2 |
Settings: Animate pin/pattern fragment only if available
To prevent NPE, check if the PIN/Pattern/Password confirmation
fragment is available before performing animation
Change-Id: I4ae78569f953daa6696e96c8318a0c059aaf3502
TICKET: HAM-1397
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/settings/ConfirmDeviceCredentialBaseActivity.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/settings/ConfirmDeviceCredentialBaseActivity.java b/src/com/android/settings/ConfirmDeviceCredentialBaseActivity.java index d9af800..2d78de2 100644 --- a/src/com/android/settings/ConfirmDeviceCredentialBaseActivity.java +++ b/src/com/android/settings/ConfirmDeviceCredentialBaseActivity.java @@ -92,11 +92,17 @@ public abstract class ConfirmDeviceCredentialBaseActivity extends SettingsActivi } public void prepareEnterAnimation() { - getFragment().prepareEnterAnimation(); + final ConfirmDeviceCredentialBaseFragment f = getFragment(); + if (f != null) { + f.prepareEnterAnimation(); + } } public void startEnterAnimation() { - getFragment().startEnterAnimation(); + final ConfirmDeviceCredentialBaseFragment f = getFragment(); + if (f != null) { + f.startEnterAnimation(); + } } /** |