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

Commit 78594940 authored by Matt Pietal's avatar Matt Pietal Committed by Android (Google) Code Review
Browse files

Merge "Wrap context in order to apply correct theme" into main

parents 430fa41d 6cf5fbf9
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.hardware.display.DisplayManager
import android.os.Bundle
import android.os.Handler
import android.os.IBinder
import android.view.ContextThemeWrapper
import android.view.Display
import android.view.Display.DEFAULT_DISPLAY
import android.view.DisplayInfo
@@ -179,7 +180,11 @@ constructor(

    fun render() {
        mainHandler.post {
            val previewContext = display?.let { context.createDisplayContext(it) } ?: context
            val previewContext =
                display?.let {
                    ContextThemeWrapper(context.createDisplayContext(it), context.getTheme())
                }
                    ?: context

            val rootView = FrameLayout(previewContext)