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

Commit e0330e17 authored by Jagrut Desai's avatar Jagrut Desai Committed by Android (Google) Code Review
Browse files

Merge "Folder Title Change Listener" into main

parents d1b4eb96 06a05c38
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1432,6 +1432,11 @@ public class Folder extends AbstractFloatingView implements ClipPathView, DragSo
        updateTextViewFocus();
    }

    @Override
    public void onTitleChanged(CharSequence title) {
        mFolderName.setText(title);
    }

    /**
     * Utility methods to iterate over items of the view
     */
+1 −0
Original line number Diff line number Diff line
@@ -718,6 +718,7 @@ public class FolderIcon extends FrameLayout implements FolderListener, IconLabel
        requestLayout();
    }

    @Override
    public void onTitleChanged(CharSequence title) {
        mFolderName.setText(title);
        setContentDescription(getAccessiblityTitle(title));
+6 −0
Original line number Diff line number Diff line
@@ -174,6 +174,8 @@ public class FolderInfo extends CollectionInfo {
        void onAdd(WorkspaceItemInfo item, int rank);
        void onRemove(List<WorkspaceItemInfo> item);
        void onItemsChanged(boolean animate);
        void onTitleChanged(CharSequence title);

    }

    public boolean hasOption(int optionFlag) {
@@ -246,6 +248,10 @@ public class FolderInfo extends CollectionInfo {
        if (modelWriter != null) {
            modelWriter.updateItemInDatabase(this);
        }

        for (int i = 0; i < mListeners.size(); i++) {
            mListeners.get(i).onTitleChanged(title);
        }
    }

    /**