Loading android/app/src/com/android/bluetooth/opp/BluetoothOppService.java +1 −11 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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(); Loading Loading @@ -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; } } Loading android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppServiceCleanupTest.java +0 −6 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading @@ -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 = Loading @@ -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 Loading flags/opp.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -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 } } Loading
android/app/src/com/android/bluetooth/opp/BluetoothOppService.java +1 −11 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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(); Loading Loading @@ -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; } } Loading
android/app/tests/unit/src/com/android/bluetooth/opp/BluetoothOppServiceCleanupTest.java +0 −6 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; Loading @@ -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 = Loading @@ -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 Loading
flags/opp.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -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 } }