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

Commit 5659fc6a authored by tmfang's avatar tmfang
Browse files

Fix crash on AppInfoDashboardFragment

When AppInfoDashboardFragment launch a new page,
it sets SUB_INFO_FRAGMENT(1) as request code.

This request code is same as REQUEST_REMOVE_DEVICE_ADMIN(1).
So, when AppInfoDashboardFragment got onActivityResult callback,
it will handle the event about REQUEST_REMOVE_DEVICE_ADMIN.

So, we change REQUEST_REMOVE_DEVICE_ADMIN to a unique value.

Test: manual test, robotest
Fixes: 118841475

Change-Id: Idabd62c5062ccfbf4b8acee82df7401fc9ce7484
parent d6cdafc0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ public class AppInfoDashboardFragment extends DashboardFragment
    // Result code identifiers
    @VisibleForTesting
    static final int REQUEST_UNINSTALL = 0;
    private static final int REQUEST_REMOVE_DEVICE_ADMIN = 1;
    private static final int REQUEST_REMOVE_DEVICE_ADMIN = 5;

    static final int SUB_INFO_FRAGMENT = 1;