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
F1880777: D5934.diff
Mon, May 27, 11:29 PM
Unknown Object (File)
Sun, May 26, 7:44 AM
Unknown Object (File)
Sat, May 25, 11:22 AM
Unknown Object (File)
Sat, May 25, 4:42 AM
Unknown Object (File)
Fri, May 24, 6:35 PM
Unknown Object (File)
Fri, May 24, 6:35 PM
Unknown Object (File)
Fri, May 24, 6:35 PM
Unknown Object (File)
Fri, May 24, 6:34 PM
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