mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 22:12:55 +00:00
parent
c9a27b830d
commit
bb4450a00b
6 changed files with 24 additions and 20 deletions
|
@ -1,7 +1,5 @@
|
||||||
package com.beemdevelopment.aegis;
|
package com.beemdevelopment.aegis;
|
||||||
|
|
||||||
import android.Manifest;
|
|
||||||
import android.os.Build;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
@ -64,9 +62,10 @@ public abstract class AegisTest {
|
||||||
|
|
||||||
private static GrantPermissionRule getGrantPermissionRule() {
|
private static GrantPermissionRule getGrantPermissionRule() {
|
||||||
List<String> perms = new ArrayList<>();
|
List<String> perms = new ArrayList<>();
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
// NOTE: Disabled for now. See issue: #1047
|
||||||
|
/*if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
perms.add(Manifest.permission.POST_NOTIFICATIONS);
|
perms.add(Manifest.permission.POST_NOTIFICATIONS);
|
||||||
}
|
}*/
|
||||||
return GrantPermissionRule.grant(perms.toArray(new String[0]));
|
return GrantPermissionRule.grant(perms.toArray(new String[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,10 @@
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
|
||||||
|
|
||||||
|
<!-- NOTE: Disabled for now. See issue: #1047
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||||
|
-->
|
||||||
|
|
||||||
<uses-feature
|
<uses-feature
|
||||||
android:name="android.hardware.camera"
|
android:name="android.hardware.camera"
|
||||||
|
@ -92,7 +95,9 @@
|
||||||
</activity>
|
</activity>
|
||||||
<activity android:name=".ui.ExitActivity" />
|
<activity android:name=".ui.ExitActivity" />
|
||||||
|
|
||||||
|
<!-- NOTE: Disabled for now. See issue: #1047
|
||||||
<service android:name=".services.NotificationService" />
|
<service android:name=".services.NotificationService" />
|
||||||
|
-->
|
||||||
|
|
||||||
<service
|
<service
|
||||||
android:name=".services.LaunchAppTileService"
|
android:name=".services.LaunchAppTileService"
|
||||||
|
|
|
@ -65,9 +65,10 @@ public abstract class AegisApplicationBase extends Application {
|
||||||
initAppShortcuts();
|
initAppShortcuts();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
// NOTE: Disabled for now. See issue: #1047
|
||||||
|
/*if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
initNotificationChannels();
|
initNotificationChannels();
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.N_MR1)
|
@RequiresApi(api = Build.VERSION_CODES.N_MR1)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.beemdevelopment.aegis.ui;
|
package com.beemdevelopment.aegis.ui;
|
||||||
|
|
||||||
import android.Manifest;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
@ -32,7 +31,6 @@ import com.beemdevelopment.aegis.crypto.MasterKey;
|
||||||
import com.beemdevelopment.aegis.helpers.BiometricsHelper;
|
import com.beemdevelopment.aegis.helpers.BiometricsHelper;
|
||||||
import com.beemdevelopment.aegis.helpers.EditTextHelper;
|
import com.beemdevelopment.aegis.helpers.EditTextHelper;
|
||||||
import com.beemdevelopment.aegis.helpers.MetricsHelper;
|
import com.beemdevelopment.aegis.helpers.MetricsHelper;
|
||||||
import com.beemdevelopment.aegis.helpers.PermissionHelper;
|
|
||||||
import com.beemdevelopment.aegis.helpers.UiThreadExecutor;
|
import com.beemdevelopment.aegis.helpers.UiThreadExecutor;
|
||||||
import com.beemdevelopment.aegis.ui.dialogs.Dialogs;
|
import com.beemdevelopment.aegis.ui.dialogs.Dialogs;
|
||||||
import com.beemdevelopment.aegis.ui.tasks.PasswordSlotDecryptTask;
|
import com.beemdevelopment.aegis.ui.tasks.PasswordSlotDecryptTask;
|
||||||
|
@ -97,9 +95,11 @@ public class AuthActivity extends AegisActivity {
|
||||||
// A persistent notification is shown to let the user know that the vault is unlocked. Permission
|
// A persistent notification is shown to let the user know that the vault is unlocked. Permission
|
||||||
// to do so is required since API 33, so for existing users, we have to request permission here
|
// to do so is required since API 33, so for existing users, we have to request permission here
|
||||||
// in order to be able to show the notification after unlock.
|
// in order to be able to show the notification after unlock.
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
//
|
||||||
|
// NOTE: Disabled for now. See issue: #1047
|
||||||
|
/*if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
PermissionHelper.request(this, CODE_PERM_NOTIFICATIONS, Manifest.permission.POST_NOTIFICATIONS);
|
PermissionHelper.request(this, CODE_PERM_NOTIFICATIONS, Manifest.permission.POST_NOTIFICATIONS);
|
||||||
}
|
}*/
|
||||||
} else {
|
} else {
|
||||||
_inhibitBioPrompt = savedInstanceState.getBoolean("inhibitBioPrompt", false);
|
_inhibitBioPrompt = savedInstanceState.getBoolean("inhibitBioPrompt", false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,6 @@ import static com.beemdevelopment.aegis.ui.slides.SecurityPickerSlide.CRYPT_TYPE
|
||||||
import static com.beemdevelopment.aegis.ui.slides.SecurityPickerSlide.CRYPT_TYPE_NONE;
|
import static com.beemdevelopment.aegis.ui.slides.SecurityPickerSlide.CRYPT_TYPE_NONE;
|
||||||
import static com.beemdevelopment.aegis.ui.slides.SecurityPickerSlide.CRYPT_TYPE_PASS;
|
import static com.beemdevelopment.aegis.ui.slides.SecurityPickerSlide.CRYPT_TYPE_PASS;
|
||||||
|
|
||||||
import android.Manifest;
|
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
@ -16,7 +14,6 @@ import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.beemdevelopment.aegis.R;
|
import com.beemdevelopment.aegis.R;
|
||||||
import com.beemdevelopment.aegis.ThemeMap;
|
import com.beemdevelopment.aegis.ThemeMap;
|
||||||
import com.beemdevelopment.aegis.helpers.PermissionHelper;
|
|
||||||
import com.beemdevelopment.aegis.ui.dialogs.Dialogs;
|
import com.beemdevelopment.aegis.ui.dialogs.Dialogs;
|
||||||
import com.beemdevelopment.aegis.ui.intro.IntroBaseActivity;
|
import com.beemdevelopment.aegis.ui.intro.IntroBaseActivity;
|
||||||
import com.beemdevelopment.aegis.ui.intro.SlideFragment;
|
import com.beemdevelopment.aegis.ui.intro.SlideFragment;
|
||||||
|
@ -80,11 +77,13 @@ public class IntroActivity extends IntroBaseActivity {
|
||||||
protected void onAfterSlideChanged(@Nullable Class<? extends SlideFragment> oldSlide, @NonNull Class<? extends SlideFragment> newSlide) {
|
protected void onAfterSlideChanged(@Nullable Class<? extends SlideFragment> oldSlide, @NonNull Class<? extends SlideFragment> newSlide) {
|
||||||
// If the user has enabled encryption, we need to request permission to show notifications
|
// If the user has enabled encryption, we need to request permission to show notifications
|
||||||
// in order to be able to show the "Vault unlocked" notification.
|
// in order to be able to show the "Vault unlocked" notification.
|
||||||
if (newSlide == DoneSlide.class && getState().getSerializable("creds") != null) {
|
//
|
||||||
|
// NOTE: Disabled for now. See issue: #1047
|
||||||
|
/*if (newSlide == DoneSlide.class && getState().getSerializable("creds") != null) {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
PermissionHelper.request(this, CODE_PERM_NOTIFICATIONS, Manifest.permission.POST_NOTIFICATIONS);
|
PermissionHelper.request(this, CODE_PERM_NOTIFICATIONS, Manifest.permission.POST_NOTIFICATIONS);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.beemdevelopment.aegis.vault;
|
package com.beemdevelopment.aegis.vault;
|
||||||
|
|
||||||
import android.Manifest;
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.backup.BackupManager;
|
import android.app.backup.BackupManager;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
|
@ -15,7 +14,6 @@ import com.beemdevelopment.aegis.Preferences;
|
||||||
import com.beemdevelopment.aegis.R;
|
import com.beemdevelopment.aegis.R;
|
||||||
import com.beemdevelopment.aegis.crypto.KeyStoreHandle;
|
import com.beemdevelopment.aegis.crypto.KeyStoreHandle;
|
||||||
import com.beemdevelopment.aegis.crypto.KeyStoreHandleException;
|
import com.beemdevelopment.aegis.crypto.KeyStoreHandleException;
|
||||||
import com.beemdevelopment.aegis.helpers.PermissionHelper;
|
|
||||||
import com.beemdevelopment.aegis.services.NotificationService;
|
import com.beemdevelopment.aegis.services.NotificationService;
|
||||||
import com.beemdevelopment.aegis.ui.dialogs.Dialogs;
|
import com.beemdevelopment.aegis.ui.dialogs.Dialogs;
|
||||||
|
|
||||||
|
@ -351,13 +349,15 @@ public class VaultManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startNotificationService() {
|
private void startNotificationService() {
|
||||||
if (PermissionHelper.granted(_context, Manifest.permission.POST_NOTIFICATIONS)) {
|
// NOTE: Disabled for now. See issue: #1047
|
||||||
|
/*if (PermissionHelper.granted(_context, Manifest.permission.POST_NOTIFICATIONS)) {
|
||||||
_context.startService(getNotificationServiceIntent());
|
_context.startService(getNotificationServiceIntent());
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopNotificationService() {
|
private void stopNotificationService() {
|
||||||
_context.stopService(getNotificationServiceIntent());
|
// NOTE: Disabled for now. See issue: #1047
|
||||||
|
//_context.stopService(getNotificationServiceIntent());
|
||||||
}
|
}
|
||||||
|
|
||||||
private Intent getNotificationServiceIntent() {
|
private Intent getNotificationServiceIntent() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue