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

Commit 0bdcf7b0 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[PM] Hide the button if there is no entry in Install Success" into main

parents 453b28ea 6f986a39
Loading
Loading
Loading
Loading
+18 −11
Original line number Diff line number Diff line
@@ -363,12 +363,18 @@ public class InstallationFragment extends DialogFragment {

        // If there is an activity entry, show the positive button
        final Intent resultIntent = installStage.getResultIntent();
        boolean hasEntry = false;
        if (resultIntent != null) {
            final List<ResolveInfo> list =
                    requireContext().getPackageManager().queryIntentActivities(resultIntent, 0);
            if (!list.isEmpty()) {
                hasEntry = true;
            }
        }

        Button positiveButton = UiUtil.getAlertDialogPositiveButton(dialog);
        if (positiveButton != null) {
            if (hasEntry) {
                positiveButton.setVisibility(View.VISIBLE);
                UiUtil.applyFilledButtonStyle(requireContext(), positiveButton);
                positiveButton.setText(R.string.button_open);
@@ -377,7 +383,8 @@ public class InstallationFragment extends DialogFragment {
                            + installStage.getAppLabel());
                    mInstallActionListener.openInstalledApp(resultIntent);
                });
                }
            } else {
                positiveButton.setVisibility(View.GONE);
            }
        }