GhostFlying/LocationReportEnabler

重启手机会提示“LocationReportEnabler 已停止运行”

Kongloli opened this issue · 5 comments

重启手机会提示“LocationReportEnabler 已停止运行”,虽然功能上好像不影响,不过还是希望能修复。
Android 版本为:7.1.1,log:
02-26 17:51:58.504 1222 1222 E AndroidRuntime: FATAL EXCEPTION: main
02-26 17:51:58.504 1222 1222 E AndroidRuntime: Process: com.ghostflying.locationreportenabler, PID: 1222
02-26 17:51:58.504 1222 1222 E AndroidRuntime: java.lang.RuntimeException: Unable to start receiver com.ghostflying.locationreportenabler.EnablerReceiver: java.lang.StringIndexOutOfBoundsException: length=100; regionStart=0; regionLength=-1
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3047)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at android.app.ActivityThread.-wrap18(ActivityThread.java)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1561)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6119)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: Caused by: java.lang.StringIndexOutOfBoundsException: length=100; regionStart=0; regionLength=-1
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at java.lang.StringFactory.newStringFromBytes(StringFactory.java:69)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at java.lang.StringFactory.newStringFromBytes(StringFactory.java:53)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at com.ghostflying.locationreportenabler.PropUtil.getShellOutput(PropUtil.java:152)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at com.ghostflying.locationreportenabler.PropUtil.setFakerCarrierForDualCard(PropUtil.java:114)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at com.ghostflying.locationreportenabler.PropUtil.setFakeCarrier(PropUtil.java:100)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at com.ghostflying.locationreportenabler.PropUtil.enableLocationReport(PropUtil.java:46)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at com.ghostflying.locationreportenabler.EnablerReceiver.onReceive(EnablerReceiver.java:24)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3040)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: ... 8 more
02-26 17:51:58.504 1222 1222 E AndroidRuntime: FATAL EXCEPTION: main
02-26 17:51:58.504 1222 1222 E AndroidRuntime: Process: com.ghostflying.locationreportenabler, PID: 1222
02-26 17:51:58.504 1222 1222 E AndroidRuntime: java.lang.RuntimeException: Unable to start receiver com.ghostflying.locationreportenabler.EnablerReceiver: java.lang.StringIndexOutOfBoundsException: length=100; regionStart=0; regionLength=-1
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3047)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at android.app.ActivityThread.-wrap18(ActivityThread.java)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1561)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6119)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: Caused by: java.lang.StringIndexOutOfBoundsException: length=100; regionStart=0; regionLength=-1
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at java.lang.StringFactory.newStringFromBytes(StringFactory.java:69)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at java.lang.StringFactory.newStringFromBytes(StringFactory.java:53)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at com.ghostflying.locationreportenabler.PropUtil.getShellOutput(PropUtil.java:152)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at com.ghostflying.locationreportenabler.PropUtil.setFakerCarrierForDualCard(PropUtil.java:114)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at com.ghostflying.locationreportenabler.PropUtil.setFakeCarrier(PropUtil.java:100)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at com.ghostflying.locationreportenabler.PropUtil.enableLocationReport(PropUtil.java:46)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at com.ghostflying.locationreportenabler.EnablerReceiver.onReceive(EnablerReceiver.java:24)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:3040)
02-26 17:51:58.504 1222 1222 E AndroidRuntime: ... 8 more

看了下大概找到了问题,不过最近有点事,应该会稍后修复

fixed by 51e4e5e