* changes:
cleanups and fixes for process_madvise compaction
Avoid unnecessary smaps logic during app compaction
CachedAppOptimizer: fix fd leak.
Fix function return type
Migrate to use process_madvise syscall instead of procfs interface for memory compaction
some fix suggestions that came up on ag/13665789 and some other cleanups
1. Use unique_fd instead of raw int to keep pidfd
2. Return the total compacted bytes on success for compactProcess
3. Fix for error potentially returning a random value
4. Fix truncation that could happen when calling madvise
5. Fail fast after encountering an error instead of silently
advancing to other VMAs when compacting.
Bug: 162993824
Test: Manual
Signed-off-by: Edgar Arriaga <edgararriaga@google.com>
Change-Id: Ide644f66cf0ebdea570dcb365d6a2400ffb18f4e
ForEachVma can extract data from both maps and smaps files,
however the smaps logic is not used during app compaction.
Replace its usage with ForEachVmaFromMaps which reads only
maps file and skips any smaps logic.
This results in ~22% CPU usage reduction.
Test: Manual
Bug: 181174877
Signed-off-by: Edgar Arriaga <edgararriaga@google.com>
Change-Id: I165f211c2084676bc7872d190ffad14141f56ea8
Merged-In: I165f211c2084676bc7872d190ffad14141f56ea8
errno isn't modified when a syscall returns successfully: this would
leak if errno was already non-zero before entering this function.
Bug: 172518739
Test: none
Change-Id: I38050863ceca226a9c2d143c85e0713c6a6fe511
Merged-In: I38050863ceca226a9c2d143c85e0713c6a6fe511
Previous releases explicitly check for invalid inputs. These checks
were removed with the move to keystore2 -- add them back.
Remove old prepareAttestationArguments* methods, as they are no
longer referenced.
Bug: 188741672
Test: com.google.android.gts.security.DeviceIdAttestationHostTest
Change-Id: I4eeec8367ebdfad527395206ab9e89b409e02631
Merged-In: I4eeec8367ebdfad527395206ab9e89b409e02631
A list of additional NR advanced band is used to determine which
particular band has high data rate capability. The data rate is
higher than the generic 5G data rate.
Bug: 183652287
Test: build pass
Change-Id: I45551902c7f1f4cfdc575b6a6c65351bce85d638
Merged-In: I45551902c7f1f4cfdc575b6a6c65351bce85d638
NetworkTypeController set OVERRIDE_NETWORK_TYPE_NR_ADVANCED when
device connect NR and frequency is mmWave.
Bug: 179443240
Bug: 179453836
Test: atest frameworks/opt/telephony/src/java/com/android/internal/telephony/NetworkTypeController.java
Change-Id: I242e8499a1bb31dcb5a3f0fbae2f8423c8c8f8a0
Merged-In: I242e8499a1bb31dcb5a3f0fbae2f8423c8c8f8a0
Currently the system uses procfs and we are migrating to use a syscall
called process_madvise which makes the code upstreamable and will allow
for making compaction widely available for multiple android devices.
It also opens room for future developments that involve a finer grain
VMA compressions than the current procfs allows.
Test: Ran the system without crashes and verified am_compact was effectively showing compressed memory (free zram reduced) when compressing.
Bug: 162993824
Test: Manual, verified that zram was being increased over time after compactions happened
Change-Id: I9d9d895aee7fbc46a2f12f6ca080ab8457ea7222
Merged-In: I9d9d895aee7fbc46a2f12f6ca080ab8457ea7222
ApiLint tries to only lint "new" APIs, i.e. those introduced since the
last frozen API. Using android-non-updatable's last frozen txt does not
work well for this, as it is incomplete API surface on its own, so
metalava cannot see all APIs that were present in the previous API
(such as methods inherited from ART), and so makes the wrong decisions
for which APIs are new.
Bug: 171506470
Test: m checkapi
Change-Id: I00d25f2ae0ba8f0ee6fa8564d86642efd74e0d44
Merged-In: I00d25f2ae0ba8f0ee6fa8564d86642efd74e0d44
(cherry picked from commit 4f90aa5148)
Higher priority goes first in mPrioritySortedApnContexts, so change
default priority to be higher than enterprise.
Test: atest DcTrackerTest
Bug: 183738520
Change-Id: Ib2f9594933d00307276f4538714a5354d36baf09
Merged-In: Ib2f9594933d00307276f4538714a5354d36baf09
NoOp instead of return ISE when the device is not CDMA capable.
Test: atest TelephonyManagerTest
Fix: 175665470
Change-Id: I36d69f4bf337ef9c102327bfe87752c56847af87
Merged-In: I36d69f4bf337ef9c102327bfe87752c56847af87
dist_group replaces owner and the default is going to change, set it
to the current default "android" for frameworks/base java_sdk_libraries.
Bug: 186723288
Test: m checkbuild
Change-Id: I1526853951bcffbe5c5aec6fbc6ba8e0dbea95ad
Merged-In: I1526853951bcffbe5c5aec6fbc6ba8e0dbea95ad
FileCleanupReceiver was not unregister when switch NotificationHistory
Testing Steps:
1. Settings -> Apps and notifications -> Notifications -> Notification history
2. Repeat switch 1000 times and system crash.
Change-Id: I40493fe7726883a449e54888247c5bffcc1554e3