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

Commit 7f445bbd authored by hieudz's avatar hieudz Committed by Hieu Dang
Browse files

Fix BluetoothOppBatchTest unknown URI

Test: atest BluetoothOppBatchTest
Bug: 254323235
Tag: #refactor
Change-Id: I633d6fd7c9ccbb8c8a1224f9819f28db94ec3302
parent 7132b71b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.content.Intent;
import android.net.Uri;
import android.util.Log;

import com.android.bluetooth.BluetoothMethodProxy;
import com.android.obex.HeaderSet;

import java.io.IOException;
@@ -229,7 +230,8 @@ public class Constants {
        Uri contentUri = Uri.parse(BluetoothShare.CONTENT_URI + "/" + id);
        ContentValues updateValues = new ContentValues();
        updateValues.put(BluetoothShare.STATUS, status);
        context.getContentResolver().update(contentUri, updateValues, null, null);
        BluetoothMethodProxy.getInstance().contentResolverUpdate(context.getContentResolver(),
                contentUri, updateValues, null, null);
        Constants.sendIntentIfCompleted(context, contentUri, status);
    }

+1 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@ public class BluetoothOppBatchTest {
        BluetoothMethodProxy proxy = spy(BluetoothMethodProxy.getInstance());
        BluetoothMethodProxy.setInstanceForTesting(proxy);
        doReturn(0).when(proxy).contentResolverDelete(any(), any(), any(), any());
        doReturn(0).when(proxy).contentResolverUpdate(any(), any(), any(), any(), any());

        assertThat(mBluetoothOppBatch.getPendingShare()).isEqualTo(mInitShareInfo);