adguardteam / contentblocker Goto Github PK
View Code? Open in Web Editor NEWContent blocking extension for Samsung Internet and Yandex Browser
License: GNU General Public License v3.0
Content blocking extension for Samsung Internet and Yandex Browser
License: GNU General Public License v3.0
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.yandex.browser.tests/com.yandex.browser.YandexBrowserMainActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1873)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1597)
at android.app.Activity.startActivityForResult(Activity.java:3745)
at android.app.Activity.startActivityForResult(Activity.java:3706)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:842)
at android.app.Activity.startActivity(Activity.java:4016)
at android.app.Activity.startActivity(Activity.java:3984)
at com.adguard.android.commons.BrowserUtils.startBrowser(BrowserUtils.java:234)
at com.adguard.android.commons.BrowserUtils.startYandexBrowser(BrowserUtils.java:219)
at com.adguard.android.contentblocker.MainActivity$6.onClick(MainActivity.java:197)
at android.view.View.performClick(View.java:4793)
at android.view.View$PerformClick.run(View.java:19919)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5499)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:737)
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.adguard.android.contentblocker/com.adguard.android.contentblocker.onboarding.OnboardingActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.support.v4.app.Fragment.toString()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2521)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2595)
at android.app.ActivityThread.access$800(ActivityThread.java:178)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5631)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.support.v4.app.Fragment.toString()' on a null object reference
at com.adguard.android.contentblocker.onboarding.OnboardingActivity.removeAllFragments(OnboardingActivity.java:210)
at com.adguard.android.contentblocker.onboarding.OnboardingActivity.onCreate(OnboardingActivity.java:71)
at android.app.Activity.performCreate(Activity.java:6092)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2468)
... 10 more
What should be changed:
http://developer.android.com/intl/ru/google/play/publishing/multiple-apks.html
Without Adguard
It happens when Yandex browser is installed on samsung phone (with samsung internet).
06-07 20:24:16.441 E/AndroidRuntime(23810): FATAL EXCEPTION: main
06-07 20:24:16.441 E/AndroidRuntime(23810): Process: com.adguard.android.contentblocker, PID: 23810
06-07 20:24:16.441 E/AndroidRuntime(23810): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.adguard.android.contentblocker/com.adguard.android.contentblocker.MainActivity}: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.
06-07 20:24:16.441 E/AndroidRuntime(23810): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2334)
06-07 20:24:16.441 E/AndroidRuntime(23810): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2392)
06-07 20:24:16.441 E/AndroidRuntime(23810): at android.app.ActivityThread.access$900(ActivityThread.java:169)
06-07 20:24:16.441 E/AndroidRuntime(23810): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1280)
06-07 20:24:16.441 E/AndroidRuntime(23810): at android.os.Handler.dispatchMessage(Handler.java:102)
06-07 20:24:16.441 E/AndroidRuntime(23810): at android.os.Looper.loop(Looper.java:146)
06-07 20:24:16.441 E/AndroidRuntime(23810): at android.app.ActivityThread.main(ActivityThread.java:5487)
06-07 20:24:16.441 E/AndroidRuntime(23810): at java.lang.reflect.Method.invokeNative(Native Method)
06-07 20:24:16.441 E/AndroidRuntime(23810): at java.lang.reflect.Method.invoke(Method.java:515)
06-07 20:24:16.441 E/AndroidRuntime(23810): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
06-07 20:24:16.441 E/AndroidRuntime(23810): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
06-07 20:24:16.441 E/AndroidRuntime(23810): at dalvik.system.NativeStart.main(Native Method)
06-07 20:24:16.441 E/AndroidRuntime(23810): Caused by: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.
06-07 20:24:16.441 E/AndroidRuntime(23810): at android.support.v7.app.AppCompatDelegateImplV7.setSupportActionBar(AppCompatDelegateImplV7.java:197)
06-07 20:24:16.441 E/AndroidRuntime(23810): at android.support.v7.app.AppCompatActivity.setSupportActionBar(AppCompatActivity.java:126)
06-07 20:24:16.441 E/AndroidRuntime(23810): at com.adguard.android.contentblocker.MainActivity.onCreate(MainActivity.java:80)
06-07 20:24:16.441 E/AndroidRuntime(23810): at android.app.Activity.performCreate(Activity.java:5451)
06-07 20:24:16.441 E/AndroidRuntime(23810): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
06-07 20:24:16.441 E/AndroidRuntime(23810): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
06-07 20:24:16.441 E/AndroidRuntime(23810): ... 11 more
There should be an easy way to turn ad blocking off for some website
Все ресурсы mail.ru некорректно отображаются:
https://auto.mail.ru/
https://horo.mail.ru/
https://realty.mail.ru/
https://health.mail.ru/
https://afisha.mail.ru/
https://cloud.mail.ru/
https://otvet.mail.ru/
https://pogoda.mail.ru/
https://sport.mail.ru/
https://tv.mail.ru/
http://torg.mail.ru/
https://cars.mail.ru/
The magic in Gradle or Google Play wants apache common libs to be on devices for our blocker to be compatible with them.
I'm moving from using maven dependencies to file (jar) dependencies.
Also, I will update libraries with new versions.
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.yandex.browser/com.yandex.browser.YandexBrowserMainActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1854)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1545)
at android.app.Activity.startActivityForResult(Activity.java:4283)
at android.app.Activity.startActivityForResult(Activity.java:4230)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:842)
at android.app.Activity.startActivity(Activity.java:4567)
at android.app.Activity.startActivity(Activity.java:4535)
at com.adguard.android.commons.BrowserUtils.startBrowser(BrowserUtils.java:233)
at com.adguard.android.commons.BrowserUtils.startYandexBrowser(BrowserUtils.java:220)
at com.adguard.android.contentblocker.MainActivity$6.onClick(MainActivity.java:197)
at android.view.View.performClick(View.java:5697)
at android.widget.TextView.performClick(TextView.java:10826)
at android.view.View$PerformClick.run(View.java:22526)
at android.os.Handler.handleCallback(Handler.java:739)
Все ресурсы mail.ru некорректно отображаются:
https://auto.mail.ru/
https://horo.mail.ru/
https://realty.mail.ru/
https://health.mail.ru/
https://afisha.mail.ru/
https://cloud.mail.ru/
https://otvet.mail.ru/
https://pogoda.mail.ru/
https://sport.mail.ru/
https://tv.mail.ru/
http://torg.mail.ru/
https://cars.mail.ru/А скрин-то не с контент-блокера, а из полной версии Адгарда. Мы точно тут контент-блокер обсуждаем?
Фильтры указаны с ContentBlocker, исключения фильтрации были наложены на обычный Adguard, потому что в ContentBlocker не нашёл возможности указать ручные фильтры и предположил, что приложения используют общие ресурсы. По факту проблема не решена, с включённым русским фильтром сайты mail.ru уродуются.
@vbagirov we need a text for that warning message.
We should warn user about following possible issues:
Nothing happens when you click on "whitelist" in content blocker settings.
java.lang.RuntimeException: Binary XML file line #23: You must supply a layout_width attribute. at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:492) at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:5844) at android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:5986) at android.widget.LinearLayout$LayoutParams.<init>(LinearLayout.java:1854) at android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:1766) at android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:62) at android.view.LayoutInflater.rInflate(LayoutInflater.java:759) at android.view.LayoutInflater.inflate(LayoutInflater.java:495) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at android.view.LayoutInflater.inflate(LayoutInflater.java:353) at com.adguard.android.commons.BrowserUtils.showBrowserInstallDialog(BrowserUtils.java:183) at com.adguard.android.contentblocker.onboarding.OnboardingActivity.onClick(OnboardingActivity.java:166) at android.view.View.performClick(View.java:4452) at android.widget.Button.performClick(Button.java:148) at android.view.View$PerformClick.run(View.java:18428) at android.os.Handler.handleCallback(Handler.java:725) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5365) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) at dalvik.system.NativeStart.main(Native Method)
Content blocking is already supported by Yandex beta:
https://play.google.com/store/apps/details?id=com.yandex.browser.beta
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.adguard.android.contentblocker/com.adguard.android.contentblocker.MainActivity}: android.view.InflateException: Binary XML file line #10: Error inflating class android.widget.ListView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2372)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2424)
at android.app.ActivityThread.access$600(ActivityThread.java:162)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5400)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:837)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:604)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class android.widget.ListView
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:830)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:736)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.adguard.android.contentblocker.MainActivity.onCreate(MainActivity.java:75)
at android.app.Activity.performCreate(Activity.java:5122)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1084)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2336)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:587)
... 27 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=408; index=104202258
at android.content.res.TypedArray.getResourceId(TypedArray.java:581)
at android.widget.ListView.<init>(ListView.java:187)
at android.widget.ListView.<init>(ListView.java:172)
... 30 more
This banner should be blocked by these rules(1st - in the Russian filter, 2nd - in mobile)
epidemz.co,epidemz.com##.topreklama
epidemz.com,epidemz.co##div[id^="cpa_rotator_block_"]
Original issue:
AdguardTeam/AdguardFilters#4307
Add information about the Content Blocker app
java.lang.RuntimeException: Unable to get provider com.adguard.android.contentblocker.FiltersContentProvider: java.lang.ClassNotFoundException: Didn't find class "com.adguard.android.contentblocker.FiltersContentProvider" on path: DexPathList[[zip file "/mnt/asec/com.adguard.android.contentblocker-1/pkg.apk"],nativeLibraryDirectories=[/mnt/asec/com.adguard.android.contentblocker-1/lib, /vendor/lib, /system/lib]]
at android.app.ActivityThread.installProvider(ActivityThread.java:5018)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4589)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4522)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1381)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5299)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.adguard.android.contentblocker.FiltersContentProvider" on path: DexPathList[[zip file "/mnt/asec/com.adguard.android.contentblocker-1/pkg.apk"],nativeLibraryDirectories=[/mnt/asec/com.adguard.android.contentblocker-1/lib, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.ActivityThread.installProvider(ActivityThread.java:5003)
... 12 more
Suppressed: java.io.IOException: unable to open DEX file
at dalvik.system.DexFile.openDexFileNative(Native Method)
at dalvik.system.DexFile.openDexFile(DexFile.java:296)
at dalvik.system.DexFile.<init>(DexFile.java:80)
at dalvik.system.DexFile.<init>(DexFile.java:59)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:263)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:230)
at dalvik.system.DexPathList.<init>(DexPathList.java:112)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:65)
at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:57)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:326)
at android.app.LoadedApk.makeApplication(LoadedApk.java:508)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4514)
... 10 more
New languages:
Ukranian, Chinese Simplified, Japanese, Spanish (Latin America), Hungarian, Dutch, Italian.
They are ready in OneSkyApp.
Hello. the program does not autobrowse. manually updated.
java.lang.IllegalArgumentException: View=com.android.internal.policy.impl.PhoneWindow$DecorView{2685cc9d V.E..... R......D 0,0-667,348} not attached to window manager
at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:402)
at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:328)
at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:84)
at android.app.Dialog.dismissDialog(Dialog.java:431)
at android.app.Dialog.dismiss(Dialog.java:414)
at com.adguard.android.contentblocker.ApplyAndRefreshTask.onPostExecute(ApplyAndRefreshTask.java:37)
at com.adguard.android.contentblocker.ApplyAndRefreshTask.onPostExecute(ApplyAndRefreshTask.java:12)
at android.os.AsyncTask.finish(AsyncTask.java:632)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
We've recently added it to the latest AG for Android beta.
Please don't forget about update process, this filter should be added for existing users as well.
Nothing happens when I change filter status.
What should happen:
Just like it's described here:
AdguardTeam/AdguardForAndroid#863
@atropnikov
Also we should add one more platform:
extension/android-content-blocker/
Limit it to rules with basic ABP syntax.
No extended CSS, no advanced rules ($replace, $mp4 and such), no CSS, no JS, no HTML filtering
Currently, when choosing which browser to start (talking about "Start" button in the UI), we're going through all apps having Yandex Browser in the name.
We should change the algorithm, so that stable browsers versions have higher priority over beta/alpha versions.
Dolphin & Boat browsers apparently use plugins for ad blocking (e.g., for Dolphin, https://dolphin.com/lab/en/ → http://opsen.dolphin-browser.com/pages/hotapps/convert/adblock.html?from=dolphin_lab) & do have some 3rd-party plugins. Do you all think Content Blocker could be used/adapted for them?
AdguardTeam/AdguardForAndroid#22 & AdguardTeam/AdguardForAndroid#187 may contain some useful package names.
So we should allow people to choose & install it.
Just like we do in the main app.
Add user filter to Content Blocker like in Adguard app
- If you want to check whether the Content Blocker feature is available or not with current device, you can use below logic.
( starting from 4.0, Samsung Internet for Android supports Content Blocker)
Intent intent = new Intent();
intent.setAction("com.samsung.android.sbrowser.contentBlocker.ACTION_SETTING");
List<ResolveInfo> list = getPackageManager().queryIntentActivities(intent, 0);
if(list.size() > 0) {
// Samsung Internet 4.0 was installed.
}
If the user didn't install Samsung Internet 4.0 for content blocker, you can guide the user to do so by providing an option to access to Play Store Link. - Samsung Internet in Google Play : https://play.google.com/store/apps/details?id=com.sec.android.app.sbrowser
An example is cosstores.com . When clicking on a product to see more information about it, it just does nothing. This is happening when using Samsung Internet with Adguard for Android.
Let's change is with every update.
Take a look at the documentation:
https://tech.yandex.com/browser/contentblocker/doc/dg/concepts/adjustment-docpage/
After the user has chosen your extension in the settings, the browser caches the content blocking filters from the extension. Since filters are cached, the extension must promptly inform the browser of any changes to filters.
So, we can be sure that AG is enabled in browser settings it it has requested filters.
java.lang.IllegalArgumentException: View=com.android.internal.policy.PhoneWindow$DecorView{c3f36e5 V.E...... R.....ID 0,0-1069,406} not attached to window manager
at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:451)
at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:377)
at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:122)
at android.app.Dialog.dismissDialog(Dialog.java:546)
at android.app.Dialog.dismiss(Dialog.java:529)
at com.adguard.android.contentblocker.ApplyAndRefreshTask.onPostExecute(ApplyAndRefreshTask.java:36)
at com.adguard.android.contentblocker.ApplyAndRefreshTask.onPostExecute(ApplyAndRefreshTask.java:12)
at android.os.AsyncTask.finish(AsyncTask.java:651)
at android.os.AsyncTask.access$500(AsyncTask.java:180)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Device: Samsung S4, Android 4.4
E/AndroidRuntime(23911): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.adguard.android.contentblocker/com.adguard.android.contentblocker.MainActivity}: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.
E/AndroidRuntime(23911): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2394)
E/AndroidRuntime(23911): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2452)
E/AndroidRuntime(23911): at android.app.ActivityThread.access$900(ActivityThread.java:172)
E/AndroidRuntime(23911): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1302)
E/AndroidRuntime(23911): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(23911): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(23911): at android.app.ActivityThread.main(ActivityThread.java:5586)
E/AndroidRuntime(23911): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(23911): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(23911): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
E/AndroidRuntime(23911): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
E/AndroidRuntime(23911): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(23911): Caused by: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.
E/AndroidRuntime(23911): at android.support.v7.app.AppCompatDelegateImplV7.setSupportActionBar(AppCompatDelegateImplV7.java:197)
E/AndroidRuntime(23911): at android.support.v7.app.AppCompatActivity.setSupportActionBar(AppCompatActivity.java:126)
E/AndroidRuntime(23911): at com.adguard.android.contentblocker.MainActivity.onCreate(MainActivity.java:80)
E/AndroidRuntime(23911): at android.app.Activity.performCreate(Activity.java:5451)
E/AndroidRuntime(23911): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
E/AndroidRuntime(23911): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2358)
E/AndroidRuntime(23911): ... 11 more
W/ActivityManager( 888): Force finishing activity com.adguard.android.contentblocker/.MainActivity
изначальные условия:
адгарда нет, я.браузера нет
Use this material palette:
https://www.materialpalette.com/green/deep-orange
Google guidelines:
https://material.google.com/growth-communications/onboarding.html
https://monosnap.com/file/ffj70L5TpeM2lAdNoVjYNiuCvv8uj6
On this step we do nothing except detecting the current device configuration and supported browsers.
If supported browser is detected, ignore step 2.
https://monosnap.com/file/I8zUNyu9YrGOwyBbYZvCm5PKYIaO7m
After user clicks "Select browser" show the dialog window:
https://monosnap.com/file/nlFLzw27Av0KBg78UH7Yj57uq9GJ0r
Set up a "package receiver" and wait for the supported browser to be installed before letting user to step 3.
https://monosnap.com/file/4dz1YZdPL64NJXz33sWRxzPv5ZZIcD
Send user to the browser content blockers settings so he could enable Adguard there.
Image on step 3 should depend on the detected supported browser (basically it should be a screenshot of the browser's content blocker settings).
Mockup:
https://monosnap.com/file/O4VZxF9w05QHI8VROosjifoBp4JC5P
Filters card should look like this example:
https://monosnap.com/file/S43CdoJL73iPjsXcRctXDVtYe8qir6
Card menu items:
There are two more cards below:
https://monosnap.com/file/auBp97bSzLnv0M7UYGed07kT9ruxBq
In case if supported browser was not detected, first visible card should be this one:
https://monosnap.com/file/daYvzeJAPF1JmQBNS4xbXi2w4NM7Dj
Google guidelines:
https://material.google.com/patterns/navigation-drawer.html
Background color: white
Top panel: simply put Adguard logo there:
https://adguard.com/images/[email protected]
Menu items:
(settings icon) Settings
Filters
Whitelist
(refresh icon) Check filter updates
(star icon) Rate Adguard
(info icon) About
-------------------- (this is a horizontal line separator)
(door icon) Exit
Продолжение закрытой темы:
Все ресурсы mail.ru некорректно отображаются:
https://auto.mail.ru/
https://horo.mail.ru/
https://realty.mail.ru/
https://health.mail.ru/
https://afisha.mail.ru/
https://cloud.mail.ru/
https://otvet.mail.ru/
https://pogoda.mail.ru/
https://sport.mail.ru/
https://tv.mail.ru/
http://torg.mail.ru/
https://cars.mail.ru/
Добавил в пользовательский фильтр по очереди, ничего не изменилось ни для полной версии сайта, ни для мобильной:
java.lang.IllegalArgumentException: View=com.android.internal.policy.impl.PhoneWindow$DecorView{74fa873 V.E..... R......D 0,0-501,242} not attached to window manager
at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:412)
at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:338)
at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:122)
at android.app.Dialog.dismissDialog(Dialog.java:522)
at android.app.Dialog$1.run(Dialog.java:128)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6946)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.adguard.android.contentblocker/com.adguard.android.contentblocker.MainActivity}: android.view.InflateException: Binary XML file line #10: Error inflating class android.widget.ListView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2372)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2424)
at android.app.ActivityThread.access$600(ActivityThread.java:162)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5400)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:837)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:604)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #10: Error inflating class android.widget.ListView
at android.view.LayoutInflater.createView(LayoutInflater.java:613)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:830)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:736)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.adguard.android.contentblocker.MainActivity.onCreate(MainActivity.java:75)
at android.app.Activity.performCreate(Activity.java:5122)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2336)
... 11 more
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.view.LayoutInflater.createView(LayoutInflater.java:587)
... 27 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=408; index=104202258
at android.content.res.TypedArray.getResourceId(TypedArray.java:581)
at android.widget.ListView.<init>(ListView.java:187)
at android.widget.ListView.<init>(ListView.java:172)
... 30 more
Samsung gave a note that
Content blocker is not supported on China models. (All other countries are supported.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.