version:1.1.9
bugfixes: update:修改aidl文件
This commit is contained in:
@@ -16,8 +16,8 @@ android {
|
|||||||
applicationId "com.uiui.videoplayer"
|
applicationId "com.uiui.videoplayer"
|
||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
targetSdkVersion 28
|
targetSdkVersion 28
|
||||||
versionCode 118
|
versionCode 119
|
||||||
versionName "1.1.7"
|
versionName "1.1.9"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
// IGetInfoInterface.aidl
|
|
||||||
package com.uiui.sn;
|
|
||||||
|
|
||||||
// Declare any non-default types here with import statements
|
|
||||||
|
|
||||||
interface IGetInfoInterface {
|
|
||||||
/**
|
|
||||||
* Demonstrates some basic types that you can use as parameters
|
|
||||||
* and return values in AIDL.
|
|
||||||
*/
|
|
||||||
void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat,
|
|
||||||
double aDouble, String aString);
|
|
||||||
|
|
||||||
//获取sn
|
|
||||||
String getSerial();
|
|
||||||
//获取用户信息
|
|
||||||
String getUserInfo();
|
|
||||||
//获取隐藏APP
|
|
||||||
List<String> getHideAPP();
|
|
||||||
//获取禁止打开的APP
|
|
||||||
List<String> getForbidAPP();
|
|
||||||
|
|
||||||
//获取app设置
|
|
||||||
String getAppTimeControl();
|
|
||||||
//获取整机设置
|
|
||||||
String getSnTimeControl();
|
|
||||||
//获取系统设置
|
|
||||||
String getSetting();
|
|
||||||
//获取定位结果
|
|
||||||
String getMapResult();
|
|
||||||
}
|
|
||||||
24
app/src/uiui/aidl/com/uiui/sn/IUiUiSnInterface.aidl
Normal file
24
app/src/uiui/aidl/com/uiui/sn/IUiUiSnInterface.aidl
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
// IUiUiSnInterface.aidl
|
||||||
|
package com.uiui.sn;
|
||||||
|
|
||||||
|
// Declare any non-default types here with import statements
|
||||||
|
|
||||||
|
interface IUiUiSnInterface {
|
||||||
|
/**
|
||||||
|
* Demonstrates some basic types that you can use as parameters
|
||||||
|
* and return values in AIDL.
|
||||||
|
*/
|
||||||
|
void basicTypes(int anInt, long aLong, boolean aBoolean, float aFloat,
|
||||||
|
double aDouble, String aString);
|
||||||
|
|
||||||
|
//获取sn
|
||||||
|
String getSerial();
|
||||||
|
//模拟返回键
|
||||||
|
void keyBack();
|
||||||
|
//设置为默认桌面
|
||||||
|
void setDefaultLauncher(String pkg, String className);
|
||||||
|
//退出桌面
|
||||||
|
void exitDesktop();
|
||||||
|
//获取激活码
|
||||||
|
String getActivationCode();
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@ import android.text.TextUtils;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.tencent.mmkv.MMKV;
|
import com.tencent.mmkv.MMKV;
|
||||||
import com.uiui.sn.IGetInfoInterface;
|
import com.uiui.sn.IUiUiSnInterface;
|
||||||
import com.uiui.videoplayer.BuildConfig;
|
import com.uiui.videoplayer.BuildConfig;
|
||||||
import com.uiui.videoplayer.config.CommonConfig;
|
import com.uiui.videoplayer.config.CommonConfig;
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ public class RemoteManager {
|
|||||||
private static RemoteManager sInstance;
|
private static RemoteManager sInstance;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||||
private IGetInfoInterface mIGetInfoInterface;
|
private IUiUiSnInterface mIUiUiSnInterface;
|
||||||
private ServiceConnection mServiceConnection;
|
private ServiceConnection mServiceConnection;
|
||||||
|
|
||||||
private RemoteManager(Context context) {
|
private RemoteManager(Context context) {
|
||||||
@@ -44,12 +44,12 @@ public class RemoteManager {
|
|||||||
public void onServiceConnected(ComponentName name, IBinder service) {
|
public void onServiceConnected(ComponentName name, IBinder service) {
|
||||||
Log.e(TAG, "onServiceConnected: " + name);
|
Log.e(TAG, "onServiceConnected: " + name);
|
||||||
mServiceConnected = true;
|
mServiceConnected = true;
|
||||||
mIGetInfoInterface = IGetInfoInterface.Stub.asInterface(service);
|
for (ConnectedListener listener : mListeners) {
|
||||||
|
listener.onConnected();
|
||||||
|
}
|
||||||
|
mIUiUiSnInterface = IUiUiSnInterface.Stub.asInterface(service);
|
||||||
try {
|
try {
|
||||||
for (ConnectedListener listener : mListeners) {
|
String sn = mIUiUiSnInterface.getSerial();
|
||||||
listener.onConnected();
|
|
||||||
}
|
|
||||||
String sn = mIGetInfoInterface.getSerial();
|
|
||||||
if (!TextUtils.isEmpty(sn)) {
|
if (!TextUtils.isEmpty(sn)) {
|
||||||
mMMKV.encode(serialKey, sn);
|
mMMKV.encode(serialKey, sn);
|
||||||
Log.e(TAG, "onServiceConnected: sn = " + sn);
|
Log.e(TAG, "onServiceConnected: sn = " + sn);
|
||||||
@@ -63,11 +63,12 @@ public class RemoteManager {
|
|||||||
@Override
|
@Override
|
||||||
public void onServiceDisconnected(ComponentName name) {
|
public void onServiceDisconnected(ComponentName name) {
|
||||||
Log.e(TAG, "onServiceDisconnected: " + name);
|
Log.e(TAG, "onServiceDisconnected: " + name);
|
||||||
mIGetInfoInterface = null;
|
mServiceConnected = false;
|
||||||
|
mIUiUiSnInterface = null;
|
||||||
bindinfoService();
|
bindinfoService();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (mIGetInfoInterface == null) {
|
if (mIUiUiSnInterface == null) {
|
||||||
bindinfoService();
|
bindinfoService();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -89,10 +90,10 @@ public class RemoteManager {
|
|||||||
|
|
||||||
private static final String AOLEYUNINFO_PACKAGE_NAME = "com.uiui.sn";
|
private static final String AOLEYUNINFO_PACKAGE_NAME = "com.uiui.sn";
|
||||||
private static final String AOLEYUNINFO_CLASS_NAME = "com.uiui.sn.service.RemoteService";
|
private static final String AOLEYUNINFO_CLASS_NAME = "com.uiui.sn.service.RemoteService";
|
||||||
private static final String AOLEYUNINFO_ACTION = "com.uiui.sn.IGetInfoInterface";
|
private static final String AOLEYUNINFO_ACTION = "com.uiui.sn.IUiUiSnInterface";
|
||||||
|
|
||||||
public void checkAvailable() {
|
public void checkAvailable() {
|
||||||
if (mIGetInfoInterface == null) {
|
if (mIUiUiSnInterface == null) {
|
||||||
bindinfoService();
|
bindinfoService();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -129,12 +130,12 @@ public class RemoteManager {
|
|||||||
}
|
}
|
||||||
String sn = mMMKV.decodeString(serialKey, "");
|
String sn = mMMKV.decodeString(serialKey, "");
|
||||||
Log.e(TAG, "sn: " + sn);
|
Log.e(TAG, "sn: " + sn);
|
||||||
if (mIGetInfoInterface == null) {
|
if (mIUiUiSnInterface == null) {
|
||||||
bindinfoService();
|
bindinfoService();
|
||||||
return sn;
|
return sn;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
String serial = mIGetInfoInterface.getSerial();
|
String serial = mIUiUiSnInterface.getSerial();
|
||||||
Log.e(TAG, "getSerial: " + serial);
|
Log.e(TAG, "getSerial: " + serial);
|
||||||
return serial;
|
return serial;
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user