summaryrefslogtreecommitdiffstats
path: root/services/devicepolicy
diff options
context:
space:
mode:
authorRobin Lee <rgl@google.com>2015-05-05 15:57:17 +0100
committerRobin Lee <rgl@google.com>2015-05-14 07:15:18 +0100
commit39087b1cec6a54e96ab9eafe8317952720790533 (patch)
tree2cf6abb18a200d9d55423ab3280f91e4396e2f8c /services/devicepolicy
parenta47fb5ad5d3863bc6de418c7269d2463f39f432b (diff)
downloadframeworks_base-39087b1cec6a54e96ab9eafe8317952720790533.zip
frameworks_base-39087b1cec6a54e96ab9eafe8317952720790533.tar.gz
frameworks_base-39087b1cec6a54e96ab9eafe8317952720790533.tar.bz2
Replace String host:port/url args with Uri arg
Uri provides a stronger guarantee of well-formedness and lets apps do nice extra things like specifying scheme etc. without twisting any expectations. Bug: 20820034 Change-Id: Ia6bbedb74765444920b667d643fb7e1eb6a7292b
Diffstat (limited to 'services/devicepolicy')
-rw-r--r--services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index 8e4bc50..69e5f74 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -3198,8 +3198,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
}
@Override
- public void choosePrivateKeyAlias(final int uid, final String host, int port, final String url,
- final String alias, final IBinder response) {
+ public void choosePrivateKeyAlias(final int uid, final Uri uri, final String alias,
+ final IBinder response) {
// Caller UID needs to be trusted, so we restrict this method to SYSTEM_UID callers.
if (UserHandle.getAppId(Binder.getCallingUid()) != Process.SYSTEM_UID) {
return;
@@ -3216,9 +3216,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
Intent intent = new Intent(DeviceAdminReceiver.ACTION_CHOOSE_PRIVATE_KEY_ALIAS);
intent.setComponent(profileOwner);
intent.putExtra(DeviceAdminReceiver.EXTRA_CHOOSE_PRIVATE_KEY_SENDER_UID, uid);
- intent.putExtra(DeviceAdminReceiver.EXTRA_CHOOSE_PRIVATE_KEY_HOST, host);
- intent.putExtra(DeviceAdminReceiver.EXTRA_CHOOSE_PRIVATE_KEY_PORT, port);
- intent.putExtra(DeviceAdminReceiver.EXTRA_CHOOSE_PRIVATE_KEY_URL, url);
+ intent.putExtra(DeviceAdminReceiver.EXTRA_CHOOSE_PRIVATE_KEY_URI, uri);
intent.putExtra(DeviceAdminReceiver.EXTRA_CHOOSE_PRIVATE_KEY_ALIAS, alias);
intent.putExtra(DeviceAdminReceiver.EXTRA_CHOOSE_PRIVATE_KEY_RESPONSE, response);