dragon: DragonKeyboardFirmwareUpdater: Exclude the service other than the primary user

This CL add a check to exclude the users other than the current user from
invoking update service.

Bug: 25831955
TEST= build and check if the update notification pop up on the work profile

Change-Id: Id40be6b6acc9915a5b70b3e26e4a76c26e48fa2b
diff --git a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/src/com/android/dragonkeyboardfirmwareupdater/BluetoothConnectionBroadcastReceiver.java b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/src/com/android/dragonkeyboardfirmwareupdater/BluetoothConnectionBroadcastReceiver.java
index 7ea3b48..458ab93 100644
--- a/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/src/com/android/dragonkeyboardfirmwareupdater/BluetoothConnectionBroadcastReceiver.java
+++ b/DragonKeyboardFirmwareUpdater/keyboard_firmware_updater/src/com/android/dragonkeyboardfirmwareupdater/BluetoothConnectionBroadcastReceiver.java
@@ -31,6 +31,12 @@
     @Override
     public void onReceive(Context context, Intent intent) {
 
+        // Only process if the current user is the primary user in order to avoid starting the
+        // update process on the work profile.
+        if (!UserManager.get(context).isSystemUser()) {
+            return;
+        }
+
         if (!BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED.equals(intent.getAction())) return;
 
         Bundle extras = intent.getExtras();