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

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

Merge "Fixes NPE in TileQueryHelper"

parents 71781016 565f258d
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);
    }
}