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

Commit 1d562fce authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Prevent Sharing when FRP enforcement is in effect" into sc-dev am: f5424a34 am: 1551fe7c

parents 3cf4c7dc 1551fe7c
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -600,6 +600,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.