Merge "Merge "Delete config_killableInputMethods setting" into tm-dev am: 71188e553d am: 3134e4cdea" into tm-d1-dev-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
49a967c810
@@ -2963,9 +2963,6 @@
|
|||||||
<item>com.android.inputmethod.latin</item>
|
<item>com.android.inputmethod.latin</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<!-- Make the IME killable by the lowmemorykiller by raising its oom_score_adj. -->
|
|
||||||
<bool name="config_killableInputMethods">false</bool>
|
|
||||||
|
|
||||||
<!-- Prevent the InputMethodManagerService from starting up the IME unless
|
<!-- Prevent the InputMethodManagerService from starting up the IME unless
|
||||||
the currently focused view is a text editor. -->
|
the currently focused view is a text editor. -->
|
||||||
<bool name="config_preventImeStartupUnlessTextEditor">false</bool>
|
<bool name="config_preventImeStartupUnlessTextEditor">false</bool>
|
||||||
|
|||||||
@@ -2254,7 +2254,6 @@
|
|||||||
<java-symbol type="bool" name="config_supportTelephonyTimeZoneFallback" />
|
<java-symbol type="bool" name="config_supportTelephonyTimeZoneFallback" />
|
||||||
<java-symbol type="bool" name="config_autoResetAirplaneMode" />
|
<java-symbol type="bool" name="config_autoResetAirplaneMode" />
|
||||||
<java-symbol type="string" name="config_notificationAccessConfirmationActivity" />
|
<java-symbol type="string" name="config_notificationAccessConfirmationActivity" />
|
||||||
<java-symbol type="bool" name="config_killableInputMethods" />
|
|
||||||
<java-symbol type="bool" name="config_preventImeStartupUnlessTextEditor" />
|
<java-symbol type="bool" name="config_preventImeStartupUnlessTextEditor" />
|
||||||
<java-symbol type="array" name="config_nonPreemptibleInputMethods" />
|
<java-symbol type="array" name="config_nonPreemptibleInputMethods" />
|
||||||
<java-symbol type="bool" name="config_enhancedConfirmationModeEnabled" />
|
<java-symbol type="bool" name="config_enhancedConfirmationModeEnabled" />
|
||||||
|
|||||||
@@ -90,13 +90,6 @@ final class InputMethodBindingController {
|
|||||||
| Context.BIND_NOT_VISIBLE
|
| Context.BIND_NOT_VISIBLE
|
||||||
| Context.BIND_NOT_FOREGROUND
|
| Context.BIND_NOT_FOREGROUND
|
||||||
| Context.BIND_IMPORTANT_BACKGROUND;
|
| Context.BIND_IMPORTANT_BACKGROUND;
|
||||||
/**
|
|
||||||
* Binding flags for establishing connection to the {@link InputMethodService} when
|
|
||||||
* config_killableInputMethods is enabled.
|
|
||||||
*/
|
|
||||||
private static final int IME_CONNECTION_LOW_PRIORITY_BIND_FLAGS =
|
|
||||||
Context.BIND_AUTO_CREATE
|
|
||||||
| Context.BIND_REDUCTION_FLAGS;
|
|
||||||
/**
|
/**
|
||||||
* Binding flags used only while the {@link InputMethodService} is showing window.
|
* Binding flags used only while the {@link InputMethodService} is showing window.
|
||||||
*/
|
*/
|
||||||
@@ -108,16 +101,6 @@ final class InputMethodBindingController {
|
|||||||
| Context.BIND_SHOWING_UI
|
| Context.BIND_SHOWING_UI
|
||||||
| Context.BIND_SCHEDULE_LIKE_TOP_APP;
|
| Context.BIND_SCHEDULE_LIKE_TOP_APP;
|
||||||
|
|
||||||
/**
|
|
||||||
* Binding flags for establishing connection to the {@link InputMethodService}.
|
|
||||||
*
|
|
||||||
* <p>
|
|
||||||
* This defaults to {@link InputMethodBindingController#IME_CONNECTION_BIND_FLAGS} unless
|
|
||||||
* config_killableInputMethods is enabled, in which case this takes the value of
|
|
||||||
* {@link InputMethodBindingController#IME_CONNECTION_LOW_PRIORITY_BIND_FLAGS}.
|
|
||||||
*/
|
|
||||||
private final int mImeConnectionBindFlags;
|
|
||||||
|
|
||||||
InputMethodBindingController(@NonNull InputMethodManagerService service) {
|
InputMethodBindingController(@NonNull InputMethodManagerService service) {
|
||||||
mService = service;
|
mService = service;
|
||||||
mContext = mService.mContext;
|
mContext = mService.mContext;
|
||||||
@@ -127,17 +110,6 @@ final class InputMethodBindingController {
|
|||||||
mIWindowManager = mService.mIWindowManager;
|
mIWindowManager = mService.mIWindowManager;
|
||||||
mWindowManagerInternal = mService.mWindowManagerInternal;
|
mWindowManagerInternal = mService.mWindowManagerInternal;
|
||||||
mRes = mService.mRes;
|
mRes = mService.mRes;
|
||||||
|
|
||||||
// If configured, use low priority flags to make the IME killable by the lowmemorykiller
|
|
||||||
final boolean lowerIMEPriority = mRes.getBoolean(
|
|
||||||
com.android.internal.R.bool.config_killableInputMethods);
|
|
||||||
|
|
||||||
if (lowerIMEPriority) {
|
|
||||||
mImeConnectionBindFlags =
|
|
||||||
InputMethodBindingController.IME_CONNECTION_LOW_PRIORITY_BIND_FLAGS;
|
|
||||||
} else {
|
|
||||||
mImeConnectionBindFlags = InputMethodBindingController.IME_CONNECTION_BIND_FLAGS;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -500,8 +472,7 @@ final class InputMethodBindingController {
|
|||||||
|
|
||||||
@GuardedBy("ImfLock.class")
|
@GuardedBy("ImfLock.class")
|
||||||
private boolean bindCurrentInputMethodServiceMainConnection() {
|
private boolean bindCurrentInputMethodServiceMainConnection() {
|
||||||
mHasConnection = bindCurrentInputMethodService(mMainConnection,
|
mHasConnection = bindCurrentInputMethodService(mMainConnection, IME_CONNECTION_BIND_FLAGS);
|
||||||
mImeConnectionBindFlags);
|
|
||||||
return mHasConnection;
|
return mHasConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user