Skip to content
Snippets Groups Projects
Commit 4d528635 authored by Nick's avatar Nick :v: Committed by Mohammad Hasan Keramat J
Browse files

SystemUI: fix transparent navigation bar keys in secondary display

Huge thanks to luka177 for investigation

What happens here is simple: mContext has Theme.SystemUI set, for
secondary displays, it uses createDisplayContext() which unsets Theme
because it's not a UI context. If we manually set theme again, resources
start resolving again and navigation bar keys are no longer transparent.

Dhina17: Ported to 14 QPR2

Change-Id: Ib8c9212ac0facda8e0f4eeac2d4f839748178cc9
parent 1c4d3be8
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ import android.provider.Settings;
import android.util.Log;
import android.util.SparseArray;
import android.util.SparseBooleanArray;
import android.view.ContextThemeWrapper;
import android.view.Display;
import android.view.IWindowManager;
import android.view.View;
......@@ -396,9 +397,14 @@ public class NavigationBarControllerImpl implements
return;
}
final Context context = isOnDefaultDisplay
? mContext
: mContext.createDisplayContext(display);
final Context context;
if (isOnDefaultDisplay) {
context = mContext;
} else {
Context rawContext = mContext.createDisplayContext(display);
context = new ContextThemeWrapper(rawContext,
com.android.systemui.res.R.style.Theme_SystemUI);
}
NavigationBarComponent component = mNavigationBarComponentFactory.create(
context, savedState);
NavigationBar navBar = component.getNavigationBar();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment