Differential D10905 Diff 28488 src/org/kde/kdeconnect/Plugins/RemoteKeyboardPlugin/RemoteKeyboardService.java
Changeset View
Changeset View
Standalone View
Standalone View
src/org/kde/kdeconnect/Plugins/RemoteKeyboardPlugin/RemoteKeyboardService.java
Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Line(s) | 106 | // Log.d("RemoteKeyboardService", "onCreateInputView connected=" + RemoteKeyboardPlugin.isConnected()); | |||
---|---|---|---|---|---|
114 | 114 | | |||
115 | @Override | 115 | @Override | ||
116 | public void onStartInputView(EditorInfo attribute, boolean restarting) { | 116 | public void onStartInputView(EditorInfo attribute, boolean restarting) { | ||
117 | // Log.d("RemoteKeyboardService", "onStartInputView"); | 117 | // Log.d("RemoteKeyboardService", "onStartInputView"); | ||
118 | super.onStartInputView(attribute, restarting); | 118 | super.onStartInputView(attribute, restarting); | ||
119 | visible = true; | 119 | visible = true; | ||
120 | ArrayList<RemoteKeyboardPlugin> instances = RemoteKeyboardPlugin.acquireInstances(); | 120 | ArrayList<RemoteKeyboardPlugin> instances = RemoteKeyboardPlugin.acquireInstances(); | ||
121 | try { | 121 | try { | ||
122 | for (RemoteKeyboardPlugin i: instances) | 122 | for (RemoteKeyboardPlugin i : instances) | ||
123 | i.notifyKeyboardState(true); | 123 | i.notifyKeyboardState(true); | ||
124 | } finally { | 124 | } finally { | ||
125 | RemoteKeyboardPlugin.releaseInstances(); | 125 | RemoteKeyboardPlugin.releaseInstances(); | ||
126 | } | 126 | } | ||
127 | } | 127 | } | ||
128 | 128 | | |||
129 | @Override | 129 | @Override | ||
130 | public void onFinishInputView(boolean finishingInput) { | 130 | public void onFinishInputView(boolean finishingInput) { | ||
131 | // Log.d("RemoteKeyboardService", "onFinishInputView"); | 131 | // Log.d("RemoteKeyboardService", "onFinishInputView"); | ||
132 | super.onFinishInputView(finishingInput); | 132 | super.onFinishInputView(finishingInput); | ||
133 | visible = false; | 133 | visible = false; | ||
134 | ArrayList<RemoteKeyboardPlugin> instances = RemoteKeyboardPlugin.acquireInstances(); | 134 | ArrayList<RemoteKeyboardPlugin> instances = RemoteKeyboardPlugin.acquireInstances(); | ||
135 | try { | 135 | try { | ||
136 | for (RemoteKeyboardPlugin i: instances) | 136 | for (RemoteKeyboardPlugin i : instances) | ||
137 | i.notifyKeyboardState(false); | 137 | i.notifyKeyboardState(false); | ||
138 | } finally { | 138 | } finally { | ||
139 | RemoteKeyboardPlugin.releaseInstances(); | 139 | RemoteKeyboardPlugin.releaseInstances(); | ||
140 | } | 140 | } | ||
141 | } | 141 | } | ||
142 | 142 | | |||
143 | @Override | 143 | @Override | ||
144 | public void onStartInput(EditorInfo attribute, boolean restarting) { | 144 | public void onStartInput(EditorInfo attribute, boolean restarting) { | ||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |