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

Skip to content
Commit ffa04d25 authored by felipeal's avatar felipeal Committed by Felipe Leme
Browse files

Optimized ActivityManager.getCurrentUser()

That method returns the userId of the current foreground user, but its
implementation fetches a UserInfo then extracts id.

This CL shortcuts the process by returning the user id directly, which
improves the performance in 2 ways:

- Avoids a map lookup.
- Decrease data pased through the IPC.

Test: adb shell am get-current-user
Fixes: 151322436

Change-Id: I028a54a1918bd2226ed3bd903bbe98c6ef4811b2
parent d2ff4867
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment