summaryrefslogtreecommitdiffstats
path: root/services/java/com/android
diff options
context:
space:
mode:
Diffstat (limited to 'services/java/com/android')
-rw-r--r--services/java/com/android/server/BackupManagerService.java3
-rw-r--r--services/java/com/android/server/InputMethodManagerService.java4
-rw-r--r--services/java/com/android/server/SystemServer.java3
-rw-r--r--services/java/com/android/server/display/OverlayDisplayAdapter.java2
-rw-r--r--services/java/com/android/server/display/WifiDisplayAdapter.java2
-rw-r--r--services/java/com/android/server/dreams/DreamController.java9
6 files changed, 13 insertions, 10 deletions
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index f241c80..dcbf3f5 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -836,7 +836,8 @@ class BackupManagerService extends IBackupManager.Stub {
if ((info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
if (DEBUG) Slog.v(TAG, "Binding to Google transport");
Intent intent = new Intent().setComponent(transportComponent);
- context.bindService(intent, mGoogleConnection, Context.BIND_AUTO_CREATE);
+ context.bindService(intent, mGoogleConnection, Context.BIND_AUTO_CREATE,
+ UserHandle.USER_OWNER);
} else {
Slog.w(TAG, "Possible Google transport spoof: ignoring " + info);
}
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index ffbfef6..679a22a 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -1561,7 +1561,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
intent.putExtra(SuggestionSpan.SUGGESTION_SPAN_PICKED_BEFORE, originalString);
intent.putExtra(SuggestionSpan.SUGGESTION_SPAN_PICKED_AFTER, suggestions[index]);
intent.putExtra(SuggestionSpan.SUGGESTION_SPAN_PICKED_HASHCODE, span.hashCode());
- mContext.sendBroadcast(intent);
+ mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT);
return true;
}
}
@@ -1649,7 +1649,7 @@ public class InputMethodManagerService extends IInputMethodManager.Stub
Intent intent = new Intent(Intent.ACTION_INPUT_METHOD_CHANGED);
intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
intent.putExtra("input_method_id", id);
- mContext.sendBroadcast(intent);
+ mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT);
}
unbindCurrentClientLocked();
} finally {
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index e46afd3..894c4d0 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -37,6 +37,7 @@ import android.os.ServiceManager;
import android.os.StrictMode;
import android.os.SystemClock;
import android.os.SystemProperties;
+import android.os.UserHandle;
import android.server.search.SearchManagerService;
import android.service.dreams.DreamService;
import android.util.DisplayMetrics;
@@ -1005,7 +1006,7 @@ class ServerThread extends Thread {
intent.setComponent(new ComponentName("com.android.systemui",
"com.android.systemui.SystemUIService"));
Slog.d(TAG, "Starting service: " + intent);
- context.startService(intent);
+ context.startServiceAsUser(intent, UserHandle.OWNER);
}
}
diff --git a/services/java/com/android/server/display/OverlayDisplayAdapter.java b/services/java/com/android/server/display/OverlayDisplayAdapter.java
index 937ebcf..c35fd98 100644
--- a/services/java/com/android/server/display/OverlayDisplayAdapter.java
+++ b/services/java/com/android/server/display/OverlayDisplayAdapter.java
@@ -282,7 +282,7 @@ final class OverlayDisplayAdapter extends DisplayAdapter {
@Override
public void onWindowCreated(SurfaceTexture surfaceTexture, float refreshRate) {
synchronized (getSyncRoot()) {
- IBinder displayToken = Surface.createDisplay(mName);
+ IBinder displayToken = Surface.createDisplay(mName, false);
mDevice = new OverlayDisplayDevice(displayToken, mName,
mWidth, mHeight, refreshRate, mDensityDpi, surfaceTexture);
diff --git a/services/java/com/android/server/display/WifiDisplayAdapter.java b/services/java/com/android/server/display/WifiDisplayAdapter.java
index f9d58af..97fc3e6 100644
--- a/services/java/com/android/server/display/WifiDisplayAdapter.java
+++ b/services/java/com/android/server/display/WifiDisplayAdapter.java
@@ -292,7 +292,7 @@ final class WifiDisplayAdapter extends DisplayAdapter {
float refreshRate = 60.0f; // TODO: get this for real
String name = display.getFriendlyDisplayName();
- IBinder displayToken = Surface.createDisplay(name);
+ IBinder displayToken = Surface.createDisplay(name, false);
mDisplayDevice = new WifiDisplayDevice(displayToken, name, width, height,
refreshRate, deviceFlags, surface);
sendDisplayDeviceEventLocked(mDisplayDevice, DISPLAY_DEVICE_EVENT_ADDED);
diff --git a/services/java/com/android/server/dreams/DreamController.java b/services/java/com/android/server/dreams/DreamController.java
index bfb60bb..1ab6a77 100644
--- a/services/java/com/android/server/dreams/DreamController.java
+++ b/services/java/com/android/server/dreams/DreamController.java
@@ -25,6 +25,7 @@ import android.os.Handler;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.IBinder.DeathRecipient;
+import android.os.UserHandle;
import android.service.dreams.DreamService;
import android.service.dreams.IDreamService;
import android.util.Slog;
@@ -83,8 +84,8 @@ final class DreamController {
public void startDream(Binder token, ComponentName name, boolean isTest, int userId) {
stopDream();
- // Close the notification shade
- mContext.sendBroadcast(mCloseNotificationShadeIntent);
+ // Close the notification shade. Don't need to send to all, but better to be explicit.
+ mContext.sendBroadcastAsUser(mCloseNotificationShadeIntent, UserHandle.ALL);
Slog.i(TAG, "Starting dream: name=" + name + ", isTest=" + isTest + ", userId=" + userId);
@@ -128,7 +129,7 @@ final class DreamController {
+ ", isTest=" + oldDream.mIsTest + ", userId=" + oldDream.mUserId);
if (oldDream.mSentStartBroadcast) {
- mContext.sendBroadcast(mDreamingStoppedIntent);
+ mContext.sendBroadcastAsUser(mDreamingStoppedIntent, UserHandle.ALL);
}
if (oldDream.mService != null) {
@@ -180,7 +181,7 @@ final class DreamController {
mCurrentDream.mService = service;
if (!mCurrentDream.mIsTest) {
- mContext.sendBroadcast(mDreamingStartedIntent);
+ mContext.sendBroadcastAsUser(mDreamingStartedIntent, UserHandle.ALL);
mCurrentDream.mSentStartBroadcast = true;
}
}