Commit Graph

9 Commits

Author SHA1 Message Date
Paul Hu
8e2743045d Fix null IpmemoryService object in AGO project.
WTF will happen in RegularMaintenanceJobService due to
scheduling job and starting maintenance job are in different
processes. In AGO project, scheduling job use inprocess process.
But starting maintenance job use networkstack process. So
IpmemoryService objcet will be null when trying to do the
maintenance job.

Bug: 132763800
Test: Verify on both AGO and non-AGO projects that WFT will not
      happen.
Test: atest NetworkStackTests

Change-Id: I545fc8384ef7b3d97edf2270fa033d8afac2669c
Merged-In: If7f61a8b5ddc8cdd25928cd35afa7fece2c8dde5
Merged-In: I8043c405b3c78d8dd1e71ec584d7a2fdaa2fd989
Merged-In: I545fc8384ef7b3d97edf2270fa033d8afac2669c
(cherry picked from commit 20abd7d4e6)
2019-05-27 01:22:15 +00:00
Remi NGUYEN VAN
a95544d9a8 Do not mark in-process NetworkStack as persistent
The in-process NetworkStack runs in the system process, so it does not
need to be marked persistent.
Doing so causes a spurious com.android.networkstack.inprocess process to
be running, wasting memory.

Bug: 131046856
Test: Flashed sailfish, networking works, no extra process started
Test: Flashed walleye, networking still works
Test: aapt dump xmltree NetworkStack.apk AndroidManifest.xml unchanged
Change-Id: I0eb896c825ffe2581950c0bdd2b31ebd7eae0982
2019-05-16 18:21:54 +09:00
Dario Freni
fbe8278145 Revert "Revert "Make the network stack a persistent process.""
This reverts commit f6315c2e3c.

Reason for revert: Change I346d772e1f4aed94f6faead3b6455efc4666b651 implemented a feature to allow upgrading persistent processes via staged installs.

Bug: 131046856
Test: - adb install networkstack.apk fails
      - adb install --staged networkstack.apk succeds (after reboot)
Change-Id: I13af35c953c0501f2b129092e0089d4e893b97a1
2019-05-02 22:51:01 +00:00
Lorenzo Colitti
f6315c2e3c Revert "Make the network stack a persistent process."
This reverts commit 796afddd6c.

Reason for revert: breaks updatability because persistent processes are not updatable.

Bug: 131046856
Change-Id: I35ded113b31e742f13ad8523a10af3a83a111374
Merged-In: I35ded113b31e742f13ad8523a10af3a83a111374
(cherry picked from commit b2a5d85522)
2019-04-29 02:02:11 +00:00
Lorenzo Colitti
7d04541c1a Make the network stack a persistent process.
The network stack should never be killed, because if it does,
recovering networking requires a reboot. Make the process
persistent to reduce the chances of it being killed by the OOM
killer.

Bug: 131046856
Test: builds, boots
Test: process oom_score_adj is -800
Test: process goes from "Persistent Service" to "Persistent" in dumpsys meminfo
Change-Id: Ic8ebf6356e23489f6cd984d680ff9f1b4cbbe52d
Merged-In: Ic8ebf6356e23489f6cd984d680ff9f1b4cbbe52d
(cherry picked from commit c1eedfcd12)
2019-04-25 00:59:13 +00:00
paulhu
028d7a55fd [IPMS] Implement regular maintenance
Implement regular maintenance of IpMemoryStoreService. Regular
maintenance is scheduled for when the device is idle with access
power and a minimum interval of one day.

Bug: 113554482
Test: atest NetworkStackTests
Change-Id: Id3985e30d12307fc2e9fcbe782caaf97a627cef3
2019-04-01 23:35:36 +08:00
Remi NGUYEN VAN
2a23dfde16 Move permissions from base to standard manifest
Permissions defined in AndroidManifest_Base.xml would be inherited in
AndroidManifest_InProcess.xml and cause issues on svelte builds, since
privileged permissions are not whitelisted for
com.android.networkstack.inprocess.

The network stack running in the system_server process does not need
these permissions anyway since it has system_server permissions.

(clean cherry-pick from Ica63ce586e701b1f2415a97f63ba27cc25e4830a)

Test: flashed, booted crosshatch_svelte-eng, WiFi works
Test: flashed, booted blueline-eng, WiFi works
Fixes: 129485310
Merged-In: Ica63ce586e701b1f2415a97f63ba27cc25e4830a
Change-Id: Ib4b478fb39f43a2fd4221c7d1f1ea51de04e0fba
2019-04-01 09:54:34 +08:00
Remi NGUYEN VAN
ae1ef49436 Fix targetSdkVersion for NetworkStack
targetSdkVersion was set to 28 in aosp/916713, however this was broken
by the manifest refactor in aosp/923338: the targetSdk is not preserved
in the manifest merge.

Test: aapt dump badging shows targetSdkVersion 28
Change-Id: I7d06b141856e96ef011db32094bfc62a8cd1b350
2019-03-20 17:29:10 +09:00
Remi NGUYEN VAN
8acc99a974 Use an in-process APK for in-process NetworkStack
Instead of having a library in the classpath where the NetworkStack is
created by reflection on devices using the network stack in-process,
just bind to a version of the network stack service that runs in the
system process.

If the in-process version is installed it will be used, otherwise the
module is used with its own process.

Bug: 127908503
Test: blueline boots and has functional WiFi
Test: atest FrameworksNetTests NetworkStackTests
Test: svelte build boots and has functional WiFi
Change-Id: I7722b173e5686e0dbb9cfddcfb34344b0f4135d9
2019-03-08 19:18:40 +09:00