summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/AddBookmarkPage.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/browser/AddBookmarkPage.java')
-rw-r--r--src/com/android/browser/AddBookmarkPage.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/browser/AddBookmarkPage.java b/src/com/android/browser/AddBookmarkPage.java
index 92717d3..c1bafd6 100644
--- a/src/com/android/browser/AddBookmarkPage.java
+++ b/src/com/android/browser/AddBookmarkPage.java
@@ -63,6 +63,8 @@ public class AddBookmarkPage extends Activity
implements View.OnClickListener, TextView.OnEditorActionListener,
AdapterView.OnItemClickListener, LoaderManager.LoaderCallbacks<Cursor> {
+ public static final long DEFAULT_FOLDER_ID = -1;
+
private final String LOGTAG = "Bookmarks";
// IDs for the CursorLoaders that are used.
@@ -194,7 +196,7 @@ public class AddBookmarkPage extends Activity
}
private void descendInto(String foldername, long id) {
- if (id != -1) {
+ if (id != DEFAULT_FOLDER_ID) {
mCurrentFolder = id;
mPaths.add(new Folder(foldername, id));
updatePathString();
@@ -358,9 +360,9 @@ public class AddBookmarkPage extends Activity
url = mOriginalUrl = mMap.getString("url");
mTouchIconUrl = mMap.getString("touch_icon_url");
mThumbnail = (Bitmap) mMap.getParcelable("thumbnail");
- mCurrentFolder = mMap.getLong(BrowserContract.Bookmarks.PARENT, -1);
+ mCurrentFolder = mMap.getLong(BrowserContract.Bookmarks.PARENT, DEFAULT_FOLDER_ID);
}
- if (mCurrentFolder == -1) {
+ if (mCurrentFolder == DEFAULT_FOLDER_ID) {
mCurrentFolder = getBookmarksBarId(this);
}