Backout a1c1113cdf3e (Bug 781274) to avoid user confusion over StrictMode screen flashing. a=me

This commit is contained in:
Chris Peterson 2012-08-14 17:13:52 -04:00
parent e2dd9c2028
commit cc733dd923

View File

@ -1771,17 +1771,16 @@ abstract public class GeckoApp
* Enable Android StrictMode checks (for supported OS versions).
* http://developer.android.com/reference/android/os/StrictMode.html
*/
private void enableStrictMode() {
int SDK_INT = Build.VERSION.SDK_INT;
if (SDK_INT < 9)
private void enableStrictMode()
{
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.GINGERBREAD) {
return;
}
StrictMode.ThreadPolicy.Builder threadPolicyBuilder = new StrictMode.ThreadPolicy.Builder()
.detectAll()
.penaltyLog();
if (SDK_INT >= 11)
threadPolicyBuilder = threadPolicyBuilder.penaltyFlashScreen();
StrictMode.setThreadPolicy(threadPolicyBuilder.build());
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectAll()
.penaltyLog()
.build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectAll()