From d40c037bccbae7537698968c1650a633710c5b6e Mon Sep 17 00:00:00 2001 From: Ben Reich Date: Wed, 9 Apr 2025 11:02:01 +1000 Subject: [SP 2025-09-01] Trim the application name to make it safe for presentation The application name is presented in the ConfirmFragment and as such we don't want to allow for any length. This follows a similar approach to PackageManager using the TextUtils.makeSafeForPresentation with a total available character length of 500. This removes the unused getCallingAppName from the DirectoryFragment as it was causing false positives from DirectoryFragment to avoid false positives when trying to find who calls the Shared function. On top of this, add some quotation marks around the app name to avoid the app name being a contination of the existing text in the dialog, e.g. 'This will let app name access current and future content storage in Alarms' will now be 'This will let "app name" access current and future content storage'. Bug: 397216537 Test: atest com.android.documentsui.picker.ApplicationNameTest Flag: EXEMPT bug fix Change-Id: Iad0d03de09b1e4ad953bd6bd46a619cfcc56d384 (cherry picked from commit c8ef2db3bb4645704384226976e59583b9e8d3d3) --- res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'res') diff --git a/res/values/strings.xml b/res/values/strings.xml index c3f11bab4..4cd85344b 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -575,7 +575,7 @@ Allow %1$s to access files in %2$s? - This will let %1$s access current and future content stored in %2$s. + This will let "%1$s" access current and future content stored in %2$s. Can\u2019t use this folder -- cgit v1.2.3-59-g8ed1b