Add actions to binding Intent

TileService and ControlsProviders were bound using just component name.
Add the corresponding Action that matches the required IntentFilter

Test: adb shell dumpsys activity services
Test: atest CtsTileServiceTestCases
Fixes: 270762719
Change-Id: I1517309aabc81c6ecc31dbb91eeccb56ae6eca04
This commit is contained in:
Fabian Kozynski
2023-02-27 14:28:19 -05:00
parent d8a0055524
commit 0adaf39dee
2 changed files with 3 additions and 2 deletions

View File

@@ -84,7 +84,7 @@ class ControlsProviderLifecycleManager(
private val BIND_FLAGS_PANEL = Context.BIND_AUTO_CREATE or Context.BIND_NOT_PERCEPTIBLE
}
private val intent = Intent().apply {
private val intent = Intent(ControlsProviderService.SERVICE_CONTROLS).apply {
component = componentName
putExtra(CALLBACK_BUNDLE, Bundle().apply {
putBinder(CALLBACK_TOKEN, token)

View File

@@ -76,7 +76,8 @@ public class TileServiceManager {
this(tileServices, handler, userTracker, new TileLifecycleManager(handler,
tileServices.getContext(), tileServices,
new PackageManagerAdapter(tileServices.getContext()), broadcastDispatcher,
new Intent().setComponent(component), userTracker.getUserHandle()));
new Intent(TileService.ACTION_QS_TILE).setComponent(component),
userTracker.getUserHandle()));
}
@VisibleForTesting