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
This commit is contained in:
Amith Yamasani
2014-06-25 16:14:02 +05:30
parent 803a4bec0f
commit 5ba21b6024

View File

@@ -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;
}