Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade minSdkVersion to 24, Android 7.0 #1842

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MMEX_Icon_Font/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ android {
defaultConfig {
// minSdkVersion rootProject.ext.minSdkVersion
// targetSdkVersion rootProject.ext.targetSdkVersion
minSdkVersion 23
minSdkVersion 24 // Android 7.0
targetSdk rootProject.ext.targetSdk

consumerProguardFiles 'consumer-proguard-rules.pro'
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ android {

// minSdkVersion rootProject.ext.minSdkVersion
// targetSdkVersion rootProject.ext.targetSdkVersion
minSdkVersion 23 // Android 6.0
minSdkVersion 24 // Android 7.0
targetSdk rootProject.ext.targetSdk

multiDexEnabled true
Expand Down
16 changes: 3 additions & 13 deletions app/src/main/java/com/money/manager/ex/core/Passcode.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
package com.money.manager.ex.core;

import android.content.Context;
import android.os.Build;
import android.text.TextUtils;
import android.widget.Toast;

import com.money.manager.ex.MmexApplication;
import com.money.manager.ex.R;
import com.money.manager.ex.datalayer.InfoRepositorySql;
import com.money.manager.ex.domainmodel.Info;
import com.money.manager.ex.passcode.SimpleCrypto;
import com.money.manager.ex.servicelayer.InfoService;

import javax.inject.Inject;
Expand Down Expand Up @@ -101,11 +99,7 @@ public boolean clearPasscode() {
private String decrypt(String s) {
String ret = null;
try {
if (Build.VERSION.SDK_INT <= 23) {
ret = SimpleCrypto.decrypt(KEY, s);
} else {
return s;
}
return s;
} catch (Exception e) {
Timber.e(e, "encrypting passcode");
}
Expand All @@ -120,12 +114,8 @@ private String decrypt(String s) {
private String encrypt(String s) {
String ret = null;
try {
if (Build.VERSION.SDK_INT <= 23) {
ret = SimpleCrypto.encrypt(KEY, s);
} else {
// todo Encryptor.enc
return s;
}
// todo Encryptor.enc
return s;
} catch (Exception e) {
Timber.e(e, "encrypting passcode");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDiskIOException;
import android.os.Build;

import androidx.annotation.NonNull;
import androidx.sqlite.db.SupportSQLiteDatabase;
Expand Down Expand Up @@ -361,10 +360,6 @@ private void resetContentProvider() {
assert provider != null;
provider.resetDatabase();

if (Build.VERSION.SDK_INT >= 24) {
client.close();
} else {
client.release();
}
client.close();
}
}
21 changes: 0 additions & 21 deletions app/src/main/java/com/money/manager/ex/view/RobotoCheckBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,25 +89,4 @@ private void parseAttributes(Context context, AttributeSet attrs) {
RobotoView.parseAttributes(context, this, attrs);
}

// /**
// * Adjust the margin between the checkbox and the text.
// * A fix for displaying on JellyBean.
// * Reference: http://stackoverflow.com/questions/4037795/android-spacing-between-checkbox-and-text
// * Android version codes: http://developer.android.com/reference/android/os/Build.VERSION_CODES.html
// * @return Left padding for the text component.
// */
// @Override
// public int getCompoundPaddingLeft() {
// int result = super.getCompoundPaddingLeft();
//
// // fix for padding on Jelly Bean (4.2 and lower)
// // Build.VERSION_CODES.KITKAT = 4.4
// if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN_MR1) {
// final float scale = this.getResources().getDisplayMetrics().density;
// //result = (super.getCompoundPaddingLeft() + (int) (10.0f * scale + 0.5f));
// result = (super.getCompoundPaddingLeft() + (int) (30.0f * scale + 0.5f));
// }
//
// return result;
// }
}
2 changes: 1 addition & 1 deletion money/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ android {
compileSdk rootProject.ext.compileSdk

defaultConfig {
minSdkVersion 23
minSdkVersion 24 // Android 7.0
targetSdk rootProject.ext.targetSdk
}
buildTypes {
Expand Down
Loading