Compatibility framework changes (Android 14)

Figure 1. The App Compatibility Changes screen in developer options lists the changes that you can toggle.

This page describes toggleable changes that are part of the compatibility framework in Android 14 (API level 34). Use this list in conjunction with the developer options and ADB commands to test and debug your app as you prepare to support and target Android 14.

Here are some of the things you can do using the compatibility framework tools:

  • Test targeted changes without actually changing the app's targetSdkVersion. You can use the toggles to force-enable specific targeted behavior changes to evaluate the impact on your existing app.
  • Focus your testing on specific changes only. Rather than having to address all targeted changes at once, the toggles let you disable all targeted changes except the ones you want to test against.
  • Manage toggles through adb. You can use adb commands to enable and disable the toggleable changes in your automated test environment.
  • Debug faster using standard change IDs. Toggleable changes each have a unique ID and name that you can use to quickly debug root cause in log output.

For complete details on using the tools for each of these use cases, see Compatibility framework tools.

Behavior changes included in the compatibility framework

The list in this section describes toggleable changes that are included in the compatibility framework in Android 14.

You can filter the list of changes by their Default State.

Toggleable changes in the compatibility framework in Android 14

ACCESS_SHARED_IDENTITY

Change ID: 259743961
Default State: Enabled for all apps.

Grants access to the launching app's identity if the app opted-in to sharing its identity by launching this activity with an instance of ActivityOptions on which ActivityOptions.setShareIdentityEnabled(boolean) was invoked with a value of true, or if the launched activity's UID is the same as the launching app's. When this change is enabled and one of these requirements is met, the activity can access the launching app's UID and package name with Activity.getLaunchedFromUid() and Activity.getLaunchedFromPackage(), respectively.

ANR_PRE_UDC_APIS_ON_SLOW_RESPONSES

Change ID: 258236856
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

When enabled, triggers an "Application Not Responding" (ANR) message when apps are slow to respond on APIs and functionality from Android 13 (API level 33) or lower.

AUTHORITY_ACCESS_CHECK_CHANGE_ID

Change ID: 207133734
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

For apps targeting Android 14 (API level 34) and higher, enables checking for authority access for the calling UID on all sync-related APIs.

CAMERA_MIC_INDICATORS_NOT_PRESENT

Change ID: 162547999
Default State: Disabled for all apps.

Indicates that this device supports camera and microphone indicators. The value is false if present, because the CompatChanges#isChangeEnabled method returns true if the Change ID is not present.

DEFAULT_RESCIND_BAL_PRIVILEGES_FROM_PENDING_INTENT_SENDER

Change ID: 244637991
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

When an app sends a PendingIntent using PendingIntent#send() or similar methods, the app must now opt in if it wants to grant its own background activity launch privileges to start the pending intent.

To learn more about this change, see the section in the Android 14 behavior changes page about additional restrictions on starting activities from the background.

DETACH_THROWS_ISE_ONLY

Change ID: 236825255
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

Flag to gate correct exception thrown by #detachImage.

#detachImage is documented as throwing IllegalStateException in the event of an error; a native helper method to this threw RuntimeException if the surface was abandoned while detaching the Image.

This previously undocumented exception behavior continues through Android 13 (API level 33).

After Android 13 (API level 33), the native helper method only throws IllegalStateExceptions in accordance with the documentation.

When this change is enabled, #detachImage only throws an IllegalStateException if it runs into errors while detaching the image. Behavior remains unchanged for apps targeting Android 13 (API level 33) and lower.

DOWNSCALED

Change ID: 168419799
Default State: Disabled for all apps.

This change is the gatekeeper of all per-app buffer downscaling changes. Enabling this change allows the following scaling factors to be applied:

When this change is enabled for an app package, the app is forcibly resized to the highest, enabled scaling factor. For example, 80% is used if both 80% and 70% (DOWNSCALE_80 and DOWNSCALE_70) are enabled. When both this change and DOWNSCALED_INVERSE are enabled, DOWNSCALED_INVERSE takes precedence and the scaling factor is applied inversely.

DOWNSCALED_INVERSE

Change ID: 273564678
Default State: Disabled for all apps.

This change is the gatekeeper of all per-app buffer inverse downscaling changes. Enabling this change allows the following scaling factors to be inversely applied (that is, the resolution is upscaled instead):

When this change is enabled for an app package, the app is forcibly resized to the lowest, enabled scaling factor. For example, 80% is used if both 80% and 70% (DOWNSCALE_80 and DOWNSCALE_70) are enabled because when inversely applied, an 80% scaling factor equals 125%, which is less than the 142.86% scaling that is applied when inversely applying a 70% scaling factor. When both this change and DOWNSCALED are enabled, DOWNSCALED_INVERSE takes precedence and the scaling factor is applied inversely.

DOWNSCALE_30

Change ID: 189970040
Default State: Disabled for all apps.

If DOWNSCALED is also enabled, enabling this change for a package forces the app to assume it's running on a display with 30% of the vertical and horizontal resolution of the real display. If DOWNSCALED_INVERSE is also enabled, enabling this change for a package forces the app to assume it's running on a display with 333.33% of the vertical and horizontal resolution of the real display.

DOWNSCALE_35

Change ID: 189969749
Default State: Disabled for all apps.

If DOWNSCALED is also enabled, enabling this change for a package forces the app to assume it's running on a display with 35% of the vertical and horizontal resolution of the real display. If DOWNSCALED_INVERSE is also enabled, enabling this change for a package forces the app to assume it's running on a display with 285.71% of the vertical and horizontal resolution of the real display.

DOWNSCALE_40

Change ID: 189970038
Default State: Disabled for all apps.

If DOWNSCALED is also enabled, enabling this change for a package forces the app to assume it's running on a display with 40% of the vertical and horizontal resolution of the real display. If DOWNSCALED_INVERSE is also enabled, enabling this change for a package forces the app to assume it's running on a display with 250% of the vertical and horizontal resolution of the real display.

DOWNSCALE_45

Change ID: 189969782
Default State: Disabled for all apps.

If DOWNSCALED is also enabled, enabling this change for a package forces the app to assume it's running on a display with 45% of the vertical and horizontal resolution of the real display. If DOWNSCALED_INVERSE is also enabled, enabling this change for a package forces the app to assume it's running on a display with 222.22% of the vertical and horizontal resolution of the real display.

DOWNSCALE_50

Change ID: 176926741
Default State: Disabled for all apps.

If DOWNSCALED is also enabled, enabling this change for a package forces the app to assume it's running on a display with 50% of the vertical and horizontal resolution of the real display. If DOWNSCALED_INVERSE is also enabled, enabling this change for a package forces the app to assume it's running on a display with 200% of the vertical and horizontal resolution of the real display.

DOWNSCALE_55

Change ID: 189970036
Default State: Disabled for all apps.

If DOWNSCALED is also enabled, enabling this change for a package forces the app to assume it's running on a display with 55% of the vertical and horizontal resolution of the real display. If DOWNSCALED_INVERSE is also enabled, enabling this change for a package forces the app to assume it's running on a display with 181.82% of the vertical and horizontal resolution of the real display.

DOWNSCALE_60

Change ID: 176926771
Default State: Disabled for all apps.

If DOWNSCALED is also enabled, enabling this change for a package forces the app to assume it's running on a display with 60% of the vertical and horizontal resolution of the real display. If DOWNSCALED_INVERSE is also enabled, enabling this change for a package forces the app to assume it's running on a display with 166.67% of the vertical and horizontal resolution of the real display.

DOWNSCALE_65

Change ID: 189969744
Default State: Disabled for all apps.

If DOWNSCALED is also enabled, enabling this change for a package forces the app to assume it's running on a display with 65% of the vertical and horizontal resolution of the real display. If DOWNSCALED_INVERSE is also enabled, enabling this change for a package forces the app to assume it's running on a display with 153.85% of the vertical and horizontal resolution of the real display.

DOWNSCALE_70

Change ID: 176926829
Default State: Disabled for all apps.

If DOWNSCALED is also enabled, enabling this change for a package forces the app to assume it's running on a display with 70% of the vertical and horizontal resolution of the real display. If DOWNSCALED_INVERSE is also enabled, enabling this change for a package forces the app to assume it's running on a display with 142.86% of the vertical and horizontal resolution of the real display.

DOWNSCALE_75

Change ID: 189969779
Default State: Disabled for all apps.

If DOWNSCALED is also enabled, enabling this change for a package forces the app to assume it's running on a display with 75% of the vertical and horizontal resolution of the real display. If DOWNSCALED_INVERSE is also enabled, enabling this change for a package forces the app to assume it's running on a display with 133.33% of the vertical and horizontal resolution of the real display.

DOWNSCALE_80

Change ID: 176926753
Default State: Disabled for all apps.

If DOWNSCALED is also enabled, enabling this change for a package forces the app to assume it's running on a display with 80% of the vertical and horizontal resolution of the real display. If DOWNSCALED_INVERSE is also enabled, enabling this change for a package forces the app to assume it's running on a display with 125% of the vertical and horizontal resolution of the real display.

DOWNSCALE_85

Change ID: 189969734
Default State: Disabled for all apps.

If DOWNSCALED is also enabled, enabling this change for a package forces the app to assume it's running on a display with 85% of the vertical and horizontal resolution of the real display. If DOWNSCALED_INVERSE is also enabled, enabling this change for a package forces the app to assume it's running on a display with 117.65% of the vertical and horizontal resolution of the real display.

DOWNSCALE_90

Change ID: 182811243
Default State: Disabled for all apps.

If DOWNSCALED is also enabled, enabling this change for a package forces the app to assume it's running on a display with 90% of the vertical and horizontal resolution of the real display. If DOWNSCALED_INVERSE is also enabled, enabling this change for a package forces the app to assume it's running on a display with 111.11% of the vertical and horizontal resolution of the real display.

ENABLE_PLATFORM_MDNS_BACKEND

Change ID: 270306772
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

Apps targeting Android 14 or higher use a platform-integrated mDNS implementation as backend, while apps targeting previous versions continue to use a legacy Network service discovery (NSD) backend (with a legacy native daemon as NsdManager backend).

ENABLE_SELF_CERTIFIED_CAPABILITIES_DECLARATION

Change ID: 266524688
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

The self-certified capabilities check is enabled for apps targeting Android 14 or higher. See NetworkCapabilities for more details.

ENFORCE_PACKAGE_VISIBILITY_FILTERING

Change ID: 154726397
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

For apps targeting Android 14 (API level 34) and higher, requires apps to declare package visibility needs in the manifest in order to access the AccountManager APIs.

ENFORCE_READ_ONLY_JAVA_DCL

Change ID: 218865702
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

For apps targeting Android 14 (API level 34) and higher, requires all dynamically-loaded files to be marked as read-only. This prevents files that are dynamically loaded from being unexpectedly overwritten by malicious actors.

To learn more about this change, see the section in the Android 14 behavior changes page about safer dynamic code loading.

ENFORCE_STRICT_QUERY_BUILDER

Change ID: 143231523
Default State: Disabled for all apps.

When enabled, the SQLiteQueryBuilder verifies all CalendarProvider2 query selections against malicious arguments.

EXACT_LISTENER_ALARMS_DROPPED_ON_CACHED

Change ID: 265195908
Default State: Enabled for all apps.

Exact alarms expecting a AlarmManager.OnAlarmListener callback is dropped when the calling app goes into a cached state.

To learn more about the changes to exact alarms in Android 14, see Schedule exact alarms are denied by default.

FGS_TYPE_CHECK_FOR_INSTANT_APPS

Change ID: 261055255
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

When enabled, instant apps must specify appropriate foreground service types for any services that are declared in the app's manifest file.

To learn more about this change, see the page describing the changes to foreground service types.

FGS_TYPE_NONE_DEPRECATION_CHANGE_ID

Change ID: 255042465
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

When enabled, apps targeting Android 14 (API level 34) and higher that start a foreground service using the deprecated FOREGROUND_SERVICE_TYPE_NONE type results in a warning in the log.

To learn more about this change, see the page describing the changes to foreground service types.

FGS_TYPE_NONE_DISABLED_CHANGE_ID

Change ID: 255038118
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

When enabled, apps targeting Android 14 (API level 34) and higher that start a foreground service using the deprecated FOREGROUND_SERVICE_TYPE_NONE type results in an exception.

To learn more about this change, see the page describing the changes to foreground service types.

FGS_TYPE_PERMISSION_CHANGE_ID

Change ID: 254662522
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

When enabled, apps targeting Android 14 (API level 34) and higher that start a foreground service without the required permissions associated with that foreground service's type results in a SecurityException.

To learn more about this change, see the page describing the changes to foreground service types.

FORCE_DISABLE_HEVC_SUPPORT

Change ID: 174227820
Default State: Disabled for all apps.

Force disable an app from supporting the HEVC media capability. Apps should declare their supported media capabilities in their manifest but this flag can be used to force an app into not supporting HEVC, hence forcing transcoding while accessing media encoded in HEVC. Setting this flag overrides any OS level defaults for apps. It is disabled by default, meaning that the OS defaults take precedence. If both this flag and FORCE_ENABLE_HEVC_SUPPORT are enabled, the OS ignores both flags.

FORCE_ENABLE_HEVC_SUPPORT

Change ID: 174228127
Default State: Disabled for all apps.

Force enable an app to support the HEVC media capability Apps should declare their supported media capabilities in their manifest but this flag can be used to force an app into supporting HEVC, hence avoiding transcoding while accessing media encoded in HEVC. Setting this flag overrides any OS level defaults for apps. It is disabled by default, meaning that the OS defaults would take precedence. If both this flag and FORCE_DISABLE_HEVC_SUPPORT are enabled, the OS ignores both flags.

FORCE_NON_RESIZE_APP

Change ID: 181146395
Default State: Disabled for all apps.

Forces the packages it is applied to to be non-resizable.

FORCE_RESIZE_APP

Change ID: 174042936
Default State: Disabled for all apps.

Forces the packages it is applied to to be resizable. We only allow resizing in fullscreen windowing mode, but not forcing the app into resizable multi-windowing mode.

GWP_ASAN

Change ID: 145634846
Default State: Disabled for all apps.

Enables sampled native memory bug detection in apps.

To learn more about using GWP-ASan, see the GWP-ASan guide.

IMPLICIT_INTENTS_ONLY_MATCH_EXPORTED_COMPONENTS

Change ID: 229362273
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

For apps targeting Android 14 (API level 34) and higher, components must be exported in order to invoke them through implicit intents. If a component is not exported and invoked, it is removed from the list of receivers. This applies specifically to activities and broadcasts.

To learn more about this change, see the section in the Android 14 behavior changes page about restrictions to implicit and pending intents.

Change ID: 266201607
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

For apps targeting Android 14 (API level 34) and higher, apps must ask the user to give consent before each MediaProjection capture session.

To learn more about this change, see the section in the Android 14 behavior changes page about how user consent is required for each MediaProjection capture session.

NATIVE_HEAP_ZERO_INIT

Change ID: 178038272
Default State: Disabled for all apps.

Enable automatic zero-initialization of native heap memory allocations.

NATIVE_MEMTAG_ASYNC

Change ID: 145772972
Default State: Disabled for all apps.

Enable asynchronous (ASYNC) memory tag checking in this process. This flag only affects hardware supporting the ARM Memory Tagging Extension (MTE).

NATIVE_MEMTAG_SYNC

Change ID: 177438394
Default State: Disabled for all apps.

Enables synchronous (SYNC) memory tag checking in this process. This flag only affects hardware supporting the ARM Memory Tagging Extension (MTE). If both NATIVE_MEMTAG_ASYNC and this option are enabled, this option takes precedence and MTE is enabled in SYNC mode.

OVERRIDE_ANY_ORIENTATION

Change ID: 265464455
Default State: Disabled for all apps.

When enabled, this change allows the following orientation overrides to be applied regardless of the orientation requested by the activity:

OVERRIDE_CAMERA_RESIZABLE_AND_SDK_CHECK

Change ID: 191514214
Default State: Disabled for all apps.

When enabled, this change forces the packages it is applied to ignore the current value of android:resizeableActivity as well as target SDK equal to or below M and consider the activity as non-resizable. In this case, the value of camera rotate and crop only depends on the needed compensation considering the current display rotation.

OVERRIDE_CAMERA_ROTATE_AND_CROP_DEFAULTS

Change ID: 189229956
Default State: Disabled for all apps.

When enabled, this change forces the packages it is applied to override the default camera rotate and crop behavior and always return CaptureRequest.SCALER_ROTATE_AND_CROP_NONE.

OVERRIDE_LANDSCAPE_ORIENTATION_TO_REVERSE_LANDSCAPE

Change ID: 266124927
Default State: Disabled for all apps.

Enables SCREEN_ORIENTATION_REVERSE_LANDSCAPE for the app it's applied to. Unless OVERRIDE_ANY_ORIENTATION is also enabled, SCREEN_ORIENTATION_REVERSE_LANDSCAPE is used only when the activity specifies landscape orientation. Enabling this change can help you test your app behavior for differences between devices where landscape orientation corresponds to Surface.ROTATION_90 and devices where it corresponds to Surface.ROTATION_270.

OVERRIDE_MIN_ASPECT_RATIO

Change ID: 174042980
Default State: Disabled for all apps.

This change is the gatekeeper of all changes that force a given minimum aspect ratio. Enabling this change allows the following minimum aspect ratios to be applied:

When this change is enabled for an app package, the minimum aspect ratio given in the app's manifest is overridden to the largest enabled aspect ratio unless the app's manifest value is higher.

OVERRIDE_MIN_ASPECT_RATIO_EXCLUDE_PORTRAIT_FULLSCREEN

Change ID: 218959984
Default State: Disabled for all apps.

When enabled, overrides the minimum aspect ratio restriction in portrait fullscreen in order to use all available screen space.

OVERRIDE_MIN_ASPECT_RATIO_LARGE

Change ID: 180326787
Default State: Disabled for all apps.

When OVERRIDE_MIN_ASPECT_RATIO is also enabled, enabling this change for a package sets the activity's minimum aspect ratio to a large value as defined by OVERRIDE_MIN_ASPECT_RATIO_LARGE_VALUE.

OVERRIDE_MIN_ASPECT_RATIO_MEDIUM

Change ID: 180326845
Default State: Disabled for all apps.

When OVERRIDE_MIN_ASPECT_RATIO is also enabled, enabling this change for a package sets the activity's minimum aspect ratio to a medium value as defined by OVERRIDE_MIN_ASPECT_RATIO_MEDIUM_VALUE.

OVERRIDE_MIN_ASPECT_RATIO_PORTRAIT_ONLY

Change ID: 203647190
Default State: Enabled for all apps.

When OVERRIDE_MIN_ASPECT_RATIO is also enabled, this change limits any other changes that force an activity's minimum aspect ratio to a certain value—such as OVERRIDE_MIN_ASPECT_RATIO_LARGE and OVERRIDE_MIN_ASPECT_RATIO_MEDIUM—to activities that also have a portrait orientation.

OVERRIDE_RESPECT_REQUESTED_ORIENTATION

Change ID: 236283604
Default State: Disabled for all apps.

When enabled, this change excludes packages that is applied to from the ignore orientation restrictions that device manufacturers can set.

OVERRIDE_UNDEFINED_ORIENTATION_TO_NOSENSOR

Change ID: 265451093
Default State: Disabled for all apps.

Enables SCREEN_ORIENTATION_NOSENSOR for the app it's applied to. Unless OVERRIDE_ANY_ORIENTATION is also enabled, SCREEN_ORIENTATION_NOSENSOR is used only when the activity doesn't specify any other fixed orientation.

OVERRIDE_UNDEFINED_ORIENTATION_TO_PORTRAIT

Change ID: 265452344
Default State: Disabled for all apps.

Enables SCREEN_ORIENTATION_PORTRAIT for the app it's applied to. Unless OVERRIDE_ANY_ORIENTATION is also enabled, SCREEN_ORIENTATION_PORTRAIT is used only when the activity doesn't specify any other fixed orientation.

RATE_LIMIT_TOASTS

Change ID: 174840628
Default State: This change can't be toggled. It is only logged by the compatibility framework.

Enables rate limiting on the number of Toast.show() calls to prevent overburdening the user with too many toasts in a limited time. Any attempt to show more toasts than allowed in a certain timeframe results in the toast being discarded.

REJECT_NEGATIVE_NETWORK_ESTIMATES

Change ID: 253665015
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

When enabled, requires that estimated network bytes are nonnegative.

REQUIRE_NETWORK_CONSTRAINT_FOR_NETWORK_JOB_WORK_ITEMS

Change ID: 241104082
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

For apps targeting Android 14 (API level 34) and higher, requires the hosting job to specify a network constraint if the included JobWorkItem indicates network usage.

REQUIRE_NETWORK_PERMISSIONS_FOR_CONNECTIVITY_JOBS

Change ID: 271850009
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

For apps targeting Android 14 (API level 34) and higher, requires apps to specify both the INTERNET and ACCESS_NETWORK_STATE permissions when scheduling a job with a connectivity constraint.

THROW_ON_INVALID_DATA_TRANSFER_IMPLEMENTATION

Change ID: 255371817
Default State: Enabled for apps that target Android 14 (API level 34) or higher.

For apps targeting Android 14 (API level 34) and higher, the system throws an exception if an app doesn't properly implement all the necessary data transfer APIs when specifying a user-initiated data transfer job.

To learn more about this change, see the page describing how to migrate foreground services to user-initiated data transfer jobs.

USE_EXPERIMENTAL_COMPONENT_ALIAS

Change ID: 196254758
Default State: Disabled for all apps.

When enabled, the system allows the "android" package to use component aliases.