Merge change 26867 into eclair
* changes:
fix bug where siilent mode dissapears when it triggers instead of animating off to the left edge.
diff --git a/api/current.xml b/api/current.xml
index b5352d1..9de4797 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -118785,6 +118785,17 @@
visibility="public"
>
</field>
+<field name="ACTION_PRIVACY_SETTINGS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.settings.PRIVACY_SETTINGS""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="ACTION_QUICK_LAUNCH_SETTINGS"
type="java.lang.String"
transient="false"
diff --git a/core/java/android/provider/Browser.java b/core/java/android/provider/Browser.java
index 028d3d7..4600b49 100644
--- a/core/java/android/provider/Browser.java
+++ b/core/java/android/provider/Browser.java
@@ -274,6 +274,32 @@
}
/**
+ * Returns all the URLs in the history.
+ * Requires {@link android.Manifest.permission#READ_HISTORY_BOOKMARKS}
+ * @param cr The ContentResolver used to access the database.
+ * @hide pending API council approval
+ */
+ public static final String[] getVisitedHistory(ContentResolver cr) {
+ try {
+ String[] projection = new String[] { "url" };
+ Cursor c = cr.query(BOOKMARKS_URI,
+ projection,
+ "visits > 0",
+ null, null);
+ String[] str = new String[c.getCount()];
+ int i = 0;
+ while (c.moveToNext()) {
+ str[i] = c.getString(0);
+ i++;
+ }
+ c.deactivate();
+ return str;
+ } catch (IllegalStateException e) {
+ return new String[0];
+ }
+ }
+
+ /**
* If there are more than MAX_HISTORY_COUNT non-bookmark history
* items in the bookmark/history table, delete TRUNCATE_N_OLDEST
* of them. This is used to keep our history table to a
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 8d10fde..e3fc72d 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -148,6 +148,20 @@
"android.settings.SECURITY_SETTINGS";
/**
+ * Activity Action: Show settings to allow configuration of privacy options.
+ * <p>
+ * In some cases, a matching Activity may not exist, so ensure you
+ * safeguard against this.
+ * <p>
+ * Input: Nothing.
+ * <p>
+ * Output: Nothing.
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_PRIVACY_SETTINGS =
+ "android.settings.PRIVACY_SETTINGS";
+
+ /**
* Activity Action: Show settings to allow configuration of Wi-Fi.
* <p>
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index c87e5a5..f617401 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -30,6 +30,7 @@
import android.os.Looper;
import android.os.Message;
import android.os.Process;
+import android.provider.Browser;
import android.util.Log;
import android.util.SparseBooleanArray;
import android.view.KeyEvent;
@@ -310,6 +311,10 @@
});
}
+ protected String[] populateVisitedLinks() {
+ return Browser.getVisitedHistory(mContext.getContentResolver());
+ }
+
/**
* Shows a prompt to ask the user to set the Geolocation permission state
* for the given origin.