Bug 1277978 - Part 0b - Add target api annotation in BrowserApp. r=liuche draft
authorJan Henning <jh+bugzilla@buttercookie.de>
Sat, 20 Aug 2016 16:59:59 +0200
changeset 412247 6b82ccf8c3fedee10688b4078882222cf231cb33
parent 412246 4e93b0aca605427fa8adfe9a179bd93884a9a7c8
child 412248 8f43ee5a315205833111e2c5cdae161077dbbdb4
child 412352 fb65db89dbc47028f21e5c92b1e8e51ed9bd10b4
push id29091
push usermozilla@buttercookie.de
push dateFri, 09 Sep 2016 16:35:06 +0000
reviewersliuche
bugs1277978
milestone51.0a1
Bug 1277978 - Part 0b - Add target api annotation in BrowserApp. r=liuche Otherwise Android Studio complains because it doesn't recognise our version switch. MozReview-Commit-ID: 2QpD3nNSryK
mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -1,16 +1,17 @@
 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 package org.mozilla.gecko;
 
 import android.Manifest;
+import android.annotation.TargetApi;
 import android.app.DownloadManager;
 import android.os.Environment;
 import android.support.annotation.CheckResult;
 import android.support.annotation.NonNull;
 
 import android.graphics.Rect;
 
 import org.json.JSONArray;
@@ -2215,16 +2216,17 @@ public class BrowserApp extends GeckoApp
                     .putString(GeckoPreferences.PREFS_HOMEPAGE, homepagePartner)
                     .putString(GeckoPreferences.PREFS_HOMEPAGE_PARTNER_COPY, homepagePartner)
                     .apply();
         }
 
         return homepagePartner;
     }
 
+    @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
     @Override
     public void onTabsLayoutChange(int width, int height) {
         int animationLength = TABS_ANIMATION_DURATION;
 
         if (mMainLayoutAnimator != null) {
             animationLength = Math.max(1, animationLength - (int)mMainLayoutAnimator.getRemainingTime());
             mMainLayoutAnimator.stop(false);
         }