重命名
This commit is contained in:
@@ -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 {
|
||||
|
||||
/**
|
||||
* 向主进程传输坐标
|
||||
@@ -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 {
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user