我们在PlayStore控制台中发现了很多崩溃日志,但我们不知道这是什么,也无法重现它。
java.lang.SecurityException:
at android.os.Parcel.readException (Parcel.java:1689)
at android.database.DatabaseUtils.readExceptionFromParcel (DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionFromParcel (DatabaseUtils.java:135)
at android.content.ContentProviderProxy.insert (ContentProviderNative.java:482)
at android.content.ContentResolver.insert (ContentResolver.java:1279)
at android.content.AsyncQueryHandler$WorkerHandler.handleMessage (AsyncQueryHandler.java:96)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:241)
at android.os.HandlerThread.run (HandlerThread.java:61)
看起来异常并不依赖于任何Android版本(至少它发生在7.1,7.0,6.0,5.1版本中),但正如您从屏幕截图中看到的,所有列出的设备都是索尼设备
你有什么猜测这可能与什么有关?
答案 0 :(得分:1)
我们找到了异常原因。
这个例外确实是索尼特有的,与通知有关。
这是完整的堆栈跟踪。
java.lang.SecurityException: Missing permission to insert badges
11-14 19:41:50.414: E/DatabaseUtils(1389): at com.sonymobile.home.resourceprovider.HomeResourceProvider.insertBadge(HomeResourceProvider.java:113)
11-14 19:41:50.414: E/DatabaseUtils(1389): at com.sonymobile.home.resourceprovider.HomeResourceProvider.insert(HomeResourceProvider.java:58)
11-14 19:41:50.414: E/DatabaseUtils(1389): at android.content.ContentProvider$Transport.insert(ContentProvider.java:220)
11-14 19:41:50.414: E/DatabaseUtils(1389): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:167)
11-14 19:41:50.414: E/DatabaseUtils(1389): at android.os.Binder.execTransact(Binder.java:404)
11-14 19:41:50.414: E/DatabaseUtils(1389): at dalvik.system.NativeStart.run(Native Method)
11-14 19:41:50.414: W/dalvikvm(28623): threadid=20: thread exiting with uncaught exception (group=0x415b8d88)
11-14 19:41:50.414: E/AndroidRuntime(28623): FATAL EXCEPTION: AsyncQueryWorker
11-14 19:41:50.414: E/AndroidRuntime(28623): Process: air.com.plexonic.meln2, PID: 28623
11-14 19:41:50.414: E/AndroidRuntime(28623): java.lang.SecurityException: Missing permission to insert badges
11-14 19:41:50.414: E/AndroidRuntime(28623): at android.os.Parcel.readException(Parcel.java:1474)
11-14 19:41:50.414: E/AndroidRuntime(28623): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185)
11-14 19:41:50.414: E/AndroidRuntime(28623): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:137)
11-14 19:41:50.414: E/AndroidRuntime(28623): at android.content.ContentProviderProxy.insert(ContentProviderNative.java:479)
11-14 19:41:50.414: E/AndroidRuntime(28623): at android.content.ContentResolver.insert(ContentResolver.java:1196)
11-14 19:41:50.414: E/AndroidRuntime(28623): at android.content.AsyncQueryHandler$WorkerHandler.handleMessage(AsyncQueryHandler.java:96)
11-14 19:41:50.414: E/AndroidRuntime(28623): at android.os.Handler.dispatchMessage(Handler.java:102)
11-14 19:41:50.414: E/AndroidRuntime(28623): at android.os.Looper.loop(Looper.java:212)
11-14 19:41:50.414: E/AndroidRuntime(28623): at android.os.HandlerThread.run(HandlerThread.java:61)
解决方案是向AndroidManifest添加特定的Sony权限。
<uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE"/>
<uses-permission android:name="com.sonymobile.home.permission.PROVIDER_INSERT_BADGE"/>