Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c268341e authored by Pranav Vashi's avatar Pranav Vashi Committed by Luca Stefani
Browse files

LineageParts: Fix KeyHandler for opening messaging app



This fixes touchscreen gesture assigned to messaging app. Before this fix
it would open random app - System Tracer for me, Google Photos for someone
else.

Change-Id: I5675382c5bdeaaca304ca5bbec4c123fd0327674
Signed-off-by: default avatarPranav Vashi <neobuddy89@gmail.com>
parent b8fc3efb
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -285,15 +285,11 @@ public class KeyHandler implements DeviceKeyHandler {
    private void launchMessages() {
        mGestureWakeLock.acquire(GESTURE_WAKELOCK_DURATION);
        mPowerManager.wakeUp(SystemClock.uptimeMillis(), GESTURE_WAKEUP_REASON);
        final String defaultApplication = Settings.Secure.getString(
                mContext.getContentResolver(), "sms_default_application");
        final PackageManager pm = mContext.getPackageManager();
        final Intent intent = pm.getLaunchIntentForPackage(defaultApplication);
        if (intent != null) {
        final Intent intent = getLaunchableIntent(
                new Intent(Intent.ACTION_VIEW, Uri.parse("sms:")));
        startActivitySafely(intent);
        doHapticFeedback();
    }
    }

    private void toggleFlashlight() {
        String rearCameraId = getRearCameraId();