mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 21:06:09 +00:00
fix(native): address review findings in the hook and the ctl fallback
This commit is contained in:
1 parent
e930a4997c
commit
933047e130
11 files changed
+28
-219
No files matched your search
@@ -352,6 +352,14 @@
|
||||
<action android:name="android.content.action.DOCUMENTS_PROVIDER" />
|
||||
</intent-filter>
|
||||
</provider>
|
||||
<receiver
|
||||
android:name=".agent.AgentCallReceiver"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.DUMP">
|
||||
<intent-filter>
|
||||
<action android:name="${applicationId}.AGENT_CALL" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<provider
|
||||
android:name=".agent.AgentBridgeProvider"
|
||||
android:authorities="${applicationId}.agent"
|
||||
|
||||
@@ -40,7 +40,6 @@ class AgentBridgeProvider : ContentProvider() {
|
||||
recoveryComplete.countDown()
|
||||
}
|
||||
}, "agent-recover-artifacts").start()
|
||||
AgentCallReceiver.register(appContext)
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -11,14 +11,6 @@ import java.io.File
|
||||
* [AgentBridgeProvider], answered in a file under the app's external files folder.
|
||||
*/
|
||||
class AgentCallReceiver : BroadcastReceiver() {
|
||||
companion object {
|
||||
fun action(context: Context) = "${context.packageName}.AGENT_CALL"
|
||||
|
||||
fun register(context: Context) {
|
||||
context.registerReceiver(AgentCallReceiver(), android.content.IntentFilter(action(context)),
|
||||
android.Manifest.permission.DUMP, null)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
val method = intent.getStringExtra("method") ?: return
|
||||
|
||||
Reference in new issue
Block a user