Use system setting for default geolocation permissions
This reverts change I0be5dbf4d99d07ca13b07fb299155c5aa17a51bd
and adds an observer on the new default geolocation permission
secure setting.
Bug http://b/issue?id=2535598
Change-Id: I4edcbd3080b7d3af5dc6d74f26779b6d92248010
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index ff16e4e..406132f 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -365,6 +365,11 @@
}
// Work out which packages are installed on the system.
getInstalledPackages();
+
+ // Start watching the default geolocation permissions
+ mSystemAllowGeolocationOrigins
+ = new SystemAllowGeolocationOrigins(getApplicationContext());
+ mSystemAllowGeolocationOrigins.start();
}
/**
@@ -981,6 +986,10 @@
WebIconDatabase.getInstance().close();
unregisterReceiver(mPackageInstallationReceiver);
+
+ // Stop watching the default geolocation permissions
+ mSystemAllowGeolocationOrigins.stop();
+ mSystemAllowGeolocationOrigins = null;
}
@Override
@@ -3872,6 +3881,8 @@
private BroadcastReceiver mPackageInstallationReceiver;
+ private SystemAllowGeolocationOrigins mSystemAllowGeolocationOrigins;
+
// activity requestCode
final static int COMBO_PAGE = 1;
final static int DOWNLOAD_PAGE = 2;