mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Change WeaverConfig data types to int
also prefix return error codes Bug: 179432365 Change-Id: I435fb261b1162e9b2f56c434f2defccc1505c842
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -37,6 +38,6 @@ interface IWeaver {
|
||||
android.hardware.weaver.WeaverReadResponse read(in int slotId, in byte[] key);
|
||||
void write(in int slotId, in byte[] key, in byte[] value);
|
||||
const int STATUS_FAILED = 1;
|
||||
const int INCORRECT_KEY = 2;
|
||||
const int THROTTLE = 3;
|
||||
const int STATUS_INCORRECT_KEY = 2;
|
||||
const int STATUS_THROTTLE = 3;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -33,7 +34,7 @@
|
||||
package android.hardware.weaver;
|
||||
@VintfStability
|
||||
parcelable WeaverConfig {
|
||||
long slots;
|
||||
long keySize;
|
||||
long valueSize;
|
||||
int slots;
|
||||
int keySize;
|
||||
int valueSize;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*////////////////////////////////////////////////////////////////////////////////
|
||||
*/
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -46,8 +46,8 @@ interface IWeaver {
|
||||
* Read binder calls may return a ServiceSpecificException with the following error codes.
|
||||
*/
|
||||
const int STATUS_FAILED = 1;
|
||||
const int INCORRECT_KEY = 2;
|
||||
const int THROTTLE = 3;
|
||||
const int STATUS_INCORRECT_KEY = 2;
|
||||
const int STATUS_THROTTLE = 3;
|
||||
|
||||
/**
|
||||
* Attempts to retrieve the value stored in the identified slot.
|
||||
|
||||
@@ -21,14 +21,14 @@ parcelable WeaverConfig {
|
||||
/**
|
||||
* The number of slots available.
|
||||
*/
|
||||
long slots;
|
||||
int slots;
|
||||
/**
|
||||
* The number of bytes used for a key.
|
||||
*/
|
||||
long keySize;
|
||||
int keySize;
|
||||
/**
|
||||
* The number of bytes used for a value.
|
||||
*/
|
||||
long valueSize;
|
||||
int valueSize;
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ TEST_P(WeaverAidlTest, WriteFollowedByReadWithWrongKeyDoesNotGiveTheValue) {
|
||||
|
||||
ASSERT_FALSE(readRet.isOk());
|
||||
ASSERT_EQ(EX_SERVICE_SPECIFIC, readRet.getExceptionCode());
|
||||
ASSERT_EQ(IWeaver::INCORRECT_KEY, readRet.getServiceSpecificError());
|
||||
ASSERT_EQ(IWeaver::STATUS_INCORRECT_KEY, readRet.getServiceSpecificError());
|
||||
EXPECT_TRUE(readValue.empty());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user