Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5afa5a6b authored by jasonwshsu's avatar jasonwshsu
Browse files

Remove setPackage() for tool in hearing devivce dialog

Root Cause: The destination for tools in hearing device dialog is not all settings page, live
caption has its own activity page

Solution: Remove setPackage() for intent for tools. Also add setPackage() for 'Settings' button.

Bug: 403369372
Test: atest HearingDevicesDialogDelegateTest HearingDevicesDialogDelegateTest
Flag: EXEMPT bugfix
Change-Id: I59e3306e90122dce4bb52cc325187ed637aa4fae
parent ab631004
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -286,7 +286,9 @@ public class HearingDevicesDialogDelegate implements SystemUIDialog.Delegate,
                            mLaunchSourceId);
                    final Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_DETAILS_SETTINGS)
                            .putExtra(Intent.EXTRA_COMPONENT_NAME,
                                    ACCESSIBILITY_HEARING_AIDS_COMPONENT_NAME.flattenToString());
                                    ACCESSIBILITY_HEARING_AIDS_COMPONENT_NAME.flattenToString())
                            .setPackage(mQSSettingsPackageRepository.getSettingsPackageName());

                    mActivityStarter.postStartActivityDismissingKeyguard(intent, /* delay= */ 0,
                            mDialogTransitionAnimator.createActivityTransitionController(
                                    dialog));
@@ -588,9 +590,7 @@ public class HearingDevicesDialogDelegate implements SystemUIDialog.Delegate,
                    com.android.internal.R.color.materialColorOnPrimaryContainer));
        }
        text.setText(item.getToolName());
        Intent intent = item.getToolIntent()
                .setPackage(mQSSettingsPackageRepository.getSettingsPackageName());

        Intent intent = item.getToolIntent();
        view.setOnClickListener(v -> {
            final String name = intent.getComponent() != null
                    ? intent.getComponent().flattenToString()