Merge "UX fixes for QR code scanner QS tile" into tm-qpr-dev

This commit is contained in:
Archi Chomal
2022-11-09 05:04:53 +00:00
committed by Android (Google) Code Review
3 changed files with 3 additions and 3 deletions

View File

@@ -1311,7 +1311,7 @@
<string name="wallet_lockscreen_settings_label">Lock screen settings</string> <string name="wallet_lockscreen_settings_label">Lock screen settings</string>
<!-- QR Code Scanner label, title [CHAR LIMIT=32] --> <!-- 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. --> <!-- Name of the work status bar icon. -->
<string name="status_bar_work">Work profile</string> <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.label = mContext.getString(R.string.qr_code_scanner_title);
state.contentDescription = state.label; state.contentDescription = state.label;
state.icon = ResourceIcon.get(R.drawable.ic_qr_code_scanner); 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; : Tile.STATE_UNAVAILABLE;
} }

View File

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