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
Unknown Object (File)
Sun, Nov 10, 5:54 PM
Unknown Object (File)
Thu, Nov 7, 5:53 AM
Unknown Object (File)
Wed, Nov 6, 6:26 AM
Unknown Object (File)
Wed, Nov 6, 6:26 AM
Unknown Object (File)
Wed, Nov 6, 6:26 AM
Unknown Object (File)
Mon, Nov 4, 4:09 PM
Unknown Object (File)
Mon, Nov 4, 8:27 AM
Unknown Object (File)
Mon, Nov 4, 8: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
Lint Not Applicable
Unit
Tests Not Applicable

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