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

Commit 8e6eaf7a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Address Error Prone warnings." into nyc-andromeda-dev

parents a3527115 00ee0507
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.app.AlertDialog;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Looper;
@@ -202,13 +203,17 @@ public final class Shared {
            if (info.isSystemApp() || info.isUpdatedSystemApp()) {
                final String extra = activity.getIntent().getStringExtra(
                        DocumentsContract.EXTRA_PACKAGE_NAME);
                if (extra != null) {
                if (extra != null && !TextUtils.isEmpty(extra)) {
                    callingPackage = extra;
                }
            }
        } finally {
            return callingPackage;
        } catch (NameNotFoundException e) {
            // Couldn't lookup calling package info. This isn't really
            // gonna happen, given that we're getting the name of the
            // calling package from trusty old Activity.getCallingPackage.
            // For that reason, we ignore this exception.
        }
        return callingPackage;
    }

    /**
+2 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import com.android.documentsui.base.MimeTypes;
import com.android.documentsui.base.RootInfo;
import com.android.documentsui.base.State;

import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -112,7 +113,7 @@ public interface RootsAccess {
            if (!overlap) {
                if (DEBUG) Log.v(
                        tag, "Excluding root because: unsupported content types > "
                        + state.acceptMimes);
                        + Arrays.toString(state.acceptMimes));
                continue;
            }

+3 −3
Original line number Diff line number Diff line
@@ -88,13 +88,13 @@ public class FileOperationService extends Service implements Job.Listener {
    // Use a handler to schedule monitor tasks.
    @VisibleForTesting Handler handler;

    @GuardedBy("mRunning")
    private final Map<String, JobRecord> mRunning = new HashMap<>();

    private PowerManager mPowerManager;
    private PowerManager.WakeLock mWakeLock;  // the wake lock, if held.
    private NotificationManager mNotificationManager;

    @GuardedBy("mRunning")
    private Map<String, JobRecord> mRunning = new HashMap<>();

    private int mLastServiceId;

    @Override
+5 −0
Original line number Diff line number Diff line
@@ -123,6 +123,11 @@ public class SortDimension implements Parcelable {
        return mVisibility;
    }

    @Override
    public int hashCode() {
        return mId;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || !(o instanceof SortDimension)) {