Reputation: 2615
Use case
during a phone call, User opened some apps and the inCall UI goes behind the APP UI.I need to bring it back using adb command
What i did ?
I used below command
adb shell am start --activity-brought-to-front -n com.google.android.dialer/com.android.incallui.InCallActivity
Which resulted in error
Security exception: Permission Denial: starting Intent { flg=0x10400000 cmp=com.
google.android.dialer/com.android.incallui.InCallActivity } from null (pid=12862
, uid=2000) not exported from uid 10102
java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10400000
cmp=com.google.android.dialer/com.android.incallui.InCallActivity } from null (
pid=12862, uid=2000) not exported from uid 10102
at com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPe
Is there any way to acheive the desired result using adb?
Upvotes: 0
Views: 1053
Reputation: 721
The InCallActivity
activity can't be launched from other applications including launching via am start
as the android:exported
element of InCallActivity
is set to false
.
android:exported
This element sets whether the activity can be launched by components of other applications - "true" if it can be, and "false" if not. If "false", the activity can be launched only by components of the same application or applications with the same user ID.
If you are using intent filters, you should not set this element "false". If you do so, and an app tries to call the activity, system throws an ActivityNotFoundException. Instead, you should prevent other apps from calling the activity by not setting intent filters for it.
If you do not have intent filters, the default value for this element is "false". If you set the element "true", the activity is accessible to any app that knows its exact class name, but does not resolve when the system tries to match an implicit intent.
This attribute is not the only way to limit an activity's exposure to other applications. You can also use a permission to limit the external entities that can invoke the activity (see the permission attribute).
Upvotes: 2