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

Commit 35be60eb authored by Yao Chen's avatar Yao Chen
Browse files

Disable incidentd encryption.

Bug: 131332217
Test: manually tested
Change-Id: If98d73978eb06a616e89025fcd615750976406e1
parent 1369a3b5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@ namespace incidentd {

using namespace android::os;

static const bool kEncryptionEnabled = false;

uint64_t encode_field_id(const Privacy* p) { return (uint64_t)p->type << 32 | p->field_id; }

const Privacy* lookup(const Privacy* p, uint32_t fieldId) {
@@ -37,7 +39,9 @@ const Privacy* lookup(const Privacy* p, uint32_t fieldId) {
    return NULL;
}

bool sectionEncryption(int section_id) { return section_id == 3025 /*restricted image section*/; }
bool sectionEncryption(int section_id) {
    return kEncryptionEnabled ? (section_id == 3025) /*restricted image section*/ : false;
}

static bool isAllowed(const uint8_t policy, const uint8_t check) {
    switch (check) {