urbanairship / android-samples

DEPRECATED - Use https://github.com/urbanairship/android-library instead
Other
33 stars 39 forks source link

Disk writes in main thread #12

Closed ValleZ closed 10 years ago

ValleZ commented 10 years ago

08-14 15:44:04.830: D/StrictMode(15848): StrictMode policy violation; ~duration=100 ms: android.os.StrictMode$StrictModeDiskWriteViolation: policy=93 violation=1 08-14 15:44:04.830: D/StrictMode(15848): at android.os.StrictMode$AndroidBlockGuardPolicy.onWriteToDisk(StrictMode.java:1109) 08-14 15:44:04.830: D/StrictMode(15848): at android.database.sqlite.SQLiteConnection.applyBlockGuardPolicy(SQLiteConnection.java:1043) 08-14 15:44:04.830: D/StrictMode(15848): at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:779) 08-14 15:44:04.830: D/StrictMode(15848): at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788) 08-14 15:44:04.830: D/StrictMode(15848): at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86) 08-14 15:44:04.830: D/StrictMode(15848): at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1469) 08-14 15:44:04.830: D/StrictMode(15848): at android.database.sqlite.SQLiteDatabase.replaceOrThrow(SQLiteDatabase.java:1411) 08-14 15:44:04.830: D/StrictMode(15848): at com.urbanairship.util.DataManager.insert(DataManager.java:337) 08-14 15:44:04.830: D/StrictMode(15848): at com.urbanairship.UrbanAirshipProvider.insert(UrbanAirshipProvider.java:241) 08-14 15:44:04.830: D/StrictMode(15848): at android.content.ContentProvider$Transport.insert(ContentProvider.java:220) 08-14 15:44:04.830: D/StrictMode(15848): at android.content.ContentResolver.insert(ContentResolver.java:1190) 08-14 15:44:04.830: D/StrictMode(15848): at com.urbanairship.UrbanAirshipResolver.insert(UrbanAirshipResolver.java:78) 08-14 15:44:04.830: D/StrictMode(15848): at com.urbanairship.PreferencesResolver.put(PreferencesResolver.java:26) 08-14 15:44:04.830: D/StrictMode(15848): at com.urbanairship.Preferences$Preference.setValue(Preferences.java:266) 08-14 15:44:04.830: D/StrictMode(15848): at com.urbanairship.Preferences.put(Preferences.java:173) 08-14 15:44:04.830: D/StrictMode(15848): at com.urbanairship.push.PushPreferences.setAppVersionCode(PushPreferences.java:479) 08-14 15:44:04.830: D/StrictMode(15848): at com.urbanairship.push.GCMPushReceiver.onReceive(GCMPushReceiver.java:68) 08-14 15:44:04.830: D/StrictMode(15848): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2407) 08-14 15:44:04.830: D/StrictMode(15848): at android.app.ActivityThread.access$1700(ActivityThread.java:135) 08-14 15:44:04.830: D/StrictMode(15848): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1272) 08-14 15:44:04.830: D/StrictMode(15848): at android.os.Handler.dispatchMessage(Handler.java:102) 08-14 15:44:04.830: D/StrictMode(15848): at android.os.Looper.loop(Looper.java:136) 08-14 15:44:04.830: D/StrictMode(15848): at android.app.ActivityThread.main(ActivityThread.java:5001) 08-14 15:44:04.830: D/StrictMode(15848): at java.lang.reflect.Method.invoke(Native Method) 08-14 15:44:04.830: D/StrictMode(15848): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 08-14 15:44:04.830: D/StrictMode(15848): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 08-14 15:44:04.830: D/AndroidRuntime(15848): Shutting down VM

jtowle commented 10 years ago

Thanks. This issue has been addressed and a fix will be included in the next release of the SDK (Sept. timeframe).