MDM Edit Bookmark Restriction

When enabled through the MDM mechanism, Bookmark editing
operations are disabled:
- Edit and Delete pop-up menu options are disabled
- The 'Add Bookmark' and 'New Folder' buttons are greyed
  and if pressed a Toast message is displayed: 'Managed
  by your administrator'
- All existing bookmark items (except the MDM Managed
  tree if it is present) are overlaid with a lock icon
  (existing: ic_deco_secure).
- The 'Star' icon is greyed and if pressed results in
  the above Toast message

New files are the core implementation of the
EditBookmarksRestriction and the tests for it:
    EditBookmarksRestriction.java
    EditBookmarkRestrictionsTest.java

Note the has been some refactoring in BrowserBookmarksAdapter.java
to simplify the handling of bitmaps with regard to
overlay operations.  We now always set the bitmaps
with setImageBitmap() instead of sometimes using
setImageResource(). This simplifies the code considerably
but does result in a side effect: Folder icons look a bit
different now because they are translated and scaled the same
way as bookmark bitmaps. So instead of center-crop, they appear
as if they are scaled width-wise and top-aligned. Personally,
I like the look, but if its not acceptable, I'll adjust it as needed.

Change-Id: I966f84485873593ca70f2822cdace30a15464c44
diff --git a/src/com/android/browser/BookmarkItem.java b/src/com/android/browser/BookmarkItem.java
index 76115cf..b230de6 100644
--- a/src/com/android/browser/BookmarkItem.java
+++ b/src/com/android/browser/BookmarkItem.java
@@ -98,6 +98,10 @@
         }
     }
 
+    public int getFavIconIntrinsicWidth() {
+        return mImageView.getDrawable().getIntrinsicWidth();
+    }
+
     void setFaviconBackground(Drawable d) {
         mImageView.setBackgroundDrawable(d);
     }