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

Commit db252ef0 authored by Evan Laird's avatar Evan Laird Committed by android-build-merger
Browse files

Merge "Fix null drawable for Mobile signal data edit QS tile" into oc-dev am: 38778637

am: 7d4f7e88

Change-Id: I131f4512509315c841bd26851715a55d0592f187
parents 5d237daf 7d4f7e88
Loading
Loading
Loading
Loading
+10 −4
Original line number Original line Diff line number Diff line
@@ -35,9 +35,7 @@ public class CellTileView extends SignalTileView {
    public CellTileView(Context context) {
    public CellTileView(Context context) {
        super(context);
        super(context);
        mSignalDrawable = new SignalDrawable(mContext);
        mSignalDrawable = new SignalDrawable(mContext);
        float dark = Utils.getColorAttr(context, android.R.attr.colorForeground) == 0xff000000
        mSignalDrawable.setDarkIntensity(isDark(mContext));
                ? 1 : 0;
        mSignalDrawable.setDarkIntensity(dark);
        mSignalDrawable.setIntrinsicSize(context.getResources().getDimensionPixelSize(
        mSignalDrawable.setIntrinsicSize(context.getResources().getDimensionPixelSize(
                R.dimen.qs_tile_icon_size));
                R.dimen.qs_tile_icon_size));
    }
    }
@@ -50,6 +48,10 @@ public class CellTileView extends SignalTileView {
        }
        }
    }
    }


    private static int isDark(Context context) {
        return Utils.getColorAttr(context, android.R.attr.colorForeground) == 0xff000000 ? 1 : 0;
    }

    public static class SignalIcon extends Icon {
    public static class SignalIcon extends Icon {


        private final int mState;
        private final int mState;
@@ -64,7 +66,11 @@ public class CellTileView extends SignalTileView {


        @Override
        @Override
        public Drawable getDrawable(Context context) {
        public Drawable getDrawable(Context context) {
            return null;
            //TODO: Not the optimal solution to create this drawable
            SignalDrawable d = new SignalDrawable(context);
            d.setDarkIntensity(isDark(context));
            d.setLevel(getState());
            return d;
        }
        }
    }
    }
}
}