Skip to content

Commit

Permalink
Merge pull request #33 from topminipie/dev
Browse files Browse the repository at this point in the history
Delete boot animation, AboutActivity.java
  • Loading branch information
topminipie authored Apr 20, 2024
2 parents 0514570 + 7de4fd4 commit 2857f8e
Show file tree
Hide file tree
Showing 10 changed files with 6 additions and 347 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ dependencies {
implementation "com.github.topjohnwu.libsu:core:5.2.2"

// AboutPage
implementation 'io.github.medyo:android-about-page:2.0.0'
implementation 'de.psdev.licensesdialog:licensesdialog:2.2.0'
//implementation 'io.github.medyo:android-about-page:2.0.0'
//implementation 'de.psdev.licensesdialog:licensesdialog:2.2.0'
implementation 'com.afollestad.material-dialogs:core:0.9.6.0'

implementation 'org.jdeferred:jdeferred-android-aar:1.2.6'
Expand All @@ -69,5 +69,5 @@ dependencies {
implementation 'org.tukaani:xz:1.9'

implementation 'com.github.hzy3774:AndroidP7zip:1.7.2'
implementation 'com.cleveroad:androidmanimation:0.9.1'
//implementation 'com.cleveroad:androidmanimation:0.9.1'
}
5 changes: 0 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
</activity>


<activity
android:name=".ui.AboutActivity"
android:label="@string/about_btn"
android:screenOrientation="portrait" />

<activity
android:name=".ui.SelectAppActivity"
android:label="@string/create_app_activity"
Expand Down
6 changes: 0 additions & 6 deletions app/src/main/java/io/twoyi/Render2Activity.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;

import com.cleveroad.androidmanimation.LoadingAnimationView;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;

Expand All @@ -57,7 +55,6 @@ public class Render2Activity extends AppCompatActivity implements View.OnTouchLi
private SurfaceView mSurfaceView;

private ViewGroup mRootView;
private LoadingAnimationView mLoadingView;
private TextView mLoadingText;
private View mLoadingLayout;
private View mBootLogView;
Expand Down Expand Up @@ -121,12 +118,10 @@ protected void onCreate(Bundle savedInstanceState) {
mSurfaceView.getHolder().addCallback(mSurfaceCallback);

mLoadingLayout = findViewById(R.id.loadingLayout);
mLoadingView = findViewById(R.id.loading);
mLoadingText = findViewById(R.id.loadingText);
mBootLogView = findViewById(R.id.bootlog);

mLoadingLayout.setVisibility(View.VISIBLE);
mLoadingView.startAnimation();

UITips.checkForAndroid12(this, this::bootSystem);

Expand Down Expand Up @@ -222,7 +217,6 @@ private void showBootingProcedure() {
}

runOnUiThread(() -> {
mLoadingView.stopAnimation();
mLoadingLayout.setVisibility(View.GONE);
});
}, "waiting-boot").start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Objects;

import io.twoyi.R;
import io.twoyi.utils.RomManager;
Expand Down Expand Up @@ -60,7 +61,7 @@ public Cursor queryRoots(String[] projection) {
File BASE_DIR = RomManager.getRomSdcardDir(getContext());

final MatrixCursor result = new MatrixCursor(projection != null ? projection : DEFAULT_ROOT_PROJECTION);
final String applicationName = getContext().getString(R.string.app_name);
final String applicationName = Objects.requireNonNull(getContext()).getString(R.string.app_name);

final MatrixCursor.RowBuilder row = result.newRow();
row.add(Root.COLUMN_ROOT_ID, DEFAULT_ROOT_ID);
Expand Down Expand Up @@ -182,7 +183,7 @@ private File getRootDir() {
}

private String getRootSummary() {
return getContext().getResources().getString(R.string.sdcard_of_twoyi);
return Objects.requireNonNull(getContext()).getResources().getString(R.string.sdcard_of_twoyi);
}

private void includeFile(MatrixCursor result, String docId, File file)
Expand Down
253 changes: 0 additions & 253 deletions app/src/main/java/io/twoyi/ui/AboutActivity.java

This file was deleted.

7 changes: 0 additions & 7 deletions app/src/main/java/io/twoyi/ui/SettingsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
Preference replaceRom = findPreference(R.string.settings_key_replace_rom);
Preference factoryReset = findPreference(R.string.settings_key_factory_reset);

Preference about = findPreference(R.string.settings_key_about);

importApp.setOnPreferenceClickListener(preference -> {
UIHelper.startActivity(getContext(), SelectAppActivity.class);
return true;
Expand Down Expand Up @@ -157,11 +155,6 @@ public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
.show();
return true;
});

about.setOnPreferenceClickListener(preference -> {
UIHelper.startActivity(getContext(), AboutActivity.class);
return true;
});
}


Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/io/twoyi/utils/AppKV.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public class AppKV {
private static final String PREF_NAME = "app_kv";

public static final String ADD_APP_NOT_SHOW_SYSTEM= "add_app_not_show_system";
public static final String ADD_APP_NOT_SHOW_ADDED = "add_app_not_show_added";
public static final String SHOW_ANDROID12_TIPS = "show_android12_tips_v2";
public static final String ADD_APP_NOT_SHOW_32BIT = "add_app_not_show_32bit";

Expand Down
Loading

0 comments on commit 2857f8e

Please sign in to comment.