Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be9c148b authored by Austin Borger's avatar Austin Borger
Browse files

Replace use_context_attribution_source / check_full_attribution_source_chain...

Replace use_context_attribution_source / check_full_attribution_source_chain flags with read-only flag

The VDM team needs the data delivery permission checks to be enabled in
trunkfood to move forward. Due to b/373966108, enabling the flags through
teamfood is a risk. Replace these runtime flags with a single compile-time
flag, which does not carry that risk.

Bug: 190657833
Test: Ran CameraPermissionTest
Flag: com.android.internal.camera.flags.data_delivery_permission_checks
Change-Id: Ieadc190da8e4f5e9c95cb111900af5ca4980588d
parent 02bf9ff7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -994,7 +994,7 @@ public final class CameraManager {
        AttributionSourceState contextAttributionSourceState =
                contextAttributionSource.asState();

        if (Flags.useContextAttributionSource() && useContextAttributionSource) {
        if (Flags.dataDeliveryPermissionChecks() && useContextAttributionSource) {
            return contextAttributionSourceState;
        } else {
            AttributionSourceState clientAttribution =
+1 −1
Original line number Diff line number Diff line
@@ -538,7 +538,7 @@ static bool attributionSourceStateForJavaParcel(JNIEnv *env, jobject jClientAttr
        return false;
    }

    if (!(useContextAttributionSource && flags::use_context_attribution_source())) {
    if (!(useContextAttributionSource && flags::data_delivery_permission_checks())) {
        clientAttribution.uid = Camera::USE_CALLING_UID;
        clientAttribution.pid = Camera::USE_CALLING_PID;
    }