Squash bugs and set up workflow
This commit is contained in:
parent
d13faa8924
commit
f41c0357d3
|
@ -0,0 +1,26 @@
|
||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- android-10
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- android-10
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
./gradlew assembleDebug
|
||||||
|
- name: Store generated APK file
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: termux-x11
|
||||||
|
path: ./app/build/outputs/apk/debug
|
|
@ -0,0 +1,19 @@
|
||||||
|
name: "Validate Gradle Wrapper"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- android-10
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- android-10
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validation:
|
||||||
|
name: "Validation"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: gradle/wrapper-validation-action@v1
|
|
@ -0,0 +1,21 @@
|
||||||
|
name: Unit tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- android-10
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- android-10
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
testing:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Execute tests
|
||||||
|
run: |
|
||||||
|
./gradlew test
|
|
@ -30,6 +30,8 @@ import android.view.SurfaceHolder;
|
||||||
import android.view.SurfaceView;
|
import android.view.SurfaceView;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
import android.graphics.PixelFormat;
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings({"ConstantConditions", "SameParameterValue"})
|
@SuppressWarnings({"ConstantConditions", "SameParameterValue"})
|
||||||
@SuppressLint({"ClickableViewAccessibility", "StaticFieldLeak"})
|
@SuppressLint({"ClickableViewAccessibility", "StaticFieldLeak"})
|
||||||
|
@ -234,14 +236,14 @@ public class LorieService extends Service {
|
||||||
@SuppressWarnings("SameParameterValue")
|
@SuppressWarnings("SameParameterValue")
|
||||||
private static class ServiceEventListener implements SurfaceHolder.Callback, View.OnTouchListener, View.OnKeyListener, View.OnHoverListener, View.OnGenericMotionListener, TouchParser.OnTouchParseListener {
|
private static class ServiceEventListener implements SurfaceHolder.Callback, View.OnTouchListener, View.OnKeyListener, View.OnHoverListener, View.OnGenericMotionListener, TouchParser.OnTouchParseListener {
|
||||||
LorieService svc;
|
LorieService svc;
|
||||||
|
|
||||||
private void setAsListenerTo(SurfaceView view) {
|
private void setAsListenerTo(SurfaceView view) {
|
||||||
view.getHolder().addCallback(this);
|
view.getHolder().addCallback(this);
|
||||||
view.setOnTouchListener(this);
|
view.setOnTouchListener(this);
|
||||||
view.setOnHoverListener(this);
|
view.setOnHoverListener(this);
|
||||||
view.setOnGenericMotionListener(this);
|
view.setOnGenericMotionListener(this);
|
||||||
view.setOnKeyListener(this);
|
view.setOnKeyListener(this);
|
||||||
surfaceChanged(view.getHolder(), 0, view.getWidth(), view.getHeight());
|
surfaceChanged(view.getHolder(), PixelFormat.UNKNOWN, view.getWidth(), view.getHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onPointerButton(int button, int state) {
|
public void onPointerButton(int button, int state) {
|
||||||
|
|
Loading…
Reference in New Issue