New [21.1.20 Mi 9] Can't Detect Earphone


raaaaaald

Members
Jun 20, 2016
26
15
It usually can detect my usb-c earphones. And I can't exactly determine what causes the problem. The most recent case has been while I was playing a game with my earphones on and I turned on battery saver. From that point onwards, the game played its audio through the phone's speaker. Tried removing and reconnecting my usb-c earphones but all audio is still playing on the speaker.

Tried to reboot both game and phone and I still can't get it to work. First time I experienced this, a simple reboot did the job.
 
Opening Settings > Sound & vibration gives this error:

Code:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.MiuiSoundSettingsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.android.settings.dndmode.Alarm$DaysOfWeek.getCoded()' on a null object reference

    at android.app.ActivityThread.performLaunchActivity(Unknown Source:663)    at android.app.ActivityThread.handleLaunchActivity(Unknown Source:47)

    at android.app.servertransaction.LaunchActivityItem.execute(Unknown Source:67)

    at android.app.servertransaction.TransactionExecutor.executeCallbacks(Unknown Source:77)

    at android.app.servertransaction.TransactionExecutor.execute(Unknown Source:73)

    at android.app.ActivityThread$H.handleMessage(Unknown Source:52)

    at android.os.Handler.dispatchMessage(Unknown Source:19)

    at android.os.Looper.loop(Unknown Source:249)

    at android.app.ActivityThread.main(Unknown Source:134)

    at java.lang.reflect.Method.invoke(Native Method)

    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(Unknown Source:11)

    at com.android.internal.os.ZygoteInit.main(Unknown Source:313)

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.android.settings.dndmode.Alarm$DaysOfWeek.getCoded()' on a null object reference

    at com.android.settings.MiuiSoundSettings.refreshZenRuleSettings(Unknown Source:108)

    at com.android.settings.MiuiSoundSettings.onCreate(Unknown Source:308)

    at android.app.Fragment.performCreate(Unknown Source:13)

    at android.app.FragmentManagerImpl.moveToState(Unknown Source:359)

    at android.app.FragmentManagerImpl.addAddedFragments(Unknown Source:46)

    at android.app.FragmentManagerImpl.executeOpsTogether(Unknown Source:129)

    at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(Unknown Source:99)

    at android.app.FragmentManagerImpl.execPendingActions(Unknown Source:21)

    at android.app.FragmentManagerImpl.executePendingTransactions(Unknown Source:0)

    at com.android.settings.SettingsActivity.switchToFragment(Unknown Source:199)

    at com.android.settings.SettingsActivity.launchSettingFragment(Unknown Source:35)

    at com.android.settings.SettingsActivity.onCreate(Unknown Source:249)

    at com.android.settings.MiuiSoundSettingsActivity.onCreate(Unknown Source:0)

    at android.app.Activity.performCreate(Unknown Source:77)

    at android.app.Activity.performCreate(Unknown Source:1)

    at android.app.Instrumentation.callActivityOnCreate(Unknown Source:3)

    at android.app.ActivityThread.performLaunchActivity(Unknown Source:399)

    ... 11 more