重命名

This commit is contained in:
yangyakun
2022-07-08 17:31:26 +08:00
parent f16c247b3c
commit 694951260e
3 changed files with 9 additions and 11 deletions

View File

@@ -1,9 +1,9 @@
// IOrderService.aidl
// ILeftMenuService.aidl
package com.mogo.och.taxi.passenger.mulprocess;
// Declare any non-default types here with import statements
interface IOrderService {
interface ILeftMenuService {
/**
* 向主进程传输坐标

View File

@@ -1,17 +1,12 @@
package com.mogo.och.taxi.passenger.mulprocess;
import android.app.Application;
import android.os.Build;
import android.os.RemoteException;
import androidx.annotation.RequiresApi;
import com.mogo.eagle.core.utilcode.util.UiThreadHandler;
import com.mogo.eagle.core.utilcode.util.Utils;
import com.mogo.och.taxi.passenger.ui.leftmenu.LeftMenuOpen;
import com.mogo.och.taxi.passenger.ui.leftmenu.OverlayLeftViewUtils;
public class OrderServiceImpl extends IOrderService.Stub {
public class OrderServiceImpl extends ILeftMenuService.Stub {
@Override
public boolean transmission(int x, int action) throws RemoteException {

View File

@@ -12,7 +12,7 @@ import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.eagle.core.utilcode.util.Utils
import com.mogo.och.taxi.passenger.mulprocess.BinderCursor
import com.mogo.och.taxi.passenger.mulprocess.BinderProvider
import com.mogo.och.taxi.passenger.mulprocess.IOrderService
import com.mogo.och.taxi.passenger.mulprocess.ILeftMenuService
@SuppressLint("StaticFieldLeak")
object LeftMenuOpen {
@@ -29,7 +29,7 @@ object LeftMenuOpen {
// 两部分主进程和子进程
private var dragList = mutableSetOf<View>()
private var orderService: IOrderService? = null
private var orderService: ILeftMenuService? = null
// 主进程
fun setValue(
@@ -80,6 +80,9 @@ object LeftMenuOpen {
return orderService?.transmission(newX, action) ?: false
}
/**
* binder 会自动判断进程
*/
fun dragAndOpen(newX: Int, action: Int): Boolean {
when (action) {
MotionEvent.ACTION_DOWN -> {
@@ -189,7 +192,7 @@ object LeftMenuOpen {
val binder: IBinder = getBinder(cu!!)
try {
orderService = IOrderService.Stub.asInterface(binder)
orderService = ILeftMenuService.Stub.asInterface(binder)
} catch (e: RemoteException) {
e.printStackTrace()
cu?.close()