Fix crash on BLU Life Play devices related to switch preferences.
ChromeSwitchPreference uses setWidgetLayoutResource() to show a Material switch, but on BLU Life Play devices, this has no effect and the default switch is shown instead. As a result ChromeSwitchPreference.onBindView() couldn't find the Material switch and was crashing with a NPE. This fixes the crash by adding a null check, though these devices will still show a non-material switch. BUG=451447 R=dtrainor@chromium.org Review URL: https://codereview.chromium.org/894873004 Cr-Commit-Position: refs/heads/master@{#314250}
Showing
Please register or sign in to comment