Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
qidian55 committed Jun 10, 2024
1 parent e73f7ae commit 1cdd44b
Show file tree
Hide file tree
Showing 100 changed files with 13,647 additions and 8,061 deletions.
Binary file modified mybv.apk
Binary file not shown.
2 changes: 1 addition & 1 deletion mybv/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.READ_LOGS"/>
<application android:allowBackup="true" android:fullBackupContent="@xml/backup_content" android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:largeHeap="true" android:name="com.bilibili.tv.MainApplication" android:networkSecurityConfig="@xml/network_security_config" android:supportsRtl="true" android:theme="@style/AppTheme">
<application android:allowBackup="true" android:fullBackupContent="@xml/backup_content" android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:banner="@mipmap/ic_banner" android:label="@string/app_name" android:largeHeap="true" android:name="com.bilibili.tv.MainApplication" android:networkSecurityConfig="@xml/network_security_config" android:supportsRtl="true" android:theme="@style/AppTheme">
<meta-data android:name="FAWKES_APP_KEY" android:value="android"/>
<meta-data android:name="BUILD_SN" android:value="0"/>
<activity android:label="@string/app_name" android:name="com.bilibili.tv.ui.splash.SplashActivity" android:screenOrientation="landscape">
Expand Down
52 changes: 52 additions & 0 deletions mybv/java/classes/bl/abg.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package bl;

import android.text.TextUtils;
import com.bilibili.tv.player.basic.context.PlayerParams;
import com.bilibili.tv.player.basic.context.ResolveResourceParams;

/* compiled from: BL */
/* loaded from: classes.dex */
public class abg {
public static String a() {
jx b = js.b("buffering_water_test");
return (!b.b() || b.a() == null || TextUtils.isEmpty(b.a().b())) ? "0" : b.a().c();
}

public static int a(yh yhVar) {
if (yhVar.a == null) {
return 0;
}
if (yhVar.b) {
return 3;
}
return yhVar.a.isLive() ? 2 : 1;
}

public static String b(yh yhVar) {
int intValue = ((Integer) aah.a(yhVar.a).a("bundle_key_player_params_jump_from", -1)).intValue();
if (yhVar.a.isBangumi()) {
return "p" + String.valueOf(intValue);
}
return "u" + String.valueOf(intValue);
}

public static int c(yh yhVar) {
ResolveResourceParams obtainResolveParams = yhVar.a.mVideoParams.obtainResolveParams();
int i = ((Boolean) aah.a(yhVar.a).a("is_auto_play", false)).booleanValue() ? 1 : 0;
if (((Boolean) aah.a(yhVar.a).a("is_auto_landscape", false)).booleanValue()) {
i |= 2;
}
if (((Boolean) obtainResolveParams.mExtraParams.a("is_flash_media_resource", false)).booleanValue()) {
i |= 4;
}
return ((Boolean) obtainResolveParams.mExtraParams.a("is_player_preload", false)).booleanValue() ? i | 16 : i;
}

public static long a(PlayerParams playerParams) {
return playerParams.mVideoParams.obtainResolveParams().mCid;
}

public static String b() {
return abc.b().i();
}
}
29 changes: 21 additions & 8 deletions mybv/java/classes/bl/afm2.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,29 @@ public JSONObject call() {
String isp = data.optString("isp");
StringBuilder sb = new StringBuilder();
ConnectivityManager connectivityManager = (ConnectivityManager) MainApplication.a().getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
if (networkInfo != null && networkInfo.isConnected()) {
Network network = connectivityManager.getActiveNetwork();
LinkProperties linkProperties = connectivityManager.getLinkProperties(network);
List<InetAddress> dnsServers = linkProperties.getDnsServers();
for (InetAddress dns : dnsServers) {
if(sb.length()>0)sb.append(", ");
sb.append(dns.getHostAddress());
if (connectivityManager != null) {
for (Network network : connectivityManager.getAllNetworks()) {
NetworkInfo networkInfo = connectivityManager.getNetworkInfo(network);
if (networkInfo.isConnected()) {
LinkProperties linkProperties = connectivityManager.getLinkProperties(network);
List<InetAddress> dnsServers = linkProperties.getDnsServers();
for (InetAddress dnsServer : dnsServers) {
if(sb.length()>0)sb.append(", ");
sb.append(dnsServer.getHostAddress());
}
}
}
}
//NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
//if (networkInfo != null && networkInfo.isConnected()) {
// Network activeNetwork = connectivityManager.getActiveNetwork();
// LinkProperties linkProperties = connectivityManager.getLinkProperties(activeNetwork);
// List<InetAddress> dnsServers = linkProperties.getDnsServers();
// for (InetAddress dnsServer : dnsServers) {
// if(sb.length()>0)sb.append(", ");
// sb.append(dnsServer.getHostAddress());
// }
//}
String text = "IP: " + addr;
text += "\n" + "归属地: " + zone;
text += "\n" + "运营商: " + isp;
Expand Down
55 changes: 55 additions & 0 deletions mybv/java/classes/bl/pi.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package bl;

import bl.pe;
import bl.pk;
import com.bilibili.lib.media.resolver.params.ResolveMediaResourceParams;
import com.bilibili.lib.media.resolver.params.ResolveResourceExtra;
import com.bilibili.lib.media.resource.MediaResource;

/* compiled from: BL */
/* loaded from: classes.dex */
public class pi implements pe.a<String, MediaResource> {
private pk a;
private pk.a b;

private pi(pk pkVar, pk.a aVar) {
this.a = pkVar;
this.b = aVar;
}

public static pi a(pk pkVar, pk.a aVar) {
return new pi(pkVar, aVar);
}

public pk c() {
return this.a;
}

public pk.a d() {
return this.b;
}

@Override // bl.pe.a
public boolean a() {
return !"movie".equalsIgnoreCase(this.b.b().b());
}

@Override // bl.pe.a
/* renamed from: e, reason: merged with bridge method [inline-methods] */
public String b() {
ResolveMediaResourceParams b = this.b.b();
ResolveResourceExtra d = this.b.d();
StringBuilder sb = new StringBuilder();
sb.append(b.c());
sb.append(b.b());
sb.append(b.e());
sb.append(b.d());
sb.append(d != null && d.f());
return sb.toString();
}

@Override // bl.pe.a
public boolean a(MediaResource mediaResource) {
return mediaResource.c();
}
}
140 changes: 140 additions & 0 deletions mybv/java/classes/bl/qx.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
package bl;

import android.os.SystemClock;
import com.bilibili.lib.media.resolver.exception.ResolveException;
import com.bilibili.lib.media.resolver.exception.ResolveMediaSourceException;
import com.bilibili.lib.media.resource.MediaResource;
import org.json.JSONException;
import org.json.JSONObject;

/* compiled from: BL */
/* loaded from: classes.dex */
public class qx {
private String a;
private String b;
private String c;
private long d;
private long e;

public qx(String str, String str2, long i) {
this.a = qs.a(str + (System.currentTimeMillis() / 1000));
this.b = str2;
this.c = String.valueOf(i);
}

public void a() {
try {
this.d = SystemClock.elapsedRealtime();
JSONObject jSONObject = new JSONObject();
jSONObject.put("f_session", this.a);
jSONObject.put("f_from", this.b);
jSONObject.put("f_cid", this.c);
jSONObject.put("f_time_of_session", 0);
jSONObject.put("f_event", -100);
qu.a("app_lua_tracker", jSONObject.toString());
} catch (JSONException e) {
att.a(e);
}
}

public void b() {
a(0);
}

public void a(int i) {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("f_session", this.a);
jSONObject.put("f_from", this.b);
jSONObject.put("f_cid", this.c);
jSONObject.put("f_time_of_session", 0);
jSONObject.put("f_event", -2);
if (i != 0) {
jSONObject.put("f_error", i);
}
qu.a("app_lua_tracker", jSONObject.toString());
} catch (JSONException e) {
att.a(e);
}
}

public void a(String str) {
try {
long elapsedRealtime = SystemClock.elapsedRealtime();
this.e = elapsedRealtime;
JSONObject jSONObject = new JSONObject();
jSONObject.put("f_session", this.a);
jSONObject.put("f_from", this.b);
jSONObject.put("f_cid", this.c);
jSONObject.put("f_time_of_session", elapsedRealtime - this.d);
jSONObject.put("f_event", -3);
jSONObject.put("f_url", str);
qu.a("app_lua_tracker", jSONObject.toString());
} catch (JSONException e) {
att.a(e);
}
}

public void a(int i, byte[] bArr) {
try {
long elapsedRealtime = SystemClock.elapsedRealtime();
JSONObject jSONObject = new JSONObject();
jSONObject.put("f_session", this.a);
jSONObject.put("f_from", this.b);
jSONObject.put("f_cid", this.c);
jSONObject.put("f_time_of_session", elapsedRealtime - this.d);
jSONObject.put("f_time_of_event", elapsedRealtime - this.e);
jSONObject.put("f_event", -4);
if (i != 200) {
jSONObject.put("f_error", i);
jSONObject.put("f_body", bArr);
}
qu.a("app_lua_tracker", jSONObject.toString());
} catch (JSONException e) {
att.a(e);
}
}

public void a(MediaResource mediaResource) {
try {
long elapsedRealtime = SystemClock.elapsedRealtime();
int a = mediaResource.a();
JSONObject jSONObject = new JSONObject();
jSONObject.put("f_session", this.a);
jSONObject.put("f_from", this.b);
jSONObject.put("f_cid", this.c);
jSONObject.put("f_time_of_session", elapsedRealtime - this.d);
jSONObject.put("f_event", -5);
jSONObject.put("f_videos_count", a);
if (a == 0) {
jSONObject.put("f_error", 0);
jSONObject.put("f_body", mediaResource.b().toString());
}
qu.a("app_lua_tracker", jSONObject.toString());
} catch (JSONException e) {
att.a(e);
}
}

public void b(String str) {
a((ResolveException) null, str);
}

public void a(ResolveException resolveException, String str) {
try {
long elapsedRealtime = SystemClock.elapsedRealtime();
JSONObject jSONObject = new JSONObject();
jSONObject.put("f_session", this.a);
jSONObject.put("f_from", this.b);
jSONObject.put("f_cid", this.c);
jSONObject.put("f_time_of_session", elapsedRealtime - this.d);
jSONObject.put("f_event", -5);
jSONObject.put("f_videos_count", 0);
jSONObject.put("f_error", resolveException instanceof ResolveMediaSourceException.ResolveInvalidCodeException ? ((ResolveMediaSourceException.ResolveInvalidCodeException) resolveException).a() : 0);
jSONObject.put("f_body", str);
qu.a("app_lua_tracker", jSONObject.toString());
} catch (JSONException e) {
att.a(e);
}
}
}
6 changes: 3 additions & 3 deletions mybv/java/classes/bl/xj.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public void a(Bundle bundle) {
if (b != null) {
ResolveResourceParams obtainResolveParams = b.mVideoParams.obtainResolveParams();
if (!TextUtils.isEmpty(obtainResolveParams.mSeasonId) && obtainResolveParams.mEpisodeId > 0) {
ztVar = new zt(zu.a(obtainResolveParams.mEpisodeId));
ztVar = new zt(zu.getEp(obtainResolveParams.mEpisodeId));
} else {
ztVar = new zt(zu.a(obtainResolveParams.mCid));
ztVar = new zt(zu.getCid(obtainResolveParams.mCid));
}
this.d = ztVar;
this.e = new zu(p());
Expand Down Expand Up @@ -97,7 +97,7 @@ private void a(ResolveResourceParams resolveResourceParams) {
if (resolveResourceParams == null) {
return;
}
int i = resolveResourceParams.mCid;
long i = resolveResourceParams.mCid;
int i2 = resolveResourceParams.mAvid;
int i3 = this.i;
if (i3 <= 0) {
Expand Down
Loading

0 comments on commit 1cdd44b

Please sign in to comment.