Skip to content

Improved ui and security#173

Open
ap0803apap-sketch wants to merge 15 commits intoaload0:masterfrom
ap0803apap-sketch:master
Open

Improved ui and security#173
ap0803apap-sketch wants to merge 15 commits intoaload0:masterfrom
ap0803apap-sketch:master

Conversation

@ap0803apap-sketch
Copy link

Improved ui and security
added fix for app lock bypass
anti uninstall feature improved and many more

- **Anti-Uninstall Improvements**:
    - Introduced granular settings to protect Device Admin, Usage Stats, Accessibility, and Overlay settings from being tampered with.
    - Implemented recursive node inspection in `AppLockAccessibilityService` to detect and block access to AppLock's "App Info" and uninstallation pages.
    - Added extensive class name mappings for Samsung and stock Android settings pages to improve detection reliability.
    - Updated `AdminDisableActivity` to explicitly remove active admin status upon verified deactivation.

- **Lock Screen & Security**:
    - Improved `PasswordOverlayActivity` to block Home and Recents button bypasses by listening for system dialog closures.
    - Added display of the locked app's icon and a "Continue to [App Name]" header on the lock screen for better UX.
    - Enhanced immersive mode settings to hide system UI and disable gestures while the lock screen is active.
    - Implemented a more robust `isServiceRunning` check across different backend implementations.

- **UI & UX**:
    - Refactored `AppIntroScreen` to require both Accessibility and Usage Stats permissions regardless of the selected locking method to ensure anti-uninstall features work correctly.
    - Updated `SettingsScreen` to sync state with the repository on resume and pre-fetch string resources.
    - Improved the toggling behavior of setting items using the `toggleable` modifier for better accessibility.

- **Technical Changes**:
    - Updated `AppLockAccessibilityService` to run as a foreground service with `systemExempted` type where applicable.
    - Switched `SharedPreferences` operations to use `commit = true` for immediate data persistence in critical settings.
    - Expanded accessibility event types to include `typeWindowContentChanged` and `typeWindowsChanged` for better UI monitoring.
- **Anti-Uninstall Improvements**:
    - Introduced granular settings to protect Device Admin, Usage Stats, Accessibility, and Overlay settings from being tampered with.
    - Implemented recursive node inspection in `AppLockAccessibilityService` to detect and block access to AppLock's "App Info" and uninstallation pages.
    - Added extensive class name mappings for Samsung and stock Android settings pages to improve detection reliability.
    - Updated `AdminDisableActivity` to explicitly remove active admin status upon verified deactivation.

- **Lock Screen & Security**:
    - Improved `PasswordOverlayActivity` to block Home and Recents button bypasses by listening for system dialog closures.
    - Added display of the locked app's icon and a "Continue to [App Name]" header on the lock screen for better UX.
    - Enhanced immersive mode settings to hide system UI and disable gestures while the lock screen is active.
    - Implemented a more robust `isServiceRunning` check across different backend implementations.

- **UI & UX**:
    - Refactored `AppIntroScreen` to require both Accessibility and Usage Stats permissions regardless of the selected locking method to ensure anti-uninstall features work correctly.
    - Updated `SettingsScreen` to sync state with the repository on resume and pre-fetch string resources.
    - Improved the toggling behavior of setting items using the `toggleable` modifier for better accessibility.

- **Technical Changes**:
    - Updated `AppLockAccessibilityService` to run as a foreground service with `systemExempted` type where applicable.
    - Switched `SharedPreferences` operations to use `commit = true` for immediate data persistence in critical settings.
    - Expanded accessibility event types to include `typeWindowContentChanged` and `typeWindowsChanged` for better UI monitoring.
- Rename `app_name` from "App Lock" to "AppLock-alod0-by-AP" in `strings.xml`
…led-mode

Add AMOLED mode toggle in lock screen customization
…ge-features-and-layout

Settings: Add App Theme radio & AMOLED switch; replace Links with Developer Info
**Core & UI**
- **Enhanced Theme Engine:** Implemented a custom Purple/Lavender palette for light and dark modes. Integrated reactive `Flow` states for AMOLED and Theme modes to ensure UI consistency across the app.
- **Settings Screen Refactor:** Completely redesigned the `SettingsScreen` with a more modular `SettingsCard` and `SwitchItem` architecture. Improved permission handling flows for Anti-Uninstall features.
- **App Branding:** Updated the application name to "APP Lock by AP" and refreshed launcher icons with adaptive and monochrome support.

**Security & Protection**
- **Anti-Uninstall Improvements:** Strengthened protection by adding blocking for system settings related to Device Admin, Usage Stats, Accessibility, and Overlay permissions.
- **Improved Detection Logic:** Refined `AppLockAccessibilityService` to better handle Launcher transitions and Recents screen interactions.
- **Grace Period Adjustment:** Increased the navigation grace period to 2000ms for improved stability during app switching.

**Technical Improvements**
- **Flow-based Preferences:** Added `callbackFlow` observers to `PreferencesRepository` for real-time setting updates.
- **Service Stability:** Optimized `AppLockAccessibilityService` by reducing unnecessary event processing and improving launcher package detection.
- **Project Configuration:** Updated `versionCode` to 22302 and added JitPack repository support.
…ion-improved

Summarize the following changes:
- **Intruder Selfie Feature:** Integrated a new security feature that captures a photo via the front camera after a configurable number of failed unlock attempts.
- **New Intruder Screen:** Added a dedicated `IntruderSelfieScreen` to view, manage, and delete captured intruder photos with timestamps.
- **Dynamic Theming:** Implemented support for Material You dynamic colors on Android 12+.
- **AMOLED Mode Refinement:** Enhanced AMOLED dark mode consistency across the UI, ensuring true black backgrounds for surfaces, cards, and containers.
- **UI Improvements:** Refactored the `MainScreen` and `SettingsScreen` with improved spacing, confirmation dialogs for unlocking apps, and better visual states for disabled items.

**Security & Functionality**
- **Lock Screen Enhancements:** Updated the PIN and Pattern overlay screens with improved keypad layouts, larger biometric icons, and better error handling for system navigation events (Home/Recents).
- **Log Management:** Added a utility to export application logs to the device's Downloads folder for easier debugging.
- **Navigation Updates:** Added a "Change Lock" option in settings to allow users to update their PIN or Pattern directly.

**Technical Improvements**
- **State Management:** Optimized `PreferencesRepository` by replacing `callbackFlow` observers with static `MutableStateFlow` instances to ensure consistent state across the application.
- **Camera Integration:** Implemented `IntruderSelfieManager` using the Camera2 API for background "silent" photo capture.
- **Project Configuration:** Updated `versionCode` to 22303, `versionName` to 3.0.0.00, and upgraded Gradle distribution to 9.3.1.
- **Permissions:** Added `CAMERA` permission and hardware feature requirements to the Manifest.
…ovements-and-features

Add password lock + one-time recovery key, biometric Settings gate, and anti-uninstall toggle
- **Simplified Password/Pattern Setup:** Removed the requirement to enter the current PIN, pattern, or password when changing lock settings.
- **Enhanced Authentication:** Integrated Biometric/Device Credential authentication as an alternative to reset passwords and patterns when not in first-time setup mode.
- **Anti-Uninstall Protections:** Added confirmation dialogs when removing anti-uninstall protection from apps to prevent accidental deactivations.
- **Password Complexity:** Updated `SetPasswordTextScreen` to enforce strong password requirements (length, case, numbers, and symbols).

**UI & UX**
- **Lock Screen Visuals:** Refined the `PasswordOverlayScreen` keypad styling with improved container colors and dynamic content color states for better tactile feedback.
- **Improved Navigation:** Reorganized `BackHandler` and "Start Over" logic in setup screens for a more consistent user flow.
- **String Resources:** Added new strings for app protection toggles and authentication prompts.

**Technical Improvements**
- **Version Update:** Incremented `versionCode` to 22304 and `versionName` to 3.1.0.00.
- **Dependencies:** Added `ExperimentalMaterial3Api` opt-in for password text screens.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant