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

Commit 6e3761eb authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 13611907 from 9bc69487 to 25Q3-release

Change-Id: If58b28e9b792d35014d7c089eb558606b54aabc5
parents 9687ee0a 9bc69487
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -66,6 +66,12 @@ java_defaults {
        "docsui-change-ids",
        "guava",
        "modules-utils-build_system",
        // Glide and dependencies. Optimized out when use_peek_preview_ro flag enabled.
        // See b/421076517 for more details.
        "androidx.exifinterface_exifinterface",
        "glide-disklrucache-prebuilt",
        "glide-gifdecoder-prebuilt",
        "glide-prebuilt",
    ],

    privileged: true,
+2 −2
Original line number Diff line number Diff line
@@ -29,8 +29,8 @@
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <com.android.documentsui.peek.RenderView
            android:id="@+id/peek_preview"
        <FrameLayout
            android:id="@+id/peek_preview_frame"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
        <!-- Text and icons using android:white because the underlying black scrim doesn't
+2 −1
Original line number Diff line number Diff line
@@ -12,7 +12,8 @@
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/peek_preview_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
+3 −0
Original line number Diff line number Diff line
@@ -694,4 +694,7 @@

    <!-- Text used in Peek to indicate that no preview is available. -->
    <string name="peek_no_preview">No preview available</string>

    <!-- Accessibility label for an image preview in Peek. -->
    <string name="a11y_peek_image_preview">Image preview of <xliff:g id="filename" example="image.png">%s</xliff:g></string>
</resources>
+16 −10
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.text.Html;
import android.widget.TextView;

import androidx.annotation.IntDef;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.FragmentManager;
@@ -44,6 +45,7 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.List;

/**
 * Alert dialog for operation dialogs.
@@ -68,16 +70,18 @@ public class OperationDialogFragment extends DialogFragment {
    public static void show(
            FragmentManager fm,
            @DialogType int dialogType,
            ArrayList<DocumentInfo> failedSrcList,
            ArrayList<Uri> uriList,
            ArrayList<DocumentInfo> failedDocs,
            ArrayList<Uri> failedUris,
            ArrayList<String> failedPaths,
            DocumentStack dstStack,
            @OpType int operationType) {

        final Bundle args = new Bundle();
        args.putInt(FileOperationService.EXTRA_DIALOG_TYPE, dialogType);
        args.putInt(FileOperationService.EXTRA_OPERATION_TYPE, operationType);
        args.putParcelableArrayList(FileOperationService.EXTRA_FAILED_DOCS, failedSrcList);
        args.putParcelableArrayList(FileOperationService.EXTRA_FAILED_URIS, uriList);
        args.putParcelableArrayList(FileOperationService.EXTRA_FAILED_DOCS, failedDocs);
        args.putParcelableArrayList(FileOperationService.EXTRA_FAILED_URIS, failedUris);
        args.putStringArrayList(FileOperationService.EXTRA_FAILED_PATHS, failedPaths);

        final FragmentTransaction ft = fm.beginTransaction();
        final OperationDialogFragment fragment = new OperationDialogFragment();
@@ -88,21 +92,23 @@ public class OperationDialogFragment extends DialogFragment {
    }

    @Override
    public Dialog onCreateDialog(Bundle inState) {
    public @NonNull Dialog onCreateDialog(Bundle inState) {
        super.onCreate(inState);

        final @DialogType int dialogType =
              getArguments().getInt(FileOperationService.EXTRA_DIALOG_TYPE);
        final @OpType int operationType =
              getArguments().getInt(FileOperationService.EXTRA_OPERATION_TYPE);
        final ArrayList<Uri> uriList = getArguments().getParcelableArrayList(
                FileOperationService.EXTRA_FAILED_URIS);
        final ArrayList<DocumentInfo> docList = getArguments().getParcelableArrayList(
                FileOperationService.EXTRA_FAILED_DOCS);
        final List<DocumentInfo> failedDocs = getArguments().getParcelableArrayList(
                FileOperationService.EXTRA_FAILED_DOCS, DocumentInfo.class);
        final List<Uri> failedUris = getArguments().getParcelableArrayList(
                FileOperationService.EXTRA_FAILED_URIS, Uri.class);
        final List<String> failedPaths = getArguments().getStringArrayList(
                FileOperationService.EXTRA_FAILED_PATHS);

        final MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(getActivity());
        final String message = new MessageBuilder(getContext()).generateListMessage(
                dialogType, operationType, docList, uriList);
                dialogType, operationType, failedDocs, failedUris, failedPaths);

        builder.setMessage(Html.fromHtml(message));
        builder.setPositiveButton(
Loading