Bind to screenshot service for current user.

Let apps bindService() across user boundaries if they hold the
INTERACT_ACROSS_USERS_FULL permission.

Bug: 7012034
Change-Id: I2047d8318e1de47bfae7470d1dbc6fe5cfe44fdc
This commit is contained in:
Jeff Sharkey
2012-08-28 16:48:05 -07:00
parent 0d43c567ce
commit 35744c19f6
2 changed files with 21 additions and 2 deletions

View File

@@ -3134,7 +3134,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
@Override
public void onServiceDisconnected(ComponentName name) {}
};
if (mContext.bindService(intent, conn, Context.BIND_AUTO_CREATE)) {
if (mContext.bindService(
intent, conn, Context.BIND_AUTO_CREATE, UserHandle.USER_CURRENT)) {
mScreenshotConnection = conn;
mHandler.postDelayed(mScreenshotTimeout, 10000);
}