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

Commit ab3df6d8 authored by Elliott Hughes's avatar Elliott Hughes Committed by Android Git Automerger
Browse files

am f4716c59: Merge "frameworks/av doesn\'t need to support the long-dead simulator."

* commit 'f4716c59':
  frameworks/av doesn't need to support the long-dead simulator.
parents 0a1318c8 f4716c59
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -34,9 +34,6 @@
namespace android {

static bool checkPermission(const char* permissionString) {
#ifndef HAVE_ANDROID_OS
    return true;
#endif
    if (getpid() == IPCThreadState::self()->getCallingPid()) return true;
    bool ok = checkCallingPermission(String16(permissionString));
    if (!ok) ALOGE("Request requires %s", permissionString);
+0 −3
Original line number Diff line number Diff line
@@ -252,9 +252,6 @@ extern ALooperRoster gLooperRoster;


static bool checkPermission(const char* permissionString) {
#ifndef HAVE_ANDROID_OS
    return true;
#endif
    if (getpid() == IPCThreadState::self()->getCallingPid()) return true;
    bool ok = checkCallingPermission(String16(permissionString));
    if (!ok) ALOGE("Request requires %s", permissionString);
+0 −3
Original line number Diff line number Diff line
@@ -46,9 +46,6 @@ const char* cameraPermission = "android.permission.CAMERA";
const char* recordAudioPermission = "android.permission.RECORD_AUDIO";

static bool checkPermission(const char* permissionString) {
#ifndef HAVE_ANDROID_OS
    return true;
#endif
    if (getpid() == IPCThreadState::self()->getCallingPid()) return true;
    bool ok = checkCallingPermission(String16(permissionString));
    if (!ok) ALOGE("Request requires %s", permissionString);
+0 −5
Original line number Diff line number Diff line
@@ -953,10 +953,6 @@ sp<M3UParser> LiveSession::fetchPlaylist(
        return NULL;
    }

    // MD5 functionality is not available on the simulator, treat all
    // playlists as changed.

#if defined(HAVE_ANDROID_OS)
    uint8_t hash[16];

    MD5_CTX m;
@@ -975,7 +971,6 @@ sp<M3UParser> LiveSession::fetchPlaylist(
    if (curPlaylistHash != NULL) {
        memcpy(curPlaylistHash, hash, sizeof(hash));
    }
#endif

    sp<M3UParser> playlist =
        new M3UParser(actualUrl.string(), buffer->data(), buffer->size());
+0 −9
Original line number Diff line number Diff line
@@ -898,11 +898,6 @@ bool ARTSPConnection::parseAuthMethod(const sp<ARTSPResponse> &response) {
    if (!strncmp(value.c_str(), "Basic", 5)) {
        mAuthType = BASIC;
    } else {
#if !defined(HAVE_ANDROID_OS)
        // We don't have access to the MD5 implementation on the simulator,
        // so we won't support digest authentication.
        return false;
#endif

        CHECK(!strncmp(value.c_str(), "Digest", 6));
        mAuthType = DIGEST;
@@ -919,7 +914,6 @@ bool ARTSPConnection::parseAuthMethod(const sp<ARTSPResponse> &response) {
    return true;
}

#if defined(HAVE_ANDROID_OS)
static void H(const AString &s, AString *out) {
    out->clear();

@@ -948,7 +942,6 @@ static void H(const AString &s, AString *out) {
        out->append(&nibble, 1);
    }
}
#endif

static void GetMethodAndURL(
        const AString &request, AString *method, AString *url) {
@@ -990,7 +983,6 @@ void ARTSPConnection::addAuthentication(AString *request) {
        return;
    }

#if defined(HAVE_ANDROID_OS)
    CHECK_EQ((int)mAuthType, (int)DIGEST);

    AString method, url;
@@ -1039,7 +1031,6 @@ void ARTSPConnection::addAuthentication(AString *request) {
    fragment.append("\r\n");

    request->insert(fragment, i + 2);
#endif
}

void ARTSPConnection::addUserAgent(AString *request) const {