You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
stub FocusFinder to fix crash when pressing arrow keys
Since we now have basic support for keyboard input, new code paths can be reached. For example in the ViewPager in the MainActivity of NewPipe.
This commit is contained in:
12
src/api-impl/android/view/FocusFinder.java
Normal file
12
src/api-impl/android/view/FocusFinder.java
Normal file
@@ -0,0 +1,12 @@
|
||||
package android.view;
|
||||
|
||||
public class FocusFinder {
|
||||
|
||||
public static FocusFinder getInstance() {
|
||||
return new FocusFinder();
|
||||
}
|
||||
|
||||
public View findNextFocus(ViewGroup root, View focused, int direction) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
9
src/api-impl/android/view/SoundEffectConstants.java
Normal file
9
src/api-impl/android/view/SoundEffectConstants.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package android.view;
|
||||
|
||||
public class SoundEffectConstants {
|
||||
|
||||
// the typo is part of the API
|
||||
public static int getContantForFocusDirection(int direction) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -460,6 +460,7 @@ srcs = [
|
||||
'android/view/Choreographer.java',
|
||||
'android/view/ContextThemeWrapper.java',
|
||||
'android/view/Display.java',
|
||||
'android/view/FocusFinder.java',
|
||||
'android/view/GestureDetector.java',
|
||||
'android/view/HardwareCanvas.java',
|
||||
'android/view/Gravity.java',
|
||||
@@ -476,6 +477,7 @@ srcs = [
|
||||
'android/view/MotionEvent.java',
|
||||
'android/view/PointerIcon.java',
|
||||
'android/view/ScaleGestureDetector.java',
|
||||
'android/view/SoundEffectConstants.java',
|
||||
'android/view/SubMenu.java',
|
||||
'android/view/Surface.java',
|
||||
'android/view/SurfaceHolder.java',
|
||||
|
||||
Reference in New Issue
Block a user