Controls Ui - Fix seeding crash

Need to return early when there is no preferred component to seed
controls from.

Bug: 154037512
Test: manual
Change-Id: I5aad8bfb90453cdc97fc75575390d16cd2824c05
This commit is contained in:
Matt Pietal
2020-04-16 13:34:46 -04:00
parent 9b6af1dcc5
commit 69dfb64a7d

View File

@@ -395,6 +395,7 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
if (preferredComponent == null) {
Log.i(TAG, "Controls seeding: No preferred component has been set, will not seed");
mControlsPreferences.edit().putBoolean(PREFS_CONTROLS_SEEDING_COMPLETED, true).apply();
return;
}
mControlsController.seedFavoritesForComponent(
@@ -2316,4 +2317,4 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener,
&& mControlsUiController.getAvailable()
&& !mControlsServiceInfos.isEmpty();
}
}
}