PackageManager: Fix logic around upgrading text display

* This code has all threads writing into the integer keeping track of
  the number of packages at once.
* Make this integer an atomic one, preventing all threads from racing
  when updating it.

Change-Id: I727306f8ab20edb7ec2a955ca20e6de0146c7737
(cherry picked from commit 5c8a770e44be6aaf867fb64e1400f0edbb6b7678)
SystemUI: Expose heads up.

Signed-off-by: Roman Birg <roman@cyngn.com>
Signed-off-by: Adnan Begovic <adnan@cyngn.com>
Change-Id: I276cb1c80d392b7dbac28e5f553207415b558481
(cherry picked from commit 6c65b35e061409b15ccccacf86d58dadbf655e26)

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java