Flag to process scan results in the main thread

Change-Id: I8d7af3ea8a579b5b2d50dddb181acbcb07910a6e
Test: mmm packages/modules/Bluetooth
Flag: com.android.bluetooth.flags.scan_results_in_main_thread
Bug: 392693506
Bug: 315241296
diff --git a/flags/Android.bp b/flags/Android.bp
index 8a1dc66..80a5789 100644
--- a/flags/Android.bp
+++ b/flags/Android.bp
@@ -31,6 +31,7 @@
         "hid.aconfig",
         "l2cap.aconfig",
         "le_advertising.aconfig",
+        "le_scanning.aconfig",
         "leaudio.aconfig",
         "mapclient.aconfig",
         "mcp.aconfig",
diff --git a/flags/BUILD.gn b/flags/BUILD.gn
index 9f96d85..da5aa86 100644
--- a/flags/BUILD.gn
+++ b/flags/BUILD.gn
@@ -24,6 +24,7 @@
     "hid.aconfig",
     "l2cap.aconfig",
     "le_advertising.aconfig",
+    "le_scanning.aconfig",
     "leaudio.aconfig",
     "mapclient.aconfig",
     "mcp.aconfig",
diff --git a/flags/le_scanning.aconfig b/flags/le_scanning.aconfig
new file mode 100644
index 0000000..0b4985e
--- /dev/null
+++ b/flags/le_scanning.aconfig
@@ -0,0 +1,12 @@
+package: "com.android.bluetooth.flags"
+container: "com.android.bt"
+
+flag {
+    name: "scan_results_in_main_thread"
+    namespace: "bluetooth"
+    description: "Use main thread for handling scan results"
+    bug: "392693506"
+    metadata {
+        purpose: PURPOSE_BUGFIX
+    }
+}