Compare commits
14 Commits
v4.0.2-182
...
v4.0.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 895d4d5cf1 | |||
| 801f0b95e7 | |||
| 11979240ab | |||
| bef6cbb212 | |||
| 032a89e0cd | |||
| c9afb6df02 | |||
| b8092447ff | |||
| bff20bea49 | |||
| 87f2d9c85f | |||
| 154dfc8538 | |||
| fddcdfb3aa | |||
| e1fc23a1bb | |||
| 2d551a3f73 | |||
| 9b205366f7 |
@ -4,9 +4,7 @@ import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.text.TextUtils
|
||||
import com.gh.common.util.CheckLoginUtils
|
||||
import com.gh.common.util.DialogUtils
|
||||
import com.gh.common.util.DirectUtils
|
||||
import com.gh.common.util.*
|
||||
import com.gh.common.util.DirectUtils.directToGameDetailVideoStreaming
|
||||
import com.gh.common.util.DirectUtils.directToGameVideo
|
||||
import com.gh.common.util.DirectUtils.directToVideoDetail
|
||||
@ -223,6 +221,23 @@ object DefaultUrlHandler {
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
if (url.startsWith("alipays:") || url.startsWith("alipay")) {
|
||||
try {
|
||||
context.startActivity(Intent("android.intent.action.VIEW", Uri.parse(url)))
|
||||
} catch (e: java.lang.Exception) {
|
||||
ToastUtils.showToast("请安装支付宝客户端")
|
||||
}
|
||||
return true
|
||||
} else if (url.startsWith("weixin")) {
|
||||
try {
|
||||
context.startActivity(Intent("android.intent.action.VIEW", Uri.parse(url)))
|
||||
} catch (e: java.lang.Exception) {
|
||||
ToastUtils.showToast("请安装微信客户端")
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
if ("http" != uri.scheme && "https" != uri.scheme) return true
|
||||
return false
|
||||
}
|
||||
|
||||
@ -190,8 +190,8 @@ class AdBannerView : LinearLayout {
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
val ad = mDatas[position % mDatas.size]
|
||||
val view = holder.itemView as ImageView
|
||||
Picasso.with(context).load(ad.image).into(view)
|
||||
val view = holder.itemView as SimpleDraweeView
|
||||
ImageUtils.display(view,ad.image)
|
||||
holder.itemView.setOnClickListener {
|
||||
onItemClick?.invoke(position % mDatas.size)
|
||||
}
|
||||
|
||||
@ -75,6 +75,12 @@ public class DWebView extends WebView {
|
||||
}
|
||||
}
|
||||
|
||||
@Keep
|
||||
@JavascriptInterface
|
||||
public String call(String methodName) {
|
||||
return call(methodName, "");
|
||||
}
|
||||
|
||||
@Keep
|
||||
@JavascriptInterface
|
||||
public String call(String methodName, String argStr) {
|
||||
@ -93,7 +99,7 @@ public class DWebView extends WebView {
|
||||
PrintDebugInfo(error);
|
||||
return ret.toString();
|
||||
}
|
||||
Object arg=null;
|
||||
Object arg = null;
|
||||
Method method = null;
|
||||
String callback = null;
|
||||
|
||||
@ -102,7 +108,7 @@ public class DWebView extends WebView {
|
||||
if (args.has("_dscbstub")) {
|
||||
callback = args.getString("_dscbstub");
|
||||
}
|
||||
if(args.has("data")) {
|
||||
if (args.has("data")) {
|
||||
arg = args.get("data");
|
||||
}
|
||||
} catch (JSONException e) {
|
||||
@ -123,7 +129,10 @@ public class DWebView extends WebView {
|
||||
try {
|
||||
method = cls.getMethod(methodName, new Class[]{Object.class});
|
||||
} catch (Exception ex) {
|
||||
|
||||
try {
|
||||
method = cls.getMethod(methodName, new Class[]{});
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -187,7 +196,12 @@ public class DWebView extends WebView {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
retData = method.invoke(jsb, arg);
|
||||
Class<?>[] methodParameterTypes = method.getParameterTypes();
|
||||
if (methodParameterTypes.length == 0) {
|
||||
retData = method.invoke(jsb);
|
||||
} else {
|
||||
retData = method.invoke(jsb, arg);
|
||||
}
|
||||
ret.put("code", 0);
|
||||
ret.put("data", retData);
|
||||
return ret.toString();
|
||||
@ -307,7 +321,10 @@ public class DWebView extends WebView {
|
||||
try {
|
||||
method = cls.getMethod(nameStr[1], new Class[]{Object.class});
|
||||
} catch (Exception ex) {
|
||||
|
||||
try {
|
||||
method = cls.getMethod(nameStr[1], new Class[]{});
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (method != null) {
|
||||
@ -336,7 +353,7 @@ public class DWebView extends WebView {
|
||||
|| javascriptCloseWindowListener.onClose()) {
|
||||
Context context = getContext();
|
||||
if (context instanceof Activity) {
|
||||
((Activity)context).onBackPressed();
|
||||
((Activity) context).onBackPressed();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -359,7 +376,7 @@ public class DWebView extends WebView {
|
||||
|
||||
@Keep
|
||||
@JavascriptInterface
|
||||
public void returnValue(final Object obj){
|
||||
public void returnValue(final Object obj) {
|
||||
runOnMainThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@ -422,9 +439,9 @@ public class DWebView extends WebView {
|
||||
runOnMainThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (url != null && url.startsWith("javascript:")){
|
||||
if (url != null && url.startsWith("javascript:")) {
|
||||
DWebView.super.loadUrl(url);
|
||||
}else{
|
||||
} else {
|
||||
callInfoList = new ArrayList<>();
|
||||
DWebView.super.loadUrl(url);
|
||||
}
|
||||
@ -444,9 +461,9 @@ public class DWebView extends WebView {
|
||||
runOnMainThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (url != null && url.startsWith("javascript:")){
|
||||
if (url != null && url.startsWith("javascript:")) {
|
||||
DWebView.super.loadUrl(url, additionalHttpHeaders);
|
||||
}else{
|
||||
} else {
|
||||
callInfoList = new ArrayList<>();
|
||||
DWebView.super.loadUrl(url, additionalHttpHeaders);
|
||||
}
|
||||
@ -996,7 +1013,4 @@ public class DWebView extends WebView {
|
||||
mainHandler.post(runnable);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -15,6 +15,12 @@ import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.g00fy2.versioncompare.Version;
|
||||
import com.gh.base.BaseActivity;
|
||||
import com.gh.common.AppExecutor;
|
||||
@ -33,6 +39,7 @@ import com.gh.common.util.PackageUtils;
|
||||
import com.gh.common.util.PlatformUtils;
|
||||
import com.gh.common.util.SPUtils;
|
||||
import com.gh.common.util.TagUtils;
|
||||
import com.gh.common.util.TeaHelper;
|
||||
import com.gh.common.util.UsageStatsHelper;
|
||||
import com.gh.download.DownloadManager;
|
||||
import com.gh.gamecenter.entity.AuthDialogEntity;
|
||||
@ -56,11 +63,6 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import pub.devrel.easypermissions.AfterPermissionGranted;
|
||||
@ -276,6 +278,9 @@ public class SplashScreenActivity extends BaseActivity {
|
||||
private void launchMainActivity() {
|
||||
getUniqueId();
|
||||
|
||||
// 在可能获取了相关权限后才初始化今日头条SDK
|
||||
TeaHelper.init(getApplication(), HaloApp.getInstance().getChannel());
|
||||
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);
|
||||
if (bundle != null) intent.putExtras(bundle);
|
||||
|
||||
@ -44,10 +44,10 @@ class HomeVideoFragment : BaseLazyFragment() {
|
||||
//预加载广告图片
|
||||
val videoAdvertisement = Config.getSettings()?.videoAdvertisement
|
||||
videoAdvertisement?.left?.let { ads ->
|
||||
ads.forEach { Picasso.with(requireContext()).load(it.image).fetch() }
|
||||
ads.forEach { ImageUtils.prefetchToDiskCache(it.image) }
|
||||
}
|
||||
videoAdvertisement?.right?.let { ads ->
|
||||
ads.forEach { Picasso.with(requireContext()).load(it.image).fetch() }
|
||||
ads.forEach { ImageUtils.prefetchToDiskCache(it.image) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,6 @@ import com.gh.common.util.DownloadObserver;
|
||||
import com.gh.common.util.GdtHelper;
|
||||
import com.gh.common.util.HomeBottomBarHelper;
|
||||
import com.gh.common.util.PackageHelper;
|
||||
import com.gh.common.util.TeaHelper;
|
||||
import com.gh.common.util.TimestampUtils;
|
||||
import com.gh.common.videolog.VideoRecordUtils;
|
||||
import com.gh.gamecenter.BuildConfig;
|
||||
@ -138,7 +137,6 @@ public class HaloApp extends TinkerAppLike {
|
||||
|
||||
PushManager.init(mChannel);
|
||||
|
||||
TeaHelper.init(getApplication(), mChannel);
|
||||
DataUtils.init(getApplication(), mChannel);
|
||||
GidHelper.getInstance().init(getApplication());
|
||||
// TTAdSdk.init(getApplication(), new TTAdConfig.Builder().appId(Config.TTAD_APPID)
|
||||
|
||||
@ -121,7 +121,8 @@
|
||||
android:paddingRight="8dp"
|
||||
android:text="@{game.commentCount > 3?game.star + ``: `评分过少`}"
|
||||
android:textColor="@{Color.parseColor(game.commentCount > 3?`#1383EB`:`#2496FF`)}"
|
||||
android:textStyle="bold" />
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/game_des"
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.facebook.drawee.view.SimpleDraweeView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/icon_ad"
|
||||
app:roundedCornerRadius="5dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitXY"/>
|
||||
app:placeholderImageScaleType="fitXY"/>
|
||||
@ -7,8 +7,8 @@ ext {
|
||||
targetSdkVersion = 26
|
||||
|
||||
// application info
|
||||
versionCode = 182
|
||||
versionName = "4.0.2"
|
||||
versionCode = 184
|
||||
versionName = "4.0.3"
|
||||
applicationId = "com.gh.gamecenter"
|
||||
|
||||
// AndroidX
|
||||
|
||||
@ -51,8 +51,8 @@ SENSITIVE_API_HOST=https\://and-core-api.ghzs.com/v4d0d2/
|
||||
|
||||
# 请不要手动改动下面的值,除非你明确需要以某个apk作为基准包,需要打包请以scripts/tinker*.sh为准
|
||||
TINKER_ENABLE=
|
||||
TINKER_ID=58b1cd4
|
||||
TINKER_BASE_APK_DIR=app-0713-16-50-31_58b1cd4
|
||||
TINKER_ID=801f0b9
|
||||
TINKER_BASE_APK_DIR=app-0721-17-12-02_801f0b9
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
|
||||
Submodule libraries/LGLibrary updated: 9ba459a6c5...909dddc4d1
Reference in New Issue
Block a user