NullPointerException when running monkey test in IccLockSettings

In Android N, finish() in onCreate() cannot avoid onViewCreated() lifecycle
in Fragment, so a crash occurs in com.android.settings.IccLockSettings
because of insecure call in updatePreference().
It's a tiny bug only appears when running monkey test.

Test: run monkey test with page IccLockSettings.

This bug was reported to Google Issue Tracker.
Link: https://issuetracker.google.com/issues/38152568

Change-Id: I143b046fd7ac5ffba55e51254c7dd068274d342e
Signed-off-by: xudiwen <xudiwen@xiaomi.com>
1 file changed