diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/java/com/android/internal/os/DeviceKeyHandler.java | 26 | ||||
-rwxr-xr-x | core/res/res/values/config.xml | 6 | ||||
-rwxr-xr-x | core/res/res/values/symbols.xml | 4 |
3 files changed, 36 insertions, 0 deletions
diff --git a/core/java/com/android/internal/os/DeviceKeyHandler.java b/core/java/com/android/internal/os/DeviceKeyHandler.java new file mode 100644 index 0000000..e7d103d --- /dev/null +++ b/core/java/com/android/internal/os/DeviceKeyHandler.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2012 The CyanogenMod 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.os; + +import android.view.KeyEvent; + +public interface DeviceKeyHandler { + + /** + * Invoked when an unknown key was detected by the system, letting the device handle + * this special keys prior to pass the key to the active app. + * + * @param event The key event to be handled + * @return If the event is consume + */ + public boolean handleKeyEvent(KeyEvent event); +} diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml index e3e38c7..bc95f43 100755 --- a/core/res/res/values/config.xml +++ b/core/res/res/values/config.xml @@ -2091,6 +2091,12 @@ <bool name="config_networkSamplingWakesDevice">true</bool> + <!-- Path to the library that contains a device specific key handler --> + <string name="config_deviceKeyHandlerLib" translatable="false"></string> + + <!-- Name of that key handler class --> + <string name="config_deviceKeyHandlerClass" translatable="false"></string> + <string-array translatable="false" name="config_cdma_home_system" /> <!--From SmsMessage--> diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 138768e..0fe919d 100755 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -2037,6 +2037,10 @@ <java-symbol type="layout" name="year_label_text_view" /> <java-symbol type="layout" name="date_picker_material" /> + <!-- Config.xml entries --> + <java-symbol type="string" name="config_deviceKeyHandlerLib" /> + <java-symbol type="string" name="config_deviceKeyHandlerClass" /> + <java-symbol type="id" name="time_header" /> <java-symbol type="id" name="hours" /> <java-symbol type="id" name="minutes" /> |