Provide internal IME insets

Bug: 197727397
Test: Collapse taskbar, open IME
Change-Id: Ia251be1d5892a58b062f241bdafc5dbfc223e4c3
This commit is contained in:
Winson Chung
2021-09-01 17:28:13 -07:00
parent cb776ca518
commit 543c226ffa
2 changed files with 6 additions and 1 deletions

View File

@@ -27,6 +27,7 @@ import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.pm.LauncherApps;
import android.graphics.Insets;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.os.Process;
@@ -163,6 +164,10 @@ public class TaskbarActivityContext extends ContextThemeWrapper implements Activ
mWindowLayoutParams,
new int[] { ITYPE_EXTRA_NAVIGATION_BAR, ITYPE_BOTTOM_TAPPABLE_ELEMENT }
);
// Adjust the frame by the rounded corners (ie. leaving just the bar as the inset) when
// the IME is showing
mWindowLayoutParams.providedInternalImeInsets = Insets.of(0,
getDefaultTaskbarWindowHeight() - mDeviceProfile.taskbarSize, 0, 0);
// Initialize controllers after all are constructed.
mControllers.init();