Skip to content
This repository has been archived by the owner on Apr 8, 2022. It is now read-only.

Commit

Permalink
Fix NPE in CrackFragment, update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisk44 committed May 17, 2018
1 parent 00e6b48 commit 88b1821
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 28 deletions.
25 changes: 12 additions & 13 deletions app/build.gradle
@@ -1,13 +1,12 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '27.0.2'
defaultConfig {
applicationId "com.hijacker"
minSdkVersion 21
targetSdkVersion 27
versionCode 29
versionName "v1.5-beta.5"
versionCode 30
versionName "v1.5-beta.6"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
Expand All @@ -28,19 +27,19 @@ android {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:27.1.0'
compile 'com.android.support:support-v4:27.1.0'
compile 'com.android.support:design:27.1.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:cardview-v7:27.1.0'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.google.android.gms:play-services-appindexing:9.8.0'

implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
}

repositories {
Expand Down
28 changes: 17 additions & 11 deletions app/src/main/java/com/hijacker/CrackFragment.java
Expand Up @@ -192,15 +192,17 @@ public boolean accept(File file, String s){
}
});

for(File f : files){
if(f.lastModified()>latest){
latest = f.lastModified();
result = f;
if(files!=null){ //Only if the directory is deleted while the app is running, apparently it happens
for(File f : files){
if(f.lastModified()>latest){
latest = f.lastModified();
result = f;
}
}
}

if(result!=null){
capfileView.setText(result.getAbsolutePath());
if(result!=null){
capfileView.setText(result.getAbsolutePath());
}
}
}

Expand All @@ -209,10 +211,14 @@ public boolean accept(File file, String s){
long latest = 0;
File result = null;

for(File f : new File(wl_path).listFiles()){
if(f.lastModified()>latest){
latest = f.lastModified();
result = f;
File files[] = new File(wl_path).listFiles();

if(files!=null){ //Only if the directory is deleted while the app is running, apparently it happens
for(File f : files){
if(f.lastModified()>latest){
latest = f.lastModified();
result = f;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/hijacker/SendLogActivity.java
Expand Up @@ -166,7 +166,7 @@ protected void onPostExecute(final Boolean success){
public void onUseEmail(View v){
Intent intent = new Intent (Intent.ACTION_SEND);
intent.setType("plain/text");
intent.putExtra(Intent.EXTRA_EMAIL, new String[] {"kiriakopoulos44@gmail.com"});
intent.putExtra(Intent.EXTRA_EMAIL, new String[] {"droid.hijacker@gmail.com"});
intent.putExtra(Intent.EXTRA_SUBJECT, "Hijacker bug report");
Uri attachment = FileProvider.getUriForFile(this, BuildConfig.APPLICATION_ID + ".provider", report);
intent.putExtra(Intent.EXTRA_STREAM, attachment);
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Fri Nov 03 23:50:58 EET 2017
#Fri May 04 17:29:36 EEST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

0 comments on commit 88b1821

Please sign in to comment.