Migrated AppPrefs to unified api

- Changed return type of overridden method from int to nint
- Change parameter of overridden method from int to nint
- Cast nint to int that was being cast to an enum