Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5424a34 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Prevent Sharing when FRP enforcement is in effect" into sc-dev

parents f483640d c1d48df2
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -602,6 +602,14 @@ public class ChooserActivity extends ResolverActivity implements

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        if (Settings.Secure.getIntForUser(getContentResolver(),
                Settings.Secure.SECURE_FRP_MODE, 0,
                getUserId()) == 1) {
            Log.e(TAG, "Sharing disabled due to active FRP lock.");
            super.onCreate(savedInstanceState);
            finish();
            return;
        }
        final long intentReceivedTime = System.currentTimeMillis();
        getChooserActivityLogger().logSharesheetTriggered();
        // This is the only place this value is being set. Effectively final.