Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 057b53cb authored by Michael Bestas's avatar Michael Bestas Committed by Nishith Khanna
Browse files

Merge tag 'android-security-15.0.0_r10' into staging/lineage-22.2_merge-android-security-15.0.0_r10

Android Security 15.0.0 Release 10 (13793697)

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCaLciswAKCRDorT+BmrEO
# eLioAJ48E9kjQkjjsYv2I3gGdcTvLnEeQwCfXDCW+/kdR5RPxg99tG4Advwi0CI=
# =YxPI
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Sep  2 20:00:35 2025 EEST
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [ultimate]

* tag 'android-security-15.0.0_r10':
  Trim the application name to make it safe for presentation
  Fix for SAF loophole in the lastAccessedStack.
  Prevent clickjacking attack in DocsUi.

Change-Id: I07ff3d2b41a437931bc123c5d155c2c6a001d606
parent d8edf7d0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -551,7 +551,7 @@
    <!-- Confrim dialog title show on open document tree flow. [CHAR_LIMIT=80] -->
    <string name="open_tree_dialog_title">Allow <xliff:g id="appName" example="Drive">%1$s</xliff:g> to access files in <xliff:g id="directory" example="DCIM">%2$s</xliff:g>?</string>
    <!-- Confrim dialog message show on open document tree flow.-->
    <string name="open_tree_dialog_message">This will let <xliff:g id="appName" example="Drive">%1$s</xliff:g> access current and future content stored in <xliff:g id="directory" example="DCIM">%2$s</xliff:g>.</string>
    <string name="open_tree_dialog_message">This will let "<xliff:g id="appName" example="Drive">%1$s</xliff:g>" access current and future content stored in <xliff:g id="directory" example="DCIM">%2$s</xliff:g>.</string>
    <!-- Header message title show on open document tree flow when directory is blocked. [CHAR_LIMIT=48] -->
    <string name="directory_blocked_header_title">Can\u2019t use this folder</string>
    <!-- Header message subtitle show on open document tree flow when directory is blocked. [CHAR_LIMIT=90]-->
+10 −2
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@

package com.android.documentsui.base;

import static android.text.TextUtils.SAFE_STRING_FLAG_SINGLE_LINE;
import static android.text.TextUtils.SAFE_STRING_FLAG_TRIM;

import static com.android.documentsui.base.SharedMinimal.TAG;
import static com.android.documentsui.ChangeIds.RESTRICT_STORAGE_ACCESS_FRAMEWORK;

@@ -265,7 +268,7 @@ public final class Shared {
     * @return the calling app name or general anonymous name if not found
     */
    @NonNull
    public static String getCallingAppName(Activity activity) {
    public static CharSequence getCallingAppName(Activity activity) {
        final String anonymous = activity.getString(R.string.anonymous_application);
        final String packageName = getCallingPackageName(activity);
        if (TextUtils.isEmpty(packageName)) {
@@ -281,7 +284,12 @@ public final class Shared {
        }

        CharSequence result = pm.getApplicationLabel(ai);
        return TextUtils.isEmpty(result) ? anonymous : result.toString();
        if (TextUtils.isEmpty(result)) {
            return anonymous;
        }

        return TextUtils.makeSafeForPresentation(
                result.toString(), 500, 0, SAFE_STRING_FLAG_TRIM | SAFE_STRING_FLAG_SINGLE_LINE);
    }

    /**
+0 −5
Original line number Diff line number Diff line
@@ -1569,10 +1569,5 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On
        public ActionHandler getActionHandler() {
            return mActions;
        }

        @Override
        public String getCallingAppName() {
            return Shared.getCallingAppName(mActivity);
        }
    }
}
+0 −1
Original line number Diff line number Diff line
@@ -90,7 +90,6 @@ public abstract class DocumentsAdapter extends RecyclerView.Adapter<DocumentHold
        boolean isInSearchMode();
        boolean isSelected(String id);
        Model getModel();
        String getCallingAppName();
        boolean isDocumentEnabled(String mimeType, int flags);
        void initDocumentHolder(DocumentHolder holder);
        void onBindDocumentHolder(DocumentHolder holder, Cursor cursor);
+0 −5
Original line number Diff line number Diff line
@@ -88,9 +88,4 @@ public final class TestEnvironment implements DocumentsAdapter.Environment {
    @Override
    public void onBindDocumentHolder(DocumentHolder holder, Cursor cursor) {
    }

    @Override
    public String getCallingAppName() {
        return "unknown";
    }
}
Loading