Fix NullPointerException in NetworkProviderSettings
- Avoid calling subfunctions when getView returns null Bug: 301878710 Test: unit test Change-Id: I8511ded693475468f6dda1d16d040c623097e997
This commit is contained in:
@@ -190,7 +190,10 @@ public class NetworkProviderSettings extends RestrictedSettingsFragment
|
|||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
final Runnable mUpdateWifiEntryPreferencesRunnable = () -> {
|
final Runnable mUpdateWifiEntryPreferencesRunnable = () -> {
|
||||||
updateWifiEntryPreferences();
|
updateWifiEntryPreferences();
|
||||||
getView().postDelayed(mRemoveLoadingRunnable, 10);
|
View view = getView();
|
||||||
|
if (view != null) {
|
||||||
|
view.postDelayed(mRemoveLoadingRunnable, 10);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
final Runnable mHideProgressBarRunnable = () -> {
|
final Runnable mHideProgressBarRunnable = () -> {
|
||||||
|
Reference in New Issue
Block a user