19

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

Is there any way to disable or prevent this behavior?

Andrew T.
  • 15,988
  • 10
  • 74
  • 123
Matija Grcic
  • 341
  • 2
  • 3
  • 11

2 Answers2

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.

derobert
  • 708
  • 1
  • 4
  • 13
  • 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
  • 4
    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 05 '19 at 18:33
4

Update:

  1. Navigate to chrome://flags

  2. Search for "Incognito Screenshot" and mark and mark the incognito-screenshot as Enabled

  3. Restart Chrome


Previous workaround:

For now, the workaround to take screenshots in Incognito mode is the following:

  1. Navigate to chrome://flags

  2. Search for "share-screenshot" and mark the chrome-share-screenshot as Enabled

  3. Restart Chrome

  4. Open Incognito mode, click the share button below the address bar

  5. Select Screenshot and then Save

Andrew T.
  • 15,988
  • 10
  • 74
  • 123
Matija Grcic
  • 341
  • 2
  • 3
  • 11