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

Commit 8c50e9bf authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 13152920 from 4d0d9d44 to 25Q2-release

Change-Id: Ieda4e3f17d8dab0180b477c82209c33263746d6d
parents 2617b26b 4d0d9d44
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@
            android:name=".picker.TrampolineActivity"
            android:exported="true"
            android:theme="@android:style/Theme.NoDisplay"
            android:featureFlag="com.android.documentsui.flags.redirect_get_content"
            android:featureFlag="com.android.documentsui.flags.redirect_get_content_ro"
            android:visibleToInstantApps="true">
            <intent-filter android:priority="120">
                <action android:name="android.intent.action.OPEN_DOCUMENT" />
@@ -95,7 +95,7 @@
            android:theme="@style/LauncherTheme"
            android:visibleToInstantApps="true">
            <intent-filter
                android:featureFlag="!com.android.documentsui.flags.redirect_get_content"
                android:featureFlag="!com.android.documentsui.flags.redirect_get_content_ro"
                android:priority="100">
                <action android:name="android.intent.action.OPEN_DOCUMENT" />
                <category android:name="android.intent.category.DEFAULT" />
@@ -103,7 +103,7 @@
                <data android:mimeType="*/*" />
            </intent-filter>
            <intent-filter
                android:featureFlag="!com.android.documentsui.flags.redirect_get_content"
                android:featureFlag="!com.android.documentsui.flags.redirect_get_content_ro"
                android:priority="100">
                <action android:name="android.intent.action.CREATE_DOCUMENT" />
                <category android:name="android.intent.category.DEFAULT" />
@@ -111,7 +111,7 @@
                <data android:mimeType="*/*" />
            </intent-filter>
            <intent-filter
                android:featureFlag="!com.android.documentsui.flags.redirect_get_content"
                android:featureFlag="!com.android.documentsui.flags.redirect_get_content_ro"
                android:priority="100">
                <action android:name="android.intent.action.GET_CONTENT" />
                <category android:name="android.intent.category.DEFAULT" />
@@ -119,7 +119,7 @@
                <data android:mimeType="*/*" />
            </intent-filter>
            <intent-filter
                android:featureFlag="!com.android.documentsui.flags.redirect_get_content"
                android:featureFlag="!com.android.documentsui.flags.redirect_get_content_ro"
                android:priority="100">
                <action android:name="android.intent.action.OPEN_DOCUMENT_TREE" />
                <category android:name="android.intent.category.DEFAULT" />
+2 −1
Original line number Diff line number Diff line
@@ -45,10 +45,11 @@ flag {
}

flag {
    name: "redirect_get_content"
    name: "redirect_get_content_ro"
    namespace: "documentsui"
    description: "Redirects GET_CONTENT requests to Photopicker when appropriate"
    bug: "377771195"
    is_fixed_read_only: true
}

flag {
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2024 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- selected -->
    <item android:state_selected="true">
        <shape>
            <corners android:radius="@dimen/grid_item_nameplate_radius" />
            <solid android:color="?attr/colorPrimaryContainer" />
        </shape>
    </item>
</selector>
 No newline at end of file
+24 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!-- Copyright (C) 2024 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- selected -->
    <item android:state_selected="true">
        <shape>
            <corners android:radius="@dimen/grid_item_thumbnail_radius" />
            <solid android:color="?attr/colorPrimaryContainer" />
        </shape>
    </item>
</selector>
 No newline at end of file
+130 −156
Original line number Diff line number Diff line
@@ -14,37 +14,26 @@
     limitations under the License.
-->

<!-- FYI: This layout has an extra top level container view that was previously used
     to allow for the insertion of debug info. The debug info is now gone, but the
     container remains because there is a high likelihood of UI regression relating
     to focus and selection states, some of which are specific to keyboard
     when touch mode is not enable. So, if you, heroic engineer of the future,
     decide to rip these out, please be sure to check out focus and keyboards. -->
<com.google.android.material.card.MaterialCardView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/item_root"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="4dp"
    android:foreground="?android:attr/selectableItemBackground"
    android:layout_width="@dimen/grid_item_width"
    android:layout_height="@dimen/grid_item_height"
    android:layout_margin="@dimen/grid_item_layout_margin"
    android:clickable="true"
    android:focusable="true"
    app:cardElevation="0dp">

    <com.google.android.material.card.MaterialCardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:elevation="0dp"
        android:duplicateParentState="true"
    app:cardBackgroundColor="@android:color/transparent"
    app:cardElevation="0dp"
        app:strokeWidth="1dp"
        app:strokeColor="?android:strokeColor">
    app:strokeWidth="0dp">

    <RelativeLayout
        android:id="@+id/grid_item_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
            android:duplicateParentState="true">
        android:layout_marginStart="@dimen/grid_item_layout_marginStart"
        android:layout_marginEnd="@dimen/grid_item_layout_marginEnd"
        android:layout_marginTop="@dimen/grid_item_layout_marginTop">

        <!-- Main item thumbnail.  Comprised of two overlapping images, the
             visibility of which is controlled by code in
@@ -52,16 +41,28 @@

        <FrameLayout
            android:id="@+id/thumbnail"
                android:background="?attr/gridItemTint"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
            android:layout_width="@dimen/grid_item_thumbnail_width"
            android:layout_height="@dimen/grid_item_thumbnail_height"
            android:layout_centerHorizontal="true"
            android:background="@drawable/grid_thumbnail_background">

            <!-- stroke width will be controlled dynamically in the code. -->
            <com.google.android.material.card.MaterialCardView
                android:id="@+id/icon_wrapper"
                android:layout_width="@dimen/grid_item_icon_width"
                android:layout_height="@dimen/grid_item_icon_height"
                android:layout_gravity="center"
                app:cardBackgroundColor="?attr/colorSurfaceContainerLowest"
                app:cardElevation="0dp"
                app:strokeColor="?attr/colorSecondaryContainer"
                app:strokeWidth="0dp">

                <com.android.documentsui.GridItemThumbnail
                    android:id="@+id/icon_thumb"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:scaleType="centerCrop"
                    android:layout_height="match_parent"
                    android:contentDescription="@null"
                    android:scaleType="centerCrop"
                    android:tint="?attr/gridItemTint"
                    android:tintMode="src_over" />

@@ -70,8 +71,10 @@
                    android:layout_width="@dimen/icon_size"
                    android:layout_height="@dimen/icon_size"
                    android:layout_gravity="center"
                    android:scaleType="fitCenter"
                    android:contentDescription="@null"/>
                    android:contentDescription="@null"
                    android:scaleType="fitCenter" />

            </com.google.android.material.card.MaterialCardView>

        </FrameLayout>

@@ -79,103 +82,86 @@
            android:id="@+id/preview_icon"
            android:layout_width="@dimen/button_touch_size"
            android:layout_height="@dimen/button_touch_size"
                android:layout_alignParentTop="true"
            android:layout_alignParentEnd="true"
                android:pointerIcon="hand"
            android:layout_alignParentTop="true"
            android:clickable="true"
            android:focusable="true"
                android:clickable="true">
            android:pointerIcon="hand">

            <ImageView
                android:layout_width="@dimen/zoom_icon_size"
                android:layout_height="@dimen/zoom_icon_size"
                    android:padding="2dp"
                android:layout_gravity="center"
                android:background="@drawable/circle_button_background"
                android:padding="2dp"
                android:scaleType="fitCenter"
                android:src="@drawable/ic_zoom_out" />

        </FrameLayout>

            <!-- Item nameplate.  Has a mime-type icon and some text fields (title,
                 size, mod-time, etc). -->
        <!-- Item nameplate. Has some text fields (title, size, mod-time, etc). -->

        <LinearLayout
            android:id="@+id/nameplate"
                android:background="?android:attr/colorBackground"
                android:orientation="horizontal"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/thumbnail">

                <FrameLayout
                    android:id="@+id/icon"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_centerVertical="true"
                    android:pointerIcon="hand"
                    android:paddingTop="8dp"
                    android:paddingBottom="8dp"
                    android:paddingStart="12dp"
                    android:paddingEnd="8dp">

                    <ImageView
                        android:id="@+id/icon_mime_sm"
                        android:layout_width="@dimen/grid_item_icon_size"
                        android:layout_height="@dimen/grid_item_icon_size"
                        android:layout_gravity="center"
                        android:scaleType="center"
                        android:contentDescription="@null"/>

                    <ImageView
                        android:id="@+id/icon_check"
                        android:src="@drawable/ic_check_circle"
                        android:alpha="0"
                        android:layout_width="@dimen/check_icon_size"
                        android:layout_height="@dimen/check_icon_size"
                        android:layout_gravity="center"
                        android:scaleType="fitCenter"
                        android:contentDescription="@null"/>

                </FrameLayout>

                <RelativeLayout
            android:layout_width="@dimen/grid_item_nameplate_width"
            android:layout_height="@dimen/grid_item_nameplate_height"
            android:layout_below="@id/thumbnail"
            android:layout_marginTop="@dimen/grid_item_nameplate_marginTop"
            android:background="@drawable/grid_nameplate_background"
            android:orientation="vertical"
            android:padding="@dimen/grid_item_nameplate_padding">

            <!-- Top row. -->
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                    android:paddingBottom="8dp"
                    android:paddingTop="8dp"
                    android:paddingEnd="12dp">
                android:gravity="center"
                android:orientation="horizontal">

                <ImageView
                    android:id="@+id/icon_profile_badge"
                        android:layout_height="@dimen/briefcase_icon_size"
                    android:layout_width="@dimen/briefcase_icon_size"
                    android:layout_height="@dimen/briefcase_icon_size"
                    android:layout_marginEnd="@dimen/briefcase_icon_margin"
                        android:layout_alignTop="@android:id/title"
                        android:layout_alignBottom="@android:id/title"
                    android:contentDescription="@string/a11y_work"
                    android:gravity="center_vertical"
                    android:src="@drawable/ic_briefcase"
                        android:tint="?android:attr/colorAccent"
                        android:contentDescription="@string/a11y_work"/>
                    android:tint="?android:attr/colorAccent" />

                <TextView
                    android:id="@android:id/title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                        android:layout_alignParentTop="true"
                        android:layout_toEndOf="@+id/icon_profile_badge"
                    android:ellipsize="end"
                    android:singleLine="true"
                    android:textAlignment="center"
                    android:textAppearance="@style/FileItemLabelText" />

            </LinearLayout>

            <!-- Bottom row. -->
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:orientation="horizontal">

                <TextView
                    android:id="@+id/details"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="4dp"
                    android:ellipsize="end"
                    android:singleLine="true"
                    android:textAlignment="viewStart"
                        android:textAppearance="@style/CardPrimaryText"/>
                    android:textAppearance="@style/ItemCaptionText" />

                <TextView
                        android:id="@+id/details"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                        android:layout_below="@android:id/title"
                    android:layout_marginEnd="4dp"
                    android:singleLine="true"
                        android:ellipsize="end"
                    android:text="@string/bullet"
                    android:textAlignment="viewStart"
                    android:textAppearance="@style/ItemCaptionText" />

@@ -183,27 +169,15 @@
                    android:id="@+id/date"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                        android:layout_below="@android:id/title"
                        android:layout_toEndOf="@id/details"
                        android:singleLine="true"
                    android:ellipsize="end"
                    android:singleLine="true"
                    android:textAlignment="viewStart"
                    android:textAppearance="@style/ItemCaptionText" />

                </RelativeLayout>
            </LinearLayout>

        </LinearLayout>

    </RelativeLayout>

</com.google.android.material.card.MaterialCardView>

    <!-- An overlay that draws the item border when it is focused. -->
    <View
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/item_doc_grid_border_rounded"
        android:contentDescription="@null"
        android:duplicateParentState="true"/>

</com.google.android.material.card.MaterialCardView>
Loading