Compare commits
8 Commits
v4.0.2-182
...
v4.0.2-183
| Author | SHA1 | Date | |
|---|---|---|---|
| bef6cbb212 | |||
| 032a89e0cd | |||
| c9afb6df02 | |||
| b8092447ff | |||
| bff20bea49 | |||
| 87f2d9c85f | |||
| 154dfc8538 | |||
| fddcdfb3aa |
@ -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);
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -7,7 +7,7 @@ ext {
|
||||
targetSdkVersion = 26
|
||||
|
||||
// application info
|
||||
versionCode = 182
|
||||
versionCode = 183
|
||||
versionName = "4.0.2"
|
||||
applicationId = "com.gh.gamecenter"
|
||||
|
||||
|
||||
@ -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=032a89e
|
||||
TINKER_BASE_APK_DIR=app-0715-16-52-39_032a89e
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
|
||||
Submodule libraries/LGLibrary updated: 9ba459a6c5...909dddc4d1
Reference in New Issue
Block a user