Refactor Handle Menu Code for Clarity

This is a continuation of ag/24621270 addressing a comment on a needed refactor (https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/24621270/comment/80d21f02_4e55bb59/) that was posted after merging.

Test: Manual
Bug: 296629876
Change-Id: I002d75b4070e9028122957c0e79254e658f0d4e3
1 file changed