Disable window corner rounding on some devices
Bug: 122347746 Test: visual; on taimen, marlin and walleye Change-Id: If6ac1c75297dd25ad40d3ec61537e8793bceceb7
This commit is contained in:
1 parent
792fcc3aec
commit
a2074857dc
5 files changed
+41
-8
No files matched your search
@@ -66,6 +66,7 @@ public class RecentsModel extends TaskStackChangeListener {
|
||||
private final TaskThumbnailCache mThumbnailCache;
|
||||
|
||||
private float mWindowCornerRadius = -1;
|
||||
private Boolean mSupportsRoundedCornersOnWindows;
|
||||
|
||||
private RecentsModel(Context context) {
|
||||
mContext = context;
|
||||
@@ -199,6 +200,26 @@ public class RecentsModel extends TaskStackChangeListener {
|
||||
return mWindowCornerRadius;
|
||||
}
|
||||
|
||||
public boolean supportsRoundedCornersOnWindows() {
|
||||
if (mSupportsRoundedCornersOnWindows == null) {
|
||||
if (mSystemUiProxy != null) {
|
||||
try {
|
||||
mSupportsRoundedCornersOnWindows =
|
||||
mSystemUiProxy.supportsRoundedCornersOnWindows();
|
||||
} catch (RemoteException e) {
|
||||
Log.w(TAG, "Connection to ISystemUIProxy was lost, ignoring window corner "
|
||||
+ "radius");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
Log.w(TAG, "ISystemUIProxy is null, ignoring window corner radius");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return mSupportsRoundedCornersOnWindows;
|
||||
}
|
||||
|
||||
public void onTrimMemory(int level) {
|
||||
if (level == ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN) {
|
||||
mThumbnailCache.getHighResLoadingState().setVisible(false);
|
||||
|
||||
Reference in new issue
Block a user