feat(debug): 新增用户Debug模式入口及调试功能
- 连续点击触发Debug密码弹窗,验证后进入DebugActivity - 新增UserDebugDialog及相关样式和颜色资源 - 新增开发者选项、USB、蓝牙、相机、TF卡、恢复出厂、应用安装等状态的getter方法 - 将部分系统设置方法改为public以支持调试页面调用 - 移除ShakeDetectionManager中的高频日志输出
This commit is contained in:
@@ -233,6 +233,9 @@
|
||||
<activity
|
||||
android:name=".activity.requestlog.RequestLogActivity"
|
||||
android:launchMode="singleTask" />
|
||||
<activity
|
||||
android:name=".activity.debug.DebugActivity"
|
||||
android:launchMode="singleTask" />
|
||||
<activity
|
||||
android:name=".activity.AudioActivity"
|
||||
android:launchMode="singleTask"
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
package com.aoleyun.sn.activity.debug;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.CompoundButton;
|
||||
|
||||
import com.aoleyun.sn.R;
|
||||
import com.aoleyun.sn.base.mvvm.BaseMvvmActivity;
|
||||
import com.aoleyun.sn.databinding.ActivityDebugBinding;
|
||||
import com.aoleyun.sn.utils.JgyUtils;
|
||||
import com.aoleyun.sn.utils.SysSettingUtils;
|
||||
import com.hjq.toast.Toaster;
|
||||
|
||||
public class DebugActivity extends BaseMvvmActivity<DebugViewModel, ActivityDebugBinding> {
|
||||
private static final String TAG = "DebugActivity";
|
||||
|
||||
private JgyUtils jgyUtils;
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.activity_debug;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initDataBinding() {
|
||||
mViewModel.setCtx(this);
|
||||
mViewModel.setLifecycle(getLifecycleSubject());
|
||||
mViewModel.setVDBinding(mViewDataBinding);
|
||||
mViewDataBinding.setClick(new BtnClick());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView() {
|
||||
jgyUtils = JgyUtils.getInstance();
|
||||
initListener();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
boolean canReset = SysSettingUtils.getCanReset(DebugActivity.this);
|
||||
Log.e(TAG, "initData: canReset = " + canReset);
|
||||
mViewDataBinding.swRestore.setChecked(canReset);
|
||||
|
||||
boolean usbStatus = SysSettingUtils.isDisableUsbStatus(DebugActivity.this);
|
||||
Log.e(TAG, "initData: usbStatus = " + usbStatus);
|
||||
mViewDataBinding.swUsbDebug.setChecked(usbStatus);
|
||||
|
||||
int tf = SysSettingUtils.getTF(DebugActivity.this);
|
||||
Log.e(TAG, "initData: tf = " + tf);
|
||||
mViewDataBinding.swTf.setChecked(tf == 0);
|
||||
|
||||
boolean developer = jgyUtils.getDeveloperOptions();
|
||||
Log.e(TAG, "initData: developer = " + developer);
|
||||
mViewDataBinding.swDeveloper.setChecked(developer);
|
||||
|
||||
int bluetooth = SysSettingUtils.getBluetooth(DebugActivity.this);
|
||||
Log.e(TAG, "initData: bluetooth = " + bluetooth);
|
||||
mViewDataBinding.swBluetooth.setChecked(bluetooth == 0);
|
||||
|
||||
int camera = SysSettingUtils.getCamera(DebugActivity.this);
|
||||
Log.e(TAG, "initData: camera = " + camera);
|
||||
mViewDataBinding.swCamera.setChecked(camera == 0);
|
||||
|
||||
int appinstall = SysSettingUtils.getAdminApp(DebugActivity.this);
|
||||
Log.e(TAG, "initData: appinstall = " + appinstall);
|
||||
mViewDataBinding.swAppinstall.setChecked(appinstall == 0);
|
||||
|
||||
}
|
||||
|
||||
private void initListener() {
|
||||
mViewDataBinding.swRestore.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
// isChecked=true 允许恢复出厂 -> state=0; false 禁止 -> state=1
|
||||
SysSettingUtils.setCanReset(DebugActivity.this, isChecked ? 0 : 1);
|
||||
Toaster.show("恢复出厂设置已" + (isChecked ? "开启" : "关闭"));
|
||||
}
|
||||
});
|
||||
|
||||
mViewDataBinding.swUsbDebug.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
// isChecked=true 开启 -> state=1(MTP); false 仅充电 -> state=0
|
||||
SysSettingUtils.setUsbStatus(DebugActivity.this, isChecked ? 1 : 0);
|
||||
Toaster.show("USB调试已" + (isChecked ? "开启" : "关闭"));
|
||||
}
|
||||
});
|
||||
|
||||
mViewDataBinding.swTf.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
// isChecked=true 开启 -> state=0; false 关闭 -> state=1
|
||||
SysSettingUtils.setTF(DebugActivity.this, isChecked ? 0 : 1);
|
||||
Toaster.show("存储卡已" + (isChecked ? "开启" : "关闭"));
|
||||
}
|
||||
});
|
||||
|
||||
mViewDataBinding.swDeveloper.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
jgyUtils.setDeveloperOptions(isChecked ? 1 : 0);
|
||||
Toaster.show("开发者选项已" + (isChecked ? "开启" : "关闭"));
|
||||
}
|
||||
});
|
||||
|
||||
mViewDataBinding.swBluetooth.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
// isChecked=true 开启 -> state=0; false 关闭 -> state=1
|
||||
SysSettingUtils.setBluetooth(DebugActivity.this, isChecked ? 0 : 1);
|
||||
Toaster.show("蓝牙已" + (isChecked ? "开启" : "关闭"));
|
||||
}
|
||||
});
|
||||
|
||||
mViewDataBinding.swCamera.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
// isChecked=true 开启 -> state=0; false 关闭 -> state=1
|
||||
SysSettingUtils.setCamera(DebugActivity.this, isChecked ? 0 : 1);
|
||||
Toaster.show("摄像头已" + (isChecked ? "开启" : "关闭"));
|
||||
}
|
||||
});
|
||||
|
||||
mViewDataBinding.swAppinstall.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
// isChecked=true 允许安装 -> state=0; false 禁止 -> state=1
|
||||
SysSettingUtils.setAdminApp(DebugActivity.this, isChecked ? 0 : 1);
|
||||
Toaster.show("允许安装应用已" + (isChecked ? "开启" : "关闭"));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public class BtnClick {
|
||||
public void refresh(View view) {
|
||||
initData();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.aoleyun.sn.activity.debug;
|
||||
|
||||
import com.aoleyun.sn.base.mvvm.BaseViewModel;
|
||||
import com.aoleyun.sn.databinding.ActivityDebugBinding;
|
||||
import com.trello.rxlifecycle4.android.ActivityEvent;
|
||||
|
||||
public class DebugViewModel extends BaseViewModel<ActivityDebugBinding, ActivityEvent> {
|
||||
|
||||
@Override
|
||||
public ActivityDebugBinding getVDBinding() {
|
||||
return binding;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ import androidx.lifecycle.Observer;
|
||||
|
||||
import com.aoleyun.sn.BuildConfig;
|
||||
import com.aoleyun.sn.R;
|
||||
import com.aoleyun.sn.activity.requestlog.RequestLogActivity;
|
||||
import com.aoleyun.sn.activity.debug.DebugActivity;
|
||||
import com.aoleyun.sn.activity.update.UpdateActivity;
|
||||
import com.aoleyun.sn.base.mvvm.BaseMvvmActivity;
|
||||
import com.aoleyun.sn.bean.AppSettings;
|
||||
@@ -33,6 +33,7 @@ import com.aoleyun.sn.comm.JGYActions;
|
||||
import com.aoleyun.sn.comm.PackageNames;
|
||||
import com.aoleyun.sn.databinding.ActivityMainBinding;
|
||||
import com.aoleyun.sn.dialog.UpdateDialog;
|
||||
import com.aoleyun.sn.dialog.UserDebugDialog;
|
||||
import com.aoleyun.sn.service.main.MainService;
|
||||
import com.aoleyun.sn.utils.ApkUtils;
|
||||
import com.aoleyun.sn.utils.GlideLoadUtils;
|
||||
@@ -93,10 +94,49 @@ public class MainActivity extends BaseMvvmActivity<MainViewModel, ActivityMainBi
|
||||
mHits[mHits.length - 1] = SystemClock.uptimeMillis();
|
||||
if (mHits[0] >= (SystemClock.uptimeMillis() - DURATION)) {
|
||||
mHits = new long[COUNTS];//重新初始化数组
|
||||
startActivity(new Intent(MainActivity.this, RequestLogActivity.class));
|
||||
// startActivity(new Intent(MainActivity.this, RequestLogActivity.class));
|
||||
showDebugDialog();
|
||||
}
|
||||
}
|
||||
|
||||
private UserDebugDialog mUserDebugDialog;
|
||||
|
||||
private void showDebugDialog() {
|
||||
if (mUserDebugDialog != null) {
|
||||
mUserDebugDialog.dismiss();
|
||||
mUserDebugDialog = null;
|
||||
}
|
||||
mUserDebugDialog = new UserDebugDialog(this);
|
||||
mUserDebugDialog.setOnClickBottomListener(new UserDebugDialog.OnClickBottomListener() {
|
||||
@Override
|
||||
public void onPositiveClick() {
|
||||
if ("10262022".equals(mUserDebugDialog.getEdittext())) {
|
||||
// mMMKV.encode(CommonConfig.EnableDebug, true);
|
||||
Toaster.show("进入用户Debug模式");
|
||||
startActivity(new Intent(MainActivity.this, DebugActivity.class));
|
||||
// AdminManager.getInstance().setRestoreFactoryDisabled(1);
|
||||
// AdminManager.getInstance().removeActiveDeviceAdmin();
|
||||
} else {
|
||||
Toaster.show("密码错误");
|
||||
}
|
||||
mUserDebugDialog.dismiss();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNegtiveClick() {
|
||||
mUserDebugDialog.dismiss();
|
||||
}
|
||||
});
|
||||
// if (ScreenUtils.isTablet(MainActivity.this)) {
|
||||
// AutoSizeCompat.autoConvertDensityBaseOnWidth(getResources(), BaseAlertDialogBuilder.ALERT_BASE_WIDTH_TABLE);
|
||||
// } else {
|
||||
// AutoSizeCompat.autoConvertDensityBaseOnWidth(getResources(), BaseAlertDialogBuilder.ALERT_BASE_WIDTH);
|
||||
// }
|
||||
mUserDebugDialog.show();
|
||||
mUserDebugDialog.getWindow().setGravity(Gravity.CENTER);
|
||||
mUserDebugDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
|
||||
mUserDebugDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisconnected() {
|
||||
|
||||
@@ -137,7 +137,7 @@ public class ShakeDetectionManager implements SensorEventListener {
|
||||
@Override
|
||||
public void onSensorChanged(SensorEvent event) {
|
||||
int sensorType = event.sensor.getType();
|
||||
Log.e(TAG, "onSensorChanged: sensorType = " + sensorType + ", values=" + event.values[0] + "," + event.values[1] + "," + event.values[2]);
|
||||
// Log.e(TAG, "onSensorChanged: sensorType = " + sensorType + ", values=" + event.values[0] + "," + event.values[1] + "," + event.values[2]);
|
||||
if (sensorType == Sensor.TYPE_STEP_DETECTOR) {
|
||||
handleStepDetection();
|
||||
} else if (sensorType == Sensor.TYPE_LINEAR_ACCELERATION
|
||||
|
||||
248
app/src/main/java/com/aoleyun/sn/dialog/UserDebugDialog.java
Normal file
248
app/src/main/java/com/aoleyun/sn/dialog/UserDebugDialog.java
Normal file
@@ -0,0 +1,248 @@
|
||||
package com.aoleyun.sn.dialog;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.aoleyun.sn.R;
|
||||
|
||||
/**
|
||||
* description:自定义dialog
|
||||
*/
|
||||
|
||||
public class UserDebugDialog extends AlertDialog {
|
||||
|
||||
/**
|
||||
* 显示的标题
|
||||
*/
|
||||
private TextView titleTv;
|
||||
|
||||
/**
|
||||
* 确认和取消按钮
|
||||
*/
|
||||
private Button negtiveBn, positiveBn;
|
||||
|
||||
private EditText editText;
|
||||
|
||||
|
||||
private Context mContext;
|
||||
|
||||
public UserDebugDialog(Context context) {
|
||||
super(context, R.style.UserDebugDialog);
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* 都是内容数据
|
||||
*/
|
||||
private String message;
|
||||
private String title;
|
||||
private String positive, negtive;
|
||||
private int imageResId = -1;
|
||||
|
||||
/**
|
||||
* 底部是否只有一个按钮
|
||||
*/
|
||||
private boolean isSingle = false;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.dialog_userdebug);
|
||||
//按空白处不能取消动画
|
||||
setCanceledOnTouchOutside(false);
|
||||
//初始化界面控件
|
||||
initView();
|
||||
//初始化界面数据
|
||||
refreshView();
|
||||
//初始化界面控件的事件
|
||||
initEvent();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化界面的确定和取消监听器
|
||||
*/
|
||||
private void initEvent() {
|
||||
//设置确定按钮被点击后,向外界提供监听
|
||||
positiveBn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (onClickBottomListener != null) {
|
||||
onClickBottomListener.onPositiveClick();
|
||||
}
|
||||
}
|
||||
});
|
||||
//设置取消按钮被点击后,向外界提供监听
|
||||
negtiveBn.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (onClickBottomListener != null) {
|
||||
onClickBottomListener.onNegtiveClick();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化界面控件的显示数据
|
||||
*/
|
||||
private void refreshView() {
|
||||
//如果用户自定了title和message
|
||||
// if (!TextUtils.isEmpty(title)) {
|
||||
// titleTv.setText(title);
|
||||
// titleTv.setVisibility(View.VISIBLE);
|
||||
// } else {
|
||||
// titleTv.setVisibility(View.GONE);
|
||||
// }
|
||||
//如果设置按钮的文字
|
||||
if (!TextUtils.isEmpty(positive)) {
|
||||
positiveBn.setText(positive);
|
||||
} else {
|
||||
positiveBn.setText("确定");
|
||||
}
|
||||
if (!TextUtils.isEmpty(negtive)) {
|
||||
negtiveBn.setText(negtive);
|
||||
} else {
|
||||
negtiveBn.setText("取消");
|
||||
}
|
||||
|
||||
/**
|
||||
* 只显示一个按钮的时候隐藏取消按钮,回掉只执行确定的事件
|
||||
*/
|
||||
if (isSingle) {
|
||||
negtiveBn.setVisibility(View.GONE);
|
||||
} else {
|
||||
negtiveBn.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void show() {
|
||||
super.show();
|
||||
refreshView();
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化界面控件
|
||||
*/
|
||||
private void initView() {
|
||||
negtiveBn = findViewById(R.id.bt_cancel);
|
||||
positiveBn = findViewById(R.id.bt_confirm);
|
||||
titleTv = findViewById(R.id.tv_title);
|
||||
editText = findViewById(R.id.editText);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置确定取消按钮的回调
|
||||
*/
|
||||
private OnClickBottomListener onClickBottomListener;
|
||||
|
||||
public void setOnClickBottomListener(OnClickBottomListener onClickBottomListener) {
|
||||
this.onClickBottomListener = onClickBottomListener;
|
||||
}
|
||||
|
||||
public interface OnClickBottomListener {
|
||||
/**
|
||||
* 点击确定按钮事件
|
||||
*/
|
||||
void onPositiveClick();
|
||||
|
||||
/**
|
||||
* 点击取消按钮事件
|
||||
*/
|
||||
void onNegtiveClick();
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public UserDebugDialog setMessage(String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public UserDebugDialog setTitle(String title) {
|
||||
this.title = title;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getPositive() {
|
||||
return positive;
|
||||
}
|
||||
|
||||
public UserDebugDialog setPositive(String positive) {
|
||||
this.positive = positive;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getNegtive() {
|
||||
return negtive;
|
||||
}
|
||||
|
||||
public UserDebugDialog setNegtive(String negtive) {
|
||||
this.negtive = negtive;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UserDebugDialog setNegtiveText(String negtive) {
|
||||
negtiveBn.setText(negtive);
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getImageResId() {
|
||||
return imageResId;
|
||||
}
|
||||
|
||||
public boolean isSingle() {
|
||||
return isSingle;
|
||||
}
|
||||
|
||||
public UserDebugDialog setSingle(boolean single) {
|
||||
isSingle = single;
|
||||
return this;
|
||||
}
|
||||
|
||||
public UserDebugDialog setImageResId(int imageResId) {
|
||||
this.imageResId = imageResId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void showKeyboard() {
|
||||
if (editText != null) {
|
||||
//设置可获得焦点
|
||||
editText.setFocusable(true);
|
||||
editText.setFocusableInTouchMode(true);
|
||||
//请求获得焦点
|
||||
editText.requestFocus();
|
||||
//调用系统输入法
|
||||
InputMethodManager inputManager = (InputMethodManager) editText
|
||||
.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
inputManager.showSoftInput(editText, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismiss() {
|
||||
super.dismiss();
|
||||
|
||||
}
|
||||
|
||||
public String getEdittext() {
|
||||
if (!TextUtils.isEmpty(editText.getText().toString())) {
|
||||
return editText.getText().toString().trim();
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2166,6 +2166,12 @@ public class JgyUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getDeveloperOptions() {
|
||||
int development = Settings.System.getInt(crv, CommonConfig.AOLE_ACTION_DEVELOPER_OPTIONS, 0);
|
||||
int adb = Settings.Global.getInt(crv, Settings.Global.ADB_ENABLED, 0);
|
||||
return development == 1 && adb == 1;
|
||||
}
|
||||
|
||||
private String chromium_pkg = "org.chromium.browser";
|
||||
|
||||
public void hookWebView() {
|
||||
|
||||
@@ -203,7 +203,7 @@ public class SysSettingUtils {
|
||||
}
|
||||
}
|
||||
|
||||
private static void setUsbStatus(Context context, int state) {
|
||||
public static void setUsbStatus(Context context, int state) {
|
||||
Log.e(TAG, "setUsbStatus: " + state);
|
||||
//USB数据功能管控
|
||||
//仅充电:usb_charge
|
||||
@@ -330,6 +330,11 @@ public class SysSettingUtils {
|
||||
context.sendBroadcast(usbIntent);
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
public static boolean isDisableUsbStatus(Context context) {
|
||||
return "usb_charge".equals(Settings.System.getString(context.getContentResolver(), "aole_usb_choose"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -495,6 +500,11 @@ public class SysSettingUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static int getBluetooth(Context context) {
|
||||
int setting_bht = Settings.System.getInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_BHT_FORBID_ON, 0);
|
||||
return setting_bht;
|
||||
}
|
||||
|
||||
private static void setHotspot(Context context, int state) {
|
||||
try {
|
||||
Intent intent = new Intent();
|
||||
@@ -633,7 +643,7 @@ public class SysSettingUtils {
|
||||
}
|
||||
}
|
||||
|
||||
private static void setCamera(Context context, int state) {
|
||||
public static void setCamera(Context context, int state) {
|
||||
try {
|
||||
//摄像头开关
|
||||
boolean qch_app_camera = Settings.System.putInt(context.getContentResolver(), "qch_app_camera", 0);
|
||||
@@ -681,7 +691,11 @@ public class SysSettingUtils {
|
||||
}
|
||||
}
|
||||
|
||||
private static void setTF(Context context, int state) {
|
||||
public static int getCamera(Context context) {
|
||||
return Settings.System.getInt(context.getContentResolver(), "qch_app_camera", 0);
|
||||
}
|
||||
|
||||
public static void setTF(Context context, int state) {
|
||||
//存储卡
|
||||
if (JgyUtils.isAllWinnerDevice()) {
|
||||
AllwinnerCubeMdmManager.getInstance().setSDEnable(state == 0);
|
||||
@@ -773,6 +787,10 @@ public class SysSettingUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static int getTF(Context context) {
|
||||
return Settings.System.getInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_SDCARD_FORBID_ON, 0);
|
||||
}
|
||||
|
||||
private static void setIcon(Context context, int state) {
|
||||
|
||||
}
|
||||
@@ -788,7 +806,7 @@ public class SysSettingUtils {
|
||||
Log.e(TAG, "qch_app_wallpaper" + state);
|
||||
}
|
||||
|
||||
private static void setCanReset(Context context, int state) {
|
||||
public static void setCanReset(Context context, int state) {
|
||||
Log.e(TAG, "setCanReset: state = " + state);
|
||||
Settings.System.putInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_RESTORE_FORBID_ON, state);
|
||||
//默认打开
|
||||
@@ -797,6 +815,10 @@ public class SysSettingUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean getCanReset(Context context) {
|
||||
return Settings.System.getInt(context.getContentResolver(), CommonConfig.AOLE_ACTION_RESTORE_FORBID_ON, 0) == 0;
|
||||
}
|
||||
|
||||
//aole_restore_forbid_on=1,禁止恢复出厂设置
|
||||
//aole_restore_forbid_on=0,允许恢复出厂设置
|
||||
private static void setCanReset(Context context, JsonObject jsonObject) {
|
||||
@@ -985,7 +1007,11 @@ public class SysSettingUtils {
|
||||
|
||||
}
|
||||
|
||||
private static void setAdminApp(Context context, int state) {
|
||||
public static int getAdminApp(Context context) {
|
||||
return Settings.System.getInt(context.getContentResolver(), CommonConfig.AOLE_APP_ALLOW_INSTALL, 0);
|
||||
}
|
||||
|
||||
public static void setAdminApp(Context context, int state) {
|
||||
Log.e(TAG, "setAdminApp: state = " + state);
|
||||
if (JgyUtils.isAllWinnerDevice()) {
|
||||
AllwinnerCubeMdmManager.getInstance().setInstallPackageEnable(state == 0);
|
||||
|
||||
11
app/src/main/res/drawable/bt_pressed.xml
Normal file
11
app/src/main/res/drawable/bt_pressed.xml
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<solid android:color="@color/activation_color" />
|
||||
<!-- 圆角的幅度 -->
|
||||
<corners
|
||||
android:topLeftRadius="24dp"
|
||||
android:topRightRadius="24dp"
|
||||
android:bottomLeftRadius="24dp"
|
||||
android:bottomRightRadius="24dp" />
|
||||
</shape>
|
||||
18
app/src/main/res/drawable/debug_edit_background.xml
Normal file
18
app/src/main/res/drawable/debug_edit_background.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#efefef" />
|
||||
<corners android:radius="8dp" />
|
||||
<!-- <stroke-->
|
||||
<!-- android:width="1dp"-->
|
||||
<!-- android:color="#505050" />-->
|
||||
<padding
|
||||
android:bottom="8dp"
|
||||
android:left="16dp"
|
||||
android:right="16dp"
|
||||
android:top="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
19
app/src/main/res/drawable/home_card_bg.xml
Normal file
19
app/src/main/res/drawable/home_card_bg.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 内部颜色 -->
|
||||
<!-- 圆角的幅度 -->
|
||||
|
||||
<corners android:radius="12dp" />
|
||||
|
||||
<solid android:color="@color/white" />
|
||||
|
||||
<!-- <gradient-->
|
||||
<!-- android:angle="270"-->
|
||||
<!-- android:endColor="#404d6c"-->
|
||||
<!-- android:startColor="#606c88" />-->
|
||||
<!-- <padding-->
|
||||
<!-- android:bottom="0dp"-->
|
||||
<!-- android:left="8dp"-->
|
||||
<!-- android:right="8dp"-->
|
||||
<!-- android:top="0dp" />-->
|
||||
</shape>
|
||||
311
app/src/main/res/layout/activity_debug.xml
Normal file
311
app/src/main/res/layout/activity_debug.xml
Normal file
@@ -0,0 +1,311 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activity.debug.DebugActivity">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="click"
|
||||
type="com.aoleyun.sn.activity.debug.DebugActivity.BtnClick" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/home_card_bg"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="禁止恢复出厂设置"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/sw_restore"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/background_top"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="禁止USB调试"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/sw_usb_debug"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/background_top"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="禁止SD卡使用"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/sw_tf"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/background_top"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="禁止开发者选项"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/swDeveloper"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/background_top"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="禁止蓝牙"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/swBluetooth"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/background_top"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="禁止相机"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/swCamera"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/background_top"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="禁止应用安装"
|
||||
android:textColor="@color/textColor"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Switch
|
||||
android:id="@+id/swAppinstall"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1px"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/background_top"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_confirm"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginBottom="@dimen/dp_16"
|
||||
android:background="@drawable/bt_pressed"
|
||||
android:onClick="@{click::refresh}"
|
||||
android:text="刷新"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
87
app/src/main/res/layout/dialog_userdebug.xml
Normal file
87
app/src/main/res/layout/dialog_userdebug.xml
Normal file
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="340dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_dialog"
|
||||
android:focusableInTouchMode="true"
|
||||
android:minWidth="340dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="请输入密码"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="48dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/debug_edit_background"
|
||||
android:focusable="true"
|
||||
android:hint="请输入密码"
|
||||
android:inputType="numberPassword"
|
||||
android:textColor="@color/black"
|
||||
android:textColorHint="@color/gray"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="48dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/editText"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="@+id/editText"
|
||||
app:layout_constraintTop_toBottomOf="@+id/editText">
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_cancel"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/bt_disable"
|
||||
android:text="取消"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.0" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bt_confirm"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/bt_pressed"
|
||||
android:text="确定"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -62,6 +62,8 @@
|
||||
<color name="text_black">#1f1f1f</color>
|
||||
<color name="text_hint_gray">#989898</color>
|
||||
|
||||
<color name="gray">#80808080</color>
|
||||
|
||||
<color name="contact_text_color">#98999a</color>
|
||||
<color name="lightGray">#FFD3D3D3</color>
|
||||
<color name="default_blue">#0166ff</color>
|
||||
|
||||
@@ -119,4 +119,17 @@
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="UserDebugDialog" parent="Theme.AppCompat.Dialog.Alert">
|
||||
<!--背景颜色及和透明程度-->
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<!--是否去除标题 -->
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<!--是否去除边框-->
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<!--是否浮现在activity之上-->
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<!--是否模糊-->
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
<item name="android:windowSoftInputMode">stateVisible|adjustPan</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
58
permission.xml
Normal file
58
permission.xml
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<exceptions>
|
||||
<exception package="com.aoleyun.sn">
|
||||
<permission name="android.permission.CAMERA" fixed="true" />
|
||||
<permission name="android.permission.BROADCAST_STICKY" fixed="true" />
|
||||
<permission name="android.permission.BLUETOOTH" fixed="true" />
|
||||
<permission name="android.permission.BLUETOOTH_ADMIN" fixed="true" />
|
||||
<permission name="android.permission.CHANGE_NETWORK_STATE" fixed="true" />
|
||||
<permission name="android.permission.GET_PACKAGE_SIZE" fixed="true" />
|
||||
<permission name="android.permission.QUERY_ALL_PACKAGES" fixed="true" />
|
||||
<permission name="android.permission.KILL_BACKGROUND_PROCESSES" fixed="true" />
|
||||
<permission name="android.permission.READ_SYNC_SETTINGS" fixed="true" />
|
||||
<permission name="android.permission.RECORD_AUDIO" fixed="true" />
|
||||
<permission name="android.permission.RECEIVE_BOOT_COMPLETED" fixed="true" />
|
||||
<permission name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" fixed="true" />
|
||||
<permission name="android.permission.SYSTEM_ALERT_WINDOW" fixed="true" />
|
||||
<permission name="android.permission.SYSTEM_OVERLAY_WINDOW" fixed="true" />
|
||||
<permission name="android.permission.MODIFY_AUDIO_SETTINGS" fixed="true" />
|
||||
<permission name="android.permission.WRITE_SECURE_SETTINGS" fixed="true" />
|
||||
<permission name="android.permission.BATTERY_STATS" fixed="true" />
|
||||
<permission name="android.permission.DELETE_CACHE_FILES" fixed="true" />
|
||||
<permission name="android.permission.DUMP" fixed="true" />
|
||||
<permission name="android.permission.MASTER_CLEAR" fixed="true" />
|
||||
<permission name="android.permission.REBOOT" fixed="true" />
|
||||
<permission name="android.permission.REAL_GET_TASKS" fixed="true" />
|
||||
<permission name="android.permission.READ_PRIVILEGED_PHONE_STATE" fixed="true" />
|
||||
<permission name="android.permission.SHUTDOWN" fixed="true" />
|
||||
<permission name="android.permission.GET_TASKS" fixed="true" />
|
||||
<permission name="android.permission.SET_WALLPAPER" fixed="true" />
|
||||
<permission name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS" fixed="true" />
|
||||
<permission name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" fixed="true" />
|
||||
<permission name="android.permission.INSTALL_PACKAGES" fixed="true" />
|
||||
<permission name="android.permission.REQUEST_INSTALL_PACKAGES" fixed="true" />
|
||||
<permission name="android.permission.DELETE_PACKAGES" fixed="true" />
|
||||
<permission name="com.aoleyun.sn.permissions.INSTALL_APK" fixed="true" />
|
||||
<permission name="android.permission.ACCESS_COARSE_LOCATION" fixed="true" />
|
||||
<permission name="android.permission.ACCESS_FINE_LOCATION" fixed="true" />
|
||||
<permission name="android.permission.ACCESS_WIFI_STATE" fixed="true" />
|
||||
<permission name="android.permission.ACCESS_NETWORK_STATE" fixed="true" />
|
||||
<permission name="android.permission.CHANGE_WIFI_STATE" fixed="true" />
|
||||
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" fixed="true" />
|
||||
<permission name="android.permission.INTERNET" fixed="true" />
|
||||
<permission name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" fixed="true" />
|
||||
<permission name="android.permission.READ_LOGS" fixed="true" />
|
||||
<permission name="android.permission.VIBRATE" fixed="true" />
|
||||
<permission name="android.permission.WAKE_LOCK" fixed="true" />
|
||||
<permission name="android.permission.WRITE_SETTINGS" fixed="true" />
|
||||
<permission name="android.permission.FOREGROUND_SERVICE" fixed="true" />
|
||||
<permission name="android.permission.READ_PHONE_STATE" fixed="true" />
|
||||
<permission name="android.permission.READ_EXTERNAL_STORAGE" fixed="true" />
|
||||
<permission name="android.permission.ACCESS_MOCK_LOCATION" fixed="true" />
|
||||
<permission name="android.permission.ACTIVITY_RECOGNITION" fixed="true" />
|
||||
<permission name="android.permission.SCHEDULE_EXACT_ALARM" fixed="true" />
|
||||
<permission name="android.permission.RECEIVE_USER_PRESENT" fixed="true" />
|
||||
<permission name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" fixed="true" />
|
||||
<permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="true" />
|
||||
</exception>
|
||||
</exceptions>
|
||||
Reference in New Issue
Block a user