summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-03-26 23:48:31 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-03-26 23:48:31 -0700
commitc642d67e49a38c5cc2da2d921ae1727a2671def4 (patch)
tree7315d15a65c5a0e38433b017d602b5fde7e01383
parentc0f7c0e65c3d70730b465c7e8bcd571f01cd2146 (diff)
parent8d71081e1c7f6ce0ab1c63d4885ddee1539b0116 (diff)
downloadandroid_packages_apps_Bluetooth-c642d67e49a38c5cc2da2d921ae1727a2671def4.tar.gz
android_packages_apps_Bluetooth-c642d67e49a38c5cc2da2d921ae1727a2671def4.tar.bz2
android_packages_apps_Bluetooth-c642d67e49a38c5cc2da2d921ae1727a2671def4.zip
Merge "Revert "Multiuser: Check if valid user before starting service""
-rw-r--r--src/com/android/bluetooth/Utils.java4
-rwxr-xr-xsrc/com/android/bluetooth/map/BluetoothMapService.java5
-rw-r--r--src/com/android/bluetooth/opp/BluetoothOppReceiver.java7
-rw-r--r--src/com/android/bluetooth/pbap/BluetoothPbapService.java4
4 files changed, 0 insertions, 20 deletions
diff --git a/src/com/android/bluetooth/Utils.java b/src/com/android/bluetooth/Utils.java
index e87a6d9e3..6a467f9c3 100644
--- a/src/com/android/bluetooth/Utils.java
+++ b/src/com/android/bluetooth/Utils.java
@@ -204,19 +204,15 @@ final public class Utils {
int callingUser = UserHandle.getCallingUserId();
int callingUid = Binder.getCallingUid();
long ident = Binder.clearCallingIdentity();
- Log.d(TAG,"callingUid =" + callingUid);
try {
// With calling identity cleared the current user is the foreground user.
int foregroundUser = ActivityManager.getCurrentUser();
ok = (foregroundUser == callingUser);
- Log.e(TAG, "foregroundUser =" + foregroundUser);
- Log.e(TAG, "callingUser =" + callingUser);
if (!ok) {
// Always allow SystemUI/System access.
int systemUiUid = ActivityThread.getPackageManager().getPackageUid(
"com.android.systemui", UserHandle.USER_OWNER);
- Log.d(TAG," systemUiUid :" + systemUiUid);
ok = (systemUiUid == callingUid) || (Process.SYSTEM_UID == callingUid);
}
} catch (Exception ex) {
diff --git a/src/com/android/bluetooth/map/BluetoothMapService.java b/src/com/android/bluetooth/map/BluetoothMapService.java
index 5d0b23aa2..003687658 100755
--- a/src/com/android/bluetooth/map/BluetoothMapService.java
+++ b/src/com/android/bluetooth/map/BluetoothMapService.java
@@ -594,17 +594,12 @@ public class BluetoothMapService extends ProfileService {
if(!VERBOSE)
VERBOSE = Log.isLoggable(LOG_TAG, Log.VERBOSE);
- if (!Utils.checkCaller()) {
- Log.w(TAG, "start received for non-active user, ignoring");
- return false;
- }
//Start MapProfile if not already done.
if (isMapStarted()) {
Log.w(TAG, "start received for already started, ignoring");
return false;
}
-
if (VERBOSE) Log.v(TAG, "verbose logging is enabled");
HandlerThread thread = new HandlerThread("BluetoothMapHandler");
thread.start();
diff --git a/src/com/android/bluetooth/opp/BluetoothOppReceiver.java b/src/com/android/bluetooth/opp/BluetoothOppReceiver.java
index ff56d29b8..b4626c0be 100644
--- a/src/com/android/bluetooth/opp/BluetoothOppReceiver.java
+++ b/src/com/android/bluetooth/opp/BluetoothOppReceiver.java
@@ -48,7 +48,6 @@ import android.database.Cursor;
import android.net.Uri;
import android.util.Log;
import android.widget.Toast;
-import com.android.bluetooth.Utils;
/**
* Receives and handles: system broadcasts; Intents from other applications;
@@ -64,12 +63,6 @@ public class BluetoothOppReceiver extends BroadcastReceiver {
String action = intent.getAction();
if (D) Log.d(TAG, "Action :" + action);
- /* Ignore if Broadcast action is not transfer complete and Invalid user */
- if (!Utils.checkCaller() && !action.equals(BluetoothShare.TRANSFER_COMPLETED_ACTION)) {
- Log.w(TAG, action + " received for non-active user, ignoring!!");
- return;
- }
- if (V) Log.v(TAG, action + " Intent received for active user");
if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
if (BluetoothAdapter.STATE_ON == intent.getIntExtra(
diff --git a/src/com/android/bluetooth/pbap/BluetoothPbapService.java b/src/com/android/bluetooth/pbap/BluetoothPbapService.java
index dcfc5c209..6cfd71339 100644
--- a/src/com/android/bluetooth/pbap/BluetoothPbapService.java
+++ b/src/com/android/bluetooth/pbap/BluetoothPbapService.java
@@ -200,10 +200,6 @@ public class BluetoothPbapService extends Service {
mInterrupted = false;
mAdapter = BluetoothAdapter.getDefaultAdapter();
- if (!Utils.checkCaller()) {
- Log.w(TAG, "onCreate received for non-active user, ignoring");
- return;
- }
if (!mHasStarted) {
mHasStarted = true;