Merge "Removing unused function reset()"

am: 5a053ab455

Change-Id: Ib421e5832dcce144913c0afe3e0eae58f2bfcc28
This commit is contained in:
Max Bires 2019-11-19 17:51:41 -08:00 committed by android-build-merger
commit c8c38ccaa4
4 changed files with 0 additions and 32 deletions

View file

@ -41,8 +41,6 @@ interface IKeystoreService {
int exist(String name, int uid);
@UnsupportedAppUsage
String[] list(String namePrefix, int uid);
@UnsupportedAppUsage
int reset();
int onUserPasswordChanged(int userId, String newPassword);
int lock(int userId);
int unlock(int userId, String userPassword);

View file

@ -339,18 +339,6 @@ Status KeyStoreService::listUidsOfAuthBoundKeys(std::vector<std::string>* uidsOu
return Status::ok();
}
Status KeyStoreService::reset(int32_t* aidl_return) {
if (!checkBinderPermission(P_RESET)) {
*aidl_return = static_cast<int32_t>(ResponseCode::PERMISSION_DENIED);
return Status::ok();
}
uid_t callingUid = IPCThreadState::self()->getCallingUid();
mKeyStore->resetUser(get_user_id(callingUid), false);
*aidl_return = static_cast<int32_t>(ResponseCode::NO_ERROR);
return Status::ok();
}
Status KeyStoreService::onUserPasswordChanged(int32_t userId, const String16& password,
int32_t* aidl_return) {
if (!checkBinderPermission(P_PASSWORD)) {

View file

@ -66,7 +66,6 @@ class KeyStoreService : public android::security::keystore::BnKeystoreService {
::android::binder::Status listUidsOfAuthBoundKeys(std::vector<::std::string>* uids,
int32_t* _aidl_return) override;
::android::binder::Status reset(int32_t* _aidl_return) override;
::android::binder::Status onUserPasswordChanged(int32_t userId,
const ::android::String16& newPassword,
int32_t* _aidl_return) override;

View file

@ -47,21 +47,6 @@ static const char* responses[] = {
/* [WRONG_PASSWORD + 3] = */ "Wrong password (4 tries left)",
};
#define NO_ARG_INT_RETURN(cmd) \
do { \
if (strcmp(argv[1], #cmd) == 0) { \
int32_t ret = -1; \
service->cmd(&ret); \
if (ret < 0) { \
fprintf(stderr, "%s: could not connect: %d\n", argv[0], ret); \
return 1; \
} else { \
printf(#cmd ": %s (%d)\n", responses[ret], ret); \
return 0; \
} \
} \
} while (0)
#define SINGLE_ARG_INT_RETURN(cmd) \
do { \
if (strcmp(argv[1], #cmd) == 0) { \
@ -242,8 +227,6 @@ int main(int argc, char* argv[])
argc < 4 ? -1 : atoi(argv[3]));
}
NO_ARG_INT_RETURN(reset);
// TODO: notifyUserPasswordChanged
SINGLE_INT_ARG_INT_RETURN(lock);