コード例 #1
0
 /**
  * Initializes an {@link RecentFolderObserver} object that receives a call to {@link #onChanged()}
  * when the controller changes the recent folder.
  *
  * @param controller
  */
 public RecentFolderList initialize(RecentFolderController controller) {
   if (controller == null) {
     LogUtils.wtf(LOG_TAG, "RecentFolderObserver initialized with null controller!");
   }
   mController = controller;
   mController.registerRecentFolderObserver(this);
   return mController.getRecentFolders();
 }
コード例 #2
0
 /** Unregisters for recent folder changes and makes the object unusable. */
 public void unregisterAndDestroy() {
   if (mController == null) {
     return;
   }
   mController.unregisterRecentFolderObserver(this);
 }
コード例 #3
0
 /**
  * Return the most current recent folder.
  *
  * @return
  */
 public final RecentFolderList getRecentFolders() {
   if (mController == null) {
     return null;
   }
   return mController.getRecentFolders();
 }