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

Commit 3667b31a authored by Cherie Cheung's avatar Cherie Cheung
Browse files

UserInfo.isDemo() to also check UserInfo.FLAG_DEMO

With the refactoring in ag/9507174, UserInfo.FLAG_DEMO is
deprecated, but ARC demo mode is still relying on it. This is
a temporary fix to keep ARC demo mode working. A proper fix will
be put in by b/179010471.

Bug: 178460880
Bug: 179010471
Test: UserManager.isDemoUser() returns true during ARC demo session.
Apps show demo mode behaviors.

Change-Id: I825d3e6c0a799005982372baa3fea5fa16c99fd2
(cherry picked from commit b652b79cb36166092063ff9df82e404129f67f3c)
(cherry picked from commit 3a72c3ec0bbc0a1dc41a8187c37504f3db4c1da1)
parent 00a8be3e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -343,7 +343,7 @@ public class UserInfo implements Parcelable {
    }

    public boolean isDemo() {
        return UserManager.isUserTypeDemo(userType);
        return UserManager.isUserTypeDemo(userType) || (flags & FLAG_DEMO) != 0;
    }

    public boolean isFull() {