From 955d8d69ea6caabce1461dc25b339b9bf9dc61a6 Mon Sep 17 00:00:00 2001
From: Dianne Hackborn
Prior to {@link android.os.Build.VERSION_CODES#L}, if you did not have + *
Prior to {@link android.os.Build.VERSION_CODES#LOLLIPOP}, if you did not have * regular permission access to a Uri, but had received access to it through * a specific Uri permission grant, you could not revoke that grant with this * function and a {@link SecurityException} would be thrown. As of - * {@link android.os.Build.VERSION_CODES#L}, this function will not throw a security exception, + * {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this function will not throw a security exception, * but will remove whatever permission grants to the Uri had been given to the app * (or none).
* diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java index 77981f4..af6f181 100644 --- a/core/java/android/content/Intent.java +++ b/core/java/android/content/Intent.java @@ -2226,7 +2226,7 @@ public class Intent implements Parcelable, Cloneable { * Same as {@link android.media.AudioManager#ACTION_HEADSET_PLUG}, to be consulted for value * and documentation. *If the minimum SDK version of your application is
- * {@link android.os.Build.VERSION_CODES#L}, it is recommended to refer
+ * {@link android.os.Build.VERSION_CODES#LOLLIPOP}, it is recommended to refer
* to the AudioManager
constant in your receiver registration code instead.
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
diff --git a/core/java/android/hardware/location/GeofenceHardware.java b/core/java/android/hardware/location/GeofenceHardware.java
index 7dd105a..f537a77 100644
--- a/core/java/android/hardware/location/GeofenceHardware.java
+++ b/core/java/android/hardware/location/GeofenceHardware.java
@@ -490,7 +490,7 @@ public final class GeofenceHardware {
// and only call the updated callback on on L and above, this complies with the
// documentation of GeofenceHardwareMonitorCallback
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.L) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
c.onMonitoringSystemChange(event);
}
}
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 5f95b04..ee36012 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -485,7 +485,7 @@ public class Build {
public static final int JELLY_BEAN = 16;
/**
- * Android 4.2: Moar jelly beans!
+ * November 2012: Android 4.2, Moar jelly beans!
*
*
Applications targeting this or a later release will get these * new changes in behavior:
@@ -505,12 +505,12 @@ public class Build { public static final int JELLY_BEAN_MR1 = 17; /** - * Android 4.3: Jelly Bean MR2, the revenge of the beans. + * July 2013: Android 4.3, the revenge of the beans. */ public static final int JELLY_BEAN_MR2 = 18; /** - * Android 4.4: KitKat, another tasty treat. + * October 2013: Android 4.4, KitKat, another tasty treat. * *Applications targeting this or a later release will get these * new changes in behavior:
@@ -553,7 +553,12 @@ public class Build { public static final int KITKAT_WATCH = 20; /** - * L! + * Temporary until we completely switch to {@link #LOLLIPOP}. + */ + public static final int L = 21; + + /** + * Lollipop. A flat one with beautiful shadows. But still tasty. * *Applications targeting this or a later release will get these * new changes in behavior:
@@ -563,7 +568,7 @@ public class Build { * Intent. * */ - public static final int L = 21; + public static final int LOLLIPOP = 21; } /** The type of build, like "user" or "eng". */ diff --git a/core/java/android/os/Message.java b/core/java/android/os/Message.java index b6b70cc..6a0bddc 100644 --- a/core/java/android/os/Message.java +++ b/core/java/android/os/Message.java @@ -260,7 +260,7 @@ public final class Message implements Parcelable { /** @hide */ public static void updateCheckRecycle(int targetSdkVersion) { - if (targetSdkVersion < Build.VERSION_CODES.L) { + if (targetSdkVersion < Build.VERSION_CODES.LOLLIPOP) { gCheckRecycle = false; } } diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java index 37294e7..9a0b222 100644 --- a/core/java/android/os/UserManager.java +++ b/core/java/android/os/UserManager.java @@ -19,7 +19,6 @@ import android.annotation.SystemApi; import android.app.ActivityManager; import android.app.ActivityManagerNative; import android.content.Context; -import android.content.pm.PackageManager; import android.content.pm.UserInfo; import android.content.res.Resources; import android.graphics.Bitmap; @@ -434,7 +433,7 @@ public class UserManager { * Used to determine whether the user making this call is subject to * teleportations. * - *As of {@link android.os.Build.VERSION_CODES#L}, this method can + *
As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this method can * now automatically identify goats using advanced goat recognition technology.
* * @return Returns true if the user making this call is a goat. diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java index d137f0c..736ec54 100644 --- a/core/java/android/provider/MediaStore.java +++ b/core/java/android/provider/MediaStore.java @@ -256,7 +256,7 @@ public final class MediaStore { * object in the extra field. This is useful for applications that only need a small image. * If the EXTRA_OUTPUT is present, then the full-sized image will be written to the Uri * value of EXTRA_OUTPUT. - * As of {@link android.os.Build.VERSION_CODES#L}, this uri can also be supplied through + * As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this uri can also be supplied through * {@link android.content.Intent#setClipData(ClipData)}. If using this approach, you still must * supply the uri through the EXTRA_OUTPUT field for compatibility with old applications. * If you don't set a ClipData, it will be copied there for you when calling @@ -281,7 +281,7 @@ public final class MediaStore { * object in the extra field. This is useful for applications that only need a small image. * If the EXTRA_OUTPUT is present, then the full-sized image will be written to the Uri * value of EXTRA_OUTPUT. - * As of {@link android.os.Build.VERSION_CODES#L}, this uri can also be supplied through + * As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this uri can also be supplied through * {@link android.content.Intent#setClipData(ClipData)}. If using this approach, you still must * supply the uri through the EXTRA_OUTPUT field for compatibility with old applications. * If you don't set a ClipData, it will be copied there for you when calling @@ -304,7 +304,7 @@ public final class MediaStore { * where the video is written. If EXTRA_OUTPUT is not present the video will be * written to the standard location for videos, and the Uri of that location will be * returned in the data field of the Uri. - * As of {@link android.os.Build.VERSION_CODES#L}, this uri can also be supplied through + * As of {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this uri can also be supplied through * {@link android.content.Intent#setClipData(ClipData)}. If using this approach, you still must * supply the uri through the EXTRA_OUTPUT field for compatibility with old applications. * If you don't set a ClipData, it will be copied there for you when calling diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java index 5d6acd8..3d39b18 100644 --- a/core/java/android/service/notification/NotificationListenerService.java +++ b/core/java/android/service/notification/NotificationListenerService.java @@ -268,9 +268,9 @@ public abstract class NotificationListenerService extends Service { * {@link android.app.NotificationManager#notify(String, int, android.app.Notification)}. ** @deprecated Use {@link #cancelNotification(String key)} - * instead. Beginning with {@link android.os.Build.VERSION_CODES#L} this method will no longer + * instead. Beginning with {@link android.os.Build.VERSION_CODES#LOLLIPOP} this method will no longer * cancel the notification. It will continue to cancel the notification for applications - * whose {@code targetSdkVersion} is earlier than {@link android.os.Build.VERSION_CODES#L}. + * whose {@code targetSdkVersion} is earlier than {@link android.os.Build.VERSION_CODES#LOLLIPOP}. */ public final void cancelNotification(String pkg, String tag, int id) { if (!isBound()) return; diff --git a/core/java/android/view/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java index dffcca4..5926d5f 100644 --- a/core/java/android/view/WindowManagerGlobal.java +++ b/core/java/android/view/WindowManagerGlobal.java @@ -211,7 +211,7 @@ public final class WindowManagerGlobal { // system context), assume we want hardware acceleration. final Context context = view.getContext(); if (context != null - && context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.L) { + && context.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.LOLLIPOP) { wparams.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED; } } diff --git a/core/java/android/webkit/CookieManager.java b/core/java/android/webkit/CookieManager.java index de7d2d0..20ef646 100644 --- a/core/java/android/webkit/CookieManager.java +++ b/core/java/android/webkit/CookieManager.java @@ -17,7 +17,6 @@ package android.webkit; import android.net.WebAddress; -import android.webkit.ValueCallback; /** * Manages the cookies used by an application's {@link WebView} instances. @@ -81,7 +80,7 @@ public class CookieManager { *
* Apps that target {@link android.os.Build.VERSION_CODES#KITKAT} or below * default to allowing third party cookies. Apps targeting - * {@link android.os.Build.VERSION_CODES#L} or later default to disallowing + * {@link android.os.Build.VERSION_CODES#LOLLIPOP} or later default to disallowing * third party cookies. * * @param webview the {@link WebView} instance to set the cookie policy on diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java index 6d7c803..db8fc6f 100644 --- a/core/java/android/webkit/WebSettings.java +++ b/core/java/android/webkit/WebSettings.java @@ -1461,7 +1461,7 @@ public abstract class WebSettings { * * By default, apps that target {@link android.os.Build.VERSION_CODES#KITKAT} or below default * to {@link #MIXED_CONTENT_ALWAYS_ALLOW}. Apps targeting - * {@link android.os.Build.VERSION_CODES#L} default to {@link #MIXED_CONTENT_NEVER_ALLOW}. + * {@link android.os.Build.VERSION_CODES#LOLLIPOP} default to {@link #MIXED_CONTENT_NEVER_ALLOW}. * * The preferred and most secure mode of operation for the WebView is * {@link #MIXED_CONTENT_NEVER_ALLOW} and use of {@link #MIXED_CONTENT_ALWAYS_ALLOW} is @@ -1482,7 +1482,7 @@ public abstract class WebSettings { /** * Sets whether to use a video overlay for embedded encrypted video. - * In API levels prior to {@link android.os.Build.VERSION_CODES#L}, encrypted video can + * In API levels prior to {@link android.os.Build.VERSION_CODES#LOLLIPOP}, encrypted video can * only be rendered directly on a secure video surface, so it had been a hard problem to play * encrypted video in HTML. When this flag is on, WebView can play encrypted video (MSE/EME) * by using a video overlay (aka hole-punching) for videos embedded using HTML <video> diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 081bfdf..40aee96 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -25,7 +25,6 @@ import android.graphics.Paint; import android.graphics.Picture; import android.graphics.Rect; import android.graphics.drawable.Drawable; -import android.net.Uri; import android.net.http.SslCertificate; import android.os.Build; import android.os.Bundle; @@ -1754,7 +1753,7 @@ public class WebView extends AbsoluteLayout * safety. * *
- * Prior to {@link android.os.Build.VERSION_CODES#L}, this call could + * Prior to {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this call could * have the side effect of changing the matrix and clip of the canvas * if this picture had imbalanced saves/restores. * diff --git a/graphics/java/android/graphics/drawable/ColorDrawable.java b/graphics/java/android/graphics/drawable/ColorDrawable.java index 0608065..1253c46 100644 --- a/graphics/java/android/graphics/drawable/ColorDrawable.java +++ b/graphics/java/android/graphics/drawable/ColorDrawable.java @@ -157,7 +157,7 @@ public class ColorDrawable extends Drawable { /** * Sets the color filter applied to this color. *
- * Only supported on version {@link android.os.Build.VERSION_CODES#L} and + * Only supported on version {@link android.os.Build.VERSION_CODES#LOLLIPOP} and * above. Calling this method has no effect on earlier versions. * * @see android.graphics.drawable.Drawable#setColorFilter(ColorFilter) diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java index 0445869..ed408e0 100644 --- a/location/java/android/location/LocationManager.java +++ b/location/java/android/location/LocationManager.java @@ -1112,7 +1112,7 @@ public class LocationManager { * {@link #requestLocationUpdates(String, long, float, LocationListener)}. * *
- * Before API version {@link android.os.Build.VERSION_CODES#L}, this + * Before API version {@link android.os.Build.VERSION_CODES#LOLLIPOP}, this * method would throw {@link SecurityException} if the location permissions * were not sufficient to use the specified provider. * diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index eef4a5a..9492a14 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -696,7 +696,7 @@ public abstract class BaseStatusBar extends SystemUI implements if (entry.expanded.getId() != com.android.internal.R.id.status_bar_latest_event_content) { // Using custom RemoteViews if (entry.targetSdk >= Build.VERSION_CODES.GINGERBREAD - && entry.targetSdk < Build.VERSION_CODES.L) { + && entry.targetSdk < Build.VERSION_CODES.LOLLIPOP) { entry.row.setShowingLegacyBackground(true); entry.legacy = true; } @@ -712,7 +712,7 @@ public abstract class BaseStatusBar extends SystemUI implements } if (entry.icon != null) { - if (entry.targetSdk >= Build.VERSION_CODES.L) { + if (entry.targetSdk >= Build.VERSION_CODES.LOLLIPOP) { entry.icon.setColorFilter(mContext.getResources().getColor(android.R.color.white)); } else { entry.icon.setColorFilter(null); @@ -1385,7 +1385,7 @@ public abstract class BaseStatusBar extends SystemUI implements Drawable iconDrawable = StatusBarIconView.getIcon(mContext, ic); icon.setImageDrawable(iconDrawable); - if (entry.targetSdk >= Build.VERSION_CODES.L + if (entry.targetSdk >= Build.VERSION_CODES.LOLLIPOP || mNotificationColorUtil.isGrayscaleIcon(iconDrawable)) { icon.setBackgroundResource( com.android.internal.R.drawable.notification_icon_legacy_bg); diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 5f3b877..e9a114a 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -3334,7 +3334,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { final int targetSdk = context.getApplicationInfo().targetSdkVersion; final boolean targetPreHoneycomb = targetSdk < android.os.Build.VERSION_CODES.HONEYCOMB; final boolean targetPreIcs = targetSdk < android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH; - final boolean targetPreL = targetSdk < android.os.Build.VERSION_CODES.L; + final boolean targetPreL = targetSdk < android.os.Build.VERSION_CODES.LOLLIPOP; final boolean targetHcNeedsOptions = context.getResources().getBoolean( R.bool.target_honeycomb_needs_options_menu); final boolean noActionBar = !hasFeature(FEATURE_ACTION_BAR) || hasFeature(FEATURE_NO_TITLE); diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index f430c56..0b253f5 100755 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -31,7 +31,6 @@ import android.os.Looper; import android.os.SystemProperties; import android.util.ArrayMap; import android.util.ArraySet; -import com.android.internal.app.ProcessMap; import com.android.internal.app.ProcessStats; import com.android.internal.os.BatteryStatsImpl; import com.android.internal.os.TransferPipe; @@ -591,7 +590,7 @@ public final class ActiveServices { r.cancelNotification(); r.foregroundId = 0; r.foregroundNoti = null; - } else if (r.appInfo.targetSdkVersion >= Build.VERSION_CODES.L) { + } else if (r.appInfo.targetSdkVersion >= Build.VERSION_CODES.LOLLIPOP) { r.stripForegroundServiceFlagFromNotification(); } } diff --git a/services/core/java/com/android/server/dreams/DreamManagerService.java b/services/core/java/com/android/server/dreams/DreamManagerService.java index 985f77a..4521c28 100644 --- a/services/core/java/com/android/server/dreams/DreamManagerService.java +++ b/services/core/java/com/android/server/dreams/DreamManagerService.java @@ -262,7 +262,7 @@ public final class DreamManagerService extends SystemService { if (serviceInfo == null) { Slog.w(TAG, "Dream " + component + " does not exist"); return false; - } else if (serviceInfo.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.L + } else if (serviceInfo.applicationInfo.targetSdkVersion >= Build.VERSION_CODES.LOLLIPOP && !BIND_DREAM_SERVICE.equals(serviceInfo.permission)) { Slog.w(TAG, "Dream " + component + " is not available because its manifest is missing the " + BIND_DREAM_SERVICE diff --git a/services/core/java/com/android/server/notification/ManagedServices.java b/services/core/java/com/android/server/notification/ManagedServices.java index 13fbf6c..0c7d71b 100644 --- a/services/core/java/com/android/server/notification/ManagedServices.java +++ b/services/core/java/com/android/server/notification/ManagedServices.java @@ -496,7 +496,7 @@ abstract public class ManagedServices { synchronized (mMutex) { try { ManagedServiceInfo info = newServiceInfo(service, component, userid, - true /*isSystem*/, null, Build.VERSION_CODES.L); + true /*isSystem*/, null, Build.VERSION_CODES.LOLLIPOP); service.asBinder().linkToDeath(info, 0); mServices.add(info); return info; @@ -585,7 +585,7 @@ abstract public class ManagedServices { } public boolean supportsProfiles() { - return targetSdkVersion >= Build.VERSION_CODES.L; + return targetSdkVersion >= Build.VERSION_CODES.LOLLIPOP; } @Override -- cgit v1.1