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 스튜디오 Panda는 Android 스튜디오 프로파일러에 LeakCanary 통합을 전용 작업으로 직접 추가합니다. 이 작업은 IDE 내에서 컨텍스트화되고 소스 코드와 완전히 통합됩니다.
개인 정보 보호
Android 17에는 사용자 개인 정보 보호를 개선하기 위한 다음과 같은 변경사항이 포함되어 있습니다.
SMS OTP 보호
Beginning with Android 17, Android is expanding its protection for SMS messages containing one-time passwords (OTP).
In previous versions of Android, this protection was primarily focused on the SMS Retriever format. Delivery of messages containing an SMS retriever hash was delayed for most apps for three hours. However, certain certain apps (like the default SMS handler) were exempt from the delay, and the app that owned the hash was also exempted.
Beginning with Android 17, the protection is also applied to WebOTP format messages. If an app has permission to read SMS messages but is not the intended recipient of a WebOTP message (as determined by domain verification), the message is not accessible to the app until three hours after the message's receipt. This change is intended to improve user security by ensuring that only apps associated with the domain mentioned in the message can programmatically read the verification code.
During this three hour delay, the SMS_RECEIVED_ACTION broadcast is
withheld and SMS provider database queries are filtered. The
SMS message is available to these apps after the delay. This change applies to
all apps, regardless of their target API level.
Certain apps such as the default SMS assistant app, connected device companion apps, etc., are exempted from this delay. All apps that rely on reading SMS messages for OTP extraction should transition to using SMS Retriever or SMS User Consent APIs to ensure continued functionality.
보안
Android 17에는 기기 및 앱 보안을 개선하기 위한 다음과 같은 변경사항이 포함되어 있습니다.
usesClearTraffic 지원 중단 계획
향후 출시에서는 usesCleartextTraffic 요소를 지원 중단할 계획입니다.
암호화되지 않은 (HTTP) 연결을 만들어야 하는 앱은 네트워크 보안 구성 파일을 사용하도록 이전해야 합니다. 이 파일을 사용하면 앱이 일반 텍스트 연결을 만들어야 하는 도메인을 지정할 수 있습니다.
네트워크 보안 구성 파일은 API 수준 24 이상에서만 지원됩니다. 앱의 최소 API 수준이 24 미만인 경우 다음 두 가지를 모두 실행해야 합니다.
usesCleartextTraffic속성을true으로 설정- 네트워크 구성 파일 사용
앱의 최소 API 수준이 24 이상이면 네트워크 구성 파일을 사용할 수 있으며 usesCleartextTraffic를 설정하지 않아도 됩니다.
암시적 URI 부여 제한
Currently, if an app launches an intent with a URI that has the action
ACTION_SEND,
SEND_MULTIPLE,
or
ACTION_IMAGE_CAPTURE,
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.
앱별 키 저장소 한도
Apps should avoid creating excessive numbers of keys in Android Keystore, because it is a shared resource for all apps on the device. Beginning with Android 17, the system enforces a limit on the number of keys an app can own. The limit is 50,000 keys for non-system apps targeting Android 17 (API level 37) or higher, and 200,000 keys for all other apps. System apps have a limit of 200,000 keys, regardless of which API level they target.
If an app attempts to create keys beyond the limit, the creation fails with a
KeyStoreException. The exception's message string contains information
about the key limit. If the app calls getNumericErrorCode() on the
exception, the return value depends on what API level the app targets:
- Apps targeting Android 17 (API level 37) or higher:
getNumericErrorCode()returns the newERROR_TOO_MANY_KEYSvalue. - All other apps:
getNumericErrorCode()returnsERROR_INCORRECT_USAGE.
교차 프로필 루프백 트래픽 차단
Android 17부터는 교차 프로필 루프백 트래픽이 기본적으로 더 이상 허용되지 않습니다. 동일한 프로필 내의 루프백 트래픽은 영향을 받지 않습니다. 이 변경사항은 앱이 타겟팅하는 API 수준과 관계없이 Android 17 이상에서 실행되는 모든 앱에 적용됩니다.
사용자 환경 및 시스템 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:windowSoftInputModeattribute tostateAlwaysVisible. - Programmatically request the soft keyboard in your activity's
onCreate()method, or add theonConfigurationChanged()method.
수동 입력
Android 17에는 앱이 키보드 및 터치패드와 같은 수동 입력 기기와 상호작용하는 방식에 영향을 주는 다음과 같은 변경사항이 포함되어 있습니다.
터치패드는 포인터 캡처 중에 기본적으로 상대 이벤트를 전달함
Android 17부터 앱이
View.requestPointerCapture()를 사용하여 포인터 캡처를 요청하고 사용자가 터치패드를 사용하는 경우 시스템은
사용자의 터치에서 포인터 이동 및 스크롤 동작을 인식하고
캡처된 마우스의 포인터 및 스크롤 휠 이동과 동일한 방식으로 앱에
보고합니다. 대부분의 경우 이렇게 하면 캡처된 마우스를 지원하는 앱에서 터치패드에 대한 특수 처리 로직을 추가할 필요가 없습니다. 자세한 내용은
View.POINTER_CAPTURE_MODE_RELATIVE 문서를 참고하세요.
이전에는 시스템이 터치패드의 동작을 인식하려고 시도하지 않고 대신 터치스크린 터치와 유사한 형식으로 원시 절대 손가락 위치를 앱에 전달했습니다. 앱에 여전히 이 절대 데이터가 필요한 경우 이
대신 새 View.requestPointerCapture(int) 메서드를
View.POINTER_CAPTURE_MODE_ABSOLUTE 호출해야 합니다.
미디어
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에서는 블루투스 결합 손실을 자동으로 해결하도록 설계된 시스템 수준의 개선사항인 자율 재페어링이 도입되었습니다.
이전에는 결합이 손실되면 사용자가 설정으로 직접 이동하여 주변 기기를 페어링 해제한 후 다시 페어링해야 했습니다. 이 기능은 Android 16의 보안 개선사항을 기반으로 하며, 사용자가 설정으로 직접 이동하여 주변 기기를 페어링 해제하고 다시 페어링하지 않아도 시스템이 백그라운드에서 결합을 다시 설정할 수 있도록 합니다.
대부분의 앱에는 코드 변경이 필요하지 않지만 개발자는 블루투스 스택의 다음과 같은 동작 변경사항을 알고 있어야 합니다.
- 새 페어링 컨텍스트: 이제
ACTION_PAIRING_REQUEST에 앱이 표준 페어링 요청과 자율 시스템 시작 재페어링 시도를 구분할 수 있는EXTRA_PAIRING_CONTEXT추가 기능이 포함됩니다. - 조건부 키 업데이트: 기존 보안 키는 재페어링이 성공하고 새 연결이 이전 결합의 보안 수준을 충족하거나 초과하는 경우에만 대체됩니다.
- 수정된 인텐트 타이밍: 이제
ACTION_KEY_MISSING인텐트는 자율 재페어링 시도가 실패하는 경우에만 브로드캐스트됩니다. 이렇게 하면 시스템이 백그라운드에서 결합을 성공적으로 복구하는 경우 앱에서 불필요한 오류 처리가 줄어듭니다. - 사용자 알림: 시스템은 새로운 UI 알림 및 대화상자를 통해 재페어링을 관리합니다. 사용자에게 재페어링 시도를 확인하라는 메시지가 표시되어 재연결을 알 수 있습니다.
주변 기기 제조업체와 컴패니언 앱 개발자는 하드웨어와 앱이 결합 전환을 정상적으로 처리하는지 확인해야 합니다. 이 동작을 테스트하려면 다음 방법 중 하나를 사용하여 원격 결합 손실을 시뮬레이션하세요.
- 주변 기기에서 결합 정보를 수동으로 삭제합니다.
- 설정 > 연결된 기기에서 기기를 수동으로 페어링 해제합니다.