Bug 1277978 - Part 0b - Add target api annotation in BrowserApp. r=liuche
authorJan Henning <jh+bugzilla@buttercookie.de>
Sat, 20 Aug 2016 16:59:59 +0200
changeset 354733 2329e646600993d7603ede43851faaf8ea8c8da0
parent 354732 c5c0de78a445cdd0875b723ed8849b9d087c3407
child 354734 a93820dea9baa82506443c2a649022128e9ddc34
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersliuche
bugs1277978
milestone51.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 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);
         }