-[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":945,"versionName":"2109031850","enabled":true,"outputFile":"ICSer_V945_2109031850_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V945_2109031850_release.apk","properties":{}}]
\ No newline at end of file
+[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":946,"versionName":"2109041740","enabled":true,"outputFile":"ICSer_V946_2109041740_release.apk","fullName":"release","baseName":"release"},"path":"ICSer_V946_2109041740_release.apk","properties":{}}]
\ No newline at end of file
<protected-broadcast android:name="com.enqualcomm.support.ACTION_ISCONNECTED" />
<protected-broadcast android:name="com.eqc.deskclock.YUN_ALARM_CHANGE" />
<protected-broadcast android:name="com.enqualcomm.support.sos" />
+
<application
android:name=".ICApplication"
import android.database.ContentObserver;
import android.database.Cursor;
import android.net.Uri;
+import android.telephony.PhoneStateListener;
+import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Log;
import com.enqualcomm.support.provider.ICDatabaseHelper;
import com.enqualcomm.support.provider.ICNotificationProvider;
+import com.enqualcomm.support.utils.ICLogger;
+import com.enqualcomm.support.utils.Util;
import static com.enqualcomm.support.provider.ICGlobalSettingsProvider.SETTINGS;
import static com.enqualcomm.support.provider.ICMembersProvider.MEMBERS;
public PhoneCallListener(Context context) {
this.mContext = context;
+ TelephonyManager telephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE);
+ telephonyManager.listen(new PhoneStateListener() {
+ @Override
+ public void onCallStateChanged(int state, String phoneNumber) {
+ ICLogger.d("state == > " + state);
+ ICLogger.d("phoneNumber == > " + phoneNumber);
+ if (state == TelephonyManager.CALL_STATE_IDLE) {
+ Util.setSystemProperties("persist.sys.call.monitor", "false");
+ ICLogger.d("persist.sys.call.monitor ==> " + Util.getSystemProperties("persist.sys.call.monitor"));
+ }
+ }
+ }, PhoneStateListener.LISTEN_CALL_STATE);
}
public void initObserver() {
}
static public void setSystemProperties(String key, int defaultValue) {
-
String value = String.valueOf(defaultValue);
-
try {
-
Class<?> c = Class.forName("android.os.SystemProperties");
-
Method set = c.getMethod("set", String.class, String.class);
-
set.invoke(c, key, value);
-
} catch (Exception e) {
-
e.printStackTrace();
ICLogger.e(e.getMessage(), e);
}
ret = null;
break;
case Config.PROTOCOL_FZD:
- ret = protocolfzd_handler.MEMBERS();
+ //ret = protocolfzd_handler.MEMBERS();
break;
case Config.PROTOCOL_MQTT:
ret = null;
ret = null;
break;
case Config.PROTOCOL_FZD:
- ret = protocolfzd_handler.AGREG();
+ // ret = protocolfzd_handler.AGREG();
break;
case Config.PROTOCOL_MQTT:
ret = null;
values.put(ICDatabaseHelper.sKey, cmdMap.get(cmd));
values.put(ICDatabaseHelper.sValue, data);
resolver.insert(Uri.parse(ICGlobalSettingsProvider.SETTINGS), values);
+
+ if (data.equals("1")) {
+ Util.setSystemProperties("persist.sys.whitelist.enable", "true");
+ } else {
+ Util.setSystemProperties("persist.sys.whitelist.enable", "false");
+ }
+ ICLogger.i("收到服务器指令:白名单" + (data.equals("1") ? "开" : "关"));
}
/**
private void doCall(String data, Runtime runtime) {
//拨号
Intent intent = new Intent(Intent.ACTION_CALL);
+ ICLogger.d("do call number ==> " + data);
intent.setData(Uri.parse("tel:" + data));
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if (ActivityCompat.checkSelfPermission(runtime.getContextProxy().context,
Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {
ICLogger.d("no permission to call...");
+ Util.setSystemProperties("persist.sys.call.monitor", "false");
return;
}
runtime.getContextProxy().context.startActivity(intent);
-#Fri Sep 03 18:50:54 CST 2021\r
-VERSION_CODE=945\r
+#Sat Sep 04 17:40:07 CST 2021\r
+VERSION_CODE=946\r