summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/TelephonyRegistry.java
diff options
context:
space:
mode:
Diffstat (limited to 'services/java/com/android/server/TelephonyRegistry.java')
-rw-r--r--services/java/com/android/server/TelephonyRegistry.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/services/java/com/android/server/TelephonyRegistry.java b/services/java/com/android/server/TelephonyRegistry.java
index c23a1d9..8361477 100644
--- a/services/java/com/android/server/TelephonyRegistry.java
+++ b/services/java/com/android/server/TelephonyRegistry.java
@@ -25,6 +25,7 @@ import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
+import android.os.UserHandle;
import android.telephony.CellLocation;
import android.telephony.PhoneStateListener;
import android.telephony.ServiceState;
@@ -35,6 +36,7 @@ import android.text.TextUtils;
import android.util.Slog;
import java.util.ArrayList;
+import java.util.List;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.net.NetworkInterface;
@@ -109,7 +111,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
private int mOtaspMode = ServiceStateTracker.OTASP_UNKNOWN;
- private CellInfo mCellInfo = null;
+ private List<CellInfo> mCellInfo = null;
static final int PHONE_STATE_PERMISSION_MASK =
PhoneStateListener.LISTEN_CALL_FORWARDING_INDICATOR |
@@ -242,7 +244,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
}
if ((events & PhoneStateListener.LISTEN_CELL_INFO) != 0) {
try {
- r.callback.onCellInfoChanged(new CellInfo(mCellInfo));
+ r.callback.onCellInfoChanged(mCellInfo);
} catch (RemoteException ex) {
remove(r.binder);
}
@@ -336,7 +338,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
broadcastSignalStrengthChanged(signalStrength);
}
- public void notifyCellInfo(CellInfo cellInfo) {
+ public void notifyCellInfo(List<CellInfo> cellInfo) {
if (!checkNotifyPermission("notifyCellInfo()")) {
return;
}
@@ -346,7 +348,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
for (Record r : mRecords) {
if ((r.events & PhoneStateListener.LISTEN_CELL_INFO) != 0) {
try {
- r.callback.onCellInfoChanged(new CellInfo(cellInfo));
+ r.callback.onCellInfoChanged(cellInfo);
} catch (RemoteException ex) {
mRemoveList.add(r.binder);
}
@@ -587,7 +589,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
Bundle data = new Bundle();
state.fillInNotifierBundle(data);
intent.putExtras(data);
- mContext.sendStickyBroadcast(intent);
+ mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
}
private void broadcastSignalStrengthChanged(SignalStrength signalStrength) {
@@ -605,7 +607,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
Bundle data = new Bundle();
signalStrength.fillInNotifierBundle(data);
intent.putExtras(data);
- mContext.sendStickyBroadcast(intent);
+ mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
}
private void broadcastCallStateChanged(int state, String incomingNumber) {
@@ -628,7 +630,8 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
if (!TextUtils.isEmpty(incomingNumber)) {
intent.putExtra(TelephonyManager.EXTRA_INCOMING_NUMBER, incomingNumber);
}
- mContext.sendBroadcast(intent, android.Manifest.permission.READ_PHONE_STATE);
+ mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
+ android.Manifest.permission.READ_PHONE_STATE);
}
private void broadcastDataConnectionStateChanged(int state,
@@ -661,14 +664,14 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
intent.putExtra(PhoneConstants.DATA_APN_KEY, apn);
intent.putExtra(PhoneConstants.DATA_APN_TYPE_KEY, apnType);
- mContext.sendStickyBroadcast(intent);
+ mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
}
private void broadcastDataConnectionFailed(String reason, String apnType) {
Intent intent = new Intent(TelephonyIntents.ACTION_DATA_CONNECTION_FAILED);
intent.putExtra(PhoneConstants.FAILURE_REASON_KEY, reason);
intent.putExtra(PhoneConstants.DATA_APN_TYPE_KEY, apnType);
- mContext.sendStickyBroadcast(intent);
+ mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
}
private boolean checkNotifyPermission(String method) {