Skip to content

Commit 8f4e5fb

Browse files
committed
add youmi ad
1 parent 0ffe462 commit 8f4e5fb

21 files changed

+224
-250
lines changed

app/build.gradle

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ android {
1616
applicationId "com.brian.csdnblog"
1717
minSdkVersion 15
1818
targetSdkVersion 24
19-
versionCode 78
20-
versionName "1.3.78"
19+
versionCode 79
20+
versionName "1.3.79"
2121
multiDexEnabled true
2222
vectorDrawables.useSupportLibrary = true
2323

@@ -134,7 +134,6 @@ android {
134134
dependencies {
135135
compile fileTree(dir: 'libs', include: ['*.jar'])
136136
testCompile 'junit:junit:4.12'
137-
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
138137
compile 'org.greenrobot:eventbus:3.0.0'
139138
compile 'com.google.code.gson:gson:2.4'
140139
compile 'com.tencent.bugly:crashreport:latest.release'
@@ -146,8 +145,6 @@ dependencies {
146145
compile 'com.jakewharton:butterknife:8.4.0'
147146
apt 'com.jakewharton:butterknife-compiler:8.4.0'
148147

149-
compile 'com.facebook.stetho:stetho:1.4.1'
150-
compile 'com.facebook.stetho:stetho-okhttp3:1.4.1'
151-
152148
compile 'com.android.support:design:24.2.1'
149+
compile 'com.android.support:support-v4:24.2.1'
153150
}
-231 KB
Binary file not shown.
101 KB
Binary file not shown.

app/libs/qhad_0.1.12.1113.jar

-201 KB
Binary file not shown.

app/proguard-rules.pro

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,12 @@
150150
-keep class com.brian.csdnblog.receiver.MiPushMessageReceiver {*;}
151151

152152
# 腾讯相关
153-
-keep public class com.tencent.** {*;}
153+
-keep class com.tencent.** {*;}
154154

155-
-keep class com.qq.e.** {
156-
public protected *;
157-
}
158-
-keep class android.support.v4.app.NotificationCompat**{
159-
public *;
160-
}
155+
-keep class android.support.**{*;}
156+
157+
#有米广告
158+
-keep class net.youmi.android.**{*;}
161159

162160
# 解决第三方包,爆出的warning
163161
-keepattributes EnclosingMethod

app/src/main/AndroidManifest.xml

Lines changed: 15 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
<permission android:name="com.brian.csdnblog.permission.MIPUSH_RECEIVE" android:protectionLevel="signature" />
2828
<uses-permission android:name="com.brian.csdnblog.permission.MIPUSH_RECEIVE" />
2929

30-
<!--腾讯广告-->
31-
<uses-permission android:name="android.permission.ACCESS_COARSE_UPDATES"/>
32-
3330
<application
3431
android:name=".App"
3532
android:allowBackup="true"
@@ -163,50 +160,23 @@
163160
</intent-filter>
164161
</receiver>
165162

166-
<!-- leakcanary -->
167-
<!-- <service
168-
android:name="com.squareup.leakcanary.internal.HeapAnalyzerService"
169-
android:enabled="false"
170-
android:process=":leakcanary" />
171-
<service
172-
android:name="com.squareup.leakcanary.DisplayLeakService"
173-
android:enabled="false" />
174-
175-
<activity
176-
android:name="com.squareup.leakcanary.internal.DisplayLeakActivity"
177-
android:enabled="false"
178-
android:icon="@drawable/__leak_canary_icon"
179-
android:label="@string/__leak_canary_display_activity_label"
180-
android:taskAffinity="com.squareup.leakcanary"
181-
android:theme="@style/__LeakCanary.Base" >
182-
<intent-filter>
183-
<action android:name="android.intent.action.MAIN" />
184-
185-
<category android:name="android.intent.category.LAUNCHER" />
186-
</intent-filter>
187-
</activity> -->
188-
189-
190-
<!-- 360广告
191-
<service
192-
android:name="com.qhad.ads.sdk.service.QhAdService"
193-
android:enabled="true"
194-
android:exported="false" />
195-
163+
<!--有米广告-->
196164
<activity
197-
android:name="com.qhad.ads.sdk.adcore.QhAdActivity"
198-
android:configChanges="orientation|screenSize|keyboardHidden" />
199-
-->
200-
201-
202-
<!--腾讯广告-->
165+
android:name="net.youmi.android.AdBrowser"
166+
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
167+
android:theme="@android:style/Theme.Light.NoTitleBar" >
168+
</activity>
203169
<service
204-
android:name="com.qq.e.comm.DownloadService"
205-
android:exported="false" />
206-
<activity
207-
android:name="com.qq.e.ads.ADActivity"
208-
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />
209-
170+
android:name="net.youmi.android.AdService"
171+
android:exported="false" >
172+
</service>
173+
<receiver
174+
android:name="net.youmi.android.AdReceiver" >
175+
<intent-filter>
176+
<action android:name="android.intent.action.PACKAGE_ADDED" />
177+
<data android:scheme="package" />
178+
</intent-filter>
179+
</receiver>
210180

211181
<meta-data
212182
android:name="UMENG_APPKEY"

app/src/main/assets/dex.jar

326 KB
Binary file not shown.

app/src/main/java/com/brian/csdnblog/App.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import com.brian.csdnblog.manager.PushManager;
1313
import com.brian.csdnblog.util.AppInfoUtil;
1414
import com.brian.csdnblog.util.ConfigHelper;
15-
import com.facebook.stetho.Stetho;
1615
import com.tencent.bugly.crashreport.CrashReport;
1716
import com.umeng.analytics.MobclickAgent;
1817

@@ -37,11 +36,6 @@ public void onCreate() {
3736
ConfigHelper.init(this);
3837
PushManager.getInstance().initPushMsg(this);
3938
setStrictModeEnable(Config.isDebug);
40-
41-
if (Config.isDebug) {
42-
Stetho.initializeWithDefaults(this); // chrome调试
43-
RefWatcherHelper.install(this); // 内存泄漏检测
44-
}
4539
}
4640
}
4741

app/src/main/java/com/brian/csdnblog/RefWatcherHelper.java

Lines changed: 0 additions & 34 deletions
This file was deleted.

app/src/main/java/com/brian/csdnblog/activity/BaseActivity.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
import android.content.Intent;
44
import android.os.Build;
55
import android.os.Bundle;
6+
import android.os.Handler;
67
import android.os.PersistableBundle;
78
import android.view.MotionEvent;
89
import android.view.View;
910
import android.view.Window;
1011
import android.view.WindowManager;
1112

1213
import com.brian.csdnblog.R;
13-
import com.brian.csdnblog.RefWatcherHelper;
1414
import com.brian.csdnblog.util.LogUtil;
1515
import com.brian.csdnblog.util.ResourceUtil;
1616
import com.umeng.analytics.MobclickAgent;
@@ -31,7 +31,6 @@ protected void onCreate(Bundle savedInstanceState) {
3131
super.onCreate(savedInstanceState);
3232

3333
sTopActivity = this;
34-
RefWatcherHelper.watch(this);
3534
}
3635

3736
@Override
@@ -101,7 +100,6 @@ public void onTrimMemory(int level) {
101100
protected void onDestroy() {
102101
LogUtil.log("onDestroy:" + getClass().getSimpleName());
103102
super.onDestroy();
104-
RefWatcherHelper.watch(this);
105103
}
106104

107105
/**
@@ -161,4 +159,12 @@ protected void initStatusBar() {
161159
}
162160
}
163161
}
162+
163+
public static Handler getUIHandler() {
164+
Handler handler = getTopActivity().getWindow().getDecorView().getHandler();
165+
if (handler == null) {
166+
handler = new Handler();
167+
}
168+
return handler;
169+
}
164170
}

0 commit comments

Comments
 (0)