合并测试3
This commit is contained in:
parent
08ab5b0bb0
commit
4420d5ec1a
@ -4,7 +4,7 @@
|
||||
<component name="GradleSettings">
|
||||
<option name="linkedExternalProjectsSettings">
|
||||
<GradleProjectSettings>
|
||||
<option name="testRunner" value="GRADLE" />
|
||||
<option name="testRunner" value="PLATFORM" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="modules">
|
||||
@ -14,6 +14,7 @@
|
||||
<option value="$PROJECT_DIR$/mylibrary" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="resolveModulePerSourceSet" value="false" />
|
||||
</GradleProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
|
@ -3,17 +3,29 @@
|
||||
<component name="DesignSurface">
|
||||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/drawable/bg_splash.xml" value="0.148" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/drawable/select_pass.xml" value="0.148" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/drawable/select_read.xml" value="0.148" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/drawable/shape_btn_bg4.xml" value="0.148" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/drawable/shape_code.xml" value="0.148" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/drawable/shape_count_downbg.xml" value="0.148" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/drawable/shape_mine_bg20.xml" value="0.148" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/layout/activity_add_go.xml" value="0.3515625" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/layout/activity_apply.xml" value="0.3515625" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/layout/activity_apply_detail.xml" value="0.3515625" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/layout/activity_business_info.xml" value="0.18697916666666667" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/layout/activity_change_phone.xml" value="0.18697916666666667" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/layout/activity_examine_detail.xml" value="0.3515625" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/layout/activity_home.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/layout/activity_launcher.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/layout/activity_login.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/layout/activity_register.xml" value="0.18697916666666667" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/layout/fragment_gone.xml" value="0.3515625" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/layout/fragment_home.xml" value="0.240625" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/layout/fragment_mine.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/2022work/Examine/app/src/main/res/layout/item_apply.xml" value="0.240625" />
|
||||
<entry key="..\:/2022work/Examine/mylibrary/src/main/res/layout/custom_part_shadow_popup.xml" value="0.3614583333333333" />
|
||||
<entry key="..\:/2022work/Examine/mylibrary/src/main/res/layout/dialog_photo_select.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/2022work/Examine/mylibrary/src/main/res/layout/my_confim_popup_input.xml" value="0.3614583333333333" />
|
||||
</map>
|
||||
</option>
|
||||
|
10
.idea/runConfigurations.xml
Normal file
10
.idea/runConfigurations.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
@ -101,6 +101,10 @@ android {
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -64,6 +64,12 @@ class HomeActivity : BaseActivity(), ViewPager.OnPageChangeListener, OnTabSelect
|
||||
// }
|
||||
|
||||
home_tabLayout.setOnTabSelectListener(this)
|
||||
// home_NoScrollViewPager.apply {
|
||||
// adapter = MyHomePagerAdapter(supportFragmentManager,
|
||||
// mTitles,
|
||||
// mFragments)
|
||||
// addOnPageChangeListener(this@HomeActivity)
|
||||
// }
|
||||
home_NoScrollViewPager.setAdapter(MyHomePagerAdapter(this.supportFragmentManager,
|
||||
mTitles,
|
||||
mFragments))
|
||||
|
@ -23,6 +23,7 @@ import com.dahe.mylibrary.net.CommonResponseBean
|
||||
import com.dahe.mylibrary.net.JsonUtils
|
||||
import com.dahe.mylibrary.utils.ActivityUtils
|
||||
import com.dahe.mylibrary.utils.Base64Utils
|
||||
import com.dahe.mylibrary.utils.MobileInfoUtils
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.core.Observable
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
@ -75,6 +76,8 @@ class LoginActivity : BaseActivity(), EasyPermissions.PermissionCallbacks, View.
|
||||
override fun onClick(view: View) {
|
||||
when (view.id) {
|
||||
R.id.btn_log -> {
|
||||
// MobileInfoUtils().jumpStartInterface(this)
|
||||
|
||||
if (!EasyPermissions.hasPermissions(this, *perms)) {
|
||||
EasyPermissions.requestPermissions(
|
||||
this@LoginActivity,
|
||||
@ -87,14 +90,23 @@ class LoginActivity : BaseActivity(), EasyPermissions.PermissionCallbacks, View.
|
||||
}
|
||||
|
||||
}
|
||||
// R.id.tv_forget -> ActivityUtils.startActivity(mContext, ForgetPwdActivity::class.java)
|
||||
R.id.tv_yhxy -> AppActivityUtils.openWebViewActivity(this,
|
||||
"用户服务协议",
|
||||
"http://tms.down.user.test.dahehuodongbao.com/user-agreement.html");
|
||||
R.id.tv_yszc -> AppActivityUtils.openWebViewActivity(this, "隐私政策",
|
||||
"http://tms.down.user.test.dahehuodongbao.com/user-privacy.html")
|
||||
R.id.tv_yhxy -> {
|
||||
// R.id.tv_forget -> ActivityUtils.startActivity(mContext, ForgetPwdActivity::class.java)
|
||||
AppActivityUtils.openWebViewActivity(this,
|
||||
"用户服务协议",
|
||||
"http://tms.down.user.test.dahehuodongbao.com/user-agreement.html")
|
||||
};
|
||||
R.id.tv_yszc -> // R.id.tv_forget -> ActivityUtils.startActivity(mContext, ForgetPwdActivity::class.java)
|
||||
{
|
||||
AppActivityUtils.openWebViewActivity(this, "隐私政策",
|
||||
"http://tms.down.user.test.dahehuodongbao.com/user-privacy.html")
|
||||
}
|
||||
|
||||
R.id.imgCode -> getCode()
|
||||
R.id.imgCode ->// R.id.tv_forget -> ActivityUtils.startActivity(mContext, ForgetPwdActivity::class.java)
|
||||
// R.id.tv_forget -> ActivityUtils.startActivity(mContext, ForgetPwdActivity::class.java)
|
||||
{
|
||||
getCode()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,160 @@
|
||||
package com.dahe.mylibrary.utils;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
|
||||
/**
|
||||
* @ClassName MobileInfoUtils
|
||||
* @Author 用户
|
||||
* @Date 2022/10/8 10:18
|
||||
* @Description TODO
|
||||
*/
|
||||
public class MobileInfoUtils {
|
||||
|
||||
// private SettingDialogPermision dialog_per;
|
||||
|
||||
//获取手机类型
|
||||
|
||||
private static String getMobileType() {
|
||||
|
||||
return Build.MANUFACTURER;
|
||||
|
||||
}
|
||||
|
||||
//跳转至授权页面
|
||||
|
||||
public void jumpStartInterface(Context context) {
|
||||
|
||||
Intent intent = new Intent();
|
||||
|
||||
try {
|
||||
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
Log.e("HLQ_Struggle", "******************当前手机型号为:" + getMobileType());
|
||||
|
||||
ComponentName componentName = null;
|
||||
|
||||
if (getMobileType().equals("Xiaomi")) { // 红米Note4测试通过
|
||||
|
||||
componentName = new ComponentName("com.miui.securitycenter", "com.miui.permcenter.autostart.AutoStartManagementActivity");
|
||||
|
||||
} else if (getMobileType().equals("Letv")) { // 乐视2测试通过
|
||||
|
||||
intent.setAction("com.letv.android.permissionautoboot");
|
||||
|
||||
} else if (getMobileType().equals("samsung")) { // 三星Note5测试通过
|
||||
|
||||
//componentName = new ComponentName("com.samsung.android.sm_cn", "com.samsung.android.sm.ui.ram.AutoRunActivity");
|
||||
|
||||
//componentName = ComponentName.unflattenFromString("com.samsung.android.sm/.ui.ram.RamActivity");// Permission Denial not exported from uid 1000,不允许被其他程序调用
|
||||
|
||||
componentName = ComponentName.unflattenFromString("com.samsung.android.sm/.app.dashboard.SmartManagerDashBoardActivity");
|
||||
|
||||
} else if (getMobileType().equals("HUAWEI")) { // 华为测试通过
|
||||
|
||||
componentName = new ComponentName("com.huawei.systemmanager", "com.huawei.systemmanager.optimize.process.ProtectActivity");//锁屏清理
|
||||
// componentName = new ComponentName("com.huawei.systemmanager", "com.huawei.systemmanager.startupmgr.ui.StartupNormalAppListActivity");
|
||||
// componentName = ComponentName.unflattenFromString("com.huawei.systemmanager/.startupmgr.ui.StartupNormalAppListActivity");//跳自启动管理
|
||||
|
||||
//SettingOverlayView.show(context);
|
||||
|
||||
} else if (getMobileType().equals("vivo")) { // VIVO测试通过
|
||||
|
||||
componentName = ComponentName.unflattenFromString("com.iqoo.secure/.safeguard.PurviewTabActivity");
|
||||
|
||||
} else if (getMobileType().equals("Meizu")) { //万恶的魅族
|
||||
|
||||
//componentName = ComponentName.unflattenFromString("com.meizu.safe/.permission.PermissionMainActivity");//跳转到手机管家
|
||||
|
||||
componentName = ComponentName.unflattenFromString("com.meizu.safe/.permission.SmartBGActivity");//跳转到后台管理页面
|
||||
|
||||
} else if (getMobileType().equals("OPPO")) { // OPPO R8205测试通过
|
||||
|
||||
componentName = ComponentName.unflattenFromString("com.oppo.safe/.permission.startup.StartupAppListActivity");
|
||||
|
||||
} else if (getMobileType().equals("ulong")) { // 360手机 未测试
|
||||
|
||||
componentName = new ComponentName("com.yulong.android.coolsafe", ".ui.activity.autorun.AutoRunListActivity");
|
||||
|
||||
} else {
|
||||
|
||||
// 将用户引导到系统设置页面
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 9) {
|
||||
|
||||
Log.e("HLQ_Struggle", "APPLICATION_DETAILS_SETTINGS");
|
||||
|
||||
intent.setAction("android.settings.APPLICATION_DETAILS_SETTINGS");
|
||||
|
||||
intent.setData(Uri.fromParts("package", context.getPackageName(), null));
|
||||
|
||||
} else if (Build.VERSION.SDK_INT <= 8) {
|
||||
|
||||
intent.setAction(Intent.ACTION_VIEW);
|
||||
|
||||
intent.setClassName("com.android.settings", "com.android.settings.InstalledAppDetails");
|
||||
|
||||
intent.putExtra("com.android.settings.ApplicationPkgName", context.getPackageName());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
intent.setComponent(componentName);
|
||||
|
||||
context.startActivity(intent);
|
||||
|
||||
// if (getMobileType().equals("Xiaomi")) {
|
||||
//
|
||||
// showtip();//显示弹窗(**特别注意**)
|
||||
//
|
||||
// }
|
||||
//
|
||||
// if (getMobileType().equals("samsung")){
|
||||
//
|
||||
// new SettingOverlayView().show(context);//
|
||||
//
|
||||
// }
|
||||
|
||||
} catch (Exception e) {//抛出异常就直接打开设置页面
|
||||
|
||||
Log.e("HLQ_Struggle", e.getLocalizedMessage());
|
||||
|
||||
intent = new Intent(Settings.ACTION_SETTINGS);
|
||||
|
||||
context.startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//小米手机显示弹窗
|
||||
|
||||
// private void showtip() {
|
||||
//
|
||||
// try {
|
||||
//
|
||||
// dialog_per=new SettingDialogPermision(context, R.style.CustomDialog4);
|
||||
//
|
||||
// dialog_per.getWindow().setType(WindowManager.LayoutParams.TYPE_TOAST);//注意这里改成吐司类型
|
||||
//
|
||||
// dialog_per.show();
|
||||
//
|
||||
// Log.e("HLQ_Struggle","显示弹窗");
|
||||
//
|
||||
// } catch (Exception e) {
|
||||
//
|
||||
// e.printStackTrace();
|
||||
//
|
||||
// Log.e("HLQ_Struggle", "没有显示弹窗"+e.getMessage());
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
}
|
Loading…
Reference in New Issue
Block a user