Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
Project
Project
Details
Activity
Releases
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
android
android_goodmoney
Commits
be57a7e4
Commit
be57a7e4
authored
Dec 15, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
d22b8123
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
41 deletions
+47
-41
.gitignore
GoodMoney/app/.gitignore
+3
-0
OkHttpInterceptor.java
.../main/java/com/mints/goodmoney/net/OkHttpInterceptor.java
+9
-9
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+2
-0
BaseActivity.java
...a/com/mints/goodmoney/ui/activitys/base/BaseActivity.java
+0
-32
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+3
-0
Utils.java
...ey/app/src/main/java/com/mints/goodmoney/utils/Utils.java
+30
-0
No files found.
GoodMoney/app/.gitignore
View file @
be57a7e4
/build
mapping.txt
seeds.txt
unused.txt
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/net/OkHttpInterceptor.java
View file @
be57a7e4
...
...
@@ -45,15 +45,15 @@ public class OkHttpInterceptor implements Interceptor {
long
time
=
System
.
currentTimeMillis
();
String
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
);
//
try {
// // 穿山甲分包渠道 暂不开启
//
String ttChannel = HumeSDK.getChannel(MintsApplication.getContext());
//
if (!TextUtils.isEmpty(ttChannel)) {
// channel =
ttChannel;
//
}
//
} catch (Exception e) {
//
e.printStackTrace();
//
}
try
{
// 穿山甲分包渠道
String
ttChannel
=
HumeSDK
.
getChannel
(
MintsApplication
.
getContext
());
if
(!
TextUtils
.
isEmpty
(
ttChannel
))
{
channel
=
channel
+
"_"
+
ttChannel
;
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
Request
request
=
chain
.
request
();
request
=
encrypt
(
request
,
tokenID
,
time
,
channel
);
//加密方法
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
be57a7e4
...
...
@@ -17,11 +17,13 @@ import com.mints.goodmoney.mvp.views.AwardView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.widgets.countdowntimer.CountDownTimerSupport
import
com.mints.goodmoney.ui.widgets.countdowntimer.OnCountDownTimerListener
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.SoundPoolUtil
import
com.mints.goodmoney.utils.SpanUtils
import
com.mints.goodmoney.utils.Utils
import
com.mints.goodmoney.utils.rxutil.CommonRxTask
import
com.mints.goodmoney.utils.rxutil.RxjavaUtil
import
com.mints.library.utils.json.JsonUtil
import
com.umeng.analytics.MobclickAgent
import
kotlinx.android.synthetic.main.activity_award.*
import
java.math.BigDecimal
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/base/BaseActivity.java
View file @
be57a7e4
...
...
@@ -71,38 +71,6 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
return
this
;
}
// @Override
// public boolean dispatchTouchEvent(MotionEvent ev) {
// if (ev.getAction() == MotionEvent.ACTION_UP) {
// View v = getCurrentFocus();
//
// //如果不是落在EditText区域,则需要关闭输入法
// if (HideKeyboard(v, ev)) {
// InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
// imm.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
//// FixUtils.fixInputMethodManagerLeak(this);
// }
// }
// return super.dispatchTouchEvent(ev);
//
// }
//
// // 根据EditText所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
// private boolean HideKeyboard(View view, MotionEvent event) {
// if (view instanceof EditText) {
//
// int[] location = {0, 0};
// view.getLocationInWindow(location);
//
// //获取现在拥有焦点的控件view的位置,即EditText
// int left = location[0], top = location[1], bottom = top + view.getHeight(), right = left + view.getWidth();
// //判断我们手指点击的区域是否落在EditText上面,如果不是,则返回true,否则返回false
// boolean isInEt = (event.getX() > left && event.getX() < right && event.getY() > top && event.getY() < bottom);
// return !isInEt;
// }
// return false;
// }
@Override
protected
void
onDestroy
()
{
unRegisterExitApp
();
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
be57a7e4
...
...
@@ -33,6 +33,7 @@ import com.mints.goodmoney.ui.widgets.ShareDialog
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.QQJumpUtil
import
com.mints.goodmoney.utils.SpanUtils
import
com.mints.goodmoney.utils.Utils
import
com.mints.library.net.netstatus.NetUtils
import
com.mints.library.utils.CommonUtils
import
com.mints.library.utils.GlideUtils
...
...
@@ -115,6 +116,8 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
super
.
onResume
()
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_MY
)
{
showToast
(
Utils
.
isStartAccessibilityService
().
toString
())
if
(!
TextUtils
.
isEmpty
(
userManager
.
userID
))
{
myPresenter
.
getAutoUserHallBaseMsg
()
}
else
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/Utils.java
View file @
be57a7e4
...
...
@@ -16,17 +16,27 @@
package
com
.
mints
.
goodmoney
.
utils
;
import
android.accessibilityservice.AccessibilityServiceInfo
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.os.Build
;
import
android.os.Environment
;
import
androidx.core.content.ContextCompat
;
import
android.provider.Settings
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
android.view.accessibility.AccessibilityManager
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.common.Constant
;
import
java.io.File
;
import
java.util.List
;
import
java.util.Locale
;
public
final
class
Utils
{
...
...
@@ -98,4 +108,24 @@ public final class Utils {
//去掉电池状态栏
activity
.
getWindow
().
setLayout
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
MATCH_PARENT
);
}
/**
* 判断AccessibilityService服务是否已经启动
*
* @return
*/
public
static
boolean
isStartAccessibilityService
()
{
Context
context
=
MintsApplication
.
getContext
();
AccessibilityManager
am
=
(
AccessibilityManager
)
context
.
getSystemService
(
Context
.
ACCESSIBILITY_SERVICE
);
List
<
AccessibilityServiceInfo
>
serviceInfos
=
am
.
getEnabledAccessibilityServiceList
(
AccessibilityServiceInfo
.
FEEDBACK_GENERIC
);
for
(
AccessibilityServiceInfo
info
:
serviceInfos
)
{
String
id
=
info
.
getId
();
LogUtil
.
d
(
"all -->"
+
id
);
if
(
id
.
contains
(
Constant
.
MINTS_PKG_NAME
))
{
return
true
;
}
}
return
false
;
}
}
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