Use correct APIs to detect conditions for round scrollbars.
Bug: 34876394 Test: Performed manually. Change-Id: I9e690e99fd8d925c589ebd19d9c6754eeb63b1d8
This commit is contained in:
@@ -23910,7 +23910,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
* Determine if this view is rendered on a round wearable device and is the main view
|
||||
* on the screen.
|
||||
*/
|
||||
private boolean shouldDrawRoundScrollbar() {
|
||||
boolean shouldDrawRoundScrollbar() {
|
||||
if (!mResources.getConfiguration().isScreenRound() || mAttachInfo == null) {
|
||||
return false;
|
||||
}
|
||||
@@ -23927,7 +23927,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
return false;
|
||||
}
|
||||
|
||||
getLocationOnScreen(mAttachInfo.mTmpLocation);
|
||||
getLocationInWindow(mAttachInfo.mTmpLocation);
|
||||
return mAttachInfo.mTmpLocation[0] == insets.getStableInsetLeft()
|
||||
&& mAttachInfo.mTmpLocation[1] == insets.getStableInsetTop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user