jaredrummler / Cyanea

A theme engine for Android
Apache License 2.0
1.45k stars 144 forks source link

CyaneaContextWrapper getSystemService IllegalStateException #50

Closed xDragonZ closed 5 years ago

xDragonZ commented 5 years ago

Could be 💩 firmware related issues.

image

Model:

FL02 6045I 5015E SM-G350E VFD 610

android version: 6.0 (70%), 4 (13%), 5 (12%), 7 (5%)

Fatal Exception: java.lang.IllegalStateException: when (name) {
    LAYOUT…etSystemService(name)
  } must not be null
       at com.jaredrummler.cyanea.inflator.CyaneaContextWrapper.getSystemService(SourceFile:4)
       at android.view.ContextThemeWrapper.getSystemService(ContextThemeWrapper.java:123)
       at android.app.Activity.getSystemService(Activity.java:5296)
       at android.view.ViewRootImpl.(ViewRootImpl.java:503)
       at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:306)
       at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
       at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3347)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2626)
       at android.app.ActivityThread.-wrap11(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1472)
       at android.os.Handler.dispatchMessage(Handler.java:111)
       at android.os.Looper.loop(Looper.java:207)
       at android.app.ActivityThread.main(ActivityThread.java:5743)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)
jamesarich commented 5 years ago

I'm seeing some similar issues. Specifically on Samsung devices.

SM-G920V| SM-N920V | SM-N920T | SAMSUNG-SM-G920A

android version: 100.00% | Android 7.0


java.lang.IllegalStateException: when (name) {
    LAYOUT…etSystemService(name)
  } must not be null
    at com.jaredrummler.cyanea.inflator.CyaneaContextWrapper.getSystemService(CyaneaContextWrapper.kt:38)
    at android.view.ContextThemeWrapper.getSystemService(ContextThemeWrapper.java:171)
    at android.app.Activity.getSystemService(Activity.java:5771)
    at com.samsung.android.content.clipboard.SemClipboardManager.isCocktailBarDisplayed(SemClipboardManager.java:1315)
    at com.samsung.android.content.clipboard.SemClipboardManager.clearFilter(SemClipboardManager.java:947)
    at android.widget.EditText.dispatchWindowFocusChanged(EditText.java:266)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
    at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1197)
    at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:4099)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6682)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)```
inorichi commented 5 years ago

This should be as simple as making this function nullable.