diff options
author | Dianne Hackborn <hackbod@google.com> | 2012-08-16 10:48:27 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2012-08-16 12:46:38 -0700 |
commit | f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8 (patch) | |
tree | 893430514916fc74f4fd008dbcb457c2dd317989 /policy | |
parent | ca34bcf6746454c561b0c07ca5c6e42bd4a73e9e (diff) | |
download | frameworks_base-f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8.zip frameworks_base-f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8.tar.gz frameworks_base-f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8.tar.bz2 |
Rename UserId to UserHandle.
This is the start of turning this into a formal public API.
Change-Id: I5786d2c320f1de41a06ed5d0f65adb68967287a0
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/LockScreen.java | 10 | ||||
-rwxr-xr-x | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/policy/src/com/android/internal/policy/impl/LockScreen.java b/policy/src/com/android/internal/policy/impl/LockScreen.java index 8645172..5f5c105 100644 --- a/policy/src/com/android/internal/policy/impl/LockScreen.java +++ b/policy/src/com/android/internal/policy/impl/LockScreen.java @@ -32,7 +32,7 @@ import android.content.Context; import android.content.Intent; import android.content.res.Configuration; import android.content.res.Resources; -import android.os.UserId; +import android.os.UserHandle; import android.os.Vibrator; import android.view.KeyEvent; import android.view.LayoutInflater; @@ -277,7 +277,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen { // Update the search icon with drawable from the search .apk if (!mSearchDisabled) { Intent intent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE)) - .getAssistIntent(mContext, UserId.USER_CURRENT); + .getAssistIntent(mContext, UserHandle.USER_CURRENT); if (intent != null) { // XXX Hack. We need to substitute the icon here but haven't formalized // the public API. The "_google" metadata will be going away, so @@ -313,7 +313,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen { case com.android.internal.R.drawable.ic_action_assist_generic: Intent assistIntent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE)) - .getAssistIntent(mContext, UserId.USER_CURRENT); + .getAssistIntent(mContext, UserHandle.USER_CURRENT); if (assistIntent != null) { launchActivity(assistIntent); } else { @@ -354,7 +354,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen { Log.w(TAG, "can't dismiss keyguard on launch"); } try { - mContext.startActivityAsUser(intent, UserId.USER_CURRENT); + mContext.startActivityAsUser(intent, UserHandle.USER_CURRENT); } catch (ActivityNotFoundException e) { Log.w(TAG, "Activity not found for intent + " + intent.getAction()); } @@ -532,7 +532,7 @@ class LockScreen extends LinearLayout implements KeyguardScreen { } boolean searchActionAvailable = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE)) - .getAssistIntent(mContext, UserId.USER_CURRENT) != null; + .getAssistIntent(mContext, UserHandle.USER_CURRENT) != null; mCameraDisabled = disabledByAdmin || disabledBySimState || !cameraTargetPresent; mSearchDisabled = disabledBySimState || !searchActionAvailable || !searchTargetPresent; mUnlockWidgetMethods.updateResources(); diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index c036e1b..b91eb00 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -54,7 +54,7 @@ import android.os.ServiceManager; import android.os.SystemClock; import android.os.SystemProperties; import android.os.UEventObserver; -import android.os.UserId; +import android.os.UserHandle; import android.os.Vibrator; import android.provider.Settings; @@ -2064,7 +2064,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (searchManager != null) { searchManager.stopSearch(); } - mContext.startActivityAsUser(intent, UserId.USER_CURRENT); + mContext.startActivityAsUser(intent, UserHandle.USER_CURRENT); } catch (ActivityNotFoundException e) { Slog.w(TAG, "No activity to handle assist long press action.", e); } @@ -2073,13 +2073,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { private void launchAssistAction() { sendCloseSystemWindows(SYSTEM_DIALOG_REASON_ASSIST); Intent intent = ((SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE)) - .getAssistIntent(mContext, UserId.USER_CURRENT); + .getAssistIntent(mContext, UserHandle.USER_CURRENT); if (intent != null) { intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP); try { - mContext.startActivityAsUser(intent, UserId.USER_CURRENT); + mContext.startActivityAsUser(intent, UserHandle.USER_CURRENT); } catch (ActivityNotFoundException e) { Slog.w(TAG, "No activity to handle assist action.", e); } |