bpf: change how we detect device bpf support level

Now that we're developing Android R and we know upgrades
will only be supported from Android P & Q, we no longer
need to check for Android pre-P (ie. O) - so we can remove
that check.

We also take the opportunity to slightly refactor the code
to make it more readable.

Note: it's not appropriate to backport this into any 'normal'
Q branch, since it *will* break 4.9-O devices upgrading to Q
userspace without upgrading the kernel to at least 4.9-P.

Test: builds, atest
Bug: 139501958
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Iacb3c2db489061b3f278d8e971e44dd1a5c4c1e6
1 file changed
tree: fccc3dd4973969c5c3367d87822909981d517c85
  1. bpfloader/
  2. libbpf_android/
  3. progs/
  4. Android.bp
  5. MODULE_LICENSE_APACHE2
  6. NOTICE
  7. OWNERS
  8. PREUPLOAD.cfg