Skip to content

Commit

Permalink
Update translate
Browse files Browse the repository at this point in the history
  • Loading branch information
MlgmXyysd committed Nov 11, 2019
1 parent f20283e commit 0ef4fd2
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 35 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
compileSdkVersion 28

lintOptions {
abortOnError false
Expand Down
2 changes: 1 addition & 1 deletion app/release/output.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":451,"versionName":"4.5.1","enabled":true,"outputFile":"EdXposedManager-org.meowcat.edxposed.manager-4.5.1-451-release.apk","fullName":"release","baseName":"release"},"path":"EdXposedManager-org.meowcat.edxposed.manager-4.5.1-451-release.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":452,"versionName":"4.5.2","enabled":true,"outputFile":"EdXposedManager-org.meowcat.edxposed.manager-4.5.2-452-release.apk","fullName":"release","baseName":"release"},"path":"EdXposedManager-org.meowcat.edxposed.manager-4.5.2-452-release.apk","properties":{}}]
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;

import de.robv.android.xposed.installer.XposedApp;

Expand Down Expand Up @@ -266,7 +267,7 @@ public static void showMenu(@NonNull Context context,
case R.id.app_menu_stop:
try {
ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
manager.killBackgroundProcesses(info.packageName);
Objects.requireNonNull(manager).killBackgroundProcesses(info.packageName);
} catch (Exception ex) {
ex.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import org.meowcat.edxposed.manager.R;

public class CompileUtils {
class CompileUtils {

private static final String COMPILE_COMMAND_PREFIX = "cmd package ";
private static final String COMPILE_RESET_COMMAND = COMPILE_COMMAND_PREFIX + "compile --reset ";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import androidx.preference.PreferenceGroup;
import androidx.preference.SwitchPreference;

import com.afollestad.materialdialogs.MaterialDialog;
import com.afollestad.materialdialogs.color.ColorChooserDialog;
import com.afollestad.materialdialogs.folderselector.FolderChooserDialog;
import com.solohsu.android.edxp.manager.fragment.BasePreferenceFragment;
Expand Down Expand Up @@ -178,6 +179,8 @@ public static class SettingsFragment extends BasePreferenceFragment implements P
};

private Preference downloadLocation;
private Preference stopVerboseLog;
private Preference stopLog;

public SettingsFragment() {
}
Expand Down Expand Up @@ -209,6 +212,8 @@ public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
Preference headsUp = findPreference("heads_up");
Preference colors = findPreference("colors");
downloadLocation = findPreference("download_location");
stopVerboseLog = findPreference("stop_verbose_log");
stopLog = findPreference("stop_log");

ListPreference customIcon = findPreference("custom_icon");
navBar = findPreference("nav_bar");
Expand Down Expand Up @@ -510,15 +515,45 @@ public boolean onPreferenceClick(Preference preference) {
.cancelButton(android.R.string.cancel)
.initialPath(XposedApp.getDownloadPath())
.show();
} else if (preference.getKey().equals(downloadLocation.getKey())) {

} else if (preference.getKey().equals(downloadLocation.getKey())) {

}

// } else if (preference.getKey().equals(stopVerboseLog.getKey())) {
// new Runnable() {
// @Override
// public void run() {
// areYouSure(R.string.install_warning, new MaterialDialog.ButtonCallback() {
// @Override
// public void onPositive(MaterialDialog dialog) {
// super.onPositive(dialog);
// Shell.su("pkill -f EdXposed:V").exec();
// }
// });
// }
// };
// } else if (preference.getKey().equals(stopLog.getKey())) {
// new Runnable() {
// @Override
// public void run() {
// areYouSure(R.string.install_warning, new MaterialDialog.ButtonCallback() {
// @Override
// public void onPositive(MaterialDialog dialog) {
// super.onPositive(dialog);
// Shell.su("pkill -f EdXposed-Bridge:V").exec();
// }
// });
// }
// };
// }
return true;
}

private void areYouSure(int contentTextId, MaterialDialog.ButtonCallback yesHandler) {
new MaterialDialog.Builder(Objects.requireNonNull(getActivity())).title(R.string.areyousure)
.content(contentTextId)
.iconAttr(android.R.attr.alertDialogIcon)
.positiveText(android.R.string.yes)
.negativeText(android.R.string.no).callback(yesHandler).show();
}

private boolean checkPermissions() {
if (Build.VERSION.SDK_INT < 23) return false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import android.view.animation.Transformation;
import android.widget.LinearLayout;

import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.widget.Toolbar;
import androidx.core.view.GravityCompat;
Expand Down Expand Up @@ -129,12 +130,7 @@ public void switchFragment(int itemId) {
mSelectedId = mNavigationView.getMenu().getItem(itemId).getItemId();
mNavigationView.getMenu().findItem(mSelectedId).setChecked(true);
mDrawerHandler.removeCallbacksAndMessages(null);
mDrawerHandler.postDelayed(new Runnable() {
@Override
public void run() {
navigate(mSelectedId);
}
}, 250);
mDrawerHandler.postDelayed(() -> navigate(mSelectedId), 250);
mDrawerLayout.closeDrawers();
}

Expand Down Expand Up @@ -241,7 +237,7 @@ public void run() {
}

@Override
protected void onSaveInstanceState(Bundle outState) {
protected void onSaveInstanceState(@NonNull Bundle outState) {
super.onSaveInstanceState(outState);
outState.putInt(SELECTED_ITEM_ID, mSelectedId);
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<string name="reboot_confirmation">您想要现在重启吗?</string>
<string name="reboot_recovery_confirmation">您想要现在重启至恢复模式吗?</string>
<string name="install_warning_title">请小心!</string>
<string name="install_warning">某些情况下,您的设备可能会在安装 EdXposed 过后变得无法正常启动。\n\n如果您先前从未听说过「软变砖」或「无限重启」,又或者您不知道如何从这些情况中恢复手机,那么请"<b>不要</b>"安装 EdXposed!\n\n无论如何,都强烈建议您做好近期的数据备份。</string>
<string name="install_warning">某些情况下,您的设备可能会在安装 EdXposed 过后变得无法正常启动。\n\n如果您先前从未听说过「软变砖」或「无限重启」,又或者您不知道如何从这些情况中恢复手机,那么请"<b>不要</b>"安装或使用 EdXposed!\n\n无论如何,都强烈建议您做好近期的数据备份。</string>
<string name="dont_show_again">不再提示</string>
<string name="install_known_issue">EdXposed 与您的设备间似乎存在已知的问题(\"%s\")。这可能将导致 EdXposed 无法被安装或是更为严重的问题。点击这里来了解详情。</string>
<string name="installed_lollipop">EdXposed 框架 %s 版已激活。</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<string name="reboot_confirmation">Do you want to reboot now?</string>
<string name="reboot_recovery_confirmation">Do you want to reboot to recovery now?</string>
<string name="install_warning_title">Be careful!</string>
<string name="install_warning">In some cases, your device might no longer boot after installing EdXposed.\n\nIf you never heard about \"soft brick\" and \"bootloop\" before or if you don\'t know how to recover from such a situation, do <b>NOT</b> install EdXposed!\n\nIn any case, having a recent backup is highly recommended.</string>
<string name="install_warning">In some cases, your device might no longer boot after installing EdXposed.\n\nIf you never heard about \"soft brick\" and \"bootloop\" before or if you don\'t know how to recover from such a situation, do <b>NOT</b> install or use EdXposed!\n\nIn any case, having a recent backup is highly recommended.</string>
<string name="dont_show_again">Don\'t show this again</string>
<string name="install_known_issue">There seems to be a known issue (\"%s\") with your ROM. Installing EdXposed might not work or lead to severe problems. Click here for details about the issue.</string>
<string name="installed_lollipop">EdXposed Framework version %s is active.</string>
Expand Down
40 changes: 23 additions & 17 deletions app/src/main/res/xml/prefs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -206,27 +206,27 @@

</PreferenceCategory>

<PreferenceCategory
android:key="group_log"
android:title="@string/settings_group_log">
<!-- <PreferenceCategory-->
<!-- android:key="group_log"-->
<!-- android:title="@string/settings_group_log">-->

<SwitchPreference
android:defaultValue="false"
android:key="disable_verbose_log"
android:summary="@string/pref_disable_verbose_log_summary"
android:title="@string/pref_title_disable_verbose_log" />
<!-- <SwitchPreference-->
<!-- android:defaultValue="false"-->
<!-- android:key="disable_verbose_log"-->
<!-- android:summary="@string/pref_disable_verbose_log_summary"-->
<!-- android:title="@string/pref_title_disable_verbose_log" />-->

<Preference
android:key="stop_verbose_log"
android:summary="@string/stop_verbose_log_summary"
android:title="@string/stop_verbose_log" />
<!-- <Preference-->
<!-- android:key="stop_verbose_log"-->
<!-- android:summary="@string/stop_verbose_log_summary"-->
<!-- android:title="@string/stop_verbose_log" />-->

<Preference
android:key="stop_log"
android:summary="@string/stop_log_summary"
android:title="@string/stop_log" />
<!-- <Preference-->
<!-- android:key="stop_log"-->
<!-- android:summary="@string/stop_log_summary"-->
<!-- android:title="@string/stop_log" />-->

</PreferenceCategory>
<!-- </PreferenceCategory>-->

<PreferenceCategory
android:key="group_edxposed"
Expand Down Expand Up @@ -255,5 +255,11 @@
android:key="enable_boot_image_deopt"
android:summary="@string/pref_enable_boot_image_deopt_summary"
android:title="@string/pref_title_enable_boot_image_deopt" />

<SwitchPreference
android:defaultValue="false"
android:key="disable_verbose_log"
android:summary="@string/pref_disable_verbose_log_summary"
android:title="@string/pref_title_disable_verbose_log" />
</PreferenceCategory>
</PreferenceScreen>

0 comments on commit 0ef4fd2

Please sign in to comment.