Fix crash for UiBlockerController

1. Don't create UiBlockerController if there is no related controller
2. Don't update visibility if UiBlockerController is null
3. Use findPreference() from DashboardFragment, which already has null
check.

Change-Id: Iee24c64317fb9d5a1cf2076d25728af485d390c5
Fixes: 122807414
Fixes: 122805831
Test: RunSettingsRoboTests
This commit is contained in:
jackqdyulei
2019-01-14 10:55:39 -08:00
committed by Tsung-Mao Fang
parent 8b9529e533
commit a5f1b5c629
3 changed files with 55 additions and 10 deletions

View File

@@ -33,7 +33,7 @@ import java.util.concurrent.TimeUnit;
* Control ui blocker data and check whether it is finished
*
* @see BasePreferenceController.UiBlocker
* @see BasePreferenceController.OnUiBlockListener
* @see BasePreferenceController.UiBlockListener
*/
public class UiBlockerController {
private static final String TAG = "UiBlockerController";