@@ -223,6 +223,7 @@ type PopupInstallPhase =
223223 | 'popup-enabled'
224224 | 'suggest-enable-popup'
225225 // Other browsers:
226+ | 'firefox-android'
226227 | 'suggest-chrome-extension'
227228 | 'other-browser' ;
228229
@@ -233,21 +234,25 @@ class HomeImpl extends React.PureComponent<HomeProps, HomeState> {
233234 let popupInstallPhase = 'other-browser' ;
234235
235236 if ( _isFirefox ( ) ) {
236- popupInstallPhase = 'checking-webchannel' ;
237-
238- // Query the browser to see if the menu button is available.
239- queryIsMenuButtonEnabled ( ) . then (
240- ( isMenuButtonEnabled ) => {
241- this . setState ( {
242- popupInstallPhase : isMenuButtonEnabled
243- ? 'popup-enabled'
244- : 'suggest-enable-popup' ,
245- } ) ;
246- } ,
247- ( ) => {
248- this . setState ( { popupInstallPhase : 'webchannel-unavailable' } ) ;
249- }
250- ) ;
237+ if ( _isAndroid ( ) ) {
238+ popupInstallPhase = 'firefox-android' ;
239+ } else {
240+ popupInstallPhase = 'checking-webchannel' ;
241+
242+ // Query the browser to see if the menu button is available.
243+ queryIsMenuButtonEnabled ( ) . then (
244+ ( isMenuButtonEnabled ) => {
245+ this . setState ( {
246+ popupInstallPhase : isMenuButtonEnabled
247+ ? 'popup-enabled'
248+ : 'suggest-enable-popup' ,
249+ } ) ;
250+ } ,
251+ ( ) => {
252+ this . setState ( { popupInstallPhase : 'webchannel-unavailable' } ) ;
253+ }
254+ ) ;
255+ }
251256 } else if ( _isChromium ( ) ) {
252257 popupInstallPhase = 'suggest-chrome-extension' ;
253258 // TODO: Check if the extension is installed and show the recording
@@ -269,6 +274,8 @@ class HomeImpl extends React.PureComponent<HomeProps, HomeState> {
269274 return this . _renderEnablePopupInstructions ( false ) ;
270275 case 'popup-enabled' :
271276 return this . _renderRecordInstructions ( FirefoxPopupScreenshot ) ;
277+ case 'firefox-android' :
278+ return this . _renderFenixInstructions ( ) ;
272279 case 'suggest-chrome-extension' :
273280 return this . _renderChromeInstructions ( ) ;
274281 case 'other-browser' :
@@ -381,6 +388,55 @@ class HomeImpl extends React.PureComponent<HomeProps, HomeState> {
381388 ) ;
382389 }
383390
391+ _renderFenixInstructions ( ) {
392+ return (
393+ < InstructionTransition key = { 0 } >
394+ < div className = "homeInstructions" data-testid = "home-fenix-instructions" >
395+ { /* Grid container: homeInstructions */ }
396+ { /* Left column: img */ }
397+ < img
398+ className = "homeSectionScreenshot"
399+ src = { PerfScreenshot }
400+ alt = "screenshot of profiler.firefox.com"
401+ />
402+ { /* Right column: instructions */ }
403+ < div >
404+ < DocsButton />
405+ < Localized
406+ id = "Home--fenix-instructions-directly"
407+ elems = { {
408+ a : (
409+ < a href = "https://profiler.firefox.com/docs/#/./guide-profiling-android-directly-on-device?id=profiling-firefox-for-android-directly-on-device" />
410+ ) ,
411+ } }
412+ >
413+ < p >
414+ Firefox for Android can be profiled directly on this device. For
415+ more information, read{ ' ' }
416+ < a > Profiling Firefox for Android directly on device</ a > .
417+ </ p >
418+ </ Localized >
419+ < Localized
420+ id = "Home--fenix-instructions-remotely"
421+ elems = { {
422+ a : (
423+ < a href = "https://profiler.firefox.com/docs/#/./guide-remote-profiling?id=remote-profiling-firefox-for-android" />
424+ ) ,
425+ } }
426+ >
427+ < p >
428+ You can also profile Firefox for Android remotely from Firefox
429+ for desktop. For more information, please consult this
430+ documentation: < a > Profiling Firefox for Android remotely</ a > .
431+ </ p >
432+ </ Localized >
433+ </ div >
434+ { /* end of grid container */ }
435+ </ div >
436+ </ InstructionTransition >
437+ ) ;
438+ }
439+
384440 _renderChromeInstructions ( ) {
385441 const chromeExtensionUrl =
386442 'https://chromewebstore.google.com/detail/firefox-profiler/ljmahpnflmbkgaipnfbpgjipcnahlghn' ;
@@ -700,6 +756,10 @@ function _isChromium(): boolean {
700756 return Boolean ( navigator . userAgent . match ( / C h r o m e \/ \d + \. \d + / ) ) ;
701757}
702758
759+ function _isAndroid ( ) : boolean {
760+ return Boolean ( navigator . userAgent . match ( / \b A n d r o i d \b / i) ) ;
761+ }
762+
703763export const Home = explicitConnect <
704764 OwnHomeProps ,
705765 StateHomeProps ,
0 commit comments