libnativebridge: Clean-ups

1. Add g_ prefix to global variables as recommended by
go/androidcstyleguide

Some of these names (e.g. state) are also used as local variables
occasionally, so g_ helps avoid confusion.

2. Simplify InitializeNativeBridge. We don't need to check for
Preinitialized state twice since the state cannot change in between.

Flag: EXEMPT NDK
Bug: 349529217
Test: tree-hugger
Change-Id: Ia649b4220906fee200bfd541c2dba8fb7d52fb5d
1 file changed