@@ -249,18 +249,23 @@ function fetchHistory(parent, nextOffset, hasPogoPins) {
249249 appendLine ( parent , "Device administrator(s) enabled: " + deviceAdminStrings . get ( attestation . deviceAdmin ) ) ;
250250 appendLine ( parent , "Android Debug Bridge enabled: " + toYesNoString ( attestation . adbEnabled ) ) ;
251251 appendLine ( parent , "Add users from lock screen: " + toYesNoString ( attestation . addUsersWhenLocked ) ) ;
252- if ( attestation . oemUnlockAllowed2 !== undefined && attestation . oemUnlockedAllowed2 >= 0 ) {
252+
253+ if ( attestation . oemUnlockAllowed2 !== undefined
254+ && ( attestation . oemUnlockedAllowed2 >= 0 || attestation . oemUnlockAllowed == - 2 ) ) {
253255 appendLine ( parent , "OEM unlocking allowed: " + oemUnlockAllowedString ( attestation . oemUnlockAllowed2 ) ) ;
254256 }
255257 appendLine ( parent , "Main user account: " + toYesNoString ( attestation . systemUser ) ) ;
256- if ( attestation . autoRebootSeconds !== undefined && attestation . autoRebootSeconds >= 20 ) {
258+ if ( attestation . autoRebootSeconds !== undefined
259+ && ( attestation . autoRebootSeconds == - 2
260+ || attestation . autoRebootSeconds == 0 || attestation . autoRebootSeconds >= 20 ) ) {
257261 appendLine ( parent , "Auto reboot timeout: " + autoRebootTimeoutString ( attestation . autoRebootSeconds ) ) ;
258262 }
259- if ( attestation . portSecurityMode !== undefined && attestation . portSecurityMode >= 0 ) {
263+ if ( attestation . portSecurityMode !== undefined
264+ && ( attestation . portSecurityMode == - 2 || attestation . portSecurityMode >= 0 ) ) {
260265 appendLine ( parent , "USB-C port" + ( ( attestation . hasPogoPins > 0 ) ? " and pogo pins" : "" )
261266 + " security mode: " + usbPortSecurityModeString ( attestation . portSecurityMode , hasPogoPins ) ) ;
262267 }
263- if ( attestation . userCount !== undefined && attestation . userCount >= 1 ) {
268+ if ( attestation . userCount !== undefined && ( attestation . userCount == - 2 || attestation . userCount >= 1 ) ) {
264269 appendLine ( parent , "User count: " + userCountString ( attestation . userCount ) ) ;
265270 }
266271 }
@@ -385,17 +390,20 @@ function fetchDevices() {
385390 appendLine ( info , "Device administrator(s) enabled: " + deviceAdminStrings . get ( device . deviceAdmin ) ) ;
386391 appendLine ( info , "Android Debug Bridge enabled: " + toYesNoString ( device . adbEnabled ) ) ;
387392 appendLine ( info , "Add users from lock screen: " + toYesNoString ( device . addUsersWhenLocked ) ) ;
388- if ( device . oemUnlockAllowed2 !== undefined && device . oemUnlockAllowed2 >= 0 ) {
393+ if ( device . oemUnlockAllowed2 !== undefined
394+ && ( device . oemUnlockAllowed2 == - 2 || device . oemUnlockAllowed2 >= 0 ) ) {
389395 appendLine ( info , "OEM unlocking allowed: " + oemUnlockAllowedString ( device . oemUnlockAllowed2 ) ) ;
390396 }
391397 appendLine ( info , "Main user account: " + toYesNoString ( device . systemUser ) ) ;
392- if ( device . autoRebootSeconds !== undefined && device . autoRebootSeconds >= 20 ) {
398+ if ( device . autoRebootSeconds !== undefined
399+ && ( device . autoRebootSeconds == - 2 || device . autoRebootSeconds == 0 || device . autoRebootSeconds >= 20 ) ) {
393400 appendLine ( info , "Auto reboot timeout: " + autoRebootTimeoutString ( device . autoRebootSeconds ) ) ;
394401 }
395- if ( device . portSecurityMode !== undefined && device . portSecurityMode >= 0 ) {
402+ if ( device . portSecurityMode !== undefined
403+ && ( device . portSecurityMode == - 2 || device . portSecurityMode >= 0 ) ) {
396404 appendLine ( info , "USB-C port" + ( ( device . hasPogoPins > 0 ) ? " and pogo pins" : "" ) + " security mode: " + usbPortSecurityModeString ( device . portSecurityMode , device . hasPogoPins ) ) ;
397405 }
398- if ( device . userCount !== undefined && device . userCount >= 1 ) {
406+ if ( device . userCount !== undefined && ( device . userCount == - 2 || device . userCount >= 1 ) ) {
399407 appendLine ( info , "User count: " + userCountString ( device . userCount ) ) ;
400408 }
401409
0 commit comments