Skip to content

Commit

Permalink
Setting ANDROID_LONG_TIMER_MESSAGE to '(ADVICE)'
Browse files Browse the repository at this point in the history
This commit is based on a suggestion made by a Firebase member facebook#17083.
Longer timers are used in critical parts of Firebase-SDK such as refreshing the token; Its a bad user experience if the token expires and users need to keep login to the application! We appreciate your cooperation.
  • Loading branch information
samsafay committed Jan 3, 2018
1 parent a8391bd commit efddf1d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Libraries/Core/Timers/JSTimers.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ const IDLE_CALLBACK_FRAME_DEADLINE = 1;

const MAX_TIMER_DURATION_MS = 60 * 1000;
const IS_ANDROID = Platform.OS === 'android';
const ANDROID_LONG_TIMER_MESSAGE =
'Setting a timer for a long period of time, i.e. multiple minutes, is a ' +
'performance and correctness issue on Android as it keeps the timer ' +
'module awake, and timers can only be called when the app is in the foreground. ' +
'See https://github.com/facebook/react-native/issues/12981 for more info.';
const ANDROID_LONG_TIMER_MESSAGE = '(ADVICE)';

// Parallel arrays
const callbacks: Array<?Function> = [];
Expand Down

0 comments on commit efddf1d

Please sign in to comment.