Page MenuHomePhabricator

[native] [33/40] RN 0.70: Replace old AndroidLifecycleModule with new Expo one
ClosedPublic

Authored by ashoat on Dec 19 2022, 7:05 AM.
Tags
None
Referenced Files
F3384786: D5934.id19674.diff
Thu, Nov 28, 10:31 PM
F3384784: D5934.id19663.diff
Thu, Nov 28, 10:31 PM
F3384783: D5934.diff
Thu, Nov 28, 10:30 PM
Unknown Object (File)
Mon, Nov 25, 10:15 PM
Unknown Object (File)
Mon, Nov 25, 12:56 PM
Unknown Object (File)
Fri, Nov 22, 7:12 AM
Unknown Object (File)
Fri, Nov 22, 6:32 AM
Unknown Object (File)
Fri, Nov 22, 6:27 AM
Subscribers

Details

Summary

Context about this new Expo module in D5932.

Depends on D5933

Test Plan

I patched the following into native/root.react.js:

import * as AndroidLifecycleModule from './lifecycle/lifecycle-module';

if (Platform.OS === 'android') {
  console.log(`androidLifecycle.ACTIVE: ${AndroidLifecycleModule.ACTIVE ?? 'null or undefined'}`);
  console.log(`androidLifecycle.initialStatus: ${AndroidLifecycleModule.initialStatus ?? 'null or undefined'}`);
  addLifecycleListener(status => { console.log(`onChange ${status ?? 'null or undefined'}`) });
}

It resulted in the following output after I started, then backgrounded, and then foregrounded the app:

LOG  androidLifecycle.ACTIVE: active
LOG  androidLifecycle.initialStatus: active
LOG  onChange background
LOG  onChange active

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Dec 19 2022, 7:06 AM
Harbormaster failed remote builds in B14318: Diff 19561!
Harbormaster returned this revision to the author for changes because remote builds failed.Dec 19 2022, 9:11 AM
Harbormaster failed remote builds in B14390: Diff 19639!

Please ignore CI until the end of the stack

This revision is now accepted and ready to land.Dec 19 2022, 12:12 PM