1
0
Fork 0

For #2028 - Pass Session ID for Custom Tab Prompts, Theme Dialogs

master
Emily Kager 2019-05-20 16:08:50 -07:00 committed by Jeff Boek
parent 028c6cad70
commit e534dad199
4 changed files with 13 additions and 2 deletions

View File

@ -237,6 +237,7 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
feature = PromptFeature(
fragment = this,
sessionManager = sessionManager,
sessionId = customTabSessionId,
fragmentManager = requireFragmentManager(),
onNeedToRequestPermissions = { permissions ->
requestPermissions(permissions, REQUEST_CODE_PROMPT_PERMISSIONS)

View File

@ -127,11 +127,11 @@ class SearchFragment : Fragment(), BackHandler {
)
)
setMessage(spannable)
setNegativeButton("DENY") { dialog: DialogInterface, _ ->
setNegativeButton(R.string.qr_scanner_dialog_negative) { dialog: DialogInterface, _ ->
requireComponents.analytics.metrics.track(Event.QRScannerNavigationDenied)
dialog.cancel()
}
setPositiveButton("ALLOW") { dialog: DialogInterface, _ ->
setPositiveButton(R.string.qr_scanner_dialog_positive) { dialog: DialogInterface, _ ->
requireComponents.analytics.metrics.track(Event.QRScannerNavigationAllowed)
(activity as HomeActivity)
.openToBrowserAndLoad(

View File

@ -485,6 +485,10 @@
<!-- QR code scanner prompt which appears after scanning a code, but before navigating to it
First parameter is the name of the app, second parameter is the URL or text scanned-->
<string name="qr_scanner_confirmation_dialog_message">Allow %1$s to open %2$s</string>
<!-- QR code scanner prompt dialog positive option to allow navigation to scanned link -->
<string name="qr_scanner_dialog_positive">ALLOW</string>
<!-- QR code scanner prompt dialog positive option to deny navigation to scanned link -->
<string name="qr_scanner_dialog_negative">DENY</string>
<!-- Text displayed in a notification when the user enters full screen mode -->
<string name="full_screen_notification">Entering full screen mode</string>
<!-- Message for copying the URL via long press on the toolbar -->

View File

@ -14,6 +14,9 @@
<item name="android:colorAccent">@color/primary_text_normal_theme</item>
<item name="android:textColorPrimary">@color/primary_text_normal_theme</item>
<item name="android:textColorSecondary">@color/secondary_text_normal_theme</item>
<item name="alertDialogStyle">@style/DialogStyle</item>
<item name="alertDialogTheme">@style/DialogStyle</item>
<!-- Active thumb color & Active track color (30% transparency) -->
<item name="android:colorControlActivated">@color/accent_high_contrast_normal_theme</item>
<!-- Inactive thumb color -->
@ -64,6 +67,9 @@
<item name="android:colorControlActivated">@color/accent_high_contrast_private_theme</item>
<item name="android:textColorPrimary">@color/primary_text_private_theme</item>
<item name="android:textColorSecondary">@color/secondary_text_private_theme</item>
<item name="alertDialogStyle">@style/DialogStyle</item>
<item name="alertDialogTheme">@style/DialogStyle</item>
<!-- Inactive thumb color -->
<item name="colorSwitchThumbNormal">@color/toggle_off_knob_dark_theme</item>
<!-- Inactive track color(30% transparency) -->