new release

This commit is contained in:
Page Asgardius 2023-01-09 18:44:13 -07:00
parent 8f2a33514b
commit d033dfbb3b
8 changed files with 69 additions and 19 deletions

View file

@ -9,8 +9,8 @@ android {
applicationId "asgardius.page.s3manager"
minSdk 23
targetSdk 33
versionCode 66
versionName "0.7.5"
versionCode 67
versionName "0.7.6"
setProperty("archivesBaseName", "s3-manager-$versionName")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View file

@ -5,6 +5,7 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.app.Activity;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
@ -357,7 +358,8 @@ public class BucketSelect extends AppCompatActivity {
intent.putExtra("password", password);
intent.putExtra("region", location);
intent.putExtra("style", style);
startActivity(intent);
//startActivity(intent);
((Activity) this).startActivityForResult(intent, 25);
}
private void download(String bucket) {
@ -394,4 +396,15 @@ public class BucketSelect extends AppCompatActivity {
Toast.makeText(getApplicationContext(),getResources().getString(R.string.copy_ok), Toast.LENGTH_SHORT).show();
}
}
public void onActivityResult(int requestCode, int resultCode, final Intent resultData) {
// The ACTION_OPEN_DOCUMENT intent was sent with the request code OPEN_DIRECTORY_REQUEST_CODE.
// If the request code seen here doesn't match, it's the response to some other intent,
// and the below code shouldn't run at all.
super.onActivityResult(requestCode, resultCode, resultData);
if(requestCode == 25 && resultCode == 25) {
recreate();
}
}
}

View file

@ -67,8 +67,10 @@ public class CreateBucket extends AppCompatActivity {
@Override
public void run() {
// Sending reference and data to Adapter
setResult(25);
Toast.makeText(getApplicationContext(),getResources().getString(R.string.create_bucket_success), Toast.LENGTH_SHORT).show();
mainmenu();
finish();
//mainmenu();
}
});
@ -98,12 +100,12 @@ public class CreateBucket extends AppCompatActivity {
}
private void mainmenu() {
/*private void mainmenu() {
Intent intent = new Intent(this, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra("EXIT", true);
startActivity(intent);
}
}*/
}

View file

@ -288,6 +288,19 @@ public class Downloader extends AppCompatActivity {
}
@Override
public void onDestroy() {
if (!mWifiLock.isHeld()) {
mWifiLock.acquire();
//System.out.println("WifiLock acquired");
}
if (!mWakeLock.isHeld()) {
mWakeLock.acquire();
//System.out.println("WakeLock acquired");
}
super.onDestroy();
}
public void onActivityResult(int requestCode, int resultCode, final Intent resultData) {
// The ACTION_OPEN_DOCUMENT intent was sent with the request code OPEN_DIRECTORY_REQUEST_CODE.
// If the request code seen here doesn't match, it's the response to some other intent,

View file

@ -351,6 +351,19 @@ public class Uploader extends AppCompatActivity {
@SuppressLint("SetTextI18n")
@Override
public void onDestroy() {
if (!mWifiLock.isHeld()) {
mWifiLock.acquire();
//System.out.println("WifiLock acquired");
}
if (!mWakeLock.isHeld()) {
mWakeLock.acquire();
//System.out.println("WakeLock acquired");
}
super.onDestroy();
}
public void onActivityResult(int requestCode, int resultCode, final Intent resultData) {
// The ACTION_OPEN_DOCUMENT intent was sent with the request code OPEN_DIRECTORY_REQUEST_CODE.
// If the request code seen here doesn't match, it's the response to some other intent,

View file

@ -323,6 +323,14 @@ public class VideoPlayer extends AppCompatActivity {
@Override
public void onDestroy() {
if (!mWifiLock.isHeld()) {
mWifiLock.acquire();
//System.out.println("WifiLock acquired");
}
if (!mWakeLock.isHeld()) {
mWakeLock.acquire();
//System.out.println("WakeLock acquired");
}
mediaSessionConnector.setPlayer(null);
deleteCache(this, standaloneDatabaseProvider);
mediaSession.setActive(false);

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
@ -53,18 +53,18 @@
</LinearLayout>
<ProgressBar
android:id="@+id/simpleProgressBar"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:indeterminate="true"
android:max="100"
android:padding="20dp"
android:progress="50"
android:visibility="invisible"
tools:ignore="MissingConstraints" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
<ProgressBar
android:id="@+id/simpleProgressBar"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:indeterminate="true"
android:max="100"
android:padding="20dp"
android:progress="50"
android:visibility="invisible"
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout>

View file

@ -0,0 +1 @@
* UI fixes