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

Commit 3a243822 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Define ICON_UNAVAILABLE for no icon status"

parents 09f634ed 02064346
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -28,11 +28,13 @@ import java.util.List;
 */
public interface PanelContent extends Instrumentable {

    int ICON_UNAVAILABLE = -1;

    /**
     * @return a icon resource for the title of the Panel.
     */
    default int getIcon() {
        return -1;
        return ICON_UNAVAILABLE;
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ public class PanelFragment extends Fragment {
        loadAllSlices();

        final int iconRes = mPanel.getIcon();
        if (iconRes == -1) {
        if (iconRes == PanelContent.ICON_UNAVAILABLE) {
            mTitleView.setText(mPanel.getTitle());
        } else {
            mTitleView.setVisibility(View.GONE);