title: AppCompatDelegate.setDefaultNightMode force closes app with no error
body: <p>I am trying to add a night mode to my app but the app just closes each time it switches between day/night modes on my main screen. It just closes out the app, no error, no crash, no log cat data, just closes. Has anyone seen this happen before and is there a better way I can see why?</p>
  
  <pre><code>AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
  AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
  </code></pre>
  
  <p>Here is the data from my debug session:</p>
  
  <pre><code>V/FA: Activity resumed, time: 455508700
  V/FA: Connection attempt already in progress
  D/ViewRootImpl@560a619[dashboard]: setView = DecorView@ae2f610[dashboard] TM=true MM=false
  D/ViewRootImpl@560a619[dashboard]: Relayout returned: old=[0,0][1080,2280] new=[0,0][1080,2280] req=(1080,2280)0 dur=11 res=0x7 s={true 540690239488} ch=true
  D/OpenGLRenderer: createReliableSurface : 0x7e71cddc80, 0x7de3a65000
  D/OpenGLRenderer: SurfaceChanged : 0x0 -&gt; 0x7e109da080
  E/ViewRootImpl: sendUserActionEvent() mView returned.
  I/TextToSpeech: Connected to ComponentInfo{com.samsung.SMT/com.samsung.SMT.SamsungTTSService}
  W/m.mydrive: Accessing hidden method Lsun/misc/Unsafe;-&gt;getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
  D/FA: Connected to remote service
  V/FA: Processing queued up service tasks: 3
  I/TextToSpeech: Set up connection to ComponentInfo{com.samsung.SMT/com.samsung.SMT.SamsungTTSService}
  D/ViewRootImpl@560a619[dashboard]: Relayout returned: old=[0,0][1080,2280] new=[0,0][1080,2280] req=(1080,2280)0 dur=6 res=0x1 s={true 540690239488} ch=false
  D/ViewRootImpl@560a619[dashboard]: MSG_WINDOW_FOCUS_CHANGED 1 1
  D/InputMethodManager: prepareNavigationBarInfo() DecorView@ae2f610[dashboard]
  getNavigationBarColor() -855310
  D/InputMethodManager: prepareNavigationBarInfo() DecorView@ae2f610[dashboard]
  getNavigationBarColor() -855310
  V/InputMethodManager: Starting input: tba=com.mydrive ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
  D/InputMethodManager: startInputInner - Id : 0
  I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
  D/InputTransport: Input channel destroyed: 'ClientS', fd=239
  W/m.mydrive: Accessing hidden method Lsun/misc/Unsafe;-&gt;getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
  D/ViewRootImpl@560a619[dashboard]: MSG_RESIZED: frame=[0,0][1080,2280] ci=[0,108][0,126] vi=[0,108][0,126] or=1
  W/m.mydrive: Accessing hidden method Lsun/misc/Unsafe;-&gt;getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
  W/m.mydrive: Accessing hidden method Lsun/misc/Unsafe;-&gt;getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
  Accessing hidden method Lsun/misc/Unsafe;-&gt;putLong(Ljava/lang/Object;JJ)V (greylist, linking, allowed)
  Accessing hidden method Lsun/misc/Unsafe;-&gt;putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
  W/m.mydrive: Accessing hidden method Lsun/misc/Unsafe;-&gt;getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
  W/m.mydrive: Accessing hidden method Lsun/misc/Unsafe;-&gt;getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
  Accessing hidden method Lsun/misc/Unsafe;-&gt;getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
  W/m.mydrive: Accessing hidden method Lsun/misc/Unsafe;-&gt;getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
  W/m.mydrive: Accessing hidden method Lsun/misc/Unsafe;-&gt;getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
  Accessing hidden method Lsun/misc/Unsafe;-&gt;getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
  W/m.mydrive: Accessing hidden method Lsun/misc/Unsafe;-&gt;getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
  W/m.mydrive: Accessing hidden method Lsun/misc/Unsafe;-&gt;getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
  V/FA: Screen exposed for less than 1000 ms. Event not sent. time: 470
  V/FA: Activity paused, time: 455509171
  D/ViewRootImpl@560a619[dashboard]: MSG_WINDOW_FOCUS_CHANGED 0 1
  D/InputMethodManager: prepareNavigationBarInfo() DecorView@ae2f610[dashboard]
  getNavigationBarColor() -855310
  E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted
  D/InputTransport: Input channel destroyed: 'ClientS', fd=245
  I/Ads: Ad failed to load : 3
  I/Ads: Ad failed to load : 3
  D/ViewRootImpl@560a619[dashboard]: stopped(true) old=false
  D/OpenGLRenderer: SurfaceChanged : 0x7e109da080 -&gt; 0x0
  W/m.mydrive: Accessing hidden method Lsun/misc/Unsafe;-&gt;getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
  W/m.mydrive: Accessing hidden method Lsun/misc/Unsafe;-&gt;getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
  </code></pre>