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

Commit b669c5c8 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Clatd-related commands porting" am: 3b9ae0ae am: 198936ce am: eaa77a20"

parents 97157bfc 7a8cd2aa
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -371,11 +371,6 @@ interface INetworkManagementService
     */
    void stopClatd(String interfaceName);

    /**
     * Determine whether the clatd (464xlat) service has been started on the given interface.
     */
    boolean isClatdStarted(String interfaceName);

    /**
     * Start listening for mobile activity state changes.
     */
+6 −21
Original line number Diff line number Diff line
@@ -2309,9 +2309,9 @@ public class NetworkManagementService extends INetworkManagementService.Stub
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);

        try {
            mConnector.execute("clatd", "start", interfaceName);
        } catch (NativeDaemonConnectorException e) {
            throw e.rethrowAsParcelableException();
            mNetdService.clatdStart(interfaceName);
        } catch (RemoteException | ServiceSpecificException e) {
            throw new IllegalStateException(e);
        }
    }

@@ -2320,25 +2320,10 @@ public class NetworkManagementService extends INetworkManagementService.Stub
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);

        try {
            mConnector.execute("clatd", "stop", interfaceName);
        } catch (NativeDaemonConnectorException e) {
            throw e.rethrowAsParcelableException();
        }
    }

    @Override
    public boolean isClatdStarted(String interfaceName) {
        mContext.enforceCallingOrSelfPermission(CONNECTIVITY_INTERNAL, TAG);

        final NativeDaemonEvent event;
        try {
            event = mConnector.execute("clatd", "status", interfaceName);
        } catch (NativeDaemonConnectorException e) {
            throw e.rethrowAsParcelableException();
            mNetdService.clatdStop(interfaceName);
        } catch (RemoteException | ServiceSpecificException e) {
            throw new IllegalStateException(e);
        }

        event.checkCode(ClatdStatusResult);
        return event.getMessage().endsWith("started");
    }

    @Override