UX fixes for QR code scanner QS tile

Bug: 254277602
It included changing the state of the tile to INACTIVE to remove the highlight which made it seem that the scanner was always on.

Bug: 254279069
It included changing the title of the QS tile according to UX specifications.

Change-Id: Ie776b0ab70349060e79facacc69629d5411845c8
This commit is contained in:
archichomal
2022-10-31 11:59:04 +00:00
parent 47b6fbf7a1
commit 5fc270c834
3 changed files with 3 additions and 3 deletions

View File

@@ -1294,7 +1294,7 @@
<string name="wallet_lockscreen_settings_label">Lock screen settings</string>
<!-- QR Code Scanner label, title [CHAR LIMIT=32] -->
<string name="qr_code_scanner_title">Scan QR code</string>
<string name="qr_code_scanner_title">QR code scanner</string>
<!-- Name of the work status bar icon. -->
<string name="status_bar_work">Work profile</string>

View File

@@ -115,7 +115,7 @@ public class QRCodeScannerTile extends QSTileImpl<QSTile.State> {
state.label = mContext.getString(R.string.qr_code_scanner_title);
state.contentDescription = state.label;
state.icon = ResourceIcon.get(R.drawable.ic_qr_code_scanner);
state.state = mQRCodeScannerController.isEnabledForQuickSettings() ? Tile.STATE_ACTIVE
state.state = mQRCodeScannerController.isEnabledForQuickSettings() ? Tile.STATE_INACTIVE
: Tile.STATE_UNAVAILABLE;
}

View File

@@ -119,6 +119,6 @@ public class QRCodeScannerTileTest extends SysuiTestCase {
when(mController.isEnabledForQuickSettings()).thenReturn(true);
QSTile.State state = new QSTile.State();
mTile.handleUpdateState(state, null);
assertEquals(state.state, Tile.STATE_ACTIVE);
assertEquals(state.state, Tile.STATE_INACTIVE);
}
}