summaryrefslogtreecommitdiff
path: root/src/com/android/browser/Controller.java
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-11-11 15:13:52 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-11 15:13:52 +0000
commitb25f78332afbb3242bee61c7b7be37fefbdd7c7e (patch)
treeadfddcf1f88a31852f4099a4526b9a06f82dcf37 /src/com/android/browser/Controller.java
parente915522070010656582d4c651ab74b1ac4a94ac5 (diff)
parent897b8838bb59fa89226a4b72e27571eefe43ca60 (diff)
am 897b8838: Merge "Handle error condition when inserting snapshots" into ics-mr1
* commit '897b8838bb59fa89226a4b72e27571eefe43ca60': Handle error condition when inserting snapshots
Diffstat (limited to 'src/com/android/browser/Controller.java')
-rw-r--r--src/com/android/browser/Controller.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 9710669f..9402a77d 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -1624,12 +1624,20 @@ public class Controller
@Override
protected Long doInBackground(Tab... params) {
Uri result = cr.insert(Snapshots.CONTENT_URI, values);
+ if (result == null) {
+ return null;
+ }
long id = ContentUris.parseId(result);
return id;
}
@Override
protected void onPostExecute(Long id) {
+ if (id == null) {
+ Toast.makeText(mActivity, R.string.snapshot_failed,
+ Toast.LENGTH_SHORT).show();
+ return;
+ }
Bundle b = new Bundle();
b.putLong(BrowserSnapshotPage.EXTRA_ANIMATE_ID, id);
mUi.showComboView(ComboViews.Snapshots, b);