Clarify restore dialog, prevent spam
Bug: 4599646
State that it is the browser's windows/tabs to be restored and
show the browser's app icon in the dialog.
Also cut down on the frequency this prompt will appear by
ignoring tabs that haven't loaded anything except the home page.
Change-Id: I2c2cc03aa92da3199c47b455256145d392548930
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 911f724..e3ca09a 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -640,8 +640,10 @@
// Save all the tabs
mTabControl.saveState(outState, saveImages);
- // Save time so that we know how old incognito tabs (if any) are.
- outState.putSerializable("lastActiveDate", Calendar.getInstance());
+ if (!outState.isEmpty()) {
+ // Save time so that we know how old incognito tabs (if any) are.
+ outState.putSerializable("lastActiveDate", Calendar.getInstance());
+ }
}
void onResume() {