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
1990a495
Commit
1990a495
authored
Mar 18, 2020
by
Baoxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: 完成需求
parent
b907eb49
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
90 additions
and
82 deletions
+90
-82
AndroidManifest.xml
Launcher3/AndroidManifest.xml
+2
-2
bg.jpg
Launcher3/res/drawable/bg.jpg
+0
-0
bg.png
Launcher3/res/drawable/bg.png
+0
-0
activity_pwd_pin_set.xml
Launcher3/res/layout/activity_pwd_pin_set.xml
+3
-2
App.java
Launcher3/src/com/android/launcher3/App.java
+1
-11
Launcher.java
Launcher3/src/com/android/launcher3/Launcher.java
+38
-18
ManagerAuthActivity.java
Launcher3/src/com/android/launcher3/ManagerAuthActivity.java
+1
-13
PwdPinSetPwdActivity.java
.../android/launcher3/function/pwd/PwdPinSetPwdActivity.java
+27
-22
ChangePwdActivity.java
...src/com/android/launcher3/settings/ChangePwdActivity.java
+1
-1
ErrorTimeHelper.java
...3/src/com/android/launcher3/settings/ErrorTimeHelper.java
+8
-4
gradle.properties
gradle.properties
+3
-3
build.gradle
lib_common/build.gradle
+1
-1
CheckUpdateCore.java
.../java/com/secspace/lib/common/update/CheckUpdateCore.java
+4
-4
strings.xml
lib_common/src/main/res/values/strings.xml
+1
-1
No files found.
Launcher3/AndroidManifest.xml
View file @
1990a495
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
android:stateNotNeeded=
"true"
android:stateNotNeeded=
"true"
android:taskAffinity=
""
android:taskAffinity=
""
android:windowSoftInputMode=
"adjustPan|stateUnchanged"
android:windowSoftInputMode=
"adjustPan|stateUnchanged"
android:theme=
"@style/Theme.AppCompat"
>
android:theme=
"@style/Theme.AppCompat
.Light
"
>
<intent-filter>
<intent-filter>
<!-- <action android:name="android.intent.action.MAIN" /> -->
<!-- <action android:name="android.intent.action.MAIN" /> -->
...
@@ -113,7 +113,7 @@
...
@@ -113,7 +113,7 @@
android:name=
".function.pwd.PwdPinSetPwdActivity"
android:name=
".function.pwd.PwdPinSetPwdActivity"
android:autoRemoveFromRecents=
"true"
android:autoRemoveFromRecents=
"true"
android:screenOrientation=
"portrait"
android:screenOrientation=
"portrait"
android:theme=
"@style/Theme.AppCompat"
/>
android:theme=
"@style/Theme.AppCompat
.Light.NoActionBar
"
/>
<activity
<activity
android:name=
".SettingsActivity"
android:name=
".SettingsActivity"
...
...
Launcher3/res/drawable/bg.jpg
deleted
100644 → 0
View file @
b907eb49
This diff is collapsed.
Click to expand it.
Launcher3/res/drawable/bg.png
0 → 100644
View file @
1990a495
430 KB
Launcher3/res/layout/activity_pwd_pin_set.xml
View file @
1990a495
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<TextView
<TextView
...
@@ -10,7 +11,7 @@
...
@@ -10,7 +11,7 @@
android:layout_gravity=
"center"
android:layout_gravity=
"center"
android:layout_marginTop=
"40dp"
android:layout_marginTop=
"40dp"
android:text=
"设置混合密码"
android:text=
"设置混合密码"
android:textColor=
"
#fff
"
android:textColor=
"
@android:color/white
"
android:textSize=
"16dp"
/>
android:textSize=
"16dp"
/>
<ImageView
<ImageView
...
@@ -27,7 +28,7 @@
...
@@ -27,7 +28,7 @@
android:layout_gravity=
"center_horizontal"
android:layout_gravity=
"center_horizontal"
android:layout_marginTop=
"20dp"
android:layout_marginTop=
"20dp"
android:text=
"密码至少6位字符组成"
android:text=
"密码至少6位字符组成"
android:textColor=
"@
color/spring_loaded_panel_color
"
android:textColor=
"@
android:color/white
"
android:textSize=
"12dp"
/>
android:textSize=
"12dp"
/>
<LinearLayout
<LinearLayout
...
...
Launcher3/src/com/android/launcher3/App.java
View file @
1990a495
...
@@ -7,17 +7,9 @@ import com.secspace.lib.common.update.CheckUpdateCore;
...
@@ -7,17 +7,9 @@ import com.secspace.lib.common.update.CheckUpdateCore;
import
com.secspace.lib.common.utils.DpmHelper
;
import
com.secspace.lib.common.utils.DpmHelper
;
import
com.secspace.lib.common.utils.ImeiUtil
;
import
com.secspace.lib.common.utils.ImeiUtil
;
import
com.secspace.lib.common.utils.PkgManager
;
import
com.secspace.lib.common.utils.PkgManager
;
import
com.secspace.mdmengine.api.annotation.WhichFactory
;
import
com.secspace.mdmengine.api.manager.IMiddleWareManager
;
import
com.secspace.mdmengine.api.manager.MdmFactoryManager
;
import
com.skr.activation.api.ActivationApi
;
import
com.skr.activation.api.ActivationApi
;
import
com.skr.update.AppUpdateManager
;
import
com.skr.update.AppUpdateManager
;
import
static
com
.
secspace
.
lib
.
common
.
env
.
Packages
.
PkgSecSpace
.
PACKAGENAME_MDMENHANCE
;
import
static
com
.
secspace
.
lib
.
common
.
env
.
Packages
.
PkgSecSpace
.
PACKAGENAME_MDMTEST
;
import
static
com
.
secspace
.
lib
.
common
.
env
.
Packages
.
PkgSecSpace
.
PACKAGENAME_MIDDLEWARE
;
import
static
com
.
secspace
.
lib
.
common
.
env
.
Packages
.
PkgSecSpace
.
PACKAGENAME_UNINSTALL_TOOL
;
public
class
App
extends
Application
{
public
class
App
extends
Application
{
private
Context
mApp
;
private
Context
mApp
;
...
@@ -35,9 +27,7 @@ public class App extends Application {
...
@@ -35,9 +27,7 @@ public class App extends Application {
@Override
@Override
public
void
onInstall
(
String
path
,
boolean
isManual
)
{
public
void
onInstall
(
String
path
,
boolean
isManual
)
{
if
(
isManual
)
{
PkgManager
.
getInstance
(
mApp
).
installByInstaller
(
path
);
PkgManager
.
getInstance
(
mApp
).
installByInstaller
(
path
);
}
}
}
});
});
DpmHelper
dpmHelper
=
DpmHelper
.
getInstance
(
mApp
);
DpmHelper
dpmHelper
=
DpmHelper
.
getInstance
(
mApp
);
...
...
Launcher3/src/com/android/launcher3/Launcher.java
View file @
1990a495
...
@@ -44,6 +44,7 @@ import android.content.pm.PackageManager;
...
@@ -44,6 +44,7 @@ import android.content.pm.PackageManager;
import
android.database.sqlite.SQLiteDatabase
;
import
android.database.sqlite.SQLiteDatabase
;
import
android.graphics.Bitmap
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.graphics.BitmapFactory
;
import
android.graphics.Color
;
import
android.graphics.Point
;
import
android.graphics.Point
;
import
android.graphics.Rect
;
import
android.graphics.Rect
;
import
android.graphics.drawable.BitmapDrawable
;
import
android.graphics.drawable.BitmapDrawable
;
...
@@ -78,6 +79,7 @@ import android.view.View;
...
@@ -78,6 +79,7 @@ import android.view.View;
import
android.view.View.OnLongClickListener
;
import
android.view.View.OnLongClickListener
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.view.ViewTreeObserver
;
import
android.view.ViewTreeObserver
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.view.WindowManager
;
import
android.view.accessibility.AccessibilityEvent
;
import
android.view.accessibility.AccessibilityEvent
;
import
android.view.accessibility.AccessibilityManager
;
import
android.view.accessibility.AccessibilityManager
;
...
@@ -441,6 +443,7 @@ public class Launcher extends BaseActivity
...
@@ -441,6 +443,7 @@ public class Launcher extends BaseActivity
}
}
mWifiManager
=
(
WifiManager
)
getApplicationContext
().
getSystemService
(
Context
.
WIFI_SERVICE
);
mWifiManager
=
(
WifiManager
)
getApplicationContext
().
getSystemService
(
Context
.
WIFI_SERVICE
);
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
transparent
();
// ImeiCheckUtils.getInstance(this).initImeiList();
// ImeiCheckUtils.getInstance(this).initImeiList();
LauncherAppState
app
=
LauncherAppState
.
getInstance
(
this
);
LauncherAppState
app
=
LauncherAppState
.
getInstance
(
this
);
...
@@ -3135,7 +3138,13 @@ public class Launcher extends BaseActivity
...
@@ -3135,7 +3138,13 @@ public class Launcher extends BaseActivity
try
{
try
{
ComponentName
componentName
=
intent
.
getComponent
();
ComponentName
componentName
=
intent
.
getComponent
();
if
(
componentName
!=
null
&&
componentName
.
getClassName
().
equals
(
Packages
.
ClassName
.
EXIT_CLASSNAME
))
{
if
(
componentName
!=
null
&&
componentName
.
getClassName
().
equals
(
Packages
.
ClassName
.
EXIT_CLASSNAME
))
{
showPwdDialog
();
// exit();
boolean
canInputPwd
=
ErrorTimeHelper
.
getInstance
(
mAppContext
).
canInputPwd
();
if
(
canInputPwd
)
{
showPwdDialog
();
}
else
{
ToastUtil
.
showShort
(
mAppContext
,
"请在"
+
ErrorTimeHelper
.
getInstance
(
mAppContext
).
getCountDownTime
()
+
"秒后重试"
);
}
return
true
;
return
true
;
}
}
if
(
Utilities
.
ATLEAST_MARSHMALLOW
if
(
Utilities
.
ATLEAST_MARSHMALLOW
...
@@ -3177,31 +3186,20 @@ public class Launcher extends BaseActivity
...
@@ -3177,31 +3186,20 @@ public class Launcher extends BaseActivity
@Override
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
dialog
.
dismiss
();
dialog
.
dismiss
();
finish
();
}
}
})
})
.
setPositiveButton
(
R
.
string
.
work_sure
,
new
DialogInterface
.
OnClickListener
()
{
.
setPositiveButton
(
R
.
string
.
work_sure
,
new
DialogInterface
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
InputUtil
.
closeSoftInput
(
getApplicationContext
(),
editText
);
InputUtil
.
closeSoftInput
(
getApplicationContext
(),
editText
);
boolean
canInputPwd
=
ErrorTimeHelper
.
getInstance
(
mAppContext
).
canInputPwd
();
if
(
TextUtils
.
equals
(
editText
.
getText
().
toString
(),
Prefs
.
getLoginPwd
(
mAppContext
)))
{
if
(
canInputPwd
)
{
exit
();
if
(
TextUtils
.
equals
(
editText
.
getText
().
toString
(),
Prefs
.
getLoginPwd
(
mAppContext
)))
{
exit
();
editText
.
setText
(
""
);
}
else
if
(
TextUtils
.
equals
(
editText
.
getText
().
toString
(),
"un00000101"
))
{
Prefs
.
setOpenSilenceInstallTool
(
mAppContext
,
true
);
DpmHelper
.
getInstance
(
mAppContext
).
preinstallApp
(
"toolV4.apk"
);
finish
();
}
else
{
ToastUtil
.
showLong
(
mAppContext
,
"密码错误!"
);
finish
();
}
}
else
{
}
else
{
ToastUtil
.
show
Short
(
mAppContext
,
"请在"
+
ErrorTimeHelper
.
getInstance
(
mAppContext
).
getCountDownTime
()
+
"秒后重试
"
);
ToastUtil
.
show
Long
(
mAppContext
,
"密码错误!
"
);
finish
();
ErrorTimeHelper
.
getInstance
(
mAppContext
).
addErrorCount
();
}
}
editText
.
setText
(
""
);
dialog
.
dismiss
();
}
}
})
})
.
create
();
.
create
();
...
@@ -4653,4 +4651,26 @@ public class Launcher extends BaseActivity
...
@@ -4653,4 +4651,26 @@ public class Launcher extends BaseActivity
}
}
}
}
}
}
protected
void
transparent
()
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
//5.x开始需要把颜色设置透明,否则导航栏会呈现系统默认的浅灰色
Window
window
=
this
.
getWindow
();
View
decorView
=
window
.
getDecorView
();
//两个 flag 要结合使用,表示让应用的主体内容占用系统状态栏的空间
int
option
=
View
.
SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
View
.
SYSTEM_UI_FLAG_LAYOUT_STABLE
;
decorView
.
setSystemUiVisibility
(
option
);
window
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
);
window
.
setStatusBarColor
(
Color
.
TRANSPARENT
);
}
else
{
Window
window
=
this
.
getWindow
();
WindowManager
.
LayoutParams
attributes
=
window
.
getAttributes
();
int
flagTranslucentStatus
=
WindowManager
.
LayoutParams
.
FLAG_TRANSLUCENT_STATUS
;
attributes
.
flags
|=
flagTranslucentStatus
;
window
.
setAttributes
(
attributes
);
}
}
}
}
}
Launcher3/src/com/android/launcher3/ManagerAuthActivity.java
View file @
1990a495
...
@@ -95,27 +95,15 @@ public class ManagerAuthActivity extends BaseActivity {
...
@@ -95,27 +95,15 @@ public class ManagerAuthActivity extends BaseActivity {
Intent
intent
=
new
Intent
();
Intent
intent
=
new
Intent
();
intent
.
setClass
(
mAppContext
,
AppChooseActivity
.
class
);
intent
.
setClass
(
mAppContext
,
AppChooseActivity
.
class
);
startActivity
(
intent
);
startActivity
(
intent
);
}
else
if
(
TextUtils
.
equals
(
editText
.
getText
().
toString
(),
"un00000101"
))
{
Prefs
.
setOpenSilenceInstallTool
(
mAppContext
,
true
);
DpmHelper
.
getInstance
(
mAppContext
).
preinstallApp
(
"toolV4.apk"
);
// String secondaryStoragePath = SdUtil.getSecondaryStoragePath(mAppContext);
// String filePath= secondaryStoragePath + File.separator + "tool.apk";
// File file=new File(filePath);
// if (file!=null&&file.exists()){
// MdmFactoryManager.getInstance().getDeviceApplicationManager().installPackage(filePath);
// }else {
// ToastUtil.showLong(mAppContext, "请确认文件存在或者已插入SD卡!");
// }
finish
();
}
else
{
}
else
{
ToastUtil
.
showLong
(
mAppContext
,
"密码错误!"
);
ToastUtil
.
showLong
(
mAppContext
,
"密码错误!"
);
ErrorTimeHelper
.
getInstance
(
mAppContext
).
addErrorCount
();
finish
();
finish
();
}
}
}
else
{
}
else
{
ToastUtil
.
showShort
(
mAppContext
,
"请在"
+
ErrorTimeHelper
.
getInstance
(
mAppContext
).
getCountDownTime
()+
"秒后重试"
);
ToastUtil
.
showShort
(
mAppContext
,
"请在"
+
ErrorTimeHelper
.
getInstance
(
mAppContext
).
getCountDownTime
()+
"秒后重试"
);
finish
();
finish
();
}
}
}
}
})
})
.
create
();
.
create
();
...
...
Launcher3/src/com/android/launcher3/function/pwd/PwdPinSetPwdActivity.java
View file @
1990a495
package
com
.
android
.
launcher3
.
function
.
pwd
;
package
com
.
android
.
launcher3
.
function
.
pwd
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.graphics.Color
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.support.annotation.Nullable
;
import
android.support.v7.app.AppCompatActivity
;
import
android.support.v7.app.AppCompatActivity
;
...
@@ -9,6 +11,8 @@ import android.text.InputType;
...
@@ -9,6 +11,8 @@ import android.text.InputType;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.util.Log
;
import
android.view.View
;
import
android.view.View
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.widget.Button
;
import
android.widget.Button
;
import
android.widget.CheckBox
;
import
android.widget.CheckBox
;
import
android.widget.CompoundButton
;
import
android.widget.CompoundButton
;
...
@@ -56,7 +60,7 @@ public class PwdPinSetPwdActivity extends AppCompatActivity implements View.OnCl
...
@@ -56,7 +60,7 @@ public class PwdPinSetPwdActivity extends AppCompatActivity implements View.OnCl
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_pwd_pin_set
);
setContentView
(
R
.
layout
.
activity_pwd_pin_set
);
initView
();
initView
();
initToolbar
();
transparent
();
}
}
private
void
initView
()
{
private
void
initView
()
{
...
@@ -68,27 +72,6 @@ public class PwdPinSetPwdActivity extends AppCompatActivity implements View.OnCl
...
@@ -68,27 +72,6 @@ public class PwdPinSetPwdActivity extends AppCompatActivity implements View.OnCl
mCbShowPwd
.
setOnCheckedChangeListener
(
this
);
mCbShowPwd
.
setOnCheckedChangeListener
(
this
);
}
}
private
void
initToolbar
()
{
// setSupportActionBar(mToolbar);
// mEditSearch.setVisibility(View.GONE);
// mToolbarTitle.setText("设置混合密码");
// mTvtip.setText("密码必须为数字、字母或常用符号的8-16位组合");
// mEditPwd.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_PASSWORD);
//
// mToolbarLeftImg.setImageResource(R.mipmap.back);
// mToolbarRightImg.setVisibility(View.GONE);
// mToolbarRightText.setVisibility(View.GONE);
// mToolbarLeftImg.setOnClickListener(new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// finish();
// }
// });
// mBtSure.setOnClickListener(this);
// mCbShowPwd.setOnClickListener(this);
// mCbShowPwd.setOnCheckedChangeListener(this);
}
private
void
startLauncher
()
{
private
void
startLauncher
()
{
Intent
intent
=
new
Intent
();
Intent
intent
=
new
Intent
();
intent
.
setAction
(
"android.start_launcher"
);
intent
.
setAction
(
"android.start_launcher"
);
...
@@ -142,4 +125,26 @@ public class PwdPinSetPwdActivity extends AppCompatActivity implements View.OnCl
...
@@ -142,4 +125,26 @@ public class PwdPinSetPwdActivity extends AppCompatActivity implements View.OnCl
mEditPwd
.
setInputType
(
InputType
.
TYPE_CLASS_NUMBER
|
InputType
.
TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
);
mEditPwd
.
setInputType
(
InputType
.
TYPE_CLASS_NUMBER
|
InputType
.
TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
);
}
}
}
}
protected
void
transparent
()
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
//5.x开始需要把颜色设置透明,否则导航栏会呈现系统默认的浅灰色
Window
window
=
this
.
getWindow
();
View
decorView
=
window
.
getDecorView
();
//两个 flag 要结合使用,表示让应用的主体内容占用系统状态栏的空间
int
option
=
View
.
SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
View
.
SYSTEM_UI_FLAG_LAYOUT_STABLE
;
decorView
.
setSystemUiVisibility
(
option
);
window
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
);
window
.
setStatusBarColor
(
Color
.
TRANSPARENT
);
}
else
{
Window
window
=
this
.
getWindow
();
WindowManager
.
LayoutParams
attributes
=
window
.
getAttributes
();
int
flagTranslucentStatus
=
WindowManager
.
LayoutParams
.
FLAG_TRANSLUCENT_STATUS
;
attributes
.
flags
|=
flagTranslucentStatus
;
window
.
setAttributes
(
attributes
);
}
}
}
}
}
Launcher3/src/com/android/launcher3/settings/ChangePwdActivity.java
View file @
1990a495
...
@@ -134,8 +134,8 @@ public class ChangePwdActivity extends AppCompatActivity implements View.OnClick
...
@@ -134,8 +134,8 @@ public class ChangePwdActivity extends AppCompatActivity implements View.OnClick
}
}
if
(!
TextUtils
.
equals
(
originalPwd
,
Prefs
.
getLoginPwd
(
this
)))
{
if
(!
TextUtils
.
equals
(
originalPwd
,
Prefs
.
getLoginPwd
(
this
)))
{
ErrorTimeHelper
.
getInstance
(
this
).
canInputPwd
();
ToastUtil
.
showShort
(
this
,
"密码错误,请重新输入密码"
);
ToastUtil
.
showShort
(
this
,
"密码错误,请重新输入密码"
);
ErrorTimeHelper
.
getInstance
(
this
).
addErrorCount
();
return
;
return
;
}
}
}
}
...
...
Launcher3/src/com/android/launcher3/settings/ErrorTimeHelper.java
View file @
1990a495
...
@@ -41,6 +41,13 @@ public class ErrorTimeHelper {
...
@@ -41,6 +41,13 @@ public class ErrorTimeHelper {
Prefs
.
setLockCount
(
mContext
,
count
);
Prefs
.
setLockCount
(
mContext
,
count
);
}
}
public
void
addErrorCount
()
{
this
.
mCount
=
getCount
()
+
1
;
if
(
mCount
==
5
)
{
setLockTime
(
System
.
currentTimeMillis
());
}
Prefs
.
setLockCount
(
mContext
,
mCount
);
}
public
int
getCount
()
{
public
int
getCount
()
{
return
Prefs
.
getLockCount
(
mContext
);
return
Prefs
.
getLockCount
(
mContext
);
...
@@ -75,13 +82,10 @@ public class ErrorTimeHelper {
...
@@ -75,13 +82,10 @@ public class ErrorTimeHelper {
* @return
* @return
*/
*/
public
boolean
canInputPwd
()
{
public
boolean
canInputPwd
()
{
if
(
getCount
()
<
5
)
{
setCount
(
getCount
()+
1
);
}
long
lockTime
=
getLockTime
();
long
lockTime
=
getLockTime
();
long
nowTime
=
System
.
currentTimeMillis
();
long
nowTime
=
System
.
currentTimeMillis
();
if
(
nowTime
-
lockTime
>
mMaxTime
)
{
if
(
nowTime
-
lockTime
>
mMaxTime
)
{
if
(
getCount
()
=
=
5
)
{
if
(
getCount
()
>
=
5
)
{
setCount
(
0
);
setCount
(
0
);
}
}
return
true
;
return
true
;
...
...
gradle.properties
View file @
1990a495
...
@@ -26,8 +26,8 @@ MAVEN_URL=http://192.168.0.170:13000/nexus/content/repositories/releases/
...
@@ -26,8 +26,8 @@ MAVEN_URL=http://192.168.0.170:13000/nexus/content/repositories/releases/
MAVEN_URL_SNAPSHOT
=
http://192.168.0.170:13000/nexus/content/repositories/releases/
MAVEN_URL_SNAPSHOT
=
http://192.168.0.170:13000/nexus/content/repositories/releases/
#32位有符号数2147483647(10)
#32位有符号数2147483647(10)
versionIntCode
=
202003170
2
versionIntCode
=
202003170
5
versionNameMajor
=
1
versionNameMajor
=
1
versionNameMinor
=
0
versionNameMinor
=
0
versionNamePatch
=
1
versionNamePatch
=
0
\ No newline at end of file
\ No newline at end of file
lib_common/build.gradle
View file @
1990a495
...
@@ -120,7 +120,7 @@ dependencies {
...
@@ -120,7 +120,7 @@ dependencies {
// Room
// Room
implementation
'com.tk.lib:room:1.0.2'
implementation
'com.tk.lib:room:1.0.2'
// Downloader
// Downloader
implementation
'com.tk.lib:downloader:1.0.
6
'
implementation
'com.tk.lib:downloader:1.0.
8
'
implementation
'com.tk.lib:dialog:1.0.2'
implementation
'com.tk.lib:dialog:1.0.2'
implementation
'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1'
implementation
'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1'
implementation
'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1'
implementation
'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1'
...
...
lib_common/src/main/java/com/secspace/lib/common/update/CheckUpdateCore.java
View file @
1990a495
...
@@ -112,16 +112,16 @@ public class CheckUpdateCore {
...
@@ -112,16 +112,16 @@ public class CheckUpdateCore {
.
server
(
BuildConfig
.
UPDATE_SERVER
)
.
server
(
BuildConfig
.
UPDATE_SERVER
)
.
name
(
BuildConfig
.
UPDATE_FLAG
)
.
name
(
BuildConfig
.
UPDATE_FLAG
)
.
companyId
(
BuildConfig
.
COMPANY_ID
)
.
companyId
(
BuildConfig
.
COMPANY_ID
)
.
showDownloadDialog
(
fals
e
)
.
showDownloadDialog
(
tru
e
)
.
showDownloadNotification
(
fals
e
)
.
showDownloadNotification
(
tru
e
)
.
appInstallPolicy
(
AppInstallPolicy
.
SILENT_INSTALL
)
.
appInstallPolicy
(
AppInstallPolicy
.
SILENT_INSTALL
)
.
build
();
.
build
();
}
else
{
}
else
{
option
=
new
SinglePlatformUpdateOption
.
Builder
()
option
=
new
SinglePlatformUpdateOption
.
Builder
()
.
imei
(
imei
)
.
imei
(
imei
)
.
server
(
BuildConfig
.
UPDATE_SERVER
)
.
server
(
BuildConfig
.
UPDATE_SERVER
)
.
showDownloadDialog
(
fals
e
)
.
showDownloadDialog
(
tru
e
)
.
showDownloadNotification
(
fals
e
)
.
showDownloadNotification
(
tru
e
)
.
appInstallPolicy
(
AppInstallPolicy
.
SILENT_INSTALL
)
.
appInstallPolicy
(
AppInstallPolicy
.
SILENT_INSTALL
)
.
build
();
.
build
();
}
}
...
...
lib_common/src/main/res/values/strings.xml
View file @
1990a495
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<string
name=
"common_need_install_middleware"
>
为保证正常使用,需先安装Device Services
</string>
<string
name=
"common_need_install_middleware"
>
为保证正常使用,需先安装Device Services
</string>
<string
name=
"common_need_update_middleware"
>
为保证正常使用,需先更新Device Services
</string>
<string
name=
"common_need_update_middleware"
>
为保证正常使用,需先更新Device Services
</string>
<string
name=
"work_check_device_owner"
>
为保证安全环境,请进入系统设置-用户和账户中删除所有用户和账户!
</string>
<string
name=
"work_check_device_owner"
>
为保证安全环境,请进入系统设置-用户和账户中删除所有用户和账户!
</string>
<string
name=
"work_confirm_device_owner"
>
请先初始化安全环境
</string>
<string
name=
"work_confirm_device_owner"
>
为保证环境稳定,将进行必要配置,配置将会清理双开应用、多用户、隐私空间,请注意备份。
</string>
<string
name=
"work_remove_user_confirm_device_owner"
>
继续将移除其他多用户,是否继续
</string>
<string
name=
"work_remove_user_confirm_device_owner"
>
继续将移除其他多用户,是否继续
</string>
<string
name=
"work_get_pref_apn_failed"
>
已加载安全配置,请先重启
</string>
<string
name=
"work_get_pref_apn_failed"
>
已加载安全配置,请先重启
</string>
<string
name=
"work_del_account"
>
正在进行必要配置,请稍后...
</string>
<string
name=
"work_del_account"
>
正在进行必要配置,请稍后...
</string>
...
...
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