diff --git a/CHANGELOG.md b/CHANGELOG.md
index dd70584..8284866 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,6 @@
- Version displayed within the app has now been changed to also reflect the exact Git commit when the app is built.
- File Shuttle no longer appends ".null" or ".bin" suffixes unnecessarily. This should make it work much better with file managers such as Material Files.
- File Shuttle now triggers media scanning much more robustly. Media files (pictures, videos, etc.) copied into the work profile should now show up much quicker in gallery apps.
-- Added a fake NFC payment service to workaround a bug in Android that prevents payment apps inside the work profile from being used if none is present in the main profile.
1.8
===
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 23f5253..a4767f4 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -20,7 +20,6 @@
-
@@ -157,19 +156,6 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/java/net/typeblog/shelter/services/PaymentStubService.java b/app/src/main/java/net/typeblog/shelter/services/PaymentStubService.java
deleted file mode 100644
index 8b9c713..0000000
--- a/app/src/main/java/net/typeblog/shelter/services/PaymentStubService.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package net.typeblog.shelter.services;
-
-import android.nfc.cardemulation.HostApduService;
-import android.os.Bundle;
-
-public class PaymentStubService extends HostApduService {
- @Override
- public byte[] processCommandApdu(byte[] commandApdu, Bundle extras) {
- // We do not handle anything
- notifyUnhandled();
- return null;
- }
-
- @Override
- public void onDeactivated(int reason) {
-
- }
-}
diff --git a/app/src/main/java/net/typeblog/shelter/ui/SettingsFragment.java b/app/src/main/java/net/typeblog/shelter/ui/SettingsFragment.java
index 85498b8..22fe946 100644
--- a/app/src/main/java/net/typeblog/shelter/ui/SettingsFragment.java
+++ b/app/src/main/java/net/typeblog/shelter/ui/SettingsFragment.java
@@ -35,7 +35,6 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Prefer
private static final String SETTINGS_AUTO_FREEZE_SERVICE = "settings_auto_freeze_service";
private static final String SETTINGS_AUTO_FREEZE_DELAY = "settings_auto_freeze_delay";
private static final String SETTINGS_SKIP_FOREGROUND = "settings_dont_freeze_foreground";
- private static final String SETTINGS_PAYMENT_STUB = "settings_payment_stub";
private SettingsManager mManager = SettingsManager.getInstance();
private IShelterService mServiceWork = null;
@@ -44,7 +43,6 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Prefer
private CheckBoxPreference mPrefBlockContactsSearching = null;
private CheckBoxPreference mPrefAutoFreezeService = null;
private CheckBoxPreference mPrefSkipForeground = null;
- private CheckBoxPreference mPrefPaymentStub = null;
private Preference mPrefAutoFreezeDelay = null;
@@ -80,9 +78,6 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Prefer
mPrefBlockContactsSearching = (CheckBoxPreference) findPreference(SETTINGS_BLOCK_CONTACTS_SEARCHING);
mPrefBlockContactsSearching.setChecked(mManager.getBlockContactsSearchingEnabled());
mPrefBlockContactsSearching.setOnPreferenceChangeListener(this);
- mPrefPaymentStub = (CheckBoxPreference) findPreference(SETTINGS_PAYMENT_STUB);
- mPrefPaymentStub.setChecked(mManager.getPaymentStubEnabled());
- mPrefPaymentStub.setOnPreferenceChangeListener(this);
// === Services ===
mPrefAutoFreezeService = (CheckBoxPreference) findPreference(SETTINGS_AUTO_FREEZE_SERVICE);
@@ -208,9 +203,6 @@ public class SettingsFragment extends PreferenceFragmentCompat implements Prefer
mManager.setSkipForegroundEnabled(true);
return true;
- } else if (preference == mPrefPaymentStub) {
- mManager.setPaymentStubEnabled((boolean) newState);
- return true;
} else {
return false;
}
diff --git a/app/src/main/java/net/typeblog/shelter/util/LocalStorageManager.java b/app/src/main/java/net/typeblog/shelter/util/LocalStorageManager.java
index 4292036..aa45fb4 100644
--- a/app/src/main/java/net/typeblog/shelter/util/LocalStorageManager.java
+++ b/app/src/main/java/net/typeblog/shelter/util/LocalStorageManager.java
@@ -17,7 +17,6 @@ public class LocalStorageManager {
public static final String PREF_DONT_FREEZE_FOREGROUND = "dont_freeze_foreground";
public static final String PREF_AUTO_FREEZE_DELAY = "auto_freeze_delay";
public static final String PREF_BLOCK_CONTACTS_SEARCHING = "block_contacts_searching";
- public static final String PREF_PAYMENT_STUB = "payment_stub";
private static final String LIST_DIVIDER = ",";
diff --git a/app/src/main/java/net/typeblog/shelter/util/SettingsManager.java b/app/src/main/java/net/typeblog/shelter/util/SettingsManager.java
index 03f79ec..2b4e3e7 100644
--- a/app/src/main/java/net/typeblog/shelter/util/SettingsManager.java
+++ b/app/src/main/java/net/typeblog/shelter/util/SettingsManager.java
@@ -5,7 +5,6 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
-import net.typeblog.shelter.services.PaymentStubService;
import net.typeblog.shelter.ui.DummyActivity;
public class SettingsManager {
@@ -47,7 +46,6 @@ public class SettingsManager {
// Enforce all settings
public void applyAll() {
applyCrossProfileFileChooser();
- applyPaymentStub();
}
// Read and apply the enabled state of the cross profile file chooser
@@ -119,22 +117,4 @@ public class SettingsManager {
public boolean getSkipForegroundEnabled() {
return mStorage.getBoolean(LocalStorageManager.PREF_DONT_FREEZE_FOREGROUND);
}
-
- public boolean getPaymentStubEnabled() {
- return mStorage.getBoolean(LocalStorageManager.PREF_PAYMENT_STUB);
- }
-
- public void setPaymentStubEnabled(boolean enabled) {
- mStorage.setBoolean(LocalStorageManager.PREF_PAYMENT_STUB, enabled);
- applyPaymentStub();
- }
-
- // Enable / disable the payment stub component based on settings in local storage
- public void applyPaymentStub() {
- boolean enabled = mStorage.getBoolean(LocalStorageManager.PREF_PAYMENT_STUB);
- mContext.getPackageManager().setComponentEnabledSetting(
- new ComponentName(mContext, PaymentStubService.class),
- enabled ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED : PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
- PackageManager.DONT_KILL_APP);
- }
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 573039d..9327590 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -5,7 +5,6 @@
Shelter
App Isolation Service
Shelter needs to become Device Admin in order to perform its isolation tasks.
- Payment Service Stub (DO NOT USE)
Welcome to Shelter
@@ -71,8 +70,6 @@
When enabled, you\'ll be able to browse / view / pick / copy files in Shelter from main profile and vice-versa, ONLY through Documents UI (named Files or Documents on your launcher) or apps with Documents UI support (they only gain temporary access to files you choose in Documents UI), while still pertaining the filesystem isolation.
Block Contacts Searching
Deny access from main profile to contacts inside work profile.
- Payment Service Stub
- Enable a fake NFC payment service in the main profile, so that the "contactless payments" option under Settings - NFC becomes enabled to allow you to choose a payment app inside the work profile. This works around an Android bug that makes it impossible to select a payment app inside the work profile if none is available in the main profile.
Services
Auto Freeze Service
When the screen is locked, automatically freeze apps launched from \"Unfreeze & Launch Shortcut\".
diff --git a/app/src/main/res/xml/payment_stub.xml b/app/src/main/res/xml/payment_stub.xml
deleted file mode 100644
index a6ac793..0000000
--- a/app/src/main/res/xml/payment_stub.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/xml/preferences_settings.xml b/app/src/main/res/xml/preferences_settings.xml
index 2935234..419cd18 100644
--- a/app/src/main/res/xml/preferences_settings.xml
+++ b/app/src/main/res/xml/preferences_settings.xml
@@ -15,11 +15,6 @@
android:title="@string/settings_block_contacts_searching"
android:summary="@string/settings_block_contacts_searching_desc" />
-
-