בדומה לגרסאות קודמות, Android 17 כולל שינויים בהתנהגות שעשויים להשפיע על האפליקציה שלכם. שינויי ההתנהגות הבאים רלוונטיים רק לאפליקציות שמטרגטות את Android 17 ואילך. אם האפליקציה שלכם מטרגטת את Android מגרסה 17 ואילך, אתם צריכים לשנות את האפליקציה כדי שהיא תתמוך בהתנהגויות האלה, במקרים הרלוונטיים.
חשוב גם לבדוק את רשימת השינויים בהתנהגות שמשפיעים על כל האפליקציות שפועלות ב-Android 17, בלי קשר ל-targetSdkVersion של האפליקציה.
פונקציונליות עיקרית
Android 17 כוללת את השינויים הבאים, שמשנים או מרחיבים יכולות ליבה שונות של מערכת Android.
הטמעה חדשה של MessageQueue שלא דורשת נעילה
החל מ-Android 17, אפליקציות שמטרגטות את Android 17 (רמת API 37)
או גרסאות חדשות יותר מקבלות הטמעה חדשה ללא נעילה של
android.os.MessageQueue. ההטמעה החדשה משפרת את הביצועים ומפחיתה את מספר הפריימים החסרים, אבל היא עלולה לגרום לשיבוש בלקוחות שמשקפים שדות ושיטות פרטיים.MessageQueue
מידע נוסף, כולל אסטרטגיות להפחתת הסיכון, זמין במאמר הנחיות לשינוי התנהגות של MessageQueue.
אי אפשר יותר לשנות שדות סופיים סטטיים
Apps running on Android 17 or higher that target
Android 17 (API level 37) or higher cannot change static final fields. If
an app attempts to change a static final field by using reflection, it will
cause an IllegalAccessException. Attempting to modify one of these fields
through JNI APIs (such as SetStaticLongField()) will cause the app to crash.
נגישות
ב-Android 17 בוצעו השינויים הבאים כדי לשפר את הנגישות.
תמיכה בנגישות להקלדה במקלדת פיזית ב-IME מורכב
This feature introduces new AccessibilityEvent and TextAttribute
APIs to enhance screen reader spoken feedback for CJKV language input. CJKV IME
apps can now signal whether a text conversion candidate has been selected during
text composition. Apps with edit fields can specify text change types when
sending text changed accessibility events.
For example, apps can specify that a text change occurred during text
composition, or that a text change resulted from a commit.
Doing this enables accessibility
services such as screen readers to deliver more precise feedback based on the
nature of the text modification.
App adoption
IME Apps: When setting composing text in edit fields, IMEs can use
TextAttribute.Builder.setTextSuggestionSelected()to indicate whether a specific conversion candidate was selected.Apps with Edit Fields: Apps that maintain a custom
InputConnectioncan retrieve candidate selection data by callingTextAttribute.isTextSuggestionSelected(). These apps should then callAccessibilityEvent.setTextChangeTypes()when dispatchingTYPE_VIEW_TEXT_CHANGEDevents. Apps targeting Android 17 (API level 37) that use the standardTextViewwill have this feature enabled by default. (That is,TextViewwill handle retrieving data from the IME and setting text change types when sending events to accessibility services).Accessibility Services: Accessibility services that process
TYPE_VIEW_TEXT_CHANGEDevents can callAccessibilityEvent.getTextChangeTypes()to identify the nature of the modification and adjust their feedback strategies accordingly.
פרטיות
Android 17 כוללת את השינויים הבאים לשיפור פרטיות המשתמשים.
ההגדרה ECH (הצפנת Client Hello) מופעלת
ב-Android 17 נוספה תמיכה בפלטפורמה בהצפנת ClientHello (ECH), תוסף ל-TLS (אבטחת שכבת התעבורה) שמשפר את פרטיות המשתמשים על ידי הצפנת חיווי שם השרת (SNI) בלחיצת היד של TLS. ההצפנה הזו עוזרת למנוע מצופים ברשת לזהות בקלות את הדומיין הספציפי שאליו האפליקציה מתחברת.
באפליקציות שמטרגטות ל-Android 17 (רמת API 37) ומעלה, נעשה שימוש ב-ECH לחיבורי TLS. ה-ECH פעיל רק אם ספריית הרשת שבה נעשה שימוש באפליקציה (לדוגמה, HttpEngine, WebView או OkHttp) כוללת תמיכה משולבת ב-ECH, וגם השרת המרוחק תומך בפרוטוקול ECH. אם אי אפשר להגיע להסכמה על ECH, הלקוח שולח תוסף ECH עם תוכן אקראי (מנגנון שנקרא ECH GREASE). מידע נוסף על אופן הפעולה של ECH GREASE זמין ב-RFC 9849.
כדי לאפשר לאפליקציות להתאים אישית את ההתנהגות הזו, ב-Android 17 נוסף רכיב <domainEncryption> חדש לקובץ הגדרות אבטחת הרשת.
מפתחים יכולים להשתמש בתג <domainEncryption> בתוך התגים <base-config> או <domain-config> כדי לבחור מצב ECH (לדוגמה, "enabled" או "disabled") באופן גלובלי או לכל דומיין.
מידע נוסף זמין במאמר בנושא הצפנה של Client Hello.
נדרשת הרשאה לגישה לרשת המקומית לאפליקציות שמיועדות ל-Android 17
Android 17 introduces the ACCESS_LOCAL_NETWORK runtime permission
to protect users from unauthorized local network access. Because this falls
under the existing NEARBY_DEVICES permission group, users who have already
granted other NEARBY_DEVICES permissions aren't prompted again. This new
requirement prevents malicious apps from exploiting unrestricted local network
access for covert user tracking and fingerprinting. By declaring and requesting
this permission, your app can discover and connect to devices on the local area
network (LAN), such as smart home devices or casting receivers.
Apps targeting Android 17 (API level 37) or higher now have two paths to maintain communication with LAN devices: Adopt system-mediated, privacy-preserving device pickers to skip the permission prompt, or explicitly request this new permission at runtime to maintain local network communication.
For more information, see the Local network permission documentation.
הסתרת סיסמאות ממכשירים פיזיים
אם אפליקציה מיועדת ל-Android 17 (רמת API 37) ומעלה, והמשתמש משתמש במכשיר קלט פיזי (לדוגמה, מקלדת חיצונית), מערכת ההפעלה של Android מחילה את ההגדרה החדשה show_passwords_physical על כל התווים בשדה הסיסמה. כברירת מחדל, ההגדרה הזו מסתירה את כל התווים של הסיסמה.
מערכת Android מציגה את התו האחרון שהוקלד בסיסמה כדי לעזור למשתמש לראות אם הוא הקליד את הסיסמה בצורה שגויה. עם זאת, במקלדות חיצוניות גדולות יותר, הצורך הזה פחות משמעותי. בנוסף, למכשירים עם מקלדות חיצוניות יש לרוב מסכים גדולים יותר, מה שמגדיל את הסיכון שמישהו יראה את הסיסמה שהוקלדה.
אם המשתמש משתמש במסך המגע של המכשיר, המערכת מחילה את ההגדרה החדשה show_passwords_touch.
הגנה על OTP בהודעות SMS רגילות
Beginning with Android 17, Android is extending its SMS OTP protection
to apply to standard SMS messages (SMS messages containing an OTP that do not
use the WebOTP or SMS Retriever formats). For most apps targeting
Android 17 (API level 37) or higher, these SMS messages do not become
available until three hours after receipt. This delay is intended to help
prevent OTP hijacking. 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.
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 בוצעו השיפורים הבאים באבטחת המכשירים והאפליקציות.
אבטחת פעילות
In Android 17, the platform continues its shift toward a "secure-by-default" architecture, introducing a suite of enhancements designed to mitigate high-severity exploits such as phishing, interaction hijacking, and confused deputy attacks. This update requires developers to explicitly opt in to new security standards to maintain app compatibility and user protection.
Key impacts for developers include:
- BAL hardening & improved opt-in: We are refining Background Activity
Launch (BAL) restrictions by extending protections to
IntentSender. Developers must migrate away from the legacyMODE_BACKGROUND_ACTIVITY_START_ALLOWEDconstant. Instead, you should adopt granular controls likeMODE_BACKGROUND_ACTIVITY_START_ALLOW_IF_VISIBLE, which restricts activity starts to scenarios where the calling app is visible, significantly reducing the attack surface. - Adoption tools: Developers should utilize strict mode and updated lint checks to identify legacy patterns and ensure readiness for future target SDK requirements.
הפעלה של CT כברירת מחדל
אם אפליקציה מטרגטת ל-Android 17 (רמת API 37) או לגרסה מתקדמת יותר, שקיפות האישורים (CT) מופעלת כברירת מחדל. (ב-Android 16, התכונה CT זמינה, אבל האפליקציות צריכות להצטרף אליה).
Safer Native DCL—C
If your app targets Android 17 (API level 37) or higher, the Safer Dynamic Code Loading (DCL) protection introduced in Android 14 for DEX and JAR files now extends to native libraries.
All native files loaded using System.load() must be marked as read-only.
Otherwise, the system throws UnsatisfiedLinkError.
We recommend that apps avoid dynamically loading code whenever possible, as doing so greatly increases the risk that an app can be compromised by code injection or code tampering.
הגבלת שדות של פרטים אישיים מזהים בתצוגת הנתונים של CP2
For apps targeting Android 17 (API level Android 17 (API level 37)) and higher, Contacts Provider 2 (CP2) restricts certain columns containing Personally Identifiable Information (PII) from the data view. When this change is enabled, these columns are removed from the data view to enhance user privacy. The restricted columns include:
Apps that are using these columns from ContactsContract.Data
can extract them from ContactsContract.RawContacts
instead, by joining with RAW_CONTACT_ID.
אכיפה של בדיקות SQL מחמירות ב-CP2
For apps targeting Android 17 (API level Android 17 (API level 37)) and
higher, Contacts Provider 2 (CP2) enforces strict SQL query validation when
the ContactsContract.Data table is accessed without
READ_CONTACTS permission.
With this change, if an app doesn't have READ_CONTACTS
permission, StrictColumns and
StrictGrammar options are set when querying
the ContactsContract.Data table. If a query
uses a pattern that isn't compatible with these, it will be
rejected and cause an exception to be thrown.
מדיה
Android 17 כוללת את השינויים הבאים בהתנהגות של מדיה.
הגברת האבטחה של אודיו ברקע
החל מ-Android 17, מסגרת האודיו אוכפת הגבלות על אינטראקציות עם אודיו ברקע, כולל הפעלת אודיו, בקשות להרשאת אודיו וממשקי API לשינוי עוצמת הקול, כדי לוודא שהמשתמש יתחיל את השינויים האלה באופן מכוון.
הגבלות מסוימות על אודיו חלות על כל האפליקציות. עם זאת, ההגבלות מחמירות יותר אם האפליקציה מטרגטת ל-Android 17 (רמת API 37). אם אחת מהאפליקציות האלה מבצעת אינטראקציה עם אודיו כשהיא פועלת ברקע, צריך להפעיל שירות בחזית. בנוסף, האפליקציה צריכה לעמוד באחת מהדרישות הבאות (או בשתיהן):
- לשירות שפועל בחזית צריכות להיות יכולות של while-in-use (WIU).
- לאפליקציה צריכה להיות הרשאת התראה מדויקת והיא צריכה להיות באינטראקציה עם זרמי אודיו של
USAGE_ALARM.
מידע נוסף, כולל אסטרטגיות להפחתת הסיכון, זמין במאמר בנושא הקשחה של אודיו ברקע.
גורמי צורה של מכשירים
Android 17 כוללת את השינויים הבאים לשיפור חוויית המשתמש במגוון גדלים וסוגים של מכשירים.
שינויים ב-API של הפלטפורמה שגורמים להתעלמות מהגבלות על כיוון, שינוי גודל ויחס גובה-רוחב במסכים גדולים (sw>=600dp)
We introduced Platform API changes in Android 16 to ignore orientation, aspect ratio, and resizability restrictions on large screens (sw >= 600dp) for apps targeting API level 36 or higher. Developers have the option to opt out of these changes with SDK 36, but this opt-out will no longer be available for apps that target Android 17 (API level 37) or higher.
For more information, see Restrictions on orientation and resizability are ignored.
קישוריות
ב-Android 17 בוצע השינוי הבא כדי לשפר את העקביות ולהתאים להתנהגות הרגילה של שקעי RFCOMM ב-Bluetooth ב-Java InputStream.
התנהגות עקבית של read() ב-BluetoothSocket עבור RFCOMM
For apps targeting Android 17 (API level 37), the
read() method of the InputStream obtained from an
RFCOMM-based BluetoothSocket now returns -1 when the
socket is closed or the connection is dropped.
This change makes RFCOMM socket behavior consistent with LE CoC sockets and
aligns with the standard InputStream.read()
documentation, which states that -1 is returned when the end of the stream is
reached.
Apps that rely solely on catching an IOException to break out of a read loop may
be impacted by this change and should update the BluetoothSocket read loops to
explicitly check for a return value of -1. This ensures the loop terminates
correctly when the remote device disconnects or the socket is closed. For an
example of the recommended implementation, see the
code snippet in the Transfer Bluetooth data
guide.