Closed Bug 1970719 Opened 9 months ago Closed 8 months ago

If user switches to PBM from the tabs tray and minimizes the app and reopens it, the app should be locked and require authenticating

Categories

(Firefox for Android :: Privacy, defect, P1)

All
Android
defect

Tracking

()

RESOLVED FIXED
142 Branch
Tracking Status
firefox142 --- fixed

People

(Reporter: Gela, Assigned: mavduevskiy)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid][group2])

Attachments

(6 files)

Preconditions:

  • Have a device lock setup
  • enable "Lock private tabs" from private browsing setting

If user switches to PBM from the tabs tray and minimizes the app and reopens it, the app should be locked and require authenticating. Currently whoever opens the app next can see the thumbnails without authenticating.

Not a blocker for 140.

Depends on: 1967708
No longer depends on: 1967708

This issue also applies for locking and unlocking the device while private tabs tray is in focus.

Blocks: 1971378
No longer blocks: 1807553
Severity: -- → S2
Type: task → defect
Priority: -- → P1
Assignee: nobody → mavduevskiy
Attachment #9494634 - Attachment description: WIP: Bug 1970719 - Lock tabs tray on pause if PBM feature is on → WIP: Bug 1970719 - Part 1: Lock tabs tray when PBM feature is on

it turned out to be more tricky that it looked :)

work here can be split into 3 parts:

  1. locking tabs tray fragment; when it's displayed on top of home/tag, those are in onPause so lock won't work from them. Tabs tray lock is more nuanced, because it can lock from normal mode if the tabs tray has a private page opened
  2. changing navigation in unlock fragment; if user navigates back through the negative button, we should just close the lock and show the tabstray normal page, not navigating home. So if the user had a regular tab opened, we don't navigate to home page
  3. changing colors in the unlock fragment. Current implementation is theme dependent, it assumes that we are in the private theme when we are displaying the fragment. With the introduction of a tabs lock from the normal page, we still might be in normal mode, but browsing private tabs in the tabs tray; hence the private theme colors should be used directly, to always appear the same without theme dependence.

need more time with it

Requesting the biometrics prompt from tabs tray fragment made it possible to have two instances of BiometricPromtpFeature at the same time. The user might trigger prompt by navigating from normal tab page to locked private tab page, and then minimize the app. After they open the app, UnlockFragment will create the second instance of the prompt feature.

The problem is, BiometricPrompt is tied to a fragment's lifecycle, so for to instances to work correctly, the second should start only when the previous has stopped, otherwise the prompt will be still tied to the first fragment. Delaying prompting until the second fragment is in resumed state solves the issue.

Depending on the sorce, the fragment will adjust the navigation flow after success or canceling of authentication process. The old flow for a tab and home page isn't changed, but in case of navigation to the lock fragment from tabs tray, on success it will open the tabs tray private page and on negative button click, it will just close the fragment and show regular tabs.

The parent fragment might also be called within the normal mode, e.g. when the tabs tray is opened on private page, and we want to hide that content. In that case, we can't rely on the default colours, as the theme is still normal, and have to access private theme colours directly.

Attachment #9494634 - Attachment description: WIP: Bug 1970719 - Part 1: Lock tabs tray when PBM feature is on → Bug 1970719 - Part 1: Lock tabs tray when PBM feature is on
Attachment #9495073 - Attachment description: WIP: Bug 1970719 - Part 2: Request prompt in UnlockPrivateTabsFragment after onResume → Bug 1970719 - Part 2: Request prompt in UnlockPrivateTabsFragment after onResume
Attachment #9495077 - Attachment description: WIP: Bug 1970719 - Part 3: Branch out back navigation of UnlockPrivateTabsFragment → Bug 1970719 - Part 3: Branch out back navigation of UnlockPrivateTabsFragment
Attachment #9495078 - Attachment description: WIP: Bug 1970719 - Part 4: Adjust UnlockPrivateTabsScreen colors → Bug 1970719 - Part 4: Adjust UnlockPrivateTabsScreen colors
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: