Loading core/java/android/view/autofill/AutofillManagerInternal.java 0 → 100644 +29 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.view.autofill; /** * Autofill Manager local system service interface. * * @hide Only for use within the system server. */ public abstract class AutofillManagerInternal { /** * Notifies the manager that the back key was pressed. */ public abstract void onBackKeyPressed(); } services/autofill/java/com/android/server/autofill/AutofillManagerService.java +12 −1 Original line number Diff line number Diff line Loading @@ -19,10 +19,10 @@ package com.android.server.autofill; import static android.Manifest.permission.MANAGE_AUTO_FILL; import static android.content.Context.AUTOFILL_MANAGER_SERVICE; import static com.android.server.autofill.Helper.bundleToString; import static com.android.server.autofill.Helper.sDebug; import static com.android.server.autofill.Helper.sPartitionMaxCount; import static com.android.server.autofill.Helper.sVerbose; import static com.android.server.autofill.Helper.bundleToString; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -58,6 +58,7 @@ import android.util.SparseArray; import android.util.SparseBooleanArray; import android.view.autofill.AutofillId; import android.view.autofill.AutofillManager; import android.view.autofill.AutofillManagerInternal; import android.view.autofill.AutofillValue; import android.view.autofill.IAutoFillManager; import android.view.autofill.IAutoFillManagerClient; Loading Loading @@ -251,6 +252,7 @@ public final class AutofillManagerService extends SystemService { @Override public void onStart() { publishBinderService(AUTOFILL_MANAGER_SERVICE, new AutoFillManagerServiceStub()); publishLocalService(AutofillManagerInternal.class, new LocalService()); } @Override Loading Loading @@ -463,6 +465,15 @@ public final class AutofillManagerService extends SystemService { } } private final class LocalService extends AutofillManagerInternal { @Override public void onBackKeyPressed() { if (sDebug) Slog.d(TAG, "onBackKeyPressed()"); mUi.hideAll(null); } } final class AutoFillManagerServiceStub extends IAutoFillManager.Stub { @Override public int addClient(IAutoFillManagerClient client, int userId) { Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -221,6 +221,7 @@ import android.view.accessibility.AccessibilityManager; import android.view.animation.Animation; import android.view.animation.AnimationSet; import android.view.animation.AnimationUtils; import android.view.autofill.AutofillManagerInternal; import android.view.inputmethod.InputMethodManagerInternal; import com.android.internal.R; Loading Loading @@ -407,6 +408,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { WindowManagerInternal mWindowManagerInternal; PowerManager mPowerManager; ActivityManagerInternal mActivityManagerInternal; AutofillManagerInternal mAutofillManagerInternal; InputManagerInternal mInputManagerInternal; InputMethodManagerInternal mInputMethodManagerInternal; DreamManagerInternal mDreamManagerInternal; Loading Loading @@ -819,6 +821,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { private static final int MSG_ACCESSIBILITY_SHORTCUT = 21; private static final int MSG_BUGREPORT_TV = 22; private static final int MSG_ACCESSIBILITY_TV = 23; private static final int MSG_DISPATCH_BACK_KEY_TO_AUTOFILL = 24; private static final int MSG_REQUEST_TRANSIENT_BARS_ARG_STATUS = 0; private static final int MSG_REQUEST_TRANSIENT_BARS_ARG_NAVIGATION = 1; Loading Loading @@ -905,6 +908,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { accessibilityShortcutActivated(); } break; case MSG_DISPATCH_BACK_KEY_TO_AUTOFILL: mAutofillManagerInternal.onBackKeyPressed(); break; } } } Loading Loading @@ -1212,6 +1218,10 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } if (mAutofillManagerInternal != null && event.getKeyCode() == KeyEvent.KEYCODE_BACK) { mHandler.sendMessage(mHandler.obtainMessage(MSG_DISPATCH_BACK_KEY_TO_AUTOFILL)); } return handled; } Loading Loading @@ -7229,6 +7239,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { mSystemGestures.systemReady(); mImmersiveModeConfirmation.systemReady(); mAutofillManagerInternal = LocalServices.getService(AutofillManagerInternal.class); } /** {@inheritDoc} */ Loading Loading
core/java/android/view/autofill/AutofillManagerInternal.java 0 → 100644 +29 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.view.autofill; /** * Autofill Manager local system service interface. * * @hide Only for use within the system server. */ public abstract class AutofillManagerInternal { /** * Notifies the manager that the back key was pressed. */ public abstract void onBackKeyPressed(); }
services/autofill/java/com/android/server/autofill/AutofillManagerService.java +12 −1 Original line number Diff line number Diff line Loading @@ -19,10 +19,10 @@ package com.android.server.autofill; import static android.Manifest.permission.MANAGE_AUTO_FILL; import static android.content.Context.AUTOFILL_MANAGER_SERVICE; import static com.android.server.autofill.Helper.bundleToString; import static com.android.server.autofill.Helper.sDebug; import static com.android.server.autofill.Helper.sPartitionMaxCount; import static com.android.server.autofill.Helper.sVerbose; import static com.android.server.autofill.Helper.bundleToString; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -58,6 +58,7 @@ import android.util.SparseArray; import android.util.SparseBooleanArray; import android.view.autofill.AutofillId; import android.view.autofill.AutofillManager; import android.view.autofill.AutofillManagerInternal; import android.view.autofill.AutofillValue; import android.view.autofill.IAutoFillManager; import android.view.autofill.IAutoFillManagerClient; Loading Loading @@ -251,6 +252,7 @@ public final class AutofillManagerService extends SystemService { @Override public void onStart() { publishBinderService(AUTOFILL_MANAGER_SERVICE, new AutoFillManagerServiceStub()); publishLocalService(AutofillManagerInternal.class, new LocalService()); } @Override Loading Loading @@ -463,6 +465,15 @@ public final class AutofillManagerService extends SystemService { } } private final class LocalService extends AutofillManagerInternal { @Override public void onBackKeyPressed() { if (sDebug) Slog.d(TAG, "onBackKeyPressed()"); mUi.hideAll(null); } } final class AutoFillManagerServiceStub extends IAutoFillManager.Stub { @Override public int addClient(IAutoFillManagerClient client, int userId) { Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -221,6 +221,7 @@ import android.view.accessibility.AccessibilityManager; import android.view.animation.Animation; import android.view.animation.AnimationSet; import android.view.animation.AnimationUtils; import android.view.autofill.AutofillManagerInternal; import android.view.inputmethod.InputMethodManagerInternal; import com.android.internal.R; Loading Loading @@ -407,6 +408,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { WindowManagerInternal mWindowManagerInternal; PowerManager mPowerManager; ActivityManagerInternal mActivityManagerInternal; AutofillManagerInternal mAutofillManagerInternal; InputManagerInternal mInputManagerInternal; InputMethodManagerInternal mInputMethodManagerInternal; DreamManagerInternal mDreamManagerInternal; Loading Loading @@ -819,6 +821,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { private static final int MSG_ACCESSIBILITY_SHORTCUT = 21; private static final int MSG_BUGREPORT_TV = 22; private static final int MSG_ACCESSIBILITY_TV = 23; private static final int MSG_DISPATCH_BACK_KEY_TO_AUTOFILL = 24; private static final int MSG_REQUEST_TRANSIENT_BARS_ARG_STATUS = 0; private static final int MSG_REQUEST_TRANSIENT_BARS_ARG_NAVIGATION = 1; Loading Loading @@ -905,6 +908,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { accessibilityShortcutActivated(); } break; case MSG_DISPATCH_BACK_KEY_TO_AUTOFILL: mAutofillManagerInternal.onBackKeyPressed(); break; } } } Loading Loading @@ -1212,6 +1218,10 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } if (mAutofillManagerInternal != null && event.getKeyCode() == KeyEvent.KEYCODE_BACK) { mHandler.sendMessage(mHandler.obtainMessage(MSG_DISPATCH_BACK_KEY_TO_AUTOFILL)); } return handled; } Loading Loading @@ -7229,6 +7239,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { mSystemGestures.systemReady(); mImmersiveModeConfirmation.systemReady(); mAutofillManagerInternal = LocalServices.getService(AutofillManagerInternal.class); } /** {@inheritDoc} */ Loading