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

Commit 09c33200 authored by Diksha Gohlyan's avatar Diksha Gohlyan Committed by Automerger Merge Worker
Browse files

Merge "Make the executor pool size as 1" am: a386d0ad

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/DocumentsUI/+/12534711

Change-Id: If7a5765b5556e4ae46d856a725f227f3f3db0971
parents eb7e05de a386d0ad
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.documentsui.services;

import static com.android.documentsui.base.SharedMinimal.DEBUG;

import androidx.annotation.IntDef;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
@@ -29,9 +28,11 @@ import android.os.Handler;
import android.os.IBinder;
import android.os.PowerManager;
import android.os.UserManager;
import androidx.annotation.VisibleForTesting;
import android.util.Log;

import androidx.annotation.IntDef;
import androidx.annotation.VisibleForTesting;

import com.android.documentsui.R;
import com.android.documentsui.base.Features;

@@ -97,7 +98,9 @@ public class FileOperationService extends Service implements Job.Listener {

    static final String NOTIFICATION_CHANNEL_ID = "channel_id";

    private static final int POOL_SIZE = 2;  // "pool size", not *max* "pool size".
    // This is a temporary solution, we will gray out the UI when a transaction is in progress to
    // not enable users to make a transaction.
    private static final int POOL_SIZE = 1;  // Allow only 1 executor operation

    @VisibleForTesting static final int NOTIFICATION_ID_PROGRESS = 1;
    private static final int NOTIFICATION_ID_FAILURE = 2;