Send camera changed intent explicitly to Camera2 app

Due to implicit broadcast restrictions starting in Android Oreo the
camera app doesn't receive the broadcast in its current setup. By
setting the component name to the camera app we can get around these
restrictions.

An alternative solution would be to register the BroadcastReceiver in
Camera2 during runtime, so the implicit broadcast restrictions wouldn't
affect us. This is the solution used in CameraSwapInfo.

Issue: FP2A10-90
Change-Id: Idf528d69a7472e60ae3d5ab47a36aca39d5e1442
diff --git a/app/src/main/java/com/fairphone/moduledetect/ModuleDetectUtils.java b/app/src/main/java/com/fairphone/moduledetect/ModuleDetectUtils.java
index 66f6740..c204c02 100644
--- a/app/src/main/java/com/fairphone/moduledetect/ModuleDetectUtils.java
+++ b/app/src/main/java/com/fairphone/moduledetect/ModuleDetectUtils.java
@@ -1,5 +1,6 @@
 package com.fairphone.moduledetect;
 
+import android.content.ComponentName;
 import android.content.Context;
 import android.content.Intent;
 import android.util.Log;
@@ -57,6 +58,11 @@
         // Anyone can receive this broadcast; CameraSwapInfo is the most important receiver, but any
         // (third party) camera app can listen to it as well.
         context.sendBroadcast(intent);
+
+        // Also send intent explicitly to Camera app, to avoid implicit broadcast restrictions
+        ComponentName componentName = new ComponentName("com.android.camera2", "com.android.camera.CameraSwapBroadcastReceiver");
+        intent.setComponent(componentName);
+        context.sendBroadcast(intent);
     }
 
     private static void sendProximitySensorBroadcast(@NonNull Context context) {