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
--- 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);
}