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

Don't reconstruct app component on split-screen #32536

Closed
wants to merge 1 commit into from

Conversation

Somena1
Copy link
Contributor

@Somena1 Somena1 commented Nov 4, 2021

Summary

When switching between split screen or resizing the screen window on Android causes a restart by reconstructing the app components as described on this issue #25040

Changelog

[Android] [Fixed] - Don't reconstruct app components #25040

Test Plan

How to reproduce

  • create a new project
  • build app and install on Android
  • minimize app and start split screen
    Expected:
  • App enters split screen
    Result:
  • App restart

Same issue can be seen when resizing the split screen window

@facebook-github-bot
Copy link
Contributor

Hi @Somena1!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@pull-bot
Copy link

pull-bot commented Nov 4, 2021

Messages
📖

📋 Verify Changelog Format - A changelog entry has the following format: [CATEGORY] [TYPE] - Message.

CATEGORY may be:
  • General
  • iOS
  • Android
  • JavaScript
  • Internal (for changes that do not need to be called out in the release notes)

TYPE may be:

  • Added, for new features.
  • Changed, for changes in existing functionality.
  • Deprecated, for soon-to-be removed features.
  • Removed, for now removed features.
  • Fixed, for any bug fixes.
  • Security, in case of vulnerabilities.

MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.

Generated by 🚫 dangerJS against 2bee11f

@react-native-bot react-native-bot added Bug Platform: Android Android applications. labels Nov 4, 2021
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: ebb26cf
Branch: main

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 9,350,969 +0
android hermes armeabi-v7a 8,333,034 +0
android hermes x86 9,983,357 +0
android hermes x86_64 9,768,730 +0
android jsc arm64-v8a 10,665,547 +0
android jsc armeabi-v7a 9,311,086 +0
android jsc x86 10,777,605 +0
android jsc x86_64 11,216,905 +0

Base commit: ebb26cf
Branch: main

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 4, 2021
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 4, 2021
@facebook-github-bot
Copy link
Contributor

@yungsters has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@yungsters merged this pull request in fc962c9.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Nov 5, 2021
gnprice pushed a commit to Somena1/zulip-mobile that referenced this pull request Nov 11, 2021
This fixes an issue where the app would restart on entering split
screen, or on resizing the app's side of a split screen.

Basically this line of the Android manifest is making an assurance to
the system that the app is prepared to handle these changes; docs here:
  https://developer.android.com/guide/topics/manifest/activity-element#config
When the system doesn't get that assurance, it just restarts the app
from scratch to be sure.

And empirically the app indeed does just fine when we add those
assurances and then go ahead and switch to split-screen mode, or
resize the app's portion of the split screen.  That layer of things is
basically all RN's job, so RN is handling this just fine -- we just
haven't been letting the system know that we're ready to do so.

Also got this fixed in the RN template app upstream:
  facebook/react-native#32536
  facebook/react-native@fc962c9b6

[greg: expanded commit message]

Fixes: zulip#5068
chetas411 pushed a commit to chetas411/zulip-mobile that referenced this pull request Nov 28, 2021
This fixes an issue where the app would restart on entering split
screen, or on resizing the app's side of a split screen.

Basically this line of the Android manifest is making an assurance to
the system that the app is prepared to handle these changes; docs here:
  https://developer.android.com/guide/topics/manifest/activity-element#config
When the system doesn't get that assurance, it just restarts the app
from scratch to be sure.

And empirically the app indeed does just fine when we add those
assurances and then go ahead and switch to split-screen mode, or
resize the app's portion of the split screen.  That layer of things is
basically all RN's job, so RN is handling this just fine -- we just
haven't been letting the system know that we're ready to do so.

Also got this fixed in the RN template app upstream:
  facebook/react-native#32536
  facebook/react-native@fc962c9b6

[greg: expanded commit message]

Fixes: zulip#5068
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: Android Android applications. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants