From d2f561d183f6f2aab19cd8552d83b32cbc7fa5be Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Wed, 9 Nov 2011 18:02:20 -0800 Subject: Fix setTimeZone() and use it properly in RSTest/rstime. BUG=5470134 The original implementation for rsi_ScriptSetTimeZone() never actually did anything with the bytes received. This change allows it to safely update the timezone. RSTest is also updated to call setTimeZone(), so that users in different timezones can accurately get test results. Change-Id: I6cb1b3a0c3a417749ba39e0fe09cc9c7ab65c2e7 --- libs/rs/rsScript.cpp | 19 +++++++++++++++++-- libs/rs/rsScript.h | 1 - .../tests/src/com/android/rs/test/UT_rstime.java | 1 + .../tests/src/com/android/rs/test/rstime.rs | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/libs/rs/rsScript.cpp b/libs/rs/rsScript.cpp index 93513fe..16446dd 100644 --- a/libs/rs/rsScript.cpp +++ b/libs/rs/rsScript.cpp @@ -15,6 +15,7 @@ */ #include "rsContext.h" +#include using namespace android; using namespace android::renderscript; @@ -89,8 +90,22 @@ void rsi_ScriptBindAllocation(Context * rsc, RsScript vs, RsAllocation va, uint3 } void rsi_ScriptSetTimeZone(Context * rsc, RsScript vs, const char * timeZone, size_t length) { - Script *s = static_cast