Fix logging spam in DashboardFragment.

When updating preferences managed through PreferenceController, the
fragment should skip prefs that are not available.

Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I2f9b6ddf8c78d40068dc18f07e60672dcba4474a
This commit is contained in:
Fan Zhang
2016-10-25 16:38:22 -07:00
parent 42a0870b8c
commit 242da31179
32 changed files with 58 additions and 40 deletions

View File

@@ -35,7 +35,7 @@ public class AutoBrightnessPreferenceController extends PreferenceController imp
}
@Override
protected boolean isAvailable() {
public boolean isAvailable() {
return mContext.getResources().getBoolean(
com.android.internal.R.bool.config_automatic_brightness_available);
}