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

Commit 7f3edf22 authored by Todd Kennedy's avatar Todd Kennedy Committed by Android Git Automerger
Browse files

am b6384b55: am c0039894: Merge "Handle volume benchmark timeout" into mnc-dev

* commit 'b6384b55':
  Handle volume benchmark timeout
parents c62dafdf b6384b55
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1504,6 +1504,8 @@ class MountService extends IMountService.Stub
        try {
            final NativeDaemonEvent res = mConnector.execute("volume", "benchmark", volId);
            return Long.parseLong(res.getMessage());
        } catch (NativeDaemonTimeoutException e) {
            return Long.MAX_VALUE;
        } catch (NativeDaemonConnectorException e) {
            throw e.rethrowAsParcelableException();
        }
+1 −1
Original line number Diff line number Diff line
@@ -421,7 +421,7 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo
            event = mResponseQueue.remove(sequenceNumber, timeout, logCmd);
            if (event == null) {
                loge("timed-out waiting for response to " + logCmd);
                throw new NativeDaemonFailureException(logCmd, event);
                throw new NativeDaemonTimeoutException(logCmd, event);
            }
            if (VDBG) log("RMV <- {" + event + "}");
            events.add(event);
+28 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.server;

/**
 * An exception that indicates there was a timeout with a
 * {@link NativeDaemonConnector} operation.
 */
public class NativeDaemonTimeoutException extends NativeDaemonConnectorException {
    public NativeDaemonTimeoutException(String command, NativeDaemonEvent event) {
        super(command, event);
    }
}