Protect against crash on user switch
Somehow one of the tiles doesn't have a view yet. Assume that this is a transient part of the tiles getting recreated and that the skipped tile will get picked up in the next layout. Change-Id: Ia1370d66119bfcfa7b00bd087bcb0d72a072666a Fixes: 31394359
This commit is contained in:
@@ -160,6 +160,10 @@ public class QSAnimator implements Callback, PageListener, Listener, OnLayoutCha
|
||||
|
||||
for (QSTile<?> tile : tiles) {
|
||||
QSTileBaseView tileView = mQsPanel.getTileView(tile);
|
||||
if (tileView == null) {
|
||||
Log.e(TAG, "tileView is null " + tile.getTileSpec());
|
||||
continue;
|
||||
}
|
||||
final TextView label = ((QSTileView) tileView).getLabel();
|
||||
final View tileIcon = tileView.getIcon().getIconView();
|
||||
if (count < mNumQuickTiles && mAllowFancy) {
|
||||
|
||||
Reference in New Issue
Block a user