Add ResourceId validation helper method

An invalid, 'null' resource ID is defined as 0. Apps often use -1.

Add a helper method that makes checking valid IDs easy and more
centralized.

Eventually make it public API.

Bug: 38393777
Test: manual
Change-Id: I969ec4a45e86bdab3d7f57d357d475b77c7f8a78
5 files changed