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

Commit 2efa35f6 authored by Ivan Chiang's avatar Ivan Chiang
Browse files

[PM] Fix some UI issues on PIA V2

- Update the ripple color of the buttons
- Refactor the cancelable of the dialogFragment

Flag: android.content.pm.use_pia_v2
Test: manual
Bug: 274120822
Change-Id: I3ea38f8302031eb6a6e96940a82f973159e0ac94
parent d26993eb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -211,6 +211,8 @@ public class UiUtil {
                    context.getColor(R.color.onPrimaryColor)));
            materialButton.setStrokeColor(
                    ColorStateList.valueOf(context.getColor(android.R.color.transparent)));
            materialButton.setRippleColor(ColorStateList.valueOf(
                    context.getColor(R.color.m3_button_ripple_color_selector)));
        }
    }

@@ -231,6 +233,8 @@ public class UiUtil {
                    ColorStateList.valueOf(context.getColor(R.color.primaryColor)));
            materialButton.setStrokeColor(
                    ColorStateList.valueOf(context.getColor(R.color.outlineVariantColor)));
            materialButton.setRippleColor(ColorStateList.valueOf(
                    context.getColor(R.color.m3_button_ripple_color_selector)));
        }
    }

@@ -251,6 +255,8 @@ public class UiUtil {
                    ColorStateList.valueOf(context.getColor(R.color.primaryColor)));
            materialButton.setStrokeColor(
                    ColorStateList.valueOf(context.getColor(android.R.color.transparent)));
            materialButton.setRippleColor(ColorStateList.valueOf(
                    context.getColor(R.color.m3_text_button_ripple_color_selector)));
        }
    }

+1 −13
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ public class InstallationFragment extends DialogFragment {

        // Get the current install stage
        final InstallStage installStage = getCurrentInstallStage();
        this.setCancelable(true);

        // show the title and reset the paddings of the custom message textview
        if (mTitleTemplate != null) {
@@ -222,9 +223,6 @@ public class InstallationFragment extends DialogFragment {
                        installStage.getActivityResultCode(), installStage.getResultIntent());
            });
        }

        // Cancelable is false
        this.setCancelable(false);
    }

    private void updateInstallFailedUI(Dialog dialog, InstallFailed installStage) {
@@ -299,8 +297,6 @@ public class InstallationFragment extends DialogFragment {
                mInstallActionListener.onNegativeResponse(installStage.getStageCode());
            });
        }

        this.setCancelable(true);
    }

    private void updateInstallInstallingUI(Dialog dialog, InstallInstalling installStage) {
@@ -426,8 +422,6 @@ public class InstallationFragment extends DialogFragment {
                mInstallActionListener.onNegativeResponse(installStage.getStageCode());
            });
        }

        this.setCancelable(true);
    }

    private void updateUserActionRequiredUI(Dialog dialog, InstallUserActionRequired installStage) {
@@ -483,8 +477,6 @@ public class InstallationFragment extends DialogFragment {
                mInstallActionListener.onNegativeResponse(installStage.getStageCode());
            });
        }

        this.setCancelable(true);
    }

    private void updateAnonymousSourceUI(Dialog dialog, InstallUserActionRequired installStage) {
@@ -531,8 +523,6 @@ public class InstallationFragment extends DialogFragment {
                mInstallActionListener.onNegativeResponse(installStage.getStageCode());
            });
        }

        this.setCancelable(true);
    }

    private void updateInstallConfirmationUI(Dialog dialog,
@@ -605,8 +595,6 @@ public class InstallationFragment extends DialogFragment {
                mInstallActionListener.onNegativeResponse(installStage.getStageCode());
            });
        }

        this.setCancelable(true);
    }

    /**