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

Commit 349079b0 authored by Timi Rautamäki's avatar Timi Rautamäki Committed by Bruno Martins
Browse files

SystemUI: don't show screenshot button on TV

Not very usable on TV.

Change-Id: Ib908dafbfb433b64c94ef838b2fb1d23c393cfe7
parent 8d05a43e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.app.ActivityManager;
import android.app.Dialog;
import android.app.IActivityManager;
import android.app.StatusBarManager;
import android.app.UiModeManager;
import android.app.WallpaperManager;
import android.app.admin.DevicePolicyManager;
import android.app.trust.TrustManager;
@@ -692,7 +693,11 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
            } else if (GLOBAL_ACTION_KEY_RESTART.equals(actionKey)) {
                addIfShouldShowAction(tempActions, restartAction);
            } else if (GLOBAL_ACTION_KEY_SCREENSHOT.equals(actionKey)) {
                UiModeManager uiModeManager =
                        (UiModeManager) mContext.getSystemService(Context.UI_MODE_SERVICE);
                if (uiModeManager.getCurrentModeType() != Configuration.UI_MODE_TYPE_TELEVISION) {
                    addIfShouldShowAction(tempActions, new ScreenshotAction());
                }
            } else if (GLOBAL_ACTION_KEY_LOGOUT.equals(actionKey)) {
                // TODO(b/206032495): should call mDevicePolicyManager.getLogoutUserId() instead of
                // hardcode it to USER_SYSTEM so it properly supports headless system user mode