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" applicationId "asgardius.page.s3manager"
minSdk 23 minSdk 23
targetSdk 33 targetSdk 33
versionCode 66 versionCode 67
versionName "0.7.5" versionName "0.7.6"
setProperty("archivesBaseName", "s3-manager-$versionName") setProperty("archivesBaseName", "s3-manager-$versionName")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 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.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import android.app.Activity;
import android.content.ClipData; import android.content.ClipData;
import android.content.ClipboardManager; import android.content.ClipboardManager;
import android.content.Context; import android.content.Context;
@ -357,7 +358,8 @@ public class BucketSelect extends AppCompatActivity {
intent.putExtra("password", password); intent.putExtra("password", password);
intent.putExtra("region", location); intent.putExtra("region", location);
intent.putExtra("style", style); intent.putExtra("style", style);
startActivity(intent); //startActivity(intent);
((Activity) this).startActivityForResult(intent, 25);
} }
private void download(String bucket) { 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(); 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 @Override
public void run() { public void run() {
// Sending reference and data to Adapter // Sending reference and data to Adapter
setResult(25);
Toast.makeText(getApplicationContext(),getResources().getString(R.string.create_bucket_success), Toast.LENGTH_SHORT).show(); 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 intent = new Intent(this, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra("EXIT", true); intent.putExtra("EXIT", true);
startActivity(intent); startActivity(intent);
} }*/
} }

View file

@ -288,6 +288,19 @@ public class Downloader extends AppCompatActivity {
} }
@Override @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) { 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. // 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, // 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") @SuppressLint("SetTextI18n")
@Override @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) { 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. // 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, // 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 @Override
public void onDestroy() { 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); mediaSessionConnector.setPlayer(null);
deleteCache(this, standaloneDatabaseProvider); deleteCache(this, standaloneDatabaseProvider);
mediaSession.setActive(false); mediaSession.setActive(false);

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?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" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main" android:id="@+id/activity_main"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -53,6 +53,9 @@
</LinearLayout> </LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<ProgressBar <ProgressBar
android:id="@+id/simpleProgressBar" android:id="@+id/simpleProgressBar"
android:layout_width="fill_parent" android:layout_width="fill_parent"
@ -64,7 +67,4 @@
android:visibility="invisible" android:visibility="invisible"
tools:ignore="MissingConstraints" /> tools:ignore="MissingConstraints" />
</LinearLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>

View file

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