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

Commit 0e1e60fa authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/23677151']...

Merge cherrypicks of ['googleplex-android-review.googlesource.com/23677151'] into security-aosp-rvc-release.

Change-Id: I9353d96be061757b7ba60535e8b14dace8424422
parents fae59560 c2ed49a7
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -172,11 +172,8 @@ status_t SensorManager::assertStateLocked() {

        mSensors = mSensorServer->getSensorList(mOpPackageName);
        size_t count = mSensors.size();
        if (count == 0) {
            ALOGE("Failed to get Sensor list");
            mSensorServer.clear();
            return UNKNOWN_ERROR;
        }
        // If count is 0, mSensorList will be non-null. This is old
        // existing behavior and callers expect this.
        mSensorList =
                static_cast<Sensor const**>(malloc(count * sizeof(Sensor*)));
        LOG_ALWAYS_FATAL_IF(mSensorList == nullptr, "mSensorList NULL");