Bug 1017242 - Part 1: remove API 8 code from mozglue. r=mfinkle
authorRichard Newman <rnewman@mozilla.com>
Fri, 18 Jul 2014 16:47:07 -0700
changeset 195054 a8a119f236f5eacc49e1763795290a1bd6b2e7f3
parent 195008 b69b7c847c5682780dd76c545b3d73b1785479ed
child 195055 4ed35c44168f28bcc5766cd6cf1bf9ef8f702342
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 1: remove API 8 code from mozglue. r=mfinkle
mobile/android/base/mozglue/GeckoLoader.java.in
--- a/mobile/android/base/mozglue/GeckoLoader.java.in
+++ b/mobile/android/base/mozglue/GeckoLoader.java.in
@@ -76,34 +76,29 @@ public final class GeckoLoader {
             File pluginPrivateDataDir = context.getDir("plugins_private", 0);
             putenv("ANDROID_PLUGIN_DATADIR_PRIVATE=" + pluginPrivateDataDir.getPath());
 
         } catch (Exception ex) {
             Log.w(LOGTAG, "Caught exception getting plugin dirs.", ex);
         }
     }
 
-    private static void setupDownloadEnvironment(Context context) {
+    private static void setupDownloadEnvironment(final Context context) {
         try {
-            File downloadDir = null;
-            File updatesDir  = null;
-            if (Build.VERSION.SDK_INT >= 8) {
-                downloadDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
-                updatesDir  = context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
-            }
+            File downloadDir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
+            File updatesDir  = context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
             if (downloadDir == null) {
                 downloadDir = new File(Environment.getExternalStorageDirectory().getPath(), "download");
             }
             if (updatesDir == null) {
                 updatesDir = downloadDir;
             }
             putenv("DOWNLOADS_DIRECTORY=" + downloadDir.getPath());
             putenv("UPDATES_DIRECTORY="   + updatesDir.getPath());
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             Log.w(LOGTAG, "No download directory found.", e);
         }
     }
 
     private static void delTree(File file) {
         if (file.isDirectory()) {
             File children[] = file.listFiles();
             for (File child : children) {