Fix test build failure

Change-Id: Ic96c2490439a78af2fb92db49b25b67b56954a20
This commit is contained in:
Amith Yamasani
2013-01-16 16:04:00 -08:00
parent 8ff9a156c0
commit 45c0924fbb

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",