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

Commit 5ba21b60 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Don't show clings in guest user

If the SKIP_FIRST_USE_HINTS setting is ON, don't show clings. This
is used for Guest users.

Bug: 15873403
Change-Id: Icae713788c3ed26d55e8e713da7ec7d0d2b25fce
parent 803a4bec
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.content.pm.PackageManager;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.UserManager;
import android.provider.Settings;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -48,6 +49,9 @@ class LauncherClings {
    private static final int SHOW_CLING_DURATION = 250;
    private static final int DISMISS_CLING_DURATION = 200;

    // New Secure Setting in L
    private static final String SKIP_FIRST_USE_HINTS = "skip_first_use_hints";

    private Launcher mLauncher;
    private LayoutInflater mInflater;
    private HideFromAccessibilityHelper mHideFromAccessibilityHelper
@@ -107,6 +111,10 @@ class LauncherClings {
                return false;
            }
        }
        if (Settings.Secure.getInt(mLauncher.getContentResolver(), SKIP_FIRST_USE_HINTS, 0)
                == 1) {
            return false;
        }
        return true;
    }