Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db18b6e3 authored by Chris Li's avatar Chris Li
Browse files

Revert the window context creation in NavigationBarController

In ag/14981905, we changed it to use WindowContext of
TYPE_NAVIGATION_BAR, but looks like this context is also used for
creating windows of other types.

Revert it to fix the crash. Will fix the context usages in NavigationBar
later.

Bug: 193107004
Test: revert
Change-Id: I4ec66982aa929039764fc276e9452151d959268e
parent ad3e6f55
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.systemui.navigationbar;

import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR;
import static android.view.WindowManagerPolicyConstants.NAV_BAR_MODE_3BUTTON;

import static com.android.systemui.shared.recents.utilities.Utilities.isTablet;
@@ -350,7 +349,9 @@ public class NavigationBarController implements Callbacks,
            Log.w(TAG, "Cannot get WindowManager.");
            return;
        }
        final Context context = mContext.createWindowContext(display, TYPE_NAVIGATION_BAR, null);
        final Context context = isOnDefaultDisplay
                ? mContext
                : mContext.createDisplayContext(display);
        NavigationBar navBar = new NavigationBar(context,
                mWindowManager,
                mAssistManagerLazy,