summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherClings.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-08-04 23:29:01 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-04 23:29:01 +0000
commitf485a7e52e661204773980e3d287023333f412c4 (patch)
tree34d6644e2e3aa317035c7c5b73a1f5d223db0caa /src/com/android/launcher3/LauncherClings.java
parentc48849eb6678b8674d38244595d846bb791f4ea4 (diff)
parentdc352761ae542087825227d773ec0b039f0aaaf0 (diff)
downloadpackages_apps_Trebuchet-f485a7e52e661204773980e3d287023333f412c4.tar.gz
packages_apps_Trebuchet-f485a7e52e661204773980e3d287023333f412c4.tar.bz2
packages_apps_Trebuchet-f485a7e52e661204773980e3d287023333f412c4.zip
am dc352761: Merge "Removing account manager calls" into ub-launcher3-burnaby
* commit 'dc352761ae542087825227d773ec0b039f0aaaf0': Removing account manager calls
Diffstat (limited to 'src/com/android/launcher3/LauncherClings.java')
-rw-r--r--src/com/android/launcher3/LauncherClings.java11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/com/android/launcher3/LauncherClings.java b/src/com/android/launcher3/LauncherClings.java
index 6eb3ac875..72987931a 100644
--- a/src/com/android/launcher3/LauncherClings.java
+++ b/src/com/android/launcher3/LauncherClings.java
@@ -44,8 +44,6 @@ class LauncherClings implements OnClickListener {
private static final String TAG_CROP_TOP_AND_SIDES = "crop_bg_top_and_sides";
- private static final boolean DISABLE_CLINGS = false;
-
private static final int SHOW_CLING_DURATION = 250;
private static final int DISMISS_CLING_DURATION = 200;
@@ -215,10 +213,6 @@ class LauncherClings implements OnClickListener {
/** Returns whether the clings are enabled or should be shown */
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
private boolean areClingsEnabled() {
- if (DISABLE_CLINGS) {
- return false;
- }
-
// disable clings when running in a test harness
if(ActivityManager.isRunningInTestHarness()) return false;
@@ -231,10 +225,7 @@ class LauncherClings implements OnClickListener {
// Restricted secondary users (child mode) will potentially have very few apps
// seeded when they start up for the first time. Clings won't work well with that
- boolean supportsLimitedUsers =
- android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR2;
- Account[] accounts = AccountManager.get(mLauncher).getAccounts();
- if (supportsLimitedUsers && accounts.length == 0) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
UserManager um = (UserManager) mLauncher.getSystemService(Context.USER_SERVICE);
Bundle restrictions = um.getUserRestrictions();
if (restrictions.getBoolean(UserManager.DISALLOW_MODIFY_ACCOUNTS, false)) {