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

Commit f485a7e5 authored by Sunny Goyal's avatar Sunny Goyal Committed by Android Git Automerger
Browse files

am dc352761: Merge "Removing account manager calls" into ub-launcher3-burnaby

* commit 'dc352761':
  Removing account manager calls
parents c48849eb dc352761
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@
    <uses-permission android:name="android.permission.SET_WALLPAPER" />
    <uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" />
    <uses-permission android:name="android.permission.BIND_APPWIDGET" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
+1 −10
Original line number Diff line number Diff line
@@ -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)) {