Merge "Add null check for lifecycle"
This commit is contained in:
committed by
Android (Google) Code Review
commit
197eef2cac
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user