Repository navigation
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Messed up this branch :') Landed in #167815.
Overview
Implements setting content sensitivity on Android via a new widget called
SensitiveContentthat currently will only function on Android.How it's implemented
There are three different content sensitivity levels:
autoSensitive,sensitive,notSensitive. All exceptautoSensitivebehave as their Android counterpart level behaves (see links on the levels); for Flutter,autoSensitivewill behave the same asnotSensitivethough it is implemented as if it works (see #160879 for more details.In any given Flutter view, each
SensitiveContentwidget sets a content sensitivity level and there may be multipleSensitiveContentwidgets in the widget tree at a time, but only the most severe content sensitivity level in the tree will be maintained in order to ensure secure content remains obscured during screen projection. This means that even widgets that are not visible may still impact the overall content sensitivity of the entire Flutter view (see #160051 for more details).Under the hood, the implementation uses method channels. Theoretically, this could cause a delay in setting the content sensitivity level and a Flutter view being obscured during screen projection on time, so we will investigate using JNIgen in the future (see #160050 for more details). Over the method channel, the framework will send a Flutter view ID and content sensitivity level to the engine to set the expected content sensitivity level for the view.
Timeline
Required for feature shipping
Short-term follow up tasks
FlutterViewhas a unique ID for the nativeSensitiveContentPluginto identify them by: [Android] MakeFlutterViewIDs instance variables instead of a static one #162685SensitiveContentwidget to relevant Flutter widgets: [Android] AddSensitiveContentwidget to Flutter widgets that have potential security vulnerabilities during screen share #167302Long-term follow up tasks
SensitiveContentwidget potential frame drops are not visible #164820.Stretch goals
SensitiveContentwidget sensitive to the visibility of child widgets: [Android] Un-mark sensitive content when it is not visible on screen #160051autoSensitivitymode: [Android] Investigate implementingautoSensitivesensitive content mode #160879Open questions
Is it okay to hard-code theApproach not used.FlutterActivityandFlutterFragmentview IDs? Does this impact add-to-app in any way? I assume we would need extenders of those classes to use a different view ID than the hardcoded one.Should we exposeExposingautoSensitivefor now? If so, what behavior should it have?autoSensitiveas if it works.One way to test this PR (rough steps)
SensitiveContentwidgets.Pre-launch Checklist
///).