indianpoptart / RadioControl

An app that auto toggles wifi and cell radio for maximum battery life
https://nikhilp.org/radiocontrol
GNU General Public License v3.0
16 stars 7 forks source link

NullPointer in getCellStatus #62

Closed indianpoptart closed 6 years ago

indianpoptart commented 6 years ago

Exception java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.isEmpty()' on a null object reference

com.nikhilparanjape.radiocontrol.rootUtils.Utilities.getCellStatus (Utilities.java:72) com.nikhilparanjape.radiocontrol.services.BackgroundAirplaneService.onHandleIntent (BackgroundAirplaneService.java:79) android.app.IntentService$ServiceHandler.handleMessage (IntentService.java:65) android.os.Handler.dispatchMessage (Handler.java:102) android.os.Looper.loop (Looper.java:135) android.os.HandlerThread.run (HandlerThread.java:61)

Fix: Add catch(NullPointerException e){ Log.e("RadioControl","NullPointer ",e); }

to line 78 of Utilities.java

Will be available in 5.0.1(The bug squashing release)