Loading Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -311,6 +311,7 @@ LOCAL_SRC_FILES += \ core/java/com/android/internal/policy/IKeyguardExitCallback.aidl \ core/java/com/android/internal/policy/IKeyguardService.aidl \ core/java/com/android/internal/policy/IKeyguardStateCallback.aidl \ core/java/com/android/internal/policy/IShortcutService.aidl \ core/java/com/android/internal/os/IDropBoxManagerService.aidl \ core/java/com/android/internal/os/IParcelFileDescriptorFactory.aidl \ core/java/com/android/internal/os/IResultReceiver.aidl \ Loading core/java/android/view/IWindowManager.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import com.android.internal.app.IAssistScreenshotReceiver; import com.android.internal.os.IResultReceiver; import com.android.internal.view.IInputContext; import com.android.internal.view.IInputMethodClient; import com.android.internal.policy.IShortcutService; import android.content.res.CompatibilityInfo; import android.content.res.Configuration; Loading Loading @@ -387,4 +388,11 @@ interface IWindowManager * Retrieves the current stable insets from the primary display. */ void getStableInsets(out Rect outInsets); /** * Register shortcut key. Shortcut code is packed as: * (MetaState << Integer.SIZE) | KeyCode * @hide */ void registerShortcutKey(in long shortcutCode, IShortcutService keySubscriber); } core/java/android/view/WindowManagerPolicy.java +10 −0 Original line number Diff line number Diff line Loading @@ -29,7 +29,9 @@ import android.graphics.RectF; import android.os.Bundle; import android.os.IBinder; import android.os.Looper; import android.os.RemoteException; import android.view.animation.Animation; import com.android.internal.policy.IShortcutService; import java.io.PrintWriter; import java.lang.annotation.Retention; Loading Loading @@ -120,6 +122,14 @@ public interface WindowManagerPolicy { */ public final static int ACTION_PASS_TO_USER = 0x00000001; /** * Register shortcuts for window manager to dispatch. * Shortcut code is packed as (metaState << Integer.SIZE) | keyCode * @hide */ void registerShortcutKey(long shortcutCode, IShortcutService shortcutKeyReceiver) throws RemoteException; /** * Interface to the Window Manager state associated with a particular * window. You can hold on to an instance of this interface from the call Loading core/java/com/android/internal/policy/IShortcutService.aidl 0 → 100644 +29 −0 Original line number Diff line number Diff line /* * Copyright (C) 2016 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 com.android.internal.policy; /** * An interface to notify the shortcut service that a shortcut key is pressed * @hide */ oneway interface IShortcutService { /** * @param shortcutCode the keycode packed with meta information */ void notifyShortcutKeyPressed(long shortcutCode); } packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +5 −2 Original line number Diff line number Diff line Loading @@ -54,7 +54,8 @@ public class SystemUIApplication extends Application { com.android.systemui.power.PowerUI.class, com.android.systemui.media.RingtonePlayer.class, com.android.systemui.keyboard.KeyboardUI.class, com.android.systemui.tv.pip.PipUI.class com.android.systemui.tv.pip.PipUI.class, com.android.systemui.shortcut.ShortcutKeyDispatcher.class }; /** Loading Loading @@ -143,12 +144,14 @@ public class SystemUIApplication extends Application { Class<?> cl = services[i]; if (DEBUG) Log.d(TAG, "loading: " + cl); try { mServices[i] = (SystemUI) cl.newInstance(); Object newService = SystemUIFactory.getInstance().createInstance(cl); mServices[i] = (SystemUI) ((newService == null) ? cl.newInstance() : newService); } catch (IllegalAccessException ex) { throw new RuntimeException(ex); } catch (InstantiationException ex) { throw new RuntimeException(ex); } mServices[i].mContext = this; mServices[i].mComponents = mComponents; if (DEBUG) Log.d(TAG, "running: " + mServices[i]); Loading Loading
Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -311,6 +311,7 @@ LOCAL_SRC_FILES += \ core/java/com/android/internal/policy/IKeyguardExitCallback.aidl \ core/java/com/android/internal/policy/IKeyguardService.aidl \ core/java/com/android/internal/policy/IKeyguardStateCallback.aidl \ core/java/com/android/internal/policy/IShortcutService.aidl \ core/java/com/android/internal/os/IDropBoxManagerService.aidl \ core/java/com/android/internal/os/IParcelFileDescriptorFactory.aidl \ core/java/com/android/internal/os/IResultReceiver.aidl \ Loading
core/java/android/view/IWindowManager.aidl +8 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import com.android.internal.app.IAssistScreenshotReceiver; import com.android.internal.os.IResultReceiver; import com.android.internal.view.IInputContext; import com.android.internal.view.IInputMethodClient; import com.android.internal.policy.IShortcutService; import android.content.res.CompatibilityInfo; import android.content.res.Configuration; Loading Loading @@ -387,4 +388,11 @@ interface IWindowManager * Retrieves the current stable insets from the primary display. */ void getStableInsets(out Rect outInsets); /** * Register shortcut key. Shortcut code is packed as: * (MetaState << Integer.SIZE) | KeyCode * @hide */ void registerShortcutKey(in long shortcutCode, IShortcutService keySubscriber); }
core/java/android/view/WindowManagerPolicy.java +10 −0 Original line number Diff line number Diff line Loading @@ -29,7 +29,9 @@ import android.graphics.RectF; import android.os.Bundle; import android.os.IBinder; import android.os.Looper; import android.os.RemoteException; import android.view.animation.Animation; import com.android.internal.policy.IShortcutService; import java.io.PrintWriter; import java.lang.annotation.Retention; Loading Loading @@ -120,6 +122,14 @@ public interface WindowManagerPolicy { */ public final static int ACTION_PASS_TO_USER = 0x00000001; /** * Register shortcuts for window manager to dispatch. * Shortcut code is packed as (metaState << Integer.SIZE) | keyCode * @hide */ void registerShortcutKey(long shortcutCode, IShortcutService shortcutKeyReceiver) throws RemoteException; /** * Interface to the Window Manager state associated with a particular * window. You can hold on to an instance of this interface from the call Loading
core/java/com/android/internal/policy/IShortcutService.aidl 0 → 100644 +29 −0 Original line number Diff line number Diff line /* * Copyright (C) 2016 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 com.android.internal.policy; /** * An interface to notify the shortcut service that a shortcut key is pressed * @hide */ oneway interface IShortcutService { /** * @param shortcutCode the keycode packed with meta information */ void notifyShortcutKeyPressed(long shortcutCode); }
packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +5 −2 Original line number Diff line number Diff line Loading @@ -54,7 +54,8 @@ public class SystemUIApplication extends Application { com.android.systemui.power.PowerUI.class, com.android.systemui.media.RingtonePlayer.class, com.android.systemui.keyboard.KeyboardUI.class, com.android.systemui.tv.pip.PipUI.class com.android.systemui.tv.pip.PipUI.class, com.android.systemui.shortcut.ShortcutKeyDispatcher.class }; /** Loading Loading @@ -143,12 +144,14 @@ public class SystemUIApplication extends Application { Class<?> cl = services[i]; if (DEBUG) Log.d(TAG, "loading: " + cl); try { mServices[i] = (SystemUI) cl.newInstance(); Object newService = SystemUIFactory.getInstance().createInstance(cl); mServices[i] = (SystemUI) ((newService == null) ? cl.newInstance() : newService); } catch (IllegalAccessException ex) { throw new RuntimeException(ex); } catch (InstantiationException ex) { throw new RuntimeException(ex); } mServices[i].mContext = this; mServices[i].mComponents = mComponents; if (DEBUG) Log.d(TAG, "running: " + mServices[i]); Loading