Merge "Support tapping outside container from above IME if visible." into main

This commit is contained in:
Brian Isganitis
2023-09-14 15:25:05 +00:00
committed by Android (Google) Code Review
3 changed files with 20 additions and 1 deletions

View File

@@ -32,6 +32,7 @@ import android.os.Bundle;
import android.view.WindowInsets;
import androidx.annotation.Nullable;
import androidx.core.view.WindowInsetsCompat;
import com.android.launcher3.CellLayout;
import com.android.launcher3.DeviceProfile;
@@ -142,6 +143,14 @@ public class TestInformationHandler implements ResourceBasedOverride {
}, this::getCurrentActivity);
}
case TestProtocol.REQUEST_IME_INSETS: {
return getUIProperty(Bundle::putParcelable, activity -> {
WindowInsetsCompat insets = WindowInsetsCompat.toWindowInsetsCompat(
activity.getWindow().getDecorView().getRootWindowInsets());
return insets.getInsets(WindowInsetsCompat.Type.ime()).toPlatformInsets();
}, this::getCurrentActivity);
}
case TestProtocol.REQUEST_ICON_HEIGHT: {
response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD,
mDeviceProfile.allAppsCellHeightPx);