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

Commit 565f258d authored by Fabian Kozynski's avatar Fabian Kozynski
Browse files

Fixes NPE in TileQueryHelper

Change-Id: I475efd88aeb5a7db45e844131cf302b23d28f1a9
Fixes: 121271663
Test: atest
parent 964d112c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -87,6 +87,8 @@ public class TileQueryHelper {
        if (current != null) {
            // The setting QS_TILES is not populated immediately upon Factory Reset
            possibleTiles.addAll(Arrays.asList(current.split(",")));
        } else {
            current = "";
        }
        String[] stockSplit =  stock.split(",");
        for (String spec : stockSplit) {
+8 −0
Original line number Diff line number Diff line
@@ -218,4 +218,12 @@ public class TileQueryHelperTest extends SysuiTestCase {
        }
        assertFalse(specs.contains("other"));
    }

    @Test
    public void testQueryTiles_nullSetting() {
        Settings.Secure.putString(mContext.getContentResolver(), Settings.Secure.QS_TILES, null);
        mContext.getOrCreateTestableResources().addOverride(R.string.quick_settings_tiles_stock,
                STOCK_TILES);
        mTileQueryHelper.queryTiles(mQSTileHost);
    }
}