@Override
 public void openBookmark(BookmarkId bookmark, int launchLocation) {
   clearSelection();
   if (EnhancedBookmarkUtils.openBookmark(
       mEnhancedBookmarksModel, mActivity, bookmark, launchLocation)) {
     EnhancedBookmarkUtils.finishActivityOnPhone(mActivity);
   }
 }
예제 #2
0
 /**
  * Shows enhanced bookmark main UI, if it is turned on. Does nothing if it is turned off.
  *
  * @return True if enhanced bookmark is on, false otherwise.
  */
 public static boolean showEnhancedBookmarkIfEnabled(Activity activity) {
   if (!isEnhancedBookmarkEnabled(Profile.getLastUsedProfile().getOriginalProfile())) {
     return false;
   }
   if (DeviceFormFactor.isTablet(activity)) {
     openBookmark(activity, UrlConstants.BOOKMARKS_URL);
   } else {
     activity.startActivity(new Intent(activity, EnhancedBookmarkActivity.class));
   }
   return true;
 }