Merge "Fix null pointer exception when updating action bar shadow." into oc-mr1-dev am: 51fb9ad956
am: 7cdb94384f
Change-Id: Iae7f415054b1848a4c33d89e176f38fb942ded03
This commit is contained in:
@@ -121,7 +121,7 @@ public class ActionBarShadowController implements LifecycleObserver, OnStart, On
|
||||
final boolean shouldShowShadow = view.canScrollVertically(-1);
|
||||
if (mAnchorView != null) {
|
||||
mAnchorView.setElevation(shouldShowShadow ? ELEVATION_HIGH : ELEVATION_LOW);
|
||||
} else {
|
||||
} else if (mActivity != null) { // activity can become null when running monkey
|
||||
final ActionBar actionBar = mActivity.getActionBar();
|
||||
if (actionBar != null) {
|
||||
actionBar.setElevation(shouldShowShadow ? ELEVATION_HIGH : ELEVATION_LOW);
|
||||
|
||||
Reference in New Issue
Block a user