Bug 1017242 - Part 8: remove API 8 code from CrashReporter. r=mfinkle
authorRichard Newman <rnewman@mozilla.com>
Fri, 18 Jul 2014 16:47:09 -0700
changeset 195061 c3cde1547d1de6b0b8908846af5b40ca821cbb55
parent 195060 f9ec00de92c5cc41ad07a11206017adaa1342038
child 195062 6bfbded8be02dbb3f9c8accf56cf31c798b00607
push id27168
push userryanvm@gmail.com
push dateSun, 20 Jul 2014 22:30:25 +0000
treeherdermozilla-central@e9cdcf646d1c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs1017242
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1017242 - Part 8: remove API 8 code from CrashReporter. r=mfinkle
mobile/android/base/CrashReporter.java
--- a/mobile/android/base/CrashReporter.java
+++ b/mobile/android/base/CrashReporter.java
@@ -239,21 +239,17 @@ public class CrashReporter extends Activ
         final String contactEmail  = ((EditText) findViewById(R.id.email)).getText().toString();
                    
         editor.putBoolean(PREFS_ALLOW_CONTACT, allowContact);
         editor.putBoolean(PREFS_INCLUDE_URL, includeUrl);
         editor.putBoolean(PREFS_SEND_REPORT, sendReport);
         editor.putString(PREFS_CONTACT_EMAIL, contactEmail);
                     
         // A slight performance improvement via async apply() vs. blocking on commit().
-        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.GINGERBREAD) {
-            editor.commit();
-        } else { 
-            editor.apply();
-        }
+        editor.apply();
     }
 
     public void onCloseClick(View v) {  // bound via crash_reporter.xml
         backgroundSendReport();
     }
 
     public void onRestartClick(View v) {  // bound via crash_reporter.xml
         doRestart();
@@ -387,23 +383,21 @@ public class CrashReporter extends Activ
             sendPart(os, boundary, "Android_Manufacturer", Build.MANUFACTURER);
             sendPart(os, boundary, "Android_Model", Build.MODEL);
             sendPart(os, boundary, "Android_Board", Build.BOARD);
             sendPart(os, boundary, "Android_Brand", Build.BRAND);
             sendPart(os, boundary, "Android_Device", Build.DEVICE);
             sendPart(os, boundary, "Android_Display", Build.DISPLAY);
             sendPart(os, boundary, "Android_Fingerprint", Build.FINGERPRINT);
             sendPart(os, boundary, "Android_CPU_ABI", Build.CPU_ABI);
-            if (Build.VERSION.SDK_INT >= 8) {
-                try {
-                    sendPart(os, boundary, "Android_CPU_ABI2", Build.CPU_ABI2);
-                    sendPart(os, boundary, "Android_Hardware", Build.HARDWARE);
-                } catch (Exception ex) {
-                    Log.e(LOGTAG, "Exception while sending SDK version 8 keys", ex);
-                }
+            try {
+                sendPart(os, boundary, "Android_CPU_ABI2", Build.CPU_ABI2);
+                sendPart(os, boundary, "Android_Hardware", Build.HARDWARE);
+            } catch (Exception ex) {
+                Log.e(LOGTAG, "Exception while sending SDK version 8 keys", ex);
             }
             sendPart(os, boundary, "Android_Version",  Build.VERSION.SDK_INT + " (" + Build.VERSION.CODENAME + ")");
             if (Build.VERSION.SDK_INT >= 16 && includeURLCheckbox.isChecked()) {
                 sendPart(os, boundary, "Android_Logcat", readLogcat());
             }
 
             String comment = ((EditText) findViewById(R.id.comment)).getText().toString();
             if (!TextUtils.isEmpty(comment)) {