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

Commit d2c49849 authored by Kenneth Ford's avatar Kenneth Ford Committed by Android Build Coastguard Worker
Browse files

Adds back hasFlag check for DeviceState toString method

Cts uses the output from DeviceState toString to determine
if certain states should not be used

Bug: 330658669
Test: Manual toString check
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7303ab84104cce1136886c61137b1af90c29cb97)
Merged-In: I94cd8ea4f53e42190789b1460987fc7bc855e01f
Change-Id: I94cd8ea4f53e42190789b1460987fc7bc855e01f
parent 799abfca
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -346,10 +346,10 @@ public final class DeviceState {
    @Override
    public String toString() {
        return "DeviceState{" + "identifier=" + mIdentifier + ", name='" + mName + '\''
                + ", app_accessible=" + !hasProperty(PROPERTY_APP_INACCESSIBLE)
                + ", cancel_when_requester_not_on_top="
                + hasProperty(PROPERTY_POLICY_CANCEL_WHEN_REQUESTER_NOT_ON_TOP)
                + "}";
                + ", app_accessible=" + !(hasProperty(PROPERTY_APP_INACCESSIBLE)
                || hasFlag(FLAG_APP_INACCESSIBLE)) + ", cancel_when_requester_not_on_top="
                + (hasProperty(PROPERTY_POLICY_CANCEL_WHEN_REQUESTER_NOT_ON_TOP)
                || hasFlag(FLAG_CANCEL_WHEN_REQUESTER_NOT_ON_TOP)) + "}";
    }

    @Override