Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
MobileManager
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Wang Xu
MobileManager
Commits
3f8d9c8a
Commit
3f8d9c8a
authored
Mar 24, 2020
by
Baoxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 网络异常时提示并退出
parent
59b74cc3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
5 deletions
+17
-5
Launcher.java
Launcher3/src/com/android/launcher3/Launcher.java
+12
-0
DialogManager.kt
...in/java/com/secspace/lib/common/function/DialogManager.kt
+1
-1
SwitchInMdm.kt
...main/java/com/secspace/lib/common/function/SwitchInMdm.kt
+3
-3
strings.xml
lib_common/src/main/res/values/strings.xml
+1
-1
No files found.
Launcher3/src/com/android/launcher3/Launcher.java
View file @
3f8d9c8a
...
@@ -1203,7 +1203,19 @@ public class Launcher extends BaseActivity
...
@@ -1203,7 +1203,19 @@ public class Launcher extends BaseActivity
ActivationHelper
.
INSTANCE
.
active
(
this
,
new
ActivationHelper
.
ActivationListener
()
{
ActivationHelper
.
INSTANCE
.
active
(
this
,
new
ActivationHelper
.
ActivationListener
()
{
@Override
@Override
public
void
activationFailed
()
{
public
void
activationFailed
()
{
DialogManager
.
INSTANCE
.
showActivateLoseDialog
(
Launcher
.
this
,
getString
(
R
.
string
.
common_remind
)
,
getString
(
R
.
string
.
dialog_tip_activate_lose
),
new
DialogManager
.
MessageListener
()
{
@Override
public
void
onPositive
()
{
IntentUtil
.
startHomeIntent
(
Launcher
.
this
);
}
@Override
public
void
onNegative
()
{
}
})
;
}
}
@Override
@Override
...
...
lib_common/src/main/java/com/secspace/lib/common/function/DialogManager.kt
View file @
3f8d9c8a
...
@@ -69,7 +69,7 @@ object DialogManager{
...
@@ -69,7 +69,7 @@ object DialogManager{
}
}
fun
showActivateLoseDialog
(
activity
:
Activity
?,
title
:
String
?,
content
:
String
?,
listener
:
MessageListener
)
{
fun
showActivateLoseDialog
(
activity
:
Activity
?,
title
:
String
?,
content
:
String
?,
listener
:
MessageListener
)
{
DialogUIUtils
.
showAlert
(
activity
,
title
,
content
,
""
,
""
,
"确定"
,
"
输入激活码
"
,
false
,
false
,
false
,
object
:
DialogUIListener
()
{
DialogUIUtils
.
showAlert
(
activity
,
title
,
content
,
""
,
""
,
"确定"
,
""
,
false
,
false
,
false
,
object
:
DialogUIListener
()
{
override
fun
onPositive
()
{
override
fun
onPositive
()
{
listener
.
onPositive
()
listener
.
onPositive
()
}
}
...
...
lib_common/src/main/java/com/secspace/lib/common/function/SwitchInMdm.kt
View file @
3f8d9c8a
...
@@ -8,15 +8,12 @@ import android.content.pm.PackageManager
...
@@ -8,15 +8,12 @@ import android.content.pm.PackageManager
import
android.content.pm.ResolveInfo
import
android.content.pm.ResolveInfo
import
android.os.Build.VERSION_CODES
import
android.os.Build.VERSION_CODES
import
android.util.Log
import
android.util.Log
import
com.secspace.lib.common.dialog.LoadingDialog
import
com.secspace.lib.common.env.Packages.PkgSecSpace
import
com.secspace.lib.common.env.Packages.PkgSecSpace
import
com.secspace.lib.common.utils.*
import
com.secspace.lib.common.utils.*
import
com.secspace.lib.common.utils.Package.ComponentNames.COMPONENT_UPDATE_SYSTEM
import
com.secspace.lib.common.utils.Package.ComponentNames.COMPONENT_UPDATE_SYSTEM
import
com.secspace.lib.common.utils.Package.ComponentNames.EnterprisePrivacySettingsActivity
import
com.secspace.lib.common.utils.Package.ComponentNames.EnterprisePrivacySettingsActivity
import
com.secspace.mdmengine.api.manager.MdmFactoryManager
import
com.secspace.mdmengine.api.manager.MdmFactoryManager
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.Dispatchers
import
kotlinx.coroutines.GlobalScope
import
kotlinx.coroutines.launch
import
kotlinx.coroutines.withContext
import
kotlinx.coroutines.withContext
import
java.util.*
import
java.util.*
...
@@ -25,6 +22,9 @@ object SwitchInMdm: ISwitch() {
...
@@ -25,6 +22,9 @@ object SwitchInMdm: ISwitch() {
private
val
TAG
=
"SwitchInMdm"
private
val
TAG
=
"SwitchInMdm"
override
suspend
fun
init
(
context
:
Context
)
{
override
suspend
fun
init
(
context
:
Context
)
{
this
.
context
=
context
this
.
context
=
context
if
(
MdmFactoryManager
.
getInstance
().
deviceApplicationManager
==
null
){
return
}
MdmUtils
.
setDefaultLauncher
(
context
)
MdmUtils
.
setDefaultLauncher
(
context
)
val
mdmFactoryManager
=
DpmHelper
.
getInstance
(
context
).
getmMdmFactoryManager
()
val
mdmFactoryManager
=
DpmHelper
.
getInstance
(
context
).
getmMdmFactoryManager
()
...
...
lib_common/src/main/res/values/strings.xml
View file @
3f8d9c8a
...
@@ -39,5 +39,5 @@
...
@@ -39,5 +39,5 @@
<string
name=
"close_btn"
>
关闭
</string>
<string
name=
"close_btn"
>
关闭
</string>
<string
name=
"btn_input_code"
>
输入激活码
</string>
<string
name=
"btn_input_code"
>
输入激活码
</string>
<string
name=
"dialog_tip_activate_lose"
>
您的激活已失效,如有疑问请致电4008265936
</string>
<string
name=
"dialog_tip_activate_lose"
>
网络异常,请确认网络后重新进入
</string>
</resources>
</resources>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment