Bug 1017242 - Part 6: remove API 8 code from BrowserHealthRecorder. r=mcomella
authorRichard Newman <rnewman@mozilla.com>
Fri, 18 Jul 2014 16:47:09 -0700
changeset 195059 f9c02d1852de95dc4beb1533e51cd27974a710a7
parent 195058 33dd5214acd8179c67c0f92c5c682b43efba0451
child 195060 f9ec00de92c5cc41ad07a11206017adaa1342038
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)
reviewersmcomella
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 6: remove API 8 code from BrowserHealthRecorder. r=mcomella
mobile/android/base/health/BrowserHealthRecorder.java
--- a/mobile/android/base/health/BrowserHealthRecorder.java
+++ b/mobile/android/base/health/BrowserHealthRecorder.java
@@ -329,25 +329,19 @@ public class BrowserHealthRecorder imple
             if (scanner != null) {
                 scanner.close();
             }
         }
         return -1;
     }
 
     /**
-     * Only works on API 9 and up.
-     *
      * @return the package install time, or -1 if an error occurred.
      */
     protected static long getPackageInstallTime(final Context context) {
-        if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.GINGERBREAD) {
-            return -1;
-        }
-
         try {
             return context.getPackageManager().getPackageInfo(AppConstants.ANDROID_PACKAGE_NAME, 0).firstInstallTime;
         } catch (android.content.pm.PackageManager.NameNotFoundException e) {
             Log.e(LOG_TAG, "Unable to fetch our own package info. This should never occur.", e);
         }
         return -1;
     }