Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
gdzx committed Sep 12, 2024
1 parent 7368fcf commit 9766f2f
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 183 deletions.
6 changes: 2 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ android {
}
}

compileSdkVersion 34
buildToolsVersion "34.0.0"

defaultConfig {
applicationId "fr.dzx.audiosource"
minSdkVersion 14
targetSdkVersion 34
compileSdk 34
versionCode 3
versionName '1.1'

Expand All @@ -48,7 +46,7 @@ android {

dependencies {
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.vectordrawable:vectordrawable:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
}

if (project.hasProperty("SNDCPY_STORE_FILE")) {
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />

Expand All @@ -25,8 +25,8 @@
<service
android:name="fr.dzx.audiosource.RecordService"
android:enabled="true"
android:foregroundServiceType="microphone"
android:exported="false" />
android:exported="false"
android:foregroundServiceType="microphone" />
</application>

</manifest>
4 changes: 3 additions & 1 deletion app/src/main/java/fr/dzx/audiosource/RecordService.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import androidx.core.app.NotificationManagerCompat;
import androidx.core.content.ContextCompat;

import java.util.Objects;

public class RecordService extends Service {
private static final String ACTION_RECORD = "fr.dzx.audiosource.RECORD";
private static final String ACTION_STOP = "fr.dzx.audiosource.STOP";
Expand Down Expand Up @@ -62,7 +64,7 @@ public void onCreate() {

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
if (intent.getAction().equals(ACTION_STOP)) {
if (Objects.equals(intent.getAction(), ACTION_STOP)) {
stopSelf();
return START_NOT_STICKY;
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/fr/dzx/audiosource/RecordThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ public class RecordThread extends Thread {

private static final String SOCKET_NAME = "audiosource";

private RecordService service;
private AudioRecord recorder;
private final RecordService service;
private final AudioRecord recorder;

private volatile LocalServerSocket serverSocket;

Expand Down
170 changes: 0 additions & 170 deletions app/src/main/res/drawable/ic_launcher_background.xml

This file was deleted.

6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.5.2'
classpath 'com.android.tools.build:gradle:8.2.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Expand All @@ -19,6 +19,6 @@ allprojects {
}
}

task clean(type: Delete) {
delete rootProject.buildDir
tasks.register('clean', Delete) {
delete getLayout().getBuildDirectory()
}

0 comments on commit 9766f2f

Please sign in to comment.