Replace fields with getters in keepalive API

General guidance is to have getters in the API instead of fields.

Fixes: 181014882
Test: m
Change-Id: Id4bfc447701e8d0380163047779fbba043f17b6f
4 files changed