Skip to content

Commit fc77a00

Browse files
committed
Fix bug, update sdk.
1 parent e4b796b commit fc77a00

File tree

117 files changed

+2075
-805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+2075
-805
lines changed

Demo/app/build.gradle

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ android {
88
applicationId "com.tencent.liteav.demo"
99
minSdkVersion rootProject.ext.minSdkVersion
1010
targetSdkVersion rootProject.ext.targetSdkVersion
11-
versionCode 19
12-
versionName "8.9.1015"
11+
versionCode 20
12+
versionName "9.0.857"
1313

1414
multiDexEnabled true
1515
ndk {
1616
abiFilters "armeabi-v7a"
1717
}
1818
}
1919

20-
signingConfigs{
21-
release{
20+
signingConfigs {
21+
release {
2222
}
2323
}
2424

@@ -38,11 +38,17 @@ android {
3838
doNotStrip "*/arm64-v8a/libYTCommon.so"
3939
}
4040

41+
dexOptions {
42+
jumboMode true
43+
javaMaxHeapSize "4g"
44+
}
45+
4146
}
4247

4348
dependencies {
4449

4550
compile fileTree(dir: 'libs', include: ['*.jar'])
51+
compile project(':common')
4652
compile project(':superplayerdemo')
4753

4854
compile 'com.android.support:appcompat-v7:25.+'
@@ -53,7 +59,9 @@ dependencies {
5359
compile 'com.android.support.constraint:constraint-layout:1.1.3'
5460
compile "com.android.support:design:$rootProject.ext.supportSdkVersion"
5561
compile 'com.squareup.picasso:picasso:2.71828'
56-
compile 'com.blankj:utilcode:1.25.9'
62+
compile('com.blankj:utilcode:1.25.9', {
63+
exclude group: 'com.google.code.gson', module: 'gson'
64+
})
5765

5866
compile 'com.tencent.bugly:crashreport_upgrade:1.5.1'
5967
compile 'com.tencent.bugly:nativecrashreport:3.8.0'

Demo/app/src/main/AndroidManifest.xml

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
4-
package="com.tencent.liteav.demo"
5-
android:versionCode="1"
6-
android:versionName="1.0">
3+
xmlns:tools="http://schemas.android.com/tools" package="com.tencent.liteav.demo"
4+
android:versionCode="1" android:versionName="1.0">
75

8-
<application
9-
android:name=".DemoApplication"
10-
android:allowBackup="false"
11-
android:icon="@drawable/ic_launcher"
12-
android:label="@string/app_name"
13-
android:largeHeap="true"
14-
android:theme="@style/AppTheme"
6+
<application android:name=".DemoApplication" android:allowBackup="false"
7+
android:icon="@drawable/ic_launcher" android:label="@string/app_name"
8+
android:largeHeap="true" android:theme="@style/AppTheme"
159
tools:replace="android:allowBackup">
1610

1711
<activity android:name=".SplashActivity" android:launchMode="singleTop"
@@ -35,17 +29,13 @@
3529
<category android:name="android.intent.category.DEFAULT" />
3630
<category android:name="android.intent.category.BROWSABLE" />
3731

38-
<data
39-
android:host="com.tencent.liteav.demo"
40-
android:scheme="liteav"/>
32+
<data android:host="com.tencent.liteav.demo" android:scheme="liteav" />
4133
</intent-filter>
4234
</activity>
4335

44-
<activity
45-
android:name=".MainActivity"
36+
<activity android:name=".MainActivity"
4637
android:configChanges="keyboardHidden|orientation|screenSize"
47-
android:label="@string/app_name"
48-
android:launchMode="singleTop"
38+
android:label="@string/app_name" android:launchMode="singleTop"
4939
android:screenOrientation="portrait">
5040
<intent-filter>
5141
<action android:name="com.tencent.liteav.action.liteavapp" />
Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
<html>
2-
3-
<head>
4-
<meta http-equiv="Content-Type" content="text/xml; charset=utf-8"/>
5-
<title>用户协议</title>
6-
</head>
7-
8-
<body>
9-
<h2><p>用户协议</p></h2>
10-
<p>尊敬的用户,请您仔细阅读以下条款,如果您对本协议的条款存在异议,您可以选择不使用本应用。使用则表示您同意本协议下的全部条款。</p>
11-
<h2><p>遵守法律及法律效力</p></h2>
12-
<p>会员同意遵守《中华人民共和国保密法》、《计算机信息系统国际联网保密管理规定》、《中华人民共和国计算机信息系统安全保护条例》、《计算机信息网络国际联网安全保护管理办法》、《中华人民共和国计算机信息网络国际联网管理暂行规定》及其实施办法等相关法律法规的任何及所有的规定,并对会员以任何方式使用服务的任何行为及其结果承担全部责任。</p>
13-
<h2><p>用户说明</p></h2>
14-
<p>用户不得利用本服务制作、上载、复制、发布、传播如下法律、法规和政策禁止的内容:</p>
15-
<p>1. 反对宪法所确定的基本原则的;</p>
16-
<p>2. 危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的;</p>
17-
<p>3. 损害国家荣誉和利益的;</p>
18-
<p> 4. 煽动民族仇恨、民族歧视,破坏民族团结的;</p>
19-
<p>5. 破坏国家宗教政策,宣扬邪教和封建迷信的;</p>
20-
<p>6. 散布谣言,扰乱社会秩序,破坏社会稳定的;</p>
21-
<p>7. 散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的;</p>
22-
<p>8. 侮辱或者诽谤他人,侵害他人合法权益的;</p>
23-
<p>9.不遵守法律法规底线、社会主义制度底线、国家利益底线、公民合法权益底线、社会公共秩序底线、道德风尚底线和信息真实性底线的“七条底线”要求的;</p>
24-
<p>10.含有法律、行政法规禁止的其他内容的信息。
25-
</p>
26-
<p>如果用户出现以上情况一种几种,将承担关闭全部权限,禁止使用的后果。</p>
27-
28-
</body>
29-
2+
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/xml; charset=utf-8"/>
5+
<title>用户协议</title>
6+
</head>
7+
8+
<body>
9+
<h2><p>用户协议</p></h2>
10+
<p>尊敬的用户,请您仔细阅读以下条款,如果您对本协议的条款存在异议,您可以选择不使用本应用。使用则表示您同意本协议下的全部条款。</p>
11+
<h2><p>遵守法律及法律效力</p></h2>
12+
<p>
13+
会员同意遵守《中华人民共和国保密法》、《计算机信息系统国际联网保密管理规定》、《中华人民共和国计算机信息系统安全保护条例》、《计算机信息网络国际联网安全保护管理办法》、《中华人民共和国计算机信息网络国际联网管理暂行规定》及其实施办法等相关法律法规的任何及所有的规定,并对会员以任何方式使用服务的任何行为及其结果承担全部责任。</p>
14+
<h2><p>用户说明</p></h2>
15+
<p>用户不得利用本服务制作、上载、复制、发布、传播如下法律、法规和政策禁止的内容:</p>
16+
<p>1. 反对宪法所确定的基本原则的;</p>
17+
<p>2. 危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的;</p>
18+
<p>3. 损害国家荣誉和利益的;</p>
19+
<p> 4. 煽动民族仇恨、民族歧视,破坏民族团结的;</p>
20+
<p>5. 破坏国家宗教政策,宣扬邪教和封建迷信的;</p>
21+
<p>6. 散布谣言,扰乱社会秩序,破坏社会稳定的;</p>
22+
<p>7. 散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的;</p>
23+
<p>8. 侮辱或者诽谤他人,侵害他人合法权益的;</p>
24+
<p>9.不遵守法律法规底线、社会主义制度底线、国家利益底线、公民合法权益底线、社会公共秩序底线、道德风尚底线和信息真实性底线的“七条底线”要求的;</p>
25+
<p>10.含有法律、行政法规禁止的其他内容的信息。
26+
</p>
27+
<p>如果用户出现以上情况一种几种,将承担关闭全部权限,禁止使用的后果。</p>
28+
29+
</body>
30+
3031
</html>
Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,45 @@
11
<html>
2-
3-
<head>
4-
<meta http-equiv="Content-Type" content="text/xml; charset=utf-8"/>
5-
<title>Terms and Conditions</title>
6-
</head>
7-
8-
<body>
9-
<h2><p> Terms and Conditions</p></h2>
10-
<p> Please read carefully the content below. If you have any objections, you can choose not to use this app. By using this app, you agree to all terms in this agreement.</p>
11-
<h2><p> Law Compliance</p></h2>
12-
<p> You agree to abide by the Law of the People's Republic of China on Guarding State Secrets, Regulations on Confidentiality Protection for the International Networking of Computer Information Networks, Regulations of the People's Republic of China on Protecting the Safety of Computer Information Systems, Measures for Security Protection Administration of the International Networking of Computer Information Networks, Provisional Regulations of the People's Republic of China on the Management of the International Networking of Computer Information Networks, as well as their implementation rules. You assume all responsibility with respect to your use of the app and the consequences.</p>
13-
<h2><p> Terms of Use</p></h2>
14-
<p> You must not use this app to create, upload, copy, publish or spread any content that is forbidden by laws, regulations or government policies, including:</p>
15-
<p>1. Content that violates the Constitution of the People's Republic of China;</p>
16-
<p>2. Content that endangers national security, leaks state secrets, subverts state power, or undermines national unity;</p>
17-
<p>3. Content that harms national reputation or interests;</p>
18-
<p>4. Content that incites ethnic enmity, propagates racial discrimination, or undermines ethnic unity;</p>
19-
<p>5. Content that violates China’s policies on religion, or promotes cults or superstitions; </p>
20-
<p>6. Content that spreads rumors, disturbs social order, or undermines social stability; </p>
21-
<p>7. Obscene, pornographic, violent, gambling/murder/terrorism-related, or crime-abetting content;</p>
22-
<p>8. Insulting or defaming content or content that infringes others’ legal rights; </p>
23-
<p>9. Content that crosses any of the “Seven Baselines” of laws and regulations, the socialist system, national interests, citizens’ legal rights and interests, public order, morality, and information accuracy.</p>
24-
<p>10. Other content forbidden by laws and regulations.
25-
</p>
26-
<p> You take responsibility for the consequences of having your permissions and access to the app revoked as a result of violating any of the above terms.</p>
272

28-
</body>
29-
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/xml; charset=utf-8"/>
5+
<title>Terms and Conditions</title>
6+
</head>
7+
8+
<body>
9+
<h2><p> Terms and Conditions</p></h2>
10+
<p> Please read carefully the content below. If you have any objections, you can choose not to use
11+
this app. By using this app, you agree to all terms in this agreement.</p>
12+
<h2><p> Law Compliance</p></h2>
13+
<p> You agree to abide by the Law of the People's Republic of China on Guarding State Secrets,
14+
Regulations on Confidentiality Protection for the International Networking of Computer
15+
Information Networks, Regulations of the People's Republic of China on Protecting the Safety of
16+
Computer Information Systems, Measures for Security Protection Administration of the
17+
International Networking of Computer Information Networks, Provisional Regulations of the
18+
People's Republic of China on the Management of the International Networking of Computer
19+
Information Networks, as well as their implementation rules. You assume all responsibility with
20+
respect to your use of the app and the consequences.</p>
21+
<h2><p> Terms of Use</p></h2>
22+
<p> You must not use this app to create, upload, copy, publish or spread any content that is
23+
forbidden by laws, regulations or government policies, including:</p>
24+
<p>1. Content that violates the Constitution of the People's Republic of China;</p>
25+
<p>2. Content that endangers national security, leaks state secrets, subverts state power, or
26+
undermines national unity;</p>
27+
<p>3. Content that harms national reputation or interests;</p>
28+
<p>4. Content that incites ethnic enmity, propagates racial discrimination, or undermines ethnic
29+
unity;</p>
30+
<p>5. Content that violates China’s policies on religion, or promotes cults or superstitions; </p>
31+
<p>6. Content that spreads rumors, disturbs social order, or undermines social stability; </p>
32+
<p>7. Obscene, pornographic, violent, gambling/murder/terrorism-related, or crime-abetting
33+
content;</p>
34+
<p>8. Insulting or defaming content or content that infringes others’ legal rights; </p>
35+
<p>9. Content that crosses any of the “Seven Baselines” of laws and regulations, the socialist
36+
system, national interests, citizens’ legal rights and interests, public order, morality, and
37+
information accuracy.</p>
38+
<p>10. Other content forbidden by laws and regulations.
39+
</p>
40+
<p> You take responsibility for the consequences of having your permissions and access to the app
41+
revoked as a result of violating any of the above terms.</p>
42+
43+
</body>
44+
3045
</html>

Demo/app/src/main/java/com/tencent/liteav/demo/DemoApplication.java

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,10 @@
2222

2323

2424
public class DemoApplication extends MultiDexApplication {
25-
private static String TAG = "DemoApplication";
26-
27-
//配置bugly组件的appId
28-
private static final String BUGLY_APPID = "";
29-
// 配置bugly组件的APP渠道号
30-
private static final String BUGLY_APP_CHANNEL = "";
31-
//配置bugly组件的调试模式(true或者false)
32-
private static final boolean BUGLY_ENABLE_DEBUG = true;
25+
private static String TAG = "DemoApplication";
26+
private static final String BUGLY_APPID = ""; //配置bugly组件的appId
27+
private static final String BUGLY_APP_CHANNEL = ""; // 配置bugly组件的APP渠道号
28+
private static final boolean BUGLY_ENABLE_DEBUG = true; //配置bugly组件的调试模式(true或者false)
3329

3430
// private RefWatcher mRefWatcher;
3531
private static DemoApplication instance;
@@ -69,18 +65,18 @@ public static DemoApplication getApplication() {
6965

7066
private void closeAndroidPDialog() {
7167
try {
72-
Class aClass = Class.forName("android.content.pm.PackageParser$Package");
68+
Class aClass = Class.forName("android.content.pm.PackageParser$Package");
7369
Constructor declaredConstructor = aClass.getDeclaredConstructor(String.class);
7470
declaredConstructor.setAccessible(true);
7571
} catch (Exception e) {
7672
e.printStackTrace();
7773
}
7874
try {
79-
Class cls = Class.forName("android.app.ActivityThread");
75+
Class cls = Class.forName("android.app.ActivityThread");
8076
Method declaredMethod = cls.getDeclaredMethod("currentActivityThread");
8177
declaredMethod.setAccessible(true);
82-
Object activityThread = declaredMethod.invoke(null);
83-
Field mHiddenApiWarningShown = cls.getDeclaredField("mHiddenApiWarningShown");
78+
Object activityThread = declaredMethod.invoke(null);
79+
Field mHiddenApiWarningShown = cls.getDeclaredField("mHiddenApiWarningShown");
8480
mHiddenApiWarningShown.setAccessible(true);
8581
mHiddenApiWarningShown.setBoolean(activityThread, true);
8682
} catch (Exception e) {
@@ -101,40 +97,40 @@ public void onReceive(DownloadTask downloadTask) {
10197

10298
@Override
10399
public void onCompleted(DownloadTask downloadTask) {
104-
Log.d(TAG,"downloadListener download apk file success");
100+
Log.d(TAG, "downloadListener download apk file success");
105101
}
106102

107103
@Override
108104
public void onFailed(DownloadTask downloadTask, int i, String s) {
109-
Log.d(TAG,"downloadListener download apk file fail");
105+
Log.d(TAG, "downloadListener download apk file fail");
110106
}
111107
};
112108

113109
//监听APP升级状态
114-
Beta.upgradeStateListener = new UpgradeStateListener(){
110+
Beta.upgradeStateListener = new UpgradeStateListener() {
115111
@Override
116112
public void onUpgradeFailed(boolean b) {
117-
Log.d(TAG,"upgradeStateListener upgrade failed");
113+
Log.d(TAG, "upgradeStateListener upgrade failed");
118114
}
119115

120116
@Override
121117
public void onUpgradeSuccess(boolean b) {
122-
Log.d(TAG,"upgradeStateListener upgrade success");
118+
Log.d(TAG, "upgradeStateListener upgrade success");
123119
}
124120

125121
@Override
126122
public void onUpgradeNoVersion(boolean b) {
127-
Log.d(TAG,"upgradeStateListener upgrade has no new version");
123+
Log.d(TAG, "upgradeStateListener upgrade has no new version");
128124
}
129125

130126
@Override
131127
public void onUpgrading(boolean b) {
132-
Log.d(TAG,"upgradeStateListener upgrading");
128+
Log.d(TAG, "upgradeStateListener upgrading");
133129
}
134130

135131
@Override
136132
public void onDownloadCompleted(boolean b) {
137-
Log.d(TAG,"upgradeStateListener download apk file success");
133+
Log.d(TAG, "upgradeStateListener download apk file success");
138134
}
139135
};
140136
Bugly.init(getApplicationContext(), BUGLY_APPID, BUGLY_ENABLE_DEBUG, strategy);

Demo/app/src/main/java/com/tencent/liteav/demo/MainActivity.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected void onCreate(Bundle savedInstanceState) {
5252
setContentView(R.layout.activity_main);
5353

5454
mTvVersion = (TextView) findViewById(R.id.main_tv_version);
55-
mTvVersion.setText(getString(R.string.app_tv_super_player_version, TXLiveBase.getSDKVersionStr()+"(8.9.1015)"));
55+
mTvVersion.setText(getString(R.string.app_tv_super_player_version, TXLiveBase.getSDKVersionStr()+"(9.0.857)"));
5656

5757
mMainTitle = (TextView) findViewById(R.id.main_title);
5858
mMainTitle.setOnLongClickListener(new View.OnLongClickListener() {
@@ -322,12 +322,12 @@ private File getLogFile() {
322322
return null;
323323
}
324324

325-
String path = sdcardDir.getAbsolutePath() + "/log/liteav";
326-
List<String> logs = new ArrayList<>();
327-
File directory = new File(path);
325+
String path = sdcardDir.getAbsolutePath() + "/log/liteav";
326+
List<String> logs = new ArrayList<>();
327+
File directory = new File(path);
328328
if (directory != null && directory.exists() && directory.isDirectory()) {
329329
long lastModify = 0;
330-
File files[] = directory.listFiles();
330+
File files[] = directory.listFiles();
331331
if (files != null && files.length > 0) {
332332
for (File file : files) {
333333
if (file.getName().endsWith("xlog")) {
@@ -345,7 +345,7 @@ private File getLogFile() {
345345
private File zip(List<String> files, String zipFileName) {
346346
File zipFile = new File(zipFileName);
347347
zipFile.deleteOnExit();
348-
InputStream is = null;
348+
InputStream is = null;
349349
ZipOutputStream zos = null;
350350

351351
try {
@@ -359,7 +359,7 @@ private File zip(List<String> files, String zipFileName) {
359359
is = new FileInputStream(file);
360360
zos.putNextEntry(new ZipEntry(file.getName()));
361361
byte[] buffer = new byte[8 * 1024];
362-
int length = 0;
362+
int length = 0;
363363
while ((length = is.read(buffer)) != -1) {
364364
zos.write(buffer, 0, length);
365365
}

Demo/app/src/main/java/com/tencent/liteav/demo/common/widget/AvatarConstant.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.tencent.liteav.demo.common.widget;
22

33
public interface AvatarConstant {
4-
String USER_AVATAR_ARRAY [] = {
4+
String USER_AVATAR_ARRAY[] = {
55
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar1.png",
66
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar2.png",
77
"https://liteav.sdk.qcloud.com/app/res/picture/voiceroom/avatar/user_avatar3.png",

0 commit comments

Comments
 (0)