diff options
author | Makoto Onuki <omakoto@google.com> | 2015-03-30 20:43:18 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-03-30 20:43:19 +0000 |
commit | dc0078b7947e0b035dce6c61108a48a276b11034 (patch) | |
tree | b0671e28e934de457741771170caf0f9ac26e39e /services | |
parent | cc6855fc7f22e404fb79482ab9765d9922db588d (diff) | |
parent | 4fd8d4ab2aafe8ed73080408223e8b20a953cfc4 (diff) | |
download | frameworks_base-dc0078b7947e0b035dce6c61108a48a276b11034.zip frameworks_base-dc0078b7947e0b035dce6c61108a48a276b11034.tar.gz frameworks_base-dc0078b7947e0b035dce6c61108a48a276b11034.tar.bz2 |
Merge "Revert "Enterprise quick contact 1/2""
Diffstat (limited to 'services')
-rw-r--r-- | services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java index 0c58aef..73b5de1 100644 --- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java @@ -78,8 +78,6 @@ import android.os.SystemClock; import android.os.SystemProperties; import android.os.UserHandle; import android.os.UserManager; -import android.provider.ContactsContract.QuickContact; -import android.provider.ContactsInternal; import android.provider.Settings; import android.security.Credentials; import android.security.IKeyChainAliasCallback; @@ -148,8 +146,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { private static final String LOG_TAG = "DevicePolicyManagerService"; - private static final boolean VERBOSE_LOG = false; // DO NOT SUBMIT WITH TRUE - private static final String DEVICE_POLICIES_XML = "device_policies.xml"; private static final String LOCK_TASK_COMPONENTS_XML = "lock-task-component"; @@ -5439,59 +5435,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { } } - @Override - public void startManagedQuickContact(String actualLookupKey, long actualContactId, - Intent originalIntent) { - final Intent intent = QuickContact.rebuildManagedQuickContactsIntent( - actualLookupKey, actualContactId, originalIntent); - final int callingUserId = UserHandle.getCallingUserId(); - - final long ident = Binder.clearCallingIdentity(); - try { - synchronized (this) { - final int managedUserId = getManagedUserId(callingUserId); - if (managedUserId < 0) { - return; - } - if (getCrossProfileCallerIdDisabledForUser(managedUserId)) { - if (VERBOSE_LOG) { - Log.v(LOG_TAG, - "Cross-profile contacts access disabled for user " + managedUserId); - } - return; - } - ContactsInternal.startQuickContactWithErrorToastForUser( - mContext, intent, new UserHandle(managedUserId)); - } - } finally { - Binder.restoreCallingIdentity(ident); - } - } - - /** - * @return the user ID of the managed user that is linked to the current user, if any. - * Otherwise -1. - */ - public int getManagedUserId(int callingUserId) { - if (VERBOSE_LOG) { - Log.v(LOG_TAG, "getManagedUserId: callingUserId=" + callingUserId); - } - - for (UserInfo ui : mUserManager.getProfiles(callingUserId)) { - if (ui.id == callingUserId || !ui.isManagedProfile()) { - continue; // Caller user self, or not a managed profile. Skip. - } - if (VERBOSE_LOG) { - Log.v(LOG_TAG, "Managed user=" + ui.id); - } - return ui.id; - } - if (VERBOSE_LOG) { - Log.v(LOG_TAG, "Managed user not found."); - } - return -1; - } - /** * Sets which packages may enter lock task mode. * |