Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5703505 authored by Isaac J. Manjarres's avatar Isaac J. Manjarres Committed by Isaac Manjarres
Browse files

ashmem: Only attempt to open ashmem device when necessary



In the future apps targeting API levels 37+ will not be able to open
/dev/ashmem$boot_id. However, those apps may still interface with ashmem
fds from other older apps, and thus, need to identify those fds as
ashmem fds.

This currently involves initializing the ashmem rdev value on the first
call to __ashmem_open(), which won't work for apps that can't use
ashmem.

Rework the logic to use stat() on the ashmem device path to initialize
the ashmem rdev value. This will happen either the first time an ashmem
fd is created, or the first time an fd needs to be checked to see if it
is an ashmem fd.

Bug: 111903542
Change-Id: Icaf8d3ced27222ece39a29ee48b049489d11086b
Signed-off-by: default avatarIsaac J. Manjarres <isaacmanjarres@google.com>
parent 31332501
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment