Merge "USB: Adjust exception message in dealing with permission check #2" into sc-qpr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8173263d78
@@ -45,6 +45,7 @@ import android.service.usb.UsbUidPermissionProto;
|
|||||||
import android.service.usb.UsbUserPermissionsManagerProto;
|
import android.service.usb.UsbUserPermissionsManagerProto;
|
||||||
import android.util.ArrayMap;
|
import android.util.ArrayMap;
|
||||||
import android.util.AtomicFile;
|
import android.util.AtomicFile;
|
||||||
|
import android.util.EventLog;
|
||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
import android.util.SparseBooleanArray;
|
import android.util.SparseBooleanArray;
|
||||||
import android.util.TypedXmlPullParser;
|
import android.util.TypedXmlPullParser;
|
||||||
@@ -74,6 +75,8 @@ class UsbUserPermissionManager {
|
|||||||
private static final String TAG = UsbUserPermissionManager.class.getSimpleName();
|
private static final String TAG = UsbUserPermissionManager.class.getSimpleName();
|
||||||
private static final boolean DEBUG = false;
|
private static final boolean DEBUG = false;
|
||||||
|
|
||||||
|
private static final int SNET_EVENT_LOG_ID = 0x534e4554;
|
||||||
|
|
||||||
@GuardedBy("mLock")
|
@GuardedBy("mLock")
|
||||||
/** Mapping of USB device name to list of UIDs with permissions for the device
|
/** Mapping of USB device name to list of UIDs with permissions for the device
|
||||||
* Each entry lasts until device is disconnected*/
|
* Each entry lasts until device is disconnected*/
|
||||||
@@ -691,6 +694,7 @@ class UsbUserPermissionManager {
|
|||||||
if (aInfo.uid != uid) {
|
if (aInfo.uid != uid) {
|
||||||
Slog.w(TAG, "package " + packageName
|
Slog.w(TAG, "package " + packageName
|
||||||
+ " does not match caller's uid " + uid);
|
+ " does not match caller's uid " + uid);
|
||||||
|
EventLog.writeEvent(SNET_EVENT_LOG_ID, "180104273", -1, "");
|
||||||
throw new IllegalArgumentException("package " + packageName
|
throw new IllegalArgumentException("package " + packageName
|
||||||
+ " not found");
|
+ " not found");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user