Skip to content

Commit c7d98c4

Browse files
authored
4.0
1 parent ee0f6da commit c7d98c4

93 files changed

Lines changed: 3321 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/build.gradle

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
plugins {
2+
id 'com.android.application'
3+
}
4+
5+
android {
6+
compileSdkVersion 30
7+
buildToolsVersion "30.0.2"
8+
9+
defaultConfig {
10+
applicationId "com.huntmix.secbutton"
11+
minSdkVersion 24
12+
targetSdkVersion 30
13+
versionCode 4
14+
versionName "4.0 - Upgrade"
15+
16+
}
17+
18+
buildTypes {
19+
release {
20+
minifyEnabled true
21+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22+
}
23+
}
24+
compileOptions {
25+
sourceCompatibility JavaVersion.VERSION_1_8
26+
targetCompatibility JavaVersion.VERSION_1_8
27+
}
28+
}
29+
30+
dependencies {
31+
32+
implementation 'androidx.appcompat:appcompat:1.2.0'
33+
implementation 'com.google.android.material:material:1.3.0'
34+
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
35+
implementation 'com.github.isabsent:filepicker:1.1.01'
36+
implementation 'com.intuit.sdp:sdp-android:1.0.4'
37+
implementation 'com.google.code.gson:gson:2.8.6'
38+
implementation 'androidx.appcompat:appcompat:1.2.0'
39+
implementation 'com.google.android.material:material:1.3.0'
40+
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
41+
implementation 'androidx.recyclerview:recyclerview:1.1.0'
42+
implementation 'androidx.preference:preference:1.1.1'
43+
implementation 'com.github.Dan629pl:nordan-material-dialog-android:1.0.7'
44+
}

app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile

app/src/main/AndroidManifest.xml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="com.huntmix.secbutton">
5+
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
6+
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
7+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
8+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
9+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
10+
<uses-permission android:name="android.permission.RECEIVE_SMS" />
11+
<uses-permission
12+
android:name="android.permission.BROADCAST_SMS"
13+
tools:ignore="ProtectedPermissions" />
14+
<uses-permission android:name="android.permission.READ_SMS" />
15+
<uses-permission
16+
android:name="android.permission.QUERY_ALL_PACKAGES"
17+
tools:ignore="QueryAllPackagesPermission" />
18+
<application
19+
android:requestLegacyExternalStorage="true"
20+
android:allowBackup="true"
21+
android:icon="@mipmap/ic_launcher"
22+
android:label="@string/app_name"
23+
android:roundIcon="@mipmap/ic_launcher"
24+
android:supportsRtl="true"
25+
android:theme="@style/Theme.SecurityAddon">
26+
<activity android:name="com.huntmix.secbutton.MainActivity">
27+
<intent-filter>
28+
<action android:name="android.intent.action.MAIN" />
29+
30+
<category android:name="android.intent.category.LAUNCHER" />
31+
</intent-filter>
32+
</activity>
33+
<activity
34+
android:name="com.huntmix.secbutton.SelectApps"
35+
android:icon="@mipmap/ic_launcher"
36+
android:label="@string/app_name" />
37+
<activity
38+
android:name="com.huntmix.secbutton.SettingsActivity"
39+
android:icon="@mipmap/ic_launcher"
40+
android:label="@string/app_name" />
41+
<activity
42+
android:name="com.huntmix.secbutton.Deleter"
43+
android:exported="true"
44+
android:label="Delete Apps" />
45+
<activity
46+
android:name="com.huntmix.secbutton.Decrypter"
47+
android:label="Delete Apps" /> <activity
48+
android:name="com.huntmix.secbutton.About"
49+
android:label="Delete Apps" />
50+
<service
51+
android:name="com.huntmix.secbutton.Backgroundstarter"
52+
android:enabled="true"
53+
android:exported="true" />
54+
<service
55+
android:name="com.huntmix.secbutton.Backgrounddecrypt"
56+
android:enabled="true"
57+
android:exported="true" />
58+
<receiver android:name="com.huntmix.secbutton.SmsListener">
59+
<intent-filter android:priority="1000">
60+
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
61+
</intent-filter>
62+
</receiver>
63+
</application>
64+
65+
</manifest>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package com.huntmix.secbutton;
2+
3+
import android.content.Intent;
4+
import android.net.Uri;
5+
import android.os.Build;
6+
import android.os.Bundle;
7+
import android.view.View;
8+
import android.view.Window;
9+
import android.view.WindowManager;
10+
11+
import androidx.annotation.RequiresApi;
12+
import androidx.appcompat.app.ActionBar;
13+
import androidx.appcompat.app.AppCompatActivity;
14+
import androidx.core.content.ContextCompat;
15+
16+
public class About extends AppCompatActivity {
17+
18+
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
19+
@Override
20+
protected void onCreate(Bundle savedInstanceState) {
21+
super.onCreate(savedInstanceState);
22+
setContentView(R.layout.activity_about);
23+
ActionBar actionBar = getSupportActionBar();
24+
actionBar.hide();
25+
getWindow().setNavigationBarColor(ContextCompat.getColor(this, R.color.purple_700));
26+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
27+
Window window = getWindow();
28+
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
29+
window.setStatusBarColor(ContextCompat.getColor(this, R.color.purple_700));
30+
}
31+
}
32+
public void github(View view){
33+
Uri uri = Uri.parse("https://github.com/huntmix/securityaddon");
34+
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
35+
startActivity(intent);
36+
}
37+
public void btc(View view){
38+
Uri uri = Uri.parse("https://www.blockchain.com/btc/address/18qThTvXwJZNCehe3k7UjQ7LCZK3jZdmno");
39+
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
40+
startActivity(intent);
41+
}
42+
public void other(View view){
43+
Uri uri = Uri.parse("https://huntmix.ru/rekv.html");
44+
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
45+
startActivity(intent);
46+
}
47+
}
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
package com.huntmix.secbutton;
2+
3+
4+
5+
import android.content.Context;
6+
import android.graphics.drawable.Drawable;
7+
import android.os.Build;
8+
import android.util.Log;
9+
import android.view.LayoutInflater;
10+
import android.view.View;
11+
import android.view.ViewGroup;
12+
import android.widget.CheckBox;
13+
import android.widget.ImageView;
14+
import android.widget.RelativeLayout;
15+
import android.widget.TextView;
16+
17+
import androidx.annotation.RequiresApi;
18+
import androidx.recyclerview.widget.RecyclerView;
19+
20+
import java.util.ArrayList;
21+
import java.util.List;
22+
23+
public class Adapter extends RecyclerView.Adapter<Adapter.ViewHolder> {
24+
;
25+
26+
public Context justcontext;
27+
public String result = "";
28+
private ArrayList<GetInfo> data;
29+
List selected = new ArrayList();
30+
;
31+
32+
public Adapter(Context context, ArrayList<GetInfo> list) {
33+
justcontext = context;
34+
data = list;
35+
36+
}
37+
38+
39+
40+
41+
public static class ViewHolder extends RecyclerView.ViewHolder {
42+
43+
public TextView nameofapk;
44+
public TextView nameofpkg;
45+
public ImageView iconofapp;
46+
public CheckBox selector;
47+
public RelativeLayout fullitem;
48+
49+
public ViewHolder(View v) {
50+
super(v);
51+
// Get the widgets reference from custom layout
52+
nameofapk = (TextView) v.findViewById(R.id.nameofapp);
53+
nameofpkg = (TextView) v.findViewById(R.id.apkpkg);
54+
iconofapp = (ImageView) v.findViewById(R.id.iconofapp);
55+
selector = (CheckBox) v.findViewById(R.id.selector);
56+
fullitem = (RelativeLayout) v.findViewById(R.id.item);
57+
}
58+
59+
}
60+
61+
@Override
62+
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
63+
64+
View v = LayoutInflater.from(justcontext).inflate(R.layout.apkitem, parent, false);
65+
ViewHolder vh = new ViewHolder(v);
66+
return vh;
67+
}
68+
69+
@Override
70+
public void onBindViewHolder(ViewHolder holder, final int position) {
71+
72+
// Get pkg
73+
final String packageName = data.get(position).getAppPackage();
74+
75+
// Get thicon
76+
Drawable icon = data.get(position).getAppIcon();
77+
78+
// Get label
79+
String label = data.get(position).getAppName();
80+
81+
// Set label
82+
holder.nameofapk.setText(label);
83+
84+
// Set pkg
85+
holder.nameofpkg.setText(packageName);
86+
87+
// Set icon
88+
holder.iconofapp.setImageDrawable(icon);
89+
90+
holder.selector.setChecked(data.get(position).isSelected());
91+
//onclick set checkbox state and append pkg to list with writing to db
92+
holder.fullitem.setOnClickListener(new View.OnClickListener() {
93+
94+
95+
96+
@RequiresApi(api = Build.VERSION_CODES.O)
97+
@Override
98+
public void onClick(View v) {
99+
TinyDB tinydb = new TinyDB(justcontext);
100+
data.get(position).setSelected(!data.get(position).isSelected());
101+
Adapter.this.notifyDataSetChanged();
102+
String pkg = packageName;
103+
if (selected.contains(pkg)){
104+
selected.remove(pkg);
105+
}else{
106+
selected.add(pkg);
107+
}
108+
tinydb.putListString("list", (ArrayList<String>) selected);
109+
Log.e("pkg", String.valueOf(selected));
110+
111+
112+
}
113+
114+
});
115+
116+
117+
118+
119+
}
120+
121+
@Override
122+
public int getItemCount() {
123+
// Count the installed apps
124+
return data.size();
125+
}
126+
127+
128+
129+
}

0 commit comments

Comments
 (0)