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

Commit d5126d4b authored by Hyundo Moon's avatar Hyundo Moon
Browse files

Remove dead code related to OPEN_RECEIVED_FILES

There is no place that fires the intent with action OPEN_RECEIVED_FILES.

Bug: 318610752
Flag: EXEMPT, dead code deletion
Test: atest BluetoothOppReceiverTest
Change-Id: Ib1a2f4ed49d8aed8af325aebc0187b4c2e877b64
parent eea4ca82
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -186,9 +186,6 @@
             android:name="com.android.bluetooth.opp.BluetoothOppReceiver"
             android:exported="true"
             android:enabled="false">
            <intent-filter>
                <action android:name="android.btopp.intent.action.OPEN_RECEIVED_FILES"/>
            </intent-filter>
        </receiver>
        <receiver android:process="@string/process"
              android:name="com.android.bluetooth.opp.BluetoothOppHandoverReceiver"
+0 −10
Original line number Diff line number Diff line
@@ -172,16 +172,6 @@ public class BluetoothOppReceiver extends BroadcastReceiver {
            in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
            in.putExtra("direction", BluetoothShare.DIRECTION_INBOUND);
            context.startActivity(in);
        } else if (action.equals(Constants.ACTION_OPEN_RECEIVED_FILES)) {
            if (V) {
                Log.v(TAG, "Received ACTION_OPEN_RECEIVED_FILES.");
            }

            Intent in = new Intent(context, BluetoothOppTransferHistory.class);
            in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
            in.putExtra("direction", BluetoothShare.DIRECTION_INBOUND);
            in.putExtra(Constants.EXTRA_SHOW_ALL_FILES, true);
            context.startActivity(in);
        } else if (action.equals(Constants.ACTION_HIDE)) {
            if (V) {
                Log.v(TAG, "Receiver hide for " + intent.getData());
+0 −4
Original line number Diff line number Diff line
@@ -70,10 +70,6 @@ public class Constants {
    /** the intent that gets sent when clicking a inbound transfer notification */
    static final String ACTION_OPEN_INBOUND_TRANSFER = "android.btopp.intent.action.OPEN_INBOUND";

    /** the intent that gets sent from the Settings app to show the received files */
    static final String ACTION_OPEN_RECEIVED_FILES =
            "android.btopp.intent.action.OPEN_RECEIVED_FILES";

    /** the intent that acceptlists a remote bluetooth device for auto-receive confirmation (NFC) */
    static final String ACTION_ACCEPTLIST_DEVICE = "android.btopp.intent.action.ACCEPTLIST_DEVICE";

+0 −11
Original line number Diff line number Diff line
@@ -176,17 +176,6 @@ public class BluetoothOppReceiverTest {
        intended(hasExtra("direction", BluetoothShare.DIRECTION_INBOUND));
    }

    @Test
    public void onReceive_withActionOpenReceivedFile_startsTransferHistoryActivity() {
        Intent intent = new Intent();
        intent.setAction(Constants.ACTION_OPEN_RECEIVED_FILES);
        intent.setData(Uri.parse("content:///not/important"));
        mReceiver.onReceive(mContext, intent);
        intended(hasComponent(BluetoothOppTransferHistory.class.getName()));
        intended(hasExtra("direction", BluetoothShare.DIRECTION_INBOUND));
        intended(hasExtra(Constants.EXTRA_SHOW_ALL_FILES, true));
    }

    @Test
    public void onReceive_withActionHide_contentUpdate() {
        List<BluetoothOppTestUtils.CursorMockData> cursorMockDataList;