Bug 1356596 - Add warning when entering full screen mode. r=sebastian
authorNevin Chen <cnevinchen@gmail.com>
Thu, 24 Aug 2017 08:39:19 -0400
changeset 376579 b3fb981d0e10bcae8c73f6be6856fea266b30017
parent 376578 d6cb21ad4634c44af440ecec0b82d5f94a71d22d
child 376580 4723934741c51affa834f6866ca5fe5c419ddfe8
push id32387
push userryanvm@gmail.com
push dateFri, 25 Aug 2017 00:13:42 +0000
treeherdermozilla-central@3199bacd6b38 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1356596
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1356596 - Add warning when entering full screen mode. r=sebastian MozReview-Commit-ID: 2QZFylS2Ry3
mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
mobile/android/base/locales/en-US/android_strings.dtd
mobile/android/base/strings.xml.in
--- a/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/GeckoApp.java
@@ -1025,16 +1025,21 @@ public abstract class GeckoApp extends G
     }
 
     @Override // GeckoView.ContentListener
     public void onTitleChange(final GeckoView view, final String title) {
     }
 
     @Override // GeckoView.ContentListener
     public void onFullScreen(final GeckoView view, final boolean fullScreen) {
+        if (fullScreen) {
+            SnackbarBuilder.builder(this)
+                    .message(R.string.fullscreen_warning)
+                    .duration(Snackbar.LENGTH_LONG).buildAndShow();
+        }
         ThreadUtils.assertOnUiThread();
         ActivityUtils.setFullScreen(this, fullScreen);
     }
 
     protected void setFullScreen(final boolean fullscreen) {
         ThreadUtils.postToUiThread(new Runnable() {
             @Override
             public void run() {
--- a/mobile/android/base/locales/en-US/android_strings.dtd
+++ b/mobile/android/base/locales/en-US/android_strings.dtd
@@ -852,8 +852,10 @@ is simply hidden from the Activity Strea
 <!ENTITY activity_stream_welcome_title "Welcome to your Highlights">
 <!ENTITY activity_stream_welcome_content1 "&brandShortName; now creates highlights of things you\'ve discovered on the web so you can find your way back to great articles, videos, bookmarks, and other pages.">
 <!ENTITY activity_stream_welcome_dismiss "Dismiss">
 
 <!ENTITY private_tab_panel_title "Private Browsing + Tracking Protection">
 <!ENTITY private_tab_panel_description "&brandShortName; blocks parts of the pages that may track your browsing activity.">
 <!ENTITY private_tab_panel_description2 "We won\'t remember any history, but downloaded files and new bookmarks will still be saved to your device.">
 <!ENTITY private_tab_learn_more "Want to learn more?">
+
+<!ENTITY fullscreen_warning "Entered full screen">
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -631,9 +631,11 @@
   <string name="activity_stream_welcome_title">&activity_stream_welcome_title;</string>
   <string name="activity_stream_welcome_content">&activity_stream_welcome_content1;</string>
   <string name="activity_stream_welcome_dismiss">&activity_stream_welcome_dismiss;</string>
 
   <string name="private_tab_panel_title">&private_tab_panel_title;</string>
   <string name="private_tab_panel_description">&private_tab_panel_description;</string>
   <string name="private_tab_panel_description2">&private_tab_panel_description2;</string>
   <string name="private_tab_learn_more">&private_tab_learn_more;</string>
+
+  <string name="fullscreen_warning">&fullscreen_warning;</string>
 </resources>