동작 변경사항: 모든 앱

Android 17 플랫폼에는 앱에 영향을 줄 수 있는 동작 변경사항이 있습니다. Android 17에서 실행될 때 모든 앱에 적용되는 동작 변경사항은 다음과 같습니다. targetSdkVersion에 관계없이 이러한 변경사항을 적절히 지원해야 하는 경우 앱을 테스트한 후 필요에 따라 수정해야 합니다.

또한 Android 17을 타겟팅하는 앱에만 영향을 주는 동작 변경사항 목록 을 검토해야 합니다.

핵심 기능

Android 17 (API 수준 37)에는 Android 시스템의 다양한 핵심 기능을 수정하거나 확장하는 다음과 같은 변경사항이 포함되어 있습니다.

앱 메모리 한도

Android 17에서는 기기의 총 RAM을 기반으로 앱 메모리 한도를 도입하여 애플리케이션과 Android 사용자에게 더 안정적이고 결정론적인 환경을 제공합니다. Android 17에서는 시스템 기준을 설정하기 위해 한도가 보수적으로 설정되며, UI 끊김 현상, 배터리 소모 증가, 앱 강제 종료를 초래하는 시스템 전체 불안정을 트리거하기 전에 극심한 메모리 누수 및 기타 이상치를 타겟팅합니다. 대부분의 앱 세션에 미치는 영향은 최소화될 것으로 예상되지만 다음과 같은 메모리 권장사항을 따르는 것이 좋습니다.

`ApplicationExitInfo`에서 getDescription을 호출하여 앱 세션이 영향을 받았는지 확인할 수 있습니다. 앱이 영향을 받은 경우 종료 이유는 REASON_OTHER이고 설명에는 다른 정보와 함께 문자열 "MemoryLimiter:AnonSwap"이 포함됩니다. 트리거 기반 프로파일링을 사용하여 TRIGGER_TYPE_ANOMALY를 통해 메모리 한도에 도달했을 때 수집되는 힙 덤프를 가져올 수도 있습니다.

Android 스튜디오 프로파일러의 LeakCanary 작업

메모리 누수를 찾는 데 도움이 되도록 Android 스튜디오 Panda는 Android 스튜디오 프로파일러에 LeakCanary 통합을 전용 작업으로 직접 추가합니다. 이 작업은 IDE 내에서 컨텍스트화되고 소스 코드와 완전히 통합됩니다.

보안

Android 17에는 기기 및 앱 보안이 다음과 같이 개선되었습니다.

usesClearTraffic 지원 중단 계획

In a future release, we plan to deprecate the usesCleartextTraffic element. Apps that need to make unencrypted (HTTP) connections should migrate to using a network security configuration file, which lets you specify which domains your app needs to make cleartext connections to.

Be aware that network security configuration files are only supported on API levels 24 and higher. If your app has a minimum API level lower than 24, you should do both of the following:

  • Set the usesCleartextTraffic attribute to true
  • Use a network configuration file

If your app's minimum API level is 24 or higher, you can use a network configuration file and you don't need to set usesCleartextTraffic.

암시적 URI 부여 제한

Currently, if an app launches an intent with a URI that has the action Send, SendMultiple, or ImageCapture, the system automatically grants the read and write URI permissions to the target app. We plan to change this behavior in Android 18. For this reason, we recommend that apps explicitly grant the relevant URI permissions instead of relying on the system to grant them.

앱별 키 저장소 한도

Android 키 저장소는 기기의 모든 앱을 위한 공유 리소스이므로 앱은 Android 키 저장소에 과도한 수의 키를 만들지 않아야 합니다. Android 17부터 시스템은 앱이 소유할 수 있는 키 수에 제한을 적용합니다. 제한은 Android 17 (API 수준 37) 이상을 타겟팅하는 비시스템 앱의 경우 50,000개의 키이고 다른 모든 앱의 경우 200,000개의 키입니다. 시스템 앱은 타겟팅하는 API 수준과 관계없이 200,000개의 키로 제한됩니다.

앱이 제한을 초과하는 키를 만들려고 하면 생성에 실패합니다. KeyStoreException 예외의 메시지 문자열에는 키 제한에 관한 정보가 포함되어 있습니다. 앱이 예외에서 getNumericErrorCode()를 호출하는 경우 반환 값은 앱이 타겟팅하는 API 수준에 따라 다릅니다.

  • Android 17 (API 수준 37) 이상을 타겟팅하는 앱: getNumericErrorCode()는 새 ERROR_TOO_MANY_KEYS 값을 반환합니다.
  • 다른 모든 앱: getNumericErrorCode()ERROR_INCORRECT_USAGE를 반환합니다.

사용자 환경 및 시스템 UI

Android 17에는 더 일관되고 직관적인 사용자 환경을 만들기 위한 다음 변경사항이 포함되어 있습니다.

회전 후 기본 IME 공개 상태 복원

Beginning with Android 17, when the device's configuration changes (for example, through rotation), and this is not handled by the app itself, the previous IME visibility is not restored.

If your app undergoes a configuration change that it does not handle, and the app needs the keyboard to be visible after the change, you must explicitly request this. You can make this request in one of the following ways:

  • Set the android:windowSoftInputMode attribute to stateAlwaysVisible.
  • Programmatically request the soft keyboard in your activity's onCreate() method, or add the onConfigurationChanged() method.

수동 입력

Android 17에는 앱이 키보드 및 터치패드와 같은 수동 입력 기기와 상호작용하는 방식에 영향을 주는 다음과 같은 변경사항이 포함되어 있습니다.

터치패드는 포인터 캡처 중에 기본적으로 상대 이벤트를 전달함

Beginning with Android 17, if an app requests pointer capture using View.requestPointerCapture() and the user uses a touchpad, the system recognizes pointer movement and scrolling gestures from the user's touches and reports them to the app in the same way as pointer and scroll wheel movements from a captured mouse. In most cases, this removes the need for apps that support captured mice to add special handling logic for touchpads. For more details, see the documentation for View.POINTER_CAPTURE_MODE_RELATIVE.

Previously, the system did not attempt to recognize gestures from the touchpad, and instead delivered the raw, absolute finger locations to the app in a similar format to touchscreen touches. If an app still requires this absolute data, it should call the new View.requestPointerCapture(int) method with View.POINTER_CAPTURE_MODE_ABSOLUTE instead.

미디어

Android 17에는 미디어 동작이 다음과 같이 변경되었습니다.

백그라운드 오디오 강화

Beginning with Android 17, the audio framework enforces restrictions on background audio interactions including audio playback, audio focus requests, and volume change APIs to ensure that these changes are started intentionally by the user.

If the app tries to call audio APIs while the app is not in a valid lifecycle, the audio playback and volume change APIs fail silently without throwing an exception or providing a failure message. The audio focus API fails with the result code AUDIOFOCUS_REQUEST_FAILED.

For more information, including mitigation strategies, see Background audio hardening.

연결

Android 17에는 기기 연결을 개선하기 위한 다음과 같은 변경사항이 포함되어 있습니다.

블루투스 결합 손실 시 자동 재페어링

Android 17 introduces autonomous re-pairing, a system-level enhancement designed to automatically resolve Bluetooth bond loss.

Previously, if a bond was lost, users had to manually navigate to Settings to unpair and then re-pair the peripheral. This feature builds upon the security improvement of Android 16 by allowing the system to re-establish bonds in the background without requiring users to manually navigate to Settings to unpair and re-pair peripherals.

While most apps will not require code changes, developers should be aware of the following behavior changes in Bluetooth stack:

  • New pairing context: The ACTION_PAIRING_REQUEST now includes the EXTRA_PAIRING_CONTEXT extra which allows apps to distinguish between a standard pairing request and an autonomous system-initiated re-pairing attempt.
  • Conditional key updates: Existing security keys will only be replaced if the re-pairing is successful and new connection meets or exceeds the security level of the previous bond.
  • Modified intent timing: The ACTION_KEY_MISSING intent is now broadcast only if the autonomous re-pairing attempt fails. This reduces unnecessary error handling in the app if the system successfully recovers the bond in the background.
  • User notification: The system manages re-pairing via new UI notifications and dialogs. Users will be prompted to confirm the re-pairing attempt to ensure they are aware of the reconnection.

Peripheral device manufacturers and companion app developers should verify that hardware and app gracefully handle bond transitions. To test this behavior, simulate a remote bond loss using either of the following methods:

  • Manually remove the bond information from the peripheral device
  • Manually unpair the device in: Settings > Connected devices