about debug activation
This commit is contained in:
@@ -1,53 +1,36 @@
|
||||
package ru.vtosters.lite.utils;
|
||||
|
||||
import static ru.vtosters.lite.utils.AndroidUtils.edit;
|
||||
import static ru.vtosters.lite.utils.AndroidUtils.getApplicationName;
|
||||
import static ru.vtosters.lite.utils.AndroidUtils.getGlobalContext;
|
||||
import static ru.vtosters.lite.utils.AndroidUtils.getIdentifier;
|
||||
import static ru.vtosters.lite.utils.AndroidUtils.sendToast;
|
||||
import static ru.vtosters.lite.utils.Preferences.VERSIONNAME;
|
||||
import static ru.vtosters.lite.utils.Preferences.devmenu;
|
||||
import static ru.vtosters.lite.utils.Preferences.isValidSignature;
|
||||
import static ru.vtosters.lite.utils.Preferences.oldabout;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.vk.about.Items;
|
||||
import com.vk.about.Items1;
|
||||
import com.vk.about.Items2;
|
||||
import android.view.View;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class About {
|
||||
public static void injectAbout(List<Items2> list) {
|
||||
list.clear();
|
||||
list.add(new Items1());
|
||||
|
||||
if (!oldabout()) {
|
||||
list.add(new Items(21, getIdentifier("opencommit", "string")));
|
||||
list.add(new Items(8, getIdentifier("tgchannel", "string")));
|
||||
list.add(new Items(9, getIdentifier("tgchat", "string")));
|
||||
list.add(new Items(16, getIdentifier("vtfaq", "string")));
|
||||
list.add(new Items(19, getIdentifier("vtsite", "string")));
|
||||
list.add(new Items(20, getIdentifier("donate", "string")));
|
||||
list.add(new Items(17, getIdentifier("vkgroup", "string")));
|
||||
list.add(new Items(18, getIdentifier("sett_debug", "string")));
|
||||
return;
|
||||
}
|
||||
|
||||
list.add(new Items(0, getIdentifier("about_app_feedback", "string")));
|
||||
list.add(new Items(1, getIdentifier("about_app_estimate", "string")));
|
||||
list.add(new Items(2, getIdentifier("about_app_privacy", "string")));
|
||||
list.add(new Items(5, getIdentifier("about_app_cookie", "string")));
|
||||
list.add(new Items(3, getIdentifier("about_app_terms_to_use", "string")));
|
||||
list.add(new Items(4, getIdentifier("about_app_license", "string")));
|
||||
list.add(new Items(6, getIdentifier("about_app_data_protect", "string")));
|
||||
list.add(new Items(8, getIdentifier("sett_debug", "string")));
|
||||
}
|
||||
|
||||
public static String getBuildNumber() {
|
||||
return getBuild(getGlobalContext(), "version.properties");
|
||||
}
|
||||
|
||||
public static void injectToToolBar(View view) {
|
||||
view.setOnLongClickListener(v -> {
|
||||
if (devmenu()) {
|
||||
sendToast("Меню для разработчиков уже активировано");
|
||||
} else {
|
||||
edit().putBoolean("devmenu", true).apply();
|
||||
sendToast("Меню для разработчиков активировано");
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
public static String getCommitLink() {
|
||||
return "https://git.maki.su/gdlbo/lite/commit/" + getBuild(getGlobalContext(), "version.properties"); // https://github.com/vtosters/lite/commit/ github repo
|
||||
}
|
||||
|
||||
@@ -509,6 +509,8 @@
|
||||
|
||||
move-result-object p2
|
||||
|
||||
invoke-static {p2}, Lru/vtosters/lite/utils/About;->injectToToolBar(Landroid/view/View;)V
|
||||
|
||||
check-cast p2, Landroidx/appcompat/widget/Toolbar;
|
||||
|
||||
const v0, 0x7f080376
|
||||
|
||||
Reference in New Issue
Block a user