Loading core/java/android/hardware/input/InputDeviceIdentifier.java +6 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,12 @@ public final class InputDeviceIdentifier implements Parcelable { return Objects.hash(mDescriptor, mVendorId, mProductId); } @Override public String toString() { return "InputDeviceIdentifier: vendorId: " + mVendorId + ", productId: " + mProductId + ", descriptor: " + mDescriptor; } public static final @android.annotation.NonNull Parcelable.Creator<InputDeviceIdentifier> CREATOR = new Parcelable.Creator<InputDeviceIdentifier>() { Loading core/java/android/hardware/input/InputManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,8 @@ import java.util.List; @SystemService(Context.INPUT_SERVICE) public final class InputManager { private static final String TAG = "InputManager"; private static final boolean DEBUG = false; // To enable these logs, run: 'adb shell setprop log.tag.InputManager DEBUG' (requires restart) private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); private static final int MSG_DEVICE_ADDED = 1; private static final int MSG_DEVICE_REMOVED = 2; Loading core/java/android/hardware/input/KeyboardLayout.java +7 −6 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ import android.os.LocaleList; import android.os.Parcel; import android.os.Parcelable; import java.util.Locale; /** * Describes a keyboard layout. * Loading Loading @@ -157,9 +155,12 @@ public final class KeyboardLayout implements Parcelable, @Override public String toString() { if (mCollection.isEmpty()) { return mLabel; } return mLabel + " - " + mCollection; String collectionString = mCollection.isEmpty() ? "" : " - " + mCollection; return "KeyboardLayout " + mLabel + collectionString + ", descriptor: " + mDescriptor + ", priority: " + mPriority + ", locales: " + mLocales.toString() + ", vendorId: " + mVendorId + ", productId: " + mProductId; } } services/core/java/com/android/server/input/InputManagerService.java +11 −4 Original line number Diff line number Diff line Loading @@ -151,7 +151,8 @@ import java.util.OptionalInt; public class InputManagerService extends IInputManager.Stub implements Watchdog.Monitor { static final String TAG = "InputManager"; static final boolean DEBUG = false; // To enable these logs, run: 'adb shell setprop log.tag.InputManager DEBUG' (requires restart) private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); private static final String EXCLUDED_DEVICES_PATH = "etc/excluded-input-devices.xml"; private static final String PORT_ASSOCIATIONS_PATH = "etc/input-port-associations.xml"; Loading Loading @@ -1016,6 +1017,10 @@ public class InputManagerService extends IInputManager.Stub final InputDevice inputDevice = mInputDevices[i]; deviceIdAndGeneration[i * 2] = inputDevice.getId(); deviceIdAndGeneration[i * 2 + 1] = inputDevice.getGeneration(); if (DEBUG) { Log.d(TAG, "device " + inputDevice.getId() + " generation " + inputDevice.getGeneration()); } if (!inputDevice.isVirtual() && inputDevice.isFullKeyboard()) { if (!containsInputDeviceWithDescriptor(oldInputDevices, Loading Loading @@ -1539,8 +1544,8 @@ public class InputManagerService extends IInputManager.Stub layout = mDataStore.getCurrentKeyboardLayout(identifier.getDescriptor()); } if (DEBUG) { Slog.d(TAG, "Loaded keyboard layout id for " + key + " and got " + layout); Slog.d(TAG, "getCurrentKeyboardLayoutForInputDevice() " + identifier.toString() + ": " + layout); } return layout; } Loading @@ -1562,7 +1567,9 @@ public class InputManagerService extends IInputManager.Stub try { if (mDataStore.setCurrentKeyboardLayout(key, keyboardLayoutDescriptor)) { if (DEBUG) { Slog.d(TAG, "Saved keyboard layout using " + key); Slog.d(TAG, "setCurrentKeyboardLayoutForInputDevice() " + identifier + " key: " + key + " keyboardLayoutDescriptor: " + keyboardLayoutDescriptor); } mHandler.sendEmptyMessage(MSG_RELOAD_KEYBOARD_LAYOUTS); } Loading Loading
core/java/android/hardware/input/InputDeviceIdentifier.java +6 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,12 @@ public final class InputDeviceIdentifier implements Parcelable { return Objects.hash(mDescriptor, mVendorId, mProductId); } @Override public String toString() { return "InputDeviceIdentifier: vendorId: " + mVendorId + ", productId: " + mProductId + ", descriptor: " + mDescriptor; } public static final @android.annotation.NonNull Parcelable.Creator<InputDeviceIdentifier> CREATOR = new Parcelable.Creator<InputDeviceIdentifier>() { Loading
core/java/android/hardware/input/InputManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,8 @@ import java.util.List; @SystemService(Context.INPUT_SERVICE) public final class InputManager { private static final String TAG = "InputManager"; private static final boolean DEBUG = false; // To enable these logs, run: 'adb shell setprop log.tag.InputManager DEBUG' (requires restart) private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); private static final int MSG_DEVICE_ADDED = 1; private static final int MSG_DEVICE_REMOVED = 2; Loading
core/java/android/hardware/input/KeyboardLayout.java +7 −6 Original line number Diff line number Diff line Loading @@ -21,8 +21,6 @@ import android.os.LocaleList; import android.os.Parcel; import android.os.Parcelable; import java.util.Locale; /** * Describes a keyboard layout. * Loading Loading @@ -157,9 +155,12 @@ public final class KeyboardLayout implements Parcelable, @Override public String toString() { if (mCollection.isEmpty()) { return mLabel; } return mLabel + " - " + mCollection; String collectionString = mCollection.isEmpty() ? "" : " - " + mCollection; return "KeyboardLayout " + mLabel + collectionString + ", descriptor: " + mDescriptor + ", priority: " + mPriority + ", locales: " + mLocales.toString() + ", vendorId: " + mVendorId + ", productId: " + mProductId; } }
services/core/java/com/android/server/input/InputManagerService.java +11 −4 Original line number Diff line number Diff line Loading @@ -151,7 +151,8 @@ import java.util.OptionalInt; public class InputManagerService extends IInputManager.Stub implements Watchdog.Monitor { static final String TAG = "InputManager"; static final boolean DEBUG = false; // To enable these logs, run: 'adb shell setprop log.tag.InputManager DEBUG' (requires restart) private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG); private static final String EXCLUDED_DEVICES_PATH = "etc/excluded-input-devices.xml"; private static final String PORT_ASSOCIATIONS_PATH = "etc/input-port-associations.xml"; Loading Loading @@ -1016,6 +1017,10 @@ public class InputManagerService extends IInputManager.Stub final InputDevice inputDevice = mInputDevices[i]; deviceIdAndGeneration[i * 2] = inputDevice.getId(); deviceIdAndGeneration[i * 2 + 1] = inputDevice.getGeneration(); if (DEBUG) { Log.d(TAG, "device " + inputDevice.getId() + " generation " + inputDevice.getGeneration()); } if (!inputDevice.isVirtual() && inputDevice.isFullKeyboard()) { if (!containsInputDeviceWithDescriptor(oldInputDevices, Loading Loading @@ -1539,8 +1544,8 @@ public class InputManagerService extends IInputManager.Stub layout = mDataStore.getCurrentKeyboardLayout(identifier.getDescriptor()); } if (DEBUG) { Slog.d(TAG, "Loaded keyboard layout id for " + key + " and got " + layout); Slog.d(TAG, "getCurrentKeyboardLayoutForInputDevice() " + identifier.toString() + ": " + layout); } return layout; } Loading @@ -1562,7 +1567,9 @@ public class InputManagerService extends IInputManager.Stub try { if (mDataStore.setCurrentKeyboardLayout(key, keyboardLayoutDescriptor)) { if (DEBUG) { Slog.d(TAG, "Saved keyboard layout using " + key); Slog.d(TAG, "setCurrentKeyboardLayoutForInputDevice() " + identifier + " key: " + key + " keyboardLayoutDescriptor: " + keyboardLayoutDescriptor); } mHandler.sendEmptyMessage(MSG_RELOAD_KEYBOARD_LAYOUTS); } Loading