MythTV-Clients / MythTV-Android-Frontend

Implementation of MythTV .25+ Services API for Android
GNU General Public License v3.0
66 stars 16 forks source link

Refresh Navigation Drawer Options when connect/failed to connect to backend #223

Closed dmfrey closed 11 years ago

billmeek commented 11 years ago

Generic issue for #220 and #221.

dmfrey commented 11 years ago

@billmeek @pot8oe @rhpot1991 @espenaf

We really need to test these flows out

  1. I would suggest being on local network but also opening a tunnel in ConnectBot or JuiceSSH to the backend to simulate both home and away profiles.
  2. Freely switch between home and away and verify the nav drawer refreshes as it should
  3. Go in and out of preferences, deleting and adding both home and away profiles.
    • I am expecting the Status fragment to always refresh showing no backend message, backend not responding, etc.
  4. Go in and out of Dvr and Multimedia and also verify the above
    • You should not be able to get to Dvr or Multimedia if you are not connected to a profile, so those rows in the nav drawer should go away (this will truely validate #220 and #221 are closed)
billmeek commented 11 years ago

No problems until I started the deleting all Profiles

10-13 16:51:52.945: D/UpcomingDownloadService(15837): onHandleIntent : exit
10-13 16:51:53.007: V/BackendStatusFragment(16741): UpcomingDownloadReceiver.onReceive : enter
10-13 16:51:53.007: I/BackendStatusFragment(16741): UpcomingDownloadReceiver.onReceive : Upcoming Programs Download Service Finished
10-13 16:51:53.007: V/RunningServiceHelper(16741): isServiceRunning : enter
10-13 16:51:53.007: D/RunningServiceHelper(16741): isServiceRunning : checking for running server 'org.mythtv.service.dvr.RecordingRuleService'
10-13 16:51:53.015: V/RunningServiceHelper(16741): isServiceRunning : exit
10-13 16:51:53.046: V/BackendStatusFragment(16741): UpcomingDownloadReceiver.onReceive : exit
10-13 16:51:53.054: D/RecordingRuleService(15853): onHandleIntent : enter
10-13 16:51:53.062: I/RecordingRuleService(15853): onHandleIntent : DOWNLOAD action selected
10-13 16:51:53.078: E/RecordingRuleService(15853): onHandleIntent : error
10-13 16:51:53.078: E/RecordingRuleService(15853): java.lang.NullPointerException
10-13 16:51:53.078: E/RecordingRuleService(15853):  at org.mythtv.service.dvr.RecordingRuleService.onHandleIntent(RecordingRuleService.java:83)
10-13 16:51:53.078: E/RecordingRuleService(15853):  at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
10-13 16:51:53.078: E/RecordingRuleService(15853):  at android.os.Handler.dispatchMessage(Handler.java:99)
10-13 16:51:53.078: E/RecordingRuleService(15853):  at android.os.Looper.loop(Looper.java:137)
10-13 16:51:53.078: E/RecordingRuleService(15853):  at android.os.HandlerThread.run(HandlerThread.java:60)
10-13 16:51:53.085: D/RecordingRuleService(15853): onHandleIntent : exit
10-13 16:51:53.109: V/BackendStatusFragment(16741): RecordingRuleDownloadReceiver.onReceive : enter
10-13 16:51:53.117: I/BackendStatusFragment(16741): RecordingRuleDownloadReceiver.onReceive : complete=Recording Rules Download Service Finished
10-13 16:51:53.117: V/RunningServiceHelper(16741): isServiceRunning : enter
10-13 16:51:53.117: D/RunningServiceHelper(16741): isServiceRunning : checking for running server 'org.mythtv.service.guide.ProgramGuideDownloadService'
10-13 16:51:53.125: V/RunningServiceHelper(16741): isServiceRunning : exit
10-13 16:51:53.148: V/ProgramGuideDownloadService(15868): onHandleIntent : enter
10-13 16:51:53.148: V/BackendStatusFragment(16741): RecordingRuleDownloadReceiver.onReceive : exit
10-13 16:51:53.171: W/dalvikvm(15868): threadid=11: thread exiting with uncaught exception (group=0x40da92a0)
10-13 16:51:53.171: E/AndroidRuntime(15868): FATAL EXCEPTION: IntentService[ProgamGuideDownloadServiceNew]
10-13 16:51:53.171: E/AndroidRuntime(15868): java.lang.IllegalArgumentException: LocationProfile is required
10-13 16:51:53.171: E/AndroidRuntime(15868):    at org.mythtv.service.util.NetworkHelper.isMasterBackendConnected(NetworkHelper.java:112)
10-13 16:51:53.171: E/AndroidRuntime(15868):    at org.mythtv.service.guide.ProgramGuideDownloadService.onHandleIntent(ProgramGuideDownloadService.java:69)
10-13 16:51:53.171: E/AndroidRuntime(15868):    at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
10-13 16:51:53.171: E/AndroidRuntime(15868):    at android.os.Handler.dispatchMessage(Handler.java:99)
10-13 16:51:53.171: E/AndroidRuntime(15868):    at android.os.Looper.loop(Looper.java:137)
10-13 16:51:53.171: E/AndroidRuntime(15868):    at android.os.HandlerThread.run(HandlerThread.java:60)
10-13 16:51:57.156: D/NavigationDrawerActivity(16741): onDrawerClosed : enter
10-13 16:51:57.164: V/AbstractMythtvFragmentActivity(16741): onCreateOptionsMenu : enter
billmeek commented 11 years ago

After the above, the nav drawer still showed mc0 and http://192.168.1.204:6544/

billmeek commented 11 years ago

I'm closing this because I can't duplicate it. To be honest it wasn't easily reproducible.