The bug I think is that the documentation should be updated. We definitely want the new behavior -- when strict mode is enabled by default (on non-user builds) we explicitly do not want the checks happening in Application.onCreate() because it is okay to do disk access and such there (the process is after all in the process of being launched).
On Mon, Jul 16, 2012 at 1:25 PM, Ievgenii Nazaruk < ievgenii.naza...@gmail.com> wrote: > Just curious, how did this influence your application? Do you access > network layer from UI thread? > > Anyway, I think this is a bug, there is nothing changed in documentation. > And StrictMode example in documentation still uses App's onCreate(). So > there are no signs of this being an intentional change so far. > > > On Monday, July 16, 2012 9:43:59 PM UTC+3, b0b wrote: >> >> >> Thank you for your in-depth analysis. >> >> I've ended up with this, call in the Application derived class onCreate(): >> >> private void setLaxStrictMode() { >> >> if(Build.VERSION.SDK_INT < Build.VERSION_CODES.**GINGERBREAD) >> return ; >> >> if(Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_**BEAN) { >> StrictMode.setThreadPolicy(**ThreadPolicy.LAX); >> log.info("StrictMode: LAX"); >> } else { >> >> new Handler().postAtFrontOfQueue(**new Runnable() { >> @Override >> public void run() { >> StrictMode.setThreadPolicy(**ThreadPolicy.LAX); >> log.info("StrictMode (JB): LAX"); >> } >> }); >> } >> } >> >> >> Now the real question is if the change in handleBindApplication() was >> intended, or if it is a real bug. >> >> In any case it broke my app on JB, and got me a few expeditive 1-star >> comments on Google Play >> > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en