Skip to content

Commit

Permalink
Merge pull request #1531 from moneymanagerex/fastlane
Browse files Browse the repository at this point in the history
contine fastlane and 1015 release
  • Loading branch information
guanlisheng authored Jan 17, 2024
2 parents 213a9eb + 91c56e1 commit a61351a
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 59 deletions.
5 changes: 2 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ android {

defaultConfig {
applicationId "com.money.manager.ex"
versionCode 1014
versionCode 1015
//versionName getVersionAsDate() + "." + versionCode
versionName "2024.01.16"
versionName "2024.01.17"
// $applicationId
setProperty("archivesBaseName", "ammx-$versionName")

Expand Down Expand Up @@ -262,7 +262,6 @@ dependencies {
)
// Set this dependency to build and run UI Automator tests
// androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.1'
implementation 'com.amplitude:analytics-android:1.12.2'
}

configurations {
Expand Down
21 changes: 1 addition & 20 deletions app/src/main/java/com/money/manager/ex/MmexApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
import androidx.multidex.MultiDexApplication;
import androidx.preference.PreferenceManager;

import com.amplitude.android.Amplitude;
import com.amplitude.android.AmplitudeKt;
import com.amplitude.android.DefaultTrackingOptions;
import com.mikepenz.iconics.Iconics;
import com.mikepenz.mmex_icon_font_typeface_library.MMXIconFont;
import com.money.manager.ex.common.MoneyParcelConverter;
Expand Down Expand Up @@ -57,7 +54,6 @@
import java.util.concurrent.atomic.AtomicReference;

import info.javaperformance.money.Money;
import kotlin.Unit;
import timber.log.Timber;

/**
Expand All @@ -71,7 +67,6 @@
public class MmexApplication
extends MultiDexApplication {

static private Amplitude mAmplitude;
private static MmexApplication appInstance;
private static float mTextSize;
private static String userName = "";
Expand All @@ -80,11 +75,6 @@ public static MmexApplication getApp() {
return appInstance;
}

public static Amplitude getAmplitude()
{
return mAmplitude;
}

public static float getTextSize() {
return MmexApplication.mTextSize;
}
Expand Down Expand Up @@ -141,16 +131,7 @@ public void onCreate() {
// Job Manager initialization.
initializeJobManager();

mAmplitude = AmplitudeKt.Amplitude("1e1fbc10354400d9c3392a89558d693d"
, getApplicationContext()
, configuration -> {
configuration.setDefaultTracking(DefaultTrackingOptions.ALL);
configuration.setOptOut(!new AppSettings(this).getGeneralSettings().getSendUsage());
return Unit.INSTANCE;
}
);

mAmplitude.setDeviceId(getOrCreateUUID(this));
getOrCreateUUID(this);
}

public static String getOrCreateUUID(Context context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import com.google.common.io.ByteStreams;
import com.google.common.io.Files;
import com.money.manager.ex.MmexApplication;
import com.money.manager.ex.core.RequestCodes;
import com.money.manager.ex.core.database.DatabaseManager;
import com.money.manager.ex.home.DatabaseMetadata;
Expand All @@ -30,7 +29,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import java.util.HashMap;

import timber.log.Timber;

Expand Down Expand Up @@ -210,10 +208,6 @@ public void pullDatabase(DatabaseMetadata metadata) {
return;
}
dbUtils.useDatabase(metadata);
MmexApplication.getAmplitude().track("synchronize", new HashMap() {{
put("authority", uri.getAuthority());
put("result", "pullDatabase");
}});
}

/**
Expand Down Expand Up @@ -241,11 +235,6 @@ public void pushDatabase(DatabaseMetadata metadata) {
metadata.localSnapshotTimestamp = localLastModifiedMmxDate.toIsoString();

saveMetadata(metadata);

MmexApplication.getAmplitude().track("synchronize", new HashMap() {{
put("authority", remoteUri.getAuthority());
put("result", "pushDatabase");
}});
}

/**
Expand Down
8 changes: 0 additions & 8 deletions app/src/main/java/com/money/manager/ex/home/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.text.Html;
Expand Down Expand Up @@ -50,9 +49,6 @@
import androidx.preference.PreferenceManager;

import com.afollestad.materialdialogs.MaterialDialog;
import com.amplitude.android.Amplitude;
import com.amplitude.android.AmplitudeKt;
import com.amplitude.android.DefaultTrackingOptions;
import com.mikepenz.google_material_typeface_library.GoogleMaterial;
import com.mikepenz.mmex_icon_font_typeface_library.MMXIconFont;
import com.money.manager.ex.Constants;
Expand Down Expand Up @@ -113,14 +109,12 @@
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.Callable;

import javax.inject.Inject;

import dagger.Lazy;
import icepick.State;
import kotlin.Unit;
import rx.Single;
import rx.android.schedulers.AndroidSchedulers;
import timber.log.Timber;
Expand Down Expand Up @@ -183,7 +177,6 @@ protected void onCreate(Bundle savedInstanceState) {
finish();
return;
}
Amplitude amplitude = MmexApplication.getAmplitude();
// todo: remove this after the users upgrade the recent files list.
migrateRecentDatabases();

Expand Down Expand Up @@ -229,7 +222,6 @@ protected void onCreate(Bundle savedInstanceState) {
.atZone(ZoneId.of("UTC"))
.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS"));
}
amplitude.setUserId(uid);

infoService.setInfoValue(InfoKeys.UID, uid);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.SwitchPreferenceCompat;

import com.money.manager.ex.MmexApplication;
import com.money.manager.ex.R;
import com.money.manager.ex.home.MainActivity;

Expand Down Expand Up @@ -122,7 +121,6 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
sPreference.setOnPreferenceChangeListener((preference, newValue) -> {
// Handle the switch state change
boolean isChecked = (Boolean) newValue;
MmexApplication.getAmplitude().getConfiguration().setOptOut(!isChecked);
// Add your logic here based on the switch state
return true; // Return true to persist the preference change
});
Expand Down
7 changes: 0 additions & 7 deletions app/src/main/java/com/money/manager/ex/sync/SyncManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Messenger;
import android.text.TextUtils;
import android.widget.Toast;
Expand Down Expand Up @@ -50,7 +49,6 @@
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;

import javax.inject.Inject;

Expand Down Expand Up @@ -430,11 +428,6 @@ public void triggerSynchronization() {
}

invokeSyncService(SyncConstants.INTENT_ACTION_SYNC);
Uri uri = Uri.parse(remotePath);
MmexApplication.getAmplitude().track("synchronize", new HashMap() {{
put("authority", uri.getAuthority());
put("result", "triggerSynchronization");
}});
}

public void triggerDownload() {
Expand Down
8 changes: 0 additions & 8 deletions app/src/main/java/com/money/manager/ex/sync/SyncService.java
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,6 @@ private void triggerSync(File localFile) {
if (!isLocalModified && !isRemoteModified) {
sendMessage(SyncServiceMessage.FILE_NOT_CHANGED);
sendStopEvent();
MmexApplication.getAmplitude().track("synchronize", new HashMap() {{
put("authority", uri.getAuthority());
put("result", "no change");
}});
return;
}

Expand All @@ -292,10 +288,6 @@ private void triggerSync(File localFile) {
Timber.w(getString(R.string.both_files_modified));
sendMessage(SyncServiceMessage.CONFLICT);
sendStopEvent();
MmexApplication.getAmplitude().track("synchronize", new HashMap() {{
put("authority", uri.getAuthority());
put("result", "Conflict");
}});
showNotificationForConflict();
return;
}
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/1015.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add notes to split transaction

0 comments on commit a61351a

Please sign in to comment.