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

Commit ba1dbe6e authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Use property_get_bool where possible"

parents 315031e0 96626b7f
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -347,9 +347,7 @@ int main(int argc, char **argv) {

    sp<IStreamSource> source;

    char prop[PROPERTY_VALUE_MAX];
    bool usemp4 = property_get("media.stagefright.use-mp4source", prop, NULL) &&
            (!strcmp(prop, "1") || !strcasecmp(prop, "true"));
    bool usemp4 = property_get_bool("media.stagefright.use-mp4source", false);

    size_t len = strlen(argv[1]);
    if ((!usemp4 && len >= 3 && !strcasecmp(".ts", &argv[1][len - 3])) ||
+1 −3
Original line number Diff line number Diff line
@@ -1658,9 +1658,7 @@ status_t NuPlayer::instantiateDecoder(
        // directly queuing to display, as this will even improve textureview
        // playback.
        {
            char value[PROPERTY_VALUE_MAX];
            if (property_get("persist.sys.media.avsync", value, NULL) &&
                    (!strcmp("1", value) || !strcasecmp("true", value))) {
            if (property_get_bool("persist.sys.media.avsync", false)) {
                format->setInt32("auto-frc", 1);
            }
        }
+1 −3
Original line number Diff line number Diff line
@@ -478,9 +478,7 @@ status_t NuPlayerDriver::reset() {
        notifyListener_l(MEDIA_STOPPED);
    }

    char value[PROPERTY_VALUE_MAX];
    if (property_get("persist.debug.sf.stats", value, NULL) &&
            (!strcmp("1", value) || !strcasecmp("true", value))) {
    if (property_get_bool("persist.debug.sf.stats", false)) {
        Vector<String16> args;
        dump(-1, args);
    }
+1 −3
Original line number Diff line number Diff line
@@ -770,9 +770,7 @@ status_t CameraSource::start(MetaData *meta) {
        return mInitCheck;
    }

    char value[PROPERTY_VALUE_MAX];
    if (property_get("media.stagefright.record-stats", value, NULL)
        && (!strcmp(value, "1") || !strcasecmp(value, "true"))) {
    if (property_get_bool("media.stagefright.record-stats", false)) {
        mCollectStats = true;
    }

+1 −3
Original line number Diff line number Diff line
@@ -1128,9 +1128,7 @@ static bool isTestModeEnabled() {

    // Test mode is enabled only if rw.media.record.test system
    // property is enabled.
    char value[PROPERTY_VALUE_MAX];
    if (property_get("rw.media.record.test", value, NULL) &&
        (!strcasecmp(value, "true") || !strcasecmp(value, "1"))) {
    if (property_get_bool("rw.media.record.test", false)) {
        return true;
    }
    return false;
Loading