|
Share on Facebook StumbleUpon This Add This To Del.icio.us Add to Technorati Digg This |
BaseAdapter
class now includes the setAutofillOptions()
method, which allows you to provide string representations of the values in anadapter. This is useful for spinnercontrols that dynamically generate the values in their adapters. For example,you can use the setAutofillOptions()
method to provide a stringrepresentation of the list of years that the users can choose as part of acredit card expiration date. Autofill services can use the string representationto appropriately fill out the views that require the data.AutofillManager
class includes the notifyViewVisibilityChanged(View, int, boolean)
methodthat you can call to notify the framework about changes in the visibility of aview in a virtual structure. There's also an overload of the method for nonvirtual structures. However, non virtual structures usually don't require you toexplicitly notify the framework because the method is already called by theView
class.CustomDescriptionand
Validator
within SaveInfo
.CustomDescription
class.Validator
objects are used to avoid displaying the autofill save UI when the Validatorcondition isn't satisfied. To learn more, see the Validator class along with its subclasses, LuhnChecksumValidator and RegexValidator.NotificationListenerService
and ConditionProviderService
are not supported on low-RAM Android-powered devices that return true
when ActivityManager.isLowRamDevice()
is called. EditText.getText()
method returns an Editable
; previouslyit returned a CharSequence
. This change isbackward-compatible, as Editable
implementsCharSequence
.Editable
interface provides valuable additionalfunctionality. For example, because Editable
alsoimplements the Spannable
interface, you can apply markup tocontent within an instance of EditText
.WebView
implementation of the Safe Browsing API, your app candetect when an instance of WebView
attempts to navigateto a URL that Google has classified as a known threat. By default, theWebView
shows an interstitial that warns users of the known threat.This screen gives users the option to load the URL anyway or return to aprevious page that's safe.WebView
object's loadUrl()
method.WebView
to always go back to safety after encountering aknown threat:MediaMetadataRetriever
class has a new method, getScaledFrameAtTime()
, that findsa frame near a given time position and returns a bitmap with the same aspectratio as the source frame, but scaled to fit into a rectangle of given width andheight. This is useful for generating thumbnail images from video.getFrameAtTime()
which can waste memorybecause it returns a bitmap with the same resolution as the source video. Forexample, a frame from a 4K video would be a 16MB bitmap, far larger than youwould need for a thumbnail image.SharedMemory
API. This class allows you to create, map, and manage an anonymousSharedMemory
instance. You set the memory protectionon aSharedMemory
object for reading and/or writing, and, since theSharedMemory
object is Parcelable, you can easily pass it to another process through AIDL.SharedMemory
API interoperates with theASharedMemory
facility in the NDK.ASharedMemory
gives accessto a file descriptor, which can then be mapped to read and write. It's a greatway to share large amountsof data between apps or between multiple processes within a single app.WallpaperColors
object from a bitmap, a drawable, or by using three manually-selected colors.You can also retrieve this color information.WallpaperColors
object, do either of the following:WallpaperColors
object by using three colors, create an instance of the WallpaperColors
class by passing the primary, the secondary, and the tertiary color. The primarycolor must not be null.WallpaperColors
object from a bitmap, call the fromBitmap()
method by passing the bitmap source as parameter.WallpaperColors
object from a drawable, call the fromDrawable()
method by passing the drawable source as parameter.getPrimaryColor()
returns the most visually-representativecolor of the wallpaper.getSecondaryColor()
returns the second most preeminent color of the wallpaper.getTertiaryColor()
method returns the third most preeminent color of the wallpaper.notifyColorsChanged()
method. This method triggers an onComputeColors()
lifecycleevent where you have an opportunity to provide a new WallpaperColors
object.addOnColorsChangedListener()
method. You canalso call the getWallpaperColors()
methodto retrieve the primary colors of a wallpaper.FingerprintManager
class hasintroduced the following error codes:FINGERPRINT_ERROR_LOCKOUT_PERMANENT
– The user has tried too many times to unlock their device using the fingerprint reader. FINGERPRINT_ERROR_VENDOR
– A vendor-specific fingerprint reader error occurred. AlgorithmParameters:GCM
KeyGenerator:AES
KeyGenerator:DESEDE
KeyGenerator:HMACMD5
KeyGenerator:HMACSHA1
KeyGenerator:HMACSHA224
KeyGenerator:HMACSHA256
KeyGenerator:HMACSHA384
KeyGenerator:HMACSHA512
SecretKeyFactory:DESEDE
Signature:NONEWITHECDSA
Cipher.getParameters().getParameterSpec(IvParameterSpec.class)
nolonger works for algorithms that use GCM. Instead, usegetParameterSpec(GCMParameterSpec.class)
.OpenSSLSocketImpl
, but now they’re of typeConscryptFileDescriptorSocket
orConscryptEngineSocket
, both of which extendOpenSSLSocketImpl
.SSLSession
methods used to throwIllegalArgumentException
when passed a null reference, they nowthrow NullPointerException
.KeyFactory
no longer allows generation of keysfrom byte arrays that are larger than the encoded key. Calls togeneratePrivate()
andgeneratePublic()
that provide aKeySpec
where the key structure does not fill theentire buffer will result in an InvalidKeySpecException
.SocketException
.