Merge "Properly check for SDK before nullifying attribution tag" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b3c8d6d2e0
@@ -229,6 +229,7 @@ public abstract class RecognitionService extends Service {
|
|||||||
protected abstract void onStopListening(Callback listener);
|
protected abstract void onStopListening(Callback listener);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressLint("MissingNullability")
|
||||||
public Context createContext(@NonNull ContextParams contextParams) {
|
public Context createContext(@NonNull ContextParams contextParams) {
|
||||||
if (contextParams.getNextAttributionSource() != null) {
|
if (contextParams.getNextAttributionSource() != null) {
|
||||||
if (mHandler.getLooper().equals(Looper.myLooper())) {
|
if (mHandler.getLooper().equals(Looper.myLooper())) {
|
||||||
|
|||||||
@@ -4558,15 +4558,15 @@ public class AppOpsService extends IAppOpsService.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (mPlatformCompat.isChangeEnabledByPackageName(
|
if (!mPlatformCompat.isChangeEnabledByPackageName(
|
||||||
SECURITY_EXCEPTION_ON_INVALID_ATTRIBUTION_TAG_CHANGE, packageName,
|
SECURITY_EXCEPTION_ON_INVALID_ATTRIBUTION_TAG_CHANGE, packageName,
|
||||||
userId) && mPlatformCompat.isChangeEnabledByUid(
|
userId) || !mPlatformCompat.isChangeEnabledByUid(
|
||||||
SECURITY_EXCEPTION_ON_INVALID_ATTRIBUTION_TAG_CHANGE,
|
SECURITY_EXCEPTION_ON_INVALID_ATTRIBUTION_TAG_CHANGE,
|
||||||
callingUid) && !isAttributionTagValid) {
|
callingUid)) {
|
||||||
Slog.e(TAG, msg);
|
// Do not override tags if overriding is not enabled for this package
|
||||||
} else {
|
isAttributionTagValid = true;
|
||||||
Slog.e(TAG, msg);
|
|
||||||
}
|
}
|
||||||
|
Slog.e(TAG, msg);
|
||||||
} catch (RemoteException neverHappens) {
|
} catch (RemoteException neverHappens) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user