Merge "Fix test build failure"

This commit is contained in:
Amith Yamasani
2013-01-17 00:10:16 +00:00
committed by Android (Google) Code Review

View File

@ -237,7 +237,7 @@ public class ActivityTestMain extends Activity {
Log.i(TAG, "Service disconnected " + name);
}
};
if (bindService(intent, conn, Context.BIND_AUTO_CREATE, 0)) {
if (bindServiceAsUser(intent, conn, Context.BIND_AUTO_CREATE, UserHandle.OWNER)) {
mConnections.add(conn);
} else {
Toast.makeText(ActivityTestMain.this, "Failed to bind",
@ -260,7 +260,8 @@ public class ActivityTestMain extends Activity {
Log.i(TAG, "Service disconnected " + name);
}
};
if (bindService(intent, conn, Context.BIND_AUTO_CREATE, mSecondUser)) {
if (bindServiceAsUser(intent, conn, Context.BIND_AUTO_CREATE,
new UserHandle(mSecondUser))) {
mConnections.add(conn);
} else {
Toast.makeText(ActivityTestMain.this, "Failed to bind",