Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix notification open not launching main activity by default on app cold start #1276

Merged
merged 3 commits into from
Feb 5, 2021

Commits on Feb 3, 2021

  1. Fixed app open on cold start from notification

    * Main activity wasn't luanching when tapping on a notification that
    resulted in the app being cold started.
    * This was fixed by adding a missing startActivity and removing an
    unneeded PendingIntent
    * This was a bug interduced in PR #1192 in 4.0.0 release
    jkasten2 committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    0326d93 View commit details
    Browse the repository at this point in the history
  2. rm isTaskRoot & NEW_TASK flag from notifi open

    * Cleans up unneeded logic and confirmed no behavior changes.
    * `FLAG_ACTIVITY_NEW_TASK` is not needed as `getLaunchIntentForPackage`
    already defaults this.
       - See Android ASOP source code
       - Android 11 - https://cs.android.com/android/platform/superproject/+/android-11.0.0_r3:frameworks/base/core/java/android/app/ApplicationPackageManager.java;l=251
       - Android 4 - https://cs.android.com/android/platform/superproject/+/android-4.0.4_r2.1:frameworks/base/core/java/android/app/ApplicationPackageManager.java;l=121
    jkasten2 committed Feb 3, 2021
    Configuration menu
    Copy the full SHA
    b27ac14 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2021

  1. Clean up of startOrResumeApp

    * No behavior changes in this commit, just clean up
    * inContext -> activity - As we are requiring an Activity, not just any Context
    * Early retrun for launchIntent null check.
    * Better comment of why launchIntent has a null check
    jkasten2 committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    14c340f View commit details
    Browse the repository at this point in the history