.
This commit is contained in:
12
.idea/deploymentTargetDropDown.xml
generated
12
.idea/deploymentTargetDropDown.xml
generated
@@ -1,18 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<runningDeviceTargetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="SERIAL_NUMBER" />
|
||||
<value value="RZCW41EJRPN" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</runningDeviceTargetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2023-10-30T14:39:29.458770Z" />
|
||||
<targetsSelectedWithDialog>
|
||||
<Target>
|
||||
<type value="QUICK_BOOT_TARGET" />
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
|
||||
<!-- For app blocking -> open new window over other apps to deny access-->
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||
|
||||
<!-- permissions for app blocking -->
|
||||
<uses-permission
|
||||
android:name="android.permission.PACKAGE_USAGE_STATS"
|
||||
|
||||
@@ -286,6 +286,17 @@ public class FUAActivity extends AppCompatActivity {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
// settings app
|
||||
try {
|
||||
Intent settingsIntent = new Intent(Settings.ACTION_SETTINGS);
|
||||
ActivityInfo settingsInfo = settingsIntent.resolveActivityInfo(getPackageManager(), 0);
|
||||
if (settingsInfo != null && settingsInfo.packageName != null){
|
||||
appsName.remove(settingsInfo.packageName);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
mySharedPref.setArrayList("APP_LIST", appsName);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,10 @@ public class MySharedPref {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void removeKey(String key){
|
||||
appSharedPrefs.edit().remove(key).apply();
|
||||
}
|
||||
|
||||
public Set<String> getArrayList(String key) {
|
||||
return appSharedPrefs.getStringSet(key, null);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.app.simplitend.appblocking;
|
||||
import android.accessibilityservice.AccessibilityService;
|
||||
import android.accessibilityservice.AccessibilityServiceInfo;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
@@ -44,8 +45,7 @@ public class TopAppDetectionService extends AccessibilityService {
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
String appName;
|
||||
try {
|
||||
String[] split_name = packageName.split("\\.");
|
||||
appName = split_name[split_name.length-1].toUpperCase();
|
||||
appName = getPackageManager().getApplicationLabel(getPackageManager().getApplicationInfo(packageName, PackageManager.GET_META_DATA)).toString();
|
||||
}catch (Exception e){
|
||||
appName = "This app";
|
||||
}
|
||||
|
||||
@@ -580,11 +580,7 @@ public abstract class AppUtil {
|
||||
|
||||
// app block list clear
|
||||
MySharedPref mySharedPref = new MySharedPref(context);
|
||||
Set<String> appList = mySharedPref.getArrayList("APP_LIST");
|
||||
if (appList != null) {
|
||||
appList.clear();
|
||||
mySharedPref.setArrayList("APP_LIST", appList);
|
||||
}
|
||||
mySharedPref.removeKey("APP_LIST");
|
||||
|
||||
// removing contact listing
|
||||
setWhiteListedContacts(context, null);
|
||||
|
||||
@@ -88,7 +88,6 @@
|
||||
android:inputType="textCapWords"
|
||||
|
||||
android:maxLength="50"
|
||||
|
||||
android:digits="@string/allowed_alphabets_with_space"
|
||||
/>
|
||||
|
||||
@@ -387,7 +386,7 @@
|
||||
android:autofillHints="postalAddress"
|
||||
android:inputType="text|textCapSentences"
|
||||
|
||||
android:maxLength="50"
|
||||
android:maxLength="255"
|
||||
/>
|
||||
|
||||
<EditText
|
||||
|
||||
@@ -71,6 +71,8 @@
|
||||
android:maxLines="1"
|
||||
|
||||
android:maxLength="255"
|
||||
android:digits="@string/allowed_alphanumeric_space_special"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -107,10 +109,10 @@
|
||||
|
||||
android:autofillHints="name"
|
||||
android:inputType="textCapWords"
|
||||
android:maxLines="1"
|
||||
|
||||
android:maxLength="50"
|
||||
|
||||
android:singleLine="true"
|
||||
android:digits="@string/allowed_alphabets_with_space"
|
||||
/>
|
||||
|
||||
@@ -244,7 +246,9 @@
|
||||
android:inputType="text|textCapWords"
|
||||
android:maxLines="1"
|
||||
|
||||
android:maxLength="255"
|
||||
android:maxLength="50"
|
||||
android:digits="@string/allowed_alphanumeric_space_special"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -284,6 +288,8 @@
|
||||
android:maxLines="1"
|
||||
|
||||
android:maxLength="255"
|
||||
android:digits="@string/allowed_alphanumeric_space_special"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -323,6 +329,7 @@
|
||||
android:maxLines="1"
|
||||
|
||||
android:maxLength="255"
|
||||
android:digits="@string/allowed_alphanumeric_space_special"
|
||||
/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
|
||||
@@ -76,7 +76,9 @@
|
||||
|
||||
android:maxLength="50"
|
||||
|
||||
android:digits="@string/allowed_alphabets_n_numbers_with_space"
|
||||
android:singleLine="true"
|
||||
|
||||
android:digits="@string/allowed_alphanumeric_space_special"
|
||||
|
||||
/>
|
||||
|
||||
@@ -787,7 +789,7 @@
|
||||
android:inputType="textCapSentences"
|
||||
android:maxHeight="150dp"
|
||||
|
||||
android:maxLength="60"
|
||||
android:maxLength="255"
|
||||
android:overScrollMode="always"
|
||||
|
||||
android:padding="10dp"
|
||||
@@ -800,6 +802,9 @@
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
android:digits="@string/allowed_alphanumeric_space_special"
|
||||
android:singleLine="true"
|
||||
|
||||
/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
|
||||
@@ -76,6 +76,9 @@
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
android:maxLength="50"
|
||||
android:singleLine="true"
|
||||
|
||||
android:digits="@string/allowed_alphanumeric_space_special"
|
||||
|
||||
/>
|
||||
|
||||
@@ -140,7 +143,8 @@
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="vertical"
|
||||
|
||||
android:maxLength="60"
|
||||
android:maxLength="255"
|
||||
android:digits="@string/allowed_alphanumeric_space_special"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -154,6 +154,7 @@
|
||||
|
||||
android:maxLength="50"
|
||||
android:digits="@string/allowed_alphabets_with_space"
|
||||
android:singleLine="true"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
@@ -367,7 +368,6 @@
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
|
||||
android:maxLength="255"
|
||||
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@@ -469,5 +469,6 @@
|
||||
<string name="allowed_numbers">1234567890</string>
|
||||
<string name="close_">Close</string>
|
||||
<string name="subscribe_cancelled_description">Your subscription has been canceled. You will be able to use your application until the end of your current subscription. Your app will stop working at that point.</string>
|
||||
<string name="allowed_alphanumeric_space_special"><![CDATA[abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~!@#$%^&*()-_+=[]{}|:;\'\"<>,.?/]]></string>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user