Skip to content

Commit

Permalink
completely changed the package name
Browse files Browse the repository at this point in the history
  • Loading branch information
8192Bit committed Aug 9, 2024
1 parent eeac881 commit a1571f6
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 26 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ android {
viewBinding true
buildConfig true
}
namespace 'x8192Bit.DIYEdit_Mobile'
namespace 'x8192bit.diyeditmobile'
lint {
abortOnError false
}
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/cpp/midi-interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

extern "C" {

JNIEXPORT void JNICALL
Java_com_x8192Bit_DIYEdit_1Mobile_fragments_PlayThread_PlayMIDIFile(JNIEnv *env, jobject,
jstring MIDIFilePath,
jstring SoundFontFilePath) {
JNIEXPORT jstring JNICALL
Java_com_x8192bit_diyeditmobile_fragments_PlayThread_PlayMIDIFile(JNIEnv *env, jobject,
jstring MIDIFilePath,
jstring SoundFontFilePath) {
fluid_settings_t *settings;
fluid_synth_t *synth;
fluid_player_t *player;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import androidx.appcompat.app.ActionBar;

import x8192Bit.DIYEdit_Mobile.R;
import x8192bit.diyeditmobile.R;

public class AboutActivity extends BaseActivity {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import java.util.Map;
import java.util.Objects;

import x8192Bit.DIYEdit_Mobile.R;
import x8192bit.diyeditmobile.R;


public class FileSelectActivity extends BaseActivity {
Expand Down
13 changes: 10 additions & 3 deletions app/src/main/java/com/x8192bit/diyeditmobile/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import com.x8192bit.diyeditmobile.utils.FileUtils;
import com.x8192bit.diyeditmobile.utils.SPUtils;

import x8192Bit.DIYEdit_Mobile.BuildConfig;
import x8192Bit.DIYEdit_Mobile.R;
import x8192bit.diyeditmobile.BuildConfig;
import x8192bit.diyeditmobile.R;

public class MainActivity extends BaseActivity {

Expand Down Expand Up @@ -213,7 +213,14 @@ public void exit(View view) {
private void openFile(String realPath) {
Intent intent = new Intent(this, SaveEditActivity.class);
intent.putExtra(REAL_PATH, realPath);
startActivity(intent);
try {
startActivity(intent);
} catch (Exception e) {
new AlertDialog.Builder(getApplicationContext())
.setTitle(e.getClass().getName())
.setMessage(e.getMessage())
.show();
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import java.util.ArrayList;
import java.util.Objects;

import x8192Bit.DIYEdit_Mobile.R;
import x8192bit.diyeditmobile.R;

public class SaveEditActivity extends BaseActivity {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.x8192bit.diyeditmobile;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.MenuItem;
import android.widget.Toast;
Expand All @@ -12,14 +11,15 @@

import com.x8192bit.diyeditmobile.utils.CharUtils;
import com.x8192bit.diyeditmobile.utils.LocaleUtils;
import com.x8192bit.diyeditmobile.utils.SPUtils;

import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import x8192Bit.DIYEdit_Mobile.R;
import x8192bit.diyeditmobile.R;


public class SettingsActivity extends BaseActivity {
Expand Down Expand Up @@ -99,8 +99,7 @@ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
public boolean onPreferenceClick(Preference preference) {
String key = preference.getKey();
if (key.equals("cleanAllHistory")) {
SharedPreferences sp = this.requireContext().getSharedPreferences("com.x8192Bit.DIYEdit_Mobile_preferences", MODE_PRIVATE);
sp.edit().putString("history", null).apply();
SPUtils.cleanHistory(getContext());
Toast.makeText(requireContext(), R.string.cleanedKey, Toast.LENGTH_SHORT).show();
}
if (key.equals("openAboutDialog")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
import java.util.Locale;
import java.util.Objects;

import x8192Bit.DIYEdit_Mobile.R;
import x8192bit.diyeditmobile.R;

public class BGViewFragment extends Fragment {

public static final String IS_SAVE_EDIT = "com.x8192Bit.DIYEdit_Mobile.IS_SAVE_EDIT";
public static final String IS_SAVE_EDIT = "com.x8192bit.diyeditmobile.IS_SAVE_EDIT";
private static final String ARG_NAME = "name";
private static final String ARG_IS_GAME = "is_game";
SwitchMaterial bp = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import java.util.Map;
import java.util.Objects;

import x8192Bit.DIYEdit_Mobile.R;
import x8192bit.diyeditmobile.R;

/**
* A simple {@link Fragment} subclass.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.io.IOException;
import java.io.InputStream;

import x8192Bit.DIYEdit_Mobile.R;
import x8192bit.diyeditmobile.R;


public class MIDIFragment extends Fragment {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import java.util.Locale;
import java.util.Objects;

import x8192Bit.DIYEdit_Mobile.R;
import x8192bit.diyeditmobile.R;

public class MetadataFragment extends Fragment {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
import java.util.ArrayList;
import java.util.Locale;

import x8192Bit.DIYEdit_Mobile.R;
import x8192bit.diyeditmobile.R;

public class SaveEditFragment extends Fragment {

public static final String IS_IMPORT_MIO = "com.x8192Bit.DIYEdit_Mobile.IS_IMPORT_MIO";
public static final String IS_SAVE_EDIT = "com.x8192Bit.DIYEdit_Mobile.IS_SAVE_EDIT";
public static final String SAVE_EDIT_COUNT = "com.x8192Bit.DIYEdit_Mobile.SAVE_EDIT_COUNT";
public static final String IS_IMPORT_MIO = "com.x8192bit.diyeditmobile.IS_IMPORT_MIO";
public static final String IS_SAVE_EDIT = "com.x8192bit.diyeditmobile.IS_SAVE_EDIT";
public static final String SAVE_EDIT_COUNT = "com.x8192bit.diyeditmobile.SAVE_EDIT_COUNT";
private static final String ARG_NAME = "name";
private static final String ARG_MIO_TYPE = "mio_type";
private String name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import com.xperia64.diyedit.FileByteOperations;
import com.xperia64.diyedit.saveutils.SaveHandler;

import x8192Bit.DIYEdit_Mobile.R;
import x8192bit.diyeditmobile.R;

/**
* A simple {@link Fragment} subclass.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import java.io.InputStream;

import x8192Bit.DIYEdit_Mobile.R;
import x8192bit.diyeditmobile.R;

public class GraphicsUtils {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,9 @@ public static void appendHistory(Context context, String realPath) throws Number
throw e;
}
}

public static void cleanHistory(Context context) {
SharedPreferences sp = context.getSharedPreferences(sharedPreferencesName, MODE_PRIVATE);
sp.edit().putString("history", null).apply();
}
}

0 comments on commit a1571f6

Please sign in to comment.