Udostępnij za pośrednictwem


Build.VERSION_CODES.O Field

Definition

Caution

This constant will be removed in the future version. Use Android.OS.BuildVersionCodes enum directly instead of this field.

O.

[Android.Runtime.Register("O", ApiSince=26)]
[System.Obsolete("This constant will be removed in the future version. Use Android.OS.BuildVersionCodes enum directly instead of this field.", true)]
public const Android.OS.BuildVersionCodes O = 26;
[<Android.Runtime.Register("O", ApiSince=26)>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.OS.BuildVersionCodes enum directly instead of this field.", true)>]
val mutable O : Android.OS.BuildVersionCodes

Field Value

Value = 26
Attributes

Remarks

O.

Released publicly as Android 8.0 in August 2017.

Applications targeting this or a later release will get these new changes in behavior. For more information about this release, see the Android Oreo overview.

<ul> <li>Background execution limits are applied to the application.</li> <li>The behavior of AccountManager's android.accounts.AccountManager#getAccountsByType, android.accounts.AccountManager#getAccountsByTypeAndFeatures, and android.accounts.AccountManager#hasFeatures has changed as documented there.</li> <li>android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_PERCEPTIBLE_PRE_26 is now returned as android.app.ActivityManager.RunningAppProcessInfo#IMPORTANCE_PERCEPTIBLE.</li> <li>The android.app.NotificationManager now requires the use of notification channels.</li> <li>Changes to the strict mode that are set in Application#onCreate Application.onCreate will no longer be clobbered after that function returns.</li> <li>A shared library apk with native code will have that native code included in the library path of its clients.</li> <li>android.content.Context#getSharedPreferences Context.getSharedPreferences in credential encrypted storage will throw an exception before the user is unlocked.</li> <li>Attempting to retrieve a Context#FINGERPRINT_SERVICE on a device that does not support that feature will now throw a runtime exception.</li> <li>android.app.Fragment will stop any active view animations when the fragment is stopped.</li> <li>Some compatibility code in Resources that attempts to use the default Theme the app may be using will be turned off, requiring the app to explicitly request resources with the right theme.</li> <li>android.content.ContentResolver#notifyChange ContentResolver.notifyChange and android.content.ContentResolver#registerContentObserver ContentResolver.registerContentObserver will throw a SecurityException if the caller does not have permission to access the provider (or the provider doesn't exit); otherwise the call will be silently ignored.</li> <li>android.hardware.camera2.CameraDevice#createCaptureRequest CameraDevice.createCaptureRequest will enable android.hardware.camera2.CaptureRequest#CONTROL_ENABLE_ZSL by default for still image capture.</li> <li>WallpaperManager's android.app.WallpaperManager#getWallpaperFile, android.app.WallpaperManager#getDrawable, android.app.WallpaperManager#getFastDrawable, android.app.WallpaperManager#peekDrawable, and android.app.WallpaperManager#peekFastDrawable will throw an exception if you can not access the wallpaper.</li> <li>The behavior of android.hardware.usb.UsbDeviceConnection#requestWait UsbDeviceConnection.requestWait is modified as per the documentation there.</li> <li>StrictMode.VmPolicy.Builder#detectAll StrictMode.VmPolicy.Builder.detectAll will also enable StrictMode.VmPolicy.Builder#detectContentUriWithoutPermission and StrictMode.VmPolicy.Builder#detectUntaggedSockets.</li> <li>StrictMode.ThreadPolicy.Builder#detectAll StrictMode.ThreadPolicy.Builder.detectAll will also enable StrictMode.ThreadPolicy.Builder#detectUnbufferedIo.</li> <li>android.provider.DocumentsContract's various methods will throw failure exceptions back to the caller instead of returning null. <li>View#hasFocusable() View.hasFocusable now includes auto-focusable views.</li> <li>android.view.SurfaceView will no longer always change the underlying Surface object when something about it changes; apps need to look at the current state of the object to determine which things they are interested in have changed.</li> <li>android.view.WindowManager.LayoutParams#TYPE_APPLICATION_OVERLAY must be used for overlay windows, other system overlay window types are not allowed.</li> <li>android.view.ViewTreeObserver#addOnDrawListener ViewTreeObserver.addOnDrawListener will throw an exception if called from within onDraw.</li> <li>android.graphics.Canvas#setBitmap Canvas.setBitmap will no longer preserve the current matrix and clip stack of the canvas.</li> <li>android.widget.ListPopupWindow#setHeight ListPopupWindow.setHeight will throw an exception if a negative height is supplied.</li> <li>android.widget.TextView will use internationalized input for numbers, dates, and times.</li> <li>android.widget.Toast must be used for showing toast windows; the toast window type can not be directly used.</li> <li>android.net.wifi.WifiManager#getConnectionInfo WifiManager.getConnectionInfo requires that the caller hold the location permission to return BSSID/SSID</li> <li>android.net.wifi.p2p.WifiP2pManager#requestPeers WifiP2pManager.requestPeers requires the caller hold the location permission.</li> <li>android.R.attr#maxAspectRatio defaults to 0, meaning there is no restriction on the app's maximum aspect ratio (so it can be stretched to fill larger screens).</li> <li>android.R.attr#focusable defaults to a new state (auto) where it will inherit the value of android.R.attr#clickable unless explicitly overridden.</li> <li>A default theme-appropriate focus-state highlight will be supplied to all Views which don't provide a focus-state drawable themselves. This can be disabled by setting android.R.attr#defaultFocusHighlightEnabled to false.</li> </ul>

Java documentation for android.os.Build.VERSION_CODES.O.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to