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

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

Merge "Fix NPE in MtpDocumentsProviderTests" into oc-dev

parents f574869c fecc7803
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.app.NotificationManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.util.Preconditions;

/**
@@ -30,7 +31,7 @@ import com.android.internal.util.Preconditions;
 */
class ServiceIntentSender {
    private final static String CHANNEL_ID = "device_notification_channel";
    private Context mContext;
    private final Context mContext;

    ServiceIntentSender(Context context) {
        mContext = context;
@@ -46,6 +47,11 @@ class ServiceIntentSender {
        notificationManager.createNotificationChannel(mChannel);
    }

    @VisibleForTesting
    protected ServiceIntentSender() {
        mContext = null;
    }

    /**
     * Notify the change of opened device set.
     * @param records List of opened devices. Can be empty.
+0 −4
Original line number Diff line number Diff line
@@ -17,10 +17,6 @@
package com.android.mtp;

class TestServiceIntentSender extends ServiceIntentSender {
    TestServiceIntentSender() {
        super(null);
    }

    @Override
    void sendUpdateNotificationIntent(MtpDeviceRecord[] record) {}
}