Skip to content

Commit

Permalink
Merge branch 'gh-test'
Browse files Browse the repository at this point in the history
  • Loading branch information
renyuneyun committed Apr 30, 2022
2 parents ab326a7 + 3bd067e commit 9738530
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ jobs:
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Android Test Report Action
uses: asadmansr/[email protected]
- name: Generate coverage report
run: ./gradlew jacocoTestReport
- name: Codecov
uses: codecov/[email protected]
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jacoco {

tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
jacoco.excludes = ['jdk.internal.*'] // Fix error when running tests. See https://stackoverflow.com/questions/68065743/cannot-run-gradle-test-tasks-because-of-java-lang-noclassdeffounderror-jdk-inte
}

android {
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.TETHER_PRIVILEGED"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.TETHER_PRIVILEGED"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ private void disableWaiterActivity() {
@Override
public void onNewIntent(Intent intent) {
resolveIntent(intent);
super.onNewIntent(intent);
}

private void resolveIntent(Intent intent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public void _load(@ValidData @NonNull UiModeOperationData data, @NonNull OnResul
if (data.ui_mode == UiModeOperationData.UiMode.car) {
uiModeManager.enableCarMode(0);
} else { // if (data.ui_mode == UiModeOperationData.UiMode.normal) {
// noinspection WrongConstant Lint is wrong in this case
uiModeManager.disableCarMode(0);
}
callback.onResult(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import ryey.easer.skills.event.AbstractSlot;

@SuppressWarnings({"MissingPermission"})
public class CellLocationSlot extends AbstractSlot<CellLocationUSourceData> {
private static TelephonyManager telephonyManager = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

import ryey.easer.skills.condition.SkeletonTracker;

@SuppressWarnings({"MissingPermission"})
public class CellLocationTracker extends SkeletonTracker<CellLocationUSourceData> {

private static TelephonyManager telephonyManager = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public void onReceive(Context context, Intent intent) {

AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {
// noinspection WrongConstant Lint is wrong in this case
AudioDeviceInfo[] audioDevices = audioManager.getDevices(AudioManager.GET_DEVICES_ALL);
for (AudioDeviceInfo deviceInfo : audioDevices) {
if (deviceInfo.getType() == AudioDeviceInfo.TYPE_WIRED_HEADPHONES
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/layout/activity_edit_dynamics.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
<TableLayout
android:id="@+id/table"
android:layout_width="match_parent"
android:layout_height="0dp">
android:layout_height="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<TableRow
android:layout_width="match_parent"
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/layout/skill_operation__media_control.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">

<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<RadioButton
android:id="@+id/radioButton_play_pause"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<string name="prompt_delete_failed">Odstranění se nezdařilo. Zkontrolujte, zda tato položka není aktivně používána.</string>
<string name="prompt_data_illegal">Nelze uložit data s neplatnými poli. Zkontrolujte prosím své volby/vstupy.</string>
<string name="prompt_dynamics_not_ready">Chcete-li nastavit Dynamiky, je potřeba vybrat platný Profil a platný aktivační spouštěč (např. Událost).</string>
<string name="prompt_prevented_for_permission">Udělit Easeru oprávnění &lt;% s &gt;.</string>
<string name="prompt_prevented_for_permission">Udělit Easeru oprávnění &lt;%s&gt;.</string>
<string name="prompt_error_logged">Easer právě zaznamenal chybu. Podívejte se do podadresáře error v adresáři záznamů.</string>
<string name="text_app_description">Zjednodušte svůj život automatizací rutinních akcí na vašem zařízení.
\nŘetězte různé události a nechat provést odpovídající akce. Už je nemusíte mít na paměti!
Expand Down Expand Up @@ -162,7 +162,7 @@
<string name="alert_update_storage_data">Chcete-li aktualizovat data do nového formátu pro kompatibilitu, vyberte v Nastavení položku Převést data.</string>
<string name="message_future_change_title">Brzy se změní</string>
<string name="message_future_change_0_8">Stromový pohled na skripty bude odebrán ve verzi 0.8. Závislosti umožňují lepší zobrazení.</string>
<string name="template_export">Exportováno do % s</string>
<string name="template_export">Exportováno do %s</string>
<string name="version">Verze</string>
<string name="message_importing_invalid_data">Tento soubor zřejmě není platný. Ujistěte se, že importujete soubor exportovaný pomocí Easeru.</string>
<string name="dynamics_time">Aktuální Čas</string>
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ android.enableJetifier=true
android.useAndroidX=true
systemProp.http.proxyHost=localhost
systemProp.http.proxyPort=1088
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m

0 comments on commit 9738530

Please sign in to comment.