Merge "Pass metadata as AttributionSourceSource." into sc-dev
This commit is contained in:
@@ -296,6 +296,7 @@ java_defaults {
|
|||||||
],
|
],
|
||||||
include_dirs: [
|
include_dirs: [
|
||||||
"frameworks/av/aidl",
|
"frameworks/av/aidl",
|
||||||
|
"frameworks/native/libs/permission/aidl",
|
||||||
"packages/modules/Connectivity/framework/aidl-export",
|
"packages/modules/Connectivity/framework/aidl-export",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -537,6 +538,7 @@ stubs_defaults {
|
|||||||
],
|
],
|
||||||
include_dirs: [
|
include_dirs: [
|
||||||
"frameworks/av/aidl",
|
"frameworks/av/aidl",
|
||||||
|
"frameworks/native/libs/permission/aidl",
|
||||||
"packages/modules/Connectivity/framework/aidl-export",
|
"packages/modules/Connectivity/framework/aidl-export",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
10
ApiDocs.bp
10
ApiDocs.bp
@@ -113,7 +113,10 @@ stubs_defaults {
|
|||||||
// TODO(b/169090544): remove below aidl includes.
|
// TODO(b/169090544): remove below aidl includes.
|
||||||
aidl: {
|
aidl: {
|
||||||
local_include_dirs: ["media/aidl"],
|
local_include_dirs: ["media/aidl"],
|
||||||
include_dirs: ["frameworks/av/aidl"],
|
include_dirs: [
|
||||||
|
"frameworks/av/aidl",
|
||||||
|
"frameworks/native/libs/permission/aidl",
|
||||||
|
],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -199,7 +202,10 @@ doc_defaults {
|
|||||||
// TODO(b/169090544): remove below aidl includes.
|
// TODO(b/169090544): remove below aidl includes.
|
||||||
aidl: {
|
aidl: {
|
||||||
local_include_dirs: ["media/aidl"],
|
local_include_dirs: ["media/aidl"],
|
||||||
include_dirs: ["frameworks/av/aidl"],
|
include_dirs: [
|
||||||
|
"frameworks/av/aidl",
|
||||||
|
"frameworks/native/libs/permission/aidl",
|
||||||
|
],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
package android.permission;
|
package android.permission;
|
||||||
|
|
||||||
import android.content.AttributionSource;
|
import android.content.AttributionSourceState;
|
||||||
import android.content.pm.ParceledListSlice;
|
import android.content.pm.ParceledListSlice;
|
||||||
import android.content.pm.PermissionGroupInfo;
|
import android.content.pm.PermissionGroupInfo;
|
||||||
import android.content.pm.PermissionInfo;
|
import android.content.pm.PermissionInfo;
|
||||||
@@ -87,7 +87,7 @@ interface IPermissionManager {
|
|||||||
|
|
||||||
boolean isAutoRevokeExempted(String packageName, int userId);
|
boolean isAutoRevokeExempted(String packageName, int userId);
|
||||||
|
|
||||||
void registerAttributionSource(in AttributionSource source);
|
void registerAttributionSource(in AttributionSourceState source);
|
||||||
|
|
||||||
boolean isRegisteredAttributionSource(in AttributionSource source);
|
boolean isRegisteredAttributionSource(in AttributionSourceState source);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1177,7 +1177,7 @@ public final class PermissionManager {
|
|||||||
// enforcement we need to replace the binder with a unique one.
|
// enforcement we need to replace the binder with a unique one.
|
||||||
final AttributionSource registeredSource = source.withToken(new Binder());
|
final AttributionSource registeredSource = source.withToken(new Binder());
|
||||||
try {
|
try {
|
||||||
mPermissionManager.registerAttributionSource(registeredSource);
|
mPermissionManager.registerAttributionSource(registeredSource.asState());
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
e.rethrowFromSystemServer();
|
e.rethrowFromSystemServer();
|
||||||
}
|
}
|
||||||
@@ -1196,7 +1196,7 @@ public final class PermissionManager {
|
|||||||
*/
|
*/
|
||||||
public boolean isRegisteredAttributionSource(@NonNull AttributionSource source) {
|
public boolean isRegisteredAttributionSource(@NonNull AttributionSource source) {
|
||||||
try {
|
try {
|
||||||
return mPermissionManager.isRegisteredAttributionSource(source);
|
return mPermissionManager.isRegisteredAttributionSource(source.asState());
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
e.rethrowFromSystemServer();
|
e.rethrowFromSystemServer();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3347,13 +3347,15 @@ public class PermissionManagerService extends IPermissionManager.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerAttributionSource(@NonNull AttributionSource source) {
|
public void registerAttributionSource(@NonNull AttributionSourceState source) {
|
||||||
mAttributionSourceRegistry.registerAttributionSource(source);
|
mAttributionSourceRegistry
|
||||||
|
.registerAttributionSource(new AttributionSource(source));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isRegisteredAttributionSource(@NonNull AttributionSource source) {
|
public boolean isRegisteredAttributionSource(@NonNull AttributionSourceState source) {
|
||||||
return mAttributionSourceRegistry.isRegisteredAttributionSource(source);
|
return mAttributionSourceRegistry
|
||||||
|
.isRegisteredAttributionSource(new AttributionSource(source));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user