Merge "Enable IME on Keyguard Password security challenge" into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
965b250bc1
@@ -205,6 +205,9 @@ public class CarKeyguardViewController extends OverlayViewController implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCancelClicked() {
|
public void onCancelClicked() {
|
||||||
|
getOverlayViewGlobalStateController().setWindowFocusable(/* focusable= */ false);
|
||||||
|
getOverlayViewGlobalStateController().setWindowNeedsInput(/* needsInput= */ false);
|
||||||
|
|
||||||
mBouncer.hide(/* destroyView= */ true);
|
mBouncer.hide(/* destroyView= */ true);
|
||||||
mKeyguardCancelClickedListener.onCancelClicked();
|
mKeyguardCancelClickedListener.onCancelClicked();
|
||||||
}
|
}
|
||||||
@@ -226,7 +229,8 @@ public class CarKeyguardViewController extends OverlayViewController implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setNeedsInput(boolean needsInput) {
|
public void setNeedsInput(boolean needsInput) {
|
||||||
getLayout().setFocusable(needsInput);
|
getOverlayViewGlobalStateController().setWindowFocusable(needsInput);
|
||||||
|
getOverlayViewGlobalStateController().setWindowNeedsInput(needsInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -123,6 +123,12 @@ public class OverlayViewGlobalStateController {
|
|||||||
mSystemUIOverlayWindowController.setWindowFocusable(focusable);
|
mSystemUIOverlayWindowController.setWindowFocusable(focusable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Sets the {@link android.view.WindowManager.LayoutParams#FLAG_ALT_FOCUSABLE_IM} flag of the
|
||||||
|
* sysui overlay window */
|
||||||
|
public void setWindowNeedsInput(boolean needsInput) {
|
||||||
|
mSystemUIOverlayWindowController.setWindowNeedsInput(needsInput);
|
||||||
|
}
|
||||||
|
|
||||||
/** Returns {@code true} if the window is focusable. */
|
/** Returns {@code true} if the window is focusable. */
|
||||||
public boolean isWindowFocusable() {
|
public boolean isWindowFocusable() {
|
||||||
return mSystemUIOverlayWindowController.isWindowFocusable();
|
return mSystemUIOverlayWindowController.isWindowFocusable();
|
||||||
|
|||||||
@@ -132,6 +132,16 @@ public class SystemUIOverlayWindowController implements
|
|||||||
updateWindow();
|
updateWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Sets the window to enable IME. */
|
||||||
|
public void setWindowNeedsInput(boolean needsInput) {
|
||||||
|
if (needsInput) {
|
||||||
|
mLpChanged.flags &= ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
|
||||||
|
} else {
|
||||||
|
mLpChanged.flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
|
||||||
|
}
|
||||||
|
updateWindow();
|
||||||
|
}
|
||||||
|
|
||||||
/** Returns {@code true} if the window is visible */
|
/** Returns {@code true} if the window is visible */
|
||||||
public boolean isWindowVisible() {
|
public boolean isWindowVisible() {
|
||||||
return mVisible;
|
return mVisible;
|
||||||
|
|||||||
Reference in New Issue
Block a user