Fixes NullPointerException introduced in ag/9382746
Test: tested locally BUG:142332706 Change-Id: Iba99a0346f5481671fe284004ceb8772e31b570e FIX:142332706
This commit is contained in:
@@ -21,6 +21,7 @@ import android.os.Handler;
|
||||
import android.os.HandlerThread;
|
||||
import android.os.SystemClock;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.slice.Clock;
|
||||
|
||||
import com.android.internal.app.AssistUtils;
|
||||
@@ -68,6 +69,7 @@ public abstract class AssistModule {
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Nullable
|
||||
static AssistHandleViewController provideAssistHandleViewController(
|
||||
NavigationBarController navigationBarController) {
|
||||
return navigationBarController.getAssistHandlerViewController();
|
||||
|
||||
@@ -233,11 +233,13 @@ public class NavigationBarController implements Callbacks {
|
||||
}
|
||||
|
||||
/** @return {@link NavigationBarFragment} on the default display. */
|
||||
@Nullable
|
||||
public NavigationBarFragment getDefaultNavigationBarFragment() {
|
||||
return mNavigationBars.get(DEFAULT_DISPLAY);
|
||||
}
|
||||
|
||||
/** @return {@link AssistHandleViewController} (only on the default display). */
|
||||
@Nullable
|
||||
public AssistHandleViewController getAssistHandlerViewController() {
|
||||
NavigationBarFragment navBar = getDefaultNavigationBarFragment();
|
||||
return navBar == null ? null : navBar.getAssistHandlerViewController();
|
||||
|
||||
Reference in New Issue
Block a user