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

Commit b7c76d53 authored by Hyundo Moon's avatar Hyundo Moon Committed by Gerrit Code Review
Browse files

Merge "Remove flag opp_service_fix_index_out_of_bounds_exception_in_update_thread" into main

parents 305011db 0fb1e882
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -282,11 +282,7 @@ public class BluetoothOppService extends ProfileService implements IObexConnecti
                    1);
        }
        setBluetoothOppService(null);
        if (Flags.oppServiceFixIndexOutOfBoundsExceptionInUpdateThread()) {
        stopInternal();
        } else {
            mHandler.sendMessage(mHandler.obtainMessage(STOP_LISTENER));
        }

        setComponentAvailable(OPP_PROVIDER, false);
        setComponentAvailable(INCOMING_FILE_CONFIRM_ACTIVITY, false);
@@ -538,9 +534,6 @@ public class BluetoothOppService extends ProfileService implements IObexConnecti
    @Override
    public void cleanup() {
        Log.v(TAG, "onDestroy");
        if (!Flags.oppServiceFixIndexOutOfBoundsExceptionInUpdateThread()) {
            stopListeners();
        }

        mBatches.clear();
        mShares.clear();
@@ -659,9 +652,6 @@ public class BluetoothOppService extends ProfileService implements IObexConnecti
                        break;
                    case BluetoothAdapter.STATE_TURNING_OFF:
                        Log.v(TAG, "Bluetooth state changed: STATE_TURNING_OFF");
                        if (!Flags.oppServiceFixIndexOutOfBoundsExceptionInUpdateThread()) {
                            mHandler.sendMessage(mHandler.obtainMessage(STOP_LISTENER));
                        }
                        break;
                }
            }
+0 −6
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import static android.content.pm.PackageManager.DONT_KILL_APP;
import android.content.ComponentName;
import android.content.ContentValues;
import android.content.Context;
import android.platform.test.flag.junit.SetFlagsRule;

import androidx.test.annotation.UiThreadTest;
import androidx.test.filters.SmallTest;
@@ -30,7 +29,6 @@ import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;

import com.android.bluetooth.btservice.AdapterService;
import com.android.bluetooth.flags.Flags;

import org.junit.Rule;
import org.junit.Test;
@@ -41,7 +39,6 @@ import org.mockito.junit.MockitoRule;
@SmallTest
@RunWith(AndroidJUnit4.class)
public class BluetoothOppServiceCleanupTest {
    @Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
    @Rule public MockitoRule mockitoRule = MockitoJUnit.rule();

    private final Context mTargetContext =
@@ -50,9 +47,6 @@ public class BluetoothOppServiceCleanupTest {
    @Test
    @UiThreadTest
    public void testStopAndCleanup() {
        mSetFlagsRule.enableFlags(
                Flags.FLAG_OPP_SERVICE_FIX_INDEX_OUT_OF_BOUNDS_EXCEPTION_IN_UPDATE_THREAD);

        AdapterService adapterService = new AdapterService(mTargetContext);

        // Don't need to disable again since it will be handled in OppService.stop
+0 −11
Original line number Diff line number Diff line
@@ -17,14 +17,3 @@ flag {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "opp_service_fix_index_out_of_bounds_exception_in_update_thread"
    namespace: "bluetooth"
    description: "Fix IndexOutOfBoundsException which happens in OPP service's UpdateThread"
    bug: "326135849"
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}