Bug 1208391 - Restricted profiles: Hide "private browsing" hint in empty state. r=mcomella, a=lizzard
authorSebastian Kaspari <s.kaspari@gmail.com>
Fri, 25 Sep 2015 17:08:31 +0200
changeset 297904 cd3819abb9a2be38ac377a74a4896611d6e28c4c
parent 297903 2e344546c91226510e9145006019f6a241079659
child 297905 96c8de96e3cea88d30e0070994f7dd780bc0b2b0
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella, lizzard
bugs1208391
milestone43.0a2
Bug 1208391 - Restricted profiles: Hide "private browsing" hint in empty state. r=mcomella, a=lizzard
mobile/android/base/home/HistoryPanel.java
--- a/mobile/android/base/home/HistoryPanel.java
+++ b/mobile/android/base/home/HistoryPanel.java
@@ -314,16 +314,20 @@ public class HistoryPanel extends HomeFr
 
             final SpannableStringBuilder hintBuilder = formatHintText(hintText);
             if (hintBuilder != null) {
                 emptyHint.setText(hintBuilder);
                 emptyHint.setMovementMethod(LinkMovementMethod.getInstance());
                 emptyHint.setVisibility(View.VISIBLE);
             }
 
+            if (!RestrictedProfiles.isAllowed(getActivity(), Restriction.DISALLOW_PRIVATE_BROWSING)) {
+                emptyHint.setVisibility(View.GONE);
+            }
+
             mList.setEmptyView(mEmptyView);
         }
     }
 
     /**
      * Make Span that is clickable, italicized, and underlined
      * between the string markers <code>FORMAT_S1</code> and
      * <code>FORMAT_S2</code>.