Opened 5 years ago

Closed 5 years ago

#135 closed change (fixed)

Use the new CyanogenMod proxy registration API

Reported by: fhd Assignee: rjeschke
Priority: P2 Milestone: Adblock-Plus-for-Android-1.3
Module: Adblock-Plus-for-Android Keywords:
Cc: fhd, trev, rjeschke, jobp Blocked By: #547
Blocking: Platform: Android
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

Description (last modified by fhd)

Background

CyanogenMod is building a new API for global proxy registration.

What to change

  1. Request the new cyanogenmod.permission.GLOBAL_PROXY_MANAGEMENT permission.
  2. Register a receiver with the intent filter cyanogenmod.intent.action.GLOBAL_PROXY_STATE_CHANGED. This is triggered whenever the global proxy is changed from the Privacy menu.
  3. In the receiver, check that the GlobalProxyManager.PROXY_CHANGE_PACKAGE_NAME_EXTRA string argument is the package name of our proxy.
  4. Register ABP as the global proxy using ConnectivityManager.setGlobalProxy.

Change History (15)

comment:1 Changed 5 years ago by fhd

  • Owner set to fhd
  • Status changed from new to assigned

comment:2 Changed 5 years ago by trev

  • Cc fhd trev added

Note that last time I checked Android source code this function didn't do anything, it was a left-over from Android 3.0 which actually had global proxies (as opposed to per-connection proxies).

comment:3 Changed 5 years ago by fhd

  • Priority changed from P2 to P1
  • Ready unset

Yeah, I'm pretty sure this needs a proper refactoring, and thorough testing.

Setting the priority to P1 since we need to have a version that supports this ASAP to make an external dead line.

comment:4 Changed 5 years ago by fhd

  • Ready set

comment:5 Changed 5 years ago by fhd

  • Description modified (diff)
  • Summary changed from Attempt proxy registration using ConnectivityManager.setGlobalProxy to Use the new CyanogenMod proxy registration API

comment:6 Changed 5 years ago by fhd

  • Priority changed from P1 to P2

Dumping the priority back to P2, external dead line doesn't affect us.

comment:7 Changed 5 years ago by philll

  • Status changed from assigned to new

The assigned state will be dropped by #403

comment:8 Changed 5 years ago by fhd

  • Cc rjeschke added

Assigning to René, who started working on this.

We've finally got a working proof of concept now. It's probably about time we create a branch (e.g. "cm-proxy-api") for this. There's no point merging this before #547 is done, way too hacky right now.

comment:9 Changed 5 years ago by fhd

  • Owner changed from fhd to rjeschke

comment:10 Changed 5 years ago by fhd

  • Blocked By 547 added
  • Platform set to Android

comment:11 Changed 5 years ago by fhd

This was fixed by #547 - wasn't it?

comment:12 Changed 5 years ago by rjeschke

We didn't test the whole thing yet, will revive my Nexus for CyanogenMod testing and finish the remaining things for this issue by the end of this week.

Somehow this issue vanished from the radar ...

comment:13 Changed 5 years ago by jobp

  • Cc jobp added

comment:14 Changed 5 years ago by jobp

Device: Nexus 5, rooted
OS: CM 11-20141008-SNAPSHOT-M11-hammerhead
ABP: version 1.2.1 build 343

Issues during testing on 23.10:

  • The ABP APK cannot be downloaded through the AOSP browser.
  • It did not automatically enable EasyList Germany, only EasyList
  • Acceptable Ads:
    • Ads on Reddit are blocked, and not showing by default.
    • After disabling Acceptable Ads, Google/Yahoo/Bing ads still show
    • YouTube mobile site doesn't play videos when it has pre-roll ads (Reproducible with UC Web browser, but also happened on Chrome).
    • It still crashes a lot (e.g. Yesterday it crashed 3x within 10 mins). Especially when enabling/disabling the blocking, then going back to refresh a page, it crashes often.

comment:15 Changed 5 years ago by fhd

  • Milestone set to Adblock-Plus-for-Android-1.3
  • Resolution set to fixed
  • Status changed from new to closed

This is in the devbuilds, was pushed as part of:
http://codereview.adblockplus.org/4705284891082752/

Let's close this one and create new issues for the problems.

Note: See TracTickets for help on using tickets.