|
79 | 79 | import android.widget.LinearLayout; |
80 | 80 | import android.widget.Toast; |
81 | 81 |
|
82 | | -import com.google.android.gms.ads.AdRequest; |
83 | | -import com.google.android.gms.ads.AdSize; |
84 | | -import com.google.android.gms.ads.AdView; |
85 | | -import com.google.android.gms.ads.MobileAds; |
86 | 82 | import com.ksmaze.android.preference.ListPreferenceMultiSelect; |
87 | 83 |
|
88 | 84 | import org.proxydroid.utils.Constraints; |
@@ -138,7 +134,6 @@ public void handleMessage(Message msg) { |
138 | 134 | private CheckBoxPreference isBypassAppsCheck; |
139 | 135 | private Preference proxyedApps; |
140 | 136 | private Preference bypassAddrs; |
141 | | - private AdView adView; |
142 | 137 | private BroadcastReceiver ssidReceiver = new BroadcastReceiver() { |
143 | 138 | @Override |
144 | 139 | public void onReceive(Context context, Intent intent) { |
@@ -315,28 +310,11 @@ public void onCreate(Bundle savedInstanceState) { |
315 | 310 | super.onCreate(savedInstanceState); |
316 | 311 | addPreferencesFromResource(R.xml.proxydroid_preference); |
317 | 312 |
|
318 | | - ((ProxyDroidApplication)getApplication()) |
319 | | - .firebaseAnalytics.setCurrentScreen(this, "home_screen", null); |
320 | | - |
321 | | - // Create the adView |
322 | | - adView = new AdView(this); |
323 | | - adView.setAdUnitId("ca-app-pub-9097031975646651/4806879927"); |
324 | | - adView.setAdSize(AdSize.SMART_BANNER); |
325 | 313 | // Lookup your LinearLayout assuming it’s been given |
326 | 314 | // the attribute android:id="@+id/mainLayout" |
327 | 315 | ViewParent parent = getListView().getParent(); |
328 | 316 | LinearLayout layout = getLayout(parent); |
329 | 317 |
|
330 | | - // disable adds |
331 | | - if (layout != null) { |
332 | | - // Add the adView to it |
333 | | - layout.addView(adView, 0); |
334 | | - adView.loadAd(new AdRequest.Builder() |
335 | | - .addTestDevice("F58907F28184A828DD0DB6F8E38189C6") |
336 | | - .addTestDevice("236666026C17FEFB1B547C4A3B2322CD") |
337 | | - .build()); |
338 | | - } |
339 | | - |
340 | 318 | hostText = (EditTextPreference) findPreference("host"); |
341 | 319 | portText = (EditTextPreference) findPreference("port"); |
342 | 320 | userText = (EditTextPreference) findPreference("user"); |
@@ -430,8 +408,6 @@ public void run() { |
430 | 408 | @Override |
431 | 409 | public void onDestroy() { |
432 | 410 |
|
433 | | - if (adView != null) adView.destroy(); |
434 | | - |
435 | 411 | if (ssidReceiver != null) unregisterReceiver(ssidReceiver); |
436 | 412 |
|
437 | 413 | super.onDestroy(); |
|
0 commit comments