Bug 896121 - Disable share in guest mode for the awesomescreen. r=mfinkle

This commit is contained in:
Wes Johnston 2013-08-26 16:41:15 -07:00
parent e708e47c0c
commit d6263ceabe

View File

@ -9,6 +9,7 @@ import org.mozilla.gecko.EditBookmarkDialog;
import org.mozilla.gecko.Favicons; import org.mozilla.gecko.Favicons;
import org.mozilla.gecko.GeckoAppShell; import org.mozilla.gecko.GeckoAppShell;
import org.mozilla.gecko.GeckoEvent; import org.mozilla.gecko.GeckoEvent;
import org.mozilla.gecko.GeckoProfile;
import org.mozilla.gecko.R; import org.mozilla.gecko.R;
import org.mozilla.gecko.ReaderModeUtils; import org.mozilla.gecko.ReaderModeUtils;
import org.mozilla.gecko.Tabs; import org.mozilla.gecko.Tabs;
@ -98,6 +99,8 @@ abstract class HomeFragment extends Fragment {
menu.findItem(R.id.home_remove).setVisible(false); menu.findItem(R.id.home_remove).setVisible(false);
} }
menu.findItem(R.id.home_share).setVisible(!GeckoProfile.get(getActivity()).inGuestMode());
final boolean canOpenInReader = (info.display == Combined.DISPLAY_READER); final boolean canOpenInReader = (info.display == Combined.DISPLAY_READER);
menu.findItem(R.id.home_open_in_reader).setVisible(canOpenInReader); menu.findItem(R.id.home_open_in_reader).setVisible(canOpenInReader);
} }