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

Commit 746e5a94 authored by William Loh's avatar William Loh Committed by Android (Google) Code Review
Browse files

Merge "Clean up encode_app_intent flag." into main

parents 061fa553 f72faa24
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -158,13 +158,6 @@ flag {
    bug: "317788011"
}

flag {
    name: "encode_app_intent"
    namespace: "package_manager_service"
    description: "Feature flag to encode app intent."
    bug: "281848623"
}

flag {
    name: "recoverability_detection"
    is_exported: true
+2 −2
Original line number Diff line number Diff line
@@ -1985,7 +1985,7 @@ public abstract class Uri implements Parcelable, Comparable<Uri> {
     */
    public static String encodeIfNotEncoded(@Nullable String value, @Nullable String allow) {
        if (value == null) return null;
        if (!Flags.encodeAppIntent() || isEncoded(value, allow)) return value;
        if (isEncoded(value, allow)) return value;
        return encode(value, allow);
    }

@@ -2036,7 +2036,7 @@ public abstract class Uri implements Parcelable, Comparable<Uri> {
     */
    public static String decodeIfNeeded(@Nullable String value) {
        if (value == null) return null;
        if (Flags.encodeAppIntent() && value.contains("%")) return decode(value);
        if (value.contains("%")) return decode(value);
        return value;
    }