Bug 1102324 - Update date ipc/keystore/KeyStore.cpp for api level 21. r=chulee
authorKai-Zhen Li <kli@mozilla.com>
Fri, 21 Nov 2014 01:12:06 +0800
changeset 217355 91cff56c9ed601a697d91742b3706a53fdac0968
parent 217354 f12e35ecbc6cd38e498ce4086c15b38fed96b194
child 217356 464ae45f1f882e3f029a60bbb8eee94d44a5f23e
push id27879
push usercbook@mozilla.com
push dateTue, 25 Nov 2014 11:55:59 +0000
treeherdermozilla-central@acde07cb4e4d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschulee
bugs1102324
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1102324 - Update date ipc/keystore/KeyStore.cpp for api level 21. r=chulee
ipc/keystore/KeyStore.cpp
--- a/ipc/keystore/KeyStore.cpp
+++ b/ipc/keystore/KeyStore.cpp
@@ -64,17 +64,23 @@ public:
   virtual int32_t verify(const String16& name, const uint8_t* data, size_t dataLength, const uint8_t* signature, size_t signatureLength) {return 0;}
   virtual int32_t get_pubkey(const String16& name, uint8_t** pubkey, size_t* pubkeyLength) {return 0;}
   virtual int32_t del_key(const String16& name, int uid) {return 0;}
   virtual int32_t grant(const String16& name, int32_t granteeUid) {return 0;}
   virtual int32_t ungrant(const String16& name, int32_t granteeUid) {return 0;}
   virtual int64_t getmtime(const String16& name) {return 0;}
   virtual int32_t duplicate(const String16& srcKey, int32_t srcUid, const String16& destKey, int32_t destUid) {return 0;}
   virtual int32_t clear_uid(int64_t uid) {return 0;}
-#if ANDROID_VERSION == 18
+#if ANDROID_VERSION >= 21
+  virtual int32_t generate(const String16& name, int32_t uid, int32_t keyType, int32_t keySize, int32_t flags, Vector<sp<KeystoreArg> >* args) {return 0;}
+  virtual int32_t is_hardware_backed(const String16& keyType) {return 0;}
+  virtual int32_t reset_uid(int32_t uid) {return 0;}
+  virtual int32_t sync_uid(int32_t sourceUid, int32_t targetUid) {return 0;}
+  virtual int32_t password_uid(const String16& password, int32_t uid) {return 0;}
+#elif ANDROID_VERSION == 18
   virtual int32_t generate(const String16& name, int uid, int32_t flags) {return 0;}
   virtual int32_t is_hardware_backed() {return 0;}
 #else
   virtual int32_t generate(const String16& name, int32_t uid, int32_t keyType, int32_t keySize, int32_t flags, Vector<sp<KeystoreArg> >* args) {return 0;}
   virtual int32_t is_hardware_backed(const String16& keyType) {return 0;}
 #endif
 };
 
@@ -151,17 +157,23 @@ public:
   int32_t verify(const String16& name, const uint8_t* data, size_t dataLength, const uint8_t* signature, size_t signatureLength) {return ::UNDEFINED_ACTION;}
   int32_t get_pubkey(const String16& name, uint8_t** pubkey, size_t* pubkeyLength) {return ::UNDEFINED_ACTION;}
   int32_t del_key(const String16& name, int uid) {return ::UNDEFINED_ACTION;}
   int32_t grant(const String16& name, int32_t granteeUid) {return ::UNDEFINED_ACTION;}
   int32_t ungrant(const String16& name, int32_t granteeUid) {return ::UNDEFINED_ACTION;}
   int64_t getmtime(const String16& name) {return ::UNDEFINED_ACTION;}
   int32_t duplicate(const String16& srcKey, int32_t srcUid, const String16& destKey, int32_t destUid) {return ::UNDEFINED_ACTION;}
   int32_t clear_uid(int64_t uid) {return ::UNDEFINED_ACTION;}
-#if ANDROID_VERSION == 18
+#if ANDROID_VERSION >= 21
+  virtual int32_t generate(const String16& name, int32_t uid, int32_t keyType, int32_t keySize, int32_t flags, Vector<sp<KeystoreArg> >* args) {return ::UNDEFINED_ACTION;}
+  virtual int32_t is_hardware_backed(const String16& keyType) {return ::UNDEFINED_ACTION;}
+  virtual int32_t reset_uid(int32_t uid) {return ::UNDEFINED_ACTION;;}
+  virtual int32_t sync_uid(int32_t sourceUid, int32_t targetUid) {return ::UNDEFINED_ACTION;}
+  virtual int32_t password_uid(const String16& password, int32_t uid) {return ::UNDEFINED_ACTION;}
+#elif ANDROID_VERSION == 18
   virtual int32_t generate(const String16& name, int uid, int32_t flags) {return ::UNDEFINED_ACTION;}
   virtual int32_t is_hardware_backed() {return ::UNDEFINED_ACTION;}
 #else
   virtual int32_t generate(const String16& name, int32_t uid, int32_t keyType, int32_t keySize, int32_t flags, Vector<sp<KeystoreArg> >* args) {return ::UNDEFINED_ACTION;}
   virtual int32_t is_hardware_backed(const String16& keyType) {return ::UNDEFINED_ACTION;}
 #endif
 };