vold: add getUnlockedUsers() method to Binder interface

This is needed so that system_server can remind itself about which users
have their storage unlocked, if system_server is restarted due to a
userspace reboot (soft restart).

Bug: 146206679
Test: see I482ed8017f7bbc8f7d4fd5a2c0f58629317ce4ed
Change-Id: I02f0494d827094bd41bcfe5f63c24e204b728595
(cherry picked from commit 1799debfd6561ca7348880bb59ad8c059f4891b0)
diff --git a/VoldNativeService.cpp b/VoldNativeService.cpp
index 938e7db..5ea72bb 100644
--- a/VoldNativeService.cpp
+++ b/VoldNativeService.cpp
@@ -764,6 +764,14 @@
     return translateBool(fscrypt_fixate_newest_user_key_auth(userId));
 }
 
+binder::Status VoldNativeService::getUnlockedUsers(std::vector<int>* _aidl_return) {
+    ENFORCE_SYSTEM_OR_ROOT;
+    ACQUIRE_CRYPT_LOCK;
+
+    *_aidl_return = fscrypt_get_unlocked_users();
+    return Ok();
+}
+
 binder::Status VoldNativeService::unlockUserKey(int32_t userId, int32_t userSerial,
                                                 const std::string& token,
                                                 const std::string& secret) {