16

Seems that in Chrome for Android, version 65, a "feature" was introduced which doesn't allow you to take a screenshot in Incognito mode.

When attempting to take a screenshot, Android will now show an alert saying "Taking screenshots isn't allowed by the app or your organization."

     /**
     * Sets the attributes flags to secure if there is an incognito tab visible.
     */
    @VisibleForTesting
    void updateIncognitoState() {
        WindowManager.LayoutParams attributes = mWindow.getAttributes();
        boolean currentSecureState = (attributes.flags & WindowManager.LayoutParams.FLAG_SECURE)
                == WindowManager.LayoutParams.FLAG_SECURE;
        boolean expectedSecureState = isShowingIncognito();
        if (currentSecureState == expectedSecureState) return;

        if (expectedSecureState) {
            mWindow.addFlags(WindowManager.LayoutParams.FLAG_SECURE);
        } else {
            mWindow.clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
        }
    }

Source: chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoTabSnapshotController.java

This is imposing rules you can expect to have in a enterprise environment on a personal phone.

The operation system UI should make clear when and how other apps are recording the screen. As an app developer, I should not be bothered with avoiding screen captures. Breaking this functionality breaks the lowest common denominator of data sharing: Taking a screenshot. One of the reason to make a screenshot is just because an application misses a proper data export functionality.

Source: HN Discussion

enter image description here

Is there any way to disable or prevent this behavior?

  • 1
    That's the weirdest thing ever! If they want to disable screenshots, why only in incagnito!? I hope they don't do that in regular mode... I'll let you know if I find a workaround. – aBochur Mar 13 '18 at 0:50
  • That could be due to your device admin policy (if you are on a corporate device or allowed your company as a device admin). Did this start happening from the browser upgrade? – Rider Mar 13 '18 at 2:02
  • Related: Disable Screenshot security – xavier_fakerat Mar 13 '18 at 18:49
  • 3
    I am astounded that they presumed to hijack my device and disable a basic, out of the box Android feature. This is akin to disconnecting wifi for my security. Is there really no opt-out for this? I'm on a device which can't be rooted to install custom kernel modules. – iyrin Mar 14 '18 at 8:13
  • This behavior is so ridiculous that I've switched to Firefox. – Pedro A Dec 25 '18 at 2:05
6

This appears to be a side-effect hiding incognito tabs from the recent apps list, which is intended as a privacy feature.

They also added an --enable-incognito-snapshots-in-android-recents switch to change this behavior, but unfortunately that's not easy to pass on Android, and there isn't an entry in chrome://flags. I didn't find anyone requesting a way to make it (easily) optional; I suggest filing a bug report about the screenshot-blocking side effect; that switch should at least be exposed as a flag.

  • This isn't a side-effect, the implementation was in Canary months ago and landed in stable 65. As far as I know there's no effort to fix this behavior. – Matija Grcic Mar 15 '18 at 18:07
  • 1
    @MatijaGrcic I don't think there is a way to block it from appearing in the recent apps list w/o blocking screenshots; that's an Android limitation (one flag controls both), so Chrome can't fix that. They wanted the former; the later comes with it, hence a side-effect. You're correct, though, that 65 is released; I'll fix that. I couldn't find any bug about the inability to disable it; do you have a pointer to one? Or has no one asked? – derobert Mar 15 '18 at 18:12
  • 3
    I've filed a feature request to add the flag to chrome://flags. Please star it to get it fixed more quickly. – Thomas Orlita Jan 10 '19 at 21:57
  • @ThomasOrlita The status of the request is now WontFix (Closed). How nice of them! – Jet Blue Sep 5 '19 at 18:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.