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

[TIMOB-26240] Android: Removed harmless activity errors/warnings logged on startup #10219

Merged
merged 2 commits into from Jul 31, 2018

Conversation

jquick-axway
Copy link
Contributor

JIRA:
https://jira.appcelerator.org/browse/TIMOB-26240

Summary:

  • Removed null activity error/warning log messages.
    • It's up to the caller to decide if they should be logged, not the method.
    • It's okay for these methods to return null if there are no activities, such as when the app was launched in the background via a BroadcastReceiver.
  • Changed TiApplication.getInstance() handling:
    • Changed "tiApp" from weak reference to strong. Guaranteed to exist for lifetime of app, so, it was unnecessary.
    • Removed TiApplication.getInstance() null checks. Not necessary.

Test:

  1. Create a new Titanium app project.
  2. Build and run on an Android device.
  3. Wait for the app to startup.
  4. View the Android log and verify the following have not been logged.
[ERROR] :  TiApplication: (main) [3,913] No valid root or current activity found for application instance
[WARN] :   TiAndroid: (main) [2,915] Application instance no longer available. Unable to get current activity.

…ed on startup

- Changed TiApplication.getInstance() handling:
  * Changed "tiApp" from weak reference to strong. Guaranteed to exist for lifetime of app, so, it was unnecessary.
  * Removed TiApplication.getInstance() null checks.
@build
Copy link
Contributor

build commented Jul 30, 2018

Messages
📖

👍 Hey!, You deleted more code than you added. That's awesome!

📖

💾 Here's the generated SDK zipfile.

Generated by 🚫 dangerJS

Copy link
Contributor

@garymathews garymathews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@hansemannn hansemannn merged commit d7edd8a into tidev:master Jul 31, 2018
@hansemannn hansemannn modified the milestones: 7.4.0, 7.5.0 Aug 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants