judemanutd / AutoStarter

This library helps bring up the autostart permission manager of a phone to the user so they can add an app to autostart.
MIT License
626 stars 115 forks source link

Added support for Oppo Color OS 5.2 (Android 8.1) + Color OS 6 (Android 9) [Rx17 Neo - CPH1893 / Rx17 Pro - CPH1877] #51

Closed Prometheus3k closed 3 years ago

Prometheus3k commented 4 years ago

Added support for Oppo Rx17 Neo and Rx17 Pro on ColorOS 5.2. These devices do have the package StartupManager used in the library code (Phone Manager, Privacy, Startup Manager) but several new Oppo measures prevent the library from working.

  1. trying to launch the installed startup manager package (com.coloros.safecenter/.startupapp.StartupAppListActivity) fails as it now states "requires oppo.permission.OPPO_COMPONENT_SAFE"
  2. checking if package exists will return false even if it is present, which is probably again down to Oppo permission requirement.

However the Auto Start switch is also shown within the app info screen. Sadly I can't make it highlight the "Auto Start" switch row but we can take the user there at least. Device info: Oppo Rx17 Neo (CPH1893) / Rx17 Pro (CPH1877), Color OS 5.2 (Android 8.1). Firmware links: Oppo Rx17 Neo (CPH1893) Oppo Rx17 Pro (CPH1877)

I've only tested on Rx17 Neo, ColorOS 5.2 (firmware CPH1893EX_11_A.16) Video showing test results (before and after fix) https://drive.google.com/drive/folders/1fEiq9UwKLW5jTAqUWyYy96lHMsZ2CDSI However this fix should also work on higher versions of ColorOS.

Update: Received confirmation "Allow auto start" switch is present App Info in Color OS 6.0.1 (A1k CPH1923) so can treat as a forward trend in Color OS.

judemanutd commented 3 years ago

@Prometheus3k I can resolve this one but could you please resolve the merge conflicts.

Prometheus3k commented 3 years ago

@judemanutd done.