summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java
index f2292fd96b8d..07fbbcf4f152 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java
@@ -97,6 +97,8 @@ public class QSTileHostTest extends SysuiTestCase {
mLooper.getLooper(),
mPluginManager, mTunerService, mAutoTiles, mDumpController);
setUpTileFactory();
+ Settings.Secure.putStringForUser(mContext.getContentResolver(), QSTileHost.TILES_SETTING,
+ "", ActivityManager.getCurrentUser());
}
private void setUpTileFactory() {
@@ -188,7 +190,8 @@ public class QSTileHostTest extends SysuiTestCase {
// changed
String newSetting = Settings.Secure.getStringForUser(getContext().getContentResolver(),
TILES_SETTING, ActivityManager.getCurrentUser());
- if (!previousSetting.equals(newSetting)) {
+ // newSetting is not null, as it has just been set.
+ if (!newSetting.equals(previousSetting)) {
onTuningChanged(TILES_SETTING, newSetting);
}
}