mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-02-05 13:37:33 +01:00
gradle updates, code cleanup
This commit is contained in:
parent
2b6d882ee5
commit
a45c0eb280
@ -1,7 +1,7 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
buildToolsVersion '30.0.0'
|
||||
buildToolsVersion '30.0.1'
|
||||
compileSdkVersion 29
|
||||
|
||||
defaultConfig {
|
||||
|
@ -6,7 +6,6 @@ import android.media.MediaPlayer.OnErrorListener;
|
||||
import android.media.MediaPlayer.OnInfoListener;
|
||||
import android.media.MediaPlayer.OnPreparedListener;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask.Status;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.provider.MediaStore;
|
||||
@ -40,6 +39,7 @@ import static android.media.MediaPlayer.MEDIA_ERROR_UNKNOWN;
|
||||
import static android.media.MediaPlayer.MEDIA_INFO_BUFFERING_END;
|
||||
import static android.media.MediaPlayer.MEDIA_INFO_BUFFERING_START;
|
||||
import static android.media.MediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START;
|
||||
import static android.os.AsyncTask.Status.RUNNING;
|
||||
import static android.view.View.INVISIBLE;
|
||||
import static android.view.View.VISIBLE;
|
||||
import static androidx.recyclerview.widget.LinearLayoutManager.HORIZONTAL;
|
||||
@ -124,7 +124,6 @@ public class MediaViewer extends AppCompatActivity implements OnImageClickListen
|
||||
videoWindow.setVisibility(VISIBLE);
|
||||
Uri video = Uri.parse(link[0]);
|
||||
videoView.setVideoURI(video);
|
||||
videoView.start();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -145,7 +144,7 @@ public class MediaViewer extends AppCompatActivity implements OnImageClickListen
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
if (imageAsync != null && imageAsync.getStatus() == Status.RUNNING)
|
||||
if (imageAsync != null && imageAsync.getStatus() == RUNNING)
|
||||
imageAsync.cancel(true);
|
||||
super.onDestroy();
|
||||
}
|
||||
@ -180,7 +179,9 @@ public class MediaViewer extends AppCompatActivity implements OnImageClickListen
|
||||
mp.setLooping(true);
|
||||
} else {
|
||||
videoController.show(0);
|
||||
mp.seekTo(videoPos);
|
||||
if (videoPos > 0) {
|
||||
mp.seekTo(videoPos);
|
||||
}
|
||||
}
|
||||
mp.setOnInfoListener(this);
|
||||
mp.start();
|
||||
|
@ -6,7 +6,7 @@ buildscript {
|
||||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.0.0'
|
||||
classpath 'com.android.tools.build:gradle:4.0.1'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,20 +1,17 @@
|
||||
# Project-wide Gradle settings.
|
||||
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
|
||||
# For more details on how to configure your build environment visit
|
||||
## For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
|
||||
#
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx768m
|
||||
org.gradle.configureondemand=false;
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
# Default value: -Xmx1024m -XX:MaxPermSize=256m
|
||||
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
#
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
# org.gradle.parallel=true
|
||||
#Thu Jul 16 10:38:32 CEST 2020
|
||||
android.enableJetifier=true
|
||||
android.useAndroidX=true
|
||||
org.gradle.configureondemand=false;
|
||||
org.gradle.jvmargs=-Xmx1536M -Dkotlin.daemon.jvm.options\="-Xmx768M"
|
||||
|
Loading…
x
Reference in New Issue
Block a user