freexperia / vendor_ti_fmradio

Other
8 stars 8 forks source link

FC when no headset connected #4

Open M66B opened 11 years ago

M66B commented 11 years ago

I fixed it with this patch:

diff --git a/Fmapplication/src/com/ti/fmapp/FmRxApp.java b/Fmapplication/src/com/ti/fmapp/FmRxApp.java
index a6f1347..1a1021e 100644
--- a/Fmapplication/src/com/ti/fmapp/FmRxApp.java
+++ b/Fmapplication/src/com/ti/fmapp/FmRxApp.java
@@ -1680,7 +1680,8 @@ public class FmRxApp extends Activity implements View.OnClickListener,
             unregisterReceiver(mReceiver);
             unregisterReceiver(mNotificationsReceiver);
         }
-        sFmReceiver.close();
+        if (sFmReceiver != null)
+            sFmReceiver.close();
     }

     // Receives all of the FM intents and dispatches to the proper handler
@@ -2111,4 +2112,4 @@ public class FmRxApp extends Activity implements View.OnClickListener,
             }
         }
     }
-}
\ No newline at end of file
+}
freexperia commented 11 years ago

Hy

push on gerrit so that i can review br J

On Fri, Nov 30, 2012 at 8:31 PM, Marcel Bokhorst notifications@github.comwrote:

I fixed it with this patch:

diff --git a/Fmapplication/src/com/ti/fmapp/FmRxApp.java b/Fmapplication/src/com/ti/fmapp/FmRxApp.java index a6f1347..1a1021e 100644 --- a/Fmapplication/src/com/ti/fmapp/FmRxApp.java +++ b/Fmapplication/src/com/ti/fmapp/FmRxApp.java @@ -1680,7 +1680,8 @@ public class FmRxApp extends Activity implements View.OnClickListener, unregisterReceiver(mReceiver); unregisterReceiver(mNotificationsReceiver); }

  • sFmReceiver.close();
  • if (sFmReceiver != null)
  •      sFmReceiver.close();

    }

    // Receives all of the FM intents and dispatches to the proper handler @@ -2111,4 +2112,4 @@ public class FmRxApp extends Activity implements View.OnClickListener, } } } -} \ No newline at end of file +}

    — Reply to this email directly or view it on GitHubhttps://github.com/freexperia/vendor_ti_fmradio/issues/4.

M66B commented 11 years ago

Done