Make incoming and ongoing call notification foreground and highest priority.

Use startForeground()/stopForeground() for posting notification instead of NotificationManager.notify()/cancel(). It makes incoming and ongoing notification foreground and not able to snooze. It also colorize ongoing call notification for Android O, since we already setColorized().

Use setPriority(Notification.PRIORITY_MAX) for pre-O, and NotificationManager.IMPORTANCE_MAX for O. It makes incoming and ongoing notification stay on the top.

Test: StatusBarNotifierTest*2
PiperOrigin-RevId: 170924163
Change-Id: Iab1415b0161a4623a1ccf52d3948f32b6f93eeb2
4 files changed
tree: f02220a25fa0c7171d6f9648f1856750982f3e7d
  1. assets/
  2. java/
  3. Android.mk
  4. AndroidManifest.xml
  5. CONTRIBUTING
  6. LICENSE