Commit 761be790 authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

Remove some bits of ApiCompatibilityUtils that are no longer needed

Since KitKat support is deprecated, >= L checks can be removed and < L
code can be removed.

Bug: none
Change-Id: I123e3c1d5d33d7cf031d7c248d12a8002c2209da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2393156
Commit-Queue: Evan Stade <estade@chromium.org>
Reviewed-by: default avatarYaron Friedman <yfriedman@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805552}
parent 31db08c8
......@@ -18,17 +18,13 @@ import android.content.res.Resources;
import android.content.res.Resources.NotFoundException;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.ImageDecoder;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.hardware.display.DisplayManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.PowerManager;
import android.os.Process;
import android.os.StrictMode;
import android.os.UserManager;
import android.provider.MediaStore;
......@@ -45,14 +41,12 @@ import android.view.inputmethod.InputMethodSubtype;
import android.view.textclassifier.TextClassifier;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.PopupWindow;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.widget.ImageViewCompat;
import org.chromium.base.annotations.VerifiesOnLollipop;
import org.chromium.base.annotations.VerifiesOnLollipopMR1;
import org.chromium.base.annotations.VerifiesOnM;
import org.chromium.base.annotations.VerifiesOnN;
......@@ -180,94 +174,6 @@ public class ApiCompatibilityUtils {
}
}
@VerifiesOnLollipop
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private static class ApisL {
static final int FLAG_ACTIVITY_NEW_DOCUMENT = Intent.FLAG_ACTIVITY_NEW_DOCUMENT;
static void finishAndRemoveTask(Activity activity) {
activity.finishAndRemoveTask();
}
static void finishAfterTransition(Activity activity) {
activity.finishAfterTransition();
}
static void setElevation(PopupWindow popupWindow, float elevationValue) {
popupWindow.setElevation(elevationValue);
}
static boolean isInteractive(PowerManager manager) {
return manager.isInteractive();
}
static boolean shouldSkipFirstUseHints(ContentResolver contentResolver) {
return Settings.Secure.getInt(contentResolver, Settings.Secure.SKIP_FIRST_USE_HINTS, 0)
!= 0;
}
static void setTaskDescription(Activity activity, String title, Bitmap icon, int color) {
ActivityManager.TaskDescription description =
new ActivityManager.TaskDescription(title, icon, color);
activity.setTaskDescription(description);
}
static void setStatusBarColor(Window window, int statusBarColor) {
// If both system bars are black, we can remove these from our layout,
// removing or shrinking the SurfaceFlinger overlay required for our views.
// This benefits battery usage on L and M. However, this no longer provides a battery
// benefit as of N and starts to cause flicker bugs on O, so don't bother on O and up.
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O && statusBarColor == Color.BLACK
&& window.getNavigationBarColor() == Color.BLACK) {
window.clearFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
} else {
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
}
window.setStatusBarColor(statusBarColor);
}
static Drawable getDrawableForDensity(Resources res, int id, int density) {
// On newer OS versions, this check is done within getDrawableForDensity().
if (density == 0) {
return res.getDrawable(id, null);
}
return res.getDrawableForDensity(id, density, null);
}
static void setImageTintList(ImageView view, @Nullable ColorStateList tintList) {
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
// Work around broken workaround in ImageViewCompat, see
// https://crbug.com/891609#c3.
if (tintList != null && view.getImageTintMode() == null) {
view.setImageTintMode(PorterDuff.Mode.SRC_IN);
}
}
ImageViewCompat.setImageTintList(view, tintList);
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
// Work around that the tint list is not cleared when setting tint list to null on L
// in some cases. See https://crbug.com/983686.
if (tintList == null) view.refreshDrawableState();
}
}
static Drawable getUserBadgedIcon(PackageManager packageManager, Drawable drawable) {
return packageManager.getUserBadgedIcon(drawable, Process.myUserHandle());
}
static Drawable getUserBadgedDrawableForDensity(
Drawable drawable, Rect badgeLocation, int density) {
PackageManager packageManager =
ContextUtils.getApplicationContext().getPackageManager();
return packageManager.getUserBadgedDrawableForDensity(
drawable, Process.myUserHandle(), badgeLocation, density);
}
static ColorFilter getColorFilter(Drawable drawable) {
return drawable.getColorFilter();
}
}
/**
* Compares two long values numerically. The value returned is identical to what would be
* returned by {@link Long#compare(long, long)} which is available since API level 19.
......@@ -338,21 +244,11 @@ public class ApiCompatibilityUtils {
*/
public static void finishAndRemoveTask(Activity activity) {
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
ApisL.finishAndRemoveTask(activity);
} else if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
activity.finishAndRemoveTask();
} else {
assert Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP;
// crbug.com/395772 : Fallback for Activity.finishAndRemoveTask() failing.
new FinishAndRemoveTaskWithRetry(activity).run();
} else {
activity.finish();
}
}
/**
* Set elevation if supported.
*/
public static void setElevation(PopupWindow window, float elevationValue) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
ApisL.setElevation(window, elevationValue);
}
}
......@@ -386,7 +282,7 @@ public class ApiCompatibilityUtils {
@Override
public void run() {
ApisL.finishAndRemoveTask(mActivity);
mActivity.finishAndRemoveTask();
mTryCount++;
if (!mActivity.isFinishing()) {
if (mTryCount < MAX_TRY_COUNT) {
......@@ -398,51 +294,21 @@ public class ApiCompatibilityUtils {
}
}
/**
* @return Whether the screen of the device is interactive.
*/
@SuppressWarnings("deprecation")
public static boolean isInteractive() {
PowerManager manager = (PowerManager) ContextUtils.getApplicationContext().getSystemService(
Context.POWER_SERVICE);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
return ApisL.isInteractive(manager);
}
return manager.isScreenOn();
}
/**
* @see android.provider.Settings.Secure#SKIP_FIRST_USE_HINTS
*/
public static boolean shouldSkipFirstUseHints(ContentResolver contentResolver) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
return ApisL.shouldSkipFirstUseHints(contentResolver);
}
return false;
}
/**
* @param activity Activity that should get the task description update.
* @param title Title of the activity.
* @param icon Icon of the activity.
* @param color Color of the activity. It must be a fully opaque color.
*/
public static void setTaskDescription(Activity activity, String title, Bitmap icon, int color) {
// TaskDescription requires an opaque color.
assert Color.alpha(color) == 255;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
ApisL.setTaskDescription(activity, title, icon, color);
}
}
/**
* @see android.view.Window#setStatusBarColor(int color).
*/
public static void setStatusBarColor(Window window, int statusBarColor) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
ApisL.setStatusBarColor(window, statusBarColor);
// If both system bars are black, we can remove these from our layout,
// removing or shrinking the SurfaceFlinger overlay required for our views.
// This benefits battery usage on L and M. However, this no longer provides a battery
// benefit as of N and starts to cause flicker bugs on O, so don't bother on O and up.
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O && statusBarColor == Color.BLACK
&& window.getNavigationBarColor() == Color.BLACK) {
window.clearFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
} else {
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
}
window.setStatusBarColor(statusBarColor);
}
/**
......@@ -468,7 +334,20 @@ public class ApiCompatibilityUtils {
}
public static void setImageTintList(ImageView view, @Nullable ColorStateList tintList) {
ApisL.setImageTintList(view, tintList);
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
// Work around broken workaround in ImageViewCompat, see
// https://crbug.com/891609#c3.
if (tintList != null && view.getImageTintMode() == null) {
view.setImageTintMode(PorterDuff.Mode.SRC_IN);
}
}
ImageViewCompat.setImageTintList(view, tintList);
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
// Work around that the tint list is not cleared when setting tint list to null on L
// in some cases. See https://crbug.com/983686.
if (tintList == null) view.refreshDrawableState();
}
}
/**
......@@ -478,53 +357,18 @@ public class ApiCompatibilityUtils {
public static Drawable getDrawableForDensity(Resources res, int id, int density) {
StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
try {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
return ApisL.getDrawableForDensity(res, id, density);
} else if (density == 0) {
// On newer OS versions, this check is done within getDrawableForDensity().
return res.getDrawable(id);
// For Android Oreo+, Resources.getDrawable(id, null) delegates to
// Resources.getDrawableForDensity(id, 0, null), but before that the two functions are
// independent. This check can be removed after Oreo becomes the minimum supported API.
if (density == 0) {
return res.getDrawable(id, null);
}
return res.getDrawableForDensity(id, density);
return res.getDrawableForDensity(id, density, null);
} finally {
StrictMode.setThreadPolicy(oldPolicy);
}
}
/**
* @see android.app.Activity#finishAfterTransition().
*/
public static void finishAfterTransition(Activity activity) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
ApisL.finishAfterTransition(activity);
} else {
activity.finish();
}
}
/**
* @see android.content.pm.PackageManager#getUserBadgedIcon(Drawable, android.os.UserHandle).
*/
public static Drawable getUserBadgedIcon(Context context, int id) {
Drawable drawable = getDrawable(context.getResources(), id);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
PackageManager packageManager = context.getPackageManager();
drawable = ApisL.getUserBadgedIcon(packageManager, drawable);
}
return drawable;
}
/**
* @see android.content.pm.PackageManager#getUserBadgedDrawableForDensity(Drawable drawable,
* UserHandle user, Rect badgeLocation, int badgeDensity).
*/
public static Drawable getUserBadgedDrawableForDensity(
Drawable drawable, Rect badgeLocation, int density) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
drawable = ApisL.getUserBadgedDrawableForDensity(drawable, badgeLocation, density);
}
return drawable;
}
/**
* @see android.content.res.Resources#getColor(int id).
*/
......@@ -533,16 +377,6 @@ public class ApiCompatibilityUtils {
return res.getColor(id);
}
/**
* @see android.graphics.drawable.Drawable#getColorFilter().
*/
public static ColorFilter getColorFilter(Drawable drawable) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
return ApisL.getColorFilter(drawable);
}
return null;
}
/**
* @see android.widget.TextView#setTextAppearance(int id).
*/
......@@ -586,21 +420,6 @@ public class ApiCompatibilityUtils {
return inputMethodSubType.getLocale();
}
/**
* @see android.view.Window#FEATURE_INDETERMINATE_PROGRESS
*/
public static void setWindowIndeterminateProgress(Window window) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
@SuppressWarnings("deprecation")
int featureNumber = Window.FEATURE_INDETERMINATE_PROGRESS;
@SuppressWarnings("deprecation")
int featureValue = Window.PROGRESS_VISIBILITY_OFF;
window.setFeatureInt(featureNumber, featureValue);
}
}
/**
* @param activity The {@link Activity} to check.
* @return Whether or not {@code activity} is currently in Android N+ multi-window mode.
......
......@@ -31,7 +31,6 @@ import androidx.annotation.IntDef;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.CallbackController;
import org.chromium.base.CommandLine;
import org.chromium.base.ContextUtils;
......@@ -682,7 +681,6 @@ public class ChromeTabbedActivity extends ChromeActivity<ChromeActivityComponent
// The dataset has already been created, we need to initialize our state.
mTabModelSelectorImpl.notifyChanged();
ApiCompatibilityUtils.setWindowIndeterminateProgress(getWindow());
// Check for incognito tabs to handle the case where Chrome was swiped away in the
// background.
......
......@@ -18,7 +18,6 @@ import android.os.PowerManager;
import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.net.ConnectionType;
import org.chromium.net.NetworkChangeNotifier;
......@@ -183,8 +182,10 @@ public class DeviceConditions {
public static boolean isCurrentlyScreenOnAndUnlocked(Context context) {
KeyguardManager keyguardManager =
(KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
return keyguardManager != null && !keyguardManager.isKeyguardLocked()
&& ApiCompatibilityUtils.isInteractive();
if (keyguardManager == null || keyguardManager.isKeyguardLocked()) return false;
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
return powerManager.isInteractive();
}
private static Intent getBatteryStatus(Context context) {
......
......@@ -15,6 +15,7 @@ import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.PowerManager;
import android.os.SystemClock;
import android.provider.Browser;
import android.provider.MediaStore;
......@@ -28,7 +29,6 @@ import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import androidx.browser.customtabs.CustomTabsSessionToken;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.ContextUtils;
import org.chromium.base.FileUtils;
import org.chromium.base.IntentUtils;
......@@ -1049,8 +1049,12 @@ public class IntentHandler {
// Only process Intents if the screen is on and the device is unlocked;
// i.e. the user will see what is going on.
Context appContext = ContextUtils.getApplicationContext();
if (!ApiCompatibilityUtils.isInteractive()) return false;
PowerManager powerManager =
(PowerManager) appContext.getSystemService(Context.POWER_SERVICE);
if (!powerManager.isInteractive()) return false;
if (!isDeviceProvisioned(appContext)) return true;
return !((KeyguardManager) appContext.getSystemService(Context.KEYGUARD_SERVICE))
.inKeyguardRestrictedInputMode();
}
......
......@@ -10,11 +10,11 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.os.Handler;
import android.os.Looper;
import android.os.PowerManager;
import androidx.annotation.IntDef;
import androidx.annotation.VisibleForTesting;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.ContextUtils;
import org.chromium.base.ThreadUtils;
......@@ -44,7 +44,9 @@ public class PowerBroadcastReceiver extends BroadcastReceiver {
static class PowerManagerHelper {
/** @return whether the screen is on or not. */
public boolean isScreenOn(Context context) {
return ApiCompatibilityUtils.isInteractive();
PowerManager powerManager =
(PowerManager) context.getSystemService(Context.POWER_SERVICE);
return powerManager.isInteractive();
}
}
......
......@@ -8,6 +8,7 @@ import static androidx.browser.customtabs.CustomTabsIntent.COLOR_SCHEME_DARK;
import static androidx.browser.customtabs.CustomTabsIntent.COLOR_SCHEME_LIGHT;
import android.app.Activity;
import android.app.ActivityManager;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
......@@ -23,7 +24,6 @@ import androidx.annotation.Nullable;
import androidx.browser.customtabs.CustomTabsIntent;
import androidx.browser.customtabs.CustomTabsSessionToken;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.IntentUtils;
import org.chromium.base.metrics.RecordUserAction;
import org.chromium.chrome.R;
......@@ -109,8 +109,9 @@ public class CustomTabActivity extends BaseCustomTabActivity {
}
// Setting task title and icon to be null will preserve the client app's title and icon.
ApiCompatibilityUtils.setTaskDescription(this, null, null,
mIntentDataProvider.getToolbarColor());
setTaskDescription(new ActivityManager.TaskDescription(
null, null, mIntentDataProvider.getToolbarColor()));
getComponent().resolveBottomBarDelegate().showBottomBarIfNecessary();
}
......
......@@ -4,6 +4,7 @@
package org.chromium.chrome.browser.customtabs;
import android.app.ActivityManager;
import android.content.Intent;
import android.graphics.Bitmap;
import android.text.TextUtils;
......@@ -203,8 +204,8 @@ public class CustomTabTaskDescriptionHelper implements NativeInitObserver, Destr
}
private void updateTaskDescription() {
ApiCompatibilityUtils.setTaskDescription(
mActivity, computeTitle(), computeIcon(), computeThemeColor());
mActivity.setTaskDescription(new ActivityManager.TaskDescription(
computeTitle(), computeIcon(), computeThemeColor()));
}
/**
......
......@@ -11,6 +11,7 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.SystemClock;
import android.provider.Settings;
import androidx.annotation.VisibleForTesting;
......@@ -115,7 +116,9 @@ public abstract class FirstRunFlowSequencer {
@VisibleForTesting
protected boolean shouldSkipFirstUseHints() {
return ApiCompatibilityUtils.shouldSkipFirstUseHints(mActivity.getContentResolver());
return Settings.Secure.getInt(
mActivity.getContentResolver(), Settings.Secure.SKIP_FIRST_USE_HINTS, 0)
!= 0;
}
@VisibleForTesting
......
......@@ -12,6 +12,7 @@ import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Process;
import android.text.format.DateFormat;
import android.util.DisplayMetrics;
import android.view.View;
......@@ -19,7 +20,6 @@ import android.widget.RemoteViews;
import androidx.annotation.VisibleForTesting;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.StrictModeContext;
import org.chromium.chrome.R;
import org.chromium.components.browser_ui.notifications.NotificationMetadata;
......@@ -245,8 +245,9 @@ public class CustomNotificationBuilder extends NotificationBuilderBase {
Bitmap bitmap = Bitmap.createBitmap(colors, size, size, Bitmap.Config.ARGB_8888);
Drawable inputDrawable = new BitmapDrawable(resources, bitmap);
Drawable outputDrawable = ApiCompatibilityUtils.getUserBadgedDrawableForDensity(
inputDrawable, null /* badgeLocation */, metrics.densityDpi);
Drawable outputDrawable =
mContext.getPackageManager().getUserBadgedDrawableForDensity(inputDrawable,
Process.myUserHandle(), null /* badgeLocation */, metrics.densityDpi);
// The input bitmap is immutable, so the output drawable will be a different instance from
// the input drawable if the work profile badge was applied.
......
......@@ -6,8 +6,8 @@ package org.chromium.chrome.browser.omaha;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.os.PowerManager;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.ApplicationStatus;
import org.chromium.chrome.browser.AppHooks;
......@@ -46,9 +46,10 @@ public abstract class OmahaDelegateBase extends OmahaDelegate {
@Override
boolean isChromeBeingUsed() {
boolean isChromeVisible = ApplicationStatus.hasVisibleActivities();
boolean isScreenOn = ApiCompatibilityUtils.isInteractive();
return isChromeVisible && isScreenOn;
if (!ApplicationStatus.hasVisibleActivities()) return false;
PowerManager powerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
return powerManager.isInteractive();
}
@Override
......
......@@ -5,6 +5,7 @@
package org.chromium.chrome.browser.settings;
import android.annotation.SuppressLint;
import android.app.ActivityManager;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager.NameNotFoundException;
......@@ -123,9 +124,10 @@ public class SettingsActivity extends ChromeBaseAppCompatActivity
}
Resources res = getResources();
ApiCompatibilityUtils.setTaskDescription(this, res.getString(R.string.app_name),
setTaskDescription(new ActivityManager.TaskDescription(res.getString(R.string.app_name),
BitmapFactory.decodeResource(res, R.mipmap.app_icon),
ApiCompatibilityUtils.getColor(res, R.color.default_primary_color));
ApiCompatibilityUtils.getColor(res, R.color.default_primary_color)));
setStatusBarColor();
}
......
......@@ -9,9 +9,9 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.PowerManager;
import android.os.SystemClock;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.ContextUtils;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
......@@ -82,7 +82,11 @@ public class IdleDetector extends BroadcastReceiver {
@CalledByNative
private boolean isScreenLocked() {
Context context = ContextUtils.getApplicationContext();
KeyguardManager myKM = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
return myKM.inKeyguardRestrictedInputMode() || !ApiCompatibilityUtils.isInteractive();
KeyguardManager keyguardManager =
(KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
if (keyguardManager.inKeyguardRestrictedInputMode()) return true;
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
return !powerManager.isInteractive();
}
}
......@@ -22,7 +22,6 @@ import android.widget.PopupWindow.OnDismissListener;
import androidx.annotation.IntDef;
import androidx.annotation.VisibleForTesting;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.ObserverList;
import java.lang.annotation.Retention;
......@@ -354,10 +353,10 @@ public class AnchoredPopupWindow implements OnTouchListener, RectProvider.Observ
}
/**
* Sets the elevation of the popup, if elevation is supported.
* Sets the elevation of the popup.
*/
public void setElevation(float elevation) {
ApiCompatibilityUtils.setElevation(mPopupWindow, elevation);
mPopupWindow.setElevation(elevation);
}
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment