Add null check for lifecycle

- Add a null check so that search works correctly in
 DevelopmentSettingsDashboardFragment

Bug: 34203528
Test: Manual Testing
Change-Id: I26e84d2dcb403a2e68d092056a6c8940becedeff
This commit is contained in:
jeffreyhuang
2017-10-16 16:59:54 -07:00
parent a7963492dd
commit cd3e26a24a

View File

@@ -68,7 +68,7 @@ public abstract class AbstractLogpersistPreferenceController extends
public AbstractLogpersistPreferenceController(Context context, Lifecycle lifecycle) {
super(context);
if (isAvailable()) {
if (isAvailable() && lifecycle != null) {
lifecycle.addObserver(this);
}
}