Update new API for checking the embedding status
Test: Make sure behavior is correct as it was in search flow, higlight flow, regular settings flow, split screen flow. Bug: 204399167 Change-Id: I7fc29c8cdbfc6682963591f4ff805070bea4ca22
This commit is contained in:
@@ -16,10 +16,7 @@
|
||||
|
||||
package com.android.settings.activityembedding;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityTaskManager;
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.FeatureFlagUtils;
|
||||
import android.util.Log;
|
||||
@@ -65,13 +62,4 @@ public class ActivityEmbeddingUtils {
|
||||
|
||||
return isFlagEnabled && isSplitSupported;
|
||||
}
|
||||
|
||||
/** Whether the screen meets two-pane resolution. */
|
||||
public static boolean isTwoPaneResolution(Activity activity) {
|
||||
final Rect currentTaskBounds =
|
||||
ActivityTaskManager.getInstance().getTaskBounds(activity.getTaskId());
|
||||
|
||||
return currentTaskBounds.width() >= getMinCurrentScreenSplitWidthPx(activity)
|
||||
&& currentTaskBounds.height() >= getMinSmallestScreenSplitWidthPx(activity);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user