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

Commit 872c5eec authored by Brint E. Kriebel's avatar Brint E. Kriebel
Browse files

Merge branch 'cm-11.0' into stable/cm-11.0

parents 82381089 f7bef254
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1202,7 +1202,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
    }

    private void replaceFolderWithFinalItem() {
        if (mInfo.hidden) {
        if (mInfo.hidden && getItemCount() >= 1) {
            return;
        }
        // Add the last remaining child to the workspace in place of the folder
@@ -1245,7 +1245,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
        if (finalChild != null) {
            mFolderIcon.performDestroyAnimation(finalChild, onCompleteRunnable);
        } else {
            onCompleteRunnable.run();
            mLauncher.runOnUiThread(onCompleteRunnable);
        }
        mDestroyed = true;
    }
+1 −1
Original line number Diff line number Diff line
@@ -690,7 +690,7 @@ public class FolderIcon extends FrameLayout implements FolderListener {
            public void onAnimationEnd(Animator animation) {
                mAnimating = false;
                if (onCompleteRunnable != null) {
                    onCompleteRunnable.run();
                    mLauncher.runOnUiThread(onCompleteRunnable);
                }
            }
        });
+13 −1
Original line number Diff line number Diff line
@@ -456,10 +456,21 @@ public class Launcher extends Activity
        return Log.isLoggable(propertyName, Log.VERBOSE);
    }

    Runnable mUpdateDynamicGridRunnable = new Runnable() {
        @Override
        public void run() {
            updateDynamicGrid();
        }
    };

    private BroadcastReceiver protectedAppsChangedReceiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            // Update the workspace
            if (waitUntilResume(mUpdateDynamicGridRunnable, true)) {
                return;
            }

            updateDynamicGrid();
        }
    };
@@ -1329,7 +1340,8 @@ public class Launcher extends Activity
    protected void startThemeSettings() {
        Intent chooser = new Intent(Intent.ACTION_MAIN)
                .addCategory(OverviewSettingsPanel.THEME_CHOOSER_CATEGORY)
                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
                .addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
        try {
            startActivity(chooser);
        } catch (ActivityNotFoundException e) {
+13 −3
Original line number Diff line number Diff line
@@ -2445,18 +2445,28 @@ public class LauncherModel extends BroadcastReceiver {

                        int NN = shortcuts.size() - 1;
                        for (int j = NN; j >= 0; j--) {
                            ShortcutInfo sci = shortcuts.get(j);
                            final ShortcutInfo sci = shortcuts.get(j);
                            if (sci.intent != null && sci.intent.getComponent() != null) {
                                if (!folder.hidden){
                                    if (mHiddenApps.contains(sci.intent.getComponent())) {
                                        LauncherModel.deleteItemFromDatabase(mContext, sci);
                                        Runnable r = new Runnable() {
                                            public void run() {
                                                folder.remove(sci);
                                            }
                                        };
                                        runOnMainThread(r, MAIN_THREAD_BINDING_RUNNABLE);
                                    }
                                } else {
                                    if (!mHiddenApps.contains(sci.intent.getComponent())) {
                                        LauncherModel.deleteItemFromDatabase(mContext, sci);
                                        Runnable r = new Runnable() {
                                            public void run() {
                                                folder.remove(sci);
                                            }
                                        };
                                        runOnMainThread(r, MAIN_THREAD_BINDING_RUNNABLE);
                                    }
                                }

                            }
+15 −3
Original line number Diff line number Diff line
@@ -1337,7 +1337,7 @@ public class Workspace extends SmoothPagedView
        float mAnimationStartOffset;
        private final int ANIMATION_DURATION = 250;
        // Don't use all the wallpaper for parallax until you have at least this many pages
        private final int MIN_PARALLAX_PAGE_SPAN = 3;
        private final int MIN_PARALLAX_PAGE_SPAN = 2;
        int mNumScreens;
        boolean mCompletedInitialOffset;

@@ -1390,8 +1390,8 @@ public class Workspace extends SmoothPagedView
        }

        private float wallpaperOffsetForCurrentScroll() {
            if (getChildCount() <= 1) {
                return 0;
            if (getNumScreensExcludingEmptyAndCustom() <= 1) {
                return mWallpaperIsLiveWallpaper ? 0 : 0.5f;
            }

            // Exclude the leftmost page
@@ -2767,6 +2767,18 @@ public class Workspace extends SmoothPagedView
                    v.getWidth() + padding, v.getHeight() + padding, Bitmap.Config.ARGB_8888);
        }

        // Special case for dragging All Apps button
        if (v.getTag() instanceof ItemInfo) {
            ItemInfo info = (ItemInfo) v.getTag();
            if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_ALLAPPS) {
                // Special case for all apps icon
                Drawable d = ((TextView) v).getCompoundDrawables()[1];
                Rect r = d.getBounds();
                b = Bitmap.createBitmap(r.width() + padding,
                        r.height() + padding, Bitmap.Config.ARGB_8888);
            }
        }

        canvas.setBitmap(b);
        drawDragView(v, canvas, padding, true);
        canvas.setBitmap(null);