Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
VishalNehra authored Jan 23, 2017
2 parents 9bd7ed9 + 9fffe5f commit 3b90796
Show file tree
Hide file tree
Showing 26 changed files with 657 additions and 653 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ android {
applicationId "com.amaze.filemanager"
minSdkVersion 14
targetSdkVersion 25
versionCode 50
versionName "3.1.2 Beta 6"
versionCode 51
versionName "3.1.2 Beta 7"
}

signingConfigs {
Expand Down
555 changes: 328 additions & 227 deletions src/fdroid/java/com/amaze/filemanager/activities/MainActivity.java

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.amaze.filemanager"
android:versionCode="50"
android:versionName="3.1.2 Beta 6">
android:versionCode="51"
android:versionName="3.1.2 Beta 7">

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/com/amaze/filemanager/activities/DbViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ private void load(final File file) {
@Override
public void run() {

File file1=getExternalCacheDir();
if(file1==null)file1=getCacheDir();
File file1 = getExternalCacheDir();

// if the db can't be read, and we have root enabled, try reading it by
// first copying it in cache dir
Expand All @@ -158,8 +157,6 @@ public void run() {
try {
RootUtils.copy(pathFile.getPath(),new File(file1.getPath(),file.getName()).getPath());
pathFile=new File(file1.getPath(),file.getName());
RootUtils.chmod(pathFile.getPath(), 777);
RootUtils.mountOwnerRW(pathFile.getPath());
} catch (RootNotPermittedException e) {
e.printStackTrace();
}
Expand Down
31 changes: 17 additions & 14 deletions src/main/java/com/amaze/filemanager/activities/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,12 @@ public void onBackPressed() {
if(select==1 && changed==1)
restartPC(this);
else if(select==1 || select==2){selectItem(0);}
else{
else {
Intent in = new Intent(Preferences.this, MainActivity.class);
in.setAction(Intent.ACTION_MAIN);
this.finish();
in.setAction(Intent.CATEGORY_LAUNCHER);
this.startActivity(in);
this.finish();
}
}
@Override
Expand All @@ -106,16 +107,18 @@ public boolean onOptionsItemSelected(MenuItem item) {
restartPC(this);
else if(select==1 ){selectItem(0);}
else{
Intent in = new Intent(Preferences.this, MainActivity.class);
in.setAction(Intent.ACTION_MAIN);
final int enter_anim = android.R.anim.fade_in;
final int exit_anim = android.R.anim.fade_out;
Activity activity = this;
activity.overridePendingTransition(enter_anim, exit_anim);
Intent in = new Intent(Preferences.this, MainActivity.class);
in.setAction(Intent.ACTION_MAIN);
in.setAction(Intent.CATEGORY_LAUNCHER);

final int enter_anim = android.R.anim.fade_in;
final int exit_anim = android.R.anim.fade_out;
Activity activity = this;
activity.overridePendingTransition(enter_anim, exit_anim);
activity.finish();
activity.overridePendingTransition(enter_anim, exit_anim);
activity.startActivity(in);
}return true;
activity.overridePendingTransition(enter_anim, exit_anim);
activity.startActivity(in);
}return true;

}
return true;
Expand Down Expand Up @@ -156,8 +159,8 @@ public void selectItem(int i){
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
@NonNull int[] grantResults) {
if (requestCode == 66) {
p.invalidateGplus();
}

p.invalidateGplus();
}

}
}
Loading

0 comments on commit 3b90796

Please sign in to comment.