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

Commit 2973fdd1 authored by Joanne Chung's avatar Joanne Chung
Browse files

Improve PIA dim causing UI flash

When triggering intallation from file browser, the PIA will go with
InstallStaging (dim) -> ... -> PackageInstallerActivity (not dim) ->
open ExternalSourcesBlockedDialog (dim), this may make UI looks like
a flash screen. There is another problem here, when entering PIA,
the UI will default shows. If the PIA needs to open a dialog like
unknown external source, there is an user-visible odd animation
transition here.

To improve the problem, we let the InstallStaging without dim. The
alert UI will hide if PIA needs to open a dialog. It will show again
if the PIA needs it.

Bug: 299029375
Test: manual. See go/b299029375_video to see the improved result
Change-Id: I6cb969dc8862c5a36cd95fd578f75479a9078940
parent 0283bc86
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -70,7 +70,10 @@
            </intent-filter>
        </activity>

        <!-- NOTE: the workaround to fix the screen flash problem. Remember to check the problem
            is resolved for new implementation -->
        <activity android:name=".InstallStaging"
                  android:theme="@style/Theme.AlertDialogActivity.NoDim"
                  android:exported="false" />

        <activity android:name=".DeleteStagedFileOnResult"
+5 −0
Original line number Diff line number Diff line
@@ -32,4 +32,9 @@
        <item name="android:windowNoTitle">true</item>
    </style>

    <style name="Theme.AlertDialogActivity.NoDim">
        <item name="android:windowNoTitle">true</item>
        <item name="android:backgroundDimAmount">0</item>
    </style>

</resources>
+1 −1
Original line number Diff line number Diff line
@@ -306,6 +306,7 @@ public class PackageInstallerActivity extends AlertActivity {
    }

    private void initiateInstall() {
        bindUi();
        String pkgName = mPkgInfo.packageName;
        // Check if there is already a package on the device with this name
        // but it has been renamed to something else.
@@ -445,7 +446,6 @@ public class PackageInstallerActivity extends AlertActivity {
        if (mAppSnippet != null) {
            // load placeholder layout with OK button disabled until we override this layout in
            // startInstallConfirm
            bindUi();
            checkIfAllowedAndInitiateInstall();
        }