Merge "Re-enable testReadFromParcelWithInvalidSampleSize" into nyc-dev
diff --git a/CtsTestCaseList.mk b/CtsTestCaseList.mk
index 92499aa..4b973e7 100644
--- a/CtsTestCaseList.mk
+++ b/CtsTestCaseList.mk
@@ -88,6 +88,7 @@
CtsCertInstallerApp \
CtsContactDirectoryProvider \
CtsAdminApp \
+ CtsCppToolsApp \
CtsWifiConfigCreator \
CtsDeviceAdminApp23 \
CtsDeviceAdminApp24 \
@@ -95,6 +96,7 @@
CtsDeviceInfo \
CtsDeviceOsTestApp \
CtsDeviceOwnerApp \
+ CtsProfileOwnerApp \
CtsDeviceServicesTestApp \
CtsDeviceTaskSwitchingAppA \
CtsDeviceTaskSwitchingAppB \
@@ -116,13 +118,14 @@
CtsSomeAccessibilityServices \
CtsSystemUiDeviceApp \
CtsThemeDeviceApp \
- TestDeviceSetup \
CtsUiAutomatorTestApp \
CtsUsbSerialTestApp \
CtsVoiceInteractionService \
CtsVoiceInteractionApp \
CtsVoiceSettingsService \
+ CtsVpnFirewallApp \
CtsWidgetProviderApp \
+ TestDeviceSetup \
$(cts_account_support_packages) \
$(cts_security_apps_list) \
$(cts_security_keysets_list)
@@ -140,7 +143,6 @@
# Test packages that require an associated test package XML.
cts_test_packages := \
CtsIcuTestCases \
- CtsAbiOverrideTestCases \
CtsAccelerationTestCases \
CtsAccountManagerTestCases \
CtsAccessibilityServiceTestCases \
@@ -246,9 +248,11 @@
# Host side only tests
cts_host_libraries := \
CtsAadbHostTestCases \
+ CtsAbiOverrideHostTestCases \
CtsAppSecurityHostTestCases \
CtsAppUsageHostTestCases \
CtsAtraceHostTestCases \
+ CtsCppToolsTestCases \
CtsDevicePolicyManagerTestCases \
CtsDumpsysHostTestCases \
CtsJankHostTestCases \
diff --git a/apps/CameraITS/CameraITS.pdf b/apps/CameraITS/CameraITS.pdf
index 8953af9..01ecf54 100644
--- a/apps/CameraITS/CameraITS.pdf
+++ b/apps/CameraITS/CameraITS.pdf
Binary files differ
diff --git a/apps/CameraITS/pymodules/its/caps.py b/apps/CameraITS/pymodules/its/caps.py
index 95f19d9..dd35ca2 100644
--- a/apps/CameraITS/pymodules/its/caps.py
+++ b/apps/CameraITS/pymodules/its/caps.py
@@ -36,6 +36,17 @@
print "Test skipped"
sys.exit(SKIP_RET_CODE)
+def level3(props):
+ """Returns whether a device is a LEVEL3 capability camera2 device.
+
+ Args:
+ props: Camera properties object.
+
+ Returns:
+ Boolean.
+ """
+ return props.has_key("android.info.supportedHardwareLevel") and \
+ props["android.info.supportedHardwareLevel"] == 3
def full(props):
"""Returns whether a device is a FULL capability camera2 device.
@@ -73,6 +84,19 @@
return props.has_key("android.info.supportedHardwareLevel") and \
props["android.info.supportedHardwareLevel"] == 2
+def radial_distortion_correction(props):
+ """Returns whether a device supports RADIAL_DISTORTION_CORRECTION
+ capabilities.
+
+ Args:
+ props: Camera properties object.
+
+ Returns:
+ Boolean.
+ """
+ return props.has_key("android.lens.radialDistortion") and \
+ props["android.lens.radialDistortion"] is not None
+
def manual_sensor(props):
"""Returns whether a device supports MANUAL_SENSOR capabilities.
@@ -144,6 +168,29 @@
"""
return len(its.objects.get_available_output_sizes("raw12", props)) > 0
+def raw_output(props):
+ """Returns whether a device supports any of RAW output format.
+
+ Args:
+ props: Camera properties object.
+
+ Returns:
+ Boolean.
+ """
+ return raw16(props) or raw10(props) or raw12(props)
+
+def post_raw_sensitivity_boost(props):
+ """Returns whether a device supports post RAW sensitivity boost..
+
+ Args:
+ props: Camera properties object.
+
+ Returns:
+ Boolean.
+ """
+ return props.has_key("android.control.postRawSensitivityBoostRange") and \
+ props["android.control.postRawSensitivityBoostRange"] != [100, 100]
+
def sensor_fusion(props):
"""Returns whether the camera and motion sensor timestamps for the device
are in the same time domain and can be compared directly.
diff --git a/apps/CameraITS/pymodules/its/device.py b/apps/CameraITS/pymodules/its/device.py
index 835a4a4..008f095 100644
--- a/apps/CameraITS/pymodules/its/device.py
+++ b/apps/CameraITS/pymodules/its/device.py
@@ -595,8 +595,20 @@
formats = ['yuv']
ncap = len(cmd["captureRequests"])
nsurf = 1 if out_surfaces is None else len(cmd["outputSurfaces"])
+ # Only allow yuv output to multiple targets
+ yuv_surfaces = [s for s in cmd["outputSurfaces"] if s["format"]=="yuv"]
+ n_yuv = len(yuv_surfaces)
+ # Compute the buffer size of YUV targets
+ yuv_sizes = [c["width"]*c["height"]*3/2 for c in yuv_surfaces]
+ # Currently we don't pass enough metadta from ItsService to distinguish
+ # different yuv stream of same buffer size
+ if len(yuv_sizes) != len(set(yuv_sizes)):
+ raise its.error.Error(
+ 'ITS does not support yuv outputs of same buffer size')
if len(formats) > len(set(formats)):
- raise its.error.Error('Duplicate format requested')
+ if n_yuv != len(formats) - len(set(formats)) + 1:
+ raise its.error.Error('Duplicate format requested')
+
raw_formats = 0;
raw_formats += 1 if "dng" in formats else 0
raw_formats += 1 if "raw" in formats else 0
@@ -627,19 +639,24 @@
# the burst, however individual images of different formats can come
# out in any order for that capture.
nbufs = 0
- bufs = {"yuv":[], "raw":[], "raw10":[], "raw12":[],
+ bufs = {"raw":[], "raw10":[], "raw12":[],
"rawStats":[], "dng":[], "jpeg":[]}
+ yuv_bufs = {size:[] for size in yuv_sizes}
mds = []
widths = None
heights = None
while nbufs < ncap*nsurf or len(mds) < ncap:
jsonObj,buf = self.__read_response_from_socket()
- if jsonObj['tag'] in ['jpegImage', 'yuvImage', 'rawImage', \
+ if jsonObj['tag'] in ['jpegImage', 'rawImage', \
'raw10Image', 'raw12Image', 'rawStatsImage', 'dngImage'] \
and buf is not None:
fmt = jsonObj['tag'][:-5]
bufs[fmt].append(buf)
nbufs += 1
+ elif jsonObj['tag'] == 'yuvImage':
+ buf_size = numpy.product(buf.shape)
+ yuv_bufs[buf_size].append(buf)
+ nbufs += 1
elif jsonObj['tag'] == 'captureResults':
mds.append(jsonObj['objValue']['captureResult'])
outputs = jsonObj['objValue']['outputs']
@@ -653,11 +670,15 @@
objs = []
for i in range(ncap):
obj = {}
- obj["data"] = bufs[fmt][i]
obj["width"] = widths[j]
obj["height"] = heights[j]
obj["format"] = fmt
obj["metadata"] = mds[i]
+ if fmt == 'yuv':
+ buf_size = widths[j] * heights[j] * 3 / 2
+ obj["data"] = yuv_bufs[buf_size][i]
+ else:
+ obj["data"] = bufs[fmt][i]
objs.append(obj)
rets.append(objs if ncap>1 else objs[0])
self.sock.settimeout(self.SOCK_TIMEOUT)
diff --git a/apps/CameraITS/tests/scene1/test_post_raw_sensitivity_boost.py b/apps/CameraITS/tests/scene1/test_post_raw_sensitivity_boost.py
new file mode 100644
index 0000000..b0689c1
--- /dev/null
+++ b/apps/CameraITS/tests/scene1/test_post_raw_sensitivity_boost.py
@@ -0,0 +1,135 @@
+# Copyright 2016 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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.
+
+import its.device
+import its.caps
+import its.objects
+import its.image
+import os.path
+import pylab
+import matplotlib
+import matplotlib.pyplot
+
+def main():
+ """Capture a set of raw/yuv images with different
+ sensitivity/post Raw sensitivity boost combination
+ and check if the output pixel mean matches request settings
+ """
+ NAME = os.path.basename(__file__).split(".")[0]
+
+ # Each raw image
+ RATIO_THRESHOLD = 0.03
+
+ with its.device.ItsSession() as cam:
+ props = cam.get_camera_properties()
+ its.caps.skip_unless(its.caps.raw_output(props) and
+ its.caps.post_raw_sensitivity_boost(props) and
+ its.caps.compute_target_exposure(props) and
+ its.caps.per_frame_control(props))
+
+ w,h = its.objects.get_available_output_sizes(
+ "yuv", props, (1920, 1080))[0]
+
+ if its.caps.raw16(props):
+ raw_format = 'raw'
+ elif its.caps.raw10(props):
+ raw_format = 'raw10'
+ elif its.caps.raw12(props):
+ raw_format = 'raw12'
+ else # should not reach here
+ raise its.error.Error('Cannot find available RAW output format')
+
+ out_surfaces = [{"format": raw_format},
+ {"format": "yuv", "width": w, "height": h}]
+
+ sens_min, sens_max = props['android.sensor.info.sensitivityRange']
+ sens_boost_min, sens_boost_max =
+ props['android.control.postRawSensitivityBoostRange']
+
+ e_targer, s_target =
+ its.target.get_target_exposure_combos(cam)["midSensitivity"]
+
+ reqs = []
+ settings = []
+ s_boost = sens_boost_min
+ while s_boost <= sens_boost_min:
+ s_raw = int(round(s_target * 100.0 / s_boost))
+ if s_raw < sens_min or s_raw > sens_max:
+ continue
+ req = its.objects.manual_capture_request(s_raw, e_target)
+ req['android.control.postRawSensitivityBoost'] = s_boost
+ reqs.append(req)
+ settings.append((s_raw, s_boost))
+ s_boost *= 2
+
+ caps = cam.do_capture(reqs, out_surfaces)
+
+ raw_rgb_means = []
+ yuv_rgb_means = []
+ for i,cap in enumerate(caps):
+ (s, s_boost) = settings[i]
+ raw_cap, yuv_cap = cap
+ raw_rgb = its.image.convert_capture_to_rgb_image(raw_cap, props=props)
+ yuv_rgb = its.image.convert_capture_to_rgb_image(yuv_cap)
+ raw_tile = its.image.get_image_patch(raw_rgb, 0.45,0.45,0.1,0.1)
+ yuv_tile = its.image.get_image_patch(yuv_rgb, 0.45,0.45,0.1,0.1)
+ raw_rgb_means.append(its.image.compute_image_means(raw_tile))
+ yuv_rgb_means.append(its.image.compute_image_means(yuv_tile))
+ its.image.write_image(raw_tile,
+ "%s_raw_s=%04d_boost=%04d.jpg" % (NAME,s,s_boost))
+ its.image.write_image(yuv_tile,
+ "%s_yuv_s=%04d_boost=%04d.jpg" % (NAME,s,s_boost))
+ print "s=%d, s_boost=%d: raw_means %s, yuv_means %d"%(
+ s,s_boost,raw_rgb_means[-1], yuv_rgb_means[-1])
+
+ xs = range(len(reqs))
+ pylab.plot(xs, [rgb[0] for rgb in raw_rgb_means], 'r')
+ pylab.plot(xs, [rgb[1] for rgb in raw_rgb_means], 'g')
+ pylab.plot(xs, [rgb[2] for rgb in raw_rgb_means], 'b')
+ pylab.ylim([0,1])
+ matplotlib.pyplot.savefig("%s_raw_plot_means.png" % (NAME))
+ pylab.clf()
+ pylab.plot(xs, [rgb[0] for rgb in yuv_rgb_means], 'r')
+ pylab.plot(xs, [rgb[1] for rgb in yuv_rgb_means], 'g')
+ pylab.plot(xs, [rgb[2] for rgb in yuv_rgb_means], 'b')
+ pylab.ylim([0,1])
+ matplotlib.pyplot.savefig("%s_yuv_plot_means.png" % (NAME))
+
+ rgb_str = ["R", "G", "B"]
+ # Test that raw means is about 2x brighter than next step
+ raw_thres_min = 2 * (1 - RATIO_THRESHOLD)
+ raw_thres_max = 2 * (1 + RATIO_THRESHOLD)
+ for step in range(1, len(reqs)):
+ for rgb in range(3):
+ ratio = raw_rgb_means[step - 1][rgb] / raw_rgb_means[step][rgb]
+ print "Step (%d,%d) %s channel: %f, %f, ratio %f" % (
+ step-1, step, rgb_str[rgb],
+ raw_rgb_means[step - 1][rgb],
+ raw_rgb_means[step][rgb],
+ ratio)
+ assert(raw_thres_min < ratio < raw_thres_max)
+
+ # Test that each yuv step is about the same bright as their mean
+ yuv_thres_min = 1 - RATIO_THRESHOLD
+ yuv_thres_max = 1 + RATIO_THRESHOLD
+ for rgb in range(3):
+ vals = [val[rgb] for val in yuv_rgb_means]
+ mean = sum(vals) / len(vales)
+ print "%s channel vals %s mean %f"%(rgb_str[rgb], vals, mean)
+ for step in range(len(reqs)):
+ ratio = vals[step] / mean
+ assert(yuv_thres_min < ratio < yuv_thres_max)
+
+if __name__ == '__main__':
+ main()
diff --git a/apps/CameraITS/tests/scene4/SampleTarget.pdf b/apps/CameraITS/tests/scene4/SampleTarget.pdf
new file mode 100644
index 0000000..e693b34
--- /dev/null
+++ b/apps/CameraITS/tests/scene4/SampleTarget.pdf
Binary files differ
diff --git a/apps/CameraITS/tests/scene4/test_aspect_ratio_and_crop.py b/apps/CameraITS/tests/scene4/test_aspect_ratio_and_crop.py
new file mode 100644
index 0000000..7733c5d
--- /dev/null
+++ b/apps/CameraITS/tests/scene4/test_aspect_ratio_and_crop.py
@@ -0,0 +1,408 @@
+# Copyright 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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.
+
+import its.image
+import its.caps
+import its.device
+import its.objects
+import os.path
+import cv2
+import numpy as np
+
+
+def main():
+ """ Test aspect ratio and check if images are cropped correctly under each
+ output size
+ Aspect ratio test runs on level3, full and limited devices. Crop test only
+ runs on full and level3 devices.
+ The test image is a black circle inside a black square. When raw capture is
+ available, set the height vs. width ratio of the circle in the full-frame
+ raw as ground truth. Then compare with images of request combinations of
+ different formats ("jpeg" and "yuv") and sizes.
+ If raw capture is unavailable, take a picture of the test image right in
+ front to eliminate shooting angle effect. the height vs. width ratio for
+ the circle should be close to 1. Considering shooting position error, aspect
+ ratio greater than 1.05 or smaller than 0.95 will fail the test.
+ """
+ NAME = os.path.basename(__file__).split(".")[0]
+ LARGE_SIZE = 2000 # Define the size of a large image
+ # pass/fail threshold of large size images for aspect ratio test
+ THRES_L_AR_TEST = 0.02
+ # pass/fail threshold of mini size images for aspect ratio test
+ THRES_XS_AR_TEST = 0.05
+ # pass/fail threshold of large size images for crop test
+ THRES_L_CP_TEST = 0.02
+ # pass/fail threshold of mini size images for crop test
+ THRES_XS_CP_TEST = 0.05
+ PREVIEW_SIZE = (1920, 1080) # preview size
+ aspect_ratio_gt = 1 # ground truth
+ failed_ar = [] # streams failed the aspect ration test
+ failed_crop = [] # streams failed the crop test
+ format_list = [] # format list for multiple capture objects.
+ # Do multi-capture of "iter" and "cmpr". Iterate through all the
+ # available sizes of "iter", and only use the size specified for "cmpr"
+ # Do single-capture to cover untouched sizes in multi-capture when needed.
+ format_list.append({"iter": "yuv", "iter_max": None,
+ "cmpr": "yuv", "cmpr_size": PREVIEW_SIZE})
+ format_list.append({"iter": "yuv", "iter_max": PREVIEW_SIZE,
+ "cmpr": "jpeg", "cmpr_size": None})
+ format_list.append({"iter": "yuv", "iter_max": PREVIEW_SIZE,
+ "cmpr": "raw", "cmpr_size": None})
+ format_list.append({"iter": "jpeg", "iter_max": None,
+ "cmpr": "raw", "cmpr_size": None})
+ format_list.append({"iter": "jpeg", "iter_max": None,
+ "cmpr": "yuv", "cmpr_size": PREVIEW_SIZE})
+ with its.device.ItsSession() as cam:
+ props = cam.get_camera_properties()
+ # Todo: test for radial distortion enabled devices has not yet been
+ # implemented
+ its.caps.skip_unless(not its.caps.radial_distortion_correction(props))
+ full_device = its.caps.full(props)
+ limited_device = its.caps.limited(props)
+ its.caps.skip_unless(full_device or limited_device)
+ level3_device = its.caps.level3(props)
+ raw_avlb = its.caps.raw16(props)
+ run_crop_test = (level3_device or full_device) and raw_avlb
+ if not run_crop_test:
+ print "Crop test skipped"
+ # Converge 3A and get the estimates.
+ sens, exp, gains, xform, focus = cam.do_3a(get_results=True,
+ lock_ae=True, lock_awb=True)
+ print "AE sensitivity %d, exposure %dms" % (sens, exp / 1000000.0)
+ print "AWB gains", gains
+ print "AWB transform", xform
+ print "AF distance", focus
+ req = its.objects.manual_capture_request(
+ sens, exp, True, props)
+ xform_rat = its.objects.float_to_rational(xform)
+ req["android.colorCorrection.gains"] = gains
+ req["android.colorCorrection.transform"] = xform_rat
+
+ # If raw capture is available, use it as ground truth.
+ if raw_avlb:
+ # Capture full-frame raw. Use its aspect ratio and circle center
+ # location as ground truth for the other jepg or yuv images.
+ out_surface = {"format": "raw"}
+ cap_raw = cam.do_capture(req, out_surface)
+ print "Captured %s %dx%d" % ("raw", cap_raw["width"],
+ cap_raw["height"])
+ img_raw = its.image.convert_capture_to_rgb_image(cap_raw,
+ props=props)
+ size_raw = img_raw.shape
+ img_name = "%s_%s_w%d_h%d.png" \
+ % (NAME, "raw", size_raw[1], size_raw[0])
+ aspect_ratio_gt, cc_ct_gt, circle_size_raw = measure_aspect_ratio(
+ img_raw, 1, img_name)
+ # Normalize the circle size to 1/4 of the image size, so that
+ # circle size won"t affect the crop test result
+ factor_cp_thres = (min(size_raw[0:1])/4.0) / max(circle_size_raw)
+ thres_l_cp_test = THRES_L_CP_TEST * factor_cp_thres
+ thres_xs_cp_test = THRES_XS_CP_TEST * factor_cp_thres
+
+ # Take pictures of each settings with all the image sizes available.
+ for fmt in format_list:
+ fmt_iter = fmt["iter"]
+ fmt_cmpr = fmt["cmpr"]
+ dual_target = fmt_cmpr is not "none"
+ # Get the size of "cmpr"
+ if dual_target:
+ size_cmpr = its.objects.get_available_output_sizes(
+ fmt_cmpr, props, fmt["cmpr_size"])[0]
+ for size_iter in its.objects.get_available_output_sizes(
+ fmt_iter, props, fmt["iter_max"]):
+ w_iter = size_iter[0]
+ h_iter = size_iter[1]
+ # Skip testing same format/size combination
+ # ITS does not handle that properly now
+ if dual_target and \
+ w_iter == size_cmpr[0] and \
+ h_iter == size_cmpr[1] and \
+ fmt_iter == fmt_cmpr:
+ continue
+ out_surface = [{"width": w_iter,
+ "height": h_iter,
+ "format": fmt_iter}]
+ if dual_target:
+ out_surface.append({"width": size_cmpr[0],
+ "height": size_cmpr[1],
+ "format": fmt_cmpr})
+ cap = cam.do_capture(req, out_surface)
+ if dual_target:
+ frm_iter = cap[0]
+ else:
+ frm_iter = cap
+ assert (frm_iter["format"] == fmt_iter)
+ assert (frm_iter["width"] == w_iter)
+ assert (frm_iter["height"] == h_iter)
+ print "Captured %s with %s %dx%d" \
+ % (fmt_iter, fmt_cmpr, w_iter, h_iter)
+ img = its.image.convert_capture_to_rgb_image(frm_iter)
+ img_name = "%s_%s_with_%s_w%d_h%d.png" \
+ % (NAME, fmt_iter, fmt_cmpr, w_iter, h_iter)
+ aspect_ratio, cc_ct, _ = measure_aspect_ratio(img, raw_avlb,
+ img_name)
+ # check pass/fail for aspect ratio
+ # image size >= LARGE_SIZE: use THRES_L_AR_TEST
+ # image size == 0 (extreme case): THRES_XS_AR_TEST
+ # 0 < image size < LARGE_SIZE: scale between THRES_XS_AR_TEST
+ # and THRES_L_AR_TEST
+ thres_ar_test = max(THRES_L_AR_TEST,
+ THRES_XS_AR_TEST + max(w_iter, h_iter) *
+ (THRES_L_AR_TEST-THRES_XS_AR_TEST)/LARGE_SIZE)
+ thres_range_ar = (aspect_ratio_gt-thres_ar_test,
+ aspect_ratio_gt+thres_ar_test)
+ if aspect_ratio < thres_range_ar[0] \
+ or aspect_ratio > thres_range_ar[1]:
+ failed_ar.append({"fmt_iter": fmt_iter,
+ "fmt_cmpr": fmt_cmpr,
+ "w": w_iter, "h": h_iter,
+ "ar": aspect_ratio,
+ "valid_range": thres_range_ar})
+
+ # check pass/fail for crop
+ if run_crop_test:
+ # image size >= LARGE_SIZE: use thres_l_cp_test
+ # image size == 0 (extreme case): thres_xs_cp_test
+ # 0 < image size < LARGE_SIZE: scale between
+ # thres_xs_cp_test and thres_l_cp_test
+ thres_hori_cp_test = max(thres_l_cp_test,
+ thres_xs_cp_test + w_iter *
+ (thres_l_cp_test-thres_xs_cp_test)/LARGE_SIZE)
+ thres_range_h_cp = (cc_ct_gt["hori"]-thres_hori_cp_test,
+ cc_ct_gt["hori"]+thres_hori_cp_test)
+ thres_vert_cp_test = max(thres_l_cp_test,
+ thres_xs_cp_test + h_iter *
+ (thres_l_cp_test-thres_xs_cp_test)/LARGE_SIZE)
+ thres_range_v_cp = (cc_ct_gt["vert"]-thres_vert_cp_test,
+ cc_ct_gt["vert"]+thres_vert_cp_test)
+ if cc_ct["hori"] < thres_range_h_cp[0] \
+ or cc_ct["hori"] > thres_range_h_cp[1] \
+ or cc_ct["vert"] < thres_range_v_cp[0] \
+ or cc_ct["vert"] > thres_range_v_cp[1]:
+ failed_crop.append({"fmt_iter": fmt_iter,
+ "fmt_cmpr": fmt_cmpr,
+ "w": w_iter, "h": h_iter,
+ "ct_hori": cc_ct["hori"],
+ "ct_vert": cc_ct["vert"],
+ "valid_range_h": thres_range_h_cp,
+ "valid_range_v": thres_range_v_cp})
+
+ # Print aspect ratio test results
+ failed_image_number_for_aspect_ratio_test = len(failed_ar)
+ if failed_image_number_for_aspect_ratio_test > 0:
+ print "\nAspect ratio test summary"
+ print "Images failed in the aspect ratio test:"
+ print "Aspect ratio value: width / height"
+ for fa in failed_ar:
+ print "%s with %s %dx%d: %.3f; valid range: %.3f ~ %.3f" % \
+ (fa["fmt_iter"], fa["fmt_cmpr"], fa["w"], fa["h"], fa["ar"],
+ fa["valid_range"][0], fa["valid_range"][1])
+
+ # Print crop test results
+ failed_image_number_for_crop_test = len(failed_crop)
+ if failed_image_number_for_crop_test > 0:
+ print "\nCrop test summary"
+ print "Images failed in the crop test:"
+ print "Circle center position, (horizontal x vertical), listed " \
+ "below is relative to the image center."
+ for fc in failed_crop:
+ print "%s with %s %dx%d: %.3f x %.3f; " \
+ "valid horizontal range: %.3f ~ %.3f; " \
+ "valid vertical range: %.3f ~ %.3f" \
+ % (fc["fmt_iter"], fc["fmt_cmpr"], fc["w"], fc["h"],
+ fc["ct_hori"], fc["ct_vert"], fc["valid_range_h"][0],
+ fc["valid_range_h"][1], fc["valid_range_v"][0],
+ fc["valid_range_v"][1])
+
+ assert (failed_image_number_for_aspect_ratio_test == 0)
+ if level3_device:
+ assert (failed_image_number_for_crop_test == 0)
+
+
+def measure_aspect_ratio(img, raw_avlb, img_name):
+ """ Measure the aspect ratio of the black circle in the test image.
+
+ Args:
+ img: Numpy float image array in RGB, with pixel values in [0,1].
+ raw_avlb: True: raw capture is available; False: raw capture is not
+ available.
+ img_name: string with image info of format and size.
+ Returns:
+ aspect_ratio: aspect ratio number in float.
+ cc_ct: circle center position relative to the center of image.
+ (circle_w, circle_h): tuple of the circle size
+ """
+ size = img.shape
+ img = img * 255
+ # Gray image
+ img_gray = 0.299 * img[:,:,2] + 0.587 * img[:,:,1] + 0.114 * img[:,:,0]
+
+ # otsu threshold to binarize the image
+ ret3, img_bw = cv2.threshold(np.uint8(img_gray), 0, 255,
+ cv2.THRESH_BINARY + cv2.THRESH_OTSU)
+
+ # connected component
+ contours, hierarchy = cv2.findContours(255-img_bw, cv2.RETR_TREE,
+ cv2.CHAIN_APPROX_SIMPLE)
+
+ # Check each component and find the black circle
+ min_cmpt = size[0] * size[1] * 0.005
+ max_cmpt = size[0] * size[1] * 0.35
+ num_circle = 0
+ aspect_ratio = 0
+ for ct, hrch in zip(contours, hierarchy[0]):
+ # The radius of the circle is 1/3 of the length of the square, meaning
+ # around 1/3 of the area of the square
+ # Parental component should exist and the area is acceptable.
+ # The coutour of a circle should have at least 5 points
+ child_area = cv2.contourArea(ct)
+ if hrch[3] == -1 or child_area < min_cmpt or child_area > max_cmpt or \
+ len(ct) < 15:
+ continue
+ # Check the shapes of current component and its parent
+ child_shape = component_shape(ct)
+ parent = hrch[3]
+ prt_shape = component_shape(contours[parent])
+ prt_area = cv2.contourArea(contours[parent])
+ dist_x = abs(child_shape["ctx"]-prt_shape["ctx"])
+ dist_y = abs(child_shape["cty"]-prt_shape["cty"])
+ # 1. 0.56*Parent"s width < Child"s width < 0.76*Parent"s width.
+ # 2. 0.56*Parent"s height < Child"s height < 0.76*Parent"s height.
+ # 3. Child"s width > 0.1*Image width
+ # 4. Child"s height > 0.1*Image height
+ # 5. 0.25*Parent"s area < Child"s area < 0.45*Parent"s area
+ # 6. Child is a black, and Parent is white
+ # 7. Center of Child and center of parent should overlap
+ if prt_shape["width"] * 0.56 < child_shape["width"] \
+ < prt_shape["width"] * 0.76 \
+ and prt_shape["height"] * 0.56 < child_shape["height"] \
+ < prt_shape["height"] * 0.76 \
+ and child_shape["width"] > 0.1 * size[1] \
+ and child_shape["height"] > 0.1 * size[0] \
+ and 0.30 * prt_area < child_area < 0.50 * prt_area \
+ and img_bw[child_shape["cty"]][child_shape["ctx"]] == 0 \
+ and img_bw[child_shape["top"]][child_shape["left"]] == 255 \
+ and dist_x < 0.1 * child_shape["width"] \
+ and dist_y < 0.1 * child_shape["height"]:
+ # If raw capture is not available, check the camera is placed right
+ # in front of the test page:
+ # 1. Distances between parent and child horizontally on both side,0
+ # dist_left and dist_right, should be close.
+ # 2. Distances between parent and child vertically on both side,
+ # dist_top and dist_bottom, should be close.
+ if not raw_avlb:
+ dist_left = child_shape["left"] - prt_shape["left"]
+ dist_right = prt_shape["right"] - child_shape["right"]
+ dist_top = child_shape["top"] - prt_shape["top"]
+ dist_bottom = prt_shape["bottom"] - child_shape["bottom"]
+ if abs(dist_left-dist_right) > 0.05 * child_shape["width"] or \
+ abs(dist_top-dist_bottom) > \
+ 0.05 * child_shape["height"]:
+ continue
+ # Calculate aspect ratio
+ aspect_ratio = float(child_shape["width"]) / \
+ float(child_shape["height"])
+ circle_ctx = child_shape["ctx"]
+ circle_cty = child_shape["cty"]
+ circle_w = float(child_shape["width"])
+ circle_h = float(child_shape["height"])
+ cc_ct = {"hori": float(child_shape["ctx"]-size[1]/2) / circle_w,
+ "vert": float(child_shape["cty"]-size[0]/2) / circle_h}
+ num_circle += 1
+ # If more than one circle found, break
+ if num_circle == 2:
+ break
+
+ if num_circle == 0:
+ its.image.write_image(img/255, img_name, True)
+ print "No black circle was detected. Please take pictures according " \
+ "to instruction carefully!\n"
+ assert (num_circle == 1)
+
+ if num_circle > 1:
+ its.image.write_image(img/255, img_name, True)
+ print "More than one black circle was detected. Background of scene " \
+ "may be too complex.\n"
+ assert (num_circle == 1)
+
+ # draw circle center and image center, and save the image
+ line_width = max(1, max(size)/500)
+ move_text_dist = line_width * 3
+ cv2.line(img, (circle_ctx, circle_cty), (size[1]/2, size[0]/2),
+ (255, 0, 0), line_width)
+ if circle_cty > size[0]/2:
+ move_text_down_circle = 4
+ move_text_down_image = -1
+ else:
+ move_text_down_circle = -1
+ move_text_down_image = 4
+ if circle_ctx > size[1]/2:
+ move_text_right_circle = 2
+ move_text_right_image = -1
+ else:
+ move_text_right_circle = -1
+ move_text_right_image = 2
+ # circle center
+ text_circle_x = move_text_dist * move_text_right_circle + circle_ctx
+ text_circle_y = move_text_dist * move_text_down_circle + circle_cty
+ cv2.circle(img, (circle_ctx, circle_cty), line_width*2, (255, 0, 0), -1)
+ cv2.putText(img, "circle center", (text_circle_x, text_circle_y),
+ cv2.FONT_HERSHEY_SIMPLEX, line_width/2.0, (255, 0, 0),
+ line_width)
+ # image center
+ text_imgct_x = move_text_dist * move_text_right_image + size[1]/2
+ text_imgct_y = move_text_dist * move_text_down_image + size[0]/2
+ cv2.circle(img, (size[1]/2, size[0]/2), line_width*2, (255, 0, 0), -1)
+ cv2.putText(img, "image center", (text_imgct_x, text_imgct_y),
+ cv2.FONT_HERSHEY_SIMPLEX, line_width/2.0, (255, 0, 0),
+ line_width)
+ its.image.write_image(img/255, img_name, True)
+
+ print "Aspect ratio: %.3f" % aspect_ratio
+ print "Circle center position regarding to image center: %.3fx%.3f" % \
+ (cc_ct["vert"], cc_ct["hori"])
+ return aspect_ratio, cc_ct, (circle_w, circle_h)
+
+
+def component_shape(contour):
+ """ Measure the shape for a connected component in the aspect ratio test
+
+ Args:
+ contour: return from cv2.findContours. A list of pixel coordinates of
+ the contour.
+
+ Returns:
+ The most left, right, top, bottom pixel location, height, width, and
+ the center pixel location of the contour.
+ """
+ shape = {"left": np.inf, "right": 0, "top": np.inf, "bottom": 0,
+ "width": 0, "height": 0, "ctx": 0, "cty": 0}
+ for pt in contour:
+ if pt[0][0] < shape["left"]:
+ shape["left"] = pt[0][0]
+ if pt[0][0] > shape["right"]:
+ shape["right"] = pt[0][0]
+ if pt[0][1] < shape["top"]:
+ shape["top"] = pt[0][1]
+ if pt[0][1] > shape["bottom"]:
+ shape["bottom"] = pt[0][1]
+ shape["width"] = shape["right"] - shape["left"] + 1
+ shape["height"] = shape["bottom"] - shape["top"] + 1
+ shape["ctx"] = (shape["left"]+shape["right"])/2
+ shape["cty"] = (shape["top"]+shape["bottom"])/2
+ return shape
+
+
+if __name__ == "__main__":
+ main()
diff --git a/apps/CameraITS/tools/run_all_tests.py b/apps/CameraITS/tools/run_all_tests.py
index dd12512..ec0aab7 100644
--- a/apps/CameraITS/tools/run_all_tests.py
+++ b/apps/CameraITS/tools/run_all_tests.py
@@ -43,17 +43,21 @@
"test_yuv_plus_jpeg"
],
"scene2":[],
- "scene3":[]
+ "scene3":[],
+ "scene4":[]
}
# Get all the scene0 and scene1 tests, which can be run using the same
# physical setup.
- scenes = ["scene0", "scene1", "scene2", "scene3"]
+ scenes = ["scene0", "scene1", "scene2", "scene3", "scene4"]
scene_req = {
"scene0" : None,
"scene1" : "A grey card covering at least the middle 30% of the scene",
"scene2" : "A picture containing human faces",
- "scene3" : "A chart containing sharp edges like ISO 12233"
+ "scene3" : "A chart containing sharp edges like ISO 12233",
+ "scene4" : "A specific test page of a circle covering at least the "
+ "middle 50% of the scene. See CameraITS.pdf section 2.3.4 "
+ "for more detail"
}
tests = []
for d in scenes:
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index b6a992f..fda6d59 100644
--- a/apps/CtsVerifier/AndroidManifest.xml
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -119,6 +119,8 @@
<category android:name="android.cts.intent.category.MANUAL_TEST" />
</intent-filter>
<meta-data android:name="test_category" android:value="@string/test_category_device_admin" />
+ <meta-data android:name="test_required_features"
+ android:value="android.software.device_admin" />
</activity>
<activity android:name=".admin.RedactedNotificationKeyguardDisabledFeaturesActivity"
@@ -129,6 +131,8 @@
<category android:name="android.cts.intent.category.MANUAL_TEST" />
</intent-filter>
<meta-data android:name="test_category" android:value="@string/test_category_device_admin" />
+ <meta-data android:name="test_required_features"
+ android:value="android.software.device_admin" />
</activity>
<activity android:name=".admin.ScreenLockTestActivity"
@@ -152,6 +156,15 @@
android:value="android.software.backup" />
</activity>
+ <activity android:name=".backup.BackupAccessibilityTestActivity" android:label="@string/backup_accessibility_test">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.cts.intent.category.MANUAL_TEST" />
+ </intent-filter>
+ <meta-data android:name="test_required_features"
+ android:value="android.software.backup" />
+ </activity>
+
<activity android:name=".bluetooth.BluetoothTestActivity"
android:label="@string/bluetooth_test"
android:configChanges="keyboardHidden|orientation|screenSize">
@@ -1647,12 +1660,6 @@
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
- <action android:name="android.intent.action.SEND" />
- <action android:name="android.intent.action.SEND_MULTIPLE" />
- <data android:mimeType="*/*" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- <intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<action android:name="android.intent.action.OPEN_DOCUMENT" />
<data android:mimeType="*/*" />
@@ -1688,12 +1695,6 @@
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
- <category android:name="android.intent.category.BROWSABLE" />
- <category android:name="android.intent.category.DEFAULT" />
- <data android:scheme="http" android:host="com.android.cts.verifier" />
- </intent-filter>
- <intent-filter>
- <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http" />
<data android:mimeType="video/mp4" />
@@ -1715,6 +1716,18 @@
<action android:name="com.android.cts.verifier.managedprovisioning.CROSS_PROFILE_TO_WORK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.BROWSABLE" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:scheme="http" android:host="com.android.cts.verifier" />
+ </intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.SEND" />
+ <action android:name="android.intent.action.SEND_MULTIPLE" />
+ <data android:mimeType="*/*" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
</activity>
<activity android:name=".managedprovisioning.WorkStatusTestActivity">
diff --git a/apps/CtsVerifier/res/layout/bua_main.xml b/apps/CtsVerifier/res/layout/bua_main.xml
new file mode 100644
index 0000000..e2d5ef1
--- /dev/null
+++ b/apps/CtsVerifier/res/layout/bua_main.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ 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.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ >
+
+ <ListView android:id="@+id/android:list"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ />
+
+ <TextView android:id="@id/android:empty"
+ android:gravity="center"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/bu_loading"
+ />
+
+ <Button android:id="@+id/generate_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/bua_read_settings"
+ />
+
+ <Button android:id="@+id/show_instructions_button"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/bua_show_instructions"
+ />
+
+ <include layout="@layout/pass_fail_buttons" />
+
+</LinearLayout>
diff --git a/apps/CtsVerifier/res/values/strings.xml b/apps/CtsVerifier/res/values/strings.xml
index 78d21ee..1d2d8c4d 100644
--- a/apps/CtsVerifier/res/values/strings.xml
+++ b/apps/CtsVerifier/res/values/strings.xml
@@ -52,6 +52,11 @@
<!-- Strings for ReportViewerActivity -->
<string name="report_viewer">Report Viewer</string>
+ <!-- String shared between BackupTestActivity and BackupAccessibilityTestActivity -->
+ <string name="bu_loading">Loading...</string>
+ <string name="bu_generate_error">Error occurred while generating test data...</string>
+ <string name="bu_settings">Settings</string>
+
<!-- Strings for BackupTestActivity -->
<string name="backup_test">Data Backup Test</string>
<string name="backup_info">This test checks that data backup and automatic restore works
@@ -62,11 +67,9 @@
\n\nPress the \"Generate Test Data\" to populate these values
and then follow the on screen instructions to finish the test.
</string>
+ <string name="bu_generate">Generate Test Data</string>
<string name="bu_preferences">Preferences</string>
<string name="bu_files">Files</string>
- <string name="bu_loading">Loading...</string>
- <string name="bu_generate">Generate Test Data</string>
- <string name="bu_generate_error">Error occurred while generating test data...</string>
<string name="bu_instructions">Random values for the preferences and files have been saved.
\n\nFollow the instructions below to check that the data backup and restore works:
\n\n1. Make sure backup and automatic restore are enabled in settings. Depending on the
@@ -79,7 +82,45 @@
\n\n3. Uninstall the program: adb uninstall com.android.cts.verifier
\n\n4. Reinstall the CTS Verifier and verify that the values are still the same.
</string>
- <string name="bu_settings">Settings</string>
+
+ <!-- Strings for BackupAccessibilityTestActivity -->
+ <string name="backup_accessibility_test">Backup Accessibility Settings Test</string>
+ <string name="backup_accessibility_info">This test checks that data backup and automatic restore
+ of Accessibility-related settings works properly. If backup and restore is working properly,
+ these values should be restored after running the backup manager, removing your Google
+ account, changing the accessibility settings values, and re-adding your Google account.
+ \n\nPress \"Generate Test Data\" to generate test values for accessibility settings and then
+ follow the on screen instructions to finish the test.
+ </string>
+ <string name="bua_settings">General Accessibility Settings</string>
+ <string name="bua_settings_color_correction">Color Correction Settings</string>
+ <string name="bua_settings_accessibility_services">Accessibility Service Settings</string>
+ <string name="bua_settings_captions">Captions Settings</string>
+ <string name="bua_settings_tts">TTS Settings</string>
+ <string name="bua_settings_system">Other System Settings</string>
+ <string name="bua_instructions">You will need two devices for this test.
+ \n\nFollow the instructions below to check that the data backup and restore of
+ accessibility-related settings works properly:
+ \n\n1. Make sure backup and automatic restore are enabled in settings. If you cannot find
+ the corresponding setting options on your device, run \"adb shell bmgr enable true\" to
+ enable the backup manager. You can check its status by executing \"adb shell bmgr enabled\".
+ You will also need to set a Google account as the backup account for the device.
+ \n\n2. Press \"Read Current Values\" and note the default values for the listed settings.
+ Values that are either \"0\" or \"null\" will appear in green. Note: Some default values are
+ neither \"0\", nor \"null\", so you still need to pay attention to the default setting
+ values that are not highlighted.
+ \n\n3. Change the values of the listed settings to something other than their default value.
+ \n\n4. Return to the CtsVerifier and press \"Read Current Values\". Make sure that you have
+ changed all of the settings.
+ \n\n5. Run the backup manager: adb shell bmgr run
+ \n\n6. Factory reset data on the second device. While going through the Setup Wizard,
+ restore all data from the account on your first device. When prompted, choose to restore all
+ settings from your first device.
+ \n\n7. Install CtsVerifier on your new device and make sure that the values read on the
+ second device match the values on your first device.
+ </string>
+ <string name="bua_show_instructions">Show Instructions</string>
+ <string name="bua_read_settings">Read Current Values</string>
<!-- Strings for Device Administration tests -->
<string name="da_policy_serialization_test">Policy Serialization Test</string>
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/backup/BackupAccessibilityTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/backup/BackupAccessibilityTestActivity.java
new file mode 100644
index 0000000..157a71c
--- /dev/null
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/backup/BackupAccessibilityTestActivity.java
@@ -0,0 +1,342 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package com.android.cts.verifier.backup;
+
+import com.android.cts.verifier.PassFailButtons;
+import com.android.cts.verifier.R;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.backup.BackupManager;
+import android.app.backup.FileBackupHelper;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.graphics.Color;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.provider.Settings;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+import java.util.Scanner;
+
+/**
+ * Test for checking whether Accessibility Settings are being backed up properly. It lists the
+ * values of the accessibility preferences that should get backed up and restored after running the
+ * backup manager and reinstalling the CTS verifier.
+ */
+public class BackupAccessibilityTestActivity extends PassFailButtons.ListActivity {
+
+ private static final String TAG = BackupAccessibilityTestActivity.class.getSimpleName();
+
+ private static final int INSTRUCTIONS_DIALOG_ID = 1;
+
+ private static final List<String> ACCESSIBILITY_SETTINGS = new ArrayList();
+ private static final List<String> COLOR_CORRECTION_SETTINGS = new ArrayList();
+ private static final List<String> ACCESSIBILITY_SERVICE_SETTINGS = new ArrayList();
+ private static final List<String> CAPTIONS_SETTINGS = new ArrayList();
+ private static final List<String> TTS_SETTINGS = new ArrayList();
+ private static final List<String> SYSTEM_SETTINGS = new ArrayList();
+
+ static {
+ ACCESSIBILITY_SETTINGS.add("accessibility_display_magnification_enabled");
+ ACCESSIBILITY_SETTINGS.add("accessibility_autoclick_enabled");
+ ACCESSIBILITY_SETTINGS.add("accessibility_autoclick_delay");
+ ACCESSIBILITY_SETTINGS.add("high_text_contrast_enabled");
+ ACCESSIBILITY_SETTINGS.add("incall_power_button_behavior");
+ ACCESSIBILITY_SETTINGS.add(Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD);
+ ACCESSIBILITY_SETTINGS.add("accessibility_large_pointer_icon");
+ ACCESSIBILITY_SETTINGS.add("long_press_timeout");
+ ACCESSIBILITY_SETTINGS.add(Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED);
+
+ COLOR_CORRECTION_SETTINGS.add("accessibility_display_daltonizer");
+ COLOR_CORRECTION_SETTINGS.add("accessibility_display_daltonizer_enabled");
+
+ CAPTIONS_SETTINGS.add("accessibility_captioning_preset");
+ CAPTIONS_SETTINGS.add("accessibility_captioning_enabled");
+ CAPTIONS_SETTINGS.add("accessibility_captioning_locale");
+ CAPTIONS_SETTINGS.add("accessibility_captioning_background_color");
+ CAPTIONS_SETTINGS.add("accessibility_captioning_foreground_color");
+ CAPTIONS_SETTINGS.add("accessibility_captioning_edge_type");
+ CAPTIONS_SETTINGS.add("accessibility_captioning_edge_color");
+ CAPTIONS_SETTINGS.add("accessibility_captioning_typeface");
+ CAPTIONS_SETTINGS.add("accessibility_captioning_font_scale");
+ CAPTIONS_SETTINGS.add("accessibility_captioning_window_color");
+
+ TTS_SETTINGS.add(Settings.Secure.TTS_DEFAULT_RATE);
+ TTS_SETTINGS.add("tts_default_locale");
+
+ ACCESSIBILITY_SERVICE_SETTINGS.add(Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES);
+ ACCESSIBILITY_SERVICE_SETTINGS.add("touch_exploration_granted_accessibility_services");
+ ACCESSIBILITY_SERVICE_SETTINGS.add(Settings.Secure.TOUCH_EXPLORATION_ENABLED);
+
+ SYSTEM_SETTINGS.add(Settings.System.FONT_SCALE);
+ SYSTEM_SETTINGS.add(Settings.System.STAY_ON_WHILE_PLUGGED_IN);
+ SYSTEM_SETTINGS.add(Settings.System.SCREEN_OFF_TIMEOUT);
+ SYSTEM_SETTINGS.add(Settings.System.SCREEN_BRIGHTNESS);
+ SYSTEM_SETTINGS.add(Settings.System.SCREEN_BRIGHTNESS_MODE);
+ SYSTEM_SETTINGS.add(Settings.System.TEXT_SHOW_PASSWORD);
+ SYSTEM_SETTINGS.add(Settings.System.HAPTIC_FEEDBACK_ENABLED);
+ SYSTEM_SETTINGS.add("power_sounds_enabled");
+ SYSTEM_SETTINGS.add("lockscreen_sounds_enabled");
+ SYSTEM_SETTINGS.add("pointer_speed");
+ SYSTEM_SETTINGS.add(Settings.System.VIBRATE_WHEN_RINGING);
+ SYSTEM_SETTINGS.add(Settings.System.ACCELEROMETER_ROTATION);
+ }
+
+ private BackupAdapter mAdapter;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
+ setContentView(R.layout.bua_main);
+ setPassFailButtonClickListeners();
+ setInfoResources(R.string.backup_accessibility_test, R.string.backup_accessibility_info, 0);
+
+ mAdapter = new BackupAdapter(this);
+ setListAdapter(mAdapter);
+
+ new ReadCurrentSettingsValuesTask().execute();
+
+ findViewById(R.id.generate_button).setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ new ReadCurrentSettingsValuesTask().execute();
+ }
+ });
+
+ findViewById(R.id.show_instructions_button).setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ showDialog(INSTRUCTIONS_DIALOG_ID);
+ }
+ });
+ }
+
+ class ReadCurrentSettingsValuesTask extends AsyncTask<Void, Void, List<BackupItem>> {
+
+ @Override
+ protected void onPreExecute() {
+ super.onPreExecute();
+ setProgressBarIndeterminateVisibility(true);
+ }
+
+ @Override
+ protected List<BackupItem> doInBackground(Void... params) {
+ List<BackupItem> items = new ArrayList<BackupItem>();
+
+ items.add(new CategoryBackupItem(R.string.bua_settings));
+ addSecureSettings(items, ACCESSIBILITY_SETTINGS);
+
+ items.add(new CategoryBackupItem(R.string.bua_settings_color_correction));
+ addSecureSettings(items, COLOR_CORRECTION_SETTINGS);
+
+ items.add(new CategoryBackupItem(R.string.bua_settings_captions));
+ addSecureSettings(items, CAPTIONS_SETTINGS);
+
+ items.add(new CategoryBackupItem(R.string.bua_settings_tts));
+ addSecureSettings(items, TTS_SETTINGS);
+
+ items.add(new CategoryBackupItem(R.string.bua_settings_accessibility_services));
+ addSecureSettings(items, ACCESSIBILITY_SERVICE_SETTINGS);
+
+ items.add(new CategoryBackupItem(R.string.bua_settings_system));
+ addSystemSettings(items, SYSTEM_SETTINGS);
+
+ return items;
+ }
+
+ private void addSecureSettings(List<BackupItem> items, List<String> settings) {
+ for (String setting : settings) {
+ String value = Settings.Secure.getString(getContentResolver(), setting);
+ items.add(new PreferenceBackupItem(setting, value));
+ }
+ }
+
+ private void addSystemSettings(List<BackupItem> items, List<String> settings) {
+ for (String setting : settings) {
+ String value = Settings.System.getString(getContentResolver(), setting);
+ items.add(new PreferenceBackupItem(setting, value));
+ }
+ }
+
+ @Override
+ protected void onPostExecute(List<BackupItem> result) {
+ super.onPostExecute(result);
+ setProgressBarIndeterminateVisibility(false);
+ mAdapter.clear();
+ mAdapter.addAll(result);
+ }
+ }
+
+ @Override
+ public Dialog onCreateDialog(int id, Bundle args) {
+ switch (id) {
+ case INSTRUCTIONS_DIALOG_ID:
+ return new AlertDialog.Builder(this)
+ .setIcon(android.R.drawable.ic_dialog_info)
+ .setTitle(R.string.backup_accessibility_test)
+ .setMessage(R.string.bua_instructions)
+ .setPositiveButton(android.R.string.ok, null)
+ .setNeutralButton(R.string.bu_settings, new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+ startActivity(new Intent(Settings.ACTION_PRIVACY_SETTINGS));
+ }
+ }).create();
+
+ default:
+ return super.onCreateDialog(id, args);
+ }
+ }
+
+ interface BackupItem {
+ int getViewType();
+ View getView(LayoutInflater inflater, int position, View convertView, ViewGroup parent);
+ }
+
+ static class CategoryBackupItem implements BackupItem {
+
+ private final int mTitleResId;
+
+ CategoryBackupItem(int titleResId) {
+ mTitleResId = titleResId;
+ }
+
+ @Override
+ public int getViewType() {
+ return 0;
+ }
+
+ @Override
+ public View getView(LayoutInflater inflater, int position, View convertView,
+ ViewGroup parent) {
+ TextView view = (TextView) convertView;
+ if (convertView == null) {
+ view = (TextView) inflater.inflate(R.layout.test_category_row, parent, false);
+ }
+ view.setText(mTitleResId);
+ view.setAllCaps(true);
+ view.setTextAppearance(1); // Bold
+ return view;
+ }
+ }
+
+ static class PreferenceBackupItem implements BackupItem {
+
+ private final String mName;
+ private final String mValue;
+
+ PreferenceBackupItem(String name, String value) {
+ mName = name;
+ mValue = value;
+ }
+
+ @Override
+ public int getViewType() {
+ if (mValue == null || mValue.equals("0")) {
+ return 1;
+ } else {
+ return 2;
+ }
+ }
+
+ @Override
+ public View getView(LayoutInflater inflater, int position, View convertView,
+ ViewGroup parent) {
+ TextView view = (TextView) convertView;
+ if (convertView == null) {
+ view = (TextView) inflater.inflate(R.layout.bu_preference_row, parent, false);
+ }
+ view.setText(mName + " : " + mValue);
+ if (mValue == null || mValue.equals("0")) {
+ view.setTextColor(Color.GREEN);
+ }
+ return view;
+ }
+ }
+
+ class BackupAdapter extends BaseAdapter {
+
+ private final LayoutInflater mLayoutInflater;
+
+ private final List<BackupItem> mItems = new ArrayList<BackupItem>();
+
+ public BackupAdapter(Context context) {
+ mLayoutInflater = (LayoutInflater) context.getSystemService(LAYOUT_INFLATER_SERVICE);
+ }
+
+ public void clear() {
+ mItems.clear();
+ }
+
+ public void addAll(List<BackupItem> items) {
+ mItems.addAll(items);
+ notifyDataSetChanged();
+ }
+
+ @Override
+ public int getCount() {
+ return mItems.size();
+ }
+
+ @Override
+ public BackupItem getItem(int position) {
+ return mItems.get(position);
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return position;
+ }
+
+ @Override
+ public boolean isEnabled(int position) {
+ return false;
+ }
+
+ @Override
+ public int getViewTypeCount() {
+ return 3;
+ }
+
+ @Override
+ public int getItemViewType(int position) {
+ return getItem(position).getViewType();
+ }
+
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ return getItem(position).getView(mLayoutInflater, position, convertView, parent);
+ }
+ }
+}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/IntentFiltersTestHelper.java b/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/IntentFiltersTestHelper.java
index 58a1fef..0cf58f7 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/IntentFiltersTestHelper.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/managedprovisioning/IntentFiltersTestHelper.java
@@ -283,15 +283,9 @@
}
// Check for intents which can be forwarded to the managed profile.
- Intent intent = checkForIntentsNotHandled(forwardedIntentsFromPrimary,
- forwarderActivityInfo, true);
- if (intent != null) {
- Log.d(TAG, intent + " from primary profile should be forwarded to the " +
- "managed profile but is not.");
- return false;
- }
-
- return true;
+ return checkForIntentsNotHandled(forwardedIntentsFromPrimary,
+ forwarderActivityInfo, "from primary profile should be forwarded to the " +
+ "managed profile but is not.", true);
}
/**
@@ -307,25 +301,17 @@
return false;
}
+ boolean success = true;
// Check for intents which can be forwarded to the primary profile.
- Intent intent = checkForIntentsNotHandled(forwardedIntentsFromManaged,
- forwarderActivityInfo, true);
- if (intent != null) {
- Log.d(TAG, intent + " from managed profile should be forwarded to the " +
- "primary profile but is not.");
- return false;
- }
+ success &= checkForIntentsNotHandled(forwardedIntentsFromManaged,
+ forwarderActivityInfo, " from managed profile should be forwarded to the " +
+ "primary profile but is not.", true);
// Check for intents which cannot be forwarded to the primary profile.
- intent = checkForIntentsNotHandled(notForwardedIntentsFromManaged,
- forwarderActivityInfo, false);
- if (intent != null) {
- Log.d(TAG, intent + " from managed profile should not be forwarded to the " +
- "primary profile but it is.");
- return false;
- }
-
- return true;
+ success &= checkForIntentsNotHandled(notForwardedIntentsFromManaged,
+ forwarderActivityInfo, "from managed profile should not be forwarded to the " +
+ "primary profile but it is.", false);
+ return success;
}
/**
@@ -365,17 +351,18 @@
/**
* Checks if the intents passed are correctly handled.
- * @return {@code null} if all the intents are correctly handled
- * otherwise, the first intent in the list which is not handled correctly.
+ * @return {@code false} if at least one intent is not handled correctly.
*/
- private Intent checkForIntentsNotHandled(ArrayList<Intent> intentList,
- ActivityInfo expectedForwarderActivityInfo, boolean canResolve) {
+ private boolean checkForIntentsNotHandled(ArrayList<Intent> intentList,
+ ActivityInfo expectedForwarderActivityInfo, String errorMessage, boolean canResolve) {
+ boolean success = true;
for (Intent intent : intentList) {
if (canForwarderActivityHandleIntent(intent,
expectedForwarderActivityInfo) != canResolve) {
- return intent;
+ Log.e(TAG, intent + " " + errorMessage);
+ success = false;
}
}
- return null;
+ return success;
}
}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/SignificantMotionTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/SignificantMotionTestActivity.java
index 2dfc7c8..e1cba262 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/SignificantMotionTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/SignificantMotionTestActivity.java
@@ -296,7 +296,9 @@
@Override
protected void onDestroy() {
super.onDestroy();
- mScreenManipulator.close();
+ if (mScreenManipulator != null){
+ mScreenManipulator.close();
+ }
}
/**
diff --git a/build/compatibility_test_suite.mk b/build/compatibility_test_suite.mk
index 6430efa..f109185 100644
--- a/build/compatibility_test_suite.mk
+++ b/build/compatibility_test_suite.mk
@@ -19,6 +19,7 @@
# Generate the SuiteInfo.java
suite_info_java := $(call intermediates-dir-for,JAVA_LIBRARIES,$(LOCAL_MODULE),true,COMMON)/com/android/compatibility/SuiteInfo.java
$(suite_info_java): PRIVATE_SUITE_BUILD_NUMBER := $(LOCAL_SUITE_BUILD_NUMBER)
+$(suite_info_java): PRIVATE_SUITE_TARGET_ARCH := $(LOCAL_SUITE_TARGET_ARCH)
$(suite_info_java): PRIVATE_SUITE_NAME := $(LOCAL_SUITE_NAME)
$(suite_info_java): PRIVATE_SUITE_FULLNAME := $(LOCAL_SUITE_FULLNAME)
$(suite_info_java): PRIVATE_SUITE_VERSION := $(LOCAL_SUITE_VERSION)
@@ -29,6 +30,7 @@
$(hide) echo "package com.android.compatibility;" >> $@
$(hide) echo "public class SuiteInfo {" >> $@
$(hide) echo " public static final String BUILD_NUMBER = \"$(PRIVATE_SUITE_BUILD_NUMBER)\";" >> $@
+ $(hide) echo " public static final String TARGET_ARCH = \"$(PRIVATE_SUITE_TARGET_ARCH)\";" >> $@
$(hide) echo " public static final String NAME = \"$(PRIVATE_SUITE_NAME)\";" >> $@
$(hide) echo " public static final String FULLNAME = \"$(PRIVATE_SUITE_FULLNAME)\";" >> $@
$(hide) echo " public static final String VERSION = \"$(PRIVATE_SUITE_VERSION)\";" >> $@
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/CameraDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/CameraDeviceInfo.java
index 6d089ad..905c143 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/CameraDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/CameraDeviceInfo.java
@@ -17,7 +17,7 @@
import android.media.CamcorderProfile;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
/**
* Camera information collector.
@@ -25,7 +25,7 @@
public final class CameraDeviceInfo extends DeviceInfo {
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
store.addResult("profile_480p", CamcorderProfile.hasProfile(CamcorderProfile.QUALITY_480P));
store.addResult("profile_720p", CamcorderProfile.hasProfile(CamcorderProfile.QUALITY_720P));
store.addResult("profile_1080p", CamcorderProfile.hasProfile(CamcorderProfile.QUALITY_1080P));
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ConfigurationDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ConfigurationDeviceInfo.java
index bedd900..fb4b7c4 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ConfigurationDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ConfigurationDeviceInfo.java
@@ -17,7 +17,7 @@
import android.content.res.Configuration;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
/**
* Configuration device info collector.
@@ -25,7 +25,7 @@
public final class ConfigurationDeviceInfo extends DeviceInfo {
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
Configuration con = getInstrumentation().getContext().getResources().getConfiguration();
store.addResult("touchscreen", con.touchscreen);
store.addResult("navigation", con.navigation);
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/CpuDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/CpuDeviceInfo.java
index cc61cdd..ad6a135 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/CpuDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/CpuDeviceInfo.java
@@ -15,7 +15,7 @@
*/
package com.android.compatibility.common.deviceinfo;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
/**
* CPU device info collector.
@@ -23,7 +23,7 @@
public final class CpuDeviceInfo extends DeviceInfo {
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
store.addResult("available_processors", Runtime.getRuntime().availableProcessors());
}
}
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/DeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/DeviceInfo.java
index 990d1b1..8aa3380 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/DeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/DeviceInfo.java
@@ -26,7 +26,7 @@
import android.util.JsonWriter;
import android.util.Log;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
import java.io.File;
import java.io.FileOutputStream;
@@ -79,7 +79,7 @@
File jsonFile = new File(dir, getClass().getSimpleName() + ".deviceinfo.json");
jsonFile.createNewFile();
mResultFilePath = jsonFile.getAbsolutePath();
- InfoStore store = new InfoStore(jsonFile);
+ DeviceInfoStore store = new DeviceInfoStore(jsonFile);
store.open();
collectDeviceInfo(store);
store.close();
@@ -117,7 +117,7 @@
/**
* Method to collect device information.
*/
- protected abstract void collectDeviceInfo(InfoStore store) throws Exception;
+ protected abstract void collectDeviceInfo(DeviceInfoStore store) throws Exception;
protected Context getContext() {
return getInstrumentation().getContext();
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/FeatureDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/FeatureDeviceInfo.java
index 6cf6d29..414fcab 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/FeatureDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/FeatureDeviceInfo.java
@@ -18,7 +18,7 @@
import android.content.pm.FeatureInfo;
import android.content.pm.PackageManager;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -34,7 +34,7 @@
public final class FeatureDeviceInfo extends DeviceInfo {
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
PackageManager packageManager = getInstrumentation().getContext().getPackageManager();
store.startArray("feature");
@@ -80,7 +80,7 @@
}
}
- private void addFeature(InfoStore store, String name, String type, boolean available)
+ private void addFeature(DeviceInfoStore store, String name, String type, boolean available)
throws Exception {
store.startGroup();
store.addResult("name", name);
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/GenericDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/GenericDeviceInfo.java
index 1adb5d3..b0486ef 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/GenericDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/GenericDeviceInfo.java
@@ -29,7 +29,7 @@
import java.util.Map.Entry;
import com.android.compatibility.common.deviceinfo.DeviceInfo;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
/**
* Generic device info collector.
@@ -60,7 +60,7 @@
private final Map<String, String> mDeviceInfo = new HashMap<>();
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
store.addResult(BUILD_ID, Build.ID);
store.addResult(BUILD_PRODUCT, Build.PRODUCT);
store.addResult(BUILD_DEVICE, Build.DEVICE);
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/GraphicsDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/GraphicsDeviceInfo.java
index a0b0ad9..e8283f8 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/GraphicsDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/GraphicsDeviceInfo.java
@@ -17,7 +17,7 @@
import android.os.Bundle;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
/**
* Graphics device info collector.
@@ -27,7 +27,7 @@
private static final String LOG_TAG = "GraphicsDeviceInfo";
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
GlesStubActivity stubActivity = GraphicsDeviceInfo.this.launchActivity(
"com.android.compatibility.common.deviceinfo",
GlesStubActivity.class,
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/LibraryDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/LibraryDeviceInfo.java
index 0c12e37..bc30eef 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/LibraryDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/LibraryDeviceInfo.java
@@ -17,7 +17,7 @@
import android.util.Log;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
import java.io.Closeable;
import java.io.File;
@@ -37,31 +37,32 @@
private static final int BUFFER_SIZE_BYTES = 4096;
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
collectSystemLibs(store);
collectVendorLibs(store);
collectFrameworkJars(store);
}
- private void collectSystemLibs(InfoStore store) throws Exception {
+ private void collectSystemLibs(DeviceInfoStore store) throws Exception {
store.startArray("lib");
collectFileDetails(store, "/system/lib", ".so");
store.endArray();
}
- private void collectVendorLibs(InfoStore store) throws Exception {
+ private void collectVendorLibs(DeviceInfoStore store) throws Exception {
store.startArray("vendor_lib");
collectFileDetails(store, "/system/vendor/lib", ".so");
store.endArray();
}
- private void collectFrameworkJars(InfoStore store) throws Exception {
+ private void collectFrameworkJars(DeviceInfoStore store) throws Exception {
store.startArray("framework_jar");
collectFileDetails(store, "/system/framework", ".jar");
store.endArray();
}
- private void collectFileDetails(InfoStore store, String path, String suffix) throws Exception {
+ private void collectFileDetails(DeviceInfoStore store, String path, String suffix)
+ throws Exception {
File dir = new File(path);
for (File file : dir.listFiles()) {
String name = file.getName();
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/LocaleDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/LocaleDeviceInfo.java
index e7793ae..e7cb095 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/LocaleDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/LocaleDeviceInfo.java
@@ -15,7 +15,7 @@
*/
package com.android.compatibility.common.deviceinfo;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
import java.util.Arrays;
import java.util.List;
@@ -26,7 +26,7 @@
public final class LocaleDeviceInfo extends DeviceInfo {
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
List<String> locales = Arrays.asList(
getInstrumentation().getContext().getAssets().getLocales());
if (locales.isEmpty()) {
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/MediaDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/MediaDeviceInfo.java
index 8a45132..8c3ee5a 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/MediaDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/MediaDeviceInfo.java
@@ -26,7 +26,7 @@
import android.media.MediaCodecInfo.CodecProfileLevel;
import android.media.MediaCodecList;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
import java.util.ArrayList;
import java.util.List;
@@ -37,7 +37,7 @@
public final class MediaDeviceInfo extends DeviceInfo {
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
store.startArray("media_codec_info");
for (int i = 0; i < MediaCodecList.getCodecCount(); i++) {
MediaCodecInfo info = MediaCodecList.getCodecInfoAt(i);
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/MemoryDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/MemoryDeviceInfo.java
index 740a400..4cc9de9 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/MemoryDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/MemoryDeviceInfo.java
@@ -21,7 +21,7 @@
import android.os.Bundle;
import com.android.compatibility.common.deviceinfo.DeviceInfo;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
/**
* MemoryDeviceInfo collector.
@@ -29,7 +29,7 @@
public final class MemoryDeviceInfo extends DeviceInfo {
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
ActivityManager activityManager = (ActivityManager)getInstrumentation()
.getTargetContext().getSystemService(Context.ACTIVITY_SERVICE);
store.addResult("low_ram_device", activityManager.isLowRamDevice());
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/PackageDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/PackageDeviceInfo.java
index 537e028..e027d34 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/PackageDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/PackageDeviceInfo.java
@@ -20,7 +20,7 @@
import android.os.Bundle;
import com.android.compatibility.common.deviceinfo.DeviceInfo;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
/**
* PackageDeviceInfo collector.
@@ -34,7 +34,7 @@
private static final String PRIV_APP_DIR = "/system/priv-app";
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
PackageManager pm = getContext().getPackageManager();
store.startArray(PACKAGE);
for (PackageInfo pkg : pm.getInstalledPackages(0)) {
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/PropertyDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/PropertyDeviceInfo.java
index 2229da7..bb7f1eb 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/PropertyDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/PropertyDeviceInfo.java
@@ -17,7 +17,7 @@
import android.util.Log;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
import java.io.IOException;
import java.util.List;
@@ -33,7 +33,7 @@
private static final String LOG_TAG = "PropertyDeviceInfo";
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
try {
collectRoProperties(store);
} catch (IOException e) {
@@ -41,7 +41,7 @@
}
}
- private void collectRoProperties(InfoStore store) throws IOException {
+ private void collectRoProperties(DeviceInfoStore store) throws IOException {
store.startArray("ro_property");
Pattern pattern = Pattern.compile("\\[(ro.+)\\]: \\[(.+)\\]");
Scanner scanner = null;
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ScreenDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ScreenDeviceInfo.java
index 44c3d68..dcd6f54 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ScreenDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ScreenDeviceInfo.java
@@ -21,7 +21,7 @@
import android.view.Display;
import android.view.WindowManager;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
/**
* Screen device info collector.
@@ -29,7 +29,7 @@
public final class ScreenDeviceInfo extends DeviceInfo {
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
DisplayMetrics metrics = new DisplayMetrics();
WindowManager windowManager =
(WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE);
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/StorageDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/StorageDeviceInfo.java
index 7d93284..dafff35 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/StorageDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/StorageDeviceInfo.java
@@ -18,7 +18,7 @@
import android.os.Environment;
import android.util.Log;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
import java.io.IOException;
import java.util.ArrayList;
@@ -32,7 +32,7 @@
private static final String TAG = "StorageDeviceInfo";
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
int total = 0;
total = Math.max(total, getContext().getExternalCacheDirs().length);
total = Math.max(total, getContext().getExternalFilesDirs(null).length);
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/UserDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/UserDeviceInfo.java
index 3a02fb2..c72b02b 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/UserDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/UserDeviceInfo.java
@@ -17,7 +17,7 @@
import android.os.UserManager;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -29,7 +29,7 @@
public final class UserDeviceInfo extends DeviceInfo {
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
store.addResult("max_supported_users", getMaxSupportedUsers());
}
diff --git a/common/device-side/device-info/tests/src/com/android/compatibility/common/deviceinfo/TestDeviceInfo.java b/common/device-side/device-info/tests/src/com/android/compatibility/common/deviceinfo/TestDeviceInfo.java
index 54a710b..00acb5b 100644
--- a/common/device-side/device-info/tests/src/com/android/compatibility/common/deviceinfo/TestDeviceInfo.java
+++ b/common/device-side/device-info/tests/src/com/android/compatibility/common/deviceinfo/TestDeviceInfo.java
@@ -22,7 +22,7 @@
import java.util.HashSet;
import java.util.List;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
/**
* Collector for testing DeviceInfo
@@ -36,7 +36,7 @@
}
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
// Test primitive results
store.addResult("test_boolean", true);
diff --git a/common/device-side/test-app/run_tests.sh b/common/device-side/test-app/run_tests.sh
index fa5f553..5640260 100755
--- a/common/device-side/test-app/run_tests.sh
+++ b/common/device-side/test-app/run_tests.sh
@@ -17,7 +17,7 @@
CTS_DIR=$(dirname ${0})/../../..
source ${CTS_DIR}/test_defs.sh
-if [ `adb devices | wc -l` -lt 2 ]; then
+if [ `adb devices | wc -l` -lt 3 ]; then
echo "NO DEVICES/EMULATORS AVAILABLE. CONNECT ONE."
exit 1
fi
diff --git a/common/device-side/util/src/com/android/compatibility/common/util/InfoStore.java b/common/device-side/util/src/com/android/compatibility/common/util/DeviceInfoStore.java
similarity index 75%
rename from common/device-side/util/src/com/android/compatibility/common/util/InfoStore.java
rename to common/device-side/util/src/com/android/compatibility/common/util/DeviceInfoStore.java
index a8dbeff..e0f3eab 100644
--- a/common/device-side/util/src/com/android/compatibility/common/util/InfoStore.java
+++ b/common/device-side/util/src/com/android/compatibility/common/util/DeviceInfoStore.java
@@ -22,26 +22,22 @@
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
-import java.io.Serializable;
import java.util.Arrays;
import java.util.List;
-public class InfoStore {
-
- private static final int MAX_STRING_LENGTH = 1000;
- private static final int MAX_ARRAY_LENGTH = 1000;
- private static final int MAX_LIST_LENGTH = 1000;
+public class DeviceInfoStore extends InfoStore {
private final File mJsonFile;
private JsonWriter mJsonWriter = null;
- public InfoStore(File file) throws Exception {
+ public DeviceInfoStore(File file) throws Exception {
mJsonFile = file;
}
/**
* Opens the file for storage and creates the writer.
*/
+ @Override
public void open() throws IOException {
FileOutputStream out = new FileOutputStream(mJsonFile);
mJsonWriter = new JsonWriter(new OutputStreamWriter(out, StandardCharsets.UTF_8));
@@ -53,6 +49,7 @@
/**
* Closes the writer.
*/
+ @Override
public void close() throws IOException {
mJsonWriter.endObject();
mJsonWriter.close();
@@ -61,6 +58,7 @@
/**
* Start a new group of result.
*/
+ @Override
public void startGroup() throws IOException {
mJsonWriter.beginObject();
}
@@ -68,6 +66,7 @@
/**
* Start a new group of result with specified name.
*/
+ @Override
public void startGroup(String name) throws IOException {
mJsonWriter.name(name);
mJsonWriter.beginObject();
@@ -76,6 +75,7 @@
/**
* Complete adding result to the last started group.
*/
+ @Override
public void endGroup() throws IOException {
mJsonWriter.endObject();
}
@@ -83,6 +83,7 @@
/**
* Start a new array of result.
*/
+ @Override
public void startArray() throws IOException {
mJsonWriter.beginArray();
}
@@ -90,6 +91,7 @@
/**
* Start a new array of result with specified name.
*/
+ @Override
public void startArray(String name) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -99,6 +101,7 @@
/**
* Complete adding result to the last started array.
*/
+ @Override
public void endArray() throws IOException {
mJsonWriter.endArray();
}
@@ -106,6 +109,7 @@
/**
* Adds a int value to the InfoStore
*/
+ @Override
public void addResult(String name, int value) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -115,6 +119,7 @@
/**
* Adds a long value to the InfoStore
*/
+ @Override
public void addResult(String name, long value) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -124,6 +129,7 @@
/**
* Adds a float value to the InfoStore
*/
+ @Override
public void addResult(String name, float value) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -133,6 +139,7 @@
/**
* Adds a double value to the InfoStore
*/
+ @Override
public void addResult(String name, double value) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -142,6 +149,7 @@
/**
* Adds a boolean value to the InfoStore
*/
+ @Override
public void addResult(String name, boolean value) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -151,6 +159,7 @@
/**
* Adds a String value to the InfoStore
*/
+ @Override
public void addResult(String name, String value) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -160,6 +169,7 @@
/**
* Adds a int array to the InfoStore
*/
+ @Override
public void addArrayResult(String name, int[] array) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -173,6 +183,7 @@
/**
* Adds a long array to the InfoStore
*/
+ @Override
public void addArrayResult(String name, long[] array) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -186,6 +197,7 @@
/**
* Adds a float array to the InfoStore
*/
+ @Override
public void addArrayResult(String name, float[] array) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -199,6 +211,7 @@
/**
* Adds a double array to the InfoStore
*/
+ @Override
public void addArrayResult(String name, double[] array) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -212,6 +225,7 @@
/**
* Adds a boolean array to the InfoStore
*/
+ @Override
public void addArrayResult(String name, boolean[] array) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -225,6 +239,7 @@
/**
* Adds a List of String to the InfoStore
*/
+ @Override
public void addListResult(String name, List<String> list) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -234,68 +249,4 @@
}
mJsonWriter.endArray();
}
-
- private static int[] checkArray(int[] values) {
- if (values.length > MAX_ARRAY_LENGTH) {
- return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
- } else {
- return values;
- }
- }
-
- private static long[] checkArray(long[] values) {
- if (values.length > MAX_ARRAY_LENGTH) {
- return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
- } else {
- return values;
- }
- }
-
- private static float[] checkArray(float[] values) {
- if (values.length > MAX_ARRAY_LENGTH) {
- return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
- } else {
- return values;
- }
- }
-
- private static double[] checkArray(double[] values) {
- if (values.length > MAX_ARRAY_LENGTH) {
- return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
- } else {
- return values;
- }
- }
-
- private static boolean[] checkArray(boolean[] values) {
- if (values.length > MAX_ARRAY_LENGTH) {
- return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
- } else {
- return values;
- }
- }
-
- private static List<String> checkStringList(List<String> list) {
- if (list.size() > MAX_LIST_LENGTH) {
- return list.subList(0, MAX_LIST_LENGTH);
- }
- return list;
- }
-
- private static String checkString(String value) {
- if (value == null || value.isEmpty()) {
- return "";
- }
- if (value.length() > MAX_STRING_LENGTH) {
- return value.substring(0, MAX_STRING_LENGTH);
- }
- return value;
- }
-
- private static String checkName(String value) {
- if (value == null || value.isEmpty()) {
- throw new NullPointerException();
- }
- return value;
- }
}
diff --git a/common/host-side/tradefed/res/config/common-compatibility-config.xml b/common/host-side/tradefed/res/config/common-compatibility-config.xml
index 5bac748..7f3f76a 100644
--- a/common/host-side/tradefed/res/config/common-compatibility-config.xml
+++ b/common/host-side/tradefed/res/config/common-compatibility-config.xml
@@ -14,11 +14,9 @@
limitations under the License.
-->
<configuration description="Common config for Compatibility suites">
-
<device_recovery class="com.android.tradefed.device.WaitDeviceRecovery" />
<build_provider class="com.android.compatibility.common.tradefed.build.CompatibilityBuildProvider" />
<test class="com.android.compatibility.common.tradefed.testtype.CompatibilityTest" />
<logger class="com.android.tradefed.log.FileLogger" />
<result_reporter class="com.android.compatibility.common.tradefed.result.ResultReporter" />
-
</configuration>
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProvider.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProvider.java
index 65f60bd..7f84a3a 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProvider.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/build/CompatibilityBuildProvider.java
@@ -18,21 +18,29 @@
import com.android.tradefed.build.BuildInfo;
import com.android.tradefed.build.IBuildInfo;
import com.android.tradefed.build.IBuildProvider;
+import com.android.tradefed.config.Option;
import com.android.tradefed.config.OptionClass;
-
/**
* A simple {@link IBuildProvider} that uses a pre-existing Compatibility install.
*/
@OptionClass(alias="compatibility-build-provider")
public class CompatibilityBuildProvider implements IBuildProvider {
+ @Option(name="branch", description="build branch name to supply.")
+ private String mBranch = null;
+
/**
* {@inheritDoc}
*/
@Override
public IBuildInfo getBuild() {
// Create a blank BuildInfo which will get populated later.
- return new BuildInfo();
+ IBuildInfo ctsBuild = new BuildInfo();
+ if (mBranch != null) {
+ ctsBuild.setBuildBranch(mBranch);
+ }
+
+ return ctsBuild;
}
/**
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ResultReporter.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ResultReporter.java
index 8e48cdb..d63e09c 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ResultReporter.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/result/ResultReporter.java
@@ -69,7 +69,7 @@
ITestSummaryListener {
private static final String RESULT_KEY = "COMPATIBILITY_TEST_RESULT";
- private static final String DEVICE_INFO = "DEVICE_INFO_";
+ private static final String BUILD_INFO = "build_";
private static final String[] RESULT_RESOURCES = {
"compatibility_result.css",
"compatibility_result.xsd",
@@ -196,6 +196,7 @@
public void testStarted(TestIdentifier test) {
mCurrentCaseResult = mCurrentModuleResult.getOrCreateResult(test.getClassName());
mCurrentResult = mCurrentCaseResult.getOrCreateResult(test.getTestName());
+ mCurrentResult.reset();
}
/**
@@ -204,6 +205,7 @@
@Override
public void testEnded(TestIdentifier test, Map<String, String> metrics) {
if (mCurrentResult.getResultStatus() == TestStatus.FAIL) {
+ logResult("%s has already failed", test);
// Test has already failed.
return;
}
@@ -230,8 +232,8 @@
*/
@Override
public void testIgnored(TestIdentifier test) {
+ mCurrentResult.notExecuted();
logResult("%s ignored", test);
- // ignore
}
/**
@@ -248,7 +250,7 @@
*/
@Override
public void testAssumptionFailure(TestIdentifier test, String trace) {
- mCurrentResult.failed(trace);
+ mCurrentResult.notExecuted();
logResult("%s failed assumption: %s", test, trace);
}
@@ -270,8 +272,8 @@
// Get device info from build attributes
for (Entry<String, String> entry : mBuild.getBuildAttributes().entrySet()) {
String key = entry.getKey();
- if (key.startsWith(DEVICE_INFO)) {
- mResult.addBuildInfo(key.substring(DEVICE_INFO.length()), entry.getValue());
+ if (key.startsWith(BUILD_INFO)) {
+ mResult.addBuildInfo(key, entry.getValue());
}
}
mCurrentModuleResult.addRuntime(elapsedTime);
@@ -342,7 +344,12 @@
}
}
if (mResultServer != null && !mResultServer.trim().isEmpty()) {
- mUploader.uploadResult(resultFile, mReferenceUrl);
+ try {
+ logResult("Result Server Response: %d",
+ mUploader.uploadResult(resultFile, mReferenceUrl));
+ } catch (IOException ioe) {
+ Log.e(mDeviceSerial, ioe);
+ }
}
} catch (IOException | XmlPullParserException e) {
CLog.e(e);
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DeviceInfoCollector.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DeviceInfoCollector.java
index 6cf1ff7..0178bab 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DeviceInfoCollector.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DeviceInfoCollector.java
@@ -39,8 +39,6 @@
*/
public class DeviceInfoCollector extends ApkInstrumentationPreparer {
- private static final String LOG_TAG = "DeviceInfoCollector";
- private static final String DEVICE_INFO = "DEVICE_INFO_%s";
private static final Map<String, String> BUILD_KEYS = new HashMap<>();
static {
BUILD_KEYS.put("build_id", "ro.build.id");
@@ -86,7 +84,7 @@
return;
}
for (Entry<String, String> entry : BUILD_KEYS.entrySet()) {
- buildInfo.addBuildAttribute(String.format(DEVICE_INFO, entry.getKey()),
+ buildInfo.addBuildAttribute(entry.getKey(),
ArrayUtil.join(",", device.getProperty(entry.getValue())));
}
run(device, buildInfo);
@@ -106,7 +104,7 @@
}
resultDir.mkdirs();
if (!resultDir.isDirectory()) {
- CLog.e(LOG_TAG, String.format("% is not a directory", resultDir.getAbsolutePath()));
+ CLog.e("%s is not a directory", resultDir.getAbsolutePath());
return;
}
String resultPath = resultDir.getAbsolutePath();
@@ -121,10 +119,11 @@
try {
Process p = Runtime.getRuntime().exec(new String[] {"/bin/bash", "-c", command});
if (p.waitFor() != 0) {
- CLog.e(LOG_TAG, String.format("Failed to run %s", command));
+ CLog.e("Failed to run %s", command);
}
} catch (Exception e) {
- CLog.e(LOG_TAG, e);
+ CLog.e("Caught exception during pull.");
+ CLog.e(e);
}
}
-}
\ No newline at end of file
+}
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DynamicConfigPusher.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DynamicConfigPusher.java
index de9cd59..1a4be53 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DynamicConfigPusher.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/DynamicConfigPusher.java
@@ -55,7 +55,8 @@
"target after test completion.")
private boolean mCleanup = true;
- @Option(name="module", description = "The test suite module using dynamic configuration")
+ @Option(name="config-filename", description = "The module name for module-level " +
+ "configurations, or the suite name for suite-level configurations")
private String mModuleName;
@Option(name = "target", description = "The test target, \"device\" or \"host\"")
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ResultFilePuller.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ResultFilePuller.java
index 7b20997d..432f223 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ResultFilePuller.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ResultFilePuller.java
@@ -37,8 +37,6 @@
@OptionClass(alias="result-file-puller")
public class ResultFilePuller implements ITargetCleaner {
- private static final String LOG_TAG = ResultFilePuller.class.getSimpleName();
-
@Option(name="clear", description = "Whether to clear the src files and dirs before running the test")
private boolean mClearSrc = true;
@@ -85,7 +83,7 @@
}
resultDir.mkdirs();
if (!resultDir.isDirectory()) {
- CLog.e(LOG_TAG, String.format("% is not a directory", resultDir.getAbsolutePath()));
+ CLog.e("%s is not a directory", resultDir.getAbsolutePath());
return;
}
String resultPath = resultDir.getAbsolutePath();
@@ -105,10 +103,11 @@
try {
Process p = Runtime.getRuntime().exec(new String[] {"/bin/bash", "-c", command});
if (p.waitFor() != 0) {
- CLog.e(LOG_TAG, String.format("Failed to run %s", command));
+ CLog.e("Failed to run %s", command);
}
} catch (Exception e) {
- CLog.e(LOG_TAG, e);
+ CLog.e("Caught exception during pull.");
+ CLog.e(e);
}
}
}
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/CompatibilityTest.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/CompatibilityTest.java
index 6d0aa69..ea8e524 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/CompatibilityTest.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/CompatibilityTest.java
@@ -16,6 +16,7 @@
package com.android.compatibility.common.tradefed.testtype;
+import com.android.compatibility.SuiteInfo;
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
import com.android.compatibility.common.tradefed.result.IInvocationResultRepo;
import com.android.compatibility.common.tradefed.result.InvocationResultRepo;
@@ -171,6 +172,7 @@
private boolean mRebootOnFailure = false;
private int mTotalShards;
+ private IModuleRepo mModuleRepo;
private ITestDevice mDevice;
private IBuildInfo mBuild;
private CompatibilityBuildHelper mBuildHelper;
@@ -180,19 +182,20 @@
* modules.
*/
public CompatibilityTest() {
- this(1 /* totalShards */);
+ this(1 /* totalShards */, new ModuleRepo());
}
/**
* Create a new {@link CompatibilityTest} that will run a sublist of
* modules.
*/
- public CompatibilityTest(int totalShards) {
+ public CompatibilityTest(int totalShards, IModuleRepo moduleRepo) {
if (totalShards < 1) {
throw new IllegalArgumentException(
"Must be at least 1 shard. Given:" + totalShards);
}
mTotalShards = totalShards;
+ mModuleRepo = moduleRepo;
}
/**
@@ -226,24 +229,21 @@
*/
@Override
public void run(ITestInvocationListener listener) throws DeviceNotAvailableException {
- boolean isInitializer = false;
try {
- IModuleRepo moduleRepo = ModuleRepo.getInstance();
// Synchronized so only one shard enters and sets up the moduleRepo. When the other
// shards enter after this, moduleRepo is already initialized so they dont do anything
- synchronized (moduleRepo) {
- if (!moduleRepo.isInitialized()) {
- isInitializer = true;
+ synchronized (mModuleRepo) {
+ if (!mModuleRepo.isInitialized()) {
setupFilters();
// Initialize the repository, {@link CompatibilityBuildHelper#getTestsDir} can
// throw a {@link FileNotFoundException}
- moduleRepo.initialize(mTotalShards, mBuildHelper.getTestsDir(), getAbis(),
+ mModuleRepo.initialize(mTotalShards, mBuildHelper.getTestsDir(), getAbis(),
mDeviceTokens, mTestArgs, mModuleArgs, mIncludeFilters,
mExcludeFilters, mBuild);
}
}
// Get the tests to run in this shard
- List<IModuleDef> modules = moduleRepo.getModules(getDevice().getSerialNumber());
+ List<IModuleDef> modules = mModuleRepo.getModules(getDevice().getSerialNumber());
listener = new FailureListener(listener, getDevice(), mBugReportOnFailure,
mLogcatOnFailure, mScreenshotOnFailure, mRebootOnFailure);
@@ -277,10 +277,6 @@
}
} catch (FileNotFoundException fnfe) {
throw new RuntimeException("Failed to initialize modules", fnfe);
- } finally {
- if (isInitializer) {
- ModuleRepo.tearDown();
- }
}
}
@@ -292,10 +288,11 @@
*/
Set<IAbi> getAbis() throws DeviceNotAvailableException {
Set<IAbi> abis = new HashSet<>();
+ Set<String> archAbis = AbiUtils.getAbisForArch(SuiteInfo.TARGET_ARCH);
for (String abi : AbiFormatter.getSupportedAbis(mDevice, "")) {
// Only test against ABIs supported by Compatibility, and if the
// --abi option was given, it must match.
- if (AbiUtils.isAbiSupportedByCompatibility(abi)
+ if (AbiUtils.isAbiSupportedByCompatibility(abi) && archAbis.contains(abi)
&& (mAbiName == null || mAbiName.equals(abi))) {
abis.add(new Abi(abi, AbiUtils.getBitness(abi)));
}
@@ -350,6 +347,10 @@
}
}
}
+ if (mIncludeFilters.isEmpty()) {
+ throw new IllegalArgumentException(String.format(
+ "No tests to retry in session %d", mRetrySessionId));
+ }
} else if (mModuleName != null) {
mIncludeFilters.clear();
try {
@@ -405,7 +406,7 @@
List<IRemoteTest> shardQueue = new LinkedList<>();
for (int i = 0; i < mShards; i++) {
- CompatibilityTest test = new CompatibilityTest(mShards);
+ CompatibilityTest test = new CompatibilityTest(mShards, mModuleRepo);
OptionCopier.copyOptionsNoThrow(this, test);
// Set the shard count because the copy option on the previous line
// copies over the mShard value
diff --git a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/ModuleRepo.java b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/ModuleRepo.java
index b438dff..8e984cb 100644
--- a/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/ModuleRepo.java
+++ b/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/testtype/ModuleRepo.java
@@ -57,8 +57,6 @@
private static final long SMALL_TEST = TimeUnit.MINUTES.toMillis(2); // Small tests < 2mins
private static final long MEDIUM_TEST = TimeUnit.MINUTES.toMillis(10); // Medium tests < 10mins
- static IModuleRepo sInstance;
-
private int mShards;
private int mModulesPerShard;
private int mSmallModulesPerShard;
@@ -85,17 +83,6 @@
// Holds all the tests with tokens waiting to be run. Meaning the DUT must have a specific token.
private List<IModuleDef> mTokenModules = new ArrayList<>();
- public static IModuleRepo getInstance() {
- if (sInstance == null) {
- sInstance = new ModuleRepo();
- }
- return sInstance;
- }
-
- public static void tearDown() {
- sInstance = null;
- }
-
/**
* {@inheritDoc}
*/
@@ -195,6 +182,10 @@
public void initialize(int shards, File testsDir, Set<IAbi> abis, List<String> deviceTokens,
List<String> testArgs, List<String> moduleArgs, List<String> includeFilters,
List<String> excludeFilters, IBuildInfo buildInfo) {
+ CLog.d("Initializing ModuleRepo\nShards:%d\nTests Dir:%s\nABIs:%s\nDevice Tokens:%s\n" +
+ "Test Args:%s\nModule Args:%s\nIncludes:%s\nExcludes:%s",
+ shards, testsDir.getAbsolutePath(), abis, deviceTokens, testArgs, moduleArgs,
+ includeFilters, excludeFilters);
mInitialized = true;
mShards = shards;
for (String line : deviceTokens) {
@@ -222,6 +213,10 @@
addFilters(excludeFilters, mExcludeFilters, abis);
File[] configFiles = testsDir.listFiles(new ConfigFilter());
+ if (configFiles.length == 0) {
+ throw new IllegalArgumentException(
+ String.format("No config files found in %s", testsDir.getAbsolutePath()));
+ }
for (File configFile : configFiles) {
final String name = configFile.getName().replace(CONFIG_EXT, "");
final String[] pathArg = new String[] { configFile.getAbsolutePath() };
@@ -382,6 +377,7 @@
*/
@Override
public boolean accept(File dir, String name) {
+ CLog.d("%s/%s", dir.getAbsolutePath(), name);
return name.endsWith(CONFIG_EXT);
}
}
@@ -483,7 +479,14 @@
for (String name : names) {
int index = name.indexOf(CONFIG_EXT);
if (index > 0) {
- modules.add(name.substring(0, index));
+ String module = name.substring(0, index);
+ if (module.equals(pattern)) {
+ // Pattern represents a single module, just return a single-item list
+ modules = new ArrayList<>(1);
+ modules.add(module);
+ return modules;
+ }
+ modules.add(module);
}
}
return modules;
@@ -519,7 +522,7 @@
if (value1 == 0 && value2 == 0) {
return (int) Math.signum(def2.getRuntimeHint() - def1.getRuntimeHint());
}
- return (int) Math.signum(value2 - value1);
+ return (int) Math.signum(value1 - value2);
}
}
}
diff --git a/common/host-side/tradefed/tests/Android.mk b/common/host-side/tradefed/tests/Android.mk
index 6d4a6cb..e0b44a3 100644
--- a/common/host-side/tradefed/tests/Android.mk
+++ b/common/host-side/tradefed/tests/Android.mk
@@ -21,6 +21,7 @@
LOCAL_JAVA_RESOURCE_DIRS := ../res
LOCAL_SUITE_BUILD_NUMBER := 2
+LOCAL_SUITE_TARGET_ARCH := $(TARGET_ARCH)
LOCAL_SUITE_NAME := TESTS
LOCAL_SUITE_FULLNAME := "Compatibility Tests"
LOCAL_SUITE_VERSION := 1
diff --git a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/testtype/ModuleRepoTest.java b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/testtype/ModuleRepoTest.java
index 4944f3a..c691abd 100644
--- a/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/testtype/ModuleRepoTest.java
+++ b/common/host-side/tradefed/tests/src/com/android/compatibility/common/tradefed/testtype/ModuleRepoTest.java
@@ -99,8 +99,7 @@
@Override
public void setUp() throws Exception {
mTestsDir = setUpConfigs();
- ModuleRepo.sInstance = null;// Clear the instance so it gets recreated.
- mRepo = ModuleRepo.getInstance();
+ mRepo = new ModuleRepo();
mBuild = new CompatibilityBuildProvider().getBuild();
}
diff --git a/common/host-side/util/Android.mk b/common/host-side/util/Android.mk
index 8747cf8..0cb3136 100644
--- a/common/host-side/util/Android.mk
+++ b/common/host-side/util/Android.mk
@@ -18,7 +18,7 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_STATIC_JAVA_LIBRARIES := compatibility-common-util-hostsidelib
+LOCAL_STATIC_JAVA_LIBRARIES := compatibility-common-util-hostsidelib jsonlib
LOCAL_JAVA_LIBRARIES := json-prebuilt
diff --git a/common/device-side/util/src/com/android/compatibility/common/util/InfoStore.java b/common/host-side/util/src/com/android/compatibility/common/util/HostInfoStore.java
similarity index 74%
copy from common/device-side/util/src/com/android/compatibility/common/util/InfoStore.java
copy to common/host-side/util/src/com/android/compatibility/common/util/HostInfoStore.java
index a8dbeff..4a3613d 100644
--- a/common/device-side/util/src/com/android/compatibility/common/util/InfoStore.java
+++ b/common/host-side/util/src/com/android/compatibility/common/util/HostInfoStore.java
@@ -15,33 +15,29 @@
*/
package com.android.compatibility.common.util;
-import android.util.JsonWriter;
+import com.android.json.stream.JsonWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
-import java.io.Serializable;
import java.util.Arrays;
import java.util.List;
-public class InfoStore {
-
- private static final int MAX_STRING_LENGTH = 1000;
- private static final int MAX_ARRAY_LENGTH = 1000;
- private static final int MAX_LIST_LENGTH = 1000;
+public class HostInfoStore extends InfoStore {
private final File mJsonFile;
private JsonWriter mJsonWriter = null;
- public InfoStore(File file) throws Exception {
+ public HostInfoStore(File file) throws Exception {
mJsonFile = file;
}
/**
* Opens the file for storage and creates the writer.
*/
+ @Override
public void open() throws IOException {
FileOutputStream out = new FileOutputStream(mJsonFile);
mJsonWriter = new JsonWriter(new OutputStreamWriter(out, StandardCharsets.UTF_8));
@@ -53,6 +49,7 @@
/**
* Closes the writer.
*/
+ @Override
public void close() throws IOException {
mJsonWriter.endObject();
mJsonWriter.close();
@@ -61,6 +58,7 @@
/**
* Start a new group of result.
*/
+ @Override
public void startGroup() throws IOException {
mJsonWriter.beginObject();
}
@@ -68,6 +66,7 @@
/**
* Start a new group of result with specified name.
*/
+ @Override
public void startGroup(String name) throws IOException {
mJsonWriter.name(name);
mJsonWriter.beginObject();
@@ -76,6 +75,7 @@
/**
* Complete adding result to the last started group.
*/
+ @Override
public void endGroup() throws IOException {
mJsonWriter.endObject();
}
@@ -83,6 +83,7 @@
/**
* Start a new array of result.
*/
+ @Override
public void startArray() throws IOException {
mJsonWriter.beginArray();
}
@@ -90,6 +91,7 @@
/**
* Start a new array of result with specified name.
*/
+ @Override
public void startArray(String name) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -99,6 +101,7 @@
/**
* Complete adding result to the last started array.
*/
+ @Override
public void endArray() throws IOException {
mJsonWriter.endArray();
}
@@ -106,6 +109,7 @@
/**
* Adds a int value to the InfoStore
*/
+ @Override
public void addResult(String name, int value) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -115,6 +119,7 @@
/**
* Adds a long value to the InfoStore
*/
+ @Override
public void addResult(String name, long value) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -124,6 +129,7 @@
/**
* Adds a float value to the InfoStore
*/
+ @Override
public void addResult(String name, float value) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -133,6 +139,7 @@
/**
* Adds a double value to the InfoStore
*/
+ @Override
public void addResult(String name, double value) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -142,6 +149,7 @@
/**
* Adds a boolean value to the InfoStore
*/
+ @Override
public void addResult(String name, boolean value) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -151,6 +159,7 @@
/**
* Adds a String value to the InfoStore
*/
+ @Override
public void addResult(String name, String value) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -160,6 +169,7 @@
/**
* Adds a int array to the InfoStore
*/
+ @Override
public void addArrayResult(String name, int[] array) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -173,6 +183,7 @@
/**
* Adds a long array to the InfoStore
*/
+ @Override
public void addArrayResult(String name, long[] array) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -186,6 +197,7 @@
/**
* Adds a float array to the InfoStore
*/
+ @Override
public void addArrayResult(String name, float[] array) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -199,6 +211,7 @@
/**
* Adds a double array to the InfoStore
*/
+ @Override
public void addArrayResult(String name, double[] array) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -212,6 +225,7 @@
/**
* Adds a boolean array to the InfoStore
*/
+ @Override
public void addArrayResult(String name, boolean[] array) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -225,6 +239,7 @@
/**
* Adds a List of String to the InfoStore
*/
+ @Override
public void addListResult(String name, List<String> list) throws IOException {
checkName(name);
mJsonWriter.name(name);
@@ -234,68 +249,4 @@
}
mJsonWriter.endArray();
}
-
- private static int[] checkArray(int[] values) {
- if (values.length > MAX_ARRAY_LENGTH) {
- return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
- } else {
- return values;
- }
- }
-
- private static long[] checkArray(long[] values) {
- if (values.length > MAX_ARRAY_LENGTH) {
- return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
- } else {
- return values;
- }
- }
-
- private static float[] checkArray(float[] values) {
- if (values.length > MAX_ARRAY_LENGTH) {
- return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
- } else {
- return values;
- }
- }
-
- private static double[] checkArray(double[] values) {
- if (values.length > MAX_ARRAY_LENGTH) {
- return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
- } else {
- return values;
- }
- }
-
- private static boolean[] checkArray(boolean[] values) {
- if (values.length > MAX_ARRAY_LENGTH) {
- return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
- } else {
- return values;
- }
- }
-
- private static List<String> checkStringList(List<String> list) {
- if (list.size() > MAX_LIST_LENGTH) {
- return list.subList(0, MAX_LIST_LENGTH);
- }
- return list;
- }
-
- private static String checkString(String value) {
- if (value == null || value.isEmpty()) {
- return "";
- }
- if (value.length() > MAX_STRING_LENGTH) {
- return value.substring(0, MAX_STRING_LENGTH);
- }
- return value;
- }
-
- private static String checkName(String value) {
- if (value == null || value.isEmpty()) {
- throw new NullPointerException();
- }
- return value;
- }
}
diff --git a/common/util/src/com/android/compatibility/common/util/ITestResult.java b/common/util/src/com/android/compatibility/common/util/ITestResult.java
index f27cf48..701a629 100644
--- a/common/util/src/com/android/compatibility/common/util/ITestResult.java
+++ b/common/util/src/com/android/compatibility/common/util/ITestResult.java
@@ -118,6 +118,11 @@
void passed(ReportLog report);
/**
+ * Report that the test was not executed.
+ */
+ void notExecuted();
+
+ /**
* Resets the result.
*/
void reset();
diff --git a/common/util/src/com/android/compatibility/common/util/InfoStore.java b/common/util/src/com/android/compatibility/common/util/InfoStore.java
new file mode 100644
index 0000000..6c5cc0d
--- /dev/null
+++ b/common/util/src/com/android/compatibility/common/util/InfoStore.java
@@ -0,0 +1,192 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+package com.android.compatibility.common.util;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+
+public abstract class InfoStore {
+
+ protected static final int MAX_STRING_LENGTH = 1000;
+ protected static final int MAX_ARRAY_LENGTH = 1000;
+ protected static final int MAX_LIST_LENGTH = 1000;
+
+ /**
+ * Opens the file for storage and creates the writer.
+ */
+ abstract void open() throws IOException;
+
+ /**
+ * Closes the writer.
+ */
+ abstract void close() throws IOException;
+
+ /**
+ * Start a new group of result.
+ */
+ abstract void startGroup() throws IOException;
+
+ /**
+ * Start a new group of result with specified name.
+ */
+ abstract void startGroup(String name) throws IOException;
+
+ /**
+ * Complete adding result to the last started group.
+ */
+ abstract void endGroup() throws IOException;
+
+ /**
+ * Start a new array of result.
+ */
+ abstract void startArray() throws IOException;
+
+ /**
+ * Start a new array of result with specified name.
+ */
+ abstract void startArray(String name) throws IOException;
+
+ /**
+ * Complete adding result to the last started array.
+ */
+ abstract void endArray() throws IOException;
+
+ /**
+ * Adds a int value to the InfoStore
+ */
+ abstract void addResult(String name, int value) throws IOException;
+
+ /**
+ * Adds a long value to the InfoStore
+ */
+ abstract void addResult(String name, long value) throws IOException;
+
+ /**
+ * Adds a float value to the InfoStore
+ */
+ abstract void addResult(String name, float value) throws IOException;
+
+ /**
+ * Adds a double value to the InfoStore
+ */
+ abstract void addResult(String name, double value) throws IOException;
+
+ /**
+ * Adds a boolean value to the InfoStore
+ */
+ abstract void addResult(String name, boolean value) throws IOException;
+
+ /**
+ * Adds a String value to the InfoStore
+ */
+ abstract void addResult(String name, String value) throws IOException;
+
+ /**
+ * Adds a int array to the InfoStore
+ */
+ abstract void addArrayResult(String name, int[] array) throws IOException;
+
+ /**
+ * Adds a long array to the InfoStore
+ */
+ abstract void addArrayResult(String name, long[] array) throws IOException;
+
+ /**
+ * Adds a float array to the InfoStore
+ */
+ abstract void addArrayResult(String name, float[] array) throws IOException;
+
+ /**
+ * Adds a double array to the InfoStore
+ */
+ abstract void addArrayResult(String name, double[] array) throws IOException;
+
+ /**
+ * Adds a boolean array to the InfoStore
+ */
+ abstract void addArrayResult(String name, boolean[] array) throws IOException;
+
+ /**
+ * Adds a List of String to the InfoStore
+ */
+ abstract void addListResult(String name, List<String> list) throws IOException;
+
+ protected static int[] checkArray(int[] values) {
+ if (values.length > MAX_ARRAY_LENGTH) {
+ return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
+ } else {
+ return values;
+ }
+ }
+
+ protected static long[] checkArray(long[] values) {
+ if (values.length > MAX_ARRAY_LENGTH) {
+ return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
+ } else {
+ return values;
+ }
+ }
+
+ protected static float[] checkArray(float[] values) {
+ if (values.length > MAX_ARRAY_LENGTH) {
+ return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
+ } else {
+ return values;
+ }
+ }
+
+ protected static double[] checkArray(double[] values) {
+ if (values.length > MAX_ARRAY_LENGTH) {
+ return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
+ } else {
+ return values;
+ }
+ }
+
+ protected static boolean[] checkArray(boolean[] values) {
+ if (values.length > MAX_ARRAY_LENGTH) {
+ return Arrays.copyOf(values, MAX_ARRAY_LENGTH);
+ } else {
+ return values;
+ }
+ }
+
+ protected static List<String> checkStringList(List<String> list) {
+ if (list.size() > MAX_LIST_LENGTH) {
+ return list.subList(0, MAX_LIST_LENGTH);
+ }
+ return list;
+ }
+
+ protected static String checkString(String value) {
+ if (value == null || value.isEmpty()) {
+ return "";
+ }
+ if (value.length() > MAX_STRING_LENGTH) {
+ return value.substring(0, MAX_STRING_LENGTH);
+ }
+ return value;
+ }
+
+ protected static String checkName(String value) {
+ if (value == null || value.isEmpty()) {
+ throw new NullPointerException();
+ }
+ return value;
+ }
+}
diff --git a/common/util/src/com/android/compatibility/common/util/MultipartForm.java b/common/util/src/com/android/compatibility/common/util/MultipartForm.java
index 4ae7860..c311492 100644
--- a/common/util/src/com/android/compatibility/common/util/MultipartForm.java
+++ b/common/util/src/com/android/compatibility/common/util/MultipartForm.java
@@ -77,21 +77,19 @@
*
* This will handle a redirection from the server.
*
+ * @return response code
* @throws IOException
*/
- public void submit() throws IOException {
- String redirectUrl = submitForm(mServerUrl);
- if (redirectUrl != null) {
- submitForm(redirectUrl);
- }
+ public int submit() throws IOException {
+ return submitForm(mServerUrl);
}
/**
* @param serverUrl to post the data to
- * @return a url if the server redirected to another url
+ * @return response code
* @throws IOException
*/
- private String submitForm(String serverUrl) throws IOException {
+ private int submitForm(String serverUrl) throws IOException {
HttpURLConnection connection = null;
try {
URL url = new URL(serverUrl);
@@ -116,16 +114,16 @@
InputStream input = connection.getInputStream();
input.close();
- if (connection.getResponseCode() == 302) {
- return connection.getHeaderField("Location");
+ int response = connection.getResponseCode();
+ if (response == 302) {
+ return submitForm(connection.getHeaderField("Location"));
}
+ return response;
} finally {
if (connection != null) {
connection.disconnect();
}
}
-
- return null;
}
/* package */ byte[] getContentBody() throws IOException {
diff --git a/common/util/src/com/android/compatibility/common/util/ResultUploader.java b/common/util/src/com/android/compatibility/common/util/ResultUploader.java
index ff8d156..e279333 100644
--- a/common/util/src/com/android/compatibility/common/util/ResultUploader.java
+++ b/common/util/src/com/android/compatibility/common/util/ResultUploader.java
@@ -44,15 +44,15 @@
* @param referenceUrl A reference url to use.
* @throws IOException
*/
- public void uploadResult(File reportFile, String referenceUrl) throws IOException {
+ public int uploadResult(File reportFile, String referenceUrl) throws IOException {
InputStream input = new FileInputStream(reportFile);
try {
byte[] data = getBytes(input);
- mMultipartForm.addFormFile("result-xml", "test-result.xml.gz", data);
+ mMultipartForm.addFormFile("resultXml", "test-result.xml.gz", data);
if (referenceUrl == null || referenceUrl.trim().isEmpty()) {
mMultipartForm.addFormValue("reference-url", referenceUrl);
}
- mMultipartForm.submit();
+ return mMultipartForm.submit();
} finally {
input.close();
}
diff --git a/common/util/src/com/android/compatibility/common/util/TestResult.java b/common/util/src/com/android/compatibility/common/util/TestResult.java
index 03aaca29..1bda3af 100644
--- a/common/util/src/com/android/compatibility/common/util/TestResult.java
+++ b/common/util/src/com/android/compatibility/common/util/TestResult.java
@@ -200,6 +200,14 @@
* {@inheritDoc}
*/
@Override
+ public void notExecuted() {
+ setResultStatus(TestStatus.NOT_EXECUTED);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
public void reset() {
mResult = TestStatus.NOT_EXECUTED;
mMessage = null;
diff --git a/hostsidetests/aadb/src/android/aadb/cts/TestDeviceFuncTest.java b/hostsidetests/aadb/src/android/aadb/cts/TestDeviceFuncTest.java
index ddc3e82..6a77674 100644
--- a/hostsidetests/aadb/src/android/aadb/cts/TestDeviceFuncTest.java
+++ b/hostsidetests/aadb/src/android/aadb/cts/TestDeviceFuncTest.java
@@ -16,7 +16,6 @@
package android.aadb.cts;
import com.android.ddmlib.IDevice;
-import com.android.ddmlib.Log;
import com.android.ddmlib.testrunner.RemoteAndroidTestRunner;
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.device.IFileEntry;
@@ -49,7 +48,6 @@
*/
public class TestDeviceFuncTest extends DeviceTestCase {
- private static final String LOG_TAG = "TestDeviceFuncTest";
private ITestDevice mTestDevice;
/** Expect bugreports to be at least a meg. */
private static final int mMinBugreportBytes = 1024 * 1024;
@@ -78,7 +76,7 @@
* Do a 'shell ls' command, and verify /data and /system are listed in result.
*/
public void testExecuteShellCommand() throws IOException, DeviceNotAvailableException {
- Log.i(LOG_TAG, "testExecuteShellCommand");
+ CLog.i("testExecuteShellCommand");
assertSimpleShellCommand();
}
@@ -97,7 +95,7 @@
* Push and then pull a file from device, and verify contents are as expected.
*/
public void testPushPull_normal() throws IOException, DeviceNotAvailableException {
- Log.i(LOG_TAG, "testPushPull");
+ CLog.i("testPushPull");
File tmpFile = null;
File tmpDestFile = null;
String deviceFilePath = null;
@@ -133,7 +131,7 @@
* This variant of the test uses "${EXTERNAL_STORAGE}" in the pathname.
*/
public void testPushPull_extStorageVariable() throws IOException, DeviceNotAvailableException {
- Log.i(LOG_TAG, "testPushPull");
+ CLog.i("testPushPull");
File tmpFile = null;
File tmpDestFile = null;
File tmpDestFile2 = null;
@@ -178,7 +176,7 @@
* Expect {@link TestDevice#pullFile(String)} to return <code>false</code>
*/
public void testPull_noexist() throws IOException, DeviceNotAvailableException {
- Log.i(LOG_TAG, "testPull_noexist");
+ CLog.i("testPull_noexist");
// make sure the root path is valid
String externalStorePath = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE);
@@ -354,7 +352,7 @@
InputStream inputStream = source.createInputStream();
try {
BufferedImage screenshotImage = ImageIO.read(inputStream);
- CLog.i(LOG_TAG, "testGetScreenshot w=%d, h=%d",
+ CLog.i("testGetScreenshot w=%d, h=%d",
screenshotImage.getWidth(), screenshotImage.getHeight());
assertTrue(screenshotImage.getWidth() > 0);
assertTrue(screenshotImage.getHeight() > 0);
@@ -371,7 +369,7 @@
* equal to provided data.
*/
public void testGetLogcat_size() throws DeviceNotAvailableException, IOException {
- CLog.i(LOG_TAG, "testGetLogcat_size");
+ CLog.i("testGetLogcat_size");
for (int i = 0; i < 100; i++) {
getDevice().executeShellCommand(String.format("log testGetLogcat_size log dump %d", i));
}
diff --git a/hostsidetests/vm/Android.mk b/hostsidetests/abioverride/Android.mk
similarity index 68%
rename from hostsidetests/vm/Android.mk
rename to hostsidetests/abioverride/Android.mk
index 4085248..56fcc44 100644
--- a/hostsidetests/vm/Android.mk
+++ b/hostsidetests/abioverride/Android.mk
@@ -12,24 +12,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-LOCAL_PATH:= $(call my-dir)
+LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_JAVA_LIBRARIES := cts-tradefed_v2 compatibility-host-util tradefed-prebuilt
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_MODULE := CtsAbiOverrideHostTestCases
+
+LOCAL_MODULE_TAGS := tests
+
+# tag this module as a cts_v2 test artifact
+LOCAL_COMPATIBILITY_SUITE := cts_v2
+
+LOCAL_CTS_TEST_PACKAGE := android.host.abioverride
LOCAL_STATIC_JAVA_LIBRARIES := cts-migration-lib
-LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_JAVA_LIBRARIES := compatibility-host-util cts-tradefed_v2 tradefed-prebuilt
-# Tag this module as a cts_v2 test artifact
-LOCAL_COMPATIBILITY_SUITE := cts_v2
-
-LOCAL_MODULE := CtsVmHostTestCases
-
-# Copy the test jar to CTS
-LOCAL_COMPATIBILITY_SUPPORT_FILES += $(call intermediates-dir-for,JAVA_LIBRARIES,vm-tests-tf,HOST)/android.core.vm-tests-tf.jar:android.core.vm-tests-tf.jar
-
-include $(BUILD_HOST_JAVA_LIBRARY)
+include $(BUILD_CTS_HOST_JAVA_LIBRARY)
include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/abioverride/AndroidTest.xml b/hostsidetests/abioverride/AndroidTest.xml
similarity index 74%
rename from tests/abioverride/AndroidTest.xml
rename to hostsidetests/abioverride/AndroidTest.xml
index cbe4d6a..7819f9b 100644
--- a/tests/abioverride/AndroidTest.xml
+++ b/hostsidetests/abioverride/AndroidTest.xml
@@ -13,12 +13,12 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<configuration description="Config for CTS AbiOverride test cases">
+<configuration description="Config for CTS AbiOverride host test cases">
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkInstaller">
<option name="cleanup-apks" value="true" />
- <option name="test-file-name" value="CtsAbiOverrideTestCases.apk" />
+ <option name="test-file-name" value="CtsAbiOverrideTestApp.apk" />
</target_preparer>
- <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
- <option name="package" value="android.abioverride.cts" />
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsAbiOverrideHostTestCases.jar" />
</test>
</configuration>
diff --git a/tests/abioverride/Android.mk b/hostsidetests/abioverride/app/Android.mk
similarity index 96%
rename from tests/abioverride/Android.mk
rename to hostsidetests/abioverride/app/Android.mk
index 14f0f49..4eb3292 100755
--- a/tests/abioverride/Android.mk
+++ b/hostsidetests/abioverride/app/Android.mk
@@ -36,7 +36,7 @@
# Tag this module as a cts_v2 test artifact
LOCAL_COMPATIBILITY_SUITE := cts_v2
-LOCAL_PACKAGE_NAME := CtsAbiOverrideTestCases
+LOCAL_PACKAGE_NAME := CtsAbiOverrideTestApp
LOCAL_SDK_VERSION := current
diff --git a/tests/abioverride/AndroidManifest.xml b/hostsidetests/abioverride/app/AndroidManifest.xml
similarity index 70%
rename from tests/abioverride/AndroidManifest.xml
rename to hostsidetests/abioverride/app/AndroidManifest.xml
index 47b1642..c42d3a8 100755
--- a/tests/abioverride/AndroidManifest.xml
+++ b/hostsidetests/abioverride/app/AndroidManifest.xml
@@ -16,22 +16,14 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.abioverride.cts">
+ package="android.abioverride.app">
<application android:use32bitAbi="true" android:multiArch="true">
- <uses-library android:name="android.test.runner" />
- <activity android:name="android.abioverride.AbiOverrideActivity" >
+ <activity android:name=".AbiOverrideActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
-
- <!-- self-instrumenting test package. -->
- <instrumentation
- android:name="android.support.test.runner.AndroidJUnitRunner"
- android:label="AbiOverride tests"
- android:targetPackage="android.abioverride.cts" >
- </instrumentation>
</manifest>
diff --git a/tests/abioverride/jni/Android.mk b/hostsidetests/abioverride/app/jni/Android.mk
similarity index 93%
rename from tests/abioverride/jni/Android.mk
rename to hostsidetests/abioverride/app/jni/Android.mk
index a9dac42..c500100 100644
--- a/tests/abioverride/jni/Android.mk
+++ b/hostsidetests/abioverride/app/jni/Android.mk
@@ -25,6 +25,9 @@
LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
+# Ignore unused parameters.
+LOCAL_CFLAGS += -Wno-unused-parameter
+
LOCAL_SHARED_LIBRARIES := libnativehelper_compat_libc++ liblog libdl
LOCAL_CXX_STL := none
diff --git a/tests/abioverride/jni/CtsAbiOverrideJniOnLoad.cpp b/hostsidetests/abioverride/app/jni/CtsAbiOverrideJniOnLoad.cpp
similarity index 100%
rename from tests/abioverride/jni/CtsAbiOverrideJniOnLoad.cpp
rename to hostsidetests/abioverride/app/jni/CtsAbiOverrideJniOnLoad.cpp
diff --git a/tests/abioverride/src/android/abioverride/AbiOverrideActivity.java b/hostsidetests/abioverride/app/src/android/abioverride/app/AbiOverrideActivity.java
similarity index 78%
rename from tests/abioverride/src/android/abioverride/AbiOverrideActivity.java
rename to hostsidetests/abioverride/app/src/android/abioverride/app/AbiOverrideActivity.java
index ddf0b59..814dcf7 100644
--- a/tests/abioverride/src/android/abioverride/AbiOverrideActivity.java
+++ b/hostsidetests/abioverride/app/src/android/abioverride/app/AbiOverrideActivity.java
@@ -14,24 +14,25 @@
* limitations under the License.
*/
-package android.abioverride;
+package android.abioverride.app;
import android.app.Activity;
import android.os.Bundle;
import android.os.Process;
-
-import java.lang.Override;
+import android.util.Log;
/**
* A simple activity for testing abioverride manifest flag.
*/
public class AbiOverrideActivity extends Activity {
+
+ public static final String TEST_STRING = "Is64bit ";
+
+ private static final String TAG = AbiOverrideActivity.class.getSimpleName();
+
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
- }
-
- public boolean is64Bit() {
- return Process.is64Bit();
+ Log.i(TAG, TEST_STRING + Process.is64Bit());
}
}
diff --git a/hostsidetests/abioverride/src/android/abioverride/cts/AbiOverrideTest.java b/hostsidetests/abioverride/src/android/abioverride/cts/AbiOverrideTest.java
new file mode 100644
index 0000000..65bfdf8
--- /dev/null
+++ b/hostsidetests/abioverride/src/android/abioverride/cts/AbiOverrideTest.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package android.abioverride.cts;
+
+import com.android.cts.migration.MigrationHelper;
+import com.android.tradefed.build.IBuildInfo;
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.testtype.DeviceTestCase;
+import com.android.tradefed.testtype.IBuildReceiver;
+
+import java.io.File;
+import java.util.Scanner;
+
+/**
+ * Test to check the APK runs in 32bit ABI.
+ *
+ * When this test builds, it also builds {@link android.abioverride.app.AbiOverrideActivity}
+ * into an APK which it then installed at runtime and started. The activity simply prints
+ * a message to Logcat and then gets uninstalled. The test verifies that logcat has the right
+ * string.
+ */
+public class AbiOverrideTest extends DeviceTestCase implements IBuildReceiver {
+
+ /**
+ * The package name of the APK.
+ */
+ private static final String PACKAGE = "android.abioverride.app";
+
+ /**
+ * The class name of the main activity in the APK.
+ */
+ private static final String CLASS = "AbiOverrideActivity";
+
+ /**
+ * The class name of the main activity in the APK.
+ */
+ private static final String APK_NAME="CtsAbiOverrideHostApp.apk";
+
+ /**
+ * The command to launch the main activity.
+ */
+ private static final String START_COMMAND = String.format(
+ "am start -W -a android.intent.action.MAIN -n %s/%s.%s", PACKAGE, PACKAGE, CLASS);
+
+
+ private static final String TEST_STRING = "Is64bit ";
+ // android.abioverride.app.AbiOverrideActivity.TEST_STRING;
+
+ private IBuildInfo mBuild;
+
+ @Override
+ public void setBuild(IBuildInfo buildInfo) {
+ mBuild = buildInfo;
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ ITestDevice device = getDevice();
+ device.uninstallPackage(PACKAGE);
+ File app = MigrationHelper.getTestFile(mBuild, APK_NAME);
+ String[] options = {};
+ device.installPackage(app, false, options);
+ }
+
+ /**
+ * Tests the abi is correctly set to 32bit when use32BitAbi is set to true.
+ *
+ * @throws Exception
+ */
+ public void testAbiIs32bit() throws Exception {
+ ITestDevice device = getDevice();
+ // Clear logcat.
+ device.executeAdbCommand("logcat", "-c");
+ // Start the APK and wait for it to complete.
+ device.executeShellCommand(START_COMMAND);
+ // Dump logcat
+ String logs = device.executeAdbCommand("logcat", "-v", "brief", "-d", CLASS + ":I", "*:S");
+ // Search for string.
+ String testString = "";
+ Scanner in = new Scanner(logs);
+ while (in.hasNextLine()) {
+ String line = in.nextLine();
+ if(line.startsWith("I/"+CLASS)) {
+ testString = line.split(":")[1].trim();
+ }
+ }
+ in.close();
+ // Verify that TEST_STRING is actually found in logs.
+ assertTrue("No result found in logs", testString.startsWith(TEST_STRING));
+ // Assert that the result is false
+ assertEquals("Incorrect abi", TEST_STRING + "false", testString);
+ }
+}
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/DocumentsTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/DocumentsTest.java
index 97e0041..25ee645 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/DocumentsTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/DocumentsTest.java
@@ -104,6 +104,11 @@
runDeviceTests(CLIENT_PKG, ".DocumentsClientTest", "testOpenExternalDirectory_userAccepts");
}
+ public void testOpenExternalDirectory_notAskedAgain() throws Exception {
+ runDeviceTests(CLIENT_PKG, ".DocumentsClientTest",
+ "testOpenExternalDirectory_notAskedAgain");
+ }
+
public void testOpenExternalDirectory_userAcceptsNewDirectory() throws Exception {
// TODO: figure out a better way to remove the directory.
final String command = "rm -rf /sdcard/Pictures";
diff --git a/hostsidetests/appsecurity/test-apps/DocumentClient/src/com/android/cts/documentclient/DocumentsClientTest.java b/hostsidetests/appsecurity/test-apps/DocumentClient/src/com/android/cts/documentclient/DocumentsClientTest.java
index e93d5c7..69583a7 100644
--- a/hostsidetests/appsecurity/test-apps/DocumentClient/src/com/android/cts/documentclient/DocumentsClientTest.java
+++ b/hostsidetests/appsecurity/test-apps/DocumentClient/src/com/android/cts/documentclient/DocumentsClientTest.java
@@ -28,6 +28,7 @@
import static android.os.Environment.DIRECTORY_RINGTONES;
import static android.os.Environment.getExternalStorageDirectory;
import static android.test.MoreAsserts.assertContainsRegex;
+import static android.test.MoreAsserts.assertNotEqual;
import java.io.ByteArrayOutputStream;
import java.io.File;
@@ -37,6 +38,7 @@
import java.io.OutputStream;
import android.app.Activity;
+import android.app.ActivityManager;
import android.app.Instrumentation;
import android.content.ContentResolver;
import android.content.Context;
@@ -368,13 +370,6 @@
}
}
- // Not called by hostside tests, but useful during development...
- public void testOpenExternalDirectory() throws Exception {
- testOpenExternalDirectory_invalidPath();
- testOpenExternalDirectory_userRejects();
- testOpenExternalDirectory_userAccepts();
- }
-
public void testOpenExternalDirectory_invalidPath() throws Exception {
if (!supportedHardware()) return;
@@ -413,20 +408,39 @@
return;
for (StorageVolume volume : getVolumes()) {
- userAcceptsOpenExternalDirectoryTest(volume);
+ userAcceptsOpenExternalDirectoryTest(volume, DIRECTORY_PICTURES);
}
}
- private void userAcceptsOpenExternalDirectoryTest(StorageVolume volume) throws Exception {
+ public void testOpenExternalDirectory_notAskedAgain() throws Exception {
+ if (!supportedHardware())
+ return;
+
+ final StorageVolume volume = getPrimaryVolume();
+ final Uri grantedUri = userAcceptsOpenExternalDirectoryTest(volume, DIRECTORY_PICTURES);
+
+ // Calls it again - since the permission has been granted, it should return right away,
+ // without popping up the permissions dialog.
+ sendOpenExternalDirectoryIntent(volume, DIRECTORY_PICTURES);
+ final Intent newData = assertActivitySucceeded();
+ assertEquals(grantedUri, newData.getData());
+
+ // Make sure other directories still require user permission.
+ final Uri grantedUri2 = userAcceptsOpenExternalDirectoryTest(volume, DIRECTORY_ALARMS);
+ assertNotEqual(grantedUri, grantedUri2);
+ }
+
+ private Uri userAcceptsOpenExternalDirectoryTest(StorageVolume volume, String directoryName)
+ throws Exception {
// Asserts dialog contain the proper message.
- final UiAlertDialog dialog = openExternalDirectoryValidPath(volume, DIRECTORY_PICTURES);
+ final UiAlertDialog dialog = openExternalDirectoryValidPath(volume, directoryName);
final String message = dialog.messageText.getText();
Log.v(TAG, "request permission message: " + message);
final Context context = getInstrumentation().getTargetContext();
final String appLabel = context.getPackageManager().getApplicationLabel(
context.getApplicationInfo()).toString();
assertContainsRegex("missing app label", appLabel, message);
- assertContainsRegex("missing folder", DIRECTORY_PICTURES, message);
+ assertContainsRegex("missing folder", directoryName, message);
assertContainsRegex("missing root", volume.getDescription(context), message);
// Call API...
@@ -446,7 +460,7 @@
// ...and indirectly by creating some documents
final Uri doc = DocumentsContract.buildDocumentUriUsingTree(grantedUri,
DocumentsContract.getTreeDocumentId(grantedUri));
- assertNotNull("could not get tree UURI", doc);
+ assertNotNull("could not get tree URI", doc);
final Uri pic = DocumentsContract.createDocument(resolver, doc, "image/png", "pic.png");
assertNotNull("could not create file (pic.png) on tree root", pic);
final Uri dir = DocumentsContract.createDocument(resolver, doc, Document.MIME_TYPE_DIR,
@@ -462,6 +476,8 @@
assertTrue("delete", DocumentsContract.deleteDocument(resolver, pic));
assertTrue("delete", DocumentsContract.deleteDocument(resolver, dirPic));
assertTrue("delete", DocumentsContract.deleteDocument(resolver, dir));
+
+ return grantedUri;
}
public void testGetContent() throws Exception {
diff --git a/hostsidetests/cpptools/Android.mk b/hostsidetests/cpptools/Android.mk
new file mode 100644
index 0000000..a4144a6
--- /dev/null
+++ b/hostsidetests/cpptools/Android.mk
@@ -0,0 +1,32 @@
+# Copyright (C) 2014 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# 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.
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_MODULE_TAGS := optional
+
+# Must match the package name in CtsTestCaseList.mk
+LOCAL_MODULE := CtsCppToolsTestCases
+
+LOCAL_JAVA_LIBRARIES := cts-tradefed ddmlib-prebuilt tradefed-prebuilt
+
+LOCAL_CTS_TEST_PACKAGE := android.tests.cpptools
+
+include $(BUILD_CTS_HOST_JAVA_LIBRARY)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tests/abioverride/jni/Android.mk b/hostsidetests/cpptools/app/Android.mk
similarity index 63%
copy from tests/abioverride/jni/Android.mk
copy to hostsidetests/cpptools/app/Android.mk
index a9dac42..238425a 100644
--- a/tests/abioverride/jni/Android.mk
+++ b/hostsidetests/cpptools/app/Android.mk
@@ -1,4 +1,4 @@
-# Copyright (C) 2016 The Android Open Source Project
+# Copyright (C) 2014 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -16,16 +16,16 @@
include $(CLEAR_VARS)
-LOCAL_MODULE := libctsabioverride
-
-# Don't include this package in any configuration by default.
+# Don't include this package in any target.
LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := CtsAbiOverrideJniOnLoad.cpp
+# When built, explicitly put it in the data partition.
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SHARED_LIBRARIES := libnativehelper_compat_libc++ liblog libdl
-LOCAL_CXX_STL := none
+LOCAL_PACKAGE_NAME := CtsCppToolsApp
-include $(BUILD_SHARED_LIBRARY)
+LOCAL_SDK_VERSION := current
+
+include $(BUILD_CTS_PACKAGE)
diff --git a/tests/abioverride/AndroidManifest.xml b/hostsidetests/cpptools/app/AndroidManifest.xml
similarity index 62%
copy from tests/abioverride/AndroidManifest.xml
copy to hostsidetests/cpptools/app/AndroidManifest.xml
index 47b1642..1748a38 100755
--- a/tests/abioverride/AndroidManifest.xml
+++ b/hostsidetests/cpptools/app/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,11 +16,11 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.abioverride.cts">
+ package="android.sample.app">
- <application android:use32bitAbi="true" android:multiArch="true">
- <uses-library android:name="android.test.runner" />
- <activity android:name="android.abioverride.AbiOverrideActivity" >
+ <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
+ <application android:debuggable="true">
+ <activity android:name=".SampleDeviceActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
@@ -28,10 +28,5 @@
</activity>
</application>
- <!-- self-instrumenting test package. -->
- <instrumentation
- android:name="android.support.test.runner.AndroidJUnitRunner"
- android:label="AbiOverride tests"
- android:targetPackage="android.abioverride.cts" >
- </instrumentation>
</manifest>
+
diff --git a/tests/abioverride/src/android/abioverride/AbiOverrideActivity.java b/hostsidetests/cpptools/app/src/android/sample/app/SampleDeviceActivity.java
similarity index 61%
copy from tests/abioverride/src/android/abioverride/AbiOverrideActivity.java
copy to hostsidetests/cpptools/app/src/android/sample/app/SampleDeviceActivity.java
index ddf0b59..d7efc0c 100644
--- a/tests/abioverride/src/android/abioverride/AbiOverrideActivity.java
+++ b/hostsidetests/cpptools/app/src/android/sample/app/SampleDeviceActivity.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 The Android Open Source Project
+ * Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,24 +14,31 @@
* limitations under the License.
*/
-package android.abioverride;
+package android.sample.app;
import android.app.Activity;
import android.os.Bundle;
-import android.os.Process;
+import android.util.Log;
import java.lang.Override;
/**
- * A simple activity for testing abioverride manifest flag.
+ * A simple activity which logs to Logcat.
*/
-public class AbiOverrideActivity extends Activity {
+public class SampleDeviceActivity extends Activity {
+
+ private static final String TAG = SampleDeviceActivity.class.getSimpleName();
+
+ /**
+ * The test string to log.
+ */
+ private static final String TEST_STRING = "SampleTestString";
+
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
+ // Log the test string to Logcat.
+ Log.i(TAG, TEST_STRING);
}
- public boolean is64Bit() {
- return Process.is64Bit();
- }
}
diff --git a/hostsidetests/cpptools/src/com/android/cts/cpptools/RunAsHostTest.java b/hostsidetests/cpptools/src/com/android/cts/cpptools/RunAsHostTest.java
new file mode 100644
index 0000000..24a3b0c
--- /dev/null
+++ b/hostsidetests/cpptools/src/com/android/cts/cpptools/RunAsHostTest.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package com.android.cts.cpptools;
+
+import com.android.cts.tradefed.build.CtsBuildHelper;
+import com.android.tradefed.build.IBuildInfo;
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.testtype.DeviceTestCase;
+import com.android.tradefed.testtype.IBuildReceiver;
+
+import java.io.File;
+import java.lang.String;
+import java.util.Scanner;
+import java.util.regex.Pattern;
+import java.util.regex.Matcher;
+
+/**
+ * Test to check the host can execute commands via "adb shell run-as".
+ */
+public class RunAsHostTest extends DeviceTestCase implements IBuildReceiver {
+
+ /**
+ * The package name of the APK.
+ */
+ private static final String PACKAGE = "android.sample.app";
+
+ /**
+ * The file name of the APK.
+ */
+ private static final String APK = "CtsCppToolsApp.apk";
+
+
+ /**
+ * A reference to the build.
+ */
+ private CtsBuildHelper mBuild;
+
+ /**
+ * A reference to the device under test.
+ */
+ private ITestDevice mDevice;
+
+ @Override
+ public void setBuild(IBuildInfo buildInfo) {
+ // Get the build, this is used to access the APK.
+ mBuild = CtsBuildHelper.createBuildHelper(buildInfo);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ // Get the device, this gives a handle to run commands and install APKs.
+ mDevice = getDevice();
+ // Remove any previously installed versions of this APK.
+ mDevice.uninstallPackage(PACKAGE);
+ // Get the APK from the build.
+ File app = mBuild.getTestApp(APK);
+ // Install the APK on the device.
+ mDevice.installPackage(app, false);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ // Remove the package once complete.
+ mDevice.uninstallPackage(PACKAGE);
+ super.tearDown();
+ }
+
+ /**
+ * Tests that host can execute shell commands as a debuggable app via adb.
+ *
+ * @throws Exception
+ */
+ public void testRunAs() throws Exception {
+ String runAsResult = mDevice.executeShellCommand("run-as android.sample.app id -u");
+ assertNotNull("adb shell command failed", runAsResult);
+ runAsResult = runAsResult.trim();
+ Matcher appIdMatcher = Pattern.compile("^uid=([0-9]+).*$").matcher(runAsResult);
+ assertTrue("unexpected result returned by adb shell command: \"" + runAsResult + "\"",
+ appIdMatcher.matches());
+ String appIdString = appIdMatcher.group(1);
+ assertTrue("invalid app id " + appIdString, Integer.parseInt(appIdString) > 10000);
+ }
+}
diff --git a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/AndroidManifest.xml b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/AndroidManifest.xml
index 647ba81..6bd8536 100644
--- a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/AndroidManifest.xml
+++ b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/AndroidManifest.xml
@@ -18,7 +18,9 @@
package="com.android.cts.deviceandprofileowner">
<uses-sdk android:minSdkVersion="23"/>
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
+ <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<application>
diff --git a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AlwaysOnVpnTest.java b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AlwaysOnVpnTest.java
new file mode 100644
index 0000000..8f561a6
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AlwaysOnVpnTest.java
@@ -0,0 +1,165 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package com.android.cts.deviceandprofileowner;
+
+import android.net.ConnectivityManager.NetworkCallback;
+import android.net.ConnectivityManager;
+import android.net.Network;
+import android.net.NetworkCapabilities;
+import android.net.NetworkRequest;
+import android.system.ErrnoException;
+import android.system.Os;
+import android.system.StructPollfd;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.FileDescriptor;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.Socket;
+import java.util.Arrays;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import static android.system.OsConstants.AF_INET;
+import static android.system.OsConstants.IPPROTO_ICMP;
+import static android.system.OsConstants.POLLIN;
+import static android.system.OsConstants.SOCK_DGRAM;
+
+/**
+ * Validates that a device owner or profile owner can set an always-on VPN without user action.
+ *
+ * A trivial VPN app is installed which reflects ping packets back to the sender. One ping packet is
+ * sent, received after its round-trip, and compared to the original packet to make sure nothing
+ * strange happened on the way through the VPN.
+ *
+ * All of the addresses in this test are fictional and any resemblance to real addresses is the
+ * result of a misconfigured network.
+ */
+public class AlwaysOnVpnTest extends BaseDeviceAdminTest {
+
+ private static final String VPN_PACKAGE = "com.android.cts.vpnfirewall";
+ private static final int NETWORK_TIMEOUT_MS = 5000;
+ private static final int NETWORK_SETTLE_GRACE_MS = 100;
+ private static final int SOCKET_TIMEOUT_MS = 5000;
+
+ private static final int ICMP_ECHO_REQUEST = 0x08;
+ private static final int ICMP_ECHO_REPLY = 0x00;
+
+ @Override
+ public void tearDown() throws Exception {
+ mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, null);
+ super.tearDown();
+ }
+
+ public void testAlwaysOnVpn() throws Exception {
+ final CountDownLatch vpnLatch = new CountDownLatch(1);
+
+ final ConnectivityManager cm =
+ (ConnectivityManager) mContext.getSystemService(mContext.CONNECTIVITY_SERVICE);
+
+ final NetworkRequest request = new NetworkRequest.Builder()
+ .addTransportType(NetworkCapabilities.TRANSPORT_VPN)
+ .removeCapability(NetworkCapabilities.NET_CAPABILITY_NOT_VPN)
+ .removeCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
+ .build();
+ final ConnectivityManager.NetworkCallback callback
+ = new ConnectivityManager.NetworkCallback() {
+ @Override
+ public void onAvailable(Network net) {
+ vpnLatch.countDown();
+ }
+ };
+
+ cm.registerNetworkCallback(request, callback);
+ try {
+ mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE);
+ assertTrue("Took too long waiting to establish a VPN-backed connection",
+ vpnLatch.await(NETWORK_TIMEOUT_MS, TimeUnit.MILLISECONDS));
+
+ // Give the VPN a moment to start transmitting data.
+ Thread.sleep(NETWORK_SETTLE_GRACE_MS);
+ } catch (InterruptedException e) {
+ fail("Interrupted while waiting to send ping: " + e);
+ } finally {
+ cm.unregisterNetworkCallback(callback);
+ }
+
+ // IP address reserved for documentation by rfc5737
+ checkPing("192.0.2.4");
+ }
+
+ private static void checkPing(String host) throws ErrnoException, IOException {
+ FileDescriptor socket = Os.socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP);
+
+ // Create an ICMP message
+ final int identifier = 0x7E57;
+ final String message = "test packet";
+ byte[] echo = createIcmpMessage(ICMP_ECHO_REQUEST, 0x00, identifier, 0, message.getBytes());
+
+ // Send the echo packet.
+ int port = new InetSocketAddress(0).getPort();
+ Os.connect(socket, InetAddress.getByName(host), port);
+ Os.write(socket, echo, 0, echo.length);
+
+ // Expect a reply.
+ StructPollfd pollfd = new StructPollfd();
+ pollfd.events = (short) POLLIN;
+ pollfd.fd = socket;
+ int ret = Os.poll(new StructPollfd[] { pollfd }, SOCKET_TIMEOUT_MS);
+ assertEquals("Expected reply after sending ping", 1, ret);
+
+ byte[] reply = new byte[echo.length];
+ int read = Os.read(socket, reply, 0, echo.length);
+ assertEquals(echo.length, read);
+
+ // Ignore control type differences since echo=8, reply=0.
+ assertEquals(echo[0], ICMP_ECHO_REQUEST);
+ assertEquals(reply[0], ICMP_ECHO_REPLY);
+ echo[0] = 0;
+ reply[0] = 0;
+
+ // Fix ICMP ID which kernel will have changed on the way out.
+ InetSocketAddress local = (InetSocketAddress) Os.getsockname(socket);
+ port = local.getPort();
+ echo[4] = (byte) ((port >> 8) & 0xFF);
+ echo[5] = (byte) (port & 0xFF);
+
+ // Ignore checksum differences since the types are not supposed to match.
+ echo[2] = echo[3] = 0;
+ reply[2] = reply[3] = 0;
+
+ assertTrue("Packet contents do not match."
+ + "\nEcho packet: " + Arrays.toString(echo)
+ + "\nReply packet: " + Arrays.toString(reply), Arrays.equals(echo, reply));
+ }
+
+ private static byte[] createIcmpMessage(int type, int code, int extra1, int extra2,
+ byte[] data) throws IOException {
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ DataOutputStream stream = new DataOutputStream(output);
+ stream.writeByte(type);
+ stream.writeByte(code);
+ stream.writeShort(/* checksum */ 0);
+ stream.writeShort((short) extra1);
+ stream.writeShort((short) extra2);
+ stream.write(data, 0, data.length);
+ return output.toByteArray();
+ }
+}
+
diff --git a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AudioRestrictionTest.java b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AudioRestrictionTest.java
new file mode 100644
index 0000000..0c60fa4
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AudioRestrictionTest.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package com.android.cts.deviceandprofileowner;
+
+import android.content.Context;
+import android.media.AudioManager;
+import android.os.SystemClock;
+import android.os.UserManager;
+
+import java.util.Objects;
+import java.util.concurrent.Callable;
+
+public class AudioRestrictionTest extends BaseDeviceAdminTest {
+
+ private AudioManager mAudioManager;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE);
+ }
+
+ private void disallowAdjustVolumeTestInternal(boolean setByAddUserRestiction) throws Exception {
+ try {
+ // Set volume of ringtone to be 1.
+ mAudioManager.setStreamVolume(AudioManager.STREAM_RING, 1, /* flag= */ 0);
+
+ // Disallow adjusting volume.
+ mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT,
+ UserManager.DISALLOW_ADJUST_VOLUME);
+ waitUntil(true, new Callable<Boolean>() {
+ @Override
+ public Boolean call() throws Exception {
+ return mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT);
+ }
+ });
+ // Verify that volume can't be changed.
+ mAudioManager.adjustVolume(AudioManager.ADJUST_RAISE, /* flag= */ 0);
+ assertEquals(1, mAudioManager.getStreamVolume(AudioManager.STREAM_RING));
+
+ // Allowing adjusting volume.
+ mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT,
+ UserManager.DISALLOW_ADJUST_VOLUME);
+ waitUntil(false, new Callable<Boolean>() {
+ @Override
+ public Boolean call() throws Exception {
+ return mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT);
+ }
+ });
+ // Verify the volume can be changed now.
+ mAudioManager.adjustVolume(AudioManager.ADJUST_RAISE, /* flag= */ 0);
+ waitUntil(2, new Callable<Integer>() {
+ @Override
+ public Integer call() throws Exception {
+ return mAudioManager.getStreamVolume(AudioManager.STREAM_RING);
+ }
+ });
+ } finally {
+ // Clear the restriction.
+ mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT,
+ UserManager.DISALLOW_ADJUST_VOLUME);
+ waitUntil(false, new Callable<Boolean>() {
+ @Override
+ public Boolean call() throws Exception {
+ return mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT);
+ }
+ });
+ }
+ }
+
+ public void testDisallowUnmuteMicrophone() throws Exception {
+ try {
+ mAudioManager.setMicrophoneMute(false);
+ assertFalse(mAudioManager.isMicrophoneMute());
+
+ // Disallow the microphone to be unmuted.
+ mDevicePolicyManager.addUserRestriction(
+ ADMIN_RECEIVER_COMPONENT, UserManager.DISALLOW_UNMUTE_MICROPHONE);
+ waitUntil(true, new Callable<Boolean>() {
+ @Override
+ public Boolean call() throws Exception {
+ return mAudioManager.isMicrophoneMute();
+ }
+ });
+ // Verify that we can't unmute the microphone.
+ mAudioManager.setMicrophoneMute(false);
+ assertTrue(mAudioManager.isMicrophoneMute());
+ } finally {
+ // Clear the restriction
+ mDevicePolicyManager.clearUserRestriction(
+ ADMIN_RECEIVER_COMPONENT, UserManager.DISALLOW_UNMUTE_MICROPHONE);
+ waitUntil(false, new Callable<Boolean>() {
+ @Override
+ public Boolean call() throws Exception {
+ return mAudioManager.isMicrophoneMute();
+ }
+ });
+ }
+ }
+
+ private <T> void waitUntil(T expected, Callable<T> c) throws Exception {
+ final long start = SystemClock.elapsedRealtime();
+ final int TIMEOUT_MS = 5 * 1000;
+
+ T actual;
+ while (!Objects.equals(expected, actual = c.call())) {
+ if ((SystemClock.elapsedRealtime() - start) >= TIMEOUT_MS) {
+ fail(String.format("Timed out waiting the value to change to %s (actual=%s)",
+ expected, actual));
+ }
+ Thread.sleep(200);
+ }
+ }
+}
diff --git a/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/BaseDeviceOwnerTest.java b/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/BaseDeviceOwnerTest.java
index b6815fd..b49f923 100644
--- a/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/BaseDeviceOwnerTest.java
+++ b/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/BaseDeviceOwnerTest.java
@@ -32,7 +32,7 @@
* assume these are done. The admin component can be accessed through
* {@link #getWho()}.
*/
-public class BaseDeviceOwnerTest extends AndroidTestCase {
+public abstract class BaseDeviceOwnerTest extends AndroidTestCase {
public static class BasicAdminReceiver extends DeviceAdminReceiver {
@Override
diff --git a/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/CreateAndManageUserTest.java b/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/CreateAndManageUserTest.java
index 3246401..cf28e7d 100644
--- a/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/CreateAndManageUserTest.java
+++ b/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/CreateAndManageUserTest.java
@@ -50,4 +50,31 @@
makeEphemeralFlag);
}
+ /**
+ * Test creating an ephemeral user using the {@link DevicePolicyManager#createAndManageUser}
+ * method fails on systems without the split system user.
+ *
+ * <p>To be used by host-side test on systems without the split system user.
+ */
+ public void testCreateAndManageEphemeralUserFails() throws Exception {
+ String testUserName = "TestUser_" + System.currentTimeMillis();
+
+ // Use reflection to get the value of the hidden flag to make the new user ephemeral.
+ Field field = DevicePolicyManager.class.getField("MAKE_USER_EPHEMERAL");
+ int makeEphemeralFlag = field.getInt(null);
+
+ try {
+ mDevicePolicyManager.createAndManageUser(
+ getWho(),
+ testUserName,
+ getWho(),
+ null,
+ makeEphemeralFlag);
+ } catch (IllegalArgumentException e) {
+ // Success, the expected exception was thrown.
+ return;
+ }
+ fail("createAndManageUser should have thrown IllegalArgumentException");
+ }
+
}
diff --git a/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ForceEphemeralUsersTest.java b/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ForceEphemeralUsersTest.java
index a5f59d4..c5fa4b2 100644
--- a/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ForceEphemeralUsersTest.java
+++ b/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ForceEphemeralUsersTest.java
@@ -19,6 +19,7 @@
import android.app.admin.DevicePolicyManager;
import android.content.ComponentName;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
@@ -43,4 +44,23 @@
assertTrue((boolean) getForceEphemeralUsersMethod.invoke(mDevicePolicyManager, getWho()));
}
+ /**
+ * Setting force-ephemeral-user policy should fail if not on system with split system user.
+ *
+ * <p>To be run on systems without split system user.
+ */
+ public void testSetForceEphemeralUsersFails() throws Exception {
+ Method setForceEphemeralUsersMethod = DevicePolicyManager.class.getDeclaredMethod(
+ "setForceEphemeralUsers", ComponentName.class, boolean.class);
+ try {
+ setForceEphemeralUsersMethod.invoke(mDevicePolicyManager, getWho(), true);
+ } catch (InvocationTargetException e) {
+ if (e.getCause() instanceof UnsupportedOperationException) {
+ // Test passed, the exception was thrown as expected.
+ return;
+ }
+ }
+ fail("UnsupportedOperationException should have been thrown by setForceEphemeralUsers");
+ }
+
}
diff --git a/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/WifiTest.java b/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/WifiTest.java
new file mode 100644
index 0000000..a585da4
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/WifiTest.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+package com.android.cts.deviceowner;
+
+import android.content.pm.PackageManager;
+import android.text.TextUtils;
+
+/**
+ * Tests that require the WiFi feature.
+ */
+public class WifiTest extends BaseDeviceOwnerTest {
+ public void testGetWifiMacAddress() {
+ if (!mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI)) {
+ // wifi not supported.
+ return;
+ }
+ final String macAddress = mDevicePolicyManager.getWifiMacAddress();
+
+ assertFalse("Device owner should be able to get the real MAC address",
+ "02:00:00:00:00:00".equals(macAddress));
+ assertFalse("getWifiMacAddress() returned an empty string. WiFi not enabled?",
+ TextUtils.isEmpty(macAddress));
+ }
+}
diff --git a/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/OrganizationInfoTest.java b/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/OrganizationInfoTest.java
index d426ba4..aa319e3 100644
--- a/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/OrganizationInfoTest.java
+++ b/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/OrganizationInfoTest.java
@@ -53,13 +53,44 @@
try {
mDevicePolicyManager.setOrganizationColor(null, Color.GRAY);
fail("Exception should have been thrown for null admin ComponentName");
- } catch (NullPointerException expected) {
+ } catch (Exception expected) {
}
try {
int color = mDevicePolicyManager.getOrganizationColor(null);
fail("Exception should have been thrown for null admin ComponentName");
- } catch (NullPointerException expected) {
+ } catch (Exception expected) {
+ }
+ }
+
+ public void testDefaultOrganizationNameIsNull() {
+ final String name = mDevicePolicyManager.getOrganizationName(ADMIN_RECEIVER_COMPONENT);
+ assertNull(name);
+ }
+
+ public void testSetOrganizationName() {
+ String previousName = mDevicePolicyManager.getOrganizationName(ADMIN_RECEIVER_COMPONENT);
+
+ try {
+ final String name = "test-set-name";
+ mDevicePolicyManager.setOrganizationName(ADMIN_RECEIVER_COMPONENT, name);
+ assertEquals(name, mDevicePolicyManager.getOrganizationName(ADMIN_RECEIVER_COMPONENT));
+ } finally {
+ mDevicePolicyManager.setOrganizationName(ADMIN_RECEIVER_COMPONENT, previousName);
+ }
+ }
+
+ public void testSetOrGetOrganizationNameWithNullAdminFails() {
+ try {
+ mDevicePolicyManager.setOrganizationName(null, "null-admin-fails");
+ fail("Exception should have been thrown for null admin ComponentName");
+ } catch (Exception expected) {
+ }
+
+ try {
+ String name = mDevicePolicyManager.getOrganizationName(null);
+ fail("Exception should have been thrown for null admin ComponentName");
+ } catch (Exception expected) {
}
}
}
diff --git a/tests/abioverride/Android.mk b/hostsidetests/devicepolicy/app/ProfileOwner/Android.mk
old mode 100755
new mode 100644
similarity index 63%
copy from tests/abioverride/Android.mk
copy to hostsidetests/devicepolicy/app/ProfileOwner/Android.mk
index 14f0f49..0a876f9
--- a/tests/abioverride/Android.mk
+++ b/hostsidetests/devicepolicy/app/ProfileOwner/Android.mk
@@ -16,30 +16,21 @@
include $(CLEAR_VARS)
-# Don't include this package in any target
-LOCAL_MODULE_TAGS := tests
-# When built, explicitly put it in the data partition.
+LOCAL_PACKAGE_NAME := CtsProfileOwnerApp
+
+LOCAL_MODULE_TAGS := optional
+
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_DEX_PREOPT := false
-
-LOCAL_PROGUARD_ENABLED := disabled
-
-LOCAL_MULTILIB := both
-
-LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util ctsdeviceutil ctstestrunner
-
-LOCAL_JNI_SHARED_LIBRARIES := libctsabioverride
-
LOCAL_SRC_FILES := $(call all-java-files-under, src)
-# Tag this module as a cts_v2 test artifact
-LOCAL_COMPATIBILITY_SUITE := cts_v2
+LOCAL_JAVA_LIBRARIES := android.test.runner cts-junit
-LOCAL_PACKAGE_NAME := CtsAbiOverrideTestCases
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner compatibility-device-util ub-uiautomator
LOCAL_SDK_VERSION := current
-include $(BUILD_CTS_PACKAGE)
+# tag this module as a cts_v2 test artifact
+LOCAL_COMPATIBILITY_SUITE := cts_v2
-include $(call all-makefiles-under,$(LOCAL_PATH))
+include $(BUILD_CTS_PACKAGE)
diff --git a/hostsidetests/devicepolicy/app/ProfileOwner/AndroidManifest.xml b/hostsidetests/devicepolicy/app/ProfileOwner/AndroidManifest.xml
new file mode 100644
index 0000000..7d71942
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/ProfileOwner/AndroidManifest.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.cts.profileowner" >
+
+ <uses-sdk android:minSdkVersion="24"/>
+
+ <application>
+ <uses-library android:name="android.test.runner" />
+ <receiver
+ android:name="com.android.cts.profileowner.BaseProfileOwnerTest$BasicAdminReceiver"
+ android:permission="android.permission.BIND_DEVICE_ADMIN">
+ <meta-data android:name="android.app.device_admin"
+ android:resource="@xml/device_admin" />
+ <intent-filter>
+ <action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
+ </intent-filter>
+ </receiver>
+ </application>
+
+ <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.cts.profileowner"
+ android:label="Profile Owner CTS tests"/>
+</manifest>
diff --git a/hostsidetests/devicepolicy/app/ProfileOwner/res/xml/device_admin.xml b/hostsidetests/devicepolicy/app/ProfileOwner/res/xml/device_admin.xml
new file mode 100644
index 0000000..ff086d6
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/ProfileOwner/res/xml/device_admin.xml
@@ -0,0 +1,4 @@
+<device-admin xmlns:android="http://schemas.android.com/apk/res/android" android:visible="false">
+ <uses-policies>
+ </uses-policies>
+</device-admin>
diff --git a/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/BaseProfileOwnerTest.java b/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/BaseProfileOwnerTest.java
new file mode 100644
index 0000000..f47f5a2
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/BaseProfileOwnerTest.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+package com.android.cts.profileowner;
+
+import android.app.admin.DeviceAdminReceiver;
+import android.app.admin.DevicePolicyManager;
+import android.content.ComponentName;
+import android.content.Context;
+import android.test.AndroidTestCase;
+
+public abstract class BaseProfileOwnerTest extends AndroidTestCase {
+
+ public static class BasicAdminReceiver extends DeviceAdminReceiver {
+ }
+
+ public static final String PACKAGE_NAME = BaseProfileOwnerTest.class.getPackage().getName();
+
+ protected DevicePolicyManager mDevicePolicyManager;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ mDevicePolicyManager = (DevicePolicyManager)
+ mContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
+ assertProfileOwner(mDevicePolicyManager);
+ }
+
+ static void assertProfileOwner(DevicePolicyManager dpm) {
+ assertNotNull(dpm);
+ assertTrue(dpm.isAdminActive(getWho()));
+ assertTrue(dpm.isProfileOwnerApp(PACKAGE_NAME));
+ }
+
+ protected static ComponentName getWho() {
+ return new ComponentName(PACKAGE_NAME, BasicAdminReceiver.class.getName());
+ }
+}
diff --git a/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/ClearProfileOwnerTest.java b/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/ClearProfileOwnerTest.java
new file mode 100644
index 0000000..2c7b240
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/ClearProfileOwnerTest.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package com.android.cts.profileowner;
+
+import android.app.admin.DevicePolicyManager;
+import android.content.ComponentName;
+import android.content.Context;
+import android.test.AndroidTestCase;
+
+public class ClearProfileOwnerTest extends AndroidTestCase {
+
+ private DevicePolicyManager mDevicePolicyManager;
+
+ @Override
+ protected void tearDown() throws Exception {
+ mDevicePolicyManager = (DevicePolicyManager)
+ mContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
+ if (mDevicePolicyManager != null) {
+ if (mDevicePolicyManager.isProfileOwnerApp(BaseProfileOwnerTest.PACKAGE_NAME)) {
+ mDevicePolicyManager.clearProfileOwner(BaseProfileOwnerTest.getWho());
+ }
+ assertFalse(mDevicePolicyManager.isProfileOwnerApp(BaseProfileOwnerTest.PACKAGE_NAME));
+
+ waitForActiveAdminRemoved(BaseProfileOwnerTest.getWho());
+ }
+
+ super.tearDown();
+ }
+
+ // This test clears the profile owner and active admin on tearDown(). To be called from the host
+ // side test once a test case is finished.
+ public void testClearProfileOwner() {
+ }
+
+ private void waitForActiveAdminRemoved(ComponentName cn) throws InterruptedException {
+ for (int i = 0; i < 1000 && mDevicePolicyManager.isAdminActive(cn); i++) {
+ Thread.sleep(100);
+ }
+ assertFalse(mDevicePolicyManager.isAdminActive(cn));
+ }
+}
diff --git a/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/WifiTest.java b/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/WifiTest.java
new file mode 100644
index 0000000..bbff4c5
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/WifiTest.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+package com.android.cts.profileowner;
+
+public class WifiTest extends BaseProfileOwnerTest {
+ public void testGetWifiMacAddress() {
+ try {
+ mDevicePolicyManager.getWifiMacAddress();
+ fail("Profile owner shouldn't be able to get the MAC address");
+ } catch (SecurityException e) {
+ if (!e.getMessage().contains("for policy #-2")) {
+ fail("Unexpected exception message: " + e.getMessage());
+ }
+ }
+ }
+}
diff --git a/tests/abioverride/jni/Android.mk b/hostsidetests/devicepolicy/app/VpnApp/Android.mk
similarity index 67%
copy from tests/abioverride/jni/Android.mk
copy to hostsidetests/devicepolicy/app/VpnApp/Android.mk
index a9dac42..f15bfe0 100644
--- a/tests/abioverride/jni/Android.mk
+++ b/hostsidetests/devicepolicy/app/VpnApp/Android.mk
@@ -16,16 +16,19 @@
include $(CLEAR_VARS)
-LOCAL_MODULE := libctsabioverride
+LOCAL_PACKAGE_NAME := CtsVpnFirewallApp
-# Don't include this package in any configuration by default.
LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := CtsAbiOverrideJniOnLoad.cpp
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_C_INCLUDES := $(JNI_H_INCLUDE)
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
-LOCAL_SHARED_LIBRARIES := libnativehelper_compat_libc++ liblog libdl
-LOCAL_CXX_STL := none
+LOCAL_JAVA_LIBRARIES := android.test.runner
-include $(BUILD_SHARED_LIBRARY)
+LOCAL_SDK_VERSION := current
+
+# tag this module as a cts_v2 test artifact
+LOCAL_COMPATIBILITY_SUITE := cts_v2
+
+include $(BUILD_CTS_PACKAGE)
diff --git a/hostsidetests/devicepolicy/app/VpnApp/AndroidManifest.xml b/hostsidetests/devicepolicy/app/VpnApp/AndroidManifest.xml
new file mode 100644
index 0000000..ea1a001
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/VpnApp/AndroidManifest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ 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.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.cts.vpnfirewall">
+
+ <uses-sdk android:minSdkVersion="22"/>
+
+ <application>
+ <service android:name=".ReflectorVpnService"
+ android:permission="android.permission.BIND_VPN_SERVICE">
+ <intent-filter>
+ <action android:name="android.net.VpnService"/>
+ </intent-filter>
+ </service>
+ </application>
+
+</manifest>
diff --git a/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/IcmpMessage.java b/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/IcmpMessage.java
new file mode 100644
index 0000000..6304236
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/IcmpMessage.java
@@ -0,0 +1,93 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package com.android.cts.vpnfirewall;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.Arrays;
+
+public class IcmpMessage {
+ int type;
+ int code;
+ long quench;
+ byte[] data;
+
+ IcmpMessage(DataInputStream stream, int length) throws IOException {
+ type = stream.readUnsignedByte();
+ code = stream.readUnsignedByte();
+ int checksum = stream.readUnsignedShort();
+ quench = stream.readInt() & 0xFFFFFFFFL;
+
+ int dataLength = length - 8;
+ data = new byte[dataLength];
+ int len = stream.read(data, 0, dataLength);
+ if (len != dataLength) {
+ throw new IOException("Expected " + dataLength + " data bytes, received " + len);
+ }
+
+ byte[] original = new byte[length];
+ stream.reset();
+ stream.readFully(original);
+ if (!Arrays.equals(original, getEncoded())) {
+ throw new IOException("Corrupted message. Checksum: " + checksum);
+ }
+ }
+
+ public byte[] getEncoded() throws IOException {
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ DataOutputStream stream = new DataOutputStream(output);
+
+ stream.writeByte(type);
+ stream.writeByte(code);
+ int checksumPosition = stream.size();
+ stream.writeShort(/* checksum */ 0);
+ stream.writeInt((int) quench);
+ stream.write(data, 0, data.length);
+
+ byte[] result = output.toByteArray();
+ int checksum = Rfc1071.checksum(result, result.length);
+ result[checksumPosition + 0] = (byte) ((checksum & 0xFF00) >> 8);
+ result[checksumPosition + 1] = (byte) ((checksum & 0x00FF));
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder out = new StringBuilder(64);
+ out.append("ICMP payload {");
+ out.append("\n Type: "); out.append(type);
+ out.append("\n Code: "); out.append(code);
+ out.append("\n Quench: "); out.append(quench);
+ out.append("\n Data: [");
+ for (int i = 0 ; i < data.length; i++) {
+ if (i % 16 == 0) {
+ out.append(String.format("\n%4s", ""));
+ }
+ if (Character.isLetter((char) data[i])) {
+ out.append(String.format(" %2c", (char) data[i]));
+ } else {
+ out.append(String.format(" %02X", data[i] & 0xFF));
+ }
+ }
+ out.append("\n ]");
+ out.append("\n}");
+ return out.toString();
+ }
+}
+
diff --git a/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/Ipv4Packet.java b/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/Ipv4Packet.java
new file mode 100644
index 0000000..461da1a
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/Ipv4Packet.java
@@ -0,0 +1,156 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package com.android.cts.vpnfirewall;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.net.Inet4Address;
+import java.util.Arrays;
+
+public class Ipv4Packet {
+ private static final int HEADER_MIN_LENGTH = 20;
+
+ int version;
+ int headerLength;
+ int type;
+ int totalLength;
+ int identification;
+ int flagsAndOffset;
+ int timeToLive;
+ int protocol;
+ Inet4Address sourceAddress;
+ Inet4Address destinationAddress;
+ byte[] options;
+ byte[] data;
+
+ public Ipv4Packet(DataInputStream stream) throws IOException {
+ int versionIhl = stream.readUnsignedByte();
+ version = (versionIhl & 0xF0) >> 4;
+ headerLength = (versionIhl & 0x0F) * 4;
+
+ type = stream.readUnsignedByte();
+ totalLength = stream.readUnsignedShort();
+ identification = stream.readUnsignedShort();
+ flagsAndOffset = stream.readUnsignedShort();
+ timeToLive = stream.readUnsignedByte();
+ protocol = stream.readUnsignedByte();
+ int checksum = stream.readUnsignedShort();
+
+ byte[] address = new byte[4];
+
+ stream.read(address, 0, address.length);
+ sourceAddress = (Inet4Address) Inet4Address.getByAddress(address);
+
+ stream.read(address, 0, address.length);
+ destinationAddress = (Inet4Address) Inet4Address.getByAddress(address);
+
+ if (headerLength < HEADER_MIN_LENGTH) {
+ throw new IllegalArgumentException("Header length = " + headerLength
+ + " is less than HEADER_MIN_LENGTH = " + HEADER_MIN_LENGTH);
+ }
+ options = new byte[headerLength - HEADER_MIN_LENGTH];
+ stream.read(options, 0, options.length);
+
+ if (totalLength < headerLength) {
+ throw new IllegalArgumentException("Total length = " + totalLength
+ + " is less than header length = " + headerLength);
+ }
+ data = new byte[totalLength - headerLength];
+ stream.read(data, 0, data.length);
+
+ byte[] original = new byte[totalLength];
+ stream.reset();
+ stream.readFully(original);
+ if (!Arrays.equals(original, getEncoded())) {
+ throw new IOException("Corrupted message. Checksum: " + checksum);
+ }
+ }
+
+ public void setOptions(byte[] newOptions) {
+ options = newOptions;
+ headerLength = HEADER_MIN_LENGTH + options.length;
+ }
+
+ public void setData(byte[] newData) {
+ data = newData;
+ totalLength = headerLength + data.length;
+ }
+
+ public byte[] getEncoded() throws IOException {
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ DataOutputStream stream = new DataOutputStream(output);
+
+ stream.writeByte((version << 4) | (headerLength / 4));
+ stream.writeByte(type);
+ stream.writeShort(totalLength);
+ stream.writeShort(identification);
+ stream.writeShort(flagsAndOffset);
+ stream.writeByte(timeToLive);
+ stream.writeByte(protocol);
+
+ int checksumPosition = stream.size();
+ stream.writeShort(/* checksum */ 0);
+ stream.write(sourceAddress.getAddress(), 0, 4);
+ stream.write(destinationAddress.getAddress(), 0, 4);
+ stream.write(options, 0, options.length);
+ stream.write(data, 0, data.length);
+ stream.close();
+
+ byte[] result = output.toByteArray();
+ int checksum = Rfc1071.checksum(result, headerLength);
+ result[checksumPosition + 0] = (byte) ((checksum & 0xFF00) >> 8);
+ result[checksumPosition + 1] = (byte) ((checksum & 0x00FF));
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder out = new StringBuilder(256);
+
+ out.append("IPv4 Packet {");
+ out.append("\n Version: ").append(version);
+ out.append("\n Header length: ").append(headerLength);
+ out.append("\n Type: ").append(type);
+ out.append("\n Total length: ").append(totalLength);
+ out.append("\n Identification: ").append(identification);
+ out.append("\n Flags + offset: ").append(flagsAndOffset);
+ out.append("\n Time to live: ").append(timeToLive);
+ out.append("\n Protocol: ").append(protocol);
+ out.append("\n Source: ").append(sourceAddress.getHostAddress());
+ out.append("\n Destination: ").append(destinationAddress.getHostAddress());
+ out.append("\n Options: [");
+ for (int i = 0 ; i < options.length; i++) {
+ if (i % 16 == 0) {
+ out.append(String.format("\n%4s", ""));
+ }
+ out.append(String.format(" %02X", options[i] & 0xFF));
+ }
+ out.append("\n ]");
+ out.append("\n Data: [");
+ for (int i = 0 ; i < data.length; i++) {
+ if (i % 16 == 0) {
+ out.append(String.format("\n%4s", ""));
+ }
+ out.append(String.format(" %02X", data[i] & 0xFF));
+ }
+ out.append("\n ]");
+ out.append("\n}");
+ return out.toString();
+ }
+}
diff --git a/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/PingReflector.java b/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/PingReflector.java
new file mode 100644
index 0000000..9ee1838
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/PingReflector.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package com.android.cts.vpnfirewall;
+
+import android.system.ErrnoException;
+import android.system.Os;
+import android.util.Log;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.FileDescriptor;
+import java.io.IOException;
+import java.net.Inet4Address;
+
+public class PingReflector extends Thread {
+ private static final String TAG = "PingReflector";
+
+ private static final int PROTOCOL_ICMP = 0x01;
+
+ private FileDescriptor mFd;
+ private byte[] mBuf;
+
+ public PingReflector(FileDescriptor fd, int mtu) {
+ super("PingReflector");
+ mFd = fd;
+ mBuf = new byte[mtu];
+ }
+
+ public void run() {
+ Log.i(TAG, "PingReflector starting fd=" + mFd + " valid=" + mFd.valid());
+ while (!interrupted() && mFd.valid()) {
+ int len = readPacket(mBuf);
+ if (len > 0) {
+ int version = mBuf[0] >> 4;
+ if (version != 4) {
+ Log.e(TAG, "Received packet version: " + version + ". Ignoring.");
+ continue;
+ }
+ try {
+ processPacket(mBuf, version, len, 0);
+ } catch (IOException e) {
+ Log.w(TAG, "Failed processing packet", e);
+ }
+ }
+ }
+ Log.i(TAG, "PingReflector exiting fd=" + mFd + " valid=" + mFd.valid());
+ }
+
+ private void processPacket(byte[] buf, int version, int len, int hdrLen) throws IOException {
+ IcmpMessage echo = null;
+ IcmpMessage response = null;
+
+ DataInputStream stream = new DataInputStream(new ByteArrayInputStream(buf));
+ Ipv4Packet packet = new Ipv4Packet(stream);
+ Log.i(TAG, "Packet contents:\n" + packet);
+
+ if (packet.protocol != PROTOCOL_ICMP) {
+ Log.i(TAG, "Protocol is " + packet.protocol + " not ICMP. Ignoring.");
+ return;
+ }
+
+ echo = new IcmpMessage(
+ new DataInputStream(new ByteArrayInputStream(packet.data)), packet.data.length);
+ Log.i(TAG, "Ping packet:\n" + echo);
+
+ // Swap src and dst IP addresses to route the packet back into the device.
+ Inet4Address tmp = packet.sourceAddress;
+ packet.sourceAddress = packet.destinationAddress;
+ packet.destinationAddress = tmp;
+
+ packet.setData(echo.getEncoded());
+ writePacket(packet.getEncoded());
+ Log.i(TAG, "Wrote packet back");
+ }
+
+ private void writePacket(byte[] buf) {
+ try {
+ Os.write(mFd, buf, 0, buf.length);
+ } catch (ErrnoException | IOException e) {
+ Log.e(TAG, "Error writing packet: " + e.getMessage(), e);
+ }
+ }
+
+ private int readPacket(byte[] buf) {
+ try {
+ return Os.read(mFd, buf, 0, buf.length);
+ } catch (ErrnoException | IOException e) {
+ Log.e(TAG, "Error reading packet: " + e.getMessage(), e);
+ return -1;
+ }
+ }
+}
diff --git a/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/ReflectorVpnService.java b/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/ReflectorVpnService.java
new file mode 100644
index 0000000..3d2c2ff
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/ReflectorVpnService.java
@@ -0,0 +1,159 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package com.android.cts.vpnfirewall;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.net.VpnService;
+import android.os.Bundle;
+import android.os.ParcelFileDescriptor;
+import android.os.UserManager;
+import android.text.TextUtils;
+import android.util.Log;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+public class ReflectorVpnService extends VpnService {
+
+ private static String TAG = "ReflectorVpnService";
+ private static int MTU = 1799;
+
+ private ParcelFileDescriptor mFd = null;
+ private PingReflector mPingReflector = null;
+
+ public static final String RESTRICTION_ADDRESSES = "vpn.addresses";
+ public static final String RESTRICTION_ROUTES = "vpn.routes";
+ public static final String RESTRICTION_ALLOWED = "vpn.allowed";
+ public static final String RESTRICTION_DISALLOWED = "vpn.disallowed";
+
+ @Override
+ public int onStartCommand(Intent intent, int flags, int startId) {
+ start();
+ return START_NOT_STICKY;
+ }
+
+ @Override
+ public void onDestroy() {
+ stop();
+ super.onDestroy();
+ }
+
+ private void start() {
+ VpnService.prepare(this);
+ Builder builder = new Builder();
+
+ final UserManager um = (UserManager) getSystemService(Context.USER_SERVICE);
+ final Bundle restrictions = um.getApplicationRestrictions(getPackageName());
+
+ String[] addressArray = restrictions.getStringArray(RESTRICTION_ADDRESSES);
+ if (addressArray == null) {
+ // Addresses for IPv4/IPv6 documentation purposes according to rfc5737/rfc3849.
+ addressArray = new String[] {"192.0.2.3/32", "2001:db8:1:2::/128"};
+ };
+ for (int i = 0; i < addressArray.length; i++) {
+ String[] prefixAndMask = addressArray[i].split("/");
+ try {
+ InetAddress address = InetAddress.getByName(prefixAndMask[0]);
+ int prefixLength = Integer.parseInt(prefixAndMask[1]);
+ builder.addAddress(address, prefixLength);
+ } catch (NumberFormatException | UnknownHostException e) {
+ Log.w(TAG, "Ill-formed address: " + addressArray[i]);
+ continue;
+ }
+ }
+
+ String[] routeArray = restrictions.getStringArray(RESTRICTION_ROUTES);
+ if (routeArray == null) {
+ routeArray = new String[] {"0.0.0.0/0", "::/0"};
+ }
+ for (int i = 0; i < routeArray.length; i++) {
+ String[] prefixAndMask = routeArray[i].split("/");
+ try {
+ InetAddress address = InetAddress.getByName(prefixAndMask[0]);
+ int prefixLength = Integer.parseInt(prefixAndMask[1]);
+ builder.addRoute(address, prefixLength);
+ } catch (NumberFormatException | UnknownHostException e) {
+ Log.w(TAG, "Ill-formed route: " + routeArray[i]);
+ continue;
+ }
+ }
+
+ String[] allowedArray = restrictions.getStringArray(RESTRICTION_ALLOWED);
+ if (allowedArray != null) {
+ for (int i = 0; i < allowedArray.length; i++) {
+ String allowedPackage = allowedArray[i];
+ if (!TextUtils.isEmpty(allowedPackage)) {
+ try {
+ builder.addAllowedApplication(allowedPackage);
+ } catch(NameNotFoundException e) {
+ Log.w(TAG, "Allowed package not found: " + allowedPackage);
+ continue;
+ }
+ }
+ }
+ }
+
+ String[] disallowedArray = restrictions.getStringArray(RESTRICTION_DISALLOWED);
+ if (disallowedArray != null) {
+ for (int i = 0; i < disallowedArray.length; i++) {
+ String disallowedPackage = disallowedArray[i];
+ if (!TextUtils.isEmpty(disallowedPackage)) {
+ try {
+ builder.addDisallowedApplication(disallowedPackage);
+ } catch(NameNotFoundException e) {
+ Log.w(TAG, "Disallowed package not found: " + disallowedPackage);
+ continue;
+ }
+ }
+ }
+ }
+
+ builder.setMtu(MTU);
+ builder.setBlocking(true);
+ builder.setSession(TAG);
+
+ mFd = builder.establish();
+ if (mFd == null) {
+ Log.e(TAG, "Unable to establish file descriptor for VPN connection");
+ return;
+ }
+ Log.i(TAG, "Established, fd=" + mFd.getFd());
+
+ mPingReflector = new PingReflector(mFd.getFileDescriptor(), MTU);
+ mPingReflector.start();
+ }
+
+ private void stop() {
+ if (mPingReflector != null) {
+ mPingReflector.interrupt();
+ mPingReflector = null;
+ }
+ try {
+ if (mFd != null) {
+ Log.i(TAG, "Closing filedescriptor");
+ mFd.close();
+ }
+ } catch(IOException e) {
+ Log.w(TAG, "Closing filedescriptor failed", e);
+ } finally {
+ mFd = null;
+ }
+ }
+}
diff --git a/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/Rfc1071.java b/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/Rfc1071.java
new file mode 100644
index 0000000..dbdf9f2
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/VpnApp/src/com/android/cts/vpnfirewall/Rfc1071.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package com.android.cts.vpnfirewall;
+
+public final class Rfc1071 {
+ static int checksum(byte[] data, int length) {
+ int sum = 0;
+
+ // High bytes (even indices)
+ for (int i = 0; i < length; i += 2) {
+ sum += (data[i] & 0xFF) << 8;
+ sum = (sum & 0xFFFF) + (sum >> 16);
+ }
+
+ // Low bytes (odd indices)
+ for (int i = 1; i < length; i += 2) {
+ sum += (data[i] & 0xFF);
+ sum = (sum & 0xFFFF) + (sum >> 16);
+ }
+
+ // Fix any one's-complement errors- sometimes it is necessary to rotate twice.
+ sum = (sum & 0xFFFF) + (sum >> 16);
+ return sum ^ 0xFFFF;
+ }
+}
diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java
index c2c5cba..81ad0f6 100644
--- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java
+++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceAndProfileOwnerTest.java
@@ -66,6 +66,9 @@
= "com.android.cts.devicepolicy.accountmanagement";
private static final String ACCOUNT_MANAGEMENT_APK = "CtsAccountManagementDevicePolicyApp.apk";
+ private static final String VPN_APP_PKG = "com.android.cts.vpnfirewall";
+ private static final String VPN_APP_APK = "CtsVpnFirewallApp.apk";
+
private static final String COMMAND_ADD_USER_RESTRICTION = "add-restriction";
private static final String COMMAND_CLEAR_USER_RESTRICTION = "clear-restriction";
private static final String COMMAND_BLOCK_ACCOUNT_TYPE = "block-accounttype";
@@ -89,6 +92,7 @@
getDevice().uninstallPackage(APP_RESTRICTIONS_TARGET_APP_PKG);
getDevice().uninstallPackage(CERT_INSTALLER_PKG);
getDevice().uninstallPackage(ACCOUNT_MANAGEMENT_PKG);
+ getDevice().uninstallPackage(VPN_APP_PKG);
}
super.tearDown();
}
@@ -150,6 +154,14 @@
executeDeviceTestMethod(".PermissionsTest", "testPermissionGrantState");
}
+ public void testAlwaysOnVpn() throws Exception {
+ if (!mHasFeature) {
+ return;
+ }
+ installAppAsUser(VPN_APP_APK, mUserId);
+ executeDeviceTestClass(".AlwaysOnVpnTest");
+ }
+
public void testPermissionPolicy() throws Exception {
if (!mHasFeature) {
return;
@@ -405,6 +417,13 @@
}
}
+ public void testAudioRestriction() throws Exception {
+ if (!mHasFeature) {
+ return;
+ }
+ executeDeviceTestClass(".AudioRestrictionTest");
+ }
+
protected void executeDeviceTestClass(String className) throws Exception {
assertTrue(runDeviceTestsAsUser(DEVICE_ADMIN_PKG, className, mUserId));
}
diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java
index 2d235f5..0b32a19 100644
--- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java
+++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java
@@ -43,6 +43,15 @@
private static final String CLEAR_DEVICE_OWNER_TEST_CLASS =
DEVICE_OWNER_PKG + ".ClearDeviceOwnerTest";
+ /** The ephemeral users are implemented and supported on the device. */
+ private boolean mHasEphemeralUserFeature;
+
+ /**
+ * Ephemeral users are implemented, but unsupported on the device (because of missing split
+ * system user).
+ */
+ private boolean mHasDisabledEphemeralUserFeature;
+
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -51,6 +60,9 @@
assertTrue("Failed to set device owner",
setDeviceOwner(DEVICE_OWNER_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS));
}
+ mHasEphemeralUserFeature = mHasFeature && canCreateAdditionalUsers(1) && hasUserSplit();
+ mHasDisabledEphemeralUserFeature =
+ mHasFeature && canCreateAdditionalUsers(1) && !hasUserSplit();
}
@Override
@@ -82,6 +94,13 @@
executeDeviceOwnerTest("LockScreenInfoTest");
}
+ public void testWifi() throws Exception {
+ if (hasDeviceFeature("android.hardware.wifi")) {
+ return;
+ }
+ executeDeviceOwnerTest("WifiTest");
+ }
+
public void testRemoteBugreportWithTwoUsers() throws Exception {
if (!mHasFeature || getMaxNumberOfUsersSupported() < 2) {
return;
@@ -102,12 +121,20 @@
/** Tries to toggle the force-ephemeral-users on and checks it was really set. */
public void testSetForceEphemeralUsers() throws Exception {
- if (!mHasFeature || getDevice().getApiLevel() < 24 /* Build.VERSION_CODES.N */
- || !canCreateAdditionalUsers(1)) {
+ if (!mHasEphemeralUserFeature) {
return;
}
// Set force-ephemeral-users policy and verify it was set.
- executeDeviceOwnerTest("ForceEphemeralUsersTest");
+ executeDeviceTestMethod(".ForceEphemeralUsersTest", "testSetForceEphemeralUsers");
+ }
+
+ /**
+ * Setting force-ephemeral-users policy to true without a split system user should fail.
+ */
+ public void testSetForceEphemeralUsersFailsWithoutSplitSystemUser() throws Exception {
+ if (mHasDisabledEphemeralUserFeature) {
+ executeDeviceTestMethod(".ForceEphemeralUsersTest", "testSetForceEphemeralUsersFails");
+ }
}
/**
@@ -117,8 +144,7 @@
* <p>If the current user is the system user, the other users are removed straight away.
*/
public void testRemoveUsersOnSetForceEphemeralUsers() throws Exception {
- if (!mHasFeature || getDevice().getApiLevel() < 24 /* Build.VERSION_CODES.N */
- || !canCreateAdditionalUsers(1)) {
+ if (!mHasEphemeralUserFeature) {
return;
}
@@ -127,7 +153,7 @@
assertTrue("User must have been created", listUsers().contains(userId));
// Set force-ephemeral-users policy and verify it was set.
- executeDeviceOwnerTest("ForceEphemeralUsersTest");
+ executeDeviceTestMethod(".ForceEphemeralUsersTest", "testSetForceEphemeralUsers");
// Users have to be removed when force-ephemeral-users is toggled on.
assertFalse("User must have been removed", listUsers().contains(userId));
@@ -141,8 +167,7 @@
* before all other users are removed.
*/
public void testRemoveUsersOnSetForceEphemeralUsersWithUserSwitch() throws Exception {
- if (!mHasFeature || getDevice().getApiLevel() < 24 /* Build.VERSION_CODES.N */
- || !canCreateAdditionalUsers(1)) {
+ if (!mHasEphemeralUserFeature) {
return;
}
@@ -154,7 +179,7 @@
switchUser(userId);
// Set force-ephemeral-users policy and verify it was set.
- executeDeviceOwnerTestAsUser("ForceEphemeralUsersTest", 0);
+ executeDeviceTestMethod(".ForceEphemeralUsersTest", "testSetForceEphemeralUsers");
// Make sure the user has been removed. As it is not a synchronous operation - switching to
// the system user must happen first - give the system a little bit of time for finishing
@@ -177,13 +202,12 @@
/** The users created after setting force-ephemeral-users policy to true must be ephemeral. */
public void testCreateUserAfterSetForceEphemeralUsers() throws Exception {
- if (!mHasFeature || getDevice().getApiLevel() < 24 /* Build.VERSION_CODES.N */
- || !canCreateAdditionalUsers(1)) {
+ if (!mHasEphemeralUserFeature) {
return;
}
// Set force-ephemeral-users policy and verify it was set.
- executeDeviceOwnerTest("ForceEphemeralUsersTest");
+ executeDeviceTestMethod(".ForceEphemeralUsersTest", "testSetForceEphemeralUsers");
int userId = createUser();
assertTrue("User must be ephemeral", 0 != (getUserFlags(userId) & FLAG_EPHEMERAL));
@@ -193,14 +217,12 @@
* Test creating an epehemeral user using the DevicePolicyManager's createAndManageUser method.
*/
public void testCreateAndManageEphemeralUser() throws Exception {
- if (!mHasFeature || getDevice().getApiLevel() < 24 /* Build.VERSION_CODES.N */
- || !canCreateAdditionalUsers(1)) {
+ if (!mHasEphemeralUserFeature) {
return;
}
ArrayList<Integer> originalUsers = listUsers();
- assertTrue(runDeviceTests(DEVICE_OWNER_PKG, ".CreateAndManageUserTest",
- "testCreateAndManageEphemeralUser", 0));
+ executeDeviceTestMethod(".CreateAndManageUserTest", "testCreateAndManageEphemeralUser");
ArrayList<Integer> newUsers = listUsers();
@@ -222,6 +244,17 @@
assertEquals("Ephemeral flag must be set", FLAG_EPHEMERAL, flags & FLAG_EPHEMERAL);
}
+ /**
+ * Test that creating an epehemeral user using the DevicePolicyManager's createAndManageUser
+ * method fails on systems without the split system user.
+ */
+ public void testCreateAndManageEphemeralUserFailsWithoutSplitSystemUser() throws Exception {
+ if (mHasDisabledEphemeralUserFeature) {
+ executeDeviceTestMethod(
+ ".CreateAndManageUserTest", "testCreateAndManageEphemeralUserFails");
+ }
+ }
+
public void testDeviceLoggingWithTwoUsers() throws Exception {
if (!mHasFeature || getMaxNumberOfUsersSupported() < 2) {
return;
@@ -298,12 +331,4 @@
assertTrue(runDeviceTestsAsUser(DEVICE_OWNER_PKG, className, testName,
/* deviceOwnerUserId */ 0));
}
-
- private void executeDeviceOwnerTestAsUser(String testClassName, int userId) throws Exception {
- if (!mHasFeature) {
- return;
- }
- String testClass = DEVICE_OWNER_PKG + "." + testClassName;
- assertTrue(testClass + " failed.", runDeviceTestsAsUser(DEVICE_OWNER_PKG, testClass, userId));
- }
}
diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/EphemeralUserTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/EphemeralUserTest.java
index 2133431..df4a47c 100644
--- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/EphemeralUserTest.java
+++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/EphemeralUserTest.java
@@ -24,8 +24,7 @@
@Override
protected void setUp() throws Exception {
super.setUp();
- mHasFeature = getDevice().getApiLevel() >= 24 /* Build.VERSION_CODES.N */
- && canCreateAdditionalUsers(1);
+ mHasFeature = canCreateAdditionalUsers(1);
}
@Override
@@ -36,7 +35,7 @@
/** The user should have the ephemeral flag set if it was created as ephemeral. */
public void testCreateEphemeralUser() throws Exception {
- if (!mHasFeature) {
+ if (!mHasFeature || !hasUserSplit()) {
return;
}
int userId = createUser(FLAG_EPHEMERAL);
@@ -73,7 +72,7 @@
* Ephemeral user should be automatically removed after it is stopped.
*/
public void testRemoveEphemeralOnStop() throws Exception {
- if (!mHasFeature) {
+ if (!mHasFeature || !hasUserSplit()) {
return;
}
int userId = createUser(FLAG_EPHEMERAL);
@@ -88,7 +87,7 @@
* and not ephemeral when the feature is not set.
*/
public void testEphemeralGuestFeature() throws Exception {
- if (!mHasFeature) {
+ if (!mHasFeature || !hasUserSplit()) {
return;
}
// Create a guest user.
@@ -104,6 +103,20 @@
}
}
+ /**
+ * Test that creating an ephemeral user fails on systems without the split system user.
+ */
+ public void testCreateEphemeralWithoutUserSplitFails() throws Exception {
+ if (!mHasFeature || hasUserSplit()) {
+ return;
+ }
+ String command ="pm create-user --ephemeral " + "TestUser_" + System.currentTimeMillis();
+ String commandOutput = getDevice().executeShellCommand(command);
+
+ assertEquals("Creating the epehemeral user should fail.",
+ "Error: couldn't create User.", commandOutput.trim());
+ }
+
private boolean getGuestUsersEphemeral() throws Exception {
String commandOutput = getDevice().executeShellCommand("dumpsys user");
String[] outputLines = commandOutput.split("\n");
diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ManagedProfileTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ManagedProfileTest.java
index 7a0e86a..dca463e 100644
--- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ManagedProfileTest.java
+++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ManagedProfileTest.java
@@ -465,6 +465,10 @@
if (!mHasFeature) {
return;
}
+ assertTrue(runDeviceTests(MANAGED_PROFILE_PKG, ".OrganizationInfoTest",
+ "testDefaultOrganizationColorIsGray", mProfileUserId));
+ assertTrue(runDeviceTests(MANAGED_PROFILE_PKG, ".OrganizationInfoTest",
+ "testDefaultOrganizationNameIsNull", mProfileUserId));
assertTrue(runDeviceTestsAsUser(MANAGED_PROFILE_PKG, ".OrganizationInfoTest",
mProfileUserId));
}
diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/MixedProfileOwnerTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/MixedProfileOwnerTest.java
index a527598..940faf6 100644
--- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/MixedProfileOwnerTest.java
+++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/MixedProfileOwnerTest.java
@@ -45,92 +45,4 @@
}
super.tearDown();
}
-
- @Override
- public void testPermissionAppUpdate() {
- // TODO Should it be failing?
- /*
-01-27 14:11:14 I/BaseDevicePolicyTest: Test com.android.cts.deviceandprofileowner.PermissionsTest#testPermissionUpdate_setAutoDeniedPolicy: FAILURE
-01-27 14:11:14 W/BaseDevicePolicyTest: junit.framework.AssertionFailedError
-at junit.framework.Assert.fail(Assert.java:48)
-at junit.framework.Assert.assertTrue(Assert.java:20)
-at junit.framework.Assert.assertNotNull(Assert.java:218)
-at junit.framework.Assert.assertNotNull(Assert.java:211)
-at com.android.cts.deviceandprofileowner.PermissionsTest$PermissionBroadcastReceiver.waitForBroadcast(PermissionsTest.java:315)
-at com.android.cts.deviceandprofileowner.PermissionsTest.assertPermissionRequest(PermissionsTest.java:241)
-at com.android.cts.deviceandprofileowner.PermissionsTest.assertPermissionRequest(PermissionsTest.java:229)
-at com.android.cts.deviceandprofileowner.PermissionsTest.testPermissionUpdate_setAutoDeniedPolicy(PermissionsTest.java:193)
-at java.lang.reflect.Method.invoke(Native Method)
-at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
-at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
-at junit.framework.TestCase.runBare(TestCase.java:134)
-at junit.framework.TestResult$1.protect(TestResult.java:115)
-at android.support.test.internal.runner.junit3.AndroidTestResult.runProtected(AndroidTestResult.java:77)
-at junit.framework.TestResult.run(TestResult.java:118)
-at android.support.test.internal.runner.junit3.AndroidTestResult.run(AndroidTestResult.java:55)
-at junit.framework.TestCase.run(TestCase.java:124)
-at android.support.test.internal.runner.junit3.NonLeakyTestSuite$NonLeakyTest.run(NonLeakyTestSuite.java:63)
-at junit.framework.TestSuite.runTest(TestSuite.java:243)
-at junit.framework.TestSuite.run(TestSuite.java:238)
-at android.support.test.internal.runner.junit3.DelegatingTestSuite.run(DelegatingTestSuite.java:103)
-at android.support.test.internal.runner.junit3.AndroidTestSuite.run(AndroidTestSuite.java:69)
-at android.support.test.internal.runner.junit3.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
-at org.junit.runners.Suite.runChild(Suite.java:128)
-at org.junit.runners.Suite.runChild(Suite.java:27)
-at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
-at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
-at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
-at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
-at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
-at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
-at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
-at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
-at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:54)
-at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:240)
-at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1870)
- */
- }
-
- @Override
- public void testPermissionPrompts() {
- // TODO Should it be failing?
- /*
-01-27 14:15:54 I/BaseDevicePolicyTest: Test com.android.cts.deviceandprofileowner.PermissionsTest#testPermissionPrompts: FAILURE
-01-27 14:15:54 W/BaseDevicePolicyTest: junit.framework.AssertionFailedError: Couldn't find button with resource id: permission_deny_button
-at junit.framework.Assert.fail(Assert.java:50)
-at junit.framework.Assert.assertTrue(Assert.java:20)
-at junit.framework.Assert.assertNotNull(Assert.java:218)
-at com.android.cts.deviceandprofileowner.PermissionsTest.pressPermissionPromptButton(PermissionsTest.java:298)
-at com.android.cts.deviceandprofileowner.PermissionsTest.assertPermissionRequest(PermissionsTest.java:240)
-at com.android.cts.deviceandprofileowner.PermissionsTest.testPermissionPrompts(PermissionsTest.java:177)
-at java.lang.reflect.Method.invoke(Native Method)
-at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
-at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
-at junit.framework.TestCase.runBare(TestCase.java:134)
-at junit.framework.TestResult$1.protect(TestResult.java:115)
-at android.support.test.internal.runner.junit3.AndroidTestResult.runProtected(AndroidTestResult.java:77)
-at junit.framework.TestResult.run(TestResult.java:118)
-at android.support.test.internal.runner.junit3.AndroidTestResult.run(AndroidTestResult.java:55)
-at junit.framework.TestCase.run(TestCase.java:124)
-at android.support.test.internal.runner.junit3.NonLeakyTestSuite$NonLeakyTest.run(NonLeakyTestSuite.java:63)
-at junit.framework.TestSuite.runTest(TestSuite.java:243)
-at junit.framework.TestSuite.run(TestSuite.java:238)
-at android.support.test.internal.runner.junit3.DelegatingTestSuite.run(DelegatingTestSuite.java:103)
-at android.support.test.internal.runner.junit3.AndroidTestSuite.run(AndroidTestSuite.java:69)
-at android.support.test.internal.runner.junit3.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
-at org.junit.runners.Suite.runChild(Suite.java:128)
-at org.junit.runners.Suite.runChild(Suite.java:27)
-at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
-at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
-at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
-at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
-at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
-at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
-at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
-at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
-at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:54)
-at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:240)
-at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1870)
- */
- }
}
diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ProfileOwnerTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ProfileOwnerTest.java
new file mode 100644
index 0000000..e81316c
--- /dev/null
+++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ProfileOwnerTest.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+package com.android.cts.devicepolicy;
+
+/**
+ * Host side tests for profile owner. Run the CtsProfileOwnerApp device side test.
+ */
+public class ProfileOwnerTest extends BaseDevicePolicyTest {
+ private static final String PROFILE_OWNER_PKG = "com.android.cts.profileowner";
+ private static final String PROFILE_OWNER_APK = "CtsProfileOwnerApp.apk";
+
+ private static final String ADMIN_RECEIVER_TEST_CLASS =
+ PROFILE_OWNER_PKG + ".BaseProfileOwnerTest$BasicAdminReceiver";
+ private static final String CLEAR_PROFILE_OWNER_TEST_CLASS =
+ PROFILE_OWNER_PKG + ".ClearProfileOwnerTest";
+
+ private int mUserId = 0;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ mUserId = getPrimaryUser();
+
+
+ if (mHasFeature) {
+ installApp(PROFILE_OWNER_APK);
+ assertTrue("Failed to set profile owner",
+ setProfileOwner(PROFILE_OWNER_PKG + "/" + ADMIN_RECEIVER_TEST_CLASS, mUserId));
+ }
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ if (mHasFeature) {
+ assertTrue("Failed to remove profile owner.",
+ runDeviceTests(PROFILE_OWNER_PKG, CLEAR_PROFILE_OWNER_TEST_CLASS));
+ getDevice().uninstallPackage(PROFILE_OWNER_PKG);
+ }
+
+ super.tearDown();
+ }
+
+ public void testWifi() throws Exception {
+ if (hasDeviceFeature("android.hardware.wifi")) {
+ return;
+ }
+ executeProfileOwnerTest("WifiTest");
+ }
+
+ private void executeProfileOwnerTest(String testClassName) throws Exception {
+ if (!mHasFeature) {
+ return;
+ }
+ String testClass = PROFILE_OWNER_PKG + "." + testClassName;
+ assertTrue(testClass + " failed.", runDeviceTests(PROFILE_OWNER_PKG, testClass));
+ }
+}
diff --git a/hostsidetests/net/app/AndroidManifest.xml b/hostsidetests/net/app/AndroidManifest.xml
index f44fdd1..c7978f8 100644
--- a/hostsidetests/net/app/AndroidManifest.xml
+++ b/hostsidetests/net/app/AndroidManifest.xml
@@ -15,11 +15,12 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.cts.net.hostside"
- android:sharedUserId="com.android.cts.net.hostside.apps">
+ package="com.android.cts.net.hostside">
- <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
+ <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
+ <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
+ <uses-permission android:name="android.permission.INTERNET"/>
<application>
<uses-library android:name="android.test.runner" />
diff --git a/hostsidetests/net/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java b/hostsidetests/net/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java
new file mode 100644
index 0000000..3f80b5a
--- /dev/null
+++ b/hostsidetests/net/app/src/com/android/cts/net/hostside/AbstractRestrictBackgroundNetworkTestCase.java
@@ -0,0 +1,354 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package com.android.cts.net.hostside;
+
+import static android.cts.util.SystemUtil.runShellCommand;
+import static android.net.ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED;
+import static android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_DISABLED;
+import static android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_ENABLED;
+import static android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_WHITELISTED;
+
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.TimeUnit;
+
+import android.app.Instrumentation;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
+import android.net.wifi.WifiManager;
+import android.test.InstrumentationTestCase;
+import android.util.Log;
+
+/**
+ * Superclass for tests related to background network restrictions.
+ */
+abstract class AbstractRestrictBackgroundNetworkTestCase extends InstrumentationTestCase {
+ protected static final String TAG = "RestrictBackgroundNetworkTests";
+
+ protected static final String TEST_PKG = "com.android.cts.net.hostside";
+ protected static final String TEST_APP2_PKG = "com.android.cts.net.hostside.app2";
+
+ private static final int SLEEP_TIME_SEC = 1;
+ private static final boolean DEBUG = true;
+
+ // Constants below must match values defined on app2's Common.java
+ private static final String MANIFEST_RECEIVER = "ManifestReceiver";
+ private static final String DYNAMIC_RECEIVER = "DynamicReceiver";
+ private static final String ACTION_GET_COUNTERS =
+ "com.android.cts.net.hostside.app2.action.GET_COUNTERS";
+ private static final String ACTION_CHECK_NETWORK =
+ "com.android.cts.net.hostside.app2.action.CHECK_NETWORK";
+ private static final String EXTRA_ACTION = "com.android.cts.net.hostside.app2.extra.ACTION";
+ private static final String EXTRA_RECEIVER_NAME =
+ "com.android.cts.net.hostside.app2.extra.RECEIVER_NAME";
+ private static final String RESULT_SEPARATOR = ";";
+ private static final String STATUS_NETWORK_UNAVAILABLE_PREFIX = "NetworkUnavailable:";
+ private static final String STATUS_NETWORK_AVAILABLE_PREFIX = "NetworkAvailable:";
+ private static final int NETWORK_TIMEOUT_MS = 15 * 1000;
+
+ // Must be higher than NETWORK_TIMEOUT_MS
+ private static final int ORDERED_BROADCAST_TIMEOUT_MS = NETWORK_TIMEOUT_MS * 4;
+
+ protected Context mContext;
+ protected Instrumentation mInstrumentation;
+ protected ConnectivityManager mCm;
+ protected WifiManager mWfm;
+ protected int mUid;
+ private boolean mResetMeteredWifi = false;
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ mInstrumentation = getInstrumentation();
+ mContext = mInstrumentation.getContext();
+ mCm = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
+ mWfm = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
+ mUid = mContext.getPackageManager().getPackageInfo(TEST_APP2_PKG, 0).applicationInfo.uid;
+ final int myUid = mContext.getPackageManager()
+ .getPackageInfo(mContext.getPackageName(), 0).applicationInfo.uid;
+
+ Log.d(TAG, "UIDS: test app=" + myUid + ", app2=" + mUid);
+
+ setMeteredNetwork();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+
+ if (mResetMeteredWifi) {
+ setWifiMeteredStatus(false);
+ }
+ }
+
+ protected void assertRestrictBackgroundChangedReceived(int expectedCount) throws Exception {
+ assertRestrictBackgroundChangedReceived(DYNAMIC_RECEIVER, expectedCount);
+ assertRestrictBackgroundChangedReceived(MANIFEST_RECEIVER, 0);
+ }
+
+ protected void assertRestrictBackgroundChangedReceived(String receiverName, int expectedCount)
+ throws Exception {
+ int attempts = 0;
+ int count = 0;
+ final int maxAttempts = 5;
+ do {
+ attempts++;
+ count = getNumberBroadcastsReceived(receiverName, ACTION_RESTRICT_BACKGROUND_CHANGED);
+ if (count == expectedCount) {
+ break;
+ }
+ Log.d(TAG, "Expecting count " + expectedCount + " but actual is " + count + " after "
+ + attempts + " attempts; sleeping "
+ + SLEEP_TIME_SEC + " seconds before trying again");
+ Thread.sleep(SLEEP_TIME_SEC * 1000);
+ } while (attempts <= maxAttempts);
+ assertEquals("Number of expected broadcasts for " + receiverName + " not reached after "
+ + maxAttempts * SLEEP_TIME_SEC + " seconds", expectedCount, count);
+ }
+
+ protected String sendOrderedBroadcast(Intent intent) throws Exception {
+ final LinkedBlockingQueue<String> result = new LinkedBlockingQueue<>(1);
+ Log.d(TAG, "Sending ordered broadcast: " + intent);
+ mContext.sendOrderedBroadcast(intent, null, new BroadcastReceiver() {
+
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ final String resultData = getResultData();
+ if (resultData == null) {
+ Log.e(TAG, "Received null data from ordered intent");
+ return;
+ }
+ result.offer(resultData);
+ }
+ }, null, 0, null, null);
+
+ final String resultData = result.poll(ORDERED_BROADCAST_TIMEOUT_MS, TimeUnit.MILLISECONDS);
+ Log.d(TAG, "Ordered broadcast response: " + resultData);
+ return resultData;
+ }
+
+ protected int getNumberBroadcastsReceived(String receiverName, String action) throws Exception {
+ final Intent intent = new Intent(ACTION_GET_COUNTERS);
+ intent.putExtra(EXTRA_ACTION, ACTION_RESTRICT_BACKGROUND_CHANGED);
+ intent.putExtra(EXTRA_RECEIVER_NAME, receiverName);
+ final String resultData = sendOrderedBroadcast(intent);
+ assertNotNull("timeout waiting for ordered broadcast result", resultData);
+ return Integer.valueOf(resultData);
+ }
+
+ protected void assertRestrictBackgroundStatus(int expectedApiStatus) throws Exception {
+ final Intent intent = new Intent(ACTION_CHECK_NETWORK);
+ final String resultData = sendOrderedBroadcast(intent);
+ final String[] resultItems = resultData.split(RESULT_SEPARATOR);
+ final String actualApiStatus = toString(Integer.parseInt(resultItems[0]));
+ // First asserts the API returns the proper value...
+ assertEquals("wrong status", toString(expectedApiStatus), actualApiStatus);
+
+ //...then the actual network status in the background thread.
+ final String networkStatus = getNetworkStatus(resultItems);
+ assertNetworkStatus(expectedApiStatus != RESTRICT_BACKGROUND_STATUS_ENABLED, networkStatus);
+ }
+
+ protected void assertBackgroundNetworkAccess(boolean expectAllowed) throws Exception {
+ final Intent intent = new Intent(ACTION_CHECK_NETWORK);
+ final String resultData = sendOrderedBroadcast(intent);
+ final String[] resultItems = resultData.split(RESULT_SEPARATOR);
+ final String networkStatus = getNetworkStatus(resultItems);
+ assertNetworkStatus(expectAllowed, networkStatus);
+ }
+
+ private String getNetworkStatus(String[] resultItems) {
+ return resultItems.length < 2 ? null : resultItems[1];
+ }
+
+ private void assertNetworkStatus(boolean expectAvailable, String status) throws Exception {
+ if (status == null) {
+ Log.d(TAG, "timeout waiting for ordered broadcast");
+ if (expectAvailable) {
+ fail("did not get network status when access was allowed");
+ }
+ return;
+ }
+ final String expectedPrefix = expectAvailable ?
+ STATUS_NETWORK_AVAILABLE_PREFIX : STATUS_NETWORK_UNAVAILABLE_PREFIX;
+ assertTrue("Wrong network status (" + status + ") when expectedAvailable is "
+ + expectAvailable, status.startsWith(expectedPrefix));
+ }
+
+ protected String executeShellCommand(String command) throws Exception {
+ final String result = runShellCommand(mInstrumentation, command).trim();
+ if (DEBUG) Log.d(TAG, "Command '" + command + "' returned '" + result + "'");
+ return result;
+ }
+
+ /**
+ * Runs a Shell command which is not expected to generate output.
+ */
+ protected void executeSilentShellCommand(String command) throws Exception {
+ final String result = executeShellCommand(command);
+ assertTrue("Command '" + command + "' failed: " + result, result.trim().isEmpty());
+ }
+
+ /**
+ * Asserts the result of a command, wait and re-running it a couple times if necessary.
+ */
+ protected void assertDelayedShellCommand(String command, String expectedResult)
+ throws Exception {
+ final int maxTries = 5;
+ for (int i = 1; i <= maxTries; i++) {
+ final String result = executeShellCommand(command).trim();
+ if (result.equals(expectedResult))
+ return;
+ Log.v(TAG, "Command '" + command + "' returned '" + result + " instead of '"
+ + expectedResult + "' on attempt #; sleeping 1s before polling again");
+ Thread.sleep(1000);
+ }
+ fail("Command '" + command + "' did not return '" + expectedResult + "' after " + maxTries
+ + " attempts");
+ }
+
+ protected void setMeteredNetwork() throws Exception {
+ final NetworkInfo info = mCm.getActiveNetworkInfo();
+ final boolean metered = mCm.isActiveNetworkMetered();
+ if (metered) {
+ Log.d(TAG, "Active network already metered: " + info);
+ return;
+ }
+ final String netId = setWifiMeteredStatus(true);
+ assertTrue("Could not set wifi '" + netId + "' as metered ("
+ + mCm.getActiveNetworkInfo() +")", mCm.isActiveNetworkMetered());
+ // Set flag so status is reverted on teardown.
+ mResetMeteredWifi = true;
+ }
+
+ protected String setWifiMeteredStatus(boolean metered) throws Exception {
+ mWfm.setWifiEnabled(true);
+ // TODO: if it's not guaranteed the device has wi-fi, we need to change the tests
+ // to make the actual verification of restrictions optional.
+ final String ssid = mWfm.getConnectionInfo().getSSID();
+ assertNotNull("null SSID", ssid);
+ final String netId = ssid.trim().replaceAll("\"", ""); // remove quotes, if any.
+ assertFalse("empty SSID", ssid.isEmpty());
+
+ Log.i(TAG, "Setting wi-fi network " + netId + " metered status to " + metered);
+ final String setCommand = "cmd netpolicy set metered-network " + netId + " " + metered;
+ final String result = executeShellCommand(setCommand);
+ assertTrue("Command '" + setCommand + "' failed: " + result, result.isEmpty());
+
+ // Sanity check.
+ final String newStatus = executeShellCommand("cmd netpolicy get metered-network " + netId);
+ assertEquals("Metered status of wi-fi network " + netId + " not set properly",
+ newStatus.trim(), Boolean.toString(metered));
+ return netId;
+ }
+
+ protected void setRestrictBackground(boolean enabled) throws Exception {
+ executeShellCommand("cmd netpolicy set restrict-background " + enabled);
+ final String output = executeShellCommand("cmd netpolicy get restrict-background ");
+ final String expectedSuffix = enabled ? "enabled" : "disabled";
+ // TODO: use MoreAsserts?
+ assertTrue("output '" + output + "' should end with '" + expectedSuffix + "'",
+ output.endsWith(expectedSuffix));
+ }
+
+ protected void addRestrictBackgroundWhitelist(int uid) throws Exception {
+ executeShellCommand("cmd netpolicy add restrict-background-whitelist " + uid);
+ assertRestrictBackgroundWhitelist(uid, true);
+ }
+
+ protected void removeRestrictBackgroundWhitelist(int uid) throws Exception {
+ executeShellCommand("cmd netpolicy remove restrict-background-whitelist " + uid);
+ assertRestrictBackgroundWhitelist(uid, false);
+ }
+
+ protected void assertRestrictBackgroundWhitelist(int uid, boolean expected) throws Exception {
+ final int maxTries = 5;
+ boolean actual = false;
+ for (int i = 1; i <= maxTries; i++) {
+ final String output =
+ executeShellCommand("cmd netpolicy list restrict-background-whitelist ");
+ actual = output.contains(Integer.toString(uid));
+ if (expected == actual) {
+ return;
+ }
+ Log.v(TAG, "whitelist check for uid " + uid + " doesn't match yet (expected "
+ + expected + ", got " + actual + "); sleeping 1s before polling again");
+ Thread.sleep(1000);
+ }
+ fail("whitelist check for uid " + uid + " failed: expected " + expected + ", got " + actual);
+ }
+
+ protected void assertPowerSaveModeWhitelist(String packageName, boolean expected)
+ throws Exception {
+ // TODO: currently the power-save mode is behaving like idle, but once it changes, we'll
+ // need to use netpolicy for whitelisting
+ assertDelayedShellCommand("dumpsys deviceidle whitelist =" + packageName,
+ Boolean.toString(expected));
+ }
+
+ protected void addPowerSaveModeWhitelist(String packageName) throws Exception {
+ Log.i(TAG, "Adding package " + packageName + " to power-save-mode whitelist");
+ // TODO: currently the power-save mode is behaving like idle, but once it changes, we'll
+ // need to use netpolicy for whitelisting
+ executeShellCommand("dumpsys deviceidle whitelist +" + packageName);
+ assertPowerSaveModeWhitelist(packageName, true); // Sanity check
+ }
+
+ protected void removePowerSaveModeWhitelist(String packageName) throws Exception {
+ Log.i(TAG, "Removing package " + packageName + " from power-save-mode whitelist");
+ // TODO: currently the power-save mode is behaving like idle, but once it changes, we'll
+ // need to use netpolicy for whitelisting
+ executeShellCommand("dumpsys deviceidle whitelist -" + packageName);
+ assertPowerSaveModeWhitelist(packageName, false); // Sanity check
+ }
+
+ protected void setPowerSaveMode(boolean enabled) throws Exception {
+ Log.i(TAG, "Setting power mode to " + enabled);
+ if (enabled) {
+ executeSilentShellCommand("cmd battery unplug");
+ executeSilentShellCommand("settings put global low_power 1");
+ } else {
+ executeSilentShellCommand("cmd battery reset");
+ }
+ }
+
+ /**
+ * Starts a service that will register a broadcast receiver to receive
+ * {@code RESTRICT_BACKGROUND_CHANGE} intents.
+ * <p>
+ * The service must run in a separate app because otherwise it would be killed every time
+ * {@link #runDeviceTests(String, String)} is executed.
+ */
+ protected void registerApp2BroadcastReceiver() throws Exception {
+ executeShellCommand("am startservice com.android.cts.net.hostside.app2/.MyService");
+ }
+
+ private String toString(int status) {
+ switch (status) {
+ case RESTRICT_BACKGROUND_STATUS_DISABLED:
+ return "DISABLED";
+ case RESTRICT_BACKGROUND_STATUS_WHITELISTED:
+ return "WHITELISTED";
+ case RESTRICT_BACKGROUND_STATUS_ENABLED:
+ return "ENABLED";
+ default:
+ return "UNKNOWN_STATUS_" + status;
+ }
+ }
+}
diff --git a/hostsidetests/net/app/src/com/android/cts/net/hostside/BatterySaverModeTest.java b/hostsidetests/net/app/src/com/android/cts/net/hostside/BatterySaverModeTest.java
new file mode 100644
index 0000000..29a0309
--- /dev/null
+++ b/hostsidetests/net/app/src/com/android/cts/net/hostside/BatterySaverModeTest.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package com.android.cts.net.hostside;
+
+public class BatterySaverModeTest extends AbstractRestrictBackgroundNetworkTestCase {
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+
+ setPowerSaveMode(false);
+ assertPowerSaveModeWhitelist(TEST_APP2_PKG, false); // Sanity check
+ registerApp2BroadcastReceiver();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+
+ setPowerSaveMode(false);
+ }
+
+ public void testBackgroundNetworkAccess_enabled() throws Exception {
+ setPowerSaveMode(true);
+ assertBackgroundNetworkAccess(false);
+ }
+
+ public void testBackgroundNetworkAccess_whitelisted() throws Exception {
+ setPowerSaveMode(true);
+ assertBackgroundNetworkAccess(false);
+ addPowerSaveModeWhitelist(TEST_APP2_PKG);
+ assertBackgroundNetworkAccess(true);
+ removePowerSaveModeWhitelist(TEST_APP2_PKG);
+ assertBackgroundNetworkAccess(false);
+ }
+
+ public void testBackgroundNetworkAccess_disabled() throws Exception {
+ setPowerSaveMode(false);
+ assertBackgroundNetworkAccess(true);
+ }
+}
diff --git a/hostsidetests/net/app/src/com/android/cts/net/hostside/ConnectivityManagerTest.java b/hostsidetests/net/app/src/com/android/cts/net/hostside/ConnectivityManagerTest.java
deleted file mode 100644
index 8975dab..0000000
--- a/hostsidetests/net/app/src/com/android/cts/net/hostside/ConnectivityManagerTest.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
-
-package com.android.cts.net.hostside;
-
-import static android.net.ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED;
-import static android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_DISABLED;
-import static android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_ENABLED;
-import static android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_WHITELISTED;
-
-import android.app.Activity;
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.net.ConnectivityManager;
-import android.net.NetworkInfo;
-import android.test.InstrumentationTestCase;
-import android.util.Log;
-
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Tests for the {@link ConnectivityManager} API.
- *
- * <p>These tests rely on a host-side test to use {@code adb shell cmd netpolicy} to put the device
- * in the proper state. In fact, they're more like "assertions" than tests per se - the real test
- * logic is done on {@code HostsideNetworkTests}.
- */
-public class ConnectivityManagerTest extends InstrumentationTestCase {
- private static final String TAG = "ConnectivityManagerTest";
-
- private static final String MANIFEST_RECEIVER = "ManifestReceiver";
- private static final String DYNAMIC_RECEIVER = "DynamicReceiver";
-
- private static final String STATUS_NETWORK_UNAVAILABLE_PREFIX = "NetworkUnavailable:";
- private static final String STATUS_NETWORK_AVAILABLE_PREFIX = "NetworkAvailable:";
-
- private static final int NETWORK_TIMEOUT_MS = 15000;
- private static final int SLEEP_TIME_SEC = 1;
-
- private ConnectivityManager mCm;
- private int mUid;
-
- @Override
- public void setUp() throws Exception {
- super.setUp();
- final Context context = getInstrumentation().getContext();
- mCm = (ConnectivityManager) context.getSystemService(Activity.CONNECTIVITY_SERVICE);
- mUid = context.getPackageManager()
- .getPackageInfo(context.getPackageName(), 0).applicationInfo.uid;
- final boolean metered = mCm.isActiveNetworkMetered();
- Log.i(TAG, getName() + ": uid=" + mUid + ", metered=" + metered);
- assertTrue("Active network is not metered", metered);
- }
-
- public void testGetRestrictBackgroundStatus_disabled() throws Exception {
- assertRestrictBackgroundStatus(RESTRICT_BACKGROUND_STATUS_DISABLED);
- }
-
- public void testGetRestrictBackgroundStatus_whitelisted() throws Exception {
- assertRestrictBackgroundStatus(RESTRICT_BACKGROUND_STATUS_WHITELISTED);
- }
-
- public void testGetRestrictBackgroundStatus_enabled() throws Exception {
- assertRestrictBackgroundStatus(RESTRICT_BACKGROUND_STATUS_ENABLED);
- }
-
- public void testRestrictBackgroundChangedNotReceived() throws Exception {
- assertRestrictBackgroundChangedReceived(DYNAMIC_RECEIVER, 0);
- assertRestrictBackgroundChangedReceived(MANIFEST_RECEIVER, 0);
- }
-
- public void testRestrictBackgroundChangedReceivedOnce() throws Exception {
- assertRestrictBackgroundChangedReceived(DYNAMIC_RECEIVER, 1);
- assertRestrictBackgroundChangedReceived(MANIFEST_RECEIVER, 0);
- }
-
- public void testRestrictBackgroundChangedReceivedTwice() throws Exception {
- assertRestrictBackgroundChangedReceived(DYNAMIC_RECEIVER, 2);
- assertRestrictBackgroundChangedReceived(MANIFEST_RECEIVER, 0);
- }
-
- private void assertRestrictBackgroundChangedReceived(String receiverName, int expectedCount)
- throws Exception {
- int attempts = 0;
- int count = 0;
- final int maxAttempts = 5;
- do {
- attempts++;
- count = getNumberBroadcastsReceived(getInstrumentation().getContext(), receiverName,
- ACTION_RESTRICT_BACKGROUND_CHANGED);
- if (count == expectedCount) {
- break;
- }
- Log.d(TAG, "Count is " + count + " after " + attempts + " attempts; sleeping "
- + SLEEP_TIME_SEC + " seconds before trying again");
- Thread.sleep(SLEEP_TIME_SEC * 1000);
- } while (attempts <= maxAttempts);
- assertEquals("Number of expected broadcasts for " + receiverName + " not reached after "
- + maxAttempts * SLEEP_TIME_SEC + " seconds", expectedCount, count);
- }
-
-
- static int getNumberBroadcastsReceived(Context context, String receiverName, String action)
- throws Exception {
- final Context sharedContext = context.createPackageContext(
- "com.android.cts.net.hostside.app2", Context.CONTEXT_IGNORE_SECURITY);
- final SharedPreferences prefs = sharedContext.getSharedPreferences(receiverName,
- Context.MODE_PRIVATE);
- return prefs.getInt(action, 0);
- }
-
- private void assertRestrictBackgroundStatus(int expectedApiStatus) throws InterruptedException {
- // First asserts the API returns the proper value...
- final String expected = toString(expectedApiStatus);
- Log.d(TAG, getName() + " (expecting " + expected + ")");
- final int apiStatus = mCm.getRestrictBackgroundStatus();
- String actualApiStatus = toString(apiStatus);
- assertEquals("wrong status", expected, actualApiStatus);
-
- //...then use a background thread to verify the actual network status.
- final LinkedBlockingQueue<String> result = new LinkedBlockingQueue<>(1);
- new Thread(new Runnable() {
- @Override
- public void run() {
- result.offer(checkNetworkStatus());
- }
- }, "CheckNetworkThread").start();
- final String actualNetworkStatus = result.poll(10, TimeUnit.SECONDS);
- assertNotNull("timeout waiting for background thread", actualNetworkStatus);
- final String expectedPrefix = apiStatus == RESTRICT_BACKGROUND_STATUS_ENABLED ?
- STATUS_NETWORK_UNAVAILABLE_PREFIX : STATUS_NETWORK_AVAILABLE_PREFIX;
- assertTrue("Wrong network status for API status " + actualApiStatus + ": "
- + actualNetworkStatus, actualNetworkStatus.startsWith(expectedPrefix));
- }
-
- protected String checkNetworkStatus() {
- // TODO: connect to a hostside server instead
- final String address = "http://example.com";
- final NetworkInfo networkInfo = mCm.getActiveNetworkInfo();
- Log.d(TAG, "Running checkNetworkStatus() on thread " + Thread.currentThread().getName()
- + "\n\tactiveNetworkInfo: " + networkInfo + "\n\tURL: " + address);
- String prefix = STATUS_NETWORK_AVAILABLE_PREFIX;
- try {
- final URL url = new URL(address);
- final HttpURLConnection conn = (HttpURLConnection) url.openConnection();
- conn.setReadTimeout(NETWORK_TIMEOUT_MS);
- conn.setConnectTimeout(NETWORK_TIMEOUT_MS);
- conn.setRequestMethod("GET");
- conn.setDoInput(true);
- conn.connect();
- final int response = conn.getResponseCode();
- Log.d(TAG, "HTTP response for " + address + ": " + response);
- } catch (Exception e) {
- Log.d(TAG, "Exception getting " + address + ": " + e);
- prefix = STATUS_NETWORK_UNAVAILABLE_PREFIX;
- }
- return prefix + networkInfo;
- }
-
- private String toString(int status) {
- switch (status) {
- case RESTRICT_BACKGROUND_STATUS_DISABLED:
- return "DISABLED";
- case RESTRICT_BACKGROUND_STATUS_WHITELISTED:
- return "WHITELISTED";
- case RESTRICT_BACKGROUND_STATUS_ENABLED:
- return "ENABLED";
- default:
- return "UNKNOWN_STATUS_" + status;
- }
- }
-}
diff --git a/hostsidetests/net/app/src/com/android/cts/net/hostside/DataSaverModeTest.java b/hostsidetests/net/app/src/com/android/cts/net/hostside/DataSaverModeTest.java
new file mode 100644
index 0000000..ccb1fe9
--- /dev/null
+++ b/hostsidetests/net/app/src/com/android/cts/net/hostside/DataSaverModeTest.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package com.android.cts.net.hostside;
+
+import static android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_DISABLED;
+import static android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_ENABLED;
+import static android.net.ConnectivityManager.RESTRICT_BACKGROUND_STATUS_WHITELISTED;
+
+public class DataSaverModeTest extends AbstractRestrictBackgroundNetworkTestCase {
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+
+ setRestrictBackground(false);
+ registerApp2BroadcastReceiver();
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+
+ setRestrictBackground(false);
+ }
+
+ public void testGetRestrictBackgroundStatus_disabled() throws Exception {
+ removeRestrictBackgroundWhitelist(mUid);
+ assertRestrictBackgroundStatus(RESTRICT_BACKGROUND_STATUS_DISABLED);
+ assertRestrictBackgroundChangedReceived(0);
+
+ // Sanity check: make sure status is always disabled, never whitelisted
+ addRestrictBackgroundWhitelist(mUid);
+ assertRestrictBackgroundStatus(RESTRICT_BACKGROUND_STATUS_DISABLED);
+ assertRestrictBackgroundChangedReceived(0);
+ }
+
+ public void testGetRestrictBackgroundStatus_whitelisted() throws Exception {
+ setRestrictBackground(true);
+ assertRestrictBackgroundChangedReceived(1);
+
+ addRestrictBackgroundWhitelist(mUid);
+ assertRestrictBackgroundStatus(RESTRICT_BACKGROUND_STATUS_WHITELISTED);
+ assertRestrictBackgroundChangedReceived(2);
+ }
+
+ public void testGetRestrictBackgroundStatus_enabled() throws Exception {
+ setRestrictBackground(true);
+ assertRestrictBackgroundChangedReceived(1);
+
+ removeRestrictBackgroundWhitelist(mUid);
+ assertRestrictBackgroundStatus(RESTRICT_BACKGROUND_STATUS_ENABLED);
+ assertRestrictBackgroundChangedReceived(1);
+ }
+}
diff --git a/hostsidetests/net/app2/AndroidManifest.xml b/hostsidetests/net/app2/AndroidManifest.xml
index d69bf56..fa4cb43 100644
--- a/hostsidetests/net/app2/AndroidManifest.xml
+++ b/hostsidetests/net/app2/AndroidManifest.xml
@@ -16,20 +16,28 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.cts.net.hostside.app2"
- android:sharedUserId="com.android.cts.net.hostside.apps" >
+ package="com.android.cts.net.hostside.app2" >
- <!-- This application is used to listen to RESTRICT_BACKGROUND_CHANGED intents and store
- them in a shared preferences which is then read by the test app.
- It defines 2 listeners, one in the manifest and another dynamically registered by
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+ <uses-permission android:name="android.permission.INTERNET" />
+
+ <!--
+ This application is used to listen to RESTRICT_BACKGROUND_CHANGED intents and store
+ them in a shared preferences which is then read by the test app. These broadcasts are
+ handled by 2 listeners, one defined the manifest and another dynamically registered by
a service.
+
+ The manifest-defined listener also handles ordered broadcasts used to share data with the
+ test app.
-->
<application>
- <service android:name=".MyService" />
+ <service android:name=".MyService" android:exported="true"/>
<receiver android:name=".MyBroadcastReceiver" >
<intent-filter>
<action android:name="android.net.conn.RESTRICT_BACKGROUND_CHANGED" />
+ <action android:name="com.android.cts.net.hostside.app2.action.GET_COUNTERS" />
+ <action android:name="com.android.cts.net.hostside.app2.action.CHECK_NETWORK" />
</intent-filter>
</receiver>
</application>
diff --git a/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/Common.java b/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/Common.java
index 91caeda..3be4261 100644
--- a/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/Common.java
+++ b/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/Common.java
@@ -18,6 +18,18 @@
public final class Common {
static final String TAG = "CtsNetApp2";
+
+ // Constants below must match values defined on app's ConnectivityManagerTest.java
static final String MANIFEST_RECEIVER = "ManifestReceiver";
static final String DYNAMIC_RECEIVER = "DynamicReceiver";
+ static final String ACTION_GET_COUNTERS =
+ "com.android.cts.net.hostside.app2.action.GET_COUNTERS";
+ static final String ACTION_CHECK_NETWORK =
+ "com.android.cts.net.hostside.app2.action.CHECK_NETWORK";
+ static final String EXTRA_ACTION = "com.android.cts.net.hostside.app2.extra.ACTION";
+ static final String EXTRA_RECEIVER_NAME =
+ "com.android.cts.net.hostside.app2.extra.RECEIVER_NAME";
+ static final char RESULT_SEPARATOR = ';';
+ static final String STATUS_NETWORK_UNAVAILABLE_PREFIX = "NetworkUnavailable:";
+ static final String STATUS_NETWORK_AVAILABLE_PREFIX = "NetworkAvailable:";
}
diff --git a/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/MyBroadcastReceiver.java b/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/MyBroadcastReceiver.java
index 0cbf360..f32bd44 100644
--- a/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/MyBroadcastReceiver.java
+++ b/hostsidetests/net/app2/src/com/android/cts/net/hostside/app2/MyBroadcastReceiver.java
@@ -13,21 +13,44 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package com.android.cts.net.hostside.app2;
+import static android.net.ConnectivityManager.ACTION_RESTRICT_BACKGROUND_CHANGED;
+import static com.android.cts.net.hostside.app2.Common.ACTION_CHECK_NETWORK;
+import static com.android.cts.net.hostside.app2.Common.ACTION_GET_COUNTERS;
+import static com.android.cts.net.hostside.app2.Common.EXTRA_ACTION;
+import static com.android.cts.net.hostside.app2.Common.EXTRA_RECEIVER_NAME;
import static com.android.cts.net.hostside.app2.Common.MANIFEST_RECEIVER;
+import static com.android.cts.net.hostside.app2.Common.RESULT_SEPARATOR;
+import static com.android.cts.net.hostside.app2.Common.STATUS_NETWORK_AVAILABLE_PREFIX;
+import static com.android.cts.net.hostside.app2.Common.STATUS_NETWORK_UNAVAILABLE_PREFIX;
import static com.android.cts.net.hostside.app2.Common.TAG;
+
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.TimeUnit;
+
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
+import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
import android.util.Log;
/**
- * Receiver that stores received broadcasts in a shared preference.
+ * Receiver used to:
+ * <ol>
+ * <li>Stored received RESTRICT_BACKGROUND_CHANGED broadcasts in a shared preference.
+ * <li>Returned the number of RESTRICT_BACKGROUND_CHANGED broadcasts in an ordered broadcast.
+ * </ol>
*/
public class MyBroadcastReceiver extends BroadcastReceiver {
+ private static final int NETWORK_TIMEOUT_MS = 15 * 1000;
+
private final String mName;
public MyBroadcastReceiver() {
@@ -37,15 +60,109 @@
MyBroadcastReceiver(String name) {
Log.d(TAG, "Constructing MyBroadcastReceiver named " + name);
mName = name;
- }
+ }
@Override
public void onReceive(Context context, Intent intent) {
Log.d(TAG, "onReceive() for " + mName + ": " + intent);
+ final String action = intent.getAction();
+ switch (action) {
+ case ACTION_RESTRICT_BACKGROUND_CHANGED:
+ increaseCounter(context, action);
+ break;
+ case ACTION_GET_COUNTERS:
+ setResultDataFromCounter(context, intent);
+ break;
+ case ACTION_CHECK_NETWORK:
+ checkNetwork(context, intent);
+ break;
+ default:
+ Log.e(TAG, "received unexpected action: " + action);
+ }
+ }
+
+ private void increaseCounter(Context context, String action) {
final SharedPreferences prefs = context.getSharedPreferences(mName, Context.MODE_PRIVATE);
- final String pref = intent.getAction();
- final int value = prefs.getInt(pref, 0) + 1;
- Log.d(TAG, "Setting " + pref + " = " + value);
- prefs.edit().putInt(pref, value).apply();
+ final int value = prefs.getInt(action, 0) + 1;
+ Log.d(TAG, "increaseCounter('" + action + "'): setting '" + mName + "' to " + value);
+ prefs.edit().putInt(action, value).apply();
+ }
+
+ private int getCounter(Context context, String action, String receiverName) {
+ final SharedPreferences prefs = context.getSharedPreferences(receiverName,
+ Context.MODE_PRIVATE);
+ final int value = prefs.getInt(action, 0);
+ Log.d(TAG, "getCounter('" + action + "', '" + receiverName + "'): " + value);
+ return value;
+ }
+
+ private void checkNetwork(final Context context, Intent intent) {
+ final ConnectivityManager cm = (ConnectivityManager) context
+ .getSystemService(Context.CONNECTIVITY_SERVICE);
+
+ final StringBuilder data = new StringBuilder();
+ final int apiStatus = cm.getRestrictBackgroundStatus();
+ String netStatus;
+ try {
+ netStatus = checkNetworkStatus(cm);
+ } catch (InterruptedException e) {
+ Log.e(TAG, "Timeout checking network status");
+ setResultData(null);
+ return;
+ }
+ data.append(apiStatus).append(RESULT_SEPARATOR);
+ if (netStatus != null) {
+ data.append(netStatus);
+ }
+ Log.d(TAG, "checkNetwork: returning " + data);
+ setResultData(data.toString());
+ }
+
+ private String checkNetworkStatus(final ConnectivityManager cm) throws InterruptedException {
+ final LinkedBlockingQueue<String> result = new LinkedBlockingQueue<>(1);
+ new Thread(new Runnable() {
+
+ @Override
+ public void run() {
+ // TODO: connect to a hostside server instead
+ final String address = "http://example.com";
+ final NetworkInfo networkInfo = cm.getActiveNetworkInfo();
+ Log.d(TAG, "Running checkNetworkStatus() on thread "
+ + Thread.currentThread().getName()
+ + "\n\tactiveNetworkInfo: " + networkInfo + "\n\tURL: " + address);
+ String prefix = STATUS_NETWORK_AVAILABLE_PREFIX;
+ try {
+ final URL url = new URL(address);
+ final HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+ conn.setReadTimeout(NETWORK_TIMEOUT_MS);
+ conn.setConnectTimeout(NETWORK_TIMEOUT_MS);
+ conn.setRequestMethod("GET");
+ conn.setDoInput(true);
+ conn.connect();
+ final int response = conn.getResponseCode();
+ Log.d(TAG, "HTTP response for " + address + ": " + response);
+ } catch (Exception e) {
+ Log.d(TAG, "Exception getting " + address + ": " + e);
+ prefix = STATUS_NETWORK_UNAVAILABLE_PREFIX + "Exception " + e + ":";
+ }
+ result.offer(prefix + networkInfo);
+ }
+ }, mName).start();
+ return result.poll(NETWORK_TIMEOUT_MS * 2, TimeUnit.MILLISECONDS);
+ }
+
+ private void setResultDataFromCounter(Context context, Intent intent) {
+ final String action = intent.getStringExtra(EXTRA_ACTION);
+ if (action == null) {
+ Log.e(TAG, "Missing extra '" + EXTRA_ACTION + "' on " + intent);
+ return;
+ }
+ final String receiverName = intent.getStringExtra(EXTRA_RECEIVER_NAME);
+ if (receiverName == null) {
+ Log.e(TAG, "Missing extra '" + EXTRA_RECEIVER_NAME + "' on " + intent);
+ return;
+ }
+ final int counter = getCounter(context, action, receiverName);
+ setResultData(String.valueOf(counter));
}
}
diff --git a/hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java b/hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
index 1804740..4786450 100644
--- a/hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
+++ b/hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
@@ -18,29 +18,19 @@
import com.android.ddmlib.Log;
import com.android.tradefed.device.DeviceNotAvailableException;
-import com.android.tradefed.device.WifiHelper;
public class HostsideRestrictBackgroundNetworkTests extends HostsideNetworkTestCase {
+
private static final String TEST_APP2_PKG = "com.android.cts.net.hostside.app2";
private static final String TEST_APP2_APK = "CtsHostsideNetworkTestsApp2.apk";
- private int mUid;
- private WifiHelper mWifiHelper;
-
@Override
protected void setUp() throws Exception {
super.setUp();
- mUid = getUid(TEST_PKG);
- mWifiHelper = new WifiHelper(getDevice());
-
- setWifiMeteredStatus(true);
- setRestrictBackground(false);
-
uninstallPackage(TEST_APP2_PKG, false);
installPackage(TEST_APP2_APK);
- startBroadcastReceiverService();
}
@Override
@@ -48,103 +38,61 @@
super.tearDown();
uninstallPackage(TEST_APP2_PKG, true);
- setRestrictBackground(false);
- setWifiMeteredStatus(false);
}
- public void testGetRestrictBackgroundStatus_disabled() throws Exception {
- removeRestrictBackgroundWhitelist(mUid);
- assertRestrictBackgroundStatusDisabled();
- // From the app's point of view, nothing changed, it still have access
- assertRestrictBackgroundChangedNotReceived();
-
- // Sanity check: make sure status is always disabled, never whitelisted
- addRestrictBackgroundWhitelist(mUid);
- assertRestrictBackgroundStatusDisabled();
- assertRestrictBackgroundChangedNotReceived();
- }
-
- public void testGetRestrictBackgroundStatus_whitelisted() throws Exception {
- setRestrictBackground(true);
- assertRestrictBackgroundChangedReceivedOnce();
-
- addRestrictBackgroundWhitelist(mUid);
- assertRestrictBackgroundStatusWhitelisted();
- assertRestrictBackgroundChangedReceivedTwice();
- }
-
- public void testGetRestrictBackgroundStatus_enabled() throws Exception {
- setRestrictBackground(true);
- assertRestrictBackgroundChangedReceivedOnce();
-
- removeRestrictBackgroundWhitelist(mUid);
- assertRestrictBackgroundStatusEnabled();
- assertRestrictBackgroundChangedReceivedOnce();
- }
-
- public void testGetRestrictBackgroundStatus_uninstall() throws Exception {
- addRestrictBackgroundWhitelist(mUid);
- assertRestrictBackgroundWhitelist(mUid, true);
-
- uninstallPackage(TEST_PKG, true);
- assertPackageUninstalled(TEST_PKG);
- assertRestrictBackgroundWhitelist(mUid, false);
-
- installPackage(TEST_APK);
- final int newUid = getUid(TEST_PKG);
- assertRestrictBackgroundWhitelist(mUid, false);
- assertRestrictBackgroundWhitelist(newUid, false);
- }
-
- /**
- * Starts a service that will register a broadcast receiver to receive
- * {@code RESTRICT_BACKGROUND_CHANGE} intents.
- * <p>
- * The service must run in a separate app because otherwise it would be killed every time
- * {@link #runDeviceTests(String, String)} is executed.
- */
- private void startBroadcastReceiverService() throws DeviceNotAvailableException {
- runCommand("am startservice " + TEST_APP2_PKG + "/.MyService");
- }
-
- private void assertRestrictBackgroundStatusDisabled() throws DeviceNotAvailableException {
- runDeviceTests(TEST_PKG, TEST_PKG + ".ConnectivityManagerTest",
+ public void testDataSaverMode_disabled() throws Exception {
+ runDeviceTests(TEST_PKG, TEST_PKG + ".DataSaverModeTest",
"testGetRestrictBackgroundStatus_disabled");
}
- private void assertRestrictBackgroundStatusWhitelisted() throws DeviceNotAvailableException {
- runDeviceTests(TEST_PKG, TEST_PKG + ".ConnectivityManagerTest",
+ public void testDataSaverMode_whitelisted() throws Exception {
+ runDeviceTests(TEST_PKG, TEST_PKG + ".DataSaverModeTest",
"testGetRestrictBackgroundStatus_whitelisted");
}
- private void assertRestrictBackgroundStatusEnabled() throws DeviceNotAvailableException {
- runDeviceTests(TEST_PKG, TEST_PKG + ".ConnectivityManagerTest",
+ public void testDataSaverMode_enabled() throws Exception {
+ runDeviceTests(TEST_PKG, TEST_PKG + ".DataSaverModeTest",
"testGetRestrictBackgroundStatus_enabled");
}
- private void assertRestrictBackgroundChangedNotReceived() throws DeviceNotAvailableException {
- runDeviceTests(TEST_PKG, TEST_PKG + ".ConnectivityManagerTest",
- "testRestrictBackgroundChangedNotReceived");
+ public void testDataSaverMode_reinstall() throws Exception {
+ final int oldUid = getUid(TEST_PKG);
+ testDataSaverMode_whitelisted();
+
+ uninstallPackage(TEST_PKG, true);
+ assertPackageUninstalled(TEST_PKG);
+ assertRestrictBackgroundWhitelist(oldUid, false);
+
+ installPackage(TEST_APK);
+ final int newUid = getUid(TEST_PKG);
+ assertRestrictBackgroundWhitelist(oldUid, false);
+ assertRestrictBackgroundWhitelist(newUid, false);
}
- private void assertRestrictBackgroundChangedReceivedOnce() throws DeviceNotAvailableException {
- runDeviceTests(TEST_PKG, TEST_PKG + ".ConnectivityManagerTest",
- "testRestrictBackgroundChangedReceivedOnce");
+ public void testBatterySaverMode_disabled() throws Exception {
+ runDeviceTests(TEST_PKG, TEST_PKG + ".BatterySaverModeTest",
+ "testBackgroundNetworkAccess_disabled");
}
- private void assertRestrictBackgroundChangedReceivedTwice() throws DeviceNotAvailableException {
- runDeviceTests(TEST_PKG, TEST_PKG + ".ConnectivityManagerTest",
- "testRestrictBackgroundChangedReceivedTwice");
+ public void testBatterySaverMode_whitelisted() throws Exception {
+ runDeviceTests(TEST_PKG, TEST_PKG + ".BatterySaverModeTest",
+ "testBackgroundNetworkAccess_whitelisted");
}
- private void addRestrictBackgroundWhitelist(int uid) throws Exception {
- runCommand("cmd netpolicy add restrict-background-whitelist " + uid);
- assertRestrictBackgroundWhitelist(uid, true);
+ public void testBatterySaverMode_enabled() throws Exception {
+ runDeviceTests(TEST_PKG, TEST_PKG + ".BatterySaverModeTest",
+ "testBackgroundNetworkAccess_enabled");
}
- private void removeRestrictBackgroundWhitelist(int uid) throws Exception {
- runCommand("cmd netpolicy remove restrict-background-whitelist " + uid);
- assertRestrictBackgroundWhitelist(uid, false);
+ public void testBatterySaverMode_reinstall() throws Exception {
+ testBatterySaverMode_whitelisted();
+
+ uninstallPackage(TEST_PKG, true);
+ assertPackageUninstalled(TEST_PKG);
+ assertPowerSaveModeWhitelist(TEST_PKG, false);
+
+ installPackage(TEST_APK);
+ assertPowerSaveModeWhitelist(TEST_PKG, false);
}
private void assertRestrictBackgroundWhitelist(int uid, boolean expected) throws Exception {
@@ -164,31 +112,28 @@
+ expected + ", got " + actual);
}
- private void setWifiMeteredStatus(boolean metered) throws DeviceNotAvailableException {
- mWifiHelper.enableWifi();
- // TODO: if it's not guaranteed the device has wi-fi, we need to change the tests
- // to make the actual verification of restrictions optional.
- final String netId = mWifiHelper.getSSID();
- assertNotNull("null SSID", netId);
- assertFalse("empty SSID", netId.trim().isEmpty());
-
- Log.i(TAG, "Setting wi-fi network " + netId + " metered status to " + metered);
- final String setCommand = "cmd netpolicy set metered-network " + netId + " "+ metered;
- final String result = runCommand(setCommand);
- assertTrue("Command '" + setCommand + "' failed: " + result, result.trim().isEmpty());
-
- // Sanity check.
- final String newStatus = runCommand("cmd netpolicy get metered-network " + netId);
- assertEquals("Metered status of wi-fi network " + netId + " not set properly",
- newStatus.trim(), Boolean.toString(metered));
+ private void assertPowerSaveModeWhitelist(String packageName, boolean expected)
+ throws Exception {
+ // TODO: currently the power-save mode is behaving like idle, but once it changes, we'll
+ // need to use netpolicy for whitelisting
+ assertDelayedCommand("dumpsys deviceidle whitelist =" + packageName,
+ Boolean.toString(expected));
}
- private void setRestrictBackground(boolean enabled) throws DeviceNotAvailableException {
- runCommand("cmd netpolicy set restrict-background " + enabled);
- final String output = runCommand("cmd netpolicy get restrict-background ").trim();
- final String expectedSuffix = enabled ? "enabled" : "disabled";
- // TODO: use MoreAsserts?
- assertTrue("output '" + output + "' should end with '" + expectedSuffix + "'",
- output.endsWith(expectedSuffix));
+ /**
+ * Asserts the result of a command, wait and re-running it a couple times if necessary.
+ */
+ private void assertDelayedCommand(String command, String expectedResult)
+ throws InterruptedException, DeviceNotAvailableException {
+ final int maxTries = 5;
+ for (int i = 1; i <= maxTries; i++) {
+ final String result = runCommand(command).trim();
+ if (result.equals(expectedResult)) return;
+ Log.v(TAG, "Command '" + command + "' returned '" + result + " instead of '"
+ + expectedResult + "' on attempt #; sleeping 1s before polling again");
+ Thread.sleep(1000);
+ }
+ fail("Command '" + command + "' did not return '" + expectedResult + "' after " + maxTries
+ + " attempts");
}
}
diff --git a/hostsidetests/services/activitymanager/app/AndroidManifest.xml b/hostsidetests/services/activitymanager/app/AndroidManifest.xml
index 6b52188..8a2a448 100755
--- a/hostsidetests/services/activitymanager/app/AndroidManifest.xml
+++ b/hostsidetests/services/activitymanager/app/AndroidManifest.xml
@@ -21,68 +21,114 @@
<application>
<activity android:name=".TestActivity"
- android:resizeable="true"
+ android:resizeableActivity="true"
android:exported="true"
/>
<activity android:name=".DockedActivity"
- android:resizeable="true"
+ android:resizeableActivity="true"
android:exported="true"
android:taskAffinity="nobody.but.DockedActivity"
/>
<activity android:name=".NoRelaunchActivity"
- android:resizeable="true"
+ android:resizeableActivity="true"
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
android:exported="true"
+ android:taskAffinity="nobody.but.NoRelaunchActivity"
/>
<activity android:name=".SlowCreateActivity"
- android:resizeable="true"
+ android:resizeableActivity="true"
android:exported="true"
/>
<activity android:name=".LaunchToSideActivity"
- android:resizeable="true"
+ android:resizeableActivity="true"
android:exported="true"
android:taskAffinity="nobody.but.LaunchToSideActivity"
/>
<activity android:name=".PipActivity"
- android:resizeable="true"
+ android:resizeableActivity="true"
android:supportsPictureInPicture="true"
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
android:exported="true"
/>
<activity android:name=".AutoEnterPipActivity"
- android:resizeable="true"
+ android:resizeableActivity="true"
android:supportsPictureInPicture="true"
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
android:exported="true"
/>
<activity android:name=".AlwaysFocusablePipActivity"
android:theme="@style/Theme.Transparent"
- android:resizeable="true"
+ android:resizeableActivity="true"
android:supportsPictureInPicture="true"
androidprv:alwaysFocusable="true"
android:exported="true"
android:taskAffinity="nobody.but.AlwaysFocusablePipActivity"
/>
<activity android:name=".LaunchIntoPinnedStackPipActivity"
- android:resizeable="true"
+ android:resizeableActivity="true"
android:supportsPictureInPicture="true"
androidprv:alwaysFocusable="true"
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
android:exported="true"
/>
<activity android:name=".VisibleBehindActivity"
- android:resizeable="true"
+ android:resizeableActivity="true"
android:supportsPictureInPicture="true"
android:exported="true"
android:taskAffinity="nobody.but.VisibleBehindActivity"
/>
<activity android:name=".LaunchPipOnPipActivity"
- android:resizeable="true"
+ android:resizeableActivity="true"
android:supportsPictureInPicture="true"
android:taskAffinity="nobody.but.LaunchPipOnPipActivity"
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
android:exported="true"
/>
+ <activity android:name=".FreeformActivity"
+ android:resizeableActivity="true"
+ android:taskAffinity="nobody.but.FreeformActivity"
+ android:exported="true"
+ />
+ <activity android:name=".TopLeftLayoutActivity"
+ android:resizeableActivity="true"
+ android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
+ android:exported="true">
+ <layout android:defaultWidth="160dp"
+ android:defaultHeight="160dp"
+ android:gravity="top|left"
+ android:minimalSize="80dp"
+ />
+ </activity>
+ <activity android:name=".TopRightLayoutActivity"
+ android:resizeableActivity="true"
+ android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
+ android:exported="true">
+ <layout android:defaultWidth="25%"
+ android:defaultHeight="25%"
+ android:gravity="top|right"
+ android:minimalSize="80dp"
+ />
+ </activity>
+ <activity android:name=".BottomLeftLayoutActivity"
+ android:resizeableActivity="true"
+ android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
+ android:exported="true">
+ <layout android:defaultWidth="25%"
+ android:defaultHeight="25%"
+ android:gravity="bottom|left"
+ android:minimalSize="80dp"
+ />
+ </activity>
+ <activity android:name=".BottomRightLayoutActivity"
+ android:resizeableActivity="true"
+ android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
+ android:exported="true">
+ <layout android:defaultWidth="160dp"
+ android:defaultHeight="160dp"
+ android:gravity="bottom|right"
+ android:minimalSize="80dp"
+ />
+ </activity>
</application>
</manifest>
diff --git a/hostsidetests/services/activitymanager/app/src/android/server/app/AbstractLifecycleLogActivity.java b/hostsidetests/services/activitymanager/app/src/android/server/app/AbstractLifecycleLogActivity.java
new file mode 100644
index 0000000..e3026c9
--- /dev/null
+++ b/hostsidetests/services/activitymanager/app/src/android/server/app/AbstractLifecycleLogActivity.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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
+ */
+
+package android.server.app;
+
+import android.app.Activity;
+import android.content.res.Configuration;
+import android.os.Bundle;
+import android.util.Log;
+
+public abstract class AbstractLifecycleLogActivity extends Activity {
+ @Override
+ protected void onCreate(Bundle icicle) {
+ super.onCreate(icicle);
+ Log.i(getTag(), "onCreate");
+ }
+
+ @Override
+ public void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ Log.i(getTag(), "onConfigurationChanged");
+ }
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ Log.i(getTag(), "onDestroy");
+ }
+
+ protected abstract String getTag();
+}
diff --git a/tests/abioverride/src/android/abioverride/AbiOverrideActivity.java b/hostsidetests/services/activitymanager/app/src/android/server/app/BottomLeftLayoutActivity.java
similarity index 61%
copy from tests/abioverride/src/android/abioverride/AbiOverrideActivity.java
copy to hostsidetests/services/activitymanager/app/src/android/server/app/BottomLeftLayoutActivity.java
index ddf0b59..27a6fe2 100644
--- a/tests/abioverride/src/android/abioverride/AbiOverrideActivity.java
+++ b/hostsidetests/services/activitymanager/app/src/android/server/app/BottomLeftLayoutActivity.java
@@ -14,24 +14,9 @@
* limitations under the License.
*/
-package android.abioverride;
+package android.server.app;
import android.app.Activity;
-import android.os.Bundle;
-import android.os.Process;
-import java.lang.Override;
-
-/**
- * A simple activity for testing abioverride manifest flag.
- */
-public class AbiOverrideActivity extends Activity {
- @Override
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- }
-
- public boolean is64Bit() {
- return Process.is64Bit();
- }
+public class BottomLeftLayoutActivity extends Activity {
}
diff --git a/tests/abioverride/src/android/abioverride/AbiOverrideActivity.java b/hostsidetests/services/activitymanager/app/src/android/server/app/BottomRightLayoutActivity.java
similarity index 61%
copy from tests/abioverride/src/android/abioverride/AbiOverrideActivity.java
copy to hostsidetests/services/activitymanager/app/src/android/server/app/BottomRightLayoutActivity.java
index ddf0b59..7a91510 100644
--- a/tests/abioverride/src/android/abioverride/AbiOverrideActivity.java
+++ b/hostsidetests/services/activitymanager/app/src/android/server/app/BottomRightLayoutActivity.java
@@ -14,24 +14,9 @@
* limitations under the License.
*/
-package android.abioverride;
+package android.server.app;
import android.app.Activity;
-import android.os.Bundle;
-import android.os.Process;
-import java.lang.Override;
-
-/**
- * A simple activity for testing abioverride manifest flag.
- */
-public class AbiOverrideActivity extends Activity {
- @Override
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- }
-
- public boolean is64Bit() {
- return Process.is64Bit();
- }
+public class BottomRightLayoutActivity extends Activity {
}
diff --git a/hostsidetests/services/activitymanager/app/src/android/server/app/FreeformActivity.java b/hostsidetests/services/activitymanager/app/src/android/server/app/FreeformActivity.java
new file mode 100644
index 0000000..a1cb54c
--- /dev/null
+++ b/hostsidetests/services/activitymanager/app/src/android/server/app/FreeformActivity.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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
+ */
+
+package android.server.app;
+
+import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK;
+import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
+
+import android.app.Activity;
+import android.app.ActivityOptions;
+import android.content.Intent;
+import android.graphics.Rect;
+
+public class FreeformActivity extends Activity {
+
+ @Override
+ public void onResume() {
+ super.onResume();
+ final Intent intent = new Intent(this, TestActivity.class);
+ intent.setFlags(FLAG_ACTIVITY_CLEAR_TASK | FLAG_ACTIVITY_NEW_TASK);
+
+ final ActivityOptions options = ActivityOptions.makeBasic();
+ options.setLaunchBounds(new Rect(0, 0, 500, 500));
+ this.startActivity(intent, options.toBundle());
+ }
+}
diff --git a/hostsidetests/services/activitymanager/app/src/android/server/app/NoRelaunchActivity.java b/hostsidetests/services/activitymanager/app/src/android/server/app/NoRelaunchActivity.java
index 37963de..0058c13 100644
--- a/hostsidetests/services/activitymanager/app/src/android/server/app/NoRelaunchActivity.java
+++ b/hostsidetests/services/activitymanager/app/src/android/server/app/NoRelaunchActivity.java
@@ -16,7 +16,12 @@
package android.server.app;
-import android.app.Activity;
+public class NoRelaunchActivity extends AbstractLifecycleLogActivity {
-public class NoRelaunchActivity extends Activity {
+ private static final String TAG = NoRelaunchActivity.class.getSimpleName();
+
+ @Override
+ protected String getTag() {
+ return TAG;
+ }
}
diff --git a/hostsidetests/services/activitymanager/app/src/android/server/app/TestActivity.java b/hostsidetests/services/activitymanager/app/src/android/server/app/TestActivity.java
index 222cdde..a8e51d5 100644
--- a/hostsidetests/services/activitymanager/app/src/android/server/app/TestActivity.java
+++ b/hostsidetests/services/activitymanager/app/src/android/server/app/TestActivity.java
@@ -16,7 +16,12 @@
package android.server.app;
-import android.app.Activity;
+public class TestActivity extends AbstractLifecycleLogActivity {
-public class TestActivity extends Activity {
+ private static final String TAG = TestActivity.class.getSimpleName();
+
+ @Override
+ protected String getTag() {
+ return TAG;
+ }
}
diff --git a/tests/abioverride/src/android/abioverride/AbiOverrideActivity.java b/hostsidetests/services/activitymanager/app/src/android/server/app/TopLeftLayoutActivity.java
similarity index 61%
copy from tests/abioverride/src/android/abioverride/AbiOverrideActivity.java
copy to hostsidetests/services/activitymanager/app/src/android/server/app/TopLeftLayoutActivity.java
index ddf0b59..3a0267b 100644
--- a/tests/abioverride/src/android/abioverride/AbiOverrideActivity.java
+++ b/hostsidetests/services/activitymanager/app/src/android/server/app/TopLeftLayoutActivity.java
@@ -14,24 +14,9 @@
* limitations under the License.
*/
-package android.abioverride;
+package android.server.app;
import android.app.Activity;
-import android.os.Bundle;
-import android.os.Process;
-import java.lang.Override;
-
-/**
- * A simple activity for testing abioverride manifest flag.
- */
-public class AbiOverrideActivity extends Activity {
- @Override
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- }
-
- public boolean is64Bit() {
- return Process.is64Bit();
- }
+public class TopLeftLayoutActivity extends Activity {
}
diff --git a/tests/abioverride/src/android/abioverride/AbiOverrideActivity.java b/hostsidetests/services/activitymanager/app/src/android/server/app/TopRightLayoutActivity.java
similarity index 61%
copy from tests/abioverride/src/android/abioverride/AbiOverrideActivity.java
copy to hostsidetests/services/activitymanager/app/src/android/server/app/TopRightLayoutActivity.java
index ddf0b59..eb3b1b0 100644
--- a/tests/abioverride/src/android/abioverride/AbiOverrideActivity.java
+++ b/hostsidetests/services/activitymanager/app/src/android/server/app/TopRightLayoutActivity.java
@@ -14,24 +14,9 @@
* limitations under the License.
*/
-package android.abioverride;
+package android.server.app;
import android.app.Activity;
-import android.os.Bundle;
-import android.os.Process;
-import java.lang.Override;
-
-/**
- * A simple activity for testing abioverride manifest flag.
- */
-public class AbiOverrideActivity extends Activity {
- @Override
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- }
-
- public boolean is64Bit() {
- return Process.is64Bit();
- }
+public class TopRightLayoutActivity extends Activity {
}
diff --git a/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerDockedStackTests.java b/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerDockedStackTests.java
index 1abfd90..18581f1 100644
--- a/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerDockedStackTests.java
+++ b/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerDockedStackTests.java
@@ -16,8 +16,6 @@
package android.server.cts;
-import com.android.tradefed.log.LogUtil.CLog;
-
import java.awt.Rectangle;
import static com.android.ddmlib.Log.LogLevel.*;
@@ -27,9 +25,7 @@
private static final String TEST_ACTIVITY_NAME = "TestActivity";
private static final String DOCKED_ACTIVITY_NAME = "DockedActivity";
private static final String LAUNCH_TO_SIDE_ACTIVITY_NAME = "LaunchToSideActivity";
-
- private static final String AM_MOVE_TASK = "am stack movetask ";
- private static final String AM_RESIZE_DOCKED_STACK = "am stack resize-docked-stack ";
+ private static final String NO_RELAUNCH_ACTIVITY_NAME = "NoRelaunchActivity";
private static final int TASK_SIZE = 600;
private static final int STACK_SIZE = 300;
@@ -141,21 +137,10 @@
mAmWmState.assertValidBounds();
}
- private void launchActivityInDockStack(String activityName) throws Exception {
- mDevice.executeShellCommand(getAmStartCmd(activityName));
- final int taskId = getActivityTaskId(activityName);
- final String cmd = AM_MOVE_TASK + taskId + " " + DOCKED_STACK_ID + " true";
- mDevice.executeShellCommand(cmd);
- }
-
public void testResizeDockedStack() throws Exception {
mDevice.executeShellCommand(getAmStartCmd(TEST_ACTIVITY_NAME));
- mDevice.executeShellCommand(getAmStartCmd(DOCKED_ACTIVITY_NAME));
- mDevice.executeShellCommand(AM_MOVE_TASK + getActivityTaskId(DOCKED_ACTIVITY_NAME) + " "
- + DOCKED_STACK_ID + " true");
- mDevice.executeShellCommand(AM_RESIZE_DOCKED_STACK
- + "0 0 " + STACK_SIZE + " " + STACK_SIZE
- + " 0 0 " + TASK_SIZE + " " + TASK_SIZE);
+ launchActivityInDockStack(DOCKED_ACTIVITY_NAME);
+ resizeDockedStack(STACK_SIZE, STACK_SIZE, TASK_SIZE, TASK_SIZE);
mAmWmState.computeState(mDevice, new String[] {TEST_ACTIVITY_NAME, DOCKED_ACTIVITY_NAME});
mAmWmState.assertSanity();
mAmWmState.assertContainsStack("Must contain docked stack", DOCKED_STACK_ID);
@@ -169,6 +154,25 @@
mAmWmState.assertVisibility(TEST_ACTIVITY_NAME, true);
}
+ public void testActivityLifeCycleOnResizeDockedStack() throws Exception {
+ mDevice.executeShellCommand(getAmStartCmd(TEST_ACTIVITY_NAME));
+ launchActivityInDockStack(NO_RELAUNCH_ACTIVITY_NAME);
+
+ mAmWmState.computeState(mDevice,
+ new String[]{TEST_ACTIVITY_NAME, NO_RELAUNCH_ACTIVITY_NAME});
+ mAmWmState.assertSanity();
+
+ clearLogcat();
+ resizeDockedStack(STACK_SIZE, STACK_SIZE, TASK_SIZE, TASK_SIZE);
+
+ mAmWmState.computeState(mDevice,
+ new String[]{TEST_ACTIVITY_NAME, NO_RELAUNCH_ACTIVITY_NAME});
+ mAmWmState.assertSanity();
+
+ assertActivityLifecycle(TEST_ACTIVITY_NAME, true);
+ assertActivityLifecycle(NO_RELAUNCH_ACTIVITY_NAME, false);
+ }
+
private void launchActivityToSide(String activityName) throws Exception {
mDevice.executeShellCommand(
getAmStartCmd(activityName) + " -f 0x20000000 --ez launch_to_the_side true");
diff --git a/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerFreeformStackTests.java b/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerFreeformStackTests.java
new file mode 100644
index 0000000..bc48964
--- /dev/null
+++ b/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerFreeformStackTests.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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
+ */
+
+package android.server.cts;
+
+import java.awt.Rectangle;
+
+public class ActivityManagerFreeformStackTests extends ActivityManagerTestBase {
+
+ private static final String TEST_ACTIVITY = "TestActivity";
+ private static final int TEST_TASK_SIZE_1 = 500;
+ private static final int TEST_TASK_SIZE_2 = TEST_TASK_SIZE_1 * 2;
+ // NOTE: Launching the FreeformActivity will automatically launch the TestActivity
+ // with bounds (0, 0, 500, 500)
+ private static final String FREEFORM_ACTIVITY = "FreeformActivity";
+ private static final String NO_RELAUNCH_ACTIVITY = "NoRelaunchActivity";
+
+ public void testFreeformWindowManagementSupport() throws Exception {
+
+ launchActivityInStack(FREEFORM_ACTIVITY, FREEFORM_WORKSPACE_STACK_ID);
+
+ mAmWmState.computeState(mDevice, new String[] {FREEFORM_ACTIVITY});
+ mAmWmState.assertSanity();
+ mAmWmState.assertValidBounds();
+
+ if (supportsFreeform()) {
+ mAmWmState.assertFrontStack(
+ "Freeform stack must be the front stack.", FREEFORM_WORKSPACE_STACK_ID);
+ mAmWmState.assertVisibility(FREEFORM_ACTIVITY, true);
+ mAmWmState.assertVisibility(TEST_ACTIVITY, true);
+ mAmWmState.assertFocusedActivity(
+ TEST_ACTIVITY + " must be focused Activity", TEST_ACTIVITY);
+ assertEquals(new Rectangle(0, 0, TEST_TASK_SIZE_1, TEST_TASK_SIZE_1),
+ mAmWmState.getAmState().getTaskByActivityName(TEST_ACTIVITY).getBounds());
+ } else {
+ mAmWmState.assertDoesNotContainsStack(
+ "Must not contain freeform stack.", FREEFORM_WORKSPACE_STACK_ID);
+ }
+ }
+
+ public void testActivityLifeCycleOnResizeFreeformTask() throws Exception {
+ launchActivityInStack(TEST_ACTIVITY, FREEFORM_WORKSPACE_STACK_ID);
+ launchActivityInStack(NO_RELAUNCH_ACTIVITY, FREEFORM_WORKSPACE_STACK_ID);
+
+ mAmWmState.computeState(mDevice, new String[]{TEST_ACTIVITY, NO_RELAUNCH_ACTIVITY});
+ mAmWmState.assertSanity();
+
+ resizeActivityTask(TEST_ACTIVITY, 0, 0, TEST_TASK_SIZE_1, TEST_TASK_SIZE_2);
+ resizeActivityTask(NO_RELAUNCH_ACTIVITY,
+ TEST_TASK_SIZE_1, TEST_TASK_SIZE_1, TEST_TASK_SIZE_1, TEST_TASK_SIZE_2);
+
+ mAmWmState.computeState(mDevice, new String[]{TEST_ACTIVITY, NO_RELAUNCH_ACTIVITY});
+ mAmWmState.assertSanity();
+
+ clearLogcat();
+ resizeActivityTask(TEST_ACTIVITY, 0, 0, TEST_TASK_SIZE_2, TEST_TASK_SIZE_1);
+ resizeActivityTask(NO_RELAUNCH_ACTIVITY,
+ TEST_TASK_SIZE_1, TEST_TASK_SIZE_1, TEST_TASK_SIZE_2, TEST_TASK_SIZE_1);
+ mAmWmState.computeState(mDevice, new String[]{TEST_ACTIVITY, NO_RELAUNCH_ACTIVITY});
+ mAmWmState.assertSanity();
+
+ assertActivityLifecycle(TEST_ACTIVITY, true);
+ assertActivityLifecycle(NO_RELAUNCH_ACTIVITY, false);
+ }
+}
diff --git a/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerManifestLayoutTests.java b/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerManifestLayoutTests.java
new file mode 100644
index 0000000..bae3c6e
--- /dev/null
+++ b/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerManifestLayoutTests.java
@@ -0,0 +1,189 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package android.server.cts;
+
+import java.lang.Exception;
+import java.lang.String;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import junit.framework.Assert;
+
+import java.awt.Rectangle;
+import android.server.cts.WindowManagerState.WindowState;
+import android.server.cts.WindowManagerState.Display;
+
+import static com.android.ddmlib.Log.LogLevel.INFO;
+
+import com.android.tradefed.device.DeviceNotAvailableException;
+import com.android.tradefed.log.LogUtil.CLog;
+
+public class ActivityManagerManifestLayoutTests extends ActivityManagerTestBase {
+
+ // Clone of android DisplayMetrics.DENSITY_DEFAULT (DENSITY_MEDIUM)
+ // (Needed in host-side test to convert dp to px.)
+ private static final int DISPLAY_DENSITY_DEFAULT = 160;
+
+ // Test parameters
+ private static final int DEFAULT_WIDTH_DP = 160;
+ private static final int DEFAULT_HEIGHT_DP = 160;
+ private static final float DEFAULT_WIDTH_FRACTION = 0.25f;
+ private static final float DEFAULT_HEIGHT_FRACTION = 0.25f;
+ private static final int MINIMAL_SIZE_DP = 80;
+
+ private static final int GRAVITY_VER_CENTER = 0x01;
+ private static final int GRAVITY_VER_TOP = 0x02;
+ private static final int GRAVITY_VER_BOTTOM = 0x04;
+ private static final int GRAVITY_HOR_CENTER = 0x10;
+ private static final int GRAVITY_HOR_LEFT = 0x20;
+ private static final int GRAVITY_HOR_RIGHT = 0x40;
+
+ private List<WindowState> mTempWindowList = new ArrayList();
+ private Display mDisplay;
+ private WindowState mWindowState;
+
+ public void testGravityAndDefaultSizeTopLeft() throws Exception {
+ testLayout(GRAVITY_VER_TOP, GRAVITY_HOR_LEFT, false /*fraction*/);
+ }
+
+ public void testGravityAndDefaultSizeTopRight() throws Exception {
+ testLayout(GRAVITY_VER_TOP, GRAVITY_HOR_RIGHT, true /*fraction*/);
+ }
+
+ public void testGravityAndDefaultSizeBottomLeft() throws Exception {
+ testLayout(GRAVITY_VER_BOTTOM, GRAVITY_HOR_LEFT, true /*fraction*/);
+ }
+
+ public void testGravityAndDefaultSizeBottomRight() throws Exception {
+ testLayout(GRAVITY_VER_BOTTOM, GRAVITY_HOR_RIGHT, false /*fraction*/);
+ }
+
+ public void testMinimalSizeFreeform() throws Exception {
+ if (!supportsFreeform()) {
+ CLog.logAndDisplay(INFO, "Skipping test: no freeform support");
+ return;
+ }
+ testMinimalSize(FREEFORM_WORKSPACE_STACK_ID);
+ }
+
+ public void testMinimalSizeDocked() throws Exception {
+ testMinimalSize(DOCKED_STACK_ID);
+ }
+
+ private void testMinimalSize(int stackId) throws Exception {
+ final String activityName = "BottomRightLayoutActivity";
+
+ // Issue command to resize to <0,0,1,1>. We expect the size to be floored at
+ // MINIMAL_SIZE_DPxMINIMAL_SIZE_DP.
+ if (stackId == FREEFORM_WORKSPACE_STACK_ID) {
+ launchActivityInStack(activityName, stackId);
+ resizeActivityTask(activityName, 0, 0, 1, 1);
+ } else { // stackId == DOCKED_STACK_ID
+ launchActivityInDockStack(activityName);
+ resizeDockedStack(1, 1, 1, 1);
+ }
+ getDisplayAndWindowState(activityName);
+
+ final int minimalSize = dpToPx(MINIMAL_SIZE_DP, mDisplay.getDpi());
+ final Rectangle containingRect = mWindowState.getContainingFrame();
+ final int actualSize = Math.min(containingRect.width, containingRect.height);
+
+ // The shorter of width, height should be the minimal size.
+ Assert.assertEquals("Minimum size is incorrect", minimalSize, actualSize);
+ }
+
+ private void testLayout(
+ int vGravity, int hGravity, boolean fraction) throws Exception {
+ if (!supportsFreeform()) {
+ CLog.logAndDisplay(INFO, "Skipping test: no freeform support");
+ return;
+ }
+
+ final String activityName = (vGravity == GRAVITY_VER_TOP ? "Top" : "Bottom")
+ + (hGravity == GRAVITY_HOR_LEFT ? "Left" : "Right") + "LayoutActivity";
+
+ // Launch in freeform stack
+ launchActivityInStack(activityName, FREEFORM_WORKSPACE_STACK_ID);
+
+ getDisplayAndWindowState(activityName);
+
+ final Rectangle containingRect = mWindowState.getContainingFrame();
+ final Rectangle appRect = mDisplay.getAppRect();
+ final int expectedWidthPx, expectedHeightPx;
+ // Evaluate the expected window size in px. If we're using fraction dimensions,
+ // calculate the size based on the app rect size. Otherwise, convert the expected
+ // size in dp to px.
+ if (fraction) {
+ expectedWidthPx = (int) (appRect.width * DEFAULT_WIDTH_FRACTION);
+ expectedHeightPx = (int) (appRect.height * DEFAULT_HEIGHT_FRACTION);
+ } else {
+ final int densityDpi = mDisplay.getDpi();
+ expectedWidthPx = dpToPx(DEFAULT_WIDTH_DP, densityDpi);
+ expectedHeightPx = dpToPx(DEFAULT_HEIGHT_DP, densityDpi);
+ }
+
+ verifyFrameSizeAndPosition(
+ vGravity, hGravity, expectedWidthPx, expectedHeightPx, containingRect, appRect);
+ }
+
+ private void getDisplayAndWindowState(String activityName) throws Exception {
+ final String windowName = getWindowName(activityName);
+
+ mAmWmState.computeState(mDevice, true /* visibleOnly */, new String[] {activityName});
+
+ mAmWmState.assertSanity();
+
+ mAmWmState.assertFocusedWindow("Test window must be the front window.", windowName);
+
+ mAmWmState.getWmState().getMatchingWindowState(windowName, mTempWindowList);
+
+ Assert.assertEquals("Should have exactly one window state for the activity.",
+ 1, mTempWindowList.size());
+
+ mWindowState = mTempWindowList.get(0);
+ Assert.assertNotNull("Should have a valid window", mWindowState);
+
+ mDisplay = mAmWmState.getWmState().getDisplay(mWindowState.getDisplayId());
+ Assert.assertNotNull("Should be on a display", mDisplay);
+ }
+
+ private void verifyFrameSizeAndPosition(
+ int vGravity, int hGravity, int expectedWidthPx, int expectedHeightPx,
+ Rectangle containingFrame, Rectangle parentFrame) {
+ Assert.assertEquals("Width is incorrect", expectedWidthPx, containingFrame.width);
+ Assert.assertEquals("Height is incorrect", expectedHeightPx, containingFrame.height);
+
+ if (vGravity == GRAVITY_VER_TOP) {
+ Assert.assertEquals("Should be on the top", parentFrame.y, containingFrame.y);
+ } else if (vGravity == GRAVITY_VER_BOTTOM) {
+ Assert.assertEquals("Should be on the bottom",
+ parentFrame.y + parentFrame.height, containingFrame.y + containingFrame.height);
+ }
+
+ if (hGravity == GRAVITY_HOR_LEFT) {
+ Assert.assertEquals("Should be on the left", parentFrame.x, containingFrame.x);
+ } else if (hGravity == GRAVITY_HOR_RIGHT){
+ Assert.assertEquals("Should be on the right",
+ parentFrame.x + parentFrame.width, containingFrame.x + containingFrame.width);
+ }
+ }
+
+ private static int dpToPx(float dp, int densityDpi){
+ return (int) (dp * densityDpi / DISPLAY_DENSITY_DEFAULT + 0.5f);
+ }
+}
diff --git a/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerState.java b/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerState.java
index 1db6829..1a6a3b8 100644
--- a/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerState.java
+++ b/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerState.java
@@ -60,6 +60,10 @@
boolean retry = false;
String dump = null;
+ CLog.logAndDisplay(INFO, "==============================");
+ CLog.logAndDisplay(INFO, " ActivityManagerState ");
+ CLog.logAndDisplay(INFO, "==============================");
+
do {
if (retry) {
CLog.logAndDisplay(INFO, "***Incomplete AM state. Retrying...");
diff --git a/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerTestBase.java b/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerTestBase.java
index ef41644..b8f5fff 100644
--- a/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerTestBase.java
+++ b/hostsidetests/services/activitymanager/src/android/server/cts/ActivityManagerTestBase.java
@@ -26,10 +26,15 @@
import java.lang.Exception;
import java.lang.Integer;
import java.lang.String;
+import java.util.Collections;
import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
public abstract class ActivityManagerTestBase extends DeviceTestCase {
private static final boolean PRETEND_DEVICE_SUPPORTS_PIP = false;
+ private static final boolean PRETEND_DEVICE_SUPPORTS_FREEFORM = false;
// Constants copied from ActivityManager.StackId. If they are changed there, these must be
// updated.
@@ -65,6 +70,10 @@
protected static final String AM_MOVE_TOP_ACTIVITY_TO_PINNED_STACK_COMMAND =
"am stack move-top-activity-to-pinned-stack 1 0 0 500 500";
+ private static final String AM_RESIZE_DOCKED_STACK = "am stack resize-docked-stack ";
+
+ private static final String AM_MOVE_TASK = "am stack movetask ";
+
/** A reference to the device under test. */
protected ITestDevice mDevice;
@@ -113,6 +122,33 @@
}
}
+ protected void launchActivityInStack(String activityName, int stackId) throws Exception {
+ mDevice.executeShellCommand(getAmStartCmd(activityName) + " --stack " + stackId);
+ }
+
+ protected void launchActivityInDockStack(String activityName) throws Exception {
+ mDevice.executeShellCommand(getAmStartCmd(activityName));
+ final int taskId = getActivityTaskId(activityName);
+ final String cmd = AM_MOVE_TASK + taskId + " " + DOCKED_STACK_ID + " true";
+ mDevice.executeShellCommand(cmd);
+ }
+
+ protected void resizeActivityTask(String activityName, int left, int top, int right, int bottom)
+ throws Exception {
+ final int taskId = getActivityTaskId(activityName);
+ final String cmd = "am task resize "
+ + taskId + " " + left + " " + top + " " + right + " " + bottom;
+ mDevice.executeShellCommand(cmd);
+ }
+
+ protected void resizeDockedStack(
+ int stackWidth, int stackHeight, int taskWidth, int taskHeight)
+ throws DeviceNotAvailableException {
+ mDevice.executeShellCommand(AM_RESIZE_DOCKED_STACK
+ + "0 0 " + stackWidth + " " + stackHeight
+ + " 0 0 " + taskWidth + " " + taskHeight);
+ }
+
// Utility method for debugging, not used directly here, but useful, so kept around.
protected void printStacksAndTasks() throws DeviceNotAvailableException {
CollectingOutputReceiver outputReceiver = new CollectingOutputReceiver();
@@ -145,6 +181,11 @@
|| PRETEND_DEVICE_SUPPORTS_PIP;
}
+ protected boolean supportsFreeform() throws DeviceNotAvailableException {
+ return hasDeviceFeature("android.software.freeform_window_management")
+ || PRETEND_DEVICE_SUPPORTS_FREEFORM;
+ }
+
protected boolean hasDeviceFeature(String requiredFeature) throws DeviceNotAvailableException {
if (mAvailableFeatures == null) {
// TODO: Move this logic to ITestDevice.
@@ -199,4 +240,80 @@
CLog.logAndDisplay(LogLevel.INFO, output);
return output;
}
+
+ protected void clearLogcat() throws DeviceNotAvailableException {
+ mDevice.executeAdbCommand("logcat", "-c");
+ }
+
+ protected void assertActivityLifecycle(String activityName, boolean relaunched)
+ throws DeviceNotAvailableException {
+ final ActivityLifecycleCounts lifecycleCounts = new ActivityLifecycleCounts(activityName);
+
+ if (relaunched) {
+ if (lifecycleCounts.mDestroyCount < 1) {
+ fail(activityName + " must have been destroyed. mDestroyCount="
+ + lifecycleCounts.mDestroyCount);
+ }
+ if (lifecycleCounts.mCreateCount < 1) {
+ fail(activityName + " must have been (re)created. mCreateCount="
+ + lifecycleCounts.mCreateCount);
+ }
+ } else {
+ if (lifecycleCounts.mDestroyCount > 0) {
+ fail(activityName + " must *NOT* have been destroyed. mDestroyCount="
+ + lifecycleCounts.mDestroyCount);
+ }
+ if (lifecycleCounts.mCreateCount > 0) {
+ fail(activityName + " must *NOT* have been (re)created. mCreateCount="
+ + lifecycleCounts.mCreateCount);
+ }
+ if (lifecycleCounts.mConfigurationChangedCount < 1) {
+ fail(activityName + " must have received configuration changed. "
+ + "mConfigurationChangedCount="
+ + lifecycleCounts.mConfigurationChangedCount);
+ }
+ }
+ }
+
+ private class ActivityLifecycleCounts {
+
+ private final Pattern mCreatePattern = Pattern.compile("(.+): onCreate");
+ private final Pattern mConfigurationChangedPattern =
+ Pattern.compile("(.+): onConfigurationChanged");
+ private final Pattern mDestroyPattern = Pattern.compile("(.+): onDestroy");
+
+ private final LinkedList<String> mLogs = new LinkedList();
+ int mCreateCount;
+ int mConfigurationChangedCount;
+ int mDestroyCount;
+
+ public ActivityLifecycleCounts(String activityName) throws DeviceNotAvailableException {
+
+ final String logs = mDevice.executeAdbCommand(
+ "logcat", "-v", "brief", "-d", activityName + ":I", "*:S");
+ Collections.addAll(mLogs, logs.split("\\n"));
+
+ while (!mLogs.isEmpty()) {
+ final String line = mLogs.pop().trim();
+
+ Matcher matcher = mCreatePattern.matcher(line);
+ if (matcher.matches()) {
+ mCreateCount++;
+ continue;
+ }
+
+ matcher = mConfigurationChangedPattern.matcher(line);
+ if (matcher.matches()) {
+ mConfigurationChangedCount++;
+ continue;
+ }
+
+ matcher = mDestroyPattern.matcher(line);
+ if (matcher.matches()) {
+ mDestroyCount++;
+ continue;
+ }
+ }
+ }
+ }
}
diff --git a/hostsidetests/services/activitymanager/src/android/server/cts/WindowManagerState.java b/hostsidetests/services/activitymanager/src/android/server/cts/WindowManagerState.java
index a30a2a7..e8b0f59 100644
--- a/hostsidetests/services/activitymanager/src/android/server/cts/WindowManagerState.java
+++ b/hostsidetests/services/activitymanager/src/android/server/cts/WindowManagerState.java
@@ -37,32 +37,33 @@
private static final String DUMPSYS_WINDOWS_APPS = "dumpsys window apps";
private static final String DUMPSYS_WINDOWS_VISIBLE_APPS = "dumpsys window visible-apps";
- private final Pattern mWindowPattern =
+ private static final Pattern sWindowPattern =
Pattern.compile("Window #(\\d+) Window\\{([0-9a-fA-F]+) u(\\d+) (.+)\\}\\:");
- private final Pattern mStartingWindowPattern =
+ private static final Pattern sStartingWindowPattern =
Pattern.compile("Window #(\\d+) Window\\{([0-9a-fA-F]+) u(\\d+) Starting (.+)\\}\\:");
- private final Pattern mExitingWindowPattern =
+ private static final Pattern sExitingWindowPattern =
Pattern.compile("Window #(\\d+) Window\\{([0-9a-fA-F]+) u(\\d+) (.+) EXITING\\}\\:");
- private final Pattern mFocusedWindowPattern = Pattern.compile(
+ private static final Pattern sFocusedWindowPattern = Pattern.compile(
"mCurrentFocus=Window\\{([0-9a-fA-F]+) u(\\d+) (\\S+)\\}");
- private final Pattern mAppErrorFocusedWindowPattern = Pattern.compile(
+ private static final Pattern sAppErrorFocusedWindowPattern = Pattern.compile(
"mCurrentFocus=Window\\{([0-9a-fA-F]+) u(\\d+) Application Error\\: (\\S+)\\}");
- private final Pattern mFocusedAppPattern =
+ private static final Pattern sFocusedAppPattern =
Pattern.compile("mFocusedApp=AppWindowToken\\{(.+) token=Token\\{(.+) "
+ "ActivityRecord\\{(.+) u(\\d+) (\\S+) (\\S+)");
- private final Pattern mStackIdPattern = Pattern.compile("mStackId=(\\d+)");
+ private static final Pattern sStackIdPattern = Pattern.compile("mStackId=(\\d+)");
- private final Pattern[] mExtractStackExitPatterns = { mStackIdPattern, mWindowPattern,
- mStartingWindowPattern, mExitingWindowPattern, mFocusedWindowPattern,
- mAppErrorFocusedWindowPattern, mFocusedAppPattern };
+ private static final Pattern[] sExtractStackExitPatterns = {
+ sStackIdPattern, sWindowPattern, sStartingWindowPattern, sExitingWindowPattern,
+ sFocusedWindowPattern, sAppErrorFocusedWindowPattern, sFocusedAppPattern };
// Windows in z-order with the top most at the front of the list.
private List<String> mWindows = new ArrayList();
- private List<String> mRawWindows = new ArrayList();
+ private List<WindowState> mWindowStates = new ArrayList();
private List<WindowStack> mStacks = new ArrayList();
+ private List<Display> mDisplays = new ArrayList();
private String mFocusedWindow = null;
private String mFocusedApp = null;
private final LinkedList<String> mSysDump = new LinkedList();
@@ -74,6 +75,9 @@
boolean retry = false;
String dump = null;
+ CLog.logAndDisplay(INFO, "==============================");
+ CLog.logAndDisplay(INFO, " WindowManagerState ");
+ CLog.logAndDisplay(INFO, "==============================");
do {
if (retry) {
CLog.logAndDisplay(INFO, "***Incomplete WM state. Retrying...");
@@ -117,47 +121,52 @@
Collections.addAll(mSysDump, sysDump.split("\\n"));
while (!mSysDump.isEmpty()) {
+ final Display display =
+ Display.create(mSysDump, sExtractStackExitPatterns);
+ if (display != null) {
+ CLog.logAndDisplay(INFO, display.toString());
+ mDisplays.add(display);
+ continue;
+ }
+
final WindowStack stack =
- WindowStack.create(mSysDump, mStackIdPattern, mExtractStackExitPatterns);
+ WindowStack.create(mSysDump, sStackIdPattern, sExtractStackExitPatterns);
if (stack != null) {
mStacks.add(stack);
continue;
}
- final String line = mSysDump.pop().trim();
- Matcher matcher = mWindowPattern.matcher(line);
- if (matcher.matches()) {
- CLog.logAndDisplay(INFO, line);
- final String window = matcher.group(4);
+ final WindowState ws = WindowState.create(mSysDump, sExtractStackExitPatterns);
+ if (ws != null) {
+ CLog.logAndDisplay(INFO, ws.toString());
if (visibleOnly && mWindows.isEmpty()) {
// This is the front window. Check to see if we are in the middle of
// transitioning. If we are, we want to skip dumping until window manager is
// done transitioning the top window.
- matcher = mStartingWindowPattern.matcher(line);
- if (matcher.matches()) {
+ if (ws.isStartingWindow()) {
CLog.logAndDisplay(INFO,
"Skipping dump due to starting window transition...");
return;
}
- matcher = mExitingWindowPattern.matcher(line);
- if (matcher.matches()) {
+ if (ws.isExitingWindow()) {
CLog.logAndDisplay(INFO,
"Skipping dump due to exiting window transition...");
return;
}
}
- CLog.logAndDisplay(INFO, window);
- mWindows.add(window);
- mRawWindows.add(line);
+ mWindows.add(ws.getName());
+ mWindowStates.add(ws);
continue;
}
- matcher = mFocusedWindowPattern.matcher(line);
+ final String line = mSysDump.pop().trim();
+
+ Matcher matcher = sFocusedWindowPattern.matcher(line);
if (matcher.matches()) {
CLog.logAndDisplay(INFO, line);
final String focusedWindow = matcher.group(3);
@@ -166,7 +175,7 @@
continue;
}
- matcher = mAppErrorFocusedWindowPattern.matcher(line);
+ matcher = sAppErrorFocusedWindowPattern.matcher(line);
if (matcher.matches()) {
CLog.logAndDisplay(INFO, line);
final String focusedWindow = matcher.group(3);
@@ -175,7 +184,7 @@
continue;
}
- matcher = mFocusedAppPattern.matcher(line);
+ matcher = sFocusedAppPattern.matcher(line);
if (matcher.matches()) {
CLog.logAndDisplay(INFO, line);
final String focusedApp = matcher.group(5);
@@ -189,17 +198,31 @@
void getMatchingWindowTokens(final String windowName, List<String> tokenList) {
tokenList.clear();
- for (String line : mRawWindows) {
- if (line.contains(windowName)) {
- Matcher matcher = mWindowPattern.matcher(line);
- if (matcher.matches()) {
- CLog.logAndDisplay(INFO, "Found activity window: " + line);
- tokenList.add(matcher.group(2));
- }
+ for (WindowState ws : mWindowStates) {
+ if (windowName.equals(ws.getName())) {
+ tokenList.add(ws.getToken());
}
}
}
+ void getMatchingWindowState(final String windowName, List<WindowState> windowList) {
+ windowList.clear();
+ for (WindowState ws : mWindowStates) {
+ if (windowName.equals(ws.getName())) {
+ windowList.add(ws);
+ }
+ }
+ }
+
+ Display getDisplay(int displayId) {
+ for (Display display : mDisplays) {
+ if (displayId == display.getDisplayId()) {
+ return display;
+ }
+ }
+ return null;
+ }
+
String getFrontWindow() {
return mWindows.get(0);
}
@@ -246,15 +269,16 @@
private void reset() {
mSysDump.clear();
mStacks.clear();
+ mDisplays.clear();
mWindows.clear();
- mRawWindows.clear();
+ mWindowStates.clear();
mFocusedWindow = null;
mFocusedApp = null;
}
static class WindowStack extends WindowContainer {
- private static final Pattern TASK_ID_PATTERN = Pattern.compile("taskId=(\\d+)");
+ private static final Pattern sTaskIdPattern = Pattern.compile("taskId=(\\d+)");
int mStackId;
ArrayList<WindowTask> mTasks = new ArrayList();
@@ -288,13 +312,13 @@
final List<Pattern> taskExitPatterns = new ArrayList();
Collections.addAll(taskExitPatterns, exitPatterns);
- taskExitPatterns.add(TASK_ID_PATTERN);
+ taskExitPatterns.add(sTaskIdPattern);
final Pattern[] taskExitPatternsArray =
taskExitPatterns.toArray(new Pattern[taskExitPatterns.size()]);
while (!doneExtracting(dump, exitPatterns)) {
final WindowTask task =
- WindowTask.create(dump, TASK_ID_PATTERN, taskExitPatternsArray);
+ WindowTask.create(dump, sTaskIdPattern, taskExitPatternsArray);
if (task != null) {
mTasks.add(task);
@@ -324,10 +348,10 @@
}
static class WindowTask extends WindowContainer {
- private static final Pattern TEMP_INSET_BOUNDS_PATTERN =
+ private static final Pattern sTempInsetBoundsPattern =
Pattern.compile("mTempInsetBounds=\\[(\\d+),(\\d+)\\]\\[(\\d+),(\\d+)\\]");
- private static final Pattern APP_TOKEN_PATTERN = Pattern.compile(
+ private static final Pattern sAppTokenPattern = Pattern.compile(
"Activity #(\\d+) AppWindowToken\\{(\\S+) token=Token\\{(\\S+) "
+ "ActivityRecord\\{(\\S+) u(\\d+) (\\S+) t(\\d+)\\}\\}\\}");
@@ -373,13 +397,13 @@
continue;
}
- Matcher matcher = TEMP_INSET_BOUNDS_PATTERN.matcher(line);
+ Matcher matcher = sTempInsetBoundsPattern.matcher(line);
if (matcher.matches()) {
CLog.logAndDisplay(INFO, line);
mTempInsetBounds = extractBounds(matcher);
}
- matcher = APP_TOKEN_PATTERN.matcher(line);
+ matcher = sAppTokenPattern.matcher(line);
if (matcher.matches()) {
CLog.logAndDisplay(INFO, line);
final String appToken = matcher.group(6);
@@ -392,8 +416,8 @@
}
static abstract class WindowContainer {
- protected static final Pattern FULLSCREEN_PATTERN = Pattern.compile("mFullscreen=(\\S+)");
- protected static final Pattern BOUNDS_PATTERN =
+ protected static final Pattern sFullscreenPattern = Pattern.compile("mFullscreen=(\\S+)");
+ protected static final Pattern sBoundsPattern =
Pattern.compile("mBounds=\\[(\\d+),(\\d+)\\]\\[(\\d+),(\\d+)\\]");
protected boolean mFullscreen;
@@ -414,7 +438,7 @@
}
boolean extractFullscreen(String line) {
- final Matcher matcher = FULLSCREEN_PATTERN.matcher(line);
+ final Matcher matcher = sFullscreenPattern.matcher(line);
if (!matcher.matches()) {
return false;
}
@@ -426,7 +450,7 @@
}
boolean extractBounds(String line) {
- final Matcher matcher = BOUNDS_PATTERN.matcher(line);
+ final Matcher matcher = sBoundsPattern.matcher(line);
if (!matcher.matches()) {
return false;
}
@@ -446,6 +470,19 @@
return rect;
}
+ static void extractMultipleBounds(Matcher matcher, int groupIndex, Rectangle... rectList) {
+ for (Rectangle rect : rectList) {
+ if (rect == null) {
+ return;
+ }
+ final int left = Integer.valueOf(matcher.group(groupIndex++));
+ final int top = Integer.valueOf(matcher.group(groupIndex++));
+ final int right = Integer.valueOf(matcher.group(groupIndex++));
+ final int bottom = Integer.valueOf(matcher.group(groupIndex++));
+ rect.setBounds(left, top, right - left, bottom - top);
+ }
+ }
+
Rectangle getBounds() {
return mBounds;
}
@@ -454,4 +491,198 @@
return mFullscreen;
}
}
+
+ static class Display extends WindowContainer {
+ private static final String TAG = "[Display] ";
+
+ private static final Pattern sDisplayIdPattern =
+ Pattern.compile("Display: mDisplayId=(\\d+)");
+ private static final Pattern sDisplayInfoPattern =
+ Pattern.compile("(.+) (\\d+)dpi cur=(\\d+)x(\\d+) app=(\\d+)x(\\d+) (.+)");
+
+ private final int mDisplayId;
+ private Rectangle mDisplayRect = new Rectangle();
+ private Rectangle mAppRect = new Rectangle();
+ private int mDpi;
+
+ private Display(int displayId) {
+ mDisplayId = displayId;
+ }
+
+ int getDisplayId() {
+ return mDisplayId;
+ }
+
+ int getDpi() {
+ return mDpi;
+ }
+
+ Rectangle getDisplayRect() {
+ return mDisplayRect;
+ }
+
+ Rectangle getAppRect() {
+ return mAppRect;
+ }
+
+ static Display create(LinkedList<String> dump, Pattern[] exitPatterns) {
+ // TODO: exit pattern for displays?
+ final String line = dump.peek().trim();
+
+ Matcher matcher = sDisplayIdPattern.matcher(line);
+ if (!matcher.matches()) {
+ return null;
+ }
+
+ CLog.logAndDisplay(INFO, TAG + "DISPLAY_ID: " + line);
+ dump.pop();
+
+ final int displayId = Integer.valueOf(matcher.group(1));
+ final Display display = new Display(displayId);
+ display.extract(dump, exitPatterns);
+ return display;
+ }
+
+ private void extract(LinkedList<String> dump, Pattern[] exitPatterns) {
+ while (!doneExtracting(dump, exitPatterns)) {
+ final String line = dump.pop().trim();
+
+ final Matcher matcher = sDisplayInfoPattern.matcher(line);
+ if (matcher.matches()) {
+ CLog.logAndDisplay(INFO, TAG + "DISPLAY_INFO: " + line);
+ mDpi = Integer.valueOf(matcher.group(2));
+
+ final int displayWidth = Integer.valueOf(matcher.group(3));
+ final int displayHeight = Integer.valueOf(matcher.group(4));
+ mDisplayRect.setBounds(0, 0, displayWidth, displayHeight);
+
+ final int appWidth = Integer.valueOf(matcher.group(5));
+ final int appHeight = Integer.valueOf(matcher.group(6));
+ mAppRect.setBounds(0, 0, appWidth, appHeight);
+
+ // break as we don't need other info for now
+ break;
+ }
+ // Extract other info here if needed
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "Display #" + mDisplayId + ": mDisplayRect=" + mDisplayRect
+ + " mAppRect=" + mAppRect;
+ }
+ }
+
+ static class WindowState extends WindowContainer {
+ private static final String TAG = "[WindowState] ";
+
+ private static final String RECT_STR = "\\[(\\d+),(\\d+)\\]\\[(\\d+),(\\d+)\\]";
+ private static final Pattern sFramePattern =
+ Pattern.compile("Frames: containing=" + RECT_STR + " parent=" + RECT_STR);
+ private static final Pattern sWindowAssociationPattern =
+ Pattern.compile("mDisplayId=(\\d+) stackId=(\\d+) (.+)");
+
+ private final String mName;
+ private final String mAppToken;
+ private final boolean mStarting;
+ private final boolean mExiting;
+ private int mDisplayId = 0;
+ private Rectangle mContainingFrame = new Rectangle();
+ private Rectangle mParentFrame = new Rectangle();
+
+ private WindowState(Matcher matcher, boolean starting, boolean exiting) {
+ mName = matcher.group(4);
+ mAppToken = matcher.group(2);
+ mStarting = starting;
+ mExiting = exiting;
+ }
+
+ String getName() {
+ return mName;
+ }
+
+ String getToken() {
+ return mAppToken;
+ }
+
+ boolean isStartingWindow() {
+ return mStarting;
+ }
+
+ boolean isExitingWindow() {
+ return mExiting;
+ }
+
+ int getDisplayId() {
+ return mDisplayId;
+ }
+
+ Rectangle getContainingFrame() {
+ return mContainingFrame;
+ }
+
+ Rectangle getParentFrame() {
+ return mParentFrame;
+ }
+
+ static WindowState create(LinkedList<String> dump, Pattern[] exitPatterns) {
+ final String line = dump.peek().trim();
+
+ Matcher matcher = sWindowPattern.matcher(line);
+ if (!matcher.matches()) {
+ return null;
+ }
+
+ CLog.logAndDisplay(INFO, TAG + "WINDOW: " + line);
+ dump.pop();
+
+ final WindowState window;
+ Matcher specialMatcher = sStartingWindowPattern.matcher(line);
+ if (specialMatcher.matches()) {
+ CLog.logAndDisplay(INFO, TAG + "STARTING: " + line);
+ window = new WindowState(specialMatcher, true, false);
+ } else {
+ specialMatcher = sExitingWindowPattern.matcher(line);
+ if (specialMatcher.matches()) {
+ CLog.logAndDisplay(INFO, TAG + "EXITING: " + line);
+ window = new WindowState(specialMatcher, false, true);
+ } else {
+ window = new WindowState(matcher, false, false);
+ }
+ }
+
+ window.extract(dump, exitPatterns);
+ return window;
+ }
+
+ private void extract(LinkedList<String> dump, Pattern[] exitPatterns) {
+ while (!doneExtracting(dump, exitPatterns)) {
+ final String line = dump.pop().trim();
+
+ Matcher matcher = sWindowAssociationPattern.matcher(line);
+ if (matcher.matches()) {
+ CLog.logAndDisplay(INFO, TAG + "WINDOW_ASSOCIATION: " + line);
+ mDisplayId = Integer.valueOf(matcher.group(1));
+ continue;
+ }
+
+ matcher = sFramePattern.matcher(line);
+ if (matcher.matches()) {
+ CLog.logAndDisplay(INFO, TAG + "FRAME: " + line);
+ extractMultipleBounds(matcher, 1, mContainingFrame, mParentFrame);
+ continue;
+ }
+
+ // Extract other info here if needed
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "WindowState: {" + mAppToken + " " + mName
+ + (mStarting ? " STARTING" : "") + (mExiting ? " EXITING" : "") + "}"
+ + " cf=" + mContainingFrame + " pf=" + mParentFrame;
+ }
+ }
}
diff --git a/libs/json/Android.mk b/libs/json/Android.mk
index 7ec9e79..231f635 100644
--- a/libs/json/Android.mk
+++ b/libs/json/Android.mk
@@ -15,6 +15,9 @@
#
LOCAL_PATH:= $(call my-dir)
+
+# Build the host library
+# ======================
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under, src)
@@ -23,3 +26,13 @@
include $(BUILD_HOST_JAVA_LIBRARY)
+# Build the target library
+# =======================
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_MODULE := json
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
diff --git a/libs/vogar-expect/Android.mk b/libs/vogar-expect/Android.mk
index 075bb43..2b5e074 100644
--- a/libs/vogar-expect/Android.mk
+++ b/libs/vogar-expect/Android.mk
@@ -15,6 +15,9 @@
#
LOCAL_PATH:= $(call my-dir)
+
+# Build the host library
+# ======================
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_MODULE := vogarexpectlib
@@ -23,3 +26,13 @@
LOCAL_STATIC_JAVA_LIBRARIES := guavalib jsonlib
include $(BUILD_HOST_JAVA_LIBRARY)
+# Build the target library
+# =======================
+include $(CLEAR_VARS)
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_MODULE := vogarexpect
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_STATIC_JAVA_LIBRARIES := guava json
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
diff --git a/libs/vogar-expect/src/vogar/ExpectationStore.java b/libs/vogar-expect/src/vogar/ExpectationStore.java
index b7b8d5a..bf87b46 100644
--- a/libs/vogar-expect/src/vogar/ExpectationStore.java
+++ b/libs/vogar-expect/src/vogar/ExpectationStore.java
@@ -16,25 +16,24 @@
package vogar;
-//import com.google.caliper.internal.gson.stream.JsonReader;
-
import com.android.json.stream.JsonReader;
import com.google.common.base.Joiner;
import com.google.common.base.Splitter;
import com.google.common.collect.Iterables;
-
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.net.URL;
import java.util.Collections;
-import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.regex.Pattern;
-
import vogar.commands.Command;
import vogar.util.Log;
@@ -129,26 +128,61 @@
return result;
}
+ /**
+ * Create an {@link ExpectationStore} that is populated from expectation resources.
+ * @param owningClass the class from which the resources are loaded.
+ * @param expectationResources the set of paths to the expectation resources; the paths are
+ * either relative to the owning class, or absolute (starting with a /).
+ * @param mode the mode within which the tests are to be run.
+ * @return the populated {@link ExpectationStore}.
+ * @throws IOException if there was a problem loading
+ */
+ public static ExpectationStore parseResources(
+ Class<?> owningClass, Set<String> expectationResources, ModeId mode)
+ throws IOException {
+ ExpectationStore result = new ExpectationStore();
+ for (String expectationsPath : expectationResources) {
+ URL url = owningClass.getResource(expectationsPath);
+ if (url == null) {
+ Log.warn("Could not find resource '" + expectationsPath
+ + "' relative to " + owningClass);
+ } else {
+ result.parse(url, mode);
+ }
+ }
+ return result;
+ }
+
+ private void parse(URL url, ModeId mode) throws IOException {
+ Log.verbose("loading expectations from " + url);
+
+ try (InputStream is = url.openStream();
+ Reader reader = new InputStreamReader(is)) {
+ parse(reader, url.toString(), mode);
+ }
+ }
+
public void parse(File expectationsFile, ModeId mode) throws IOException {
Log.verbose("loading expectations file " + expectationsFile);
+ try (Reader fileReader = new FileReader(expectationsFile)) {
+ String source = expectationsFile.toString();
+ parse(fileReader, source, mode);
+ }
+ }
+
+ private void parse(Reader reader, String source, ModeId mode) throws IOException {
int count = 0;
- JsonReader reader = null;
- try {
- reader = new JsonReader(new FileReader(expectationsFile));
- reader.setLenient(true);
- reader.beginArray();
- while (reader.hasNext()) {
- readExpectation(reader, mode);
+ try (JsonReader jsonReader = new JsonReader(reader)) {
+ jsonReader.setLenient(true);
+ jsonReader.beginArray();
+ while (jsonReader.hasNext()) {
+ readExpectation(jsonReader, mode);
count++;
}
- reader.endArray();
+ jsonReader.endArray();
- Log.verbose("loaded " + count + " expectations from " + expectationsFile);
- } finally {
- if (reader != null) {
- reader.close();
- }
+ Log.verbose("loaded " + count + " expectations from " + source);
}
}
diff --git a/tests/abioverride/src/android/abioverride/cts/AbiOverrideTest.java b/tests/abioverride/src/android/abioverride/cts/AbiOverrideTest.java
deleted file mode 100644
index c73a0932..0000000
--- a/tests/abioverride/src/android/abioverride/cts/AbiOverrideTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
-package android.abioverride.cts;
-
-import android.abioverride.AbiOverrideActivity;
-import android.test.ActivityInstrumentationTestCase2;
-
-public class AbiOverrideTest extends ActivityInstrumentationTestCase2<AbiOverrideActivity> {
- /**
- * A reference to the activity whose shared preferences are being tested.
- */
- private AbiOverrideActivity mActivity;
-
- public AbiOverrideTest() {
- super(AbiOverrideActivity.class);
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- // Start the activity and get a reference to it.
- mActivity = getActivity();
- // Wait for the UI Thread to become idle.
- getInstrumentation().waitForIdleSync();
- }
-
- @Override
- protected void tearDown() throws Exception {
- // Scrub the activity so it can be freed. The next time the setUp will create a new activity
- // rather than reusing the old one.
- mActivity = null;
- super.tearDown();
- }
-
- /**
- * Test if the activity is run in a 32 bit process. In a 32 bit process,
- * the flag is a No-op (it is not meaningful to have multiple ABIs).
- *
- * @throws Exception
- */
- public void testRunIn32BitProcess() throws Exception {
- assertFalse("Process isn't 32 bit", mActivity.is64Bit());
- }
-}
diff --git a/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityEndToEndTest.java b/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityEndToEndTest.java
index 1bd4e0a..d8a1be1 100644
--- a/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityEndToEndTest.java
+++ b/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityEndToEndTest.java
@@ -332,6 +332,7 @@
.setTicker(message)
.setContentTitle("")
.setContentText("")
+ .setPriority(Notification.PRIORITY_MAX)
// Mark the notification as "interruptive" by specifying a vibration pattern. This
// ensures it's announced properly on watch-type devices.
.setVibrate(new long[] {})
diff --git a/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilitySoftKeyboardModesTest.java b/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilitySoftKeyboardModesTest.java
index 649df16..4eb625c 100644
--- a/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilitySoftKeyboardModesTest.java
+++ b/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilitySoftKeyboardModesTest.java
@@ -14,30 +14,18 @@
package android.accessibilityservice.cts;
-import android.accessibilityservice.AccessibilityService;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.accessibilityservice.AccessibilityService.SoftKeyboardController;
import android.app.UiAutomation;
import android.content.ContentResolver;
import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
import android.os.Bundle;
import android.os.ParcelFileDescriptor;
import android.os.SystemClock;
import android.provider.Settings;
import android.test.ActivityInstrumentationTestCase2;
-import android.test.suitebuilder.annotation.MediumTest;
-import android.text.Selection;
-import android.text.TextUtils;
-import android.view.View;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
-import android.view.accessibility.AccessibilityNodeInfo;
-import android.view.WindowManager;
-import android.widget.EditText;
-import android.widget.TextView;
import android.accessibilityservice.cts.R;
@@ -63,10 +51,20 @@
private static final long TIMEOUT_PROPAGATE_SETTING = 5000;
+ /**
+ * Timeout required for pending Binder calls or event processing to
+ * complete.
+ */
+ private static final long TIMEOUT_ASYNC_PROCESSING = 5000;
+
+ /**
+ * The timeout since the last accessibility event to consider the device idle.
+ */
+ private static final long TIMEOUT_ACCESSIBILITY_STATE_IDLE = 500;
+
private static final int SHOW_MODE_AUTO = 0;
private static final int SHOW_MODE_HIDDEN = 1;
- private int mCallbackCount;
private int mLastCallbackValue;
private Context mContext;
@@ -162,6 +160,7 @@
// Request the keyboard be hidden.
assertTrue(mKeyboardController.setShowMode(SHOW_MODE_HIDDEN));
waitForWindowStateChanged();
+ waitForIdle();
// Make sure the keyboard is hidden.
assertEquals(numWindowsWithIme - 1, mService.getTestWindowsListSize());
@@ -169,6 +168,7 @@
// Request the default keyboard mode.
assertTrue(mKeyboardController.setShowMode(SHOW_MODE_AUTO));
waitForWindowStateChanged();
+ waitForIdle();
// Make sure the keyboard is visible.
assertEquals(numWindowsWithIme, mService.getTestWindowsListSize());
@@ -186,6 +186,7 @@
// Set the show mode to SHOW_MODE_HIDDEN.
assertTrue(mKeyboardController.setShowMode(SHOW_MODE_HIDDEN));
waitForWindowStateChanged();
+ waitForIdle();
// Make sure the keyboard is hidden.
assertEquals(numWindowsWithIme - 1, mService.getTestWindowsListSize());
@@ -193,6 +194,7 @@
// Make sure we can see the soft keyboard once all Accessibility Services are disabled.
disableAllServices();
waitForWindowStateChanged();
+ waitForIdle();
// Enable our test service,.
enableTestService();
@@ -259,7 +261,8 @@
},
TIMEOUT_PROPAGATE_SETTING);
} catch (TimeoutException ignored) {
- // Ignore since the event could have occured before this method was called. There should // be a check after this method returns to catch incorrect values.
+ // Ignore since the event could have occured before this method was called. There should
+ // be a check after this method returns to catch incorrect values.
} finally {
uiAutomation.destroy();
}
@@ -345,6 +348,10 @@
throw new IllegalStateException("Stub accessiblity service not found");
}
+ private void waitForIdle() throws TimeoutException {
+ getUiAutomation().waitForIdle(TIMEOUT_ACCESSIBILITY_STATE_IDLE, TIMEOUT_ASYNC_PROCESSING);
+ }
+
/**
* Activity for testing the AccessibilityService API for hiding and showring the soft keyboard.
*/
diff --git a/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java b/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java
index 3f27cd7..d328916 100755
--- a/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java
+++ b/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java
@@ -91,7 +91,7 @@
// Find a button to click on.
final AccessibilityNodeInfo button1 = uiAutomation.getRootInActiveWindow()
.findAccessibilityNodeInfosByViewId(
- "com.android.cts.accessibilityservice:id/button1").get(0);
+ "android.accessibilityservice.cts:id/button1").get(0);
// Argh...
final List<AccessibilityEvent> events = new ArrayList<AccessibilityEvent>();
@@ -163,7 +163,7 @@
// Find a button to click on.
final AccessibilityNodeInfo button1 = uiAutomation.getRootInActiveWindow()
.findAccessibilityNodeInfosByViewId(
- "com.android.cts.accessibilityservice:id/button1").get(0);
+ "android.accessibilityservice.cts:id/button1").get(0);
// Argh...
final List<AccessibilityEvent> events = new ArrayList<AccessibilityEvent>();
@@ -218,7 +218,7 @@
// Find a button to click on.
final AccessibilityNodeInfo button1 = uiAutomation.getRootInActiveWindow()
.findAccessibilityNodeInfosByViewId(
- "com.android.cts.accessibilityservice:id/button1").get(0);
+ "android.accessibilityservice.cts:id/button1").get(0);
// Argh...
final List<AccessibilityEvent> events = new ArrayList<AccessibilityEvent>();
@@ -249,7 +249,7 @@
// Find a another button from the event's window.
final AccessibilityNodeInfo button2 = window.getRoot()
.findAccessibilityNodeInfosByViewId(
- "com.android.cts.accessibilityservice:id/button2").get(0);
+ "android.accessibilityservice.cts:id/button2").get(0);
// Click the second button.
uiAutomation.executeAndWaitForEvent(new Runnable() {
@@ -638,6 +638,50 @@
}
}
+ @MediumTest
+ public void testWindowDockAndUndock_dividerWindowAppearsAndDisappears() throws Exception {
+ setAccessInteractiveWindowsFlag();
+ final UiAutomation uiAutomation = getInstrumentation().getUiAutomation();
+ assertFalse(isDividerWindowPresent(uiAutomation));
+ Runnable toggleSplitScreenRunnable = new Runnable() {
+ @Override
+ public void run() {
+ assertTrue(uiAutomation.performGlobalAction(
+ AccessibilityService.GLOBAL_ACTION_TOGGLE_SPLIT_SCREEN));
+ }
+ };
+ UiAutomation.AccessibilityEventFilter windowsChangedFilter =
+ new UiAutomation.AccessibilityEventFilter() {
+ @Override
+ public boolean accept(AccessibilityEvent event) {
+ return (event.getEventType() == AccessibilityEvent.TYPE_WINDOWS_CHANGED);
+ }
+ };
+
+ uiAutomation.executeAndWaitForEvent(toggleSplitScreenRunnable, windowsChangedFilter,
+ TIMEOUT_ASYNC_PROCESSING);
+ waitForIdle();
+ assertTrue(isDividerWindowPresent(uiAutomation));
+ uiAutomation.executeAndWaitForEvent(toggleSplitScreenRunnable, windowsChangedFilter,
+ TIMEOUT_ASYNC_PROCESSING);
+ waitForIdle();
+ assertFalse(isDividerWindowPresent(uiAutomation));
+ }
+
+ private boolean isDividerWindowPresent(UiAutomation uiAutomation) {
+ List<AccessibilityWindowInfo> windows = uiAutomation.getWindows();
+ final int windowCount = windows.size();
+ for (int i = 0; i < windowCount; i++) {
+ AccessibilityWindowInfo window = windows.get(i);
+ Rect bounds = new Rect();
+ window.getBoundsInScreen(bounds);
+ if (window.getType() == AccessibilityWindowInfo.TYPE_SPLIT_SCREEN_DIVIDER) {
+ return true;
+ }
+ }
+ return false;
+ }
+
private void assertSingleAccessibilityFocus() {
UiAutomation uiAutomation = getInstrumentation().getUiAutomation();
List<AccessibilityWindowInfo> windows = uiAutomation.getWindows();
@@ -858,7 +902,7 @@
classNameAndTextList.add("android.widget.ButtonB8");
classNameAndTextList.add("android.widget.ButtonB9");
- String contentViewIdResName = "com.android.cts.accessibilityservice:id/added_content";
+ String contentViewIdResName = "android.accessibilityservice.cts:id/added_content";
boolean verifyContent = false;
Queue<AccessibilityNodeInfo> fringe = new LinkedList<AccessibilityNodeInfo>();
diff --git a/tests/admin/src/android/admin/cts/DeviceAdminReceiverTest.java b/tests/admin/src/android/admin/cts/DeviceAdminReceiverTest.java
index b804625..9b80b33 100644
--- a/tests/admin/src/android/admin/cts/DeviceAdminReceiverTest.java
+++ b/tests/admin/src/android/admin/cts/DeviceAdminReceiverTest.java
@@ -27,6 +27,18 @@
private static final String TAG = DeviceAdminReceiverTest.class.getSimpleName();
private static final String DISABLE_WARNING = "Disable Warning";
+ private static final String BUGREPORT_HASH = "f4k3h45h";
+
+ private static final String ACTION_BUGREPORT_SHARING_DECLINED =
+ "android.app.action.BUGREPORT_SHARING_DECLINED";
+ private static final String ACTION_BUGREPORT_FAILED = "android.app.action.BUGREPORT_FAILED";
+ private static final String ACTION_BUGREPORT_SHARE =
+ "android.app.action.BUGREPORT_SHARE";
+ private static final String ACTION_SECURITY_LOGS_AVAILABLE
+ = "android.app.action.SECURITY_LOGS_AVAILABLE";
+ private static final String EXTRA_BUGREPORT_FAILURE_REASON =
+ "android.app.extra.BUGREPORT_FAILURE_REASON";
+ private static final String EXTRA_BUGREPORT_HASH = "android.app.extra.BUGREPORT_HASH";
private static final int PASSWORD_CHANGED = 0x1;
private static final int PASSWORD_FAILED = 0x2;
@@ -34,6 +46,10 @@
private static final int DEVICE_ADMIN_ENABLED = 0x8;
private static final int DEVICE_ADMIN_DISABLE_REQUESTED = 0x10;
private static final int DEVICE_ADMIN_DISABLED = 0x20;
+ private static final int BUGREPORT_SHARING_DECLINED = 0x40;
+ private static final int BUGREPORT_FAILED = 0x80;
+ private static final int BUGREPORT_SHARED = 0x100;
+ private static final int SECURITY_LOGS_AVAILABLE = 0x200;
private TestReceiver mReceiver;
private boolean mDeviceAdmin;
@@ -70,20 +86,56 @@
mReceiver.reset();
mReceiver.onReceive(mContext, new Intent(DeviceAdminReceiver.ACTION_DEVICE_ADMIN_DISABLED));
assertTrue(mReceiver.hasFlags(DEVICE_ADMIN_DISABLED));
+
+ mReceiver.reset();
+ mReceiver.onReceive(mContext, new Intent(ACTION_BUGREPORT_SHARING_DECLINED));
+ assertTrue(mReceiver.hasFlags(BUGREPORT_SHARING_DECLINED));
+
+ mReceiver.reset();
+ Intent bugreportFailedIntent = new Intent(ACTION_BUGREPORT_FAILED);
+ bugreportFailedIntent.putExtra(EXTRA_BUGREPORT_FAILURE_REASON,
+ DeviceAdminReceiver.BUGREPORT_FAILURE_FAILED_COMPLETING);
+ mReceiver.onReceive(mContext, bugreportFailedIntent);
+ assertTrue(mReceiver.hasFlags(BUGREPORT_FAILED));
+ assertEquals(DeviceAdminReceiver.BUGREPORT_FAILURE_FAILED_COMPLETING,
+ mReceiver.getBugreportFailureCode());
+
+ mReceiver.reset();
+ Intent bugreportSharedIntent = new Intent(ACTION_BUGREPORT_SHARE);
+ bugreportSharedIntent.putExtra(EXTRA_BUGREPORT_HASH, BUGREPORT_HASH);
+ mReceiver.onReceive(mContext, bugreportSharedIntent);
+ assertTrue(mReceiver.hasFlags(BUGREPORT_SHARED));
+ assertEquals(BUGREPORT_HASH, mReceiver.getBugreportHash());
+
+ mReceiver.reset();
+ mReceiver.onReceive(mContext, new Intent(ACTION_SECURITY_LOGS_AVAILABLE));
+ assertTrue(mReceiver.hasFlags(SECURITY_LOGS_AVAILABLE));
}
private class TestReceiver extends DeviceAdminReceiver {
private int mFlags = 0;
+ private int bugreportFailureCode = -1;
+ private String bugreportHash;
void reset() {
mFlags = 0;
+ bugreportFailureCode = -1;
+ bugreportHash = null;
}
boolean hasFlags(int flags) {
return mFlags == flags;
}
+ int getBugreportFailureCode() {
+ return bugreportFailureCode;
+ }
+
+ String getBugreportHash() {
+ return bugreportHash;
+ }
+
@Override
public void onPasswordChanged(Context context, Intent intent) {
super.onPasswordChanged(context, intent);
@@ -119,5 +171,31 @@
super.onDisabled(context, intent);
mFlags |= DEVICE_ADMIN_DISABLED;
}
+
+ @Override
+ public void onBugreportSharingDeclined(Context context, Intent intent) {
+ super.onBugreportSharingDeclined(context, intent);
+ mFlags |= BUGREPORT_SHARING_DECLINED;
+ }
+
+ @Override
+ public void onBugreportFailed(Context context, Intent intent, int failureCode) {
+ super.onBugreportFailed(context, intent, failureCode);
+ mFlags |= BUGREPORT_FAILED;
+ bugreportFailureCode = failureCode;
+ }
+
+ @Override
+ public void onBugreportShared(Context context, Intent intent, String bugreportHash) {
+ super.onBugreportShared(context, intent, bugreportHash);
+ mFlags |= BUGREPORT_SHARED;
+ this.bugreportHash = bugreportHash;
+ }
+
+ @Override
+ public void onSecurityLogsAvailable(Context context, Intent intent) {
+ super.onSecurityLogsAvailable(context, intent);
+ mFlags |= SECURITY_LOGS_AVAILABLE;
+ }
}
}
diff --git a/tests/admin/src/android/admin/cts/DevicePolicyManagerTest.java b/tests/admin/src/android/admin/cts/DevicePolicyManagerTest.java
index ae697a6..57d22dd 100644
--- a/tests/admin/src/android/admin/cts/DevicePolicyManagerTest.java
+++ b/tests/admin/src/android/admin/cts/DevicePolicyManagerTest.java
@@ -174,19 +174,6 @@
}
}
- public void testCreateUser_failIfNotDeviceOwner() {
- if (!mDeviceAdmin) {
- Log.w(TAG, "Skipping testCreateUser_failIfNotDeviceOwner");
- return;
- }
- try {
- mDevicePolicyManager.createUser(mComponent, "user name");
- fail("did not throw expected SecurityException");
- } catch (SecurityException e) {
- assertDeviceOwnerMessage(e.getMessage());
- }
- }
-
public void testRemoveUser_failIfNotDeviceOwner() {
if (!mDeviceAdmin) {
Log.w(TAG, "Skipping testRemoveUser_failIfNotDeviceOwner");
@@ -334,20 +321,6 @@
}
}
- public void testCreateAndInitializeUser_failIfNotDeviceOwner() {
- if (!mDeviceAdmin) {
- Log.w(TAG, "Skipping testCreateAndInitializeUser_failIfNotDeviceOwner");
- return;
- }
- try {
- mDevicePolicyManager.createAndInitializeUser(mComponent, "name", "admin name",
- mComponent, null);
- fail("did not throw expected SecurityException");
- } catch (SecurityException e) {
- assertDeviceOwnerMessage(e.getMessage());
- }
- }
-
public void testCreateAndManageUser_failIfNotDeviceOwner() {
if (!mDeviceAdmin) {
Log.w(TAG, "Skipping testCreateAndManageUser_failIfNotDeviceOwner");
diff --git a/tests/app/app/AndroidManifest.xml b/tests/app/app/AndroidManifest.xml
index c64e977..c163aac 100644
--- a/tests/app/app/AndroidManifest.xml
+++ b/tests/app/app/AndroidManifest.xml
@@ -289,9 +289,9 @@
<activity android:name="android.app.stubs.PipActivity"
android:label="PipActivity"
- android:resizeable="true"
+ android:resizeableActivity="true"
android:supportsPictureInPicture="true"
- android:configChanges="smallestScreenSize|orientation|screenSize">
+ android:configChanges="smallestScreenSize|orientation|screenSize|screenLayout">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST" />
@@ -300,9 +300,9 @@
<activity android:name="android.app.stubs.PipNotResizeableActivity"
android:label="PipNotResizeableActivity"
- android:resizeable="false"
+ android:resizeableActivity="false"
android:supportsPictureInPicture="true"
- android:configChanges="smallestScreenSize|orientation|screenSize">
+ android:configChanges="smallestScreenSize|orientation|screenSize|screenLayout">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST" />
@@ -311,9 +311,9 @@
<activity android:name="android.app.stubs.PipNotSupportedActivity"
android:label="PipNotSupportedActivity"
- android:resizeable="true"
+ android:resizeableActivity="true"
android:supportsPictureInPicture="false"
- android:configChanges="smallestScreenSize|orientation|screenSize">
+ android:configChanges="smallestScreenSize|orientation|screenSize|screenLayout">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.FRAMEWORK_INSTRUMENTATION_TEST" />
diff --git a/tests/app/src/android/app/cts/NotificationTest.java b/tests/app/src/android/app/cts/NotificationTest.java
index 9da1b25..42a158e 100644
--- a/tests/app/src/android/app/cts/NotificationTest.java
+++ b/tests/app/src/android/app/cts/NotificationTest.java
@@ -17,7 +17,6 @@
package android.app.cts;
import android.app.Notification;
-import android.app.Notification.Topic;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
@@ -26,9 +25,6 @@
import android.test.AndroidTestCase;
import android.widget.RemoteViews;
-import java.util.Arrays;
-import java.util.List;
-
public class NotificationTest extends AndroidTestCase {
private Notification mNotification;
@@ -162,33 +158,11 @@
.setContentTitle(CONTENT_TITLE)
.setContentText(CONTENT_TEXT)
.setContentIntent(contentIntent)
- .setTopic(new Topic("id1", "label1"))
.build();
assertEquals(CONTENT_TEXT, mNotification.extras.getString(Notification.EXTRA_TEXT));
assertEquals(CONTENT_TITLE, mNotification.extras.getString(Notification.EXTRA_TITLE));
assertEquals(1, mNotification.icon);
assertEquals(contentIntent, mNotification.contentIntent);
- assertEquals(new Topic("id1", "label1"), mNotification.getTopic());
- }
-
- public void testWriteTopicToParcel() {
- mNotification = new Notification.Builder(mContext)
- .setTopic(new Topic("id2", "label2"))
- .build();
- Parcel parcel = Parcel.obtain();
- mNotification.writeToParcel(parcel, 0);
- parcel.setDataPosition(0);
- // Test Notification(Parcel)
- Notification result = new Notification(parcel);
- assertEquals(new Topic("id2", "label2"), result.getTopic());
-
- mNotification = new Notification();
- parcel = Parcel.obtain();
- mNotification.writeToParcel(parcel, 0);
- parcel.setDataPosition(0);
- // Test Notification(Parcel)
- result = new Notification(parcel);
- assertNull(result.getTopic());
}
public void testToString() {
diff --git a/tests/camera/src/android/hardware/camera2/cts/CameraTestUtils.java b/tests/camera/src/android/hardware/camera2/cts/CameraTestUtils.java
index 0da92a6..1391eee 100644
--- a/tests/camera/src/android/hardware/camera2/cts/CameraTestUtils.java
+++ b/tests/camera/src/android/hardware/camera2/cts/CameraTestUtils.java
@@ -310,7 +310,11 @@
@Override
public void onImageAvailable(ImageReader reader) {
try {
- mQueue.put(reader.acquireNextImage());
+ Image imge = reader.acquireNextImage();
+ if (imge == null) {
+ return;
+ }
+ mQueue.put(imge);
if (mAsyncMode && mQueue.size() >= mMaxImages) {
Image img = mQueue.poll();
img.close();
diff --git a/tests/camera/src/android/hardware/camera2/cts/CaptureRequestTest.java b/tests/camera/src/android/hardware/camera2/cts/CaptureRequestTest.java
index 81af410..4272f59 100644
--- a/tests/camera/src/android/hardware/camera2/cts/CaptureRequestTest.java
+++ b/tests/camera/src/android/hardware/camera2/cts/CaptureRequestTest.java
@@ -79,6 +79,7 @@
private static final int NUM_RESULTS_WAIT_TIMEOUT = 100;
private static final int NUM_FRAMES_WAITED_FOR_UNKNOWN_LATENCY = 8;
private static final int NUM_TEST_FOCUS_DISTANCES = 10;
+ private static final int NUM_FOCUS_DISTANCES_REPEAT = 3;
// 5 percent error margin for calibrated device
private static final float FOCUS_DISTANCE_ERROR_PERCENT_CALIBRATED = 0.05f;
// 25 percent error margin for uncalibrated device
@@ -851,36 +852,66 @@
}
private void focusDistanceTestByCamera() throws Exception {
- Size maxPrevSize = mOrderedPreviewSizes.get(0);
- float[] testDistances = getFocusDistanceTestValuesInOrder();
CaptureRequest.Builder requestBuilder =
mCamera.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);
requestBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_OFF);
+ int calibrationStatus = mStaticInfo.getFocusDistanceCalibrationChecked();
+ float errorMargin = FOCUS_DISTANCE_ERROR_PERCENT_UNCALIBRATED;
+ if (calibrationStatus ==
+ CameraMetadata.LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED) {
+ errorMargin = FOCUS_DISTANCE_ERROR_PERCENT_CALIBRATED;
+ } else if (calibrationStatus ==
+ CameraMetadata.LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE) {
+ errorMargin = FOCUS_DISTANCE_ERROR_PERCENT_APPROXIMATE;
+ }
+
+ // Test changing focus distance with repeating request
+ focusDistanceTestRepeating(requestBuilder, errorMargin);
+
+ if (calibrationStatus ==
+ CameraMetadata.LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED) {
+ // Test changing focus distance with burst request
+ focusDistanceTestBurst(requestBuilder, errorMargin);
+ }
+ }
+
+ private void focusDistanceTestRepeating(CaptureRequest.Builder requestBuilder,
+ float errorMargin) throws Exception {
+ CaptureRequest request;
+ float[] testDistances = getFocusDistanceTestValuesInOrder(0, 0);
+ Size maxPrevSize = mOrderedPreviewSizes.get(0);
SimpleCaptureCallback resultListener = new SimpleCaptureCallback();
startPreview(requestBuilder, maxPrevSize, resultListener);
- CaptureRequest request;
float[] resultDistances = new float[testDistances.length];
+ int[] resultLensStates = new int[testDistances.length];
+
+ // Collect results
for (int i = 0; i < testDistances.length; i++) {
requestBuilder.set(CaptureRequest.LENS_FOCUS_DISTANCE, testDistances[i]);
request = requestBuilder.build();
resultListener = new SimpleCaptureCallback();
mSession.setRepeatingRequest(request, resultListener, mHandler);
waitForSettingsApplied(resultListener, NUM_FRAMES_WAITED_FOR_UNKNOWN_LATENCY);
- resultDistances[i] = verifyFocusDistanceControl(testDistances[i], request,
- resultListener);
+ waitForResultValue(resultListener, CaptureResult.LENS_STATE,
+ CaptureResult.LENS_STATE_STATIONARY, NUM_RESULTS_WAIT_TIMEOUT);
+ CaptureResult result = resultListener.getCaptureResultForRequest(request,
+ NUM_RESULTS_WAIT_TIMEOUT);
+
+ resultDistances[i] = getValueNotNull(result, CaptureResult.LENS_FOCUS_DISTANCE);
+ resultLensStates[i] = getValueNotNull(result, CaptureResult.LENS_STATE);
+
if (VERBOSE) {
- Log.v(TAG, "Capture request focus distance: " + testDistances[i] + " result: "
- + resultDistances[i]);
+ Log.v(TAG, "Capture repeating request focus distance: " + testDistances[i]
+ + " result: " + resultDistances[i] + " lens state " + resultLensStates[i]);
}
}
- // Verify the monotonicity
- mCollector.checkArrayMonotonicityAndNotAllEqual(CameraTestUtils.toObject(resultDistances),
- /*ascendingOrder*/true);
+ verifyFocusDistance(testDistances, resultDistances, resultLensStates,
+ /*ascendingOrder*/true, /*noOvershoot*/false, /*repeatStart*/0, /*repeatEnd*/0,
+ errorMargin);
- if (mStaticInfo.getCharacteristics().getKeys().
- contains(CameraCharacteristics.LENS_INFO_HYPERFOCAL_DISTANCE)) {
+ if (mStaticInfo.areKeysAvailable(CameraCharacteristics.LENS_INFO_HYPERFOCAL_DISTANCE)) {
// Test hyperfocal distance optionally
float hyperFocalDistance = mStaticInfo.getHyperfocalDistanceChecked();
@@ -894,57 +925,157 @@
// Then wait for the lens.state to be stationary.
waitForResultValue(resultListener, CaptureResult.LENS_STATE,
CaptureResult.LENS_STATE_STATIONARY, NUM_RESULTS_WAIT_TIMEOUT);
- // Need get reasonably accurate value.
CaptureResult result = resultListener.getCaptureResult(WAIT_FOR_RESULT_TIMEOUT_MS);
Float focusDistance = getValueNotNull(result, CaptureResult.LENS_FOCUS_DISTANCE);
- float errorMargin = FOCUS_DISTANCE_ERROR_PERCENT_UNCALIBRATED;
- int calibrationStatus = mStaticInfo.getFocusDistanceCalibrationChecked();
- if (calibrationStatus ==
- CameraMetadata.LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED) {
- errorMargin = FOCUS_DISTANCE_ERROR_PERCENT_CALIBRATED;
- } else if (calibrationStatus ==
- CameraMetadata.LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE) {
- errorMargin = FOCUS_DISTANCE_ERROR_PERCENT_APPROXIMATE;
- }
mCollector.expectInRange("Focus distance for hyper focal should be close enough to" +
- "requested value", focusDistance,
+ " requested value", focusDistance,
hyperFocalDistance * (1.0f - errorMargin),
- hyperFocalDistance * (1.0f + errorMargin)
- );
+ hyperFocalDistance * (1.0f + errorMargin));
}
}
}
+ private void focusDistanceTestBurst(CaptureRequest.Builder requestBuilder,
+ float errorMargin) throws Exception {
+
+ Size maxPrevSize = mOrderedPreviewSizes.get(0);
+ float[] testDistances = getFocusDistanceTestValuesInOrder(NUM_FOCUS_DISTANCES_REPEAT,
+ NUM_FOCUS_DISTANCES_REPEAT);
+ SimpleCaptureCallback resultListener = new SimpleCaptureCallback();
+ startPreview(requestBuilder, maxPrevSize, resultListener);
+
+ float[] resultDistances = new float[testDistances.length];
+ int[] resultLensStates = new int[testDistances.length];
+
+ final int maxPipelineDepth = mStaticInfo.getCharacteristics().get(
+ CameraCharacteristics.REQUEST_PIPELINE_MAX_DEPTH);
+
+ // Move lens to starting position, and wait for the lens.state to be stationary.
+ CaptureRequest request;
+ requestBuilder.set(CaptureRequest.LENS_FOCUS_DISTANCE, testDistances[0]);
+ request = requestBuilder.build();
+ mSession.setRepeatingRequest(request, resultListener, mHandler);
+ waitForResultValue(resultListener, CaptureResult.LENS_STATE,
+ CaptureResult.LENS_STATE_STATIONARY, NUM_RESULTS_WAIT_TIMEOUT);
+
+ // Submit burst of requests with different focus distances
+ List<CaptureRequest> burst = new ArrayList<>();
+ for (int i = 0; i < testDistances.length; i ++) {
+ requestBuilder.set(CaptureRequest.LENS_FOCUS_DISTANCE, testDistances[i]);
+ burst.add(requestBuilder.build());
+ }
+ mSession.captureBurst(burst, resultListener, mHandler);
+
+ for (int i = 0; i < testDistances.length; i++) {
+ CaptureResult result = resultListener.getCaptureResultForRequest(
+ burst.get(i), maxPipelineDepth+1);
+
+ resultDistances[i] = getValueNotNull(result, CaptureResult.LENS_FOCUS_DISTANCE);
+ resultLensStates[i] = getValueNotNull(result, CaptureResult.LENS_STATE);
+
+ if (VERBOSE) {
+ Log.v(TAG, "Capture burst request focus distance: " + testDistances[i]
+ + " result: " + resultDistances[i] + " lens state " + resultLensStates[i]);
+ }
+ }
+
+ verifyFocusDistance(testDistances, resultDistances, resultLensStates,
+ /*ascendingOrder*/true, /*noOvershoot*/true,
+ /*repeatStart*/NUM_FOCUS_DISTANCES_REPEAT, /*repeatEnd*/NUM_FOCUS_DISTANCES_REPEAT,
+ errorMargin);
+
+ }
+
/**
* Verify focus distance control.
*
- * @param distance The focus distance requested
- * @param request The capture request to control the manual focus distance
- * @param resultListener The capture listener to recieve capture result callbacks
- * @return the result focus distance
+ * Assumption:
+ * - First repeatStart+1 elements of requestedDistances share the same value
+ * - Last repeatEnd+1 elements of requestedDistances share the same value
+ * - All elements in between are monotonically increasing/decreasing depending on ascendingOrder.
+ * - Focuser is at requestedDistances[0] at the beginning of the test.
+ *
+ * @param requestedDistances The requested focus distances
+ * @param resultDistances The result focus distances
+ * @param lensStates The result lens states
+ * @param ascendingOrder The order of the expected focus distance request/output
+ * @param noOvershoot Assert that focus control doesn't overshoot the requested value
+ * @param repeatStart The number of times the starting focus distance is repeated
+ * @param repeatEnd The number of times the ending focus distance is repeated
+ * @param errorMargin The error margin between request and result
*/
- private float verifyFocusDistanceControl(float distance, CaptureRequest request,
- SimpleCaptureCallback resultListener) {
- // Need make sure the result corresponding to the request is back, then check.
- CaptureResult result =
- resultListener.getCaptureResultForRequest(request, NUM_RESULTS_WAIT_TIMEOUT);
- // Then wait for the lens.state to be stationary.
- waitForResultValue(resultListener, CaptureResult.LENS_STATE,
- CaptureResult.LENS_STATE_STATIONARY, NUM_RESULTS_WAIT_TIMEOUT);
- // Then check the focus distance.
- result = resultListener.getCaptureResultForRequest(request, NUM_RESULTS_WAIT_TIMEOUT);
- Float resultDistance = getValueNotNull(result, CaptureResult.LENS_FOCUS_DISTANCE);
- if (mStaticInfo.getFocusDistanceCalibrationChecked() ==
- CameraCharacteristics.LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED) {
- // TODO: what's more to test for CALIBRATED devices?
- }
+ private void verifyFocusDistance(float[] requestedDistances, float[] resultDistances,
+ int[] lensStates, boolean ascendingOrder, boolean noOvershoot, int repeatStart,
+ int repeatEnd, float errorMargin) {
float minValue = 0;
float maxValue = mStaticInfo.getMinimumFocusDistanceChecked();
- mCollector.expectInRange("Result focus distance is out of range",
- resultDistance, minValue, maxValue);
+ float hyperfocalDistance = 0;
+ if (mStaticInfo.areKeysAvailable(CameraCharacteristics.LENS_INFO_HYPERFOCAL_DISTANCE)) {
+ hyperfocalDistance = mStaticInfo.getHyperfocalDistanceChecked();
+ }
- return resultDistance;
+ // Verify lens and focus distance do not change for first repeatStart
+ // results.
+ for (int i = 0; i < repeatStart; i ++) {
+ float marginMin = requestedDistances[i] * (1.0f - errorMargin);
+ // HAL may choose to use hyperfocal distance for all distances between [0, hyperfocal].
+ float marginMax =
+ Math.max(requestedDistances[i], hyperfocalDistance) * (1.0f + errorMargin);
+
+ mCollector.expectEquals("Lens moves even though focus_distance didn't change",
+ lensStates[i], CaptureResult.LENS_STATE_STATIONARY);
+ if (noOvershoot) {
+ mCollector.expectInRange("Focus distance in result should be close enough to " +
+ "requested value", resultDistances[i], marginMin, marginMax);
+ }
+ mCollector.expectInRange("Result focus distance is out of range",
+ resultDistances[i], minValue, maxValue);
+ }
+
+ for (int i = repeatStart; i < resultDistances.length-1; i ++) {
+ float marginMin = requestedDistances[i] * (1.0f - errorMargin);
+ // HAL may choose to use hyperfocal distance for all distances between [0, hyperfocal].
+ float marginMax =
+ Math.max(requestedDistances[i], hyperfocalDistance) * (1.0f + errorMargin);
+ if (noOvershoot) {
+ // Result focus distance shouldn't overshoot the request
+ boolean condition;
+ if (ascendingOrder) {
+ condition = resultDistances[i] <= marginMax;
+ } else {
+ condition = resultDistances[i] >= marginMin;
+ }
+ mCollector.expectTrue(String.format(
+ "Lens shouldn't move past request focus distance. result " +
+ resultDistances[i] + " vs target of " +
+ (ascendingOrder ? marginMax : marginMin)), condition);
+ }
+
+ // Verify monotonically increased focus distance setting
+ boolean condition;
+ float compareDistance = resultDistances[i+1] - resultDistances[i];
+ if (i < resultDistances.length-1-repeatEnd) {
+ condition = (ascendingOrder ? compareDistance > 0 : compareDistance < 0);
+ } else {
+ condition = (ascendingOrder ? compareDistance >= 0 : compareDistance <= 0);
+ }
+ mCollector.expectTrue(String.format("Adjacent [resultDistances, lens_state] results ["
+ + resultDistances[i] + "," + lensStates[i] + "], [" + resultDistances[i+1] + ","
+ + lensStates[i+1] + "] monotonicity is broken"), condition);
+ }
+
+ mCollector.expectTrue(String.format("All values of this array are equal: " +
+ resultDistances[0] + " " + resultDistances[resultDistances.length-1]),
+ resultDistances[0] != resultDistances[resultDistances.length-1]);
+
+ // Verify lens moved to destination location.
+ mCollector.expectInRange("Focus distance " + resultDistances[resultDistances.length-1] +
+ " for minFocusDistance should be closed enough to requested value " +
+ requestedDistances[requestedDistances.length-1],
+ resultDistances[resultDistances.length-1],
+ requestedDistances[requestedDistances.length-1] * (1.0f - errorMargin),
+ requestedDistances[requestedDistances.length-1] * (1.0f + errorMargin));
}
/**
@@ -2232,16 +2363,28 @@
/**
* Generate test focus distances in range of [0, minFocusDistance] in increasing order.
+ *
+ * @param repeatMin number of times minValue will be repeated.
+ * @param repeatMax number of times maxValue will be repeated.
*/
- private float[] getFocusDistanceTestValuesInOrder() {
- float[] testValues = new float[NUM_TEST_FOCUS_DISTANCES + 1];
+ private float[] getFocusDistanceTestValuesInOrder(int repeatMin, int repeatMax) {
+ int totalCount = NUM_TEST_FOCUS_DISTANCES + 1 + repeatMin + repeatMax;
+ float[] testValues = new float[totalCount];
float minValue = 0;
float maxValue = mStaticInfo.getMinimumFocusDistanceChecked();
float range = maxValue - minValue;
float stepSize = range / NUM_TEST_FOCUS_DISTANCES;
- for (int i = 0; i < testValues.length; i++) {
- testValues[i] = minValue + stepSize * i;
+
+ for (int i = 0; i < repeatMin; i++) {
+ testValues[i] = minValue;
+ }
+ for (int i = 0; i <= NUM_TEST_FOCUS_DISTANCES; i++) {
+ testValues[repeatMin+i] = minValue + stepSize * i;
+ }
+ for (int i = 0; i < repeatMax; i++) {
+ testValues[repeatMin+NUM_TEST_FOCUS_DISTANCES+1+i] =
+ maxValue;
}
return testValues;
diff --git a/tests/camera/src/android/hardware/camera2/cts/DngCreatorTest.java b/tests/camera/src/android/hardware/camera2/cts/DngCreatorTest.java
index 4259882..6488cc6 100644
--- a/tests/camera/src/android/hardware/camera2/cts/DngCreatorTest.java
+++ b/tests/camera/src/android/hardware/camera2/cts/DngCreatorTest.java
@@ -66,6 +66,7 @@
private static final String TAG = "DngCreatorTest";
private static final boolean VERBOSE = Log.isLoggable(TAG, Log.VERBOSE);
private static final String DEBUG_DNG_FILE = "raw16.dng";
+ private static final String TEST_DNG_FILE = "test.dng";
private static final double IMAGE_DIFFERENCE_TOLERANCE = 65;
private static final int DEFAULT_PATCH_DIMEN = 512;
@@ -84,6 +85,11 @@
GPS_CALENDAR.set(2015, 0, 27, 2, 12, 01);
}
+ class CapturedData {
+ public Pair<List<Image>, CaptureResult> imagePair;
+ public CameraCharacteristics characteristics;
+ }
+
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -320,62 +326,22 @@
* </p>
*/
public void testRaw16JpegConsistency() throws Exception {
- for (int i = 0; i < mCameraIds.length; i++) {
- String deviceId = mCameraIds[i];
- List<ImageReader> captureReaders = new ArrayList<ImageReader>();
- List<CameraTestUtils.SimpleImageReaderListener> captureListeners =
- new ArrayList<CameraTestUtils.SimpleImageReaderListener>();
+ for (String deviceId : mCameraIds) {
+ List<ImageReader> captureReaders = new ArrayList<>();
FileOutputStream fileStream = null;
ByteArrayOutputStream outputStream = null;
FileChannel fileChannel = null;
try {
- openDevice(deviceId);
-
- if (!mStaticInfo.isCapabilitySupported(
- CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_RAW)) {
- Log.i(TAG, "RAW capability is not supported in camera " + mCameraIds[i] +
- ". Skip the test.");
+ CapturedData data = captureRawJpegImagePair(deviceId, captureReaders);
+ if (data == null) {
continue;
}
-
- Size activeArraySize = mStaticInfo.getRawDimensChecked();
-
- // Get largest jpeg size
- Size[] targetJpegSizes =
- mStaticInfo.getAvailableSizesForFormatChecked(ImageFormat.JPEG,
- StaticMetadata.StreamDirection.Output);
-
- Size largestJpegSize = Collections.max(Arrays.asList(targetJpegSizes),
- new CameraTestUtils.SizeComparator());
-
- // Create raw image reader and capture listener
- CameraTestUtils.SimpleImageReaderListener rawListener
- = new CameraTestUtils.SimpleImageReaderListener();
- captureReaders.add(createImageReader(activeArraySize, ImageFormat.RAW_SENSOR, 2,
- rawListener));
- captureListeners.add(rawListener);
-
-
- // Create jpeg image reader and capture listener
- CameraTestUtils.SimpleImageReaderListener jpegListener
- = new CameraTestUtils.SimpleImageReaderListener();
- captureReaders.add(createImageReader(largestJpegSize, ImageFormat.JPEG, 2,
- jpegListener));
- captureListeners.add(jpegListener);
-
- Pair<List<Image>, CaptureResult> resultPair = captureSingleRawShot(activeArraySize,
- captureReaders, /*waitForAe*/true, captureListeners);
- CameraCharacteristics characteristics = mStaticInfo.getCharacteristics();
- Image raw = resultPair.first.get(0);
- Image jpeg = resultPair.first.get(1);
+ Image raw = data.imagePair.first.get(0);
+ Image jpeg = data.imagePair.first.get(1);
Bitmap rawBitmap = Bitmap.createBitmap(raw.getWidth(), raw.getHeight(),
Bitmap.Config.ARGB_8888);
- Size rawBitmapSize = new Size(rawBitmap.getWidth(), rawBitmap.getHeight());
- assertTrue("Raw bitmap size must be equal to either pre-correction active array" +
- " size or pixel array size.", rawBitmapSize.equals(activeArraySize));
-
byte[] rawPlane = new byte[raw.getPlanes()[0].getRowStride() * raw.getHeight()];
// Render RAW image to a bitmap
@@ -384,15 +350,16 @@
RawConverter.convertToSRGB(RenderScriptSingleton.getRS(), raw.getWidth(),
raw.getHeight(), raw.getPlanes()[0].getRowStride(), rawPlane,
- characteristics, resultPair.second, /*offsetX*/0, /*offsetY*/0,
- /*out*/rawBitmap);
+ data.characteristics, data.imagePair.second, /*offsetX*/ 0, /*offsetY*/ 0,
+ /*out*/ rawBitmap);
rawPlane = null;
System.gc(); // Hint to VM
if (VERBOSE) {
// Generate DNG file
- DngCreator dngCreator = new DngCreator(characteristics, resultPair.second);
+ DngCreator dngCreator =
+ new DngCreator(data.characteristics, data.imagePair.second);
// Write DNG to file
String dngFilePath = DEBUG_FILE_NAME_BASE + "/camera_" + deviceId + "_" +
@@ -426,82 +393,8 @@
rawFilePath);
}
- raw.close();
-
- // Decompress JPEG image to a bitmap
- byte[] compressedJpegData = CameraTestUtils.getDataFromImage(jpeg);
-
- jpeg.close();
-
- // Get JPEG dimensions without decoding
- BitmapFactory.Options opt0 = new BitmapFactory.Options();
- opt0.inJustDecodeBounds = true;
- BitmapFactory.decodeByteArray(compressedJpegData, /*offset*/0,
- compressedJpegData.length, /*inout*/opt0);
- Rect jpegDimens = new Rect(0, 0, opt0.outWidth, opt0.outHeight);
-
- // Find square center patch from JPEG and RAW bitmaps
- RectF jpegRect = new RectF(jpegDimens);
- RectF rawRect = new RectF(0, 0, rawBitmap.getWidth(), rawBitmap.getHeight());
- int sideDimen = Math.min(Math.min(Math.min(Math.min(DEFAULT_PATCH_DIMEN,
- jpegDimens.width()), jpegDimens.height()), rawBitmap.getWidth()),
- rawBitmap.getHeight());
-
- RectF jpegIntermediate = new RectF(0, 0, sideDimen, sideDimen);
- jpegIntermediate.offset(jpegRect.centerX() - jpegIntermediate.centerX(),
- jpegRect.centerY() - jpegIntermediate.centerY());
-
- RectF rawIntermediate = new RectF(0, 0, sideDimen, sideDimen);
- rawIntermediate.offset(rawRect.centerX() - rawIntermediate.centerX(),
- rawRect.centerY() - rawIntermediate.centerY());
- Rect jpegFinal = new Rect();
- jpegIntermediate.roundOut(jpegFinal);
- Rect rawFinal = new Rect();
- rawIntermediate.roundOut(rawFinal);
-
- // Get RAW center patch, and free up rest of RAW image
- Bitmap rawPatch = Bitmap.createBitmap(rawBitmap, rawFinal.left, rawFinal.top,
- rawFinal.width(), rawFinal.height());
- rawBitmap.recycle();
- rawBitmap = null;
- System.gc(); // Hint to VM
-
- BitmapFactory.Options opt = new BitmapFactory.Options();
- opt.inPreferredConfig = Bitmap.Config.ARGB_8888;
- Bitmap jpegPatch = BitmapRegionDecoder.newInstance(compressedJpegData,
- /*offset*/0, compressedJpegData.length, /*isShareable*/true).
- decodeRegion(jpegFinal, opt);
-
- // Compare center patch from JPEG and rendered RAW bitmap
- double difference = BitmapUtils.calcDifferenceMetric(jpegPatch, rawPatch);
- if (difference > IMAGE_DIFFERENCE_TOLERANCE) {
- // Write JPEG patch to file
- String jpegFilePath = DEBUG_FILE_NAME_BASE + "/camera_" + deviceId +
- "_jpeg_patch.jpg";
- fileStream = new FileOutputStream(jpegFilePath);
- jpegPatch.compress(Bitmap.CompressFormat.JPEG, 90, fileStream);
- fileStream.flush();
- fileStream.close();
- Log.e(TAG, "Failed JPEG patch file for camera " + deviceId + " saved to " +
- jpegFilePath);
-
- // Write RAW patch to file
- String rawFilePath = DEBUG_FILE_NAME_BASE + "/camera_" + deviceId +
- "_raw_patch.jpg";
- fileStream = new FileOutputStream(rawFilePath);
- rawPatch.compress(Bitmap.CompressFormat.JPEG, 90, fileStream);
- fileStream.flush();
- fileStream.close();
- Log.e(TAG, "Failed RAW patch file for camera " + deviceId + " saved to " +
- rawFilePath);
-
- fail("Camera " + mCamera.getId() + ": RAW and JPEG image at for the same " +
- "frame are not similar, center patches have difference metric of " +
- difference);
- }
-
+ validateRawJpegImagePair(rawBitmap, jpeg, deviceId);
} finally {
- closeDevice(deviceId);
for (ImageReader r : captureReaders) {
closeImageReader(r);
}
@@ -521,6 +414,184 @@
}
}
+ /**
+ * Test basic DNG creation, ensure that the DNG image can be rendered by BitmapFactory.
+ */
+ public void testDngRenderingByBitmapFactor() throws Exception {
+ for (String deviceId : mCameraIds) {
+ List<ImageReader> captureReaders = new ArrayList<>();
+
+ CapturedData data = captureRawJpegImagePair(deviceId, captureReaders);
+ if (data == null) {
+ continue;
+ }
+ Image raw = data.imagePair.first.get(0);
+ Image jpeg = data.imagePair.first.get(1);
+
+ // Generate DNG file
+ DngCreator dngCreator = new DngCreator(data.characteristics, data.imagePair.second);
+
+ // Write DNG to file
+ String dngFilePath = DEBUG_FILE_NAME_BASE + "/camera_" + deviceId + "_"
+ + TEST_DNG_FILE;
+ // Write out captured DNG file for the first camera device if setprop is enabled
+ try (FileOutputStream fileStream = new FileOutputStream(dngFilePath)) {
+ dngCreator.writeImage(fileStream, raw);
+
+ // Render the DNG file using BitmapFactory.
+ Bitmap rawBitmap = BitmapFactory.decodeFile(dngFilePath);
+ assertNotNull(rawBitmap);
+
+ validateRawJpegImagePair(rawBitmap, jpeg, deviceId);
+ } finally {
+ for (ImageReader r : captureReaders) {
+ closeImageReader(r);
+ }
+
+ System.gc(); // Hint to VM
+ }
+ }
+ }
+
+ /*
+ * Create RAW + JPEG image pair with characteristics info.
+ */
+ private CapturedData captureRawJpegImagePair(String deviceId, List<ImageReader> captureReaders)
+ throws Exception {
+ CapturedData data = new CapturedData();
+ List<CameraTestUtils.SimpleImageReaderListener> captureListeners = new ArrayList<>();
+ try {
+ openDevice(deviceId);
+
+ if (!mStaticInfo.isCapabilitySupported(
+ CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_RAW)) {
+ Log.i(TAG, "RAW capability is not supported in camera " + deviceId
+ + ". Skip the test.");
+ return null;
+ }
+
+ Size activeArraySize = mStaticInfo.getRawDimensChecked();
+
+ // Get largest jpeg size
+ Size[] targetJpegSizes = mStaticInfo.getAvailableSizesForFormatChecked(
+ ImageFormat.JPEG, StaticMetadata.StreamDirection.Output);
+
+ Size largestJpegSize = Collections.max(Arrays.asList(targetJpegSizes),
+ new CameraTestUtils.SizeComparator());
+
+ // Create raw image reader and capture listener
+ CameraTestUtils.SimpleImageReaderListener rawListener =
+ new CameraTestUtils.SimpleImageReaderListener();
+ captureReaders.add(createImageReader(activeArraySize, ImageFormat.RAW_SENSOR, 2,
+ rawListener));
+ captureListeners.add(rawListener);
+
+
+ // Create jpeg image reader and capture listener
+ CameraTestUtils.SimpleImageReaderListener jpegListener =
+ new CameraTestUtils.SimpleImageReaderListener();
+ captureReaders.add(createImageReader(largestJpegSize, ImageFormat.JPEG, 2,
+ jpegListener));
+ captureListeners.add(jpegListener);
+
+ data.imagePair = captureSingleRawShot(activeArraySize,
+ captureReaders, /*waitForAe*/ true, captureListeners);
+ data.characteristics = mStaticInfo.getCharacteristics();
+
+ Image raw = data.imagePair.first.get(0);
+ Size rawBitmapSize = new Size(raw.getWidth(), raw.getHeight());
+ assertTrue("Raw bitmap size must be equal to either pre-correction active array" +
+ " size or pixel array size.", rawBitmapSize.equals(activeArraySize));
+
+ return data;
+ } finally {
+ closeDevice(deviceId);
+ }
+ }
+
+ /*
+ * Verify the image pair by comparing the center patch.
+ */
+ private void validateRawJpegImagePair(Bitmap rawBitmap, Image jpeg, String deviceId)
+ throws Exception {
+ // Decompress JPEG image to a bitmap
+ byte[] compressedJpegData = CameraTestUtils.getDataFromImage(jpeg);
+
+ // Get JPEG dimensions without decoding
+ BitmapFactory.Options opt0 = new BitmapFactory.Options();
+ opt0.inJustDecodeBounds = true;
+ BitmapFactory.decodeByteArray(compressedJpegData, /*offset*/0,
+ compressedJpegData.length, /*inout*/opt0);
+ Rect jpegDimens = new Rect(0, 0, opt0.outWidth, opt0.outHeight);
+
+ // Find square center patch from JPEG and RAW bitmaps
+ RectF jpegRect = new RectF(jpegDimens);
+ RectF rawRect = new RectF(0, 0, rawBitmap.getWidth(), rawBitmap.getHeight());
+ int sideDimen = Math.min(Math.min(Math.min(Math.min(DEFAULT_PATCH_DIMEN,
+ jpegDimens.width()), jpegDimens.height()), rawBitmap.getWidth()),
+ rawBitmap.getHeight());
+
+ RectF jpegIntermediate = new RectF(0, 0, sideDimen, sideDimen);
+ jpegIntermediate.offset(jpegRect.centerX() - jpegIntermediate.centerX(),
+ jpegRect.centerY() - jpegIntermediate.centerY());
+
+ RectF rawIntermediate = new RectF(0, 0, sideDimen, sideDimen);
+ rawIntermediate.offset(rawRect.centerX() - rawIntermediate.centerX(),
+ rawRect.centerY() - rawIntermediate.centerY());
+ Rect jpegFinal = new Rect();
+ jpegIntermediate.roundOut(jpegFinal);
+ Rect rawFinal = new Rect();
+ rawIntermediate.roundOut(rawFinal);
+
+ // Get RAW center patch, and free up rest of RAW image
+ Bitmap rawPatch = Bitmap.createBitmap(rawBitmap, rawFinal.left, rawFinal.top,
+ rawFinal.width(), rawFinal.height());
+ rawBitmap.recycle();
+ rawBitmap = null;
+ System.gc(); // Hint to VM
+
+ BitmapFactory.Options opt = new BitmapFactory.Options();
+ opt.inPreferredConfig = Bitmap.Config.ARGB_8888;
+ Bitmap jpegPatch = BitmapRegionDecoder.newInstance(compressedJpegData,
+ /*offset*/0, compressedJpegData.length, /*isShareable*/true).
+ decodeRegion(jpegFinal, opt);
+
+ // Compare center patch from JPEG and rendered RAW bitmap
+ double difference = BitmapUtils.calcDifferenceMetric(jpegPatch, rawPatch);
+ if (difference > IMAGE_DIFFERENCE_TOLERANCE) {
+ FileOutputStream fileStream = null;
+ try {
+ // Write JPEG patch to file
+ String jpegFilePath = DEBUG_FILE_NAME_BASE + "/camera_" + deviceId +
+ "_jpeg_patch.jpg";
+ fileStream = new FileOutputStream(jpegFilePath);
+ jpegPatch.compress(Bitmap.CompressFormat.JPEG, 90, fileStream);
+ fileStream.flush();
+ fileStream.close();
+ Log.e(TAG, "Failed JPEG patch file for camera " + deviceId + " saved to " +
+ jpegFilePath);
+
+ // Write RAW patch to file
+ String rawFilePath = DEBUG_FILE_NAME_BASE + "/camera_" + deviceId +
+ "_raw_patch.jpg";
+ fileStream = new FileOutputStream(rawFilePath);
+ rawPatch.compress(Bitmap.CompressFormat.JPEG, 90, fileStream);
+ fileStream.flush();
+ fileStream.close();
+ Log.e(TAG, "Failed RAW patch file for camera " + deviceId + " saved to " +
+ rawFilePath);
+
+ fail("Camera " + mCamera.getId() + ": RAW and JPEG image at for the same " +
+ "frame are not similar, center patches have difference metric of " +
+ difference);
+ } finally {
+ if (fileStream != null) {
+ fileStream.close();
+ }
+ }
+ }
+ }
+
private Pair<Image, CaptureResult> captureSingleRawShot(Size s, boolean waitForAe,
ImageReader captureReader,
CameraTestUtils.SimpleImageReaderListener captureListener) throws Exception {
diff --git a/tests/camera/src/android/hardware/camera2/cts/ExtendedCameraCharacteristicsTest.java b/tests/camera/src/android/hardware/camera2/cts/ExtendedCameraCharacteristicsTest.java
index 1c56e98..3bb573b 100644
--- a/tests/camera/src/android/hardware/camera2/cts/ExtendedCameraCharacteristicsTest.java
+++ b/tests/camera/src/android/hardware/camera2/cts/ExtendedCameraCharacteristicsTest.java
@@ -392,6 +392,18 @@
expectKeyAvailable(c, CameraCharacteristics.SENSOR_FORWARD_MATRIX2 , OPT , RAW );
}
+ // Required key if any of RAW format output is supported
+ StreamConfigurationMap config =
+ c.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
+ assertNotNull(String.format("No stream configuration map found for: ID %s",
+ mIds[counter]), config);
+ if (config.isOutputSupportedFor(ImageFormat.RAW_SENSOR) ||
+ config.isOutputSupportedFor(ImageFormat.RAW10) ||
+ config.isOutputSupportedFor(ImageFormat.RAW12) ||
+ config.isOutputSupportedFor(ImageFormat.RAW_PRIVATE)) {
+ expectKeyAvailable(c,
+ CameraCharacteristics.CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE, OPT, BC);
+ }
counter++;
}
}
diff --git a/tests/camera/src/android/hardware/camera2/cts/PerformanceTest.java b/tests/camera/src/android/hardware/camera2/cts/PerformanceTest.java
index f0f8f66..3f8e7db 100644
--- a/tests/camera/src/android/hardware/camera2/cts/PerformanceTest.java
+++ b/tests/camera/src/android/hardware/camera2/cts/PerformanceTest.java
@@ -114,16 +114,18 @@
* </p>
*/
public void testCameraLaunch() throws Exception {
- double[] cameraOpenTimes = new double[NUM_TEST_LOOPS];
- double[] configureStreamTimes = new double[NUM_TEST_LOOPS];
- double[] startPreviewTimes = new double[NUM_TEST_LOOPS];
- double[] stopPreviewTimes = new double[NUM_TEST_LOOPS];
- double[] cameraCloseTimes = new double[NUM_TEST_LOOPS];
- double[] cameraLaunchTimes = new double[NUM_TEST_LOOPS];
double[] avgCameraLaunchTimes = new double[mCameraIds.length];
int counter = 0;
for (String id : mCameraIds) {
+ // Do NOT move these variables to outer scope
+ // They will be passed to DeviceReportLog and their references will be stored
+ double[] cameraOpenTimes = new double[NUM_TEST_LOOPS];
+ double[] configureStreamTimes = new double[NUM_TEST_LOOPS];
+ double[] startPreviewTimes = new double[NUM_TEST_LOOPS];
+ double[] stopPreviewTimes = new double[NUM_TEST_LOOPS];
+ double[] cameraCloseTimes = new double[NUM_TEST_LOOPS];
+ double[] cameraLaunchTimes = new double[NUM_TEST_LOOPS];
try {
mStaticInfo = new StaticMetadata(mCameraManager.getCameraCharacteristics(id));
if (mStaticInfo.isColorOutputSupported()) {
@@ -224,13 +226,15 @@
* </p>
*/
public void testSingleCapture() throws Exception {
- double[] captureTimes = new double[NUM_TEST_LOOPS];
- double[] getPartialTimes = new double[NUM_TEST_LOOPS];
- double[] getResultTimes = new double[NUM_TEST_LOOPS];
double[] avgResultTimes = new double[mCameraIds.length];
int counter = 0;
for (String id : mCameraIds) {
+ // Do NOT move these variables to outer scope
+ // They will be passed to DeviceReportLog and their references will be stored
+ double[] captureTimes = new double[NUM_TEST_LOOPS];
+ double[] getPartialTimes = new double[NUM_TEST_LOOPS];
+ double[] getResultTimes = new double[NUM_TEST_LOOPS];
try {
openDevice(id);
diff --git a/tests/camera/src/android/hardware/cts/CameraGLTest.java b/tests/camera/src/android/hardware/cts/CameraGLTest.java
index cb83a36..1f86936 100644
--- a/tests/camera/src/android/hardware/cts/CameraGLTest.java
+++ b/tests/camera/src/android/hardware/cts/CameraGLTest.java
@@ -609,7 +609,8 @@
kTestSlopMargin;
int outOfBoundsCount = 0;
- for (int i = 1; i < kLoopCount; i++) {
+ // Ignore last frame because preview is turned off which impacts fps
+ for (int i = 1; i < kLoopCount - 1; i++) {
float frameDurationMs =
(timestamps[i] - timestamps[i-1]) / 1000000.f;
if (LOGVV) {
diff --git a/tests/expectations/knownfailures.txt b/tests/expectations/knownfailures.txt
index b0c3471..c24bfc6 100644
--- a/tests/expectations/knownfailures.txt
+++ b/tests/expectations/knownfailures.txt
@@ -165,14 +165,6 @@
bug: 17508787
},
{
- description: "This test should be outside of official CTS suite until it is verified for all Nexus devices",
- names: [
- "com.android.cts.devicepolicy.MixedDeviceOwnerTest#testPackageInstallUserRestrictions",
- "com.android.cts.devicepolicy.MixedProfileOwnerTest#testPackageInstallUserRestrictions"
- ],
- bug: 18928535
-},
-{
description: "Test is not yet properly implemented",
names: [
"android.voicesettings.cts.ZenModeTest#testAll"
diff --git a/tests/libcore/AndroidTest.xml b/tests/libcore/AndroidTest.xml
index e71669a..db4044d 100644
--- a/tests/libcore/AndroidTest.xml
+++ b/tests/libcore/AndroidTest.xml
@@ -27,11 +27,6 @@
<test class="com.android.compatibility.testtype.DalvikTest" >
<option name="run-name" value="CtsLibcoreTestCases" />
<option name="classpath" value="/data/local/tmp/ctslibcore/cts-dalvik-device-test-runner.jar" />
- <option name="expectations" value="CtsLibcoreTestCases.brokentests.expectations" />
- <option name="expectations" value="CtsLibcoreTestCases.icebox.expectations" />
- <option name="expectations" value="CtsLibcoreTestCases.knownfailures.expectations" />
- <option name="expectations" value="CtsLibcoreTestCases.taggedtests.expectations" />
- <option name="expectations" value="CtsLibcoreTestCases.failures.expectations" />
<option name="dalvik-arg" value="-Djava.io.tmpdir=/data/local/tmp/ctslibcore/java.io.tmpdir" />
<option name="dalvik-arg" value="-Duser.home=/data/local/tmp/ctslibcore/user.home" />
<option name="dalvik-arg" value="-Duser.name=shell" />
@@ -40,5 +35,6 @@
<option name="dalvik-arg" value="-Xcheck:jni" />
<option name="dalvik-arg" value="-Xjnigreflimit:2000" />
<option name="runner-arg" value="--apk=/data/local/tmp/ctslibcore/CtsLibcoreTestCases.apk" />
+ <option name="runtime-hint" value="12m" />
</test>
</configuration>
diff --git a/tests/libcore/runner/host-side/src/com/android/compatibility/testtype/DalvikTest.java b/tests/libcore/runner/host-side/src/com/android/compatibility/testtype/DalvikTest.java
index 4fc711c..c855e1a 100644
--- a/tests/libcore/runner/host-side/src/com/android/compatibility/testtype/DalvikTest.java
+++ b/tests/libcore/runner/host-side/src/com/android/compatibility/testtype/DalvikTest.java
@@ -25,6 +25,7 @@
import com.android.ddmlib.testrunner.TestIdentifier;
import com.android.tradefed.build.IBuildInfo;
import com.android.tradefed.config.Option;
+import com.android.tradefed.config.OptionCopier;
import com.android.tradefed.device.DeviceNotAvailableException;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.result.ITestInvocationListener;
@@ -33,15 +34,21 @@
import com.android.tradefed.testtype.IBuildReceiver;
import com.android.tradefed.testtype.IDeviceTest;
import com.android.tradefed.testtype.IRemoteTest;
+import com.android.tradefed.testtype.IRuntimeHintProvider;
+import com.android.tradefed.testtype.IShardableTest;
import com.android.tradefed.testtype.ITestFilterReceiver;
import com.android.tradefed.util.ArrayUtil;
+import com.android.tradefed.util.TimeVal;
import vogar.ExpectationStore;
import vogar.ModeId;
import java.io.File;
+import java.io.FilenameFilter;
import java.io.PrintWriter;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -52,10 +59,47 @@
* A wrapper to run tests against Dalvik.
*/
public class DalvikTest implements IAbiReceiver, IBuildReceiver, IDeviceTest, IRemoteTest,
- ITestFilterReceiver {
+ IRuntimeHintProvider, IShardableTest, ITestFilterReceiver {
private static final String TAG = DalvikTest.class.getSimpleName();
+ private static final String LIBCORE_PACKAGE = "android.core.tests.libcore.package.%s";
+ private static final Set<String> PACKAGES = new HashSet<>();
+ static {
+ PACKAGES.add(String.format(LIBCORE_PACKAGE, "com"));// Has 0 tests
+ PACKAGES.add(String.format(LIBCORE_PACKAGE, "conscrypt"));// Has 0 tests
+ PACKAGES.add(String.format(LIBCORE_PACKAGE, "dalvik"));// Has 0 tests
+ PACKAGES.add(String.format(LIBCORE_PACKAGE, "jsr166"));// Has 0 tests
+ PACKAGES.add(String.format(LIBCORE_PACKAGE, "libcore"));// Has 0 tests
+ PACKAGES.add(String.format(LIBCORE_PACKAGE, "okhttp"));// Has 0 tests
+ PACKAGES.add(String.format(LIBCORE_PACKAGE, "org"));// Has 0 tests
+ PACKAGES.add(String.format(LIBCORE_PACKAGE, "sun"));// Has 0 tests
+ PACKAGES.add(String.format(LIBCORE_PACKAGE, "tests"));
+ PACKAGES.add(String.format(LIBCORE_PACKAGE, "tzdata"));// Has 0 tests
+ PACKAGES.add("com.android.org.apache.harmony.beans");// Has 0 tests
+ PACKAGES.add("com.android.org.apache.harmony.logging");// Has 0 tests
+ PACKAGES.add("com.android.org.apache.harmony.prefs");// Has 0 tests
+ PACKAGES.add("com.android.org.apache.harmony.sql");// Has 0 tests
+ PACKAGES.add("org.apache.harmony.annotation.tests");// Has 0 tests
+ PACKAGES.add("org.apache.harmony.crypto.tests");// Has 0 tests
+ PACKAGES.add("org.apache.harmony.luni.tests");// Has 0 tests
+ PACKAGES.add("org.apache.harmony.nio.tests");// Has 0 tests
+ PACKAGES.add("org.apache.harmony.regex.tests");// Has 0 tests
+ PACKAGES.add("org.apache.harmony.security.tests");// Has 0 tests
+ PACKAGES.add("org.apache.harmony.tests.internal.net.www.protocol");// Has 0 tests
+ PACKAGES.add("org.apache.harmony.tests.java.io");
+ PACKAGES.add("org.apache.harmony.tests.java.lang");
+ PACKAGES.add("org.apache.harmony.tests.java.math");
+ PACKAGES.add("org.apache.harmony.tests.java.net");
+ PACKAGES.add("org.apache.harmony.tests.java.nio");
+ PACKAGES.add("org.apache.harmony.tests.java.text");
+ PACKAGES.add("org.apache.harmony.tests.java.util");
+ PACKAGES.add("org.apache.harmony.tests.javax.net");
+ PACKAGES.add("org.apache.harmony.tests.javax.security");
+ PACKAGES.add("org.json");
+ PACKAGES.add("org.w3c.domts");
+ }
+ private static final String EXPECTATIONS_EXT = ".expectations";
// Command to run the VM, args are bitness, classpath, dalvik-args, abi, runner-args,
// include and exclude filters, and exclude filters file.
private static final String COMMAND = "dalvikvm%s -classpath %s %s "
@@ -71,9 +115,6 @@
@Option(name = "run-name", description = "The name to use when reporting results")
private String mRunName;
- @Option(name = "expectations", description = "The names of the expectation files")
- private Set<String> mExpectations = new HashSet<>();
-
@Option(name = "classpath", description = "Holds the paths to search when loading tests")
private List<String> mClasspath = new ArrayList<>();
@@ -92,6 +133,11 @@
description = "The exclude filters of the test name to run.")
private List<String> mExcludeFilters = new ArrayList<>();
+ @Option(name = "runtime-hint",
+ isTimeVal = true,
+ description="The hint about the test's runtime.")
+ private long mRuntimeHint = 60000;// 1 minute
+
private IAbi mAbi;
private CompatibilityBuildHelper mBuildHelper;
private ITestDevice mDevice;
@@ -164,6 +210,14 @@
* {@inheritDoc}
*/
@Override
+ public long getRuntimeHint() {
+ return mRuntimeHint;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
public void run(final ITestInvocationListener listener) throws DeviceNotAvailableException {
String abiName = mAbi.getName();
String bitness = AbiUtils.getBitness(abiName);
@@ -172,8 +226,9 @@
PrintWriter out = null;
try {
Set<File> expectationFiles = new HashSet<>();
- for (String file : mExpectations) {
- expectationFiles.add(new File(mBuildHelper.getTestsDir(), file));
+ for (File f : mBuildHelper.getTestsDir().listFiles(
+ new ExpectationFileFilter(mRunName))) {
+ expectationFiles.add(f);
}
ExpectationStore store = ExpectationStore.parse(expectationFiles, ModeId.DEVICE);
@@ -200,7 +255,13 @@
}
// Create command
+ mDalvikArgs.add("-Duser.name=shell");
+ mDalvikArgs.add("-Duser.language=en");
+ mDalvikArgs.add("-Duser.region=US");
+ mDalvikArgs.add("-Xcheck:jni");
+ mDalvikArgs.add("-Xjnigreflimit:2000");
String dalvikArgs = ArrayUtil.join(" ", mDalvikArgs);
+
String runnerArgs = ArrayUtil.join(" ", mRunnerArgs);
// Filters
StringBuilder includeFilters = new StringBuilder();
@@ -216,7 +277,7 @@
// Filter files
String includeFile = ""; // String.format("--include-filter-file=%s", INCLUDE);
String excludeFile = String.format("--exclude-filter-file=%s", EXCLUDE_FILE);
- String command = String.format(COMMAND, bitness,
+ final String command = String.format(COMMAND, bitness,
ArrayUtil.join(File.pathSeparator, mClasspath),
dalvikArgs, abiName, runnerArgs,
includeFilters, excludeFilters, includeFile, excludeFile);
@@ -235,9 +296,12 @@
String tag = parts[0];
if (tag.equals(START_RUN)) {
listener.testRunStarted(mRunName, Integer.parseInt(parts[1]));
+ Log.logAndDisplay(LogLevel.INFO, TAG, command);
+ Log.logAndDisplay(LogLevel.INFO, TAG, line);
} else if (tag.equals(END_RUN)) {
listener.testRunEnded(Integer.parseInt(parts[1]),
new HashMap<String, String>());
+ Log.logAndDisplay(LogLevel.INFO, TAG, line);
} else if (tag.equals(START_TEST)) {
test = getTestIdentifier(parts[1]);
listener.testStarted(test);
@@ -266,4 +330,45 @@
mDevice.executeShellCommand(command, receiver, 1, TimeUnit.HOURS, 1);
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Collection<IRemoteTest> split() {
+ List<IRemoteTest> shards = new ArrayList<>();
+ // Test to catch all packages that aren't in PACKAGES
+ DalvikTest catchAll = new DalvikTest();
+ OptionCopier.copyOptionsNoThrow(this, catchAll);
+ shards.add(catchAll);
+ long runtimeHint = mRuntimeHint / PACKAGES.size();
+ catchAll.mRuntimeHint = runtimeHint;
+ for (String entry: PACKAGES) {
+ catchAll.addExcludeFilter(entry);
+ DalvikTest test = new DalvikTest();
+ OptionCopier.copyOptionsNoThrow(this, test);
+ test.addIncludeFilter(entry);
+ test.mRuntimeHint = runtimeHint;
+ shards.add(test);
+ }
+ return shards;
+ }
+
+ /**
+ * A {@link FilenameFilter} to find all the expectation files in a directory.
+ */
+ public static class ExpectationFileFilter implements FilenameFilter {
+
+ private String mName;
+
+ public ExpectationFileFilter(String name) {
+ mName = name;
+ }
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean accept(File dir, String name) {
+ return name.startsWith(mName) && name.endsWith(EXPECTATIONS_EXT);
+ }
+ }
}
diff --git a/tests/openglperf2/jni/reference/scene/flocking/FlockingScene.h b/tests/openglperf2/jni/reference/scene/flocking/FlockingScene.h
index 7cdcffe..191ebba 100644
--- a/tests/openglperf2/jni/reference/scene/flocking/FlockingScene.h
+++ b/tests/openglperf2/jni/reference/scene/flocking/FlockingScene.h
@@ -15,7 +15,6 @@
#define FLOCKINGSCENE_H
#include <graphics/Program.h>
-#include <utils/Compat.h>
#include "../Scene.h"
#include "Boid.h"
@@ -42,6 +41,6 @@
float mBoardHeight;
Program* mMainProgram;
Program* mWaterProgram;
- static const CONSTEXPR float BOID_SCALE = 1.0f / 50.0f;
+ static const constexpr float BOID_SCALE = 1.0f / 50.0f;
};
#endif
diff --git a/tests/tests/automotive/Android.mk b/tests/tests/automotive/Android.mk
index f4cef01..b21867d 100644
--- a/tests/tests/automotive/Android.mk
+++ b/tests/tests/automotive/Android.mk
@@ -24,7 +24,9 @@
# When built, explicitly put it in the data partition.
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
-LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner car
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner
+
+LOCAL_JAVA_LIBRARIES := android.car
LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/tests/automotive/AndroidManifest.xml b/tests/tests/automotive/AndroidManifest.xml
index e0ee3e0..984d896 100644
--- a/tests/tests/automotive/AndroidManifest.xml
+++ b/tests/tests/automotive/AndroidManifest.xml
@@ -15,14 +15,14 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.support.car.cts">
+ package="android.car.cts">
<uses-feature android:name="android.hardware.type.automotive" />
<application>
<uses-library android:name="android.test.runner" />
</application>
<instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
- android:targetPackage="android.support.car.cts"
+ android:targetPackage="android.car.cts"
android:label="CTS tests for Automotive">
<meta-data android:name="listener"
android:value="com.android.cts.runner.CtsTestRunListener" />
diff --git a/tests/tests/automotive/src/android/support/car/cts/CarApiTestBase.java b/tests/tests/automotive/src/android/car/cts/CarApiTestBase.java
similarity index 83%
rename from tests/tests/automotive/src/android/support/car/cts/CarApiTestBase.java
rename to tests/tests/automotive/src/android/car/cts/CarApiTestBase.java
index 17482ea3..948604c 100644
--- a/tests/tests/automotive/src/android/support/car/cts/CarApiTestBase.java
+++ b/tests/tests/automotive/src/android/car/cts/CarApiTestBase.java
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-package android.support.car.cts;
+package android.car.cts;
+import android.car.Car;
import android.content.ComponentName;
+import android.content.ServiceConnection;
import android.os.IBinder;
import android.os.Looper;
-import android.support.car.Car;
-import android.support.car.ServiceConnectionListener;
import android.test.AndroidTestCase;
import java.util.concurrent.Semaphore;
@@ -50,13 +50,11 @@
protected void tearDown() throws Exception {
super.tearDown();
mCar.disconnect();
- }
-
- protected synchronized Car getCar() {
+ } protected synchronized Car getCar() {
return mCar;
}
- protected class DefaultServiceConnectionListener implements ServiceConnectionListener {
+ protected class DefaultServiceConnectionListener implements ServiceConnection {
private final Semaphore mConnectionWait = new Semaphore(0);
public void waitForConnection(long timeoutMs) throws InterruptedException {
@@ -64,21 +62,11 @@
}
@Override
- public void onServiceSuspended(int cause) {
- assertMainThread();
- }
-
- @Override
public void onServiceDisconnected(ComponentName name) {
assertMainThread();
}
@Override
- public void onServiceConnectionFailed(int cause) {
- assertMainThread();
- }
-
- @Override
public void onServiceConnected(ComponentName name, IBinder service) {
assertMainThread();
mConnectionWait.release();
diff --git a/tests/tests/automotive/src/android/support/car/cts/CarAppContextManagerTest.java b/tests/tests/automotive/src/android/car/cts/CarAppContextManagerTest.java
similarity index 98%
rename from tests/tests/automotive/src/android/support/car/cts/CarAppContextManagerTest.java
rename to tests/tests/automotive/src/android/car/cts/CarAppContextManagerTest.java
index 9f031d8..3b0b835 100644
--- a/tests/tests/automotive/src/android/support/car/cts/CarAppContextManagerTest.java
+++ b/tests/tests/automotive/src/android/car/cts/CarAppContextManagerTest.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.support.car.cts;
+package android.car.cts;
-import android.support.car.Car;
-import android.support.car.CarAppContextManager;
+import android.car.Car;
+import android.car.CarAppContextManager;
import android.util.Log;
import java.util.concurrent.Semaphore;
diff --git a/tests/tests/automotive/src/android/support/car/cts/CarConnectionListenerTest.java b/tests/tests/automotive/src/android/car/cts/CarConnectionListenerTest.java
similarity index 96%
rename from tests/tests/automotive/src/android/support/car/cts/CarConnectionListenerTest.java
rename to tests/tests/automotive/src/android/car/cts/CarConnectionListenerTest.java
index 25c74f8..f7ab9ad 100644
--- a/tests/tests/automotive/src/android/support/car/cts/CarConnectionListenerTest.java
+++ b/tests/tests/automotive/src/android/car/cts/CarConnectionListenerTest.java
@@ -14,10 +14,10 @@
* limitations under the License.
*/
-package android.support.car.cts;
+package android.car.cts;
-import android.support.car.Car;
-import android.support.car.CarConnectionListener;
+import android.car.Car;
+import android.car.CarConnectionListener;
import android.util.Log;
import java.util.concurrent.Semaphore;
diff --git a/tests/tests/automotive/src/android/support/car/cts/CarInfoManagerTest.java b/tests/tests/automotive/src/android/car/cts/CarInfoManagerTest.java
similarity index 95%
rename from tests/tests/automotive/src/android/support/car/cts/CarInfoManagerTest.java
rename to tests/tests/automotive/src/android/car/cts/CarInfoManagerTest.java
index c13f9bf..1cde840 100644
--- a/tests/tests/automotive/src/android/support/car/cts/CarInfoManagerTest.java
+++ b/tests/tests/automotive/src/android/car/cts/CarInfoManagerTest.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.support.car.cts;
+package android.car.cts;
-import android.support.car.Car;
-import android.support.car.CarInfoManager;
+import android.car.Car;
+import android.car.CarInfoManager;
public class CarInfoManagerTest extends CarApiTestBase {
diff --git a/tests/tests/automotive/src/android/support/car/cts/CarPackageManagerTest.java b/tests/tests/automotive/src/android/car/cts/CarPackageManagerTest.java
similarity index 89%
rename from tests/tests/automotive/src/android/support/car/cts/CarPackageManagerTest.java
rename to tests/tests/automotive/src/android/car/cts/CarPackageManagerTest.java
index 8abcae9..2865710 100644
--- a/tests/tests/automotive/src/android/support/car/cts/CarPackageManagerTest.java
+++ b/tests/tests/automotive/src/android/car/cts/CarPackageManagerTest.java
@@ -13,13 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.support.car.cts;
+package android.car.cts;
-import android.support.car.Car;
-import android.support.car.CarNotConnectedException;
-import android.support.car.content.pm.AppBlockingPackageInfo;
-import android.support.car.content.pm.CarAppBlockingPolicy;
-import android.support.car.content.pm.CarPackageManager;
+import android.car.Car;
+import android.car.CarNotConnectedException;
+import android.car.content.pm.CarPackageManager;
import android.telecom.TelecomManager;
import android.util.Log;
diff --git a/tests/tests/automotive/src/android/support/car/cts/CarSensorManagerTest.java b/tests/tests/automotive/src/android/car/cts/CarSensorManagerTest.java
similarity index 90%
rename from tests/tests/automotive/src/android/support/car/cts/CarSensorManagerTest.java
rename to tests/tests/automotive/src/android/car/cts/CarSensorManagerTest.java
index c10000e..ddcc52e 100644
--- a/tests/tests/automotive/src/android/support/car/cts/CarSensorManagerTest.java
+++ b/tests/tests/automotive/src/android/car/cts/CarSensorManagerTest.java
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-package android.support.car.cts;
+package android.car.cts;
-import android.support.car.Car;
-import android.support.car.hardware.CarSensorEvent;
-import android.support.car.hardware.CarSensorManager;
+import android.car.Car;
+import android.car.hardware.CarSensorEvent;
+import android.car.hardware.CarSensorManager;
public class CarSensorManagerTest extends CarApiTestBase {
diff --git a/tests/tests/automotive/src/android/support/car/cts/CarUiProviderTest.java b/tests/tests/automotive/src/android/car/cts/CarUiProviderTest.java
similarity index 82%
rename from tests/tests/automotive/src/android/support/car/cts/CarUiProviderTest.java
rename to tests/tests/automotive/src/android/car/cts/CarUiProviderTest.java
index 07e10cb..7722a27 100644
--- a/tests/tests/automotive/src/android/support/car/cts/CarUiProviderTest.java
+++ b/tests/tests/automotive/src/android/car/cts/CarUiProviderTest.java
@@ -13,16 +13,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.support.car.cts;
+package android.car.cts;
+import android.car.app.menu.CarMenuCallbacks;
+import android.car.app.menu.SearchBoxEditListener;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.os.Bundle;
-import android.os.IBinder;
import android.test.AndroidTestCase;
import android.util.Log;
+import android.view.View;
import java.util.ArrayList;
import java.util.Arrays;
@@ -38,7 +40,7 @@
public class CarUiProviderTest extends AndroidTestCase {
private static final String TAG = "CarUiProviderTest";
private static final String UI_ENTRY_CLASS_NAME = ".CarUiEntry";
- private static final String CAR_UI_PROVIDER_PKG = "android.support.car.ui.provider";
+ private static final String CAR_UI_PROVIDER_PKG = "android.car.ui.provider";
private static final Map<String, Class<?>[]> COMPATIBILITY_APIS =
new HashMap<String, Class<?>[]>();
@@ -49,7 +51,7 @@
COMPATIBILITY_APIS.put("onPause", new Class<?>[]{});
COMPATIBILITY_APIS.put("onStop", new Class<?>[]{});
COMPATIBILITY_APIS.put("getContentView", new Class<?>[]{});
- COMPATIBILITY_APIS.put("setCarMenuBinder", new Class<?>[]{IBinder.class});
+ COMPATIBILITY_APIS.put("setCarMenuCallbacks", new Class<?>[]{CarMenuCallbacks.class});
COMPATIBILITY_APIS.put("getFragmentContainerId", new Class<?>[]{});
COMPATIBILITY_APIS.put("setBackground", new Class<?>[]{Bitmap.class});
COMPATIBILITY_APIS.put("setBackgroundResource", new Class<?>[]{int.class});
@@ -70,6 +72,17 @@
COMPATIBILITY_APIS.put("setAutoLightDarkMode", new Class<?>[]{});
COMPATIBILITY_APIS.put("onRestoreInstanceState", new Class<?>[]{Bundle.class});
COMPATIBILITY_APIS.put("onSaveInstanceState", new Class<?>[]{Bundle.class});
+ COMPATIBILITY_APIS.put("showSearchBox", new Class<?>[]{View.OnClickListener.class});
+ COMPATIBILITY_APIS.put("setSearchBoxEndView", new Class<?>[]{View.class});
+ COMPATIBILITY_APIS.put("getSearchBoxText", new Class<?>[]{});
+ COMPATIBILITY_APIS.put("showToast", new Class<?>[]{String.class, long.class});
+ COMPATIBILITY_APIS.put("stopInput", new Class<?>[]{});
+ COMPATIBILITY_APIS.put("startInput", new Class<?>[]{String.class,
+ View.OnClickListener.class});
+ COMPATIBILITY_APIS.put("setSearchBoxEditListener",
+ new Class<?>[]{SearchBoxEditListener.class});
+ COMPATIBILITY_APIS.put("setSearchBoxColors", new Class<?>[]{int.class, int.class, int.class,
+ int.class});
}
private boolean mIsCar = false;
diff --git a/tests/tests/automotive/src/android/support/car/cts/ExceptionsTest.java b/tests/tests/automotive/src/android/car/cts/ExceptionsTest.java
similarity index 93%
rename from tests/tests/automotive/src/android/support/car/cts/ExceptionsTest.java
rename to tests/tests/automotive/src/android/car/cts/ExceptionsTest.java
index 3391883..496867b 100644
--- a/tests/tests/automotive/src/android/support/car/cts/ExceptionsTest.java
+++ b/tests/tests/automotive/src/android/car/cts/ExceptionsTest.java
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package android.support.car.cts;
+package android.car.cts;
-import android.support.car.CarNotConnectedException;
-import android.support.car.CarNotSupportedException;
+import android.car.CarNotConnectedException;
+import android.car.CarNotSupportedException;
import android.test.AndroidTestCase;
public class ExceptionsTest extends AndroidTestCase {
diff --git a/tests/tests/graphics/res/drawable-nodpi/bitmap_density_golden_160.png b/tests/tests/graphics/res/drawable-nodpi/bitmap_density_golden_160.png
new file mode 100644
index 0000000..de48ed9
--- /dev/null
+++ b/tests/tests/graphics/res/drawable-nodpi/bitmap_density_golden_160.png
Binary files differ
diff --git a/tests/tests/graphics/res/drawable-nodpi/bitmap_density_golden_320.png b/tests/tests/graphics/res/drawable-nodpi/bitmap_density_golden_320.png
new file mode 100644
index 0000000..0682813
--- /dev/null
+++ b/tests/tests/graphics/res/drawable-nodpi/bitmap_density_golden_320.png
Binary files differ
diff --git a/tests/tests/graphics/res/drawable-nodpi/bitmap_density_golden_80.png b/tests/tests/graphics/res/drawable-nodpi/bitmap_density_golden_80.png
new file mode 100644
index 0000000..5588a5a
--- /dev/null
+++ b/tests/tests/graphics/res/drawable-nodpi/bitmap_density_golden_80.png
Binary files differ
diff --git a/tests/tests/graphics/res/drawable-nodpi/nine_patch_density_golden_160.png b/tests/tests/graphics/res/drawable-nodpi/nine_patch_density_golden_160.png
new file mode 100644
index 0000000..8110d8f
--- /dev/null
+++ b/tests/tests/graphics/res/drawable-nodpi/nine_patch_density_golden_160.png
Binary files differ
diff --git a/tests/tests/graphics/res/drawable-nodpi/nine_patch_density_golden_320.png b/tests/tests/graphics/res/drawable-nodpi/nine_patch_density_golden_320.png
new file mode 100644
index 0000000..c48c78e
--- /dev/null
+++ b/tests/tests/graphics/res/drawable-nodpi/nine_patch_density_golden_320.png
Binary files differ
diff --git a/tests/tests/graphics/res/drawable-nodpi/nine_patch_density_golden_80.png b/tests/tests/graphics/res/drawable-nodpi/nine_patch_density_golden_80.png
new file mode 100644
index 0000000..173150f
--- /dev/null
+++ b/tests/tests/graphics/res/drawable-nodpi/nine_patch_density_golden_80.png
Binary files differ
diff --git a/tests/tests/graphics/res/drawable/bitmap_density.png b/tests/tests/graphics/res/drawable/bitmap_density.png
deleted file mode 100644
index 5230051..0000000
--- a/tests/tests/graphics/res/drawable/bitmap_density.png
+++ /dev/null
Binary files differ
diff --git a/tests/tests/graphics/res/drawable/bitmap_density.xml b/tests/tests/graphics/res/drawable/bitmap_density.xml
new file mode 100644
index 0000000..5fb3611
--- /dev/null
+++ b/tests/tests/graphics/res/drawable/bitmap_density.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ 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.
+-->
+
+<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/bitmap_density_internal" />
diff --git a/tests/tests/graphics/res/drawable/bitmap_density_internal.png b/tests/tests/graphics/res/drawable/bitmap_density_internal.png
new file mode 100644
index 0000000..a4add51
--- /dev/null
+++ b/tests/tests/graphics/res/drawable/bitmap_density_internal.png
Binary files differ
diff --git a/tests/tests/graphics/res/drawable/nine_patch_density.9.png b/tests/tests/graphics/res/drawable/nine_patch_density.9.png
deleted file mode 100644
index 24019d8..0000000
--- a/tests/tests/graphics/res/drawable/nine_patch_density.9.png
+++ /dev/null
Binary files differ
diff --git a/tests/tests/graphics/res/drawable/nine_patch_density.xml b/tests/tests/graphics/res/drawable/nine_patch_density.xml
new file mode 100644
index 0000000..918c76e
--- /dev/null
+++ b/tests/tests/graphics/res/drawable/nine_patch_density.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ 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.
+-->
+
+<nine-patch xmlns:android="http://schemas.android.com/apk/res/android"
+ android:src="@drawable/nine_patch_density_internal" />
diff --git a/tests/tests/graphics/res/drawable/nine_patch_density_internal.9.png b/tests/tests/graphics/res/drawable/nine_patch_density_internal.9.png
new file mode 100644
index 0000000..1a3181b
--- /dev/null
+++ b/tests/tests/graphics/res/drawable/nine_patch_density_internal.9.png
Binary files differ
diff --git a/tests/tests/graphics/src/android/graphics/drawable/cts/AnimatedStateListDrawableTest.java b/tests/tests/graphics/src/android/graphics/drawable/cts/AnimatedStateListDrawableTest.java
index 2ffd072..12f9828 100644
--- a/tests/tests/graphics/src/android/graphics/drawable/cts/AnimatedStateListDrawableTest.java
+++ b/tests/tests/graphics/src/android/graphics/drawable/cts/AnimatedStateListDrawableTest.java
@@ -188,7 +188,7 @@
(StateListDrawable) cs.newDrawable(res);
for (int i = 0; i < count; i++) {
halfDrawable.selectDrawable(i);
- assertEquals(origWidth[i] / 2, halfDrawable.getIntrinsicWidth());
+ assertEquals(Math.round(origWidth[i] / 2f), halfDrawable.getIntrinsicWidth());
}
// Set density to double original.
diff --git a/tests/tests/graphics/src/android/graphics/drawable/cts/BitmapDrawableTest.java b/tests/tests/graphics/src/android/graphics/drawable/cts/BitmapDrawableTest.java
index 7262094..ef546eb 100644
--- a/tests/tests/graphics/src/android/graphics/drawable/cts/BitmapDrawableTest.java
+++ b/tests/tests/graphics/src/android/graphics/drawable/cts/BitmapDrawableTest.java
@@ -17,6 +17,8 @@
package android.graphics.drawable.cts;
import android.content.res.Resources.Theme;
+import android.graphics.BitmapFactory;
+import android.graphics.Rect;
import android.graphics.cts.R;
import org.xmlpull.v1.XmlPullParserException;
@@ -35,18 +37,30 @@
import android.graphics.PorterDuff.Mode;
import android.graphics.Shader.TileMode;
import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
import android.graphics.drawable.Drawable.ConstantState;
import android.test.InstrumentationTestCase;
import android.util.AttributeSet;
-import android.util.DisplayMetrics;
import android.util.Xml;
import android.view.Gravity;
import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
public class BitmapDrawableTest extends InstrumentationTestCase {
+ // A small value is actually making sure that the values are matching
+ // exactly with the golden image.
+ // We can increase the threshold if the Skia is drawing with some variance
+ // on different devices. So far, the tests show they are matching correctly.
+ private static final float PIXEL_ERROR_THRESHOLD = 0.03f;
+ private static final float PIXEL_ERROR_COUNT_THRESHOLD = 0.005f;
+
+ // Set true to generate golden images, false for normal tests.
+ private static final boolean DBG_DUMP_PNG = false;
+
// The target context.
private Context mContext;
@@ -462,40 +476,134 @@
assertEquals(50, d3.getPaint().getAlpha());
}
- private void testPreloadDensityInner(Resources res, int densityDpi)
- throws XmlPullParserException, IOException {
- // Capture initial state at default density.
- final XmlResourceParser parser = DrawableTestUtils.getResourceParser(
- res, R.drawable.bitmap_density);
+ private static final int[] DENSITY_VALUES = new int[] {
+ 160, 80, 320
+ };
+
+ private static final int[] DENSITY_IMAGES = new int[] {
+ R.drawable.bitmap_density
+ };
+
+ private static final int[][] DENSITY_GOLDEN_IMAGES = new int[][] {
+ {
+ R.drawable.bitmap_density_golden_160,
+ R.drawable.bitmap_density_golden_80,
+ R.drawable.bitmap_density_golden_320,
+ }
+ };
+
+ public void testPreloadDensity() throws XmlPullParserException, IOException {
+ final Resources res = mContext.getResources();
+ final int densityDpi = res.getConfiguration().densityDpi;
+ try {
+ testPreloadDensityInner(res, DENSITY_IMAGES[0], DENSITY_VALUES, DENSITY_GOLDEN_IMAGES[0]);
+ } finally {
+ DrawableTestUtils.setResourcesDensity(res, densityDpi);
+ }
+ }
+
+ private void testPreloadDensityInner(Resources res, int sourceResId, int[] densities,
+ int[] goldenResIds) throws XmlPullParserException, IOException {
+ final Rect tempPadding = new Rect();
+
+ // Capture initial state at preload density.
+ final int preloadDensityDpi = densities[0];
+ DrawableTestUtils.setResourcesDensity(res, preloadDensityDpi);
+
+ final XmlResourceParser parser = DrawableTestUtils.getResourceParser(res, sourceResId);
final BitmapDrawable preloadedDrawable = new BitmapDrawable();
preloadedDrawable.inflate(res, parser, Xml.asAttributeSet(parser));
+
final ConstantState preloadedConstantState = preloadedDrawable.getConstantState();
final int origWidth = preloadedDrawable.getIntrinsicWidth();
+ final int origHeight = preloadedDrawable.getIntrinsicHeight();
+ assertFalse(preloadedDrawable.getPadding(tempPadding));
- // Set density to half of original. Unlike offsets, which are
- // truncated, dimensions are rounded to the nearest pixel.
- DrawableTestUtils.setResourcesDensity(res, densityDpi / 2);
- final BitmapDrawable halfDrawable =
- (BitmapDrawable) preloadedConstantState.newDrawable(res);
- assertEquals(Math.round(origWidth / 2f), halfDrawable.getIntrinsicWidth());
+ compareOrSave(preloadedDrawable, preloadDensityDpi, sourceResId, goldenResIds[0]);
- // Set density to double original.
- DrawableTestUtils.setResourcesDensity(res, densityDpi * 2);
- final BitmapDrawable doubleDrawable =
- (BitmapDrawable) preloadedConstantState.newDrawable(res);
- assertEquals(origWidth * 2, doubleDrawable.getIntrinsicWidth());
+ for (int i = 1; i < densities.length; i++) {
+ final int scaledDensityDpi = densities[i];
+ final float scale = scaledDensityDpi / (float) preloadDensityDpi;
+ DrawableTestUtils.setResourcesDensity(res, scaledDensityDpi);
- // Restore original density.
- DrawableTestUtils.setResourcesDensity(res, densityDpi);
- final BitmapDrawable origDrawable =
- (BitmapDrawable) preloadedConstantState.newDrawable();
- assertEquals(origWidth, origDrawable.getIntrinsicWidth());
+ final BitmapDrawable scaledDrawable =
+ (BitmapDrawable) preloadedConstantState.newDrawable(res);
- // Ensure theme density is applied correctly.
- final Theme t = res.newTheme();
- halfDrawable.applyTheme(t);
- assertEquals(origWidth, halfDrawable.getIntrinsicWidth());
- doubleDrawable.applyTheme(t);
- assertEquals(origWidth, doubleDrawable.getIntrinsicWidth());
+ // Sizes are rounded.
+ assertEquals(Math.round(origWidth * scale), scaledDrawable.getIntrinsicWidth());
+ assertEquals(Math.round(origHeight * scale), scaledDrawable.getIntrinsicHeight());
+
+ // Bitmaps have no padding.
+ assertFalse(scaledDrawable.getPadding(tempPadding));
+
+ compareOrSave(scaledDrawable, scaledDensityDpi, sourceResId, goldenResIds[i]);
+
+ // Ensure theme density is applied correctly. Unlike most
+ // drawables, we don't have any loss of accuracy because density
+ // changes are re-computed from the source every time.
+ DrawableTestUtils.setResourcesDensity(res, preloadDensityDpi);
+
+ final Theme t = res.newTheme();
+ scaledDrawable.applyTheme(t);
+ assertEquals(origWidth, scaledDrawable.getIntrinsicWidth());
+ assertEquals(origHeight, scaledDrawable.getIntrinsicHeight());
+ assertFalse(scaledDrawable.getPadding(tempPadding));
+ }
+ }
+
+ private void compareOrSave(Drawable dr, int densityDpi, int sourceResId, int goldenResId) {
+ final int width = dr.getIntrinsicWidth();
+ final int height = dr.getIntrinsicHeight();
+ final Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
+ bitmap.setDensity(0);
+
+ final Canvas canvas = new Canvas(bitmap);
+ dr.setBounds(0, 0, width, height);
+ dr.draw(canvas);
+
+ if (DBG_DUMP_PNG) {
+ saveGoldenImage(bitmap, sourceResId, densityDpi);
+ } else {
+ final Bitmap golden = BitmapFactory.decodeResource(
+ mContext.getResources(), goldenResId);
+ DrawableTestUtils.compareImages(densityDpi + " dpi", golden, bitmap,
+ PIXEL_ERROR_THRESHOLD, PIXEL_ERROR_COUNT_THRESHOLD);
+ }
+ }
+
+ private void saveGoldenImage(Bitmap bitmap, int sourceResId, int densityDpi) {
+ // Save the image to the disk.
+ FileOutputStream out = null;
+
+ try {
+ final String outputFolder = "/sdcard/temp/";
+ final File folder = new File(outputFolder);
+ if (!folder.exists()) {
+ folder.mkdir();
+ }
+
+ final String sourceFilename = new File(
+ mContext.getResources().getString(sourceResId)).getName();
+ final String sourceTitle = sourceFilename.substring(0, sourceFilename.lastIndexOf("."));
+ final String outputTitle = sourceTitle + "_golden_" + densityDpi;
+ final String outputFilename = outputFolder + outputTitle + ".png";
+ final File outputFile = new File(outputFilename);
+ if (!outputFile.exists()) {
+ outputFile.createNewFile();
+ }
+
+ out = new FileOutputStream(outputFile, false);
+ bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ if (out != null) {
+ try {
+ out.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
}
}
diff --git a/tests/tests/graphics/src/android/graphics/drawable/cts/DrawableTestUtils.java b/tests/tests/graphics/src/android/graphics/drawable/cts/DrawableTestUtils.java
index ae28eca..0c08f79 100644
--- a/tests/tests/graphics/src/android/graphics/drawable/cts/DrawableTestUtils.java
+++ b/tests/tests/graphics/src/android/graphics/drawable/cts/DrawableTestUtils.java
@@ -16,12 +16,16 @@
package android.graphics.drawable.cts;
+import junit.framework.Assert;
+
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
+import android.graphics.Bitmap;
+import android.graphics.Color;
import android.util.AttributeSet;
import android.util.Xml;
@@ -124,4 +128,48 @@
// Scale by tdensity / sdensity, rounding up.
return ((size * tdensity) + (sdensity >> 1)) / sdensity;
}
+
+ /**
+ * Asserts that two images are similar within the given thresholds.
+ *
+ * @param message
+ * @param expected
+ * @param actual
+ * @param pixelThreshold
+ * @param pixelCountThreshold
+ */
+ public static void compareImages(String message, Bitmap expected, Bitmap actual,
+ float pixelThreshold, float pixelCountThreshold) {
+ int idealWidth = expected.getWidth();
+ int idealHeight = expected.getHeight();
+
+ Assert.assertTrue(idealWidth == actual.getWidth());
+ Assert.assertTrue(idealHeight == actual.getHeight());
+
+ int totalDiffPixelCount = 0;
+ float totalPixelCount = idealWidth * idealHeight;
+ for (int x = 0; x < idealWidth; x++) {
+ for (int y = 0; y < idealHeight; y++) {
+ int idealColor = expected.getPixel(x, y);
+ int givenColor = actual.getPixel(x, y);
+ if (idealColor == givenColor)
+ continue;
+
+ float totalError = 0;
+ totalError += Math.abs(Color.red(idealColor) - Color.red(givenColor));
+ totalError += Math.abs(Color.green(idealColor) - Color.green(givenColor));
+ totalError += Math.abs(Color.blue(idealColor) - Color.blue(givenColor));
+ totalError += Math.abs(Color.alpha(idealColor) - Color.alpha(givenColor));
+
+ if ((totalError / 1024.0f) >= pixelThreshold) {
+ Assert.fail((message + ": totalError is " + totalError));
+ }
+
+ totalDiffPixelCount++;
+ }
+ }
+ if ((totalDiffPixelCount / totalPixelCount) >= pixelCountThreshold) {
+ Assert.fail((message +": totalDiffPixelCount is " + totalDiffPixelCount));
+ }
+ }
}
diff --git a/tests/tests/graphics/src/android/graphics/drawable/cts/GradientDrawableTest.java b/tests/tests/graphics/src/android/graphics/drawable/cts/GradientDrawableTest.java
index b8661d2..e118a66 100644
--- a/tests/tests/graphics/src/android/graphics/drawable/cts/GradientDrawableTest.java
+++ b/tests/tests/graphics/src/android/graphics/drawable/cts/GradientDrawableTest.java
@@ -377,12 +377,13 @@
assertEquals(origPadding, tempPadding);
// Some precision is lost when scaling the half-density
- // drawable back up to the original density.
+ // drawable back up to the original density. Padding is
+ // always truncated, rather than rounded.
final Rect sloppyOrigPadding = new Rect();
- sloppyOrigPadding.left = 2 * Math.round(origPadding.left / 2f);
- sloppyOrigPadding.top = 2 * Math.round(origPadding.top / 2f);
- sloppyOrigPadding.right = 2 * Math.round(origPadding.right / 2f);
- sloppyOrigPadding.bottom = 2 * Math.round(origPadding.bottom / 2f);
+ sloppyOrigPadding.left = 2 * (origPadding.left / 2);
+ sloppyOrigPadding.top = 2 * (origPadding.top / 2);
+ sloppyOrigPadding.right = 2 * (origPadding.right / 2);
+ sloppyOrigPadding.bottom = 2 * (origPadding.bottom / 2);
// Ensure theme density is applied correctly.
final Theme t = res.newTheme();
diff --git a/tests/tests/graphics/src/android/graphics/drawable/cts/LayerDrawableTest.java b/tests/tests/graphics/src/android/graphics/drawable/cts/LayerDrawableTest.java
index d8e63fa..37654dc 100644
--- a/tests/tests/graphics/src/android/graphics/drawable/cts/LayerDrawableTest.java
+++ b/tests/tests/graphics/src/android/graphics/drawable/cts/LayerDrawableTest.java
@@ -1691,20 +1691,20 @@
final int initialLayerWidth = preloadedDrawable.getLayerWidth(0);
final int initialLayerHeight = preloadedDrawable.getLayerHeight(0);
- // Set density to half of original. Unlike offsets, which are
+ // Set density to half of original. Padding and insets are
// truncated, dimensions are rounded to the nearest pixel.
DrawableTestUtils.setResourcesDensity(res, densityDpi / 2);
final LayerDrawable halfDrawable =
(LayerDrawable) preloadedConstantState.newDrawable(res);
assertEquals(Math.round(initialWidth / 2f), halfDrawable.getIntrinsicWidth());
- assertEquals(Math.round(initialLeftPadding / 2f), halfDrawable.getLeftPadding());
- assertEquals(Math.round(initialRightPadding / 2f), halfDrawable.getRightPadding());
- assertEquals(Math.round(initialBottomPadding / 2f), halfDrawable.getBottomPadding());
- assertEquals(Math.round(initialTopPadding / 2f), halfDrawable.getTopPadding());
- assertEquals(Math.round(initialLayerInsetLeft / 2f),halfDrawable.getLayerInsetLeft(0));
- assertEquals(Math.round(initialLayerInsetRight / 2f), halfDrawable.getLayerInsetRight(0));
- assertEquals(Math.round(initialLayerInsetTop / 2f), halfDrawable.getLayerInsetTop(0));
- assertEquals(Math.round(initialLayerInsetBottom / 2f), halfDrawable.getLayerInsetBottom(0));
+ assertEquals(initialLeftPadding / 2, halfDrawable.getLeftPadding());
+ assertEquals(initialRightPadding / 2, halfDrawable.getRightPadding());
+ assertEquals(initialBottomPadding / 2, halfDrawable.getBottomPadding());
+ assertEquals(initialTopPadding / 2, halfDrawable.getTopPadding());
+ assertEquals(initialLayerInsetLeft / 2,halfDrawable.getLayerInsetLeft(0));
+ assertEquals(initialLayerInsetRight / 2, halfDrawable.getLayerInsetRight(0));
+ assertEquals(initialLayerInsetTop / 2, halfDrawable.getLayerInsetTop(0));
+ assertEquals(initialLayerInsetBottom / 2, halfDrawable.getLayerInsetBottom(0));
assertEquals(Math.round(initialLayerWidth / 2f), halfDrawable.getLayerWidth(0));
assertEquals(Math.round(initialLayerHeight / 2f), halfDrawable.getLayerHeight(0));
diff --git a/tests/tests/graphics/src/android/graphics/drawable/cts/NinePatchDrawableTest.java b/tests/tests/graphics/src/android/graphics/drawable/cts/NinePatchDrawableTest.java
index 686c443..27b17ca 100644
--- a/tests/tests/graphics/src/android/graphics/drawable/cts/NinePatchDrawableTest.java
+++ b/tests/tests/graphics/src/android/graphics/drawable/cts/NinePatchDrawableTest.java
@@ -17,6 +17,7 @@
package android.graphics.drawable.cts;
import android.content.res.Resources.Theme;
+import android.graphics.Outline;
import android.graphics.cts.R;
import org.xmlpull.v1.XmlPullParser;
@@ -36,17 +37,30 @@
import android.graphics.Region;
import android.graphics.Bitmap.Config;
import android.graphics.PorterDuff.Mode;
+import android.graphics.drawable.Drawable;
import android.graphics.drawable.NinePatchDrawable;
import android.graphics.drawable.Drawable.ConstantState;
import android.test.InstrumentationTestCase;
import android.util.AttributeSet;
import android.util.Xml;
+import java.io.File;
+import java.io.FileOutputStream;
import java.io.IOException;
public class NinePatchDrawableTest extends InstrumentationTestCase {
+ // A small value is actually making sure that the values are matching
+ // exactly with the golden image.
+ // We can increase the threshold if the Skia is drawing with some variance
+ // on different devices. So far, the tests show they are matching correctly.
+ private static final float PIXEL_ERROR_THRESHOLD = 0.03f;
+ private static final float PIXEL_ERROR_COUNT_THRESHOLD = 0.005f;
+
private static final int MIN_CHUNK_SIZE = 32;
+ // Set true to generate golden images, false for normal tests.
+ private static final boolean DBG_DUMP_PNG = false;
+
private NinePatchDrawable mNinePatchDrawable;
private Resources mResources;
@@ -360,51 +374,104 @@
d1.mutate();
}
+ private static final int[] DENSITY_VALUES = new int[] {
+ 160, 80, 320
+ };
+
+ private static final int[] DENSITY_IMAGES = new int[] {
+ R.drawable.nine_patch_density
+ };
+
+ private static final int[][] DENSITY_GOLDEN_IMAGES = new int[][] {
+ {
+ R.drawable.nine_patch_density_golden_160,
+ R.drawable.nine_patch_density_golden_80,
+ R.drawable.nine_patch_density_golden_320,
+ }
+ };
+
public void testPreloadDensity() throws XmlPullParserException, IOException {
final Resources res = mResources;
final int densityDpi = res.getConfiguration().densityDpi;
try {
- testPreloadDensityInner(res, densityDpi);
+ testPreloadDensityInner(res, DENSITY_IMAGES[0], DENSITY_VALUES, DENSITY_GOLDEN_IMAGES[0]);
} finally {
DrawableTestUtils.setResourcesDensity(res, densityDpi);
}
}
- private void testPreloadDensityInner(Resources res, int densityDpi)
- throws XmlPullParserException, IOException {
- // Capture initial state at default density.
- final XmlResourceParser parser = DrawableTestUtils.getResourceParser(
- res, R.drawable.nine_patch_density);
+ private void testPreloadDensityInner(Resources res, int sourceResId, int[] densities,
+ int[] goldenResIds) throws XmlPullParserException, IOException {
+ final Rect tempOutlineRect = new Rect();
+ final Rect tempPadding = new Rect();
+ final Outline tempOutline = new Outline();
+
+ // Capture initial state at preload density.
+ final int preloadDensityDpi = densities[0];
+ DrawableTestUtils.setResourcesDensity(res, preloadDensityDpi);
+
+ final XmlResourceParser parser = DrawableTestUtils.getResourceParser(res, sourceResId);
final NinePatchDrawable preloadedDrawable = new NinePatchDrawable(null);
preloadedDrawable.inflate(res, parser, Xml.asAttributeSet(parser));
+
final ConstantState preloadedConstantState = preloadedDrawable.getConstantState();
final int origWidth = preloadedDrawable.getIntrinsicWidth();
+ final int origHeight = preloadedDrawable.getIntrinsicHeight();
+ final Rect origPadding = new Rect();
+ preloadedDrawable.getPadding(origPadding);
+ final Outline origOutline = new Outline();
+ preloadedDrawable.getOutline(origOutline);
+ final Rect origOutlineRect = new Rect();
+ origOutline.getRect(origOutlineRect);
+ final float origOutlineRadius = origOutline.getRadius();
- // Set density to half of original. Unlike offsets, which are
- // truncated, dimensions are rounded to the nearest pixel.
- DrawableTestUtils.setResourcesDensity(res, densityDpi / 2);
- final NinePatchDrawable halfDrawable =
- (NinePatchDrawable) preloadedConstantState.newDrawable(res);
- assertEquals(Math.round(origWidth / 2f), halfDrawable.getIntrinsicWidth());
+ compareOrSave(preloadedDrawable, preloadDensityDpi, sourceResId, goldenResIds[0]);
- // Set density to double original.
- DrawableTestUtils.setResourcesDensity(res, densityDpi * 2);
- final NinePatchDrawable doubleDrawable =
- (NinePatchDrawable) preloadedConstantState.newDrawable(res);
- assertEquals(origWidth * 2, doubleDrawable.getIntrinsicWidth());
+ for (int i = 1; i < densities.length; i++) {
+ final int scaledDensityDpi = densities[i];
+ final float scale = scaledDensityDpi / (float) preloadDensityDpi;
+ DrawableTestUtils.setResourcesDensity(res, scaledDensityDpi);
- // Restore original density.
- DrawableTestUtils.setResourcesDensity(res, densityDpi);
- final NinePatchDrawable origDrawable =
- (NinePatchDrawable) preloadedConstantState.newDrawable();
- assertEquals(origWidth, origDrawable.getIntrinsicWidth());
+ final NinePatchDrawable scaledDrawable =
+ (NinePatchDrawable) preloadedConstantState.newDrawable(res);
- // Ensure theme density is applied correctly.
- final Theme t = res.newTheme();
- halfDrawable.applyTheme(t);
- assertEquals(origWidth, halfDrawable.getIntrinsicWidth());
- doubleDrawable.applyTheme(t);
- assertEquals(origWidth, doubleDrawable.getIntrinsicWidth());
+ // Sizes are rounded.
+ assertEquals(Math.round(origWidth * scale), scaledDrawable.getIntrinsicWidth());
+ assertEquals(Math.round(origHeight * scale), scaledDrawable.getIntrinsicHeight());
+
+ // Outlines are truncated, but radius is precise.
+ // TODO: Uncomment this once outlines are working.
+ /*
+ scaledDrawable.getOutline(tempOutline);
+ assertTrue(tempOutline.getRect(tempOutlineRect));
+ assertEquals((int) (origOutlineRect.left * scale), tempOutlineRect.left);
+ assertEquals((int) (origOutlineRect.top * scale), tempOutlineRect.top);
+ assertEquals((int) (origOutlineRect.right * scale), tempOutlineRect.right);
+ assertEquals((int) (origOutlineRect.bottom * scale), tempOutlineRect.bottom);
+ assertEquals(origOutlineRadius * scale, tempOutline.getRadius());
+ */
+
+ // Padding is truncated.
+ assertTrue(scaledDrawable.getPadding(tempPadding));
+ assertEquals((int) (origPadding.left * scale), tempPadding.left);
+ assertEquals((int) (origPadding.top * scale), tempPadding.top);
+ assertEquals((int) (origPadding.right * scale), tempPadding.right);
+ assertEquals((int) (origPadding.bottom * scale), tempPadding.bottom);
+
+ compareOrSave(scaledDrawable, scaledDensityDpi, sourceResId, goldenResIds[i]);
+
+ // Ensure theme density is applied correctly. Unlike most
+ // drawables, we don't have any loss of accuracy because density
+ // changes are re-computed from the source every time.
+ DrawableTestUtils.setResourcesDensity(res, preloadDensityDpi);
+
+ final Theme t = res.newTheme();
+ scaledDrawable.applyTheme(t);
+ assertEquals(origWidth, scaledDrawable.getIntrinsicWidth());
+ assertEquals(origHeight, scaledDrawable.getIntrinsicHeight());
+ assertTrue(scaledDrawable.getPadding(tempPadding));
+ assertEquals(origPadding, tempPadding);
+ }
}
private void assertColorFillRect(Bitmap bmp, int x, int y, int w, int h, int color) {
@@ -430,6 +497,60 @@
return bitmap;
}
+ private void compareOrSave(Drawable dr, int densityDpi, int sourceResId, int goldenResId) {
+ final int width = dr.getIntrinsicWidth();
+ final int height = dr.getIntrinsicHeight();
+ final Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
+ bitmap.setDensity(0);
+
+ final Canvas canvas = new Canvas(bitmap);
+ dr.setBounds(0, 0, width, height);
+ dr.draw(canvas);
+
+ if (DBG_DUMP_PNG) {
+ saveGoldenImage(bitmap, sourceResId, densityDpi);
+ } else {
+ final Bitmap golden = BitmapFactory.decodeResource(mResources, goldenResId);
+ DrawableTestUtils.compareImages(densityDpi + " dpi", golden, bitmap,
+ PIXEL_ERROR_THRESHOLD, PIXEL_ERROR_COUNT_THRESHOLD);
+ }
+ }
+
+ private void saveGoldenImage(Bitmap bitmap, int sourceResId, int densityDpi) {
+ // Save the image to the disk.
+ FileOutputStream out = null;
+
+ try {
+ final String outputFolder = "/sdcard/temp/";
+ final File folder = new File(outputFolder);
+ if (!folder.exists()) {
+ folder.mkdir();
+ }
+
+ final String sourceFilename = new File(mResources.getString(sourceResId)).getName();
+ final String sourceTitle = sourceFilename.substring(0, sourceFilename.lastIndexOf("."));
+ final String outputTitle = sourceTitle + "_golden_" + densityDpi;
+ final String outputFilename = outputFolder + outputTitle + ".png";
+ final File outputFile = new File(outputFilename);
+ if (!outputFile.exists()) {
+ outputFile.createNewFile();
+ }
+
+ out = new FileOutputStream(outputFile, false);
+ bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ if (out != null) {
+ try {
+ out.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
private class MockColorFilter extends ColorFilter {
}
}
diff --git a/tests/tests/graphics/src/android/graphics/drawable/cts/RotateDrawableTest.java b/tests/tests/graphics/src/android/graphics/drawable/cts/RotateDrawableTest.java
index 31a8141..e51edc1 100644
--- a/tests/tests/graphics/src/android/graphics/drawable/cts/RotateDrawableTest.java
+++ b/tests/tests/graphics/src/android/graphics/drawable/cts/RotateDrawableTest.java
@@ -100,11 +100,11 @@
public void testSetDegrees() {
RotateDrawable d = new RotateDrawable();
assertEquals(0.0f, d.getFromDegrees(), 0.01f);
- assertEquals(0.0f, d.getToDegrees(), 0.01f);
+ assertEquals(360.0f, d.getToDegrees(), 0.01f);
d.setFromDegrees(-10.0f);
assertEquals(-10.0f, d.getFromDegrees(), 0.01f);
- assertEquals(0.0f, d.getToDegrees(), 0.01f);
+ assertEquals(360.0f, d.getToDegrees(), 0.01f);
d.setToDegrees(10.0f);
assertEquals(10.0f, d.getToDegrees(), 0.01f);
diff --git a/tests/tests/graphics/src/android/graphics/drawable/cts/StateListDrawableTest.java b/tests/tests/graphics/src/android/graphics/drawable/cts/StateListDrawableTest.java
index 28d2235..2194a00 100644
--- a/tests/tests/graphics/src/android/graphics/drawable/cts/StateListDrawableTest.java
+++ b/tests/tests/graphics/src/android/graphics/drawable/cts/StateListDrawableTest.java
@@ -206,9 +206,9 @@
final StateListDrawable halfDrawable =
(StateListDrawable) preloadedConstantState.newDrawable(res);
halfDrawable.selectDrawable(0);
- assertEquals(origWidth0 / 2, halfDrawable.getIntrinsicWidth());
+ assertEquals(Math.round(origWidth0 / 2f), halfDrawable.getIntrinsicWidth());
halfDrawable.selectDrawable(1);
- assertEquals(origWidth1 / 2, halfDrawable.getIntrinsicWidth());
+ assertEquals(Math.round(origWidth1 / 2f), halfDrawable.getIntrinsicWidth());
// Set density to double original.
DrawableTestUtils.setResourcesDensity(res, densityDpi * 2);
diff --git a/tests/tests/graphics/src/android/graphics/drawable/cts/VectorDrawableTest.java b/tests/tests/graphics/src/android/graphics/drawable/cts/VectorDrawableTest.java
index 03148cf..4da4180 100644
--- a/tests/tests/graphics/src/android/graphics/drawable/cts/VectorDrawableTest.java
+++ b/tests/tests/graphics/src/android/graphics/drawable/cts/VectorDrawableTest.java
@@ -205,7 +205,9 @@
} else {
// Start to compare
Bitmap golden = BitmapFactory.decodeResource(mResources, goldenImages[i]);
- compareImages(mBitmap, golden, mResources.getString(resIds[i]));
+ DrawableTestUtils.compareImages(mResources.getString(resIds[i]), mBitmap, golden,
+ VectorDrawableTest.PIXEL_ERROR_THRESHOLD,
+ VectorDrawableTest.PIXEL_ERROR_COUNT_THRESHOLD);
}
}
}
@@ -276,41 +278,6 @@
return builder.toString();
}
- private void compareImages(Bitmap ideal, Bitmap given, String filename) {
- int idealWidth = ideal.getWidth();
- int idealHeight = ideal.getHeight();
-
- assertTrue(idealWidth == given.getWidth());
- assertTrue(idealHeight == given.getHeight());
-
- int totalDiffPixelCount = 0;
- float totalPixelCount = idealWidth * idealHeight;
- for (int x = 0; x < idealWidth; x++) {
- for (int y = 0; y < idealHeight; y++) {
- int idealColor = ideal.getPixel(x, y);
- int givenColor = given.getPixel(x, y);
- if (idealColor == givenColor)
- continue;
-
- float totalError = 0;
- totalError += Math.abs(Color.red(idealColor) - Color.red(givenColor));
- totalError += Math.abs(Color.green(idealColor) - Color.green(givenColor));
- totalError += Math.abs(Color.blue(idealColor) - Color.blue(givenColor));
- totalError += Math.abs(Color.alpha(idealColor) - Color.alpha(givenColor));
-
- if ((totalError / 1024.0f) >= PIXEL_ERROR_THRESHOLD) {
- fail((filename + ": totalError is " + totalError));
- }
-
- totalDiffPixelCount++;
- }
- }
- if ((totalDiffPixelCount / totalPixelCount) >= PIXEL_ERROR_COUNT_THRESHOLD) {
- fail((filename +": totalDiffPixelCount is " + totalDiffPixelCount));
- }
-
- }
-
public void testGetChangingConfigurations() {
VectorDrawable vectorDrawable = new VectorDrawable();
ConstantState constantState = vectorDrawable.getConstantState();
diff --git a/tests/tests/icu/Android.mk b/tests/tests/icu/Android.mk
index 12cd7b0..3d67ee7 100644
--- a/tests/tests/icu/Android.mk
+++ b/tests/tests/icu/Android.mk
@@ -26,14 +26,22 @@
LOCAL_PROGUARD_ENABLED := disabled
LOCAL_SRC_FILES := $(call all-java-files-under, src)
+LOCAL_JAVA_RESOURCE_DIRS := resources
# The aim of this package is to run tests against the default packaging of ICU as a standalone
# java library, and not as the implementation in use by the current android system. For this
# reason, all the required ICU resources are included into the APK by the following rules.
# icu4j contains ICU's implementation classes, icu4j-tests contains the test classes,
# and icudata/icutzdata contain data files and timezone data files respectively.
-LOCAL_STATIC_JAVA_LIBRARIES := compatibility-device-util android-support-test icu4j icu4j-tests \
- icu4j-icudata icu4j-icutzdata icu4j-testdata
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ compatibility-device-util \
+ android-support-test \
+ vogarexpect \
+ icu4j \
+ icu4j-tests \
+ icu4j-icudata \
+ icu4j-icutzdata \
+ icu4j-testdata
# Tag this module as a cts_v2 test artifact
LOCAL_COMPATIBILITY_SUITE := cts_v2
@@ -44,23 +52,38 @@
include $(BUILD_CTS_SUPPORT_PACKAGE)
-# The CTS framework has it's own logic for generating XML files based on scanning the source
-# for test methods and classes. Since the classes that we are testing are not actually in this
-# package we must provide an alternative. Here we define a specially crafted XML file which
-# conforms to what CTS and particularly, the cts-tradefed tool understands. This file contains
-# lists of classes in ICU4J that we know are used in libcore and should be tested as part of CTS.
-# The following rule uses the Android CoPy (ACP) tool to copy this file to where it is expected.
+# Version 1 of the CTS framework has it's own logic for generating XML files based on scanning the
+# source for test methods and classes written using JUnit 3 (doesn't work for JUnit 4 @RunWith
+# tests). Since the ICU tests are not written using JUnit (although they are run with a custom JUnit
+# RunnerBuilder) this provides an alternative. This generates an XML representation based off a
+# list of the tests that are run by version 2 of the CTS framework (which doesn't require the list
+# in advance). The tools/update-test-list.sh script will take a host_log_[0-9]+.zip created by
+# CTSv1 and extract the list of tests run and update the test-list.txt file.
-ifeq ($(TARGET_ARCH),arm64)
- LOCAL_ARCH := arm
-else ifeq ($(TARGET_ARCH),mips64)
- LOCAL_ARCH := mips
-else ifeq ($(TARGET_ARCH),x86_64)
- LOCAL_ARCH := x86
-else
- LOCAL_ARCH := $(TARGET_ARCH)
-endif
-
+CTS_ICU_TEST_LIST_PATH := $(LOCAL_PATH)/test-list.txt
cts_package_xml := $(CTS_TESTCASES_OUT)/CtsIcuTestCases.xml
-$(cts_package_xml): $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME))/package.apk | $(ACP)
- $(ACP) -fp cts/tests/tests/icu/CtsIcuTestCases_$(LOCAL_ARCH).xml $@
+$(cts_package_xml): $(HOST_OUT_JAVA_LIBRARIES)/cts-icu-tools.jar $(CTS_ICU_TEST_LIST_PATH) \
+ $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME))/package.apk
+ java -Xmx256M -classpath $(HOST_OUT_JAVA_LIBRARIES)/cts-icu-tools.jar \
+ android.icu.cts.tools.GenerateTestCaseXML \
+ $(CTS_ICU_TEST_LIST_PATH) \
+ $(TARGET_ARCH) \
+ $@
+
+# build cts-icu-tools tool
+# ============================================================
+include $(CLEAR_VARS)
+
+# Don't include this package in any target
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(call all-java-files-under, tools)
+LOCAL_JAVA_RESOURCE_DIRS := resources
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ descGen \
+ jsr305lib
+
+LOCAL_MODULE := cts-icu-tools
+
+include $(BUILD_HOST_JAVA_LIBRARY)
diff --git a/tests/tests/icu/CtsIcuTestCases_arm.xml b/tests/tests/icu/CtsIcuTestCases_arm.xml
deleted file mode 100644
index 96f0701..0000000
--- a/tests/tests/icu/CtsIcuTestCases_arm.xml
+++ /dev/null
@@ -1,563 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-
-<TestPackage AndroidFramework="Android 1.0"
- appNameSpace="android.icu.cts"
- appPackageName="com.ibm.icu.dev.test"
- name="CtsIcuTestCases"
- runner=".IcuTestRunner"
- version="1.0">
-
- <!--
- ICU tests are run against ICU as a standalone library so the package names are com.ibm.icu.*.
- Each test class has one dummy method called "run-everything". This is because CTS will not try
- to run a class if there is no known test method on it. The IcuTestRunner is aware of this and
- pretends to run the method "run-everything", but actually dispatches the run to ICU's own test
- runner. If the test is successful, a return code of 0 from ICU's test runner will be detected
- and we report that the "run-everything" method passed. If there is any failure in the class,
- we report that "run-everything" failed and print out the detailed method by method listing
- from ICU about what actually failed, as the stack trace for the failure in "run-everything".
- -->
-
- <TestSuite name="com">
- <TestSuite name="ibm">
- <TestSuite name="icu">
- <TestSuite name="dev">
- <TestSuite name="test">
- <TestSuite name="translit">
- <TestCase abis="armeabi-v7a arm64-v8a" name="PrettyPrinterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TransliteratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="RegexUtilitiesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="ReplaceableTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="RoundTripTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="AnyScriptTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="ErrorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="UnicodeMapTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="CompoundTransliteratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TestUnicodeProperty">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="util">
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="ICUResourceBundleCollationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="ULocaleCollationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="GenderInfoTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="BytesTrieTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="LocaleDataTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CurrencyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="RegionTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="ULocaleTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="StringTokenizerTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CharsTrieTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CompactArrayTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="LocaleBuilderTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TrieMapTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="ICUServiceThreadTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="ICUBinaryTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="ICUResourceBundleTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="DebugUtilitiesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="SimplePatternFormatterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="LocaleMatcherTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="UtilityTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="Trie2Test">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="ICUServiceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="VersionInfoTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="LocalePriorityListTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TrieTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TextTrieMapTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="search">
- <TestCase abis="armeabi-v7a arm64-v8a" name="SearchTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="collator">
- <TestCase abis="armeabi-v7a arm64-v8a" name="LotusCollationKoreanTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationTurkishTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationMiscTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationAPITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationServiceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="AlphabeticIndexTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationFinnishTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationDummyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationRegressionTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationChineseTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationGermanTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="G7CollationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationSpanishTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="CollationCreationMethodTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="UCAConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationKanaTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationFrenchTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationIteratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationThaiTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationFrozenMonkeyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationThreadTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationEnglishTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationMonkeyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CollationCurrencyTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="format">
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="GlobalizationPreferencesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="RbnfLenientScannerTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="PluralRangesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="SelectFormatUnitTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="PluralRulesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="RelativeDateTimeFormatterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="RBNFParseTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TimeUnitTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="CompactDecimalFormatTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="RbnfRoundTripTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="RbnfTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="SelectFormatAPITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="PluralFormatTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="BigNumberFormatTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="ListFormatterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="DateTimeGeneratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="NumberFormatSpecificationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="MeasureUnitTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="ScientificNumberFormatterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="PluralFormatUnitTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="compression">
- <TestCase abis="armeabi-v7a arm64-v8a" name="ExhaustiveTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="DecompressionTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="text">
- <TestCase abis="armeabi-v7a arm64-v8a" name="SpoofCheckerTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="iterator">
- <TestCase abis="armeabi-v7a arm64-v8a" name="TestUCharacterIterator">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="duration">
- <TestSuite name="languages">
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="Test_en">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="Test_es">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="Test_fr">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="Test_he_IL">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="Test_hi">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="Test_it">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="Test_ja">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="Test_ko">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="Test_zh_Hans">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="Test_zh_Hans_SG">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="Test_zh_Hant">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="Test_zh_Hant_HK">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="ResourceBasedPeriodFormatterDataServiceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="ICUDurationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="PeriodBuilderFactoryTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="PeriodBuilderTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="PeriodTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="DataReadWriteTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="RegressionTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="rbbi">
- <TestCase abis="armeabi-v7a arm64-v8a" name="RBBITestExtended">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="SimpleBITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="BreakIteratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="RBBITestMonkey">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="RBBITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="BreakIteratorRegTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="lang">
- <TestCase abis="armeabi-v7a arm64-v8a" name="TestUScript">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="UPropertyAliasesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="UTF16Test">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="UCharacterCategoryTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="UnicodeSetStringSpanTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="UnicodeSetTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="UCharacterCaseTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="UCharacterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="UCharacterThreadTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="UCharacterSurrogateTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TestUScriptRun">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="UCharacterDirectionTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="charsetdet">
- <TestCase abis="armeabi-v7a arm64-v8a" name="TestCharsetDetector">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="normalizer">
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="TestDeprecatedNormalizerAPI">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="NormalizationMonkeyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TestCanonicalIterator">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="BasicTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="ConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="NormalizerRegressionTests">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="UTS46Test">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a"
- name="UnicodeNormalizerConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="bidi">
- <TestCase abis="armeabi-v7a arm64-v8a" name="BidiTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="BiDiConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="shaping">
- <TestCase abis="armeabi-v7a arm64-v8a" name="ArabicShapingRegTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="stringprep">
- <TestCase abis="armeabi-v7a arm64-v8a" name="TestStringPrep">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="IDNAConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TestIDNA">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TestStringPrepProfiles">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TestIDNARef">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="timezone">
- <TestCase abis="armeabi-v7a arm64-v8a" name="TimeZoneTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TimeZoneRuleTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TimeZoneRegression">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TimeZoneBoundaryTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TimeZoneOffsetLocalTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="bigdec">
- <TestCase abis="armeabi-v7a arm64-v8a" name="DiagBigDecimal">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="calendar">
- <TestCase abis="armeabi-v7a arm64-v8a" name="CalendarTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="AstroTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="HolidayTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="timescale">
- <TestCase abis="armeabi-v7a arm64-v8a" name="TimeScaleMonkeyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TimeScaleAPITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TimeScaleDataTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="charset">
- <TestCase abis="armeabi-v7a arm64-v8a" name="TestSelection">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TestCharset">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestCase abis="armeabi-v7a arm64-v8a" name="TestLocaleNamePackaging">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- </TestSuite>
- </TestSuite>
- </TestSuite>
- </TestSuite>
-</TestPackage>
diff --git a/tests/tests/icu/CtsIcuTestCases_mips.xml b/tests/tests/icu/CtsIcuTestCases_mips.xml
deleted file mode 100644
index beeae32..0000000
--- a/tests/tests/icu/CtsIcuTestCases_mips.xml
+++ /dev/null
@@ -1,563 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-
-<TestPackage AndroidFramework="Android 1.0"
- appNameSpace="android.icu.cts"
- appPackageName="com.ibm.icu.dev.test"
- name="CtsIcuTestCases"
- runner=".IcuTestRunner"
- version="1.0">
-
- <!--
- ICU tests are run against ICU as a standalone library so the package names are com.ibm.icu.*.
- Each test class has one dummy method called "run-everything". This is because CTS will not try
- to run a class if there is no known test method on it. The IcuTestRunner is aware of this and
- pretends to run the method "run-everything", but actually dispatches the run to ICU's own test
- runner. If the test is successful, a return code of 0 from ICU's test runner will be detected
- and we report that the "run-everything" method passed. If there is any failure in the class,
- we report that "run-everything" failed and print out the detailed method by method listing
- from ICU about what actually failed, as the stack trace for the failure in "run-everything".
- -->
-
- <TestSuite name="com">
- <TestSuite name="ibm">
- <TestSuite name="icu">
- <TestSuite name="dev">
- <TestSuite name="test">
- <TestSuite name="translit">
- <TestCase abis="mips mips64" name="PrettyPrinterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TransliteratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="RegexUtilitiesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="ReplaceableTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="RoundTripTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="AnyScriptTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="ErrorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="UnicodeMapTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="CompoundTransliteratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TestUnicodeProperty">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="util">
- <TestCase abis="mips mips64"
- name="ICUResourceBundleCollationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="ULocaleCollationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="GenderInfoTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="BytesTrieTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="LocaleDataTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CurrencyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="RegionTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="ULocaleTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="StringTokenizerTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CharsTrieTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CompactArrayTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="LocaleBuilderTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TrieMapTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="ICUServiceThreadTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="ICUBinaryTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="ICUResourceBundleTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="DebugUtilitiesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="SimplePatternFormatterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="LocaleMatcherTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="UtilityTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="Trie2Test">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="ICUServiceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="VersionInfoTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="LocalePriorityListTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TrieTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TextTrieMapTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="search">
- <TestCase abis="mips mips64" name="SearchTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="collator">
- <TestCase abis="mips mips64" name="LotusCollationKoreanTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationTurkishTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationMiscTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationAPITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationServiceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="AlphabeticIndexTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationFinnishTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationDummyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationRegressionTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationChineseTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationGermanTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="G7CollationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationSpanishTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="CollationCreationMethodTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="UCAConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationKanaTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationFrenchTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationIteratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationThaiTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationFrozenMonkeyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationThreadTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationEnglishTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationMonkeyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CollationCurrencyTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="format">
- <TestCase abis="mips mips64"
- name="GlobalizationPreferencesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="RbnfLenientScannerTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="PluralRangesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="SelectFormatUnitTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="PluralRulesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="RelativeDateTimeFormatterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="RBNFParseTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TimeUnitTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="CompactDecimalFormatTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="RbnfRoundTripTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="RbnfTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="SelectFormatAPITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="PluralFormatTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="BigNumberFormatTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="ListFormatterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="DateTimeGeneratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="NumberFormatSpecificationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="MeasureUnitTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="ScientificNumberFormatterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="PluralFormatUnitTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="compression">
- <TestCase abis="mips mips64" name="ExhaustiveTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="DecompressionTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="text">
- <TestCase abis="mips mips64" name="SpoofCheckerTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="iterator">
- <TestCase abis="mips mips64" name="TestUCharacterIterator">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="duration">
- <TestSuite name="languages">
- <TestCase abis="mips mips64"
- name="Test_en">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="Test_es">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="Test_fr">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="Test_he_IL">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="Test_hi">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="Test_it">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="Test_ja">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="Test_ko">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="Test_zh_Hans">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="Test_zh_Hans_SG">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="Test_zh_Hant">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="Test_zh_Hant_HK">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestCase abis="mips mips64"
- name="ResourceBasedPeriodFormatterDataServiceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="ICUDurationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="PeriodBuilderFactoryTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="PeriodBuilderTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="PeriodTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="DataReadWriteTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="RegressionTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="rbbi">
- <TestCase abis="mips mips64" name="RBBITestExtended">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="SimpleBITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="BreakIteratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="RBBITestMonkey">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="RBBITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="BreakIteratorRegTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="lang">
- <TestCase abis="mips mips64" name="TestUScript">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="UPropertyAliasesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="UTF16Test">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="UCharacterCategoryTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="UnicodeSetStringSpanTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="UnicodeSetTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="UCharacterCaseTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="UCharacterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="UCharacterThreadTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="UCharacterSurrogateTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TestUScriptRun">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="UCharacterDirectionTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="charsetdet">
- <TestCase abis="mips mips64" name="TestCharsetDetector">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="normalizer">
- <TestCase abis="mips mips64"
- name="TestDeprecatedNormalizerAPI">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="NormalizationMonkeyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TestCanonicalIterator">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="BasicTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="ConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="NormalizerRegressionTests">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="UTS46Test">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64"
- name="UnicodeNormalizerConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="bidi">
- <TestCase abis="mips mips64" name="BidiTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="BiDiConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="shaping">
- <TestCase abis="mips mips64" name="ArabicShapingRegTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="stringprep">
- <TestCase abis="mips mips64" name="TestStringPrep">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="IDNAConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TestIDNA">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TestStringPrepProfiles">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TestIDNARef">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="timezone">
- <TestCase abis="mips mips64" name="TimeZoneTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TimeZoneRuleTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TimeZoneRegression">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TimeZoneBoundaryTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TimeZoneOffsetLocalTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="bigdec">
- <TestCase abis="mips mips64" name="DiagBigDecimal">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="calendar">
- <TestCase abis="mips mips64" name="CalendarTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="AstroTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="HolidayTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="timescale">
- <TestCase abis="mips mips64" name="TimeScaleMonkeyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TimeScaleAPITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TimeScaleDataTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="charset">
- <TestCase abis="mips mips64" name="TestSelection">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="mips mips64" name="TestCharset">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestCase abis="mips mips64" name="TestLocaleNamePackaging">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- </TestSuite>
- </TestSuite>
- </TestSuite>
- </TestSuite>
-</TestPackage>
diff --git a/tests/tests/icu/CtsIcuTestCases_x86.xml b/tests/tests/icu/CtsIcuTestCases_x86.xml
deleted file mode 100644
index 31140f2..0000000
--- a/tests/tests/icu/CtsIcuTestCases_x86.xml
+++ /dev/null
@@ -1,563 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-
-<TestPackage AndroidFramework="Android 1.0"
- appNameSpace="android.icu.cts"
- appPackageName="com.ibm.icu.dev.test"
- name="CtsIcuTestCases"
- runner=".IcuTestRunner"
- version="1.0">
-
- <!--
- ICU tests are run against ICU as a standalone library so the package names are com.ibm.icu.*.
- Each test class has one dummy method called "run-everything". This is because CTS will not try
- to run a class if there is no known test method on it. The IcuTestRunner is aware of this and
- pretends to run the method "run-everything", but actually dispatches the run to ICU's own test
- runner. If the test is successful, a return code of 0 from ICU's test runner will be detected
- and we report that the "run-everything" method passed. If there is any failure in the class,
- we report that "run-everything" failed and print out the detailed method by method listing
- from ICU about what actually failed, as the stack trace for the failure in "run-everything".
- -->
-
- <TestSuite name="com">
- <TestSuite name="ibm">
- <TestSuite name="icu">
- <TestSuite name="dev">
- <TestSuite name="test">
- <TestSuite name="translit">
- <TestCase abis="x86 x86_64" name="PrettyPrinterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TransliteratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="RegexUtilitiesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="ReplaceableTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="RoundTripTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="AnyScriptTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="ErrorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="UnicodeMapTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="CompoundTransliteratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TestUnicodeProperty">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="util">
- <TestCase abis="x86 x86_64"
- name="ICUResourceBundleCollationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="ULocaleCollationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="GenderInfoTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="BytesTrieTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="LocaleDataTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CurrencyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="RegionTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="ULocaleTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="StringTokenizerTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CharsTrieTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CompactArrayTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="LocaleBuilderTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TrieMapTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="ICUServiceThreadTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="ICUBinaryTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="ICUResourceBundleTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="DebugUtilitiesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="SimplePatternFormatterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="LocaleMatcherTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="UtilityTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="Trie2Test">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="ICUServiceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="VersionInfoTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="LocalePriorityListTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TrieTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TextTrieMapTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="search">
- <TestCase abis="x86 x86_64" name="SearchTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="collator">
- <TestCase abis="x86 x86_64" name="LotusCollationKoreanTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationTurkishTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationMiscTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationAPITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationServiceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="AlphabeticIndexTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationFinnishTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationDummyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationRegressionTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationChineseTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationGermanTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="G7CollationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationSpanishTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="CollationCreationMethodTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="UCAConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationKanaTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationFrenchTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationIteratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationThaiTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationFrozenMonkeyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationThreadTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationEnglishTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationMonkeyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CollationCurrencyTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="format">
- <TestCase abis="x86 x86_64"
- name="GlobalizationPreferencesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="RbnfLenientScannerTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="PluralRangesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="SelectFormatUnitTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="PluralRulesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="RelativeDateTimeFormatterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="RBNFParseTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TimeUnitTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="CompactDecimalFormatTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="RbnfRoundTripTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="RbnfTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="SelectFormatAPITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="PluralFormatTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="BigNumberFormatTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="ListFormatterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="DateTimeGeneratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="NumberFormatSpecificationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="MeasureUnitTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="ScientificNumberFormatterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="PluralFormatUnitTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="compression">
- <TestCase abis="x86 x86_64" name="ExhaustiveTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="DecompressionTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="text">
- <TestCase abis="x86 x86_64" name="SpoofCheckerTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="iterator">
- <TestCase abis="x86 x86_64" name="TestUCharacterIterator">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="duration">
- <TestSuite name="languages">
- <TestCase abis="x86 x86_64"
- name="Test_en">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="Test_es">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="Test_fr">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="Test_he_IL">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="Test_hi">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="Test_it">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="Test_ja">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="Test_ko">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="Test_zh_Hans">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="Test_zh_Hans_SG">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="Test_zh_Hant">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="Test_zh_Hant_HK">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestCase abis="x86 x86_64"
- name="ResourceBasedPeriodFormatterDataServiceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="ICUDurationTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="PeriodBuilderFactoryTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="PeriodBuilderTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="PeriodTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="DataReadWriteTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="RegressionTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="rbbi">
- <TestCase abis="x86 x86_64" name="RBBITestExtended">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="SimpleBITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="BreakIteratorTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="RBBITestMonkey">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="RBBITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="BreakIteratorRegTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="lang">
- <TestCase abis="x86 x86_64" name="TestUScript">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="UPropertyAliasesTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="UTF16Test">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="UCharacterCategoryTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="UnicodeSetStringSpanTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="UnicodeSetTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="UCharacterCaseTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="UCharacterTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="UCharacterThreadTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="UCharacterSurrogateTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TestUScriptRun">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="UCharacterDirectionTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="charsetdet">
- <TestCase abis="x86 x86_64" name="TestCharsetDetector">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="normalizer">
- <TestCase abis="x86 x86_64"
- name="TestDeprecatedNormalizerAPI">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="NormalizationMonkeyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TestCanonicalIterator">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="BasicTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="ConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="NormalizerRegressionTests">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="UTS46Test">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64"
- name="UnicodeNormalizerConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="bidi">
- <TestCase abis="x86 x86_64" name="BidiTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="BiDiConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="shaping">
- <TestCase abis="x86 x86_64" name="ArabicShapingRegTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="stringprep">
- <TestCase abis="x86 x86_64" name="TestStringPrep">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="IDNAConformanceTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TestIDNA">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TestStringPrepProfiles">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TestIDNARef">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="timezone">
- <TestCase abis="x86 x86_64" name="TimeZoneTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TimeZoneRuleTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TimeZoneRegression">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TimeZoneBoundaryTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TimeZoneOffsetLocalTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="bigdec">
- <TestCase abis="x86 x86_64" name="DiagBigDecimal">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="calendar">
- <TestCase abis="x86 x86_64" name="CalendarTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="AstroTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="HolidayTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="timescale">
- <TestCase abis="x86 x86_64" name="TimeScaleMonkeyTest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TimeScaleAPITest">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TimeScaleDataTest">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestSuite name="charset">
- <TestCase abis="x86 x86_64" name="TestSelection">
- <Test name="run-everything"/>
- </TestCase>
- <TestCase abis="x86 x86_64" name="TestCharset">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- <TestCase abis="x86 x86_64" name="TestLocaleNamePackaging">
- <Test name="run-everything"/>
- </TestCase>
- </TestSuite>
- </TestSuite>
- </TestSuite>
- </TestSuite>
- </TestSuite>
-</TestPackage>
diff --git a/tests/tests/icu/resources/android/icu/cts/expectations/icu-known-failures.txt b/tests/tests/icu/resources/android/icu/cts/expectations/icu-known-failures.txt
new file mode 100644
index 0000000..dfc6144
--- /dev/null
+++ b/tests/tests/icu/resources/android/icu/cts/expectations/icu-known-failures.txt
@@ -0,0 +1,59 @@
+/*
+ * This file contains expectations for tests that are known to fail.
+ */
+[
+{
+ description: "Fails when running the tests from ant in external/icu/icu4j",
+ name: "com.ibm.icu.dev.test.format.NumberFormatTest#TestDataDrivenICU",
+ bug: "27310195"
+},
+{
+ description: "Class cannot be instantiated, cannot find resources com/ibm/icu/dev/test/serializable/data",
+ name: "com.ibm.icu.dev.test.serializable.CompatibilityTest",
+ bug: "27310873"
+},
+{
+ description: "Broken and not yet triaged",
+ names: [
+ "com.ibm.icu.dev.test.bidi.TestCompatibility#testCompatibility",
+ "com.ibm.icu.dev.test.calendar.ChineseTest#TestCoverage",
+ "com.ibm.icu.dev.test.calendar.ChineseTest#TestInitWithCurrentTime",
+ "com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestAddRollEra0AndEraBounds",
+ "com.ibm.icu.dev.test.duration.ICUDurationTest#TestBasics",
+ "com.ibm.icu.dev.test.format.DataDrivenFormatTest#run-everything",
+ "com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4073003",
+ "com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4151706",
+ "com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4182066",
+ "com.ibm.icu.dev.test.format.DateFormatTest#TestBadInput135",
+ "com.ibm.icu.dev.test.format.DateFormatTest#TestDotAndAtLeniency",
+ "com.ibm.icu.dev.test.format.DateFormatTest#TestGenericTime",
+ "com.ibm.icu.dev.test.format.DateFormatTest#TestPartialParse994",
+ "com.ibm.icu.dev.test.format.DateFormatTest#TestQuarters",
+ "com.ibm.icu.dev.test.format.DateFormatTest#TestSpaceParsing",
+ "com.ibm.icu.dev.test.format.DateFormatTest#TestTwoDigitYear",
+ "com.ibm.icu.dev.test.format.DateFormatTest#TestWhiteSpaceParsing",
+ "com.ibm.icu.dev.test.format.NumberFormatTest#TestDataDrivenJDK",
+ "com.ibm.icu.dev.test.format.NumberFormatTest#TestNonpositiveMultiplier",
+ "com.ibm.icu.dev.test.format.PluralRulesTest#testOverUnderflow",
+ "com.ibm.icu.dev.test.timezone.TimeZoneBoundaryTest#TestStepwise",
+ "com.ibm.icu.dev.test.timezone.TimeZoneTest#TestObservesDaylightTime",
+ "com.ibm.icu.dev.test.translit.TransliteratorTest#TestSourceTargetSet2",
+ "com.ibm.icu.dev.test.translit.TransliteratorTest#TestSourceTargetSetFilter",
+ "com.ibm.icu.dev.test.util.CurrencyTest#TestGetKeywordValues"
+ ]
+},
+{
+ description: "Broken due to warnings, not yet triaged",
+ names: [
+ "com.ibm.icu.dev.test.collator.CollationCreationMethodTest#TestRuleVsLocaleCreationMonkey",
+ "com.ibm.icu.dev.test.collator.CollationMiscTest#TestImport",
+ "com.ibm.icu.dev.test.collator.CollationMiscTest#TestImportWithType",
+ "com.ibm.icu.dev.test.collator.CollationMiscTest#TestUCARules",
+ "com.ibm.icu.dev.test.collator.CollationTest#TestDataDriven",
+ "com.ibm.icu.dev.test.collator.G7CollationTest#TestG7Data",
+ "com.ibm.icu.dev.test.charset.TestCharset#TestHZ",
+ "com.ibm.icu.dev.test.charset.TestCharset#TestMBCS",
+ "com.ibm.icu.dev.test.charset.TestCharset#TestSurrogateBehavior"
+ ]
+}
+]
diff --git a/tests/tests/icu/src/android/icu/cts/AndroidJUnitRunnerConstants.java b/tests/tests/icu/src/android/icu/cts/AndroidJUnitRunnerConstants.java
new file mode 100644
index 0000000..24d8819
--- /dev/null
+++ b/tests/tests/icu/src/android/icu/cts/AndroidJUnitRunnerConstants.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package android.icu.cts;
+
+import android.support.test.runner.AndroidJUnitRunner;
+
+/**
+ * Constants used to communicate to and from {@link AndroidJUnitRunner}.
+ */
+interface AndroidJUnitRunnerConstants {
+
+ /**
+ * The names of the file containing the names of the tests to run.
+ *
+ * <p>This is an internal constant used within
+ * {@code android.support.test.internal.runner.RunnerArgs}, which is used on both the server
+ * and
+ * client side. The constant is used when there are too many test names to pass on the command
+ * line, in which case they are stored in a file that is pushed to the device and then the
+ * location of that file is passed in this argument. The {@code RunnerArgs} on the client will
+ * read the contents of that file in order to retrieve the list of names and then return that
+ * to
+ * its client without the client being aware of how that was done.
+ */
+ String ARGUMENT_TEST_FILE = "testFile";
+
+ /**
+ * A comma separated list of the names of test classes to run.
+ *
+ * <p>The equivalent constant in {@code InstrumentationTestRunner} is hidden and so not
+ * available
+ * through the public API.
+ */
+ String ARGUMENT_TEST_CLASS = "class";
+
+ /**
+ * Log the results as if the tests were executed but don't actually run the tests.
+ *
+ * <p>The equivalent constant in {@code InstrumentationTestRunner} is private.
+ */
+ String ARGUMENT_LOG_ONLY = "log";
+
+ /**
+ * Wait for the debugger before starting.
+ *
+ * <p>There is no equivalent constant in {@code InstrumentationTestRunner} but the string is
+ * used
+ * within that class.
+ */
+ String ARGUMENT_DEBUG = "debug";
+
+ /**
+ * Only count the number of tests to run.
+ *
+ * <p>There is no equivalent constant in {@code InstrumentationTestRunner} but the string is
+ * used
+ * within that class.
+ */
+ String ARGUMENT_COUNT = "count";
+
+ /**
+ * Token representing how long (in seconds) the current test took to execute.
+ *
+ * <p>The equivalent constant in {@code InstrumentationTestRunner} is private.
+ */
+ String REPORT_KEY_RUNTIME = "runtime";
+
+ /**
+ * An identifier for tests run using this class.
+ */
+ String REPORT_VALUE_ID = "IcuTestRunner";
+}
diff --git a/tests/tests/icu/src/android/icu/cts/IcuRunListener.java b/tests/tests/icu/src/android/icu/cts/IcuRunListener.java
new file mode 100644
index 0000000..5e1e003
--- /dev/null
+++ b/tests/tests/icu/src/android/icu/cts/IcuRunListener.java
@@ -0,0 +1,212 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package android.icu.cts;
+
+import android.app.Instrumentation;
+import android.icu.cts.junit.ICUTestFailedException;
+import android.icu.cts.junit.IcuRunnerParams;
+import android.os.Bundle;
+import android.util.Log;
+import java.util.ArrayList;
+import java.util.List;
+import org.junit.runner.Description;
+import org.junit.runner.Result;
+import org.junit.runner.notification.Failure;
+import org.junit.runner.notification.RunListener;
+
+import static android.app.Instrumentation.REPORT_KEY_IDENTIFIER;
+import static android.app.Instrumentation.REPORT_KEY_STREAMRESULT;
+import static android.icu.cts.AndroidJUnitRunnerConstants.REPORT_KEY_RUNTIME;
+import static android.icu.cts.AndroidJUnitRunnerConstants.REPORT_VALUE_ID;
+import static android.test.InstrumentationTestRunner.REPORT_KEY_NAME_CLASS;
+import static android.test.InstrumentationTestRunner.REPORT_KEY_NAME_TEST;
+import static android.test.InstrumentationTestRunner.REPORT_KEY_NUM_CURRENT;
+import static android.test.InstrumentationTestRunner.REPORT_KEY_NUM_TOTAL;
+import static android.test.InstrumentationTestRunner.REPORT_KEY_STACK;
+import static android.test.InstrumentationTestRunner.REPORT_VALUE_RESULT_ERROR;
+import static android.test.InstrumentationTestRunner.REPORT_VALUE_RESULT_FAILURE;
+import static android.test.InstrumentationTestRunner.REPORT_VALUE_RESULT_OK;
+import static android.test.InstrumentationTestRunner.REPORT_VALUE_RESULT_START;
+
+
+/**
+ * Listens to result of running tests, collates details and sends intermediate status information
+ * back to the host.
+ */
+class IcuRunListener extends RunListener {
+
+ /**
+ * The {@link Instrumentation} for which this will report information.
+ */
+ private final Instrumentation instrumentation;
+
+ private final IcuRunnerParams icuRunnerParams;
+
+ private final int totalTestCount;
+
+ /**
+ * The list of failed tests.
+ */
+ private final List<String> failedTests;
+
+ private Bundle currentTestResult;
+
+ private int resultStatus;
+
+ private int totalSuccess = 0;
+
+ private int totalFailures = 0;
+
+ private long runStartTime;
+
+ private long runElapsedTime;
+
+ private long testStartTime;
+
+ public IcuRunListener(Instrumentation instrumentation, IcuRunnerParams icuRunnerParams,
+ int totalTestCount) {
+ this.instrumentation = instrumentation;
+ this.icuRunnerParams = icuRunnerParams;
+ this.totalTestCount = totalTestCount;
+ failedTests = new ArrayList<>();
+ }
+
+ /**
+ * Send an update to the test runner informing it we are starting a test. If this is not run
+ * then
+ * the test runner will think the test was never run, and mark it as failed.
+ *
+ * @param className
+ * The name of the class being tested.
+ * @param methodName
+ * The name of the test method being tested.
+ * @return A bundle containing test class, method, and report name. This bundle has been sent
+ * back
+ * to the host.
+ */
+ private Bundle sendStartTestInfo(String className, int testNum, String methodName) {
+ Bundle data = new Bundle();
+ data.putString(Instrumentation.REPORT_KEY_IDENTIFIER, REPORT_VALUE_ID);
+ data.putInt(REPORT_KEY_NUM_TOTAL, totalTestCount);
+ data.putInt(REPORT_KEY_NUM_CURRENT, testNum);
+ data.putString(REPORT_KEY_NAME_CLASS, className);
+ data.putString(REPORT_KEY_NAME_TEST, methodName);
+ instrumentation.sendStatus(REPORT_VALUE_RESULT_START, data);
+ return data;
+ }
+
+ @Override
+ public void testRunStarted(Description description) throws Exception {
+ runStartTime = System.currentTimeMillis();
+ }
+
+ @Override
+ public void testStarted(Description description) throws Exception {
+ String className = description.getClassName();
+ int count = totalSuccess + totalFailures;
+ String methodName = description.getMethodName();
+ currentTestResult = sendStartTestInfo(className, count, methodName);
+ resultStatus = REPORT_VALUE_RESULT_OK;
+ testStartTime = System.currentTimeMillis();
+ }
+
+ @Override
+ public void testFailure(Failure failure) throws Exception {
+ Description description = failure.getDescription();
+
+ @SuppressWarnings("ThrowableResultOfMethodCallIgnored")
+ Throwable exception = failure.getException();
+ if (exception instanceof ICUTestFailedException) {
+ ICUTestFailedException icuTestFailedException =
+ (ICUTestFailedException) exception;
+
+ String information = icuTestFailedException.getInformation();
+ int errorCount = icuTestFailedException.getErrorCount();
+
+ // Include the detailed logs from ICU as the stack trace.
+ currentTestResult.putString(REPORT_KEY_STACK, information);
+
+ // Also append the logs to the console output.
+ String output = "Failure: " + description + ", due to " + errorCount + " error(s)\n"
+ + information;
+ currentTestResult.putString(Instrumentation.REPORT_KEY_STREAMRESULT, output);
+ resultStatus = REPORT_VALUE_RESULT_FAILURE;
+ } else {
+ String information = failure.getTrace();
+ currentTestResult.putString(REPORT_KEY_STACK, information);
+ String output = "Error: " + description + "\n" + information;
+ currentTestResult.putString(Instrumentation.REPORT_KEY_STREAMRESULT, output);
+ resultStatus = REPORT_VALUE_RESULT_ERROR;
+ }
+ }
+
+ @Override
+ public void testFinished(Description description) throws Exception {
+ long timeTaken = System.currentTimeMillis() - testStartTime;
+ currentTestResult.putFloat(REPORT_KEY_RUNTIME, timeTaken / 1000);
+
+ if (resultStatus == REPORT_VALUE_RESULT_OK) {
+ totalSuccess++;
+ String output = "Success: " + description;
+ currentTestResult.putString(Instrumentation.REPORT_KEY_STREAMRESULT, output);
+ } else {
+ totalFailures++;
+ failedTests.add(description.toString());
+ }
+
+ instrumentation.sendStatus(resultStatus, currentTestResult);
+ }
+
+ @Override
+ public void testRunFinished(Result result) throws Exception {
+ runElapsedTime = System.currentTimeMillis() - runStartTime;
+ }
+
+ public Bundle getFinalResults() {
+ int totalTests = totalFailures + totalSuccess;
+ Log.d(IcuTestRunner.TAG, (icuRunnerParams.getSkipExecution() ? "Skipped " : "Ran ")
+ + totalTests + " tests, " + totalSuccess + " passed, " + totalFailures + " failed");
+ Bundle results = new Bundle();
+ results.putString(REPORT_KEY_IDENTIFIER, REPORT_VALUE_ID);
+ results.putInt(REPORT_KEY_NUM_TOTAL, totalTests);
+ String report;
+ if (totalFailures == 0) {
+ report = "All " + totalSuccess + " tests passed.\n";
+ } else {
+ report = "Failures " + totalFailures + '\n';
+ for (String classname : failedTests) {
+ report += classname + '\n';
+ }
+ }
+
+ // Report the elapsed time (in seconds).
+ report += "Time: " + (runElapsedTime / 1000.0);
+
+ results.putString(REPORT_KEY_STREAMRESULT, report);
+
+ return results;
+ }
+
+ public Bundle getCountResults() {
+ Log.d(IcuTestRunner.TAG, "Counted " + (totalFailures + totalSuccess) + " tests, "
+ + totalSuccess + " passed, " + totalFailures + " failed");
+ Bundle results = new Bundle();
+ results.putString(REPORT_KEY_IDENTIFIER, REPORT_VALUE_ID);
+ results.putInt(REPORT_KEY_NUM_TOTAL, totalSuccess);
+ return results;
+ }
+}
diff --git a/tests/tests/icu/src/android/icu/cts/IcuTestFilter.java b/tests/tests/icu/src/android/icu/cts/IcuTestFilter.java
new file mode 100644
index 0000000..2ee1fcd
--- /dev/null
+++ b/tests/tests/icu/src/android/icu/cts/IcuTestFilter.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+package android.icu.cts;
+
+import android.icu.cts.junit.IcuTestFmwkRunner;
+import android.icu.cts.junit.IcuTestGroupRunner;
+import android.util.Log;
+import javax.annotation.Nullable;
+import org.junit.runner.Description;
+import org.junit.runner.manipulation.Filter;
+import vogar.Expectation;
+import vogar.ExpectationStore;
+import vogar.Result;
+
+/**
+ * Filter out tests/classes that are not requested or which are expected to fail.
+ *
+ * <p>This filter has to handle a hierarchy of {@code Description descriptions} that looks
+ * something like this (in CTSv2):
+ * <pre>
+ * IcuTestGroupRunner
+ * IcuTestGroupRunner
+ * IcuTestGroupRunner
+ * IcuTestFmwkRunner
+ * IcuFrameworkTest
+ * ...
+ * ...
+ * IcuTestFmwkRunner
+ * IcuFrameworkTest
+ * ...
+ * ...
+ * IcuTestGroupRunner
+ * IcuTestFmwkRunner
+ * IcuFrameworkTest
+ * ...
+ * ...
+ * ...
+ * </pre>
+ *
+ * <p>And also a flatter hierarchy that looks like this (in CTSv1):
+ * IcuTestFmwkRunner
+ * IcuFrameworkTest
+ * ...
+ * ...
+ *
+ * <p>It cannot filter out the non-leaf nodes in the hierarchy, i.e. {@link IcuTestGroupRunner} and
+ * {@link IcuTestFmwkRunner}, as that would prevent it from traversing the hierarchy and finding
+ * the leaf nodes.
+ */
+class IcuTestFilter extends Filter {
+
+ private final ExpectationStore expectationStore;
+
+ private final IcuTestList icuTestList;
+
+ public IcuTestFilter(IcuTestList icuTestList, @Nullable ExpectationStore expectationStore) {
+ this.expectationStore = expectationStore;
+ this.icuTestList = icuTestList;
+ }
+
+ @Override
+ public boolean shouldRun(Description description) {
+ // The description will only have a method name if it is a leaf node in the hierarchy, see
+ // class JavaDoc, otherwise it will be a non-leaf node. Non-leaf nodes must not be filtered
+ // out as that would prevent leaf nodes from being visited.
+ String methodName = description.getMethodName();
+ if (methodName != null) {
+ String className = description.getClassName();
+ String testName = className + "#" + methodName;
+
+ // If the test isn't in the list of tests to run then do not run it.
+ if (!icuTestList.shouldRunTest(testName)) {
+ return false;
+ }
+
+ if (expectationStore != null) {
+ Expectation expectation = expectationStore.get(testName);
+ if (expectation.getResult() != Result.SUCCESS) {
+ Log.d(IcuTestRunner.TAG, "Excluding test " + description
+ + " as it matches expectation: " + expectation);
+ return false;
+ }
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ public String describe() {
+ return "IcuTestFilter";
+ }
+}
diff --git a/tests/tests/icu/src/android/icu/cts/IcuTestList.java b/tests/tests/icu/src/android/icu/cts/IcuTestList.java
new file mode 100644
index 0000000..4c6a568
--- /dev/null
+++ b/tests/tests/icu/src/android/icu/cts/IcuTestList.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+package android.icu.cts;
+
+import android.util.Log;
+import java.util.ArrayList;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+import javax.annotation.Nullable;
+
+/**
+ * A list of the tests to run.
+ */
+class IcuTestList {
+
+ private static final String ROOT_TEST_GROUP_NAME = "com.ibm.icu.dev.test.TestAll";
+
+ /**
+ * The names of the set of tests to run, if null then all tests should be run.
+ */
+ @Nullable
+ private final Set<String> testsToRun;
+
+ private final List<Class> classesToRun;
+
+ /**
+ * @param testNameList
+ * The list of test names (i.e. {@code <class>#<method>}). If null then all
+ * tests should be run.
+ */
+ public IcuTestList(@Nullable List<String> testNameList) {
+
+ // Populate a set with the unique class names of all the tests.
+ Set<String> classNamesToRun = new LinkedHashSet<>();
+ if (testNameList == null) {
+ // Run from the root test class.
+ String rootTestClassName = ROOT_TEST_GROUP_NAME;
+ Log.d(IcuTestRunner.TAG, "Running all tests rooted at " + rootTestClassName);
+ classNamesToRun.add(rootTestClassName);
+ testsToRun = null;
+ } else {
+ testsToRun = new LinkedHashSet<>(testNameList);
+
+ for (String testName : testNameList) {
+ int index = testName.indexOf('#');
+ String className;
+ if (index == -1) {
+ className = testName;
+ } else {
+ className = testName.substring(0, index);
+ }
+ classNamesToRun.add(className);
+ }
+
+ Log.d(IcuTestRunner.TAG, "Running only the following tests: " + testsToRun);
+ }
+
+ // Populate the list of classes to run.
+ classesToRun = new ArrayList<>();
+ for (String className : classNamesToRun) {
+ try {
+ classesToRun.add(Class.forName(className));
+ } catch (ClassNotFoundException e) {
+ throw new IllegalStateException("Could not load class '" + className, e);
+ }
+ }
+ }
+
+ /**
+ * Return all the classes to run.
+ */
+ public Class[] getClassesToRun() {
+ return classesToRun.toArray(new Class[classesToRun.size()]);
+ }
+
+ /**
+ * Return true if the test with the specified name should be run, false otherwise.
+ */
+ public boolean shouldRunTest(String testName) {
+ // If the tests aren't explicitly provided then run all tests by
+ // default, otherwise run only those tests explicitly listed by name.
+ return testsToRun == null || testsToRun.contains(testName);
+ }
+}
diff --git a/tests/tests/icu/src/android/icu/cts/IcuTestRunner.java b/tests/tests/icu/src/android/icu/cts/IcuTestRunner.java
index ef94235..48a4cc1 100644
--- a/tests/tests/icu/src/android/icu/cts/IcuTestRunner.java
+++ b/tests/tests/icu/src/android/icu/cts/IcuTestRunner.java
@@ -18,28 +18,38 @@
import android.app.Activity;
import android.app.Instrumentation;
+import android.icu.cts.junit.IcuRunnerParams;
+import android.icu.cts.junit.IcuTestRunnerBuilder;
import android.os.Bundle;
import android.os.Debug;
import android.util.Log;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.LinkedList;
+import java.util.Collections;
+import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
+import javax.annotation.Nullable;
+import org.junit.runner.Computer;
+import org.junit.runner.JUnitCore;
+import org.junit.runner.Request;
+import org.junit.runner.Runner;
+import org.junit.runner.manipulation.Filter;
+import org.junit.runner.manipulation.Filterable;
+import org.junit.runner.manipulation.NoTestsRemainException;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.RunnerBuilder;
+import vogar.ExpectationStore;
+import vogar.ModeId;
-import static android.test.InstrumentationTestRunner.REPORT_KEY_NAME_CLASS;
-import static android.test.InstrumentationTestRunner.REPORT_KEY_NAME_TEST;
-import static android.test.InstrumentationTestRunner.REPORT_KEY_NUM_CURRENT;
-import static android.test.InstrumentationTestRunner.REPORT_KEY_NUM_TOTAL;
-import static android.test.InstrumentationTestRunner.REPORT_KEY_STACK;
-import static android.test.InstrumentationTestRunner.REPORT_VALUE_RESULT_ERROR;
-import static android.test.InstrumentationTestRunner.REPORT_VALUE_RESULT_OK;
-import static android.test.InstrumentationTestRunner.REPORT_VALUE_RESULT_START;
+import static android.icu.cts.AndroidJUnitRunnerConstants.ARGUMENT_COUNT;
+import static android.icu.cts.AndroidJUnitRunnerConstants.ARGUMENT_DEBUG;
+import static android.icu.cts.AndroidJUnitRunnerConstants.ARGUMENT_LOG_ONLY;
+import static android.icu.cts.AndroidJUnitRunnerConstants.ARGUMENT_TEST_CLASS;
+import static android.icu.cts.AndroidJUnitRunnerConstants.ARGUMENT_TEST_FILE;
/**
* A drop-in replacement for AndroidJUnitTestRunner, which understands the same arguments, and has
@@ -47,229 +57,142 @@
*/
public final class IcuTestRunner extends Instrumentation {
- private static final String TAG = "IcuTestRunner";
+ public static final String TAG = "IcuTestRunner";
- /**
- * The names of the file containing the names of the tests to run.
- *
- * <p>This is an internal constant used within
- * {@code android.support.test.internal.runner.RunnerArgs}, which is used on both the server
- * and client side. The constant is used when there are too many test names to pass on the
- * command line, in which case they are stored in a file that is pushed to the device and then
- * the location of that file is passed in this argument. The {@code RunnerArgs} on the client
- * will read the contents of that file in order to retrieve the list of names and then return
- * that to its client without the client being aware of how that was done.
- */
- private static final String ARGUMENT_TEST_FILE = "testFile";
-
- /**
- * A comma separated list of the names of test classes to run.
- *
- * <p>The equivalent constant in {@code InstrumentationTestRunner} is hidden and so not
- * available through the public API.
- */
- private static final String ARGUMENT_TEST_CLASS = "class";
-
- /**
- * Log the results as if the tests were executed but don't actually run the tests.
- *
- * <p>The equivalent constant in {@code InstrumentationTestRunner} is private.
- */
- private static final String ARGUMENT_LOG_ONLY = "log";
-
- /**
- * Wait for the debugger before starting.
- *
- * <p>There is no equivalent constant in {@code InstrumentationTestRunner} but the string is
- * used within that class.
- */
- private static final String ARGUMENT_DEBUG = "debug";
-
- /**
- * Only count the number of tests to run.
- *
- * <p>There is no equivalent constant in {@code InstrumentationTestRunner} but the string is
- * used within that class.
- */
- private static final String ARGUMENT_COUNT = "count";
-
- /**
- * Token representing how long (in seconds) the current test took to execute.
- *
- * <p>The equivalent constant in {@code InstrumentationTestRunner} is private.
- */
- private static final String REPORT_KEY_RUNTIME = "runtime";
-
- /**
- * An identifier for tests run using this class.
- */
- private static final String REPORT_VALUE_ID = "IcuTestRunner";
-
- /**
- * The name of a non-existent method for the sake of having a method name. This is required
- * because cts-tradefed needs to know which method on the test framework to run, but we don't
- * have that information, so we use this placeholder instead.
- */
- private static final String DUMMY_METHOD_NAME = "run-everything";
-
- /** Wait for the debugger before starting the tests. */
- private boolean debug;
+ private static final List<String> EXPECTATIONS_PATHS =
+ Collections.singletonList("expectations/icu-known-failures.txt");
/** Only count the number of tests, and not run them. */
private boolean testCountOnly;
- /** Only logOnly the number of tests, and not run them. */
+ /** Only log the number of tests, and not run them. */
private boolean logOnly;
- /** Contains all the wrapped ICU tests to be run in this invocation. */
- private Set<IcuTestUtils.IcuTestWrapper> tests;
+ /**
+ * The container for any test expectations.
+ */
+ @Nullable
+ private ExpectationStore expectationStore;
+
+ /**
+ * The list of tests to run.
+ */
+ private IcuTestList icuTestList;
@Override
public void onCreate(Bundle args) {
super.onCreate(args);
- Log.d(TAG, "In OnCreate");
- this.debug = args.getBoolean(ARGUMENT_DEBUG);
- this.testCountOnly = args.getBoolean(ARGUMENT_COUNT);
+ boolean debug = args.getBoolean(ARGUMENT_DEBUG);
+ if (debug) {
+ Log.i(TAG, "Waiting for debugger to connect...");
+ Debug.waitForDebugger();
+ Log.i(TAG, "Debugger connected.");
+ }
+
+ // Log the message only after getting a value from the args so that the args are
+ // unparceled.
+ Log.d(TAG, "In OnCreate: " + args);
+
this.logOnly = "true".equalsIgnoreCase(args.getString(ARGUMENT_LOG_ONLY));
+ this.testCountOnly = args.getBoolean(ARGUMENT_COUNT);
- // The test can be run specifying a list of classes to run, or as cts-tradefed does it,
+ try {
+ Set<String> expectationResources = new LinkedHashSet<>(EXPECTATIONS_PATHS);
+ expectationStore = ExpectationStore.parseResources(
+ getClass(), expectationResources, ModeId.DEVICE);
+ } catch (IOException e) {
+ Log.e(TAG, "Could not initialize ExpectationStore: ", e);
+ }
+
+ // The test can be run specifying a list of tests to run, or as cts-tradefed does it,
// by passing a fileName with a test to run on each line.
- List<String> classList;
+ List<String> testNameList;
String arg;
if ((arg = args.getString(ARGUMENT_TEST_FILE)) != null) {
// The tests are specified in a file.
try {
- classList = readTestsFromFile(arg);
+ testNameList = readTestsFromFile(arg);
} catch (IOException err) {
finish(Activity.RESULT_CANCELED, new Bundle());
return;
}
} else if ((arg = args.getString(ARGUMENT_TEST_CLASS)) != null) {
// The tests are specified in a String passed in the bundle.
- String[] classes = args.getString(arg).split(",");
- classList = new ArrayList<>(Arrays.asList(classes));
+ String[] tests = arg.split(",");
+ testNameList = Arrays.asList(tests);
} else {
// null means the runner should run all tests.
- classList = null;
+ testNameList = null;
}
- // Use all classes if a set isn't provided
- if (classList == null) {
- tests = IcuTestUtils.createTestAllWrappers();
- Log.d(TAG, "Running all tests");
- } else {
- tests = IcuTestUtils.createTestWrappers(classList);
- Log.d(TAG, "Running the following tests:" + classList);
- }
+ icuTestList = new IcuTestList(testNameList);
+
start();
}
@Override
public void onStart() {
- if (debug) {
- Debug.waitForDebugger();
- }
- int testCount = tests.size();
- if (testCountOnly) {
- Log.d(TAG, "test count only: " + testCount);
- Bundle testCountResult = new Bundle();
- testCountResult.putString(REPORT_KEY_IDENTIFIER, REPORT_VALUE_ID);
- testCountResult.putInt(REPORT_KEY_NUM_TOTAL, testCount);
- finish(Activity.RESULT_OK, testCountResult);
- return;
- }
-
- Log.d(TAG, "Running " + testCount + " tests");
-
- int totalSuccess = 0;
- int totalFailures = 0;
- List<String> failedClasses = new LinkedList<>();
-
- for (IcuTestUtils.IcuTestWrapper testWrapper : tests) {
- String className = testWrapper.getTestClassName() + '\n';
-
- Bundle currentTestResult = sendStartTestInfo(className, totalSuccess + totalFailures);
-
- StringBuilder result = new StringBuilder();
- try {
- StringWriter logs = new StringWriter();
- Log.d(TAG, "Executing test: " + className);
- long startTime = System.currentTimeMillis();
- int resultCode;
- if (logOnly) {
- resultCode = 0;
- } else {
- resultCode = testWrapper.call(new PrintWriter(logs));
- }
- long timeTaken = System.currentTimeMillis() - startTime;
- currentTestResult.putFloat(REPORT_KEY_RUNTIME, timeTaken / 1000);
- String logString = logs.toString();
- if (resultCode != 0) {
- totalFailures++;
- failedClasses.add(className);
- // Include the detailed logs from ICU as the stack trace.
- currentTestResult.putString(REPORT_KEY_STACK, logString);
- // Also append the logs to the console output.
- result.append("Failure: ").append(className).append(logString);
- currentTestResult.putString(REPORT_KEY_STREAMRESULT, result.toString());
- sendStatus(REPORT_VALUE_RESULT_ERROR, currentTestResult);
- } else {
- totalSuccess++;
- result.append("Success: ").append(className).append(logString);
- currentTestResult.putString(REPORT_KEY_STREAMRESULT, result.toString());
- sendStatus(REPORT_VALUE_RESULT_OK, currentTestResult);
- }
- result.append("Total time taken: ").append(timeTaken).append("ms\n");
- } catch (Exception e) {
- StringWriter stackTraceWriter = new StringWriter();
- e.printStackTrace(new PrintWriter(stackTraceWriter));
- String stackTrace = stackTraceWriter.toString();
- String message = "Test code threw exception: " + stackTrace + '\n';
- currentTestResult.putString(REPORT_KEY_STACK, message);
- result.append(message);
- sendStatus(REPORT_VALUE_RESULT_ERROR, currentTestResult);
- }
- }
- Bundle results = new Bundle();
- if (totalFailures == 0) {
- results.putString(REPORT_KEY_STREAMRESULT, "All " + totalSuccess + " tests passed.");
+ if (logOnly || testCountOnly) {
+ Log.d(TAG, "Counting/logging tests only");
} else {
- String report = "Failures " + totalFailures + '\n';
- for (String classname : failedClasses) {
- report += classname + '\n';
+ Log.d(TAG, "Running tests");
+ }
+
+ IcuRunnerParams icuRunnerParams = new IcuRunnerParams(logOnly || testCountOnly);
+
+ JUnitCore core = new JUnitCore();
+
+ Request request;
+ int totalTestCount;
+ try {
+ RunnerBuilder runnerBuilder = new IcuTestRunnerBuilder(icuRunnerParams);
+ Class[] classes = icuTestList.getClassesToRun();
+ Runner suite = new Computer().getSuite(runnerBuilder, classes);
+
+ if (suite instanceof Filterable) {
+ Filterable filterable = (Filterable) suite;
+
+ // Filter out all the tests that are expected to fail.
+ Filter filter = new IcuTestFilter(icuTestList, expectationStore);
+
+ try {
+ filterable.filter(filter);
+ } catch (NoTestsRemainException e) {
+ // Sometimes filtering will remove all tests but we do not care about that.
+ }
}
- results.putString(REPORT_KEY_STREAMRESULT, report);
+
+ request = Request.runner(suite);
+
+ // Get the total number of tests.
+ totalTestCount = suite.testCount();
+
+ } catch (InitializationError e) {
+ throw new RuntimeException("Could not create a suite", e);
+ }
+
+ IcuRunListener icuRunListener = new IcuRunListener(this, icuRunnerParams, totalTestCount);
+ core.addListener(icuRunListener);
+ core.run(request);
+
+ Bundle results;
+ if (testCountOnly) {
+ results = icuRunListener.getCountResults();
+ Log.d(TAG, "test count only: " + results);
+ } else {
+ // Get the final results to send back.
+ results = icuRunListener.getFinalResults();
}
Log.d(TAG, "Finished");
finish(Activity.RESULT_OK, results);
}
-
- /**
- * Send an update to the test runner informing it we are starting a test. If this is not run
- * then the test runner will think the test was never run, and mark it as failed.
- * @param className The name of the class being tested. Note in this CTS-ICU interoperability
- * layer, there is no method names, as we only support running whole classes.
- * @return A bundle containing test class, method (dummy), and report name. This bundle has
- * been sent back to the host.
- */
- private Bundle sendStartTestInfo(String className, int testNum) {
- Bundle data = new Bundle();
- data.putString(REPORT_KEY_IDENTIFIER, REPORT_VALUE_ID);
- data.putInt(REPORT_KEY_NUM_TOTAL, 1);
- data.putInt(REPORT_KEY_NUM_CURRENT, testNum);
- data.putString(REPORT_KEY_NAME_CLASS, className);
- // Dummy method to work with cts.
- data.putString(REPORT_KEY_NAME_TEST, DUMMY_METHOD_NAME);
- sendStatus(REPORT_VALUE_RESULT_START, data);
- return data;
- }
-
/**
* Read tests from a specified file.
+ *
* @return class names of tests. If there was an error reading the file, null is returned.
*/
private static List<String> readTestsFromFile(String fileName) throws IOException {
diff --git a/tests/tests/icu/src/android/icu/cts/IcuTestUtils.java b/tests/tests/icu/src/android/icu/cts/IcuTestUtils.java
deleted file mode 100644
index 116a94b..0000000
--- a/tests/tests/icu/src/android/icu/cts/IcuTestUtils.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * 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.
- */
-
-package android.icu.cts;
-
-import com.ibm.icu.dev.test.TestFmwk;
-
-import java.io.PrintWriter;
-import java.lang.reflect.Field;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * A thin wrapper around ICU's tests, and utilities to resolve them.
- */
-final class IcuTestUtils {
-
- /**
- * The field on TestGroup which has the list of classes in it.
- */
- private static final Field classesToTestField = getField("names");
-
- /**
- * The field on TestGroup which has the default package in it.
- */
- private static final Field defaultPackageField = getField("defaultPackage");
-
- private static Field getField(String name) {
- // Find the field, and complain if it is not where it's expected to be.
- try {
- Field field = TestFmwk.TestGroup.class.getDeclaredField(name);
- field.setAccessible(true); // It's private by default.
- return field;
- } catch (NoSuchFieldException nsfe) {
- throw new RuntimeException("Class structure of ICU tests have changed.", nsfe);
- }
- }
-
- // Instances of this class shouldn't be made.
- private IcuTestUtils() {}
-
- /**
- * Resolve the individual ICU tests from a base test class which must implement TestFmwk.
- * A TestGroup class in ICU has a private String[] containing all the class names which
- * are run when the TestGroup is run.
- *
- * @param parent the base class to start looking at.
- */
- public static Set<IcuTestWrapper> getBaseTests(Class<?> parent)
- throws InstantiationException, IllegalAccessException {
-
- Set<IcuTestWrapper> tests = new HashSet<>();
-
- // If the parent class is an instance of TestGroup, then it will have a String[] classes
- // field which tells us where we need to go looking for the base test classes. We can then
- // recursively call this method which will resolve the base classes from the classes we
- // have discovered in that field.
- if (TestFmwk.TestGroup.class.isAssignableFrom(parent)) {
- TestFmwk.TestGroup testGroup = (TestFmwk.TestGroup) parent.newInstance();
- String[] classNames = (String[]) classesToTestField.get(testGroup);
- String defaultPackage = (String) defaultPackageField.get(testGroup);
-
- for (String className : classNames) {
- // Handle relative class names.
- if (!className.contains(".")) {
- className = defaultPackage + className;
- }
- try {
- /* Get the children through a recursive call, and add to sets. */
- tests.addAll(getBaseTests(Class.forName(className)));
- } catch (ClassNotFoundException cnfe) {
- // We make sure to add any failures to find a test, in a way that will cause
- // that test to fail. This is to make sure that the user is properly
- // informed that the test was not run.
- tests.add(new FailTest(className, cnfe));
- }
- }
-
- } else if (TestFmwk.class.isAssignableFrom(parent)) {
- // Otherwise, if the parent class is instead an instance of TestFmwk instead, this
- // will be a base test. We can simply add parent to the set of classes and return.
- tests.add(new IcuTestAdapter(parent));
- }
-
- return tests;
- }
-
- /**
- * Resolve all the ICU tests and return a set of IcuTestWrappers which will run them.
- * See {@link IcuTestUtils#createTestWrappers(Iterable<String>)}.
- */
- public static Set<IcuTestWrapper> createTestAllWrappers() {
- return createTestWrappers(Collections.singleton("com.ibm.icu.dev.test.TestAll"));
- }
-
- /**
- * Resolves a set of tests in ICU from a list of class names. These class names should reference
- * classes under the classpath com.ibm.icu.dev.test.* and extend TestFmwk (the ICU base test
- * class). This will return a set of individual tests, any TestGroup's found will be recursively
- * processed to extract base classes out of them, and those tests wrapped for running.
- * @return A set of test wrappers which can be run to determine the test outcome.
- */
- public static Set<IcuTestWrapper> createTestWrappers(Iterable<String> classNames) {
- Set<IcuTestWrapper> wrappedSet = new HashSet<>();
-
- for (String className : classNames) {
- // Work around the limitation of CTS where a test method must be provided. We only
- // support running classes in ICU, so discard the mock test method.
- if (className.contains("#")) {
- className = className.substring(0, className.indexOf("#"));
- }
- try {
- wrappedSet.addAll(getBaseTests(Class.forName(className)));
- } catch (ClassNotFoundException cnfe) {
- /* Failure to resolve the base class */
- wrappedSet.add(new FailTest(className, cnfe));
- } catch (InstantiationException | IllegalAccessException e) {
- /* An error while finding the classes */
- wrappedSet.add(new FailTest(className,
- new RuntimeException("Error finding test classes: " + e)));
- }
- }
- return wrappedSet;
- }
-
-
- /**
- * A common interface for wrapping tests to be run with IcuTestRunner.
- */
- public interface IcuTestWrapper {
- /**
- * Returns true if there was an error fetching or resolving this test.
- * Otherwise, the test is ready to be run and this returns false.
- */
- boolean isError();
-
- /**
- * Returns the ICU class that this test will call through to.
- */
- String getTestClassName();
-
- /**
- * Execute the test and provide the return code.
- * 0 means that the test was successfully run.
- */
- int call(PrintWriter pw) throws Exception;
- }
-
- /**
- * Wrapper around failure to resolve a specified ICU test class.
- * This could be due to a class not being resolved, which was
- * specified in the ICU test suite, a user provided class which
- * could not be found, or an error in instantiating the class.
- */
- private static class FailTest implements IcuTestWrapper {
-
- public FailTest(String attemptedClassName, Exception error) {
- this.error = error;
- this.className = attemptedClassName;
- }
-
- private String className;
- private Exception error;
-
- public String getTestClassName() {
- return className;
- }
-
- public boolean isError() {
- return true;
- }
-
- public int call(PrintWriter unused) throws Exception {
- throw error;
- }
- }
-
- /**
- * Wrap an ICU test class and override the run method so we can handle executing the test and
- * extracting the return code, output stream, and any exceptions.
- */
- private static class IcuTestAdapter implements IcuTestWrapper {
-
- /**
- * Fully qualified name of the test class.
- */
- private final String name;
-
- /**
- * Class object from which the test will be instantiated and run.
- */
- private final Class<?> icuTestClass;
-
- public IcuTestAdapter(Class<?> testClass) {
- if (!TestFmwk.class.isAssignableFrom(testClass)) {
- throw new IllegalArgumentException("There was an error in the testing framework."
- + "A test class was found which is not an instance of TestFmwk: "
- + testClass);
- }
-
- this.name = testClass.getCanonicalName();
- this.icuTestClass = testClass;
- }
-
- @Override
- public boolean isError() {
- return false;
- }
-
- @Override
- public String getTestClassName() {
- return this.name;
- }
-
- @Override
- public int call(PrintWriter pw) {
- try {
- TestFmwk instance = (TestFmwk) icuTestClass.newInstance();
- return instance.run(new String[]{}, pw);
-
- } catch (IllegalAccessException | InstantiationException iae) {
- throw new RuntimeException("Failed to create test class: " + icuTestClass);
- }
- }
- }
-
-}
diff --git a/tests/tests/icu/src/android/icu/cts/junit/ErrorReportingRunner.java b/tests/tests/icu/src/android/icu/cts/junit/ErrorReportingRunner.java
new file mode 100644
index 0000000..cfa5962
--- /dev/null
+++ b/tests/tests/icu/src/android/icu/cts/junit/ErrorReportingRunner.java
@@ -0,0 +1,74 @@
+package android.icu.cts.junit;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collections;
+import java.util.List;
+import org.junit.runner.Description;
+import org.junit.runner.Runner;
+import org.junit.runner.notification.Failure;
+import org.junit.runner.notification.RunNotifier;
+import org.junit.runners.model.InitializationError;
+
+/**
+ * A copy of the JUnit 4.10 {@link org.junit.internal.runners.ErrorReportingRunner} class that
+ * allows the class in error to be specified by name rather than {@link Class} object so that it
+ * can be used for when the class could not be found.
+ */
+class ErrorReportingRunner extends Runner {
+
+ private final List<Throwable> fCauses;
+
+ private final String fTestClassName;
+
+ public ErrorReportingRunner(String testClassName, Throwable cause) {
+ fTestClassName = testClassName;
+ fCauses = getCauses(cause);
+ }
+
+ @Override
+ public Description getDescription() {
+ // Describe this as <class>#initializationError so that it can be filtered by
+ // expectations.
+ Description description = Description.createSuiteDescription(
+ String.format("%s(%s)", "initializationError", fTestClassName));
+ int count = fCauses.size();
+ for (int i = 0; i < count; i++) {
+ description.addChild(describeCause(i));
+ }
+ return description;
+ }
+
+ @Override
+ public void run(RunNotifier notifier) {
+ for (int i = 0; i < fCauses.size(); i++) {
+ Throwable each = fCauses.get(i);
+ runCause(each, i, notifier);
+ }
+ }
+
+ @SuppressWarnings("deprecation")
+ private List<Throwable> getCauses(Throwable cause) {
+ if (cause instanceof InvocationTargetException) {
+ return getCauses(cause.getCause());
+ }
+ if (cause instanceof InitializationError) {
+ return ((InitializationError) cause).getCauses();
+ }
+ if (cause instanceof org.junit.internal.runners.InitializationError) {
+ return ((org.junit.internal.runners.InitializationError) cause).getCauses();
+ }
+ return Collections.singletonList(cause);
+ }
+
+ private Description describeCause(int i) {
+ return Description.createSuiteDescription(
+ String.format("%s(%s)", "cause" + (i == 0 ? "" : "-" + i), fTestClassName));
+ }
+
+ private void runCause(Throwable child, int i, RunNotifier notifier) {
+ Description description = describeCause(i);
+ notifier.fireTestStarted(description);
+ notifier.fireTestFailure(new Failure(description, child));
+ notifier.fireTestFinished(description);
+ }
+}
diff --git a/tests/tests/icu/src/android/icu/cts/junit/ICUTestFailedException.java b/tests/tests/icu/src/android/icu/cts/junit/ICUTestFailedException.java
new file mode 100644
index 0000000..0e9f045
--- /dev/null
+++ b/tests/tests/icu/src/android/icu/cts/junit/ICUTestFailedException.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package android.icu.cts.junit;
+
+/**
+ * An exception used to tunnel extra failure information from a failing test to
+ * {@link android.icu.cts.IcuRunListener}
+ */
+public class ICUTestFailedException extends Exception {
+
+ /**
+ * The number of errors found within the test.
+ *
+ * <p>The ICU test framework differs from JUnit as an individual test can continue after an
+ * error is encountered, this field keeps track of the number of errors encountered.
+ */
+ private final int errorCount;
+
+ /**
+ * The output from the test itself.
+ */
+ private final String information;
+
+ public ICUTestFailedException(String message, int errorCount, String information) {
+ super(message);
+ this.errorCount = errorCount;
+ this.information = information;
+ }
+
+ public int getErrorCount() {
+ return errorCount;
+ }
+
+ public String getInformation() {
+ return information;
+ }
+}
diff --git a/tests/tests/icu/src/android/icu/cts/junit/IcuFrameworkTest.java b/tests/tests/icu/src/android/icu/cts/junit/IcuFrameworkTest.java
new file mode 100644
index 0000000..e0c18b2
--- /dev/null
+++ b/tests/tests/icu/src/android/icu/cts/junit/IcuFrameworkTest.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package android.icu.cts.junit;
+
+import com.ibm.icu.dev.test.TestFmwk;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import javax.annotation.Nullable;
+import org.junit.runner.Description;
+
+/**
+ * Represents a test within a {@link TestFmwk} class.
+ */
+class IcuFrameworkTest {
+
+ private static final String[] EMPTY_ARGS = new String[0];
+
+ private static final Pattern EXTRACT_ERROR_INFO = Pattern.compile(
+ "^[A-Za-z0-9_]+ \\{\n [A-Za-z0-9_]+ \\{\n (.*)\n \\}.*", Pattern.DOTALL);
+
+ private static final Pattern CONTAINS_WARNING = Pattern.compile(
+ "^ *Warning: ", Pattern.MULTILINE);
+
+ /**
+ * The {@link TestFmwk} instance on which the tests will be run.
+ */
+ private final TestFmwk testFmwk;
+
+ /**
+ * The name of the individual test to run, if null then all tests in the class will be run.
+ */
+ @Nullable
+ private final String methodName;
+
+ IcuFrameworkTest(TestFmwk testFmwk, @Nullable String methodName) {
+ this.testFmwk = testFmwk;
+ this.methodName = methodName;
+ }
+
+ @Nullable
+ public String getMethodName() {
+ return methodName;
+ }
+
+ /**
+ * Runs the target.
+ */
+ public void run() throws ICUTestFailedException {
+ test_for_TestFmwk_Run();
+ }
+
+ /**
+ * A special method to avoid the TestFmwk from throwing an InternalError when an error occurs
+ * during execution of the test but outside the actual test method, e.g. in a
+ * {@link TestFmwk#validate()} method. See http://bugs.icu-project.org/trac/ticket/12183
+ *
+ * <p>DO NOT CHANGE THE NAME
+ */
+ private void test_for_TestFmwk_Run() throws ICUTestFailedException {
+ String[] args;
+ if (methodName != null) {
+ args = new String[] {methodName};
+ } else {
+ args = EMPTY_ARGS;
+ }
+
+ StringWriter stringWriter = new StringWriter();
+ PrintWriter log = new PrintWriter(stringWriter);
+ int errorCount = testFmwk.run(args, log);
+
+ // Ensure that all data is written to the StringWriter.
+ log.flush();
+
+ // Treat warnings as errors.
+ String information = stringWriter.toString();
+ if (errorCount != 0 || CONTAINS_WARNING.matcher(information).find()) {
+ if (methodName != null) {
+ Matcher matcher = EXTRACT_ERROR_INFO.matcher(information);
+ if (matcher.matches()) {
+ information = matcher.group(1).replace("\n ", "\n");
+ }
+ }
+ throw new ICUTestFailedException("ICU test failed: " + getDescription(),
+ Math.min(1, errorCount), information);
+ }
+ }
+
+ /**
+ * Get the JUnit {@link Description}
+ */
+ public Description getDescription() {
+ if (methodName == null) {
+ // Get a description for all the targets. Use a fake method name to differentiate the
+ // description from one for the whole class and allow the tests to be matched by
+ // expectations.
+ return Description.createTestDescription(testFmwk.getClass(), "run-everything");
+ } else {
+ // Get a description for the specific method within the class.
+ return Description.createTestDescription(testFmwk.getClass(), methodName);
+ }
+ }
+}
diff --git a/tests/tests/icu/src/android/icu/cts/junit/IcuRunnerParams.java b/tests/tests/icu/src/android/icu/cts/junit/IcuRunnerParams.java
new file mode 100644
index 0000000..369b672
--- /dev/null
+++ b/tests/tests/icu/src/android/icu/cts/junit/IcuRunnerParams.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package android.icu.cts.junit;
+
+/**
+ * Encapsulates options passed to {@link IcuTestFmwkRunner}.
+ */
+public class IcuRunnerParams {
+
+ /**
+ * True if the tests should not actually be executed, false otherwise.
+ */
+ private final boolean skipExecution;
+
+ public static IcuRunnerParams getDefaultParams() {
+ return new IcuRunnerParams(false);
+ }
+
+ public IcuRunnerParams(boolean skipExecution) {
+ this.skipExecution = skipExecution;
+ }
+
+ public boolean getSkipExecution() {
+ return skipExecution;
+ }
+}
diff --git a/tests/tests/icu/src/android/icu/cts/junit/IcuTestFmwkRunner.java b/tests/tests/icu/src/android/icu/cts/junit/IcuTestFmwkRunner.java
new file mode 100644
index 0000000..9b33094
--- /dev/null
+++ b/tests/tests/icu/src/android/icu/cts/junit/IcuTestFmwkRunner.java
@@ -0,0 +1,145 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package android.icu.cts.junit;
+
+import com.ibm.icu.dev.test.TestFmwk;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import org.junit.runner.Description;
+import org.junit.runner.notification.RunNotifier;
+import org.junit.runners.model.Statement;
+
+/**
+ * A {@link org.junit.runner.Runner} that can be used to run a class that is a {@link TestFmwk}
+ * but not a {@link com.ibm.icu.dev.test.TestFmwk.TestGroup}
+ */
+public class IcuTestFmwkRunner extends IcuTestParentRunner<IcuFrameworkTest> {
+
+ /**
+ * A {@link Statement} that does nothing, used when skipping execution.
+ */
+ private static final Statement EMPTY_STATEMENT = new Statement() {
+ @Override
+ public void evaluate() throws Throwable {
+ }
+ };
+
+ private final IcuRunnerParams icuRunnerParams;
+
+ private final List<IcuFrameworkTest> tests;
+
+ /**
+ * The constructor used when this class is used with {@code @RunWith(...)}.
+ */
+ public IcuTestFmwkRunner(Class<?> testClass)
+ throws Exception {
+ this(checkClass(testClass), IcuRunnerParams.getDefaultParams());
+ }
+
+ /**
+ * Make sure that the supplied test class is supported by this.
+ */
+ private static Class<? extends TestFmwk> checkClass(Class<?> testClass) {
+ if (!TestFmwk.class.isAssignableFrom(testClass)) {
+ throw new IllegalStateException(
+ "Cannot use " + IcuTestFmwkRunner.class + " for running "
+ + testClass + " as it is not a " + TestFmwk.class);
+ }
+ if (TestFmwk.TestGroup.class.isAssignableFrom(testClass)) {
+ throw new IllegalStateException(
+ "Cannot use " + IcuTestFmwkRunner.class + " for running "
+ + testClass + " as it is a " + TestFmwk.TestGroup.class
+ + ": Use @RunWith(" + IcuTestGroupRunner.class.getSimpleName()
+ + ".class) instead");
+ }
+
+ return testClass.asSubclass(TestFmwk.class);
+ }
+
+ IcuTestFmwkRunner(Class<? extends TestFmwk> testFmwkClass, IcuRunnerParams icuRunnerParams)
+ throws Exception {
+ super(testFmwkClass);
+
+ this.icuRunnerParams = icuRunnerParams;
+
+ // Create a TestFmwk and make sure that it's initialized properly.
+ TestFmwk testFmwk = TestFmwkUtils.newTestFmwkInstance(testFmwkClass);
+
+ tests = new ArrayList<>();
+
+ if (TestFmwkUtils.overridesGetTargetsMethod(testFmwkClass)) {
+ // A test that overrides the getTargets method cannot be trusted to run a single target
+ // at once so treat the whole class as a single test.
+ tests.add(new IcuFrameworkTest(testFmwk, null));
+ } else {
+ TestFmwk.Target target = TestFmwkUtils.getTargets(testFmwk);
+ while (target != null) {
+ String name = target.name;
+ // Just ignore targets that do not have a name, they are do nothing place holders.
+ if (name != null) {
+ tests.add(new IcuFrameworkTest(testFmwk, name));
+ }
+
+ target = target.getNext();
+ }
+ }
+
+ // Sort the methods to ensure consistent ordering.
+ Collections.sort(tests, new Comparator<IcuFrameworkTest>() {
+ @Override
+ public int compare(IcuFrameworkTest ft1, IcuFrameworkTest ft2) {
+ String m1 = ft1.getMethodName();
+ String m2 = ft2.getMethodName();
+ if (m1 == null || m2 == null) {
+ // This should never happen as there will only be one entry in the list if it is
+ // not a method target.
+ throw new IllegalStateException("Cannot compare two non method targets");
+ }
+ return m1.compareTo(m2);
+ }
+ });
+ }
+
+ @Override
+ protected List<IcuFrameworkTest> getChildren() {
+ return tests;
+ }
+
+ @Override
+ protected Description describeChild(IcuFrameworkTest child) {
+ return child.getDescription();
+ }
+
+ @Override
+ protected void runChild(final IcuFrameworkTest child, RunNotifier notifier) {
+ Description description = describeChild(child);
+ Statement statement;
+ if (icuRunnerParams.getSkipExecution()) {
+ statement = EMPTY_STATEMENT;
+ } else {
+ statement = new Statement() {
+ @Override
+ public void evaluate() throws Throwable {
+ child.run();
+ }
+ };
+ }
+ runLeaf(statement, description, notifier);
+ }
+}
diff --git a/tests/tests/icu/src/android/icu/cts/junit/IcuTestGroupRunner.java b/tests/tests/icu/src/android/icu/cts/junit/IcuTestGroupRunner.java
new file mode 100644
index 0000000..695b47d
--- /dev/null
+++ b/tests/tests/icu/src/android/icu/cts/junit/IcuTestGroupRunner.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package android.icu.cts.junit;
+
+import com.ibm.icu.dev.test.TestFmwk;
+import java.util.ArrayList;
+import java.util.List;
+import org.junit.runner.Description;
+import org.junit.runner.Runner;
+import org.junit.runner.notification.RunNotifier;
+import org.junit.runners.model.RunnerBuilder;
+
+/**
+ * A {@link org.junit.runner.Runner} that can be used to run a class that is a
+ * {@link TestFmwk.TestGroup} but not a {@link TestFmwk}
+ */
+public class IcuTestGroupRunner extends IcuTestParentRunner<Runner> {
+
+ private final List<Runner> runners;
+
+ /**
+ * The constructor used when this class is used with {@code @RunWith(...)}.
+ */
+ public IcuTestGroupRunner(Class<?> testClass, RunnerBuilder runnerBuilder)
+ throws Exception {
+ super(testClass);
+
+ Class<? extends TestFmwk.TestGroup> testGroupClass = checkClass(testClass);
+
+ // Create a TestGroup and make sure that it's initialized properly.
+ TestFmwk.TestGroup testGroup = TestFmwkUtils.newTestFmwkInstance(testGroupClass);
+
+ runners = new ArrayList<>();
+ List<String> classNames = TestFmwkUtils.getClassNames(testGroup);
+ ClassLoader classLoader = testGroupClass.getClassLoader();
+ for (String className : classNames) {
+ Runner runner;
+
+ try {
+ Class<?> childTestClass = Class.forName(className, false, classLoader);
+ runner = runnerBuilder.safeRunnerForClass(childTestClass);
+ } catch (ClassNotFoundException e) {
+ runner = new ErrorReportingRunner(className, e);
+ }
+
+ runners.add(runner);
+ }
+ }
+
+ /**
+ * Make sure that the supplied test class is supported by this.
+ */
+ private static Class<? extends TestFmwk.TestGroup> checkClass(Class<?> testClass) {
+ if (!TestFmwk.TestGroup.class.isAssignableFrom(testClass)) {
+ if (TestFmwk.class.isAssignableFrom(testClass)) {
+ throw new IllegalStateException(
+ "Cannot use " + IcuTestGroupRunner.class + " for running "
+ + testClass + " as it is a " + TestFmwk.class
+ + ": Use @RunWith(" + IcuTestFmwkRunner.class.getSimpleName()
+ + ".class) instead");
+ }
+ throw new IllegalStateException(
+ "Cannot use " + IcuTestGroupRunner.class + " for running "
+ + testClass + " as it is not a " + TestFmwk.TestGroup.class);
+ }
+
+ return testClass.asSubclass(TestFmwk.TestGroup.class);
+ }
+
+ @Override
+ protected List<Runner> getChildren() {
+ return runners;
+ }
+
+ @Override
+ protected Description describeChild(Runner child) {
+ return child.getDescription();
+ }
+
+ @Override
+ protected void runChild(Runner child, RunNotifier notifier) {
+ child.run(notifier);
+ }
+}
diff --git a/tests/tests/icu/src/android/icu/cts/junit/IcuTestParentRunner.java b/tests/tests/icu/src/android/icu/cts/junit/IcuTestParentRunner.java
new file mode 100644
index 0000000..28f511c
--- /dev/null
+++ b/tests/tests/icu/src/android/icu/cts/junit/IcuTestParentRunner.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package android.icu.cts.junit;
+
+import org.junit.runners.ParentRunner;
+import org.junit.runners.model.InitializationError;
+
+/**
+ * Extends {@link ParentRunner} to prevent it from trying to create an instance of
+ * {@link org.junit.runners.model.TestClass} for the supplied {@code testClass} because that
+ * requires that the {@code testClass} has only a single constructor and at least one ICU test
+ * ({@code com.ibm.icu.dev.test.serializable.CoverageTest}) has more than one constructor.
+ *
+ * <p>This provides a dummy class and overrides the {@link #getName()} method to return the
+ * correct name. The consequence of this is that it is not possible to use JUnit 4 annotations
+ * related to the class, like {@link org.junit.BeforeClass}, {@link org.junit.ClassRule}, etc.
+ */
+abstract class IcuTestParentRunner<T> extends ParentRunner<T> {
+
+ private final Class<?> testClass;
+
+ IcuTestParentRunner(Class<?> testClass) throws InitializationError {
+ super(DummyTestClass.class);
+ this.testClass = testClass;
+ }
+
+ @Override
+ protected String getName() {
+ return testClass.getName();
+ }
+
+ /**
+ * A dummy test class to pass to {@link ParentRunner} for it to validate and check for
+ * annotations.
+ *
+ * <p>Must be public.
+ */
+ public static class DummyTestClass {
+
+ }
+}
diff --git a/tests/tests/icu/src/android/icu/cts/junit/IcuTestRunnerBuilder.java b/tests/tests/icu/src/android/icu/cts/junit/IcuTestRunnerBuilder.java
new file mode 100644
index 0000000..d04ed23
--- /dev/null
+++ b/tests/tests/icu/src/android/icu/cts/junit/IcuTestRunnerBuilder.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package android.icu.cts.junit;
+
+import com.ibm.icu.dev.test.TestFmwk;
+import org.junit.runner.Runner;
+import org.junit.runners.model.RunnerBuilder;
+
+/**
+ * A {@link RunnerBuilder} used for running ICU test classes derived from {@link TestFmwk}.
+ */
+public class IcuTestRunnerBuilder extends RunnerBuilder {
+
+ private final IcuRunnerParams icuRunnerParams;
+
+ public IcuTestRunnerBuilder(IcuRunnerParams icuRunnerParams) {
+ this.icuRunnerParams = icuRunnerParams;
+ }
+
+ @Override
+ public Runner runnerForClass(Class<?> testClass) throws Throwable {
+ // Check for a TestGroup before a TestFmwk class as TestGroup is a subclass of TestFmwk
+ if (TestFmwk.TestGroup.class.isAssignableFrom(testClass)) {
+ return new IcuTestGroupRunner(testClass.asSubclass(TestFmwk.TestGroup.class), this);
+ }
+
+ if (TestFmwk.class.isAssignableFrom(testClass)) {
+ return new IcuTestFmwkRunner(testClass.asSubclass(TestFmwk.class), icuRunnerParams);
+ }
+
+ return null;
+ }
+}
diff --git a/tests/tests/icu/src/android/icu/cts/junit/TestFmwkUtils.java b/tests/tests/icu/src/android/icu/cts/junit/TestFmwkUtils.java
new file mode 100644
index 0000000..f3c1a8b
--- /dev/null
+++ b/tests/tests/icu/src/android/icu/cts/junit/TestFmwkUtils.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package android.icu.cts.junit;
+
+import com.ibm.icu.dev.test.TestFmwk;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Abstracts away reflection code that accesses various hidden fields and methods in the ICU test
+ * framework.
+ *
+ * <p>Assuming that this is integrated into ICU test framework itself then ideally the test
+ * framework will itself be modified to remove the need for this reflection at which point this
+ * class can be removed.
+ */
+class TestFmwkUtils {
+
+ /**
+ * The field on TestGroup which has the list of classes in it.
+ */
+ private static final Field classesToTestField = getField(TestFmwk.TestGroup.class, "names");
+
+ /**
+ * The field on TestGroup which has the default package in it.
+ */
+ private static final Field defaultPackageField =
+ getField(TestFmwk.TestGroup.class, "defaultPackage");
+
+ /**
+ * The field on TestFmwk which has the {@link com.ibm.icu.dev.test.TestFmwk.TestParams} in it.
+ */
+ private static final Field paramsField = getField(TestFmwk.class, "params");
+
+ private static final Method getTargetsMethod = getTargetsMethod();
+
+ private static Field getField(Class<?> theClass, String name) {
+ // Find the field, and complain if it is not where it's expected to be.
+ try {
+ Field field = theClass.getDeclaredField(name);
+ field.setAccessible(true); // It's private by default.
+ return field;
+ } catch (NoSuchFieldException e) {
+ throw new RuntimeException("Class structure of ICU tests have changed.", e);
+ }
+ }
+
+ private static Method getTargetsMethod() {
+ try {
+ Method method = TestFmwk.class.getDeclaredMethod("getTargets", String.class);
+ method.setAccessible(true);
+ return method;
+ } catch (NoSuchMethodException e) {
+ throw new RuntimeException("Class structure of ICU tests have changed.", e);
+ }
+ }
+
+ public static TestFmwk.Target getTargets(TestFmwk testFmwk) {
+ return test_for_TestFmwk_GetTargets(testFmwk);
+ }
+
+ /**
+ * A special method to avoid the TestFmwk from throwing an InternalError when an error occurs
+ * during execution of the test but outside the actual test method, e.g. in a
+ * {@link TestFmwk#validate()} method. See http://bugs.icu-project.org/trac/ticket/12183
+ *
+ * <p>DO NOT CHANGE THE NAME
+ */
+ private static TestFmwk.Target test_for_TestFmwk_GetTargets(TestFmwk testFmwk) {
+ try {
+ return (TestFmwk.Target) getTargetsMethod.invoke(testFmwk, new Object[] {null});
+ } catch (InvocationTargetException | IllegalAccessException e) {
+ throw new IllegalStateException(
+ "Problem calling getTargets(null) on " + testFmwk, e);
+ }
+ }
+
+ public static <T extends TestFmwk> T newTestFmwkInstance(Class<? extends T> testFmwkClass)
+ throws IllegalAccessException, InstantiationException {
+ // Create a TestFmwk and make sure that it's params field is initialized.
+ T testFmwk = testFmwkClass.newInstance();
+ TestFmwk.TestParams testParams = TestFmwk.TestParams.create(new String[0], null);
+ paramsField.set(testFmwk, testParams);
+ return testFmwk;
+ }
+
+ private static boolean hasGetTargetsMethod(Class<?> clazz) {
+ try {
+ clazz.getDeclaredMethod("getTargets", String.class);
+ return true;
+ } catch (NoSuchMethodException e) {
+ return false;
+ }
+ }
+
+ public static boolean overridesGetTargetsMethod(Class<?> testFmwkClass) {
+ while (testFmwkClass != TestFmwk.class && testFmwkClass != Object.class) {
+ if (hasGetTargetsMethod(testFmwkClass)) {
+ return true;
+ }
+
+ testFmwkClass = testFmwkClass.getSuperclass();
+ }
+
+ return false;
+ }
+
+ public static List<String> getClassNames(TestFmwk.TestGroup testGroup) {
+ try {
+ String[] classNames = (String[]) classesToTestField.get(testGroup);
+ String defaultPackage = (String) defaultPackageField.get(testGroup);
+
+ List<String> list = new ArrayList<>(classNames.length);
+ for (String basicName : classNames) {
+ // Handle relative class names.
+ String fullyQualifiedName;
+ if (basicName.contains(".")) {
+ fullyQualifiedName = basicName;
+ } else {
+ fullyQualifiedName = defaultPackage + basicName;
+ }
+
+ list.add(fullyQualifiedName);
+ }
+
+ // Sort to ensure consistent ordering.
+ Collections.sort(list);
+
+ return list;
+ } catch (IllegalAccessException e) {
+ throw new IllegalStateException("Problem getting class names from " + testGroup, e);
+ }
+ }
+}
diff --git a/tests/tests/icu/src/android/icu/cts/junit/package-info.java b/tests/tests/icu/src/android/icu/cts/junit/package-info.java
new file mode 100644
index 0000000..f85be7c
--- /dev/null
+++ b/tests/tests/icu/src/android/icu/cts/junit/package-info.java
@@ -0,0 +1,10 @@
+/**
+ * Contains classes used to make ICU tests runnable by JUnit.
+ *
+ * <p>Ideally, this will be integrated into ICU itself and cleaned up so that ICU tests can be
+ * simply run using standard JUnit. e.g. ICU test classes will be annotated with
+ * {@code RunWith(IcuTestGroupRunner.class)} or {@code RunWith(IcuTestFmwkRunner.class)} depending
+ * on whether they extend {@link com.ibm.icu.dev.test.TestFmwk.TestGroup} or
+ * {@link com.ibm.icu.dev.test.TestFmwk}.
+ */
+package android.icu.cts.junit;
diff --git a/tests/tests/icu/test-list.txt b/tests/tests/icu/test-list.txt
new file mode 100644
index 0000000..163f780
--- /dev/null
+++ b/tests/tests/icu/test-list.txt
@@ -0,0 +1,2240 @@
+com.ibm.icu.dev.test.bidi.BiDiConformanceTest#TestBidiCharacterTest
+com.ibm.icu.dev.test.bidi.BiDiConformanceTest#TestBidiTest
+com.ibm.icu.dev.test.bidi.TestBidi#testBidi
+com.ibm.icu.dev.test.bidi.TestCharFromDirProp#testCharFromDirProp
+com.ibm.icu.dev.test.bidi.TestClassOverride#testClassOverride
+com.ibm.icu.dev.test.bidi.TestContext#testContext
+com.ibm.icu.dev.test.bidi.TestFailureRecovery#testFailureRecovery
+com.ibm.icu.dev.test.bidi.TestInverse#testInverse
+com.ibm.icu.dev.test.bidi.TestMultipleParagraphs#testMultipleParagraphs
+com.ibm.icu.dev.test.bidi.TestReorderArabicMathSymbols#testReorderArabicMathSymbols
+com.ibm.icu.dev.test.bidi.TestReorderingMode#testReorderingMode
+com.ibm.icu.dev.test.bidi.TestReorderRunsOnly#testReorderRunsOnly
+com.ibm.icu.dev.test.bidi.TestReorder#testReorder
+com.ibm.icu.dev.test.bidi.TestStreaming#testStreaming
+com.ibm.icu.dev.test.bigdec.DiagBigDecimal#TestBigDecimal
+com.ibm.icu.dev.test.calendar.AstroTest#TestBasics
+com.ibm.icu.dev.test.calendar.AstroTest#TestCoordinates
+com.ibm.icu.dev.test.calendar.AstroTest#TestCoverage
+com.ibm.icu.dev.test.calendar.AstroTest#TestLunarPosition
+com.ibm.icu.dev.test.calendar.AstroTest#TestMoonAge
+com.ibm.icu.dev.test.calendar.AstroTest#TestSolarLongitude
+com.ibm.icu.dev.test.calendar.AstroTest#TestSunriseTimes
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4031502
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4035301
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4040996
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4051765
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4059654
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4061476
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4070502
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4071197
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4071385
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4073929
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4083167
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4086724
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4092362
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4095407
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4096231
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4096539
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4100311
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4103271
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4106136
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4108764
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4114578
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4118384
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4125881
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4125892
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4136399
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4141665
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4142933
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4145158
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4145983
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4147269
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4149677
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4162587
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4165343
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4166109
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4167060
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4173516
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4174361
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4177484
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4197699
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4209071
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test4288792
+com.ibm.icu.dev.test.calendar.CalendarRegression#Test9019
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestCalendarType6816
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestDateFormatFactoryJ26
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestGetKeywordValuesForLocale
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestJ438
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestJ9
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestRegistration
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestSerialization3474
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestT5555
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestT8057
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestT8596
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestT9403
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestT9452
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestT9968
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestTimeStamp
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestWeekendData_10560
+com.ibm.icu.dev.test.calendar.CalendarRegression#TestYearJump3279
+com.ibm.icu.dev.test.calendar.ChineseTest#Test6510
+com.ibm.icu.dev.test.calendar.ChineseTest#TestAdd
+com.ibm.icu.dev.test.calendar.ChineseTest#TestFormat
+com.ibm.icu.dev.test.calendar.ChineseTest#TestJulianDayMapping
+com.ibm.icu.dev.test.calendar.ChineseTest#TestLimits
+com.ibm.icu.dev.test.calendar.ChineseTest#TestMapping
+com.ibm.icu.dev.test.calendar.ChineseTest#TestOutOfRange
+com.ibm.icu.dev.test.calendar.ChineseTest#TestResolution
+com.ibm.icu.dev.test.calendar.ChineseTest#TestRoll
+com.ibm.icu.dev.test.calendar.ChineseTest#TestScratch
+com.ibm.icu.dev.test.calendar.ChineseTest#TestZeroDOM
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestActualMinMax
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestAdd520
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestAddAcrossOffsetTransitions
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestAddSetGet0610
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestAddSetOrder621
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestClonesUnique908
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestComputeJulianDay4406
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestDisambiguation765
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestDOW943
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestDOWProgression
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestEpochStartFields
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestFields060
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestFieldSet4781
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestGenericAPI
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestGMTvsLocal4064654
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestGregorianChange768
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestGregorianChangeover
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestMapping
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestRog
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestRoll
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestSecondsZero121
+com.ibm.icu.dev.test.calendar.CompatibilityTest#TestSerialize337
+com.ibm.icu.dev.test.calendar.CopticTest#Test6379
+com.ibm.icu.dev.test.calendar.CopticTest#TestAddSet
+com.ibm.icu.dev.test.calendar.CopticTest#TestBasic
+com.ibm.icu.dev.test.calendar.CopticTest#TestCases
+com.ibm.icu.dev.test.calendar.CopticTest#TestCopticToJD
+com.ibm.icu.dev.test.calendar.CopticTest#TestCoverage
+com.ibm.icu.dev.test.calendar.CopticTest#TestEraStart
+com.ibm.icu.dev.test.calendar.CopticTest#TestLimits
+com.ibm.icu.dev.test.calendar.CopticTest#TestYear
+com.ibm.icu.dev.test.calendar.DataDrivenCalendarTest#run-everything
+com.ibm.icu.dev.test.calendar.EthiopicTest#TestAddSet
+com.ibm.icu.dev.test.calendar.EthiopicTest#TestBasic
+com.ibm.icu.dev.test.calendar.EthiopicTest#TestCases
+com.ibm.icu.dev.test.calendar.EthiopicTest#TestCoverage
+com.ibm.icu.dev.test.calendar.EthiopicTest#TestEraStart
+com.ibm.icu.dev.test.calendar.EthiopicTest#TestJD
+com.ibm.icu.dev.test.calendar.EthiopicTest#TestLimits
+com.ibm.icu.dev.test.calendar.HebrewTest#Test1624
+com.ibm.icu.dev.test.calendar.HebrewTest#TestAdd
+com.ibm.icu.dev.test.calendar.HebrewTest#TestCases
+com.ibm.icu.dev.test.calendar.HebrewTest#TestCoverage
+com.ibm.icu.dev.test.calendar.HebrewTest#TestDefaultFieldValues
+com.ibm.icu.dev.test.calendar.HebrewTest#TestElulMonth
+com.ibm.icu.dev.test.calendar.HebrewTest#TestLimits
+com.ibm.icu.dev.test.calendar.HebrewTest#TestMonthMovement
+com.ibm.icu.dev.test.calendar.HebrewTest#TestMonthValidation
+com.ibm.icu.dev.test.calendar.HebrewTest#TestRoll
+com.ibm.icu.dev.test.calendar.HebrewTest#TestTimeFields
+com.ibm.icu.dev.test.calendar.HolidayTest#TestAPI
+com.ibm.icu.dev.test.calendar.HolidayTest#TestCoverage
+com.ibm.icu.dev.test.calendar.HolidayTest#TestDisplayName
+com.ibm.icu.dev.test.calendar.HolidayTest#TestEaster
+com.ibm.icu.dev.test.calendar.HolidayTest#TestIsOn
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestAddAcrossZoneTransition
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestAmbiguousWallTimeAPIs
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestBuddhist
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestBuddhistCoverage
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestBuddhistLimits
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestComparable
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestCoverage
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestFieldDifference
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestGregorianLimits
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestISO8601
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestJapanese
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestJB1684
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestJB4541
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestLeapFieldDifference
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestMalaysianInstance
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestRepeatedWallTime
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestSkippedWallTime
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestTaiwan
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestTaiwanCoverage
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestTaiwanLimits
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestThaiDefault
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestTimeZoneTransitionAdd
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestTypes
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestWeekData
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestWeekend
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestWeekShift
+com.ibm.icu.dev.test.calendar.IBMCalendarTest#TestZoneMeta
+com.ibm.icu.dev.test.calendar.IndianTest#TestBasic
+com.ibm.icu.dev.test.calendar.IndianTest#TestCases
+com.ibm.icu.dev.test.calendar.IndianTest#TestCoverage
+com.ibm.icu.dev.test.calendar.IndianTest#TestLimits
+com.ibm.icu.dev.test.calendar.IndianTest#TestYear
+com.ibm.icu.dev.test.calendar.IndianTest#TestYearEdge
+com.ibm.icu.dev.test.calendar.IslamicTest#Test7427
+com.ibm.icu.dev.test.calendar.IslamicTest#Test8822
+com.ibm.icu.dev.test.calendar.IslamicTest#TestBasic
+com.ibm.icu.dev.test.calendar.IslamicTest#TestCivilCases
+com.ibm.icu.dev.test.calendar.IslamicTest#TestCoverage
+com.ibm.icu.dev.test.calendar.IslamicTest#TestCreationByLocale
+com.ibm.icu.dev.test.calendar.IslamicTest#TestIslamicTabularDates
+com.ibm.icu.dev.test.calendar.IslamicTest#TestIslamicUmAlQura
+com.ibm.icu.dev.test.calendar.IslamicTest#TestLimits
+com.ibm.icu.dev.test.calendar.IslamicTest#TestRoll
+com.ibm.icu.dev.test.calendar.IslamicTest#TestSerialization8449
+com.ibm.icu.dev.test.calendar.JapaneseTest#Test3860
+com.ibm.icu.dev.test.calendar.JapaneseTest#Test5345calendar
+com.ibm.icu.dev.test.calendar.JapaneseTest#Test5345parse
+com.ibm.icu.dev.test.calendar.JapaneseTest#TestCoverage
+com.ibm.icu.dev.test.calendar.JapaneseTest#TestJapaneseYear3282
+com.ibm.icu.dev.test.calendar.JapaneseTest#TestLimits
+com.ibm.icu.dev.test.calendar.PersianTest#TestMapping
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestArabic
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestBufferOverflow
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestBug6889
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestBug6954
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestBug9267
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestC1Bytes
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestCharsetRecog_UTF_16_LE_Match
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestConstruction
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestDetection
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestFreshDetectorEachTime
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestHebrew
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestInputFilter
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestJapanese
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestMultithreaded
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestReusingDetector
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestShortInput
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestUTF16
+com.ibm.icu.dev.test.charsetdet.TestCharsetDetector#TestUTF8
+com.ibm.icu.dev.test.charset.TestCharset#Test88591Converter
+com.ibm.icu.dev.test.charset.TestCharset#TestAllNames
+com.ibm.icu.dev.test.charset.TestCharset#TestAmbiguousConverter
+com.ibm.icu.dev.test.charset.TestCharset#TestAPISemantics
+com.ibm.icu.dev.test.charset.TestCharset#TestASCIIConverter
+com.ibm.icu.dev.test.charset.TestCharset#TestAvailableCharsets
+com.ibm.icu.dev.test.charset.TestCharset#TestBOCU1Converter
+com.ibm.icu.dev.test.charset.TestCharset#TestBufferOverflowErrorUsingJavagetBytes
+com.ibm.icu.dev.test.charset.TestCharset#TestBytesLengthForString
+com.ibm.icu.dev.test.charset.TestCharset#TestCanConvert
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetASCII
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetASCII8859BufferHandling
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetASCIIOverFlow
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetCallbacks
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetContains
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetICUCodeCoverage
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetICUNullCharsetName
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetIMAP
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetISCII
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetISO2022JP
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetISO2022KR
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetLMBCS
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetTestData
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetUTF16
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetUTF16LE
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetUTF32
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetUTF32LE
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetUTF7
+com.ibm.icu.dev.test.charset.TestCharset#TestCharsetUTF8
+com.ibm.icu.dev.test.charset.TestCharset#TestDecodeMalformed
+com.ibm.icu.dev.test.charset.TestCharset#TestDecoderImplFlush
+com.ibm.icu.dev.test.charset.TestCharset#TestDecodeUTF32LEBE
+com.ibm.icu.dev.test.charset.TestCharset#TestDefaultIgnorableCallback
+com.ibm.icu.dev.test.charset.TestCharset#TestEncoderCreation
+com.ibm.icu.dev.test.charset.TestCharset#TestEncoderImplFlush
+com.ibm.icu.dev.test.charset.TestCharset#TestGetAllNames
+com.ibm.icu.dev.test.charset.TestCharset#TestGetICUJavaCanonicalNames
+com.ibm.icu.dev.test.charset.TestCharset#TestHZ
+com.ibm.icu.dev.test.charset.TestCharset#TestICUAvailableCharsets
+com.ibm.icu.dev.test.charset.TestCharset#TestICUCanonicalNameConsistency
+com.ibm.icu.dev.test.charset.TestCharset#TestInvalidInput
+com.ibm.icu.dev.test.charset.TestCharset#TestIsFixedWidth
+com.ibm.icu.dev.test.charset.TestCharset#TestISO88591
+com.ibm.icu.dev.test.charset.TestCharset#TestJavaUTF16Decoder
+com.ibm.icu.dev.test.charset.TestCharset#TestJB4897
+com.ibm.icu.dev.test.charset.TestCharset#TestJB5027
+com.ibm.icu.dev.test.charset.TestCharset#TestMBCS
+com.ibm.icu.dev.test.charset.TestCharset#TestNullCanonicalName
+com.ibm.icu.dev.test.charset.TestCharset#TestSCSUConverter
+com.ibm.icu.dev.test.charset.TestCharset#TestSubBytes
+com.ibm.icu.dev.test.charset.TestCharset#TestSurrogateBehavior
+com.ibm.icu.dev.test.charset.TestCharset#TestUnsupportedCharset
+com.ibm.icu.dev.test.charset.TestCharset#TestUTF16Bom
+com.ibm.icu.dev.test.charset.TestCharset#TestUTF16Converter
+com.ibm.icu.dev.test.charset.TestCharset#TestUTF32BOM
+com.ibm.icu.dev.test.charset.TestCharset#TestUTF32Converter
+com.ibm.icu.dev.test.charset.TestCharset#TestUTF8
+com.ibm.icu.dev.test.charset.TestCharset#TestUTF8Converter
+com.ibm.icu.dev.test.charset.TestCharset#TestUTF8Encode
+com.ibm.icu.dev.test.charset.TestCharset#TestUTF8Surrogates
+com.ibm.icu.dev.test.charset.TestCharset#TestWindows936
+com.ibm.icu.dev.test.charset.TestConversion#run-everything
+com.ibm.icu.dev.test.charset.TestSelection#TestCharsetSelectorCodeCoverage
+com.ibm.icu.dev.test.charset.TestSelection#TestConversionUTF16
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestA
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestBasics
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestBuckets
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestChineseUnihan
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestChineseZhuyin
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestClientSupport
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestEmpty
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestFirstCharacters
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestFirstScriptCharacters
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestFrozenCollator
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestHaniFirst
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestIndexCharactersList
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestInflow
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestJapaneseKanji
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestNoLabels
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestPinyinFirst
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestSchSt
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestSimplified
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestTraditional
+com.ibm.icu.dev.test.collator.AlphabeticIndexTest#TestZZZ
+com.ibm.icu.dev.test.collator.CollationAPITest#TestBadKeywords
+com.ibm.icu.dev.test.collator.CollationAPITest#TestBounds
+com.ibm.icu.dev.test.collator.CollationAPITest#TestClone
+com.ibm.icu.dev.test.collator.CollationAPITest#TestCollationKey
+com.ibm.icu.dev.test.collator.CollationAPITest#TestCompare
+com.ibm.icu.dev.test.collator.CollationAPITest#TestCreateCollator
+com.ibm.icu.dev.test.collator.CollationAPITest#TestDecomposition
+com.ibm.icu.dev.test.collator.CollationAPITest#TestDuplicate
+com.ibm.icu.dev.test.collator.CollationAPITest#TestElemIter
+com.ibm.icu.dev.test.collator.CollationAPITest#TestGetAll
+com.ibm.icu.dev.test.collator.CollationAPITest#TestGetContractions
+com.ibm.icu.dev.test.collator.CollationAPITest#TestGetKeywordValues
+com.ibm.icu.dev.test.collator.CollationAPITest#TestGetLocale
+com.ibm.icu.dev.test.collator.CollationAPITest#TestGetTailoredSet
+com.ibm.icu.dev.test.collator.CollationAPITest#TestHashCode
+com.ibm.icu.dev.test.collator.CollationAPITest#TestIterNumeric
+com.ibm.icu.dev.test.collator.CollationAPITest#TestJunkCollator
+com.ibm.icu.dev.test.collator.CollationAPITest#TestMaxVariable
+com.ibm.icu.dev.test.collator.CollationAPITest#TestProperty
+com.ibm.icu.dev.test.collator.CollationAPITest#TestRawCollationKey
+com.ibm.icu.dev.test.collator.CollationAPITest#TestRuleBasedColl
+com.ibm.icu.dev.test.collator.CollationAPITest#TestRules
+com.ibm.icu.dev.test.collator.CollationAPITest#TestSafeClone
+com.ibm.icu.dev.test.collator.CollationAPITest#TestSetDecomposition
+com.ibm.icu.dev.test.collator.CollationAPITest#TestSetGet
+com.ibm.icu.dev.test.collator.CollationAPITest#TestSetStrength
+com.ibm.icu.dev.test.collator.CollationAPITest#TestSubClass
+com.ibm.icu.dev.test.collator.CollationAPITest#TestVariableTopSetting
+com.ibm.icu.dev.test.collator.CollationChineseTest#TestPinYin
+com.ibm.icu.dev.test.collator.CollationCreationMethodTest#TestRuleVsLocaleCreationMonkey
+com.ibm.icu.dev.test.collator.CollationCurrencyTest#TestCurrency
+com.ibm.icu.dev.test.collator.CollationDummyTest#TestExtra
+com.ibm.icu.dev.test.collator.CollationDummyTest#TestIdentical
+com.ibm.icu.dev.test.collator.CollationDummyTest#TestJB1401
+com.ibm.icu.dev.test.collator.CollationDummyTest#TestJB581
+com.ibm.icu.dev.test.collator.CollationDummyTest#TestPrimary
+com.ibm.icu.dev.test.collator.CollationDummyTest#TestSecondary
+com.ibm.icu.dev.test.collator.CollationDummyTest#TestSurrogates
+com.ibm.icu.dev.test.collator.CollationDummyTest#TestTertiary
+com.ibm.icu.dev.test.collator.CollationDummyTest#TestVariableTop
+com.ibm.icu.dev.test.collator.CollationEnglishTest#TestPrimary
+com.ibm.icu.dev.test.collator.CollationEnglishTest#TestSecondary
+com.ibm.icu.dev.test.collator.CollationEnglishTest#TestTertiary
+com.ibm.icu.dev.test.collator.CollationFinnishTest#TestPrimary
+com.ibm.icu.dev.test.collator.CollationFinnishTest#TestTertiary
+com.ibm.icu.dev.test.collator.CollationFrenchTest#TestContinuationReordering
+com.ibm.icu.dev.test.collator.CollationFrenchTest#TestExtra
+com.ibm.icu.dev.test.collator.CollationFrenchTest#TestSecondary
+com.ibm.icu.dev.test.collator.CollationFrenchTest#TestTertiary
+com.ibm.icu.dev.test.collator.CollationGermanTest#TestPrimary
+com.ibm.icu.dev.test.collator.CollationGermanTest#TestSecondary
+com.ibm.icu.dev.test.collator.CollationGermanTest#TestTertiary
+com.ibm.icu.dev.test.collator.CollationIteratorTest#TestClearBuffers
+com.ibm.icu.dev.test.collator.CollationIteratorTest#TestDiscontiguous
+com.ibm.icu.dev.test.collator.CollationIteratorTest#TestMaxExpansion
+com.ibm.icu.dev.test.collator.CollationIteratorTest#TestNormalization
+com.ibm.icu.dev.test.collator.CollationIteratorTest#TestNormalizedUnicodeChar
+com.ibm.icu.dev.test.collator.CollationIteratorTest#TestOffset
+com.ibm.icu.dev.test.collator.CollationIteratorTest#TestPrevious
+com.ibm.icu.dev.test.collator.CollationIteratorTest#TestSearchCollatorElements
+com.ibm.icu.dev.test.collator.CollationIteratorTest#TestSetText
+com.ibm.icu.dev.test.collator.CollationIteratorTest#TestUnicodeChar
+com.ibm.icu.dev.test.collator.CollationKanaTest#TestBase
+com.ibm.icu.dev.test.collator.CollationKanaTest#TestChooonKigoo
+com.ibm.icu.dev.test.collator.CollationKanaTest#TestCommonCharacters
+com.ibm.icu.dev.test.collator.CollationKanaTest#TestKatakanaHiragana
+com.ibm.icu.dev.test.collator.CollationKanaTest#TestPlainDakutenHandakuten
+com.ibm.icu.dev.test.collator.CollationKanaTest#TestSmallLarge
+com.ibm.icu.dev.test.collator.CollationKanaTest#TestTertiary
+com.ibm.icu.dev.test.collator.CollationMiscTest#Test3249
+com.ibm.icu.dev.test.collator.CollationMiscTest#Test6179
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestBefore
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestBeforePinyin
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestBeforePrefixFailure
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestBeforeRuleWithScriptReordering
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestBlackBird
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestBocsuCoverage
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestCase
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestChMove
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestCollationKeyEquals
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestCollationKeyHashCode
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestComposeDecompose
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestContraction
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestContractionClosure
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestContractionEndCompare
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestCyrillicTailoring
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestEmptyRule
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestEquivalentReorderingScripts
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestExpansion
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestExtremeCompression
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestFCDProblem
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestFrozeness
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestFunkyA
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestGetBound
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestGreekFirstReorder
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestGreekFirstReorderCloning
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestGreekLastReorder
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestHangulTailoring
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestHaniReorder
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestHaniReorderWithOtherRules
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestHungarianTailoring
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestIdenticalCompare
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestImplicitTailoring
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestImport
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestImportWithType
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestIncompleteCnt
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestIncrementalNormalize
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestInvalidListsAndRanges
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestJ3087
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestJ3347
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestJ4960
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestJ5367
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestJ815
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestJB5298
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestLocaleRuleBasedCollators
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestMaxVariable
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestMerge
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestMergeSortKeys
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestMultipleReorder
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestNewJapanese
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestNonChars
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestNonLeadBytesDuringCollationReordering
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestNonScriptReorder
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestNumericCollation
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestOptimize
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestPinyinProblem
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestPrefix
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestPrefixCompose
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestQuoteAndSpace
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestRawCollationKeyCompareTo
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestReorderingAPI
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestReorderingAPIWithRuleCreatedCollator
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestRuleOptions
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestSameStrengthList
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestSameStrengthListQuoted
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestSameStrengthListQwerty
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestSameStrengthListRanges
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestSameStrengthListRangesWithSupplementalCharacters
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestSameStrengthListWithSupplementalCharacters
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestShifted
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestSpecialCharacters
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestStrCollIdenticalPrefix
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestSuppressContractions
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestSurrogates
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestTibetanConformance
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestUCAPrecontext
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestUCARules
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestUnknownCollationKeyword
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestUpperFirstQuaternary
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestVariableTop
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestVariableTopSetting
+com.ibm.icu.dev.test.collator.CollationMiscTest#TestVI5913
+com.ibm.icu.dev.test.collator.CollationMonkeyTest#TestCollationKey
+com.ibm.icu.dev.test.collator.CollationMonkeyTest#TestCompare
+com.ibm.icu.dev.test.collator.CollationMonkeyTest#TestRules
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4048446
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4051866
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4053636
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4054238
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4054734
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4054736
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4058613
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4059820
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4060154
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4062418
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4065540
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4066189
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4066696
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4076676
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4078588
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4079231
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4081866
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4087241
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4087243
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4092260
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4095316
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4101940
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4103436
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4114076
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4114077
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4124632
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4132736
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4133509
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4139572
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4141640
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4171974
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4179216
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4179686
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4216006
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4244884
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test4663220
+com.ibm.icu.dev.test.collator.CollationRegressionTest#Test8484
+com.ibm.icu.dev.test.collator.CollationRegressionTest#TestBeforeWithTooStrongAfter
+com.ibm.icu.dev.test.collator.CollationRegressionTest#TestBengaliSortKey
+com.ibm.icu.dev.test.collator.CollationRegressionTest#TestCaseFirstCompression
+com.ibm.icu.dev.test.collator.CollationRegressionTest#TestTrailingComment
+com.ibm.icu.dev.test.collator.CollationServiceTest#TestGetFunctionalEquivalent
+com.ibm.icu.dev.test.collator.CollationServiceTest#TestGetKeywordValues
+com.ibm.icu.dev.test.collator.CollationServiceTest#TestRegister
+com.ibm.icu.dev.test.collator.CollationServiceTest#TestRegisterFactory
+com.ibm.icu.dev.test.collator.CollationServiceTest#TestSeparateTrees
+com.ibm.icu.dev.test.collator.CollationSpanishTest#TestPrimary
+com.ibm.icu.dev.test.collator.CollationSpanishTest#TestTertiary
+com.ibm.icu.dev.test.collator.CollationTest#TestCollationWeights
+com.ibm.icu.dev.test.collator.CollationTest#TestDataDriven
+com.ibm.icu.dev.test.collator.CollationTest#TestFCD
+com.ibm.icu.dev.test.collator.CollationTest#TestImplicits
+com.ibm.icu.dev.test.collator.CollationTest#TestMinMax
+com.ibm.icu.dev.test.collator.CollationTest#TestRootElements
+com.ibm.icu.dev.test.collator.CollationTest#TestShortFCDData
+com.ibm.icu.dev.test.collator.CollationTest#TestSubSequence
+com.ibm.icu.dev.test.collator.CollationTest#TestTailoredElements
+com.ibm.icu.dev.test.collator.CollationThaiTest#TestCornerCases
+com.ibm.icu.dev.test.collator.CollationThaiTest#TestDictionary
+com.ibm.icu.dev.test.collator.CollationThaiTest#TestInvalidThai
+com.ibm.icu.dev.test.collator.CollationThaiTest#TestReordering
+com.ibm.icu.dev.test.collator.CollationThreadTest#testFrozen
+com.ibm.icu.dev.test.collator.CollationThreadTest#testThreads
+com.ibm.icu.dev.test.collator.CollationTurkishTest#TestPrimary
+com.ibm.icu.dev.test.collator.CollationTurkishTest#TestTertiary
+com.ibm.icu.dev.test.collator.G7CollationTest#TestDemo1
+com.ibm.icu.dev.test.collator.G7CollationTest#TestDemo2
+com.ibm.icu.dev.test.collator.G7CollationTest#TestDemo3
+com.ibm.icu.dev.test.collator.G7CollationTest#TestDemo4
+com.ibm.icu.dev.test.collator.G7CollationTest#TestG7Data
+com.ibm.icu.dev.test.collator.LotusCollationKoreanTest#TestTertiary
+com.ibm.icu.dev.test.collator.UCAConformanceTest#TestRulesNonIgnorable
+com.ibm.icu.dev.test.collator.UCAConformanceTest#TestRulesShifted
+com.ibm.icu.dev.test.collator.UCAConformanceTest#TestTableNonIgnorable
+com.ibm.icu.dev.test.collator.UCAConformanceTest#TestTableShifted
+com.ibm.icu.dev.test.compression.DecompressionTest#TestDecompress
+com.ibm.icu.dev.test.compression.DecompressionTest#TestDecompression
+com.ibm.icu.dev.test.compression.ExhaustiveTest#testIterative
+com.ibm.icu.dev.test.compression.ExhaustiveTest#testMultipass
+com.ibm.icu.dev.test.compression.ExhaustiveTest#testSimple
+com.ibm.icu.dev.test.duration.DataReadWriteTest#testBool
+com.ibm.icu.dev.test.duration.DataReadWriteTest#testBoolArray
+com.ibm.icu.dev.test.duration.DataReadWriteTest#testCharacter
+com.ibm.icu.dev.test.duration.DataReadWriteTest#testCharacterArray
+com.ibm.icu.dev.test.duration.DataReadWriteTest#testNamedIndex
+com.ibm.icu.dev.test.duration.DataReadWriteTest#testNamedIndexArray
+com.ibm.icu.dev.test.duration.DataReadWriteTest#testOmittedFields
+com.ibm.icu.dev.test.duration.DataReadWriteTest#testOpenClose
+com.ibm.icu.dev.test.duration.DataReadWriteTest#testString
+com.ibm.icu.dev.test.duration.DataReadWriteTest#testStringArray
+com.ibm.icu.dev.test.duration.DataReadWriteTest#testStringTable
+com.ibm.icu.dev.test.duration.ICUDurationTest#TestBadLocaleError
+com.ibm.icu.dev.test.duration.ICUDurationTest#TestBadObjectError
+com.ibm.icu.dev.test.duration.ICUDurationTest#TestDurationFormat
+com.ibm.icu.dev.test.duration.ICUDurationTest#TestFromNowTo
+com.ibm.icu.dev.test.duration.ICUDurationTest#TestResourceWithCalendar
+com.ibm.icu.dev.test.duration.ICUDurationTest#TestSimpleXMLDuration
+com.ibm.icu.dev.test.duration.ICUDurationTest#TestXMLDuration
+com.ibm.icu.dev.test.duration.languages.Test_en#testCustomMinutes
+com.ibm.icu.dev.test.duration.languages.Test_en#testFractionalUnits
+com.ibm.icu.dev.test.duration.languages.Test_en#testFullPluralizedForms
+com.ibm.icu.dev.test.duration.languages.Test_en#testHalfUnits
+com.ibm.icu.dev.test.duration.languages.Test_en#testLimitedUnits
+com.ibm.icu.dev.test.duration.languages.Test_en#testMediumForms
+com.ibm.icu.dev.test.duration.languages.Test_en#testMultipleUnits
+com.ibm.icu.dev.test.duration.languages.Test_en#testShortForms
+com.ibm.icu.dev.test.duration.languages.Test_es#testCustomMinutes
+com.ibm.icu.dev.test.duration.languages.Test_es#testFractionalUnits
+com.ibm.icu.dev.test.duration.languages.Test_es#testFullPluralizedForms
+com.ibm.icu.dev.test.duration.languages.Test_es#testHalfUnits
+com.ibm.icu.dev.test.duration.languages.Test_es#testLimitedUnits
+com.ibm.icu.dev.test.duration.languages.Test_es#testMediumForms
+com.ibm.icu.dev.test.duration.languages.Test_es#testMultipleUnits
+com.ibm.icu.dev.test.duration.languages.Test_es#testShortForms
+com.ibm.icu.dev.test.duration.languages.Test_fr#testCustomMinutes
+com.ibm.icu.dev.test.duration.languages.Test_fr#testFractionalUnits
+com.ibm.icu.dev.test.duration.languages.Test_fr#testFullPluralizedForms
+com.ibm.icu.dev.test.duration.languages.Test_fr#testHalfUnits
+com.ibm.icu.dev.test.duration.languages.Test_fr#testLimitedUnits
+com.ibm.icu.dev.test.duration.languages.Test_fr#testMediumForms
+com.ibm.icu.dev.test.duration.languages.Test_fr#testMultipleUnits
+com.ibm.icu.dev.test.duration.languages.Test_fr#testShortForms
+com.ibm.icu.dev.test.duration.languages.Test_he_IL#testCustomMinutes
+com.ibm.icu.dev.test.duration.languages.Test_he_IL#testFractionalUnits
+com.ibm.icu.dev.test.duration.languages.Test_he_IL#testFullPluralizedForms
+com.ibm.icu.dev.test.duration.languages.Test_he_IL#testHalfUnits
+com.ibm.icu.dev.test.duration.languages.Test_he_IL#testLimitedUnits
+com.ibm.icu.dev.test.duration.languages.Test_he_IL#testMediumForms
+com.ibm.icu.dev.test.duration.languages.Test_he_IL#testMultipleUnits
+com.ibm.icu.dev.test.duration.languages.Test_he_IL#testShortForms
+com.ibm.icu.dev.test.duration.languages.Test_hi#testCustomMinutes
+com.ibm.icu.dev.test.duration.languages.Test_hi#testFractionalUnits
+com.ibm.icu.dev.test.duration.languages.Test_hi#testFullPluralizedForms
+com.ibm.icu.dev.test.duration.languages.Test_hi#testHalfUnits
+com.ibm.icu.dev.test.duration.languages.Test_hi#testLimitedUnits
+com.ibm.icu.dev.test.duration.languages.Test_hi#testMediumForms
+com.ibm.icu.dev.test.duration.languages.Test_hi#testMonthNames
+com.ibm.icu.dev.test.duration.languages.Test_hi#testMultipleUnits
+com.ibm.icu.dev.test.duration.languages.Test_hi#testShortForms
+com.ibm.icu.dev.test.duration.languages.Test_it#testCustomMinutes
+com.ibm.icu.dev.test.duration.languages.Test_it#testFractionalUnits
+com.ibm.icu.dev.test.duration.languages.Test_it#testFullPluralizedForms
+com.ibm.icu.dev.test.duration.languages.Test_it#testHalfUnits
+com.ibm.icu.dev.test.duration.languages.Test_it#testLimitedUnits
+com.ibm.icu.dev.test.duration.languages.Test_it#testMediumForms
+com.ibm.icu.dev.test.duration.languages.Test_it#testMultipleUnits
+com.ibm.icu.dev.test.duration.languages.Test_it#testShortForms
+com.ibm.icu.dev.test.duration.languages.Test_ja#testCustomMinutes
+com.ibm.icu.dev.test.duration.languages.Test_ja#testFractionalUnits
+com.ibm.icu.dev.test.duration.languages.Test_ja#testFullPluralizedForms
+com.ibm.icu.dev.test.duration.languages.Test_ja#testHalfUnits
+com.ibm.icu.dev.test.duration.languages.Test_ja#testLimitedUnits
+com.ibm.icu.dev.test.duration.languages.Test_ja#testMediumForms
+com.ibm.icu.dev.test.duration.languages.Test_ja#testMultipleUnits
+com.ibm.icu.dev.test.duration.languages.Test_ja#testNoMillis
+com.ibm.icu.dev.test.duration.languages.Test_ja#testOmitZeros
+com.ibm.icu.dev.test.duration.languages.Test_ja#testShortForms
+com.ibm.icu.dev.test.duration.languages.Test_ko#testCustomMinutes
+com.ibm.icu.dev.test.duration.languages.Test_ko#testFractionalUnits
+com.ibm.icu.dev.test.duration.languages.Test_ko#testFullPluralizedForms
+com.ibm.icu.dev.test.duration.languages.Test_ko#testHalfUnits
+com.ibm.icu.dev.test.duration.languages.Test_ko#testLimitedUnits
+com.ibm.icu.dev.test.duration.languages.Test_ko#testMediumForms
+com.ibm.icu.dev.test.duration.languages.Test_ko#testMultipleUnits
+com.ibm.icu.dev.test.duration.languages.Test_ko#testShortForms
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans_SG#testCustomMinutes
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans_SG#testFractionalUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans_SG#testFullPluralizedForms
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans_SG#testHalfUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans_SG#testLimitedUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans_SG#testMediumForms
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans_SG#testMultipleUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans_SG#testShortForms
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans#testCustomMinutes
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans#testFractionalUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans#testFullPluralizedForms
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans#testHalfUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans#testLimitedUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans#testMediumForms
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans#testMultipleUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hans#testShortForms
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant_HK#testCustomMinutes
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant_HK#testFractionalUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant_HK#testFullPluralizedForms
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant_HK#testHalfUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant_HK#testLimitedUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant_HK#testMediumForms
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant_HK#testMultipleUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant_HK#testShortForms
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant#testCustomMinutes
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant#testFractionalUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant#testFullPluralizedForms
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant#testHalfUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant#testLimitedUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant#testMediumForms
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant#testMultipleUnits
+com.ibm.icu.dev.test.duration.languages.Test_zh_Hant#testShortForms
+com.ibm.icu.dev.test.duration.PeriodBuilderFactoryTest#testBuilderFactoryPeriodConstruction
+com.ibm.icu.dev.test.duration.PeriodBuilderFactoryTest#testSetAvailableUnitRange
+com.ibm.icu.dev.test.duration.PeriodBuilderFactoryTest#testSetUnitIsAvailable
+com.ibm.icu.dev.test.duration.PeriodTest#testAnd
+com.ibm.icu.dev.test.duration.PeriodTest#testFuturePast
+com.ibm.icu.dev.test.duration.PeriodTest#testInvalidCount
+com.ibm.icu.dev.test.duration.PeriodTest#testIsSet
+com.ibm.icu.dev.test.duration.PeriodTest#testMoreLessThan
+com.ibm.icu.dev.test.duration.ResourceBasedPeriodFormatterDataServiceTest#testAvailable
+com.ibm.icu.dev.test.format.BigNumberFormatTest#Test4161100
+com.ibm.icu.dev.test.format.BigNumberFormatTest#TestAlphaBigDecimal
+com.ibm.icu.dev.test.format.BigNumberFormatTest#TestBigDecimalJ28
+com.ibm.icu.dev.test.format.BigNumberFormatTest#TestBigDecimalRounding
+com.ibm.icu.dev.test.format.BigNumberFormatTest#TestExponent
+com.ibm.icu.dev.test.format.BigNumberFormatTest#TestPad
+com.ibm.icu.dev.test.format.BigNumberFormatTest#TestPatterns
+com.ibm.icu.dev.test.format.BigNumberFormatTest#TestScientific
+com.ibm.icu.dev.test.format.BigNumberFormatTest#TestSecondaryGrouping
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestACoreCompactFormat
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestArabicLongStyle
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestCharacterIterator
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestCsShort
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestDefaultSignificantDigits
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestEnglishShort
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestEquals
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestFieldPosition
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestJapaneseShort
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestSerbianLong
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestSerbianLongNegative
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestSerbianShort
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestSkLong
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestSwahiliShort
+com.ibm.icu.dev.test.format.CompactDecimalFormatTest#TestSwahiliShortNegative
+com.ibm.icu.dev.test.format.DateFormatMiscTests#Test4097450
+com.ibm.icu.dev.test.format.DateFormatMiscTests#Test4099975new
+com.ibm.icu.dev.test.format.DateFormatMiscTests#Test4117335
+com.ibm.icu.dev.test.format.DateFormatRegressionTestJ#Test4103926
+com.ibm.icu.dev.test.format.DateFormatRegressionTestJ#Test4148168
+com.ibm.icu.dev.test.format.DateFormatRegressionTestJ#Test4213086
+com.ibm.icu.dev.test.format.DateFormatRegressionTestJ#Test4250359
+com.ibm.icu.dev.test.format.DateFormatRegressionTestJ#Test4253490
+com.ibm.icu.dev.test.format.DateFormatRegressionTestJ#Test4266432
+com.ibm.icu.dev.test.format.DateFormatRegressionTestJ#Test4358730
+com.ibm.icu.dev.test.format.DateFormatRegressionTestJ#Test4375399
+com.ibm.icu.dev.test.format.DateFormatRegressionTestJ#Test4468663
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4029195
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4052408
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4056591
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4059917
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4060212
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4061287
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4065240
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4071441
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4089106
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4100302
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4101483
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4103340
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4103341
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4104136
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4104522
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4106807
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4108407
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4134203
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4151631
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4162071
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test4210209
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test5006GetShortMonths
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test714
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#TestDangiFormat
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#Test_GEec
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#TestHindiArabicDigits
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#TestParsing
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#TestT10110
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#TestT10239
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#TestT10334
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#TestT10619
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#TestT10906
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#TestT11363
+com.ibm.icu.dev.test.format.DateFormatRegressionTest#TestT5683
+com.ibm.icu.dev.test.format.DateFormatRoundTripTest#TestDateFormatRoundTrip
+com.ibm.icu.dev.test.format.DateFormatTest#Test10632
+com.ibm.icu.dev.test.format.DateFormatTest#Test6880
+com.ibm.icu.dev.test.format.DateFormatTest#TestBadInput135a
+com.ibm.icu.dev.test.format.DateFormatTest#TestCalendarType
+com.ibm.icu.dev.test.format.DateFormatTest#TestChineseDateFormatLocalizedPatternChars
+com.ibm.icu.dev.test.format.DateFormatTest#TestChineseDateFormatSymbols
+com.ibm.icu.dev.test.format.DateFormatTest#TestContext
+com.ibm.icu.dev.test.format.DateFormatTest#TestCoverage
+com.ibm.icu.dev.test.format.DateFormatTest#TestCzechMonths459
+com.ibm.icu.dev.test.format.DateFormatTest#TestDateFormatCalendar
+com.ibm.icu.dev.test.format.DateFormatTest#TestDateFormatLeniency
+com.ibm.icu.dev.test.format.DateFormatTest#TestDateFormatNone
+com.ibm.icu.dev.test.format.DateFormatTest#TestDateFormatZone061
+com.ibm.icu.dev.test.format.DateFormatTest#TestDateFormatZone146
+com.ibm.icu.dev.test.format.DateFormatTest#TestDayOfYearPattern195
+com.ibm.icu.dev.test.format.DateFormatTest#TestEquals
+com.ibm.icu.dev.test.format.DateFormatTest#TestEras
+com.ibm.icu.dev.test.format.DateFormatTest#TestErrorChecking
+com.ibm.icu.dev.test.format.DateFormatTest#TestExactCountFormat
+com.ibm.icu.dev.test.format.DateFormatTest#TestFieldPosition
+com.ibm.icu.dev.test.format.DateFormatTest#TestFormalChineseDate
+com.ibm.icu.dev.test.format.DateFormatTest#TestFormattingLocaleTimeSeparator
+com.ibm.icu.dev.test.format.DateFormatTest#TestFormatToCharacterIterator
+com.ibm.icu.dev.test.format.DateFormatTest#TestFormatToCharacterIteratorCoverage
+com.ibm.icu.dev.test.format.DateFormatTest#TestGeneral
+com.ibm.icu.dev.test.format.DateFormatTest#TestGenericTimeZoneOrder
+com.ibm.icu.dev.test.format.DateFormatTest#TestGetPatternInstance
+com.ibm.icu.dev.test.format.DateFormatTest#TestGMTParsing
+com.ibm.icu.dev.test.format.DateFormatTest#TestGreekMay
+com.ibm.icu.dev.test.format.DateFormatTest#TestInvalidPattern
+com.ibm.icu.dev.test.format.DateFormatTest#TestISOEra
+com.ibm.icu.dev.test.format.DateFormatTest#TestLetterDPattern212
+com.ibm.icu.dev.test.format.DateFormatTest#TestLocaleDateFormat
+com.ibm.icu.dev.test.format.DateFormatTest#TestLongContiguousNumericPattern
+com.ibm.icu.dev.test.format.DateFormatTest#TestLongNumericPattern
+com.ibm.icu.dev.test.format.DateFormatTest#TestMonthPatterns
+com.ibm.icu.dev.test.format.DateFormatTest#TestNarrowNames
+com.ibm.icu.dev.test.format.DateFormatTest#TestNonGregoFmtParse
+com.ibm.icu.dev.test.format.DateFormatTest#TestOfCalendarField
+com.ibm.icu.dev.test.format.DateFormatTest#TestOverrideNumberForamt
+com.ibm.icu.dev.test.format.DateFormatTest#TestParseLeniencyAPIs
+com.ibm.icu.dev.test.format.DateFormatTest#TestParseMultiPatternMatch
+com.ibm.icu.dev.test.format.DateFormatTest#TestParsePosition
+com.ibm.icu.dev.test.format.DateFormatTest#TestPatterns
+com.ibm.icu.dev.test.format.DateFormatTest#TestQuotePattern161
+com.ibm.icu.dev.test.format.DateFormatTest#TestRelativeDateFormat
+com.ibm.icu.dev.test.format.DateFormatTest#TestRoundtripWithCalendar
+com.ibm.icu.dev.test.format.DateFormatTest#TestRunTogetherPattern917
+com.ibm.icu.dev.test.format.DateFormatTest#TestRunTogetherPattern985
+com.ibm.icu.dev.test.format.DateFormatTest#TestShortDays
+com.ibm.icu.dev.test.format.DateFormatTest#TestSimpleDateFormatConstructor_String_String_ULocale
+com.ibm.icu.dev.test.format.DateFormatTest#TestStandAloneDays
+com.ibm.icu.dev.test.format.DateFormatTest#TestStandAloneMonths
+com.ibm.icu.dev.test.format.DateFormatTest#TestTimeZoneDisplayName
+com.ibm.icu.dev.test.format.DateFormatTest#TestTwoDigitWOY
+com.ibm.icu.dev.test.format.DateFormatTest#TestTwoDigitYearDSTParse
+com.ibm.icu.dev.test.format.DateFormatTest#TestWallyWedel
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestClone
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestCloseAsThawed
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestConstructor
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestDateIntervalCoverage
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestDateIntervalInfoEquals
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestFormat
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestFormatCLDR
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestFormatUserDII
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestFPos_SkelWithSeconds
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestGetIntervalPattern
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestGetSetTimeZone
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestHashCode
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestIsFrozen
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestPattternInfoEquals
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestSetFallbackIntervalPattern
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestSetIntervalPattern
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestSetIntervalPatternNoSideEffect
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestStress
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestT6396
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestTicket11583
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestTicket9914
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestTicket9919GetInstance
+com.ibm.icu.dev.test.format.DateIntervalFormatTest#TestTicket9919Setter
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestAllFieldPatterns
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestBasic
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestCheckFrozen
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestClone
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestEmpty
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestFreezeAndCloneAsThawed
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestGetAppendItemFormat
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestGetAppendItemName
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestGetBaseSkeleton
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestGetBaseSkeletons
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestGetDecimal
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestGetFields
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestGetInstance
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestGetRedundants
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestGetSkeleton
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestGetSkeletons
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestHasDateAndTimeFields
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestIsSingleField
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestJavaLocale
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestOptions
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestOrdering
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestPatternParser
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestReplacingZoneString
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestRoot
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestSet
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestSimple
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestT7169
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestToString
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestVariableCharacters
+com.ibm.icu.dev.test.format.DateTimeGeneratorTest#TestVariableField_String
+com.ibm.icu.dev.test.format.GlobalizationPreferencesTest#TestBreakIterator
+com.ibm.icu.dev.test.format.GlobalizationPreferencesTest#TestCalendar
+com.ibm.icu.dev.test.format.GlobalizationPreferencesTest#TestCollator
+com.ibm.icu.dev.test.format.GlobalizationPreferencesTest#TestCurrency
+com.ibm.icu.dev.test.format.GlobalizationPreferencesTest#TestDateFormat
+com.ibm.icu.dev.test.format.GlobalizationPreferencesTest#TestDefault
+com.ibm.icu.dev.test.format.GlobalizationPreferencesTest#TestDisplayName
+com.ibm.icu.dev.test.format.GlobalizationPreferencesTest#TestFreezable
+com.ibm.icu.dev.test.format.GlobalizationPreferencesTest#TestJB5380
+com.ibm.icu.dev.test.format.GlobalizationPreferencesTest#TestNumberFormat
+com.ibm.icu.dev.test.format.GlobalizationPreferencesTest#TestResourceBundle
+com.ibm.icu.dev.test.format.GlobalizationPreferencesTest#TestSetLocales
+com.ibm.icu.dev.test.format.GlobalizationPreferencesTest#TestTerritory
+com.ibm.icu.dev.test.format.GlobalizationPreferencesTest#TestTimeZone
+com.ibm.icu.dev.test.format.IntlTestDateFormatAPIC#TestNameHiding
+com.ibm.icu.dev.test.format.IntlTestDateFormatAPI#TestAPI
+com.ibm.icu.dev.test.format.IntlTestDateFormatAPI#TestEquals
+com.ibm.icu.dev.test.format.IntlTestDateFormatSymbols#TestConstructorWithCalendar
+com.ibm.icu.dev.test.format.IntlTestDateFormatSymbols#TestGetEraNames
+com.ibm.icu.dev.test.format.IntlTestDateFormatSymbols#TestGetMonths
+com.ibm.icu.dev.test.format.IntlTestDateFormatSymbols#TestGetMonths2
+com.ibm.icu.dev.test.format.IntlTestDateFormatSymbols#TestGetWeekdays2
+com.ibm.icu.dev.test.format.IntlTestDateFormatSymbols#TestSymbols
+com.ibm.icu.dev.test.format.IntlTestDateFormat#TestAvailableLocales
+com.ibm.icu.dev.test.format.IntlTestDateFormat#TestFormat
+com.ibm.icu.dev.test.format.IntlTestDateFormat#TestRoundtrip
+com.ibm.icu.dev.test.format.IntlTestDateFormat#TestULocale
+com.ibm.icu.dev.test.format.IntlTestDecimalFormatAPIC#TestAPI
+com.ibm.icu.dev.test.format.IntlTestDecimalFormatAPIC#testFormatToCharacterIterator
+com.ibm.icu.dev.test.format.IntlTestDecimalFormatAPIC#TestRounding
+com.ibm.icu.dev.test.format.IntlTestDecimalFormatAPI#TestAPI
+com.ibm.icu.dev.test.format.IntlTestDecimalFormatAPI#testJB1871
+com.ibm.icu.dev.test.format.IntlTestDecimalFormatAPI#testJB4971
+com.ibm.icu.dev.test.format.IntlTestDecimalFormatAPI#testJB6134
+com.ibm.icu.dev.test.format.IntlTestDecimalFormatAPI#testJB6354
+com.ibm.icu.dev.test.format.IntlTestDecimalFormatAPI#testJB6648
+com.ibm.icu.dev.test.format.IntlTestDecimalFormatSymbolsC#TestSymbols
+com.ibm.icu.dev.test.format.IntlTestDecimalFormatSymbols#testCoverage
+com.ibm.icu.dev.test.format.IntlTestDecimalFormatSymbols#TestSymbols
+com.ibm.icu.dev.test.format.IntlTestNumberFormatAPI#TestAPI
+com.ibm.icu.dev.test.format.IntlTestNumberFormatAPI#TestCoverage
+com.ibm.icu.dev.test.format.IntlTestNumberFormat#TestAvailableLocales
+com.ibm.icu.dev.test.format.IntlTestNumberFormat#TestLocale
+com.ibm.icu.dev.test.format.IntlTestNumberFormat#TestMonster
+com.ibm.icu.dev.test.format.IntlTestSimpleDateFormatAPI#TestAPI
+com.ibm.icu.dev.test.format.IntlTestSimpleDateFormatAPI#TestCoverage
+com.ibm.icu.dev.test.format.ListFormatterTest#Test9946
+com.ibm.icu.dev.test.format.ListFormatterTest#TestBasic
+com.ibm.icu.dev.test.format.ListFormatterTest#TestCreatePatternForNumItems
+com.ibm.icu.dev.test.format.ListFormatterTest#TestEnglish
+com.ibm.icu.dev.test.format.ListFormatterTest#TestFromList
+com.ibm.icu.dev.test.format.ListFormatterTest#TestGetLocale
+com.ibm.icu.dev.test.format.ListFormatterTest#TestGetPatternForNumItemsException
+com.ibm.icu.dev.test.format.ListFormatterTest#TestJapanese
+com.ibm.icu.dev.test.format.ListFormatterTest#TestPatternOutOfOrder
+com.ibm.icu.dev.test.format.ListFormatterTest#TestSpecial
+com.ibm.icu.dev.test.format.MeasureUnitTest#Test10219FractionalPlurals
+com.ibm.icu.dev.test.format.MeasureUnitTest#testAUnit
+com.ibm.icu.dev.test.format.MeasureUnitTest#TestCompatible53_1
+com.ibm.icu.dev.test.format.MeasureUnitTest#TestCompatible54_1
+com.ibm.icu.dev.test.format.MeasureUnitTest#TestCompatible55_1
+com.ibm.icu.dev.test.format.MeasureUnitTest#TestCompatible56_1
+com.ibm.icu.dev.test.format.MeasureUnitTest#testCurrencies
+com.ibm.icu.dev.test.format.MeasureUnitTest#testCurrencyFormatLocale
+com.ibm.icu.dev.test.format.MeasureUnitTest#testCurrencyFormatStandInForMeasureFormat
+com.ibm.icu.dev.test.format.MeasureUnitTest#testDoubleZero
+com.ibm.icu.dev.test.format.MeasureUnitTest#testEqHashCode
+com.ibm.icu.dev.test.format.MeasureUnitTest#testEqHashCodeOfMeasure
+com.ibm.icu.dev.test.format.MeasureUnitTest#TestExamplesInDocs
+com.ibm.icu.dev.test.format.MeasureUnitTest#testFieldPosition
+com.ibm.icu.dev.test.format.MeasureUnitTest#testFieldPositionMultiple
+com.ibm.icu.dev.test.format.MeasureUnitTest#testFormatMeasuresOneArg
+com.ibm.icu.dev.test.format.MeasureUnitTest#testFormatMeasuresZeroArg
+com.ibm.icu.dev.test.format.MeasureUnitTest#TestFormatPeriodEn
+com.ibm.icu.dev.test.format.MeasureUnitTest#testFormatSingleArg
+com.ibm.icu.dev.test.format.MeasureUnitTest#testGetLocale
+com.ibm.icu.dev.test.format.MeasureUnitTest#testGram
+com.ibm.icu.dev.test.format.MeasureUnitTest#TestGreek
+com.ibm.icu.dev.test.format.MeasureUnitTest#testIndividualPluralFallback
+com.ibm.icu.dev.test.format.MeasureUnitTest#testMultiples
+com.ibm.icu.dev.test.format.MeasureUnitTest#testNumeratorPlurals
+com.ibm.icu.dev.test.format.MeasureUnitTest#testOldFormatBadArg
+com.ibm.icu.dev.test.format.MeasureUnitTest#testOldFormatWithArray
+com.ibm.icu.dev.test.format.MeasureUnitTest#testOldFormatWithList
+com.ibm.icu.dev.test.format.MeasureUnitTest#TestSerial
+com.ibm.icu.dev.test.format.MeasureUnitTest#TestSerialFormatWidthEnum
+com.ibm.icu.dev.test.format.MeasureUnitTest#testSimplePer
+com.ibm.icu.dev.test.format.MeasureUnitTest#testUnitPerUnitResolution
+com.ibm.icu.dev.test.format.MessagePatternUtilTest#TestChoiceArg
+com.ibm.icu.dev.test.format.MessagePatternUtilTest#TestComplexArgs
+com.ibm.icu.dev.test.format.MessagePatternUtilTest#TestHello
+com.ibm.icu.dev.test.format.MessagePatternUtilTest#TestHelloWithApos
+com.ibm.icu.dev.test.format.MessagePatternUtilTest#TestHelloWithQuote
+com.ibm.icu.dev.test.format.MessagePatternUtilTest#TestNoneArg
+com.ibm.icu.dev.test.format.MessagePatternUtilTest#TestPluralArg
+com.ibm.icu.dev.test.format.MessagePatternUtilTest#TestPluralVariantsByType
+com.ibm.icu.dev.test.format.MessagePatternUtilTest#TestSelectArg
+com.ibm.icu.dev.test.format.MessagePatternUtilTest#TestSelectOrdinalArg
+com.ibm.icu.dev.test.format.MessagePatternUtilTest#TestSelectVariantsByType
+com.ibm.icu.dev.test.format.MessagePatternUtilTest#TestSimpleArg
+com.ibm.icu.dev.test.format.MessageRegression#Test4031438
+com.ibm.icu.dev.test.format.MessageRegression#Test4052223
+com.ibm.icu.dev.test.format.MessageRegression#Test4074764
+com.ibm.icu.dev.test.format.MessageRegression#Test4094906
+com.ibm.icu.dev.test.format.MessageRegression#Test4104976
+com.ibm.icu.dev.test.format.MessageRegression#Test4105380
+com.ibm.icu.dev.test.format.MessageRegression#Test4106659
+com.ibm.icu.dev.test.format.MessageRegression#Test4106660
+com.ibm.icu.dev.test.format.MessageRegression#Test4106661
+com.ibm.icu.dev.test.format.MessageRegression#Test4111739
+com.ibm.icu.dev.test.format.MessageRegression#Test4112104
+com.ibm.icu.dev.test.format.MessageRegression#Test4113018
+com.ibm.icu.dev.test.format.MessageRegression#Test4114739
+com.ibm.icu.dev.test.format.MessageRegression#Test4114743
+com.ibm.icu.dev.test.format.MessageRegression#Test4116444
+com.ibm.icu.dev.test.format.MessageRegression#Test4118592
+com.ibm.icu.dev.test.format.MessageRegression#Test4118594
+com.ibm.icu.dev.test.format.MessageRegression#Test4120552
+com.ibm.icu.dev.test.format.MessageRegression#Test4142938
+com.ibm.icu.dev.test.format.MessageRegression#Test4169959
+com.ibm.icu.dev.test.format.MessageRegression#test4232154
+com.ibm.icu.dev.test.format.MessageRegression#test4293229
+com.ibm.icu.dev.test.format.MessageRegression#testBugTestsWithNamesArguments
+com.ibm.icu.dev.test.format.MessageRegression#TestChoicePatternQuote
+com.ibm.icu.dev.test.format.MessageRegression#TestSerialization
+com.ibm.icu.dev.test.format.NumberFormatRegistrationTest#TestRegistration
+com.ibm.icu.dev.test.format.NumberFormatRegressionTest#Test4161100
+com.ibm.icu.dev.test.format.NumberFormatRegressionTest#Test4408066
+com.ibm.icu.dev.test.format.NumberFormatRegressionTest#TestJ691
+com.ibm.icu.dev.test.format.NumberFormatRegressionTest#TestJB5509
+com.ibm.icu.dev.test.format.NumberFormatRegressionTest#TestNBSPInPattern
+com.ibm.icu.dev.test.format.NumberFormatRegressionTest#TestSerialization
+com.ibm.icu.dev.test.format.NumberFormatRegressionTest#TestSurrogatesParsing
+com.ibm.icu.dev.test.format.NumberFormatRegressionTest#TestT5698
+com.ibm.icu.dev.test.format.NumberFormatRegressionTest#TestT9293
+com.ibm.icu.dev.test.format.NumberFormatRoundTripTest#TestNumberFormatRoundTrip
+com.ibm.icu.dev.test.format.NumberFormatSpecificationTest#TestBasicPatterns
+com.ibm.icu.dev.test.format.NumberFormatSpecificationTest#TestNfSetters
+com.ibm.icu.dev.test.format.NumberFormatSpecificationTest#TestPadding
+com.ibm.icu.dev.test.format.NumberFormatSpecificationTest#TestPercent
+com.ibm.icu.dev.test.format.NumberFormatSpecificationTest#TestPerMilli
+com.ibm.icu.dev.test.format.NumberFormatSpecificationTest#TestRounding
+com.ibm.icu.dev.test.format.NumberFormatSpecificationTest#TestScientificNotation
+com.ibm.icu.dev.test.format.NumberFormatSpecificationTest#TestSignificantDigits
+com.ibm.icu.dev.test.format.NumberFormatTest#Test10419RoundingWith0FractionDigits
+com.ibm.icu.dev.test.format.NumberFormatTest#Test6816
+com.ibm.icu.dev.test.format.NumberFormatTest#TestAccountingCurrency
+com.ibm.icu.dev.test.format.NumberFormatTest#TestBigDecimalRounding
+com.ibm.icu.dev.test.format.NumberFormatTest#TestBug9936
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCases
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCompatibleCurrencies
+com.ibm.icu.dev.test.format.NumberFormatTest#TestComplexCurrency
+com.ibm.icu.dev.test.format.NumberFormatTest#TestContext
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCoverage
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCurrency
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCurrencyAmountCoverage
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCurrencyFormatForMixParsing
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCurrencyFractionDigits
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCurrencyIsoPluralFormat
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCurrencyKeyword
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCurrencyObject
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCurrencyPatterns
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCurrencyPlurals
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCurrencySign
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCurrencyUsage
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCurrFmtNegSameAsPositive
+com.ibm.icu.dev.test.format.NumberFormatTest#TestCustomCurrencySignAndSeparator
+com.ibm.icu.dev.test.format.NumberFormatTest#TestDecimalFormatCurrencyParse
+com.ibm.icu.dev.test.format.NumberFormatTest#TestExplicitParents
+com.ibm.icu.dev.test.format.NumberFormatTest#TestExponent
+com.ibm.icu.dev.test.format.NumberFormatTest#TestExponential
+com.ibm.icu.dev.test.format.NumberFormatTest#TestExponentParse
+com.ibm.icu.dev.test.format.NumberFormatTest#TestFieldPositionCurrency
+com.ibm.icu.dev.test.format.NumberFormatTest#TestFieldPositionDecimal
+com.ibm.icu.dev.test.format.NumberFormatTest#TestFieldPositionFraction
+com.ibm.icu.dev.test.format.NumberFormatTest#TestFieldPositionFractionButInteger
+com.ibm.icu.dev.test.format.NumberFormatTest#TestFieldPositionInteger
+com.ibm.icu.dev.test.format.NumberFormatTest#TestFormat
+com.ibm.icu.dev.test.format.NumberFormatTest#TestFormatToCharacterIteratorIssue11805
+com.ibm.icu.dev.test.format.NumberFormatTest#TestFormatToCharacterIteratorThread
+com.ibm.icu.dev.test.format.NumberFormatTest#TestGetAvailableLocales
+com.ibm.icu.dev.test.format.NumberFormatTest#TestGetInstance
+com.ibm.icu.dev.test.format.NumberFormatTest#TestIllegalPatterns
+com.ibm.icu.dev.test.format.NumberFormatTest#TestJB3832
+com.ibm.icu.dev.test.format.NumberFormatTest#TestJB5251
+com.ibm.icu.dev.test.format.NumberFormatTest#TestJB5358
+com.ibm.icu.dev.test.format.NumberFormatTest#TestLenientSymbolParsing
+com.ibm.icu.dev.test.format.NumberFormatTest#TestMiscCurrencyParsing
+com.ibm.icu.dev.test.format.NumberFormatTest#TestMultiCurrencySign
+com.ibm.icu.dev.test.format.NumberFormatTest#TestNegZeroRounding
+com.ibm.icu.dev.test.format.NumberFormatTest#TestNumberFormatFactory
+com.ibm.icu.dev.test.format.NumberFormatTest#TestNumberFormatTestTupleToString
+com.ibm.icu.dev.test.format.NumberFormatTest#TestNumberingSystems
+com.ibm.icu.dev.test.format.NumberFormatTest#TestPad
+com.ibm.icu.dev.test.format.NumberFormatTest#TestParse
+com.ibm.icu.dev.test.format.NumberFormatTest#TestParseCurrency
+com.ibm.icu.dev.test.format.NumberFormatTest#TestParseCurrencyTrailingSymbol
+com.ibm.icu.dev.test.format.NumberFormatTest#TestParseMaxDigits
+com.ibm.icu.dev.test.format.NumberFormatTest#TestParseNegativeWithAlternativeMinusSign
+com.ibm.icu.dev.test.format.NumberFormatTest#TestParseNegativeWithFaLocale
+com.ibm.icu.dev.test.format.NumberFormatTest#TestParseRequiredDecimalPoint
+com.ibm.icu.dev.test.format.NumberFormatTest#TestParseReturnType
+com.ibm.icu.dev.test.format.NumberFormatTest#TestParseSignsAndMarks
+com.ibm.icu.dev.test.format.NumberFormatTest#TestPatterns
+com.ibm.icu.dev.test.format.NumberFormatTest#TestPatterns2
+com.ibm.icu.dev.test.format.NumberFormatTest#TestPerMill
+com.ibm.icu.dev.test.format.NumberFormatTest#TestQuotes
+com.ibm.icu.dev.test.format.NumberFormatTest#TestRegistration
+com.ibm.icu.dev.test.format.NumberFormatTest#TestRounding
+com.ibm.icu.dev.test.format.NumberFormatTest#TestRounding487
+com.ibm.icu.dev.test.format.NumberFormatTest#TestRoundingBehavior
+com.ibm.icu.dev.test.format.NumberFormatTest#TestRoundingMode
+com.ibm.icu.dev.test.format.NumberFormatTest#TestRoundingPattern
+com.ibm.icu.dev.test.format.NumberFormatTest#TestRoundingScientific10542
+com.ibm.icu.dev.test.format.NumberFormatTest#TestRoundUnnecessarytIssue11808
+com.ibm.icu.dev.test.format.NumberFormatTest#TestScientific
+com.ibm.icu.dev.test.format.NumberFormatTest#TestScientific2
+com.ibm.icu.dev.test.format.NumberFormatTest#TestScientificGrouping
+com.ibm.icu.dev.test.format.NumberFormatTest#TestSecondaryGrouping
+com.ibm.icu.dev.test.format.NumberFormatTest#TestSetCurrency
+com.ibm.icu.dev.test.format.NumberFormatTest#TestSetMinimumIntegerDigits
+com.ibm.icu.dev.test.format.NumberFormatTest#TestShowZero
+com.ibm.icu.dev.test.format.NumberFormatTest#TestSignificantDigits
+com.ibm.icu.dev.test.format.NumberFormatTest#TestSimpleNumberFormatFactory
+com.ibm.icu.dev.test.format.NumberFormatTest#TestSpaceParsing
+com.ibm.icu.dev.test.format.NumberFormatTest#TestStrictParse
+com.ibm.icu.dev.test.format.NumberFormatTest#TestThreadedFormat
+com.ibm.icu.dev.test.format.NumberFormatTest#TestWhiteSpaceParsing
+com.ibm.icu.dev.test.format.NumberRegression#Test4052223
+com.ibm.icu.dev.test.format.NumberRegression#Test4059870
+com.ibm.icu.dev.test.format.NumberRegression#Test4061302
+com.ibm.icu.dev.test.format.NumberRegression#Test4062486
+com.ibm.icu.dev.test.format.NumberRegression#Test4066646
+com.ibm.icu.dev.test.format.NumberRegression#Test4068693
+com.ibm.icu.dev.test.format.NumberRegression#Test4069754
+com.ibm.icu.dev.test.format.NumberRegression#Test4070798
+com.ibm.icu.dev.test.format.NumberRegression#Test4071005
+com.ibm.icu.dev.test.format.NumberRegression#Test4071014
+com.ibm.icu.dev.test.format.NumberRegression#Test4071492
+com.ibm.icu.dev.test.format.NumberRegression#Test4071859
+com.ibm.icu.dev.test.format.NumberRegression#Test4074454
+com.ibm.icu.dev.test.format.NumberRegression#Test4074620
+com.ibm.icu.dev.test.format.NumberRegression#Test4075713
+com.ibm.icu.dev.test.format.NumberRegression#Test4083018
+com.ibm.icu.dev.test.format.NumberRegression#Test4086575
+com.ibm.icu.dev.test.format.NumberRegression#Test4087244
+com.ibm.icu.dev.test.format.NumberRegression#Test4087245
+com.ibm.icu.dev.test.format.NumberRegression#Test4087251
+com.ibm.icu.dev.test.format.NumberRegression#Test4087535
+com.ibm.icu.dev.test.format.NumberRegression#Test4088161
+com.ibm.icu.dev.test.format.NumberRegression#Test4088503
+com.ibm.icu.dev.test.format.NumberRegression#Test4090489
+com.ibm.icu.dev.test.format.NumberRegression#Test4090504
+com.ibm.icu.dev.test.format.NumberRegression#Test4092480
+com.ibm.icu.dev.test.format.NumberRegression#Test4092561
+com.ibm.icu.dev.test.format.NumberRegression#Test4093610
+com.ibm.icu.dev.test.format.NumberRegression#Test4095713
+com.ibm.icu.dev.test.format.NumberRegression#Test4098741
+com.ibm.icu.dev.test.format.NumberRegression#Test4099404
+com.ibm.icu.dev.test.format.NumberRegression#Test4101481
+com.ibm.icu.dev.test.format.NumberRegression#Test4106658
+com.ibm.icu.dev.test.format.NumberRegression#Test4106662
+com.ibm.icu.dev.test.format.NumberRegression#Test4106664
+com.ibm.icu.dev.test.format.NumberRegression#Test4106667
+com.ibm.icu.dev.test.format.NumberRegression#Test4108738
+com.ibm.icu.dev.test.format.NumberRegression#Test4110936
+com.ibm.icu.dev.test.format.NumberRegression#Test4114639
+com.ibm.icu.dev.test.format.NumberRegression#Test4122840
+com.ibm.icu.dev.test.format.NumberRegression#Test4125885
+com.ibm.icu.dev.test.format.NumberRegression#Test4134034
+com.ibm.icu.dev.test.format.NumberRegression#Test4134300
+com.ibm.icu.dev.test.format.NumberRegression#Test4140009
+com.ibm.icu.dev.test.format.NumberRegression#Test4141750
+com.ibm.icu.dev.test.format.NumberRegression#Test4145457
+com.ibm.icu.dev.test.format.NumberRegression#Test4147295
+com.ibm.icu.dev.test.format.NumberRegression#Test4147706
+com.ibm.icu.dev.test.format.NumberRegression#Test4162198
+com.ibm.icu.dev.test.format.NumberRegression#Test4162852
+com.ibm.icu.dev.test.format.NumberRegression#Test4167494
+com.ibm.icu.dev.test.format.NumberRegression#Test4170798
+com.ibm.icu.dev.test.format.NumberRegression#Test4176114
+com.ibm.icu.dev.test.format.NumberRegression#Test4179818
+com.ibm.icu.dev.test.format.NumberRegression#Test4185761
+com.ibm.icu.dev.test.format.NumberRegression#Test4212072
+com.ibm.icu.dev.test.format.NumberRegression#Test4216742
+com.ibm.icu.dev.test.format.NumberRegression#Test4217661
+com.ibm.icu.dev.test.format.NumberRegression#test4233840
+com.ibm.icu.dev.test.format.NumberRegression#test4241880
+com.ibm.icu.dev.test.format.NumberRegression#Test4243011
+com.ibm.icu.dev.test.format.NumberRegression#Test4243108
+com.ibm.icu.dev.test.format.NumberRegression#test4330377
+com.ibm.icu.dev.test.format.PluralFormatTest#TestEquals
+com.ibm.icu.dev.test.format.PluralFormatTest#TestGetLocale
+com.ibm.icu.dev.test.format.PluralFormatTest#TestGetPluralRules
+com.ibm.icu.dev.test.format.PluralFormatTest#TestOneFormLocales
+com.ibm.icu.dev.test.format.PluralFormatTest#TestPaucal1_234
+com.ibm.icu.dev.test.format.PluralFormatTest#TestPaucal1_2_34
+com.ibm.icu.dev.test.format.PluralFormatTest#TestPaucalExcept11_14
+com.ibm.icu.dev.test.format.PluralFormatTest#TestPaucalRu
+com.ibm.icu.dev.test.format.PluralFormatTest#TestSetLocale
+com.ibm.icu.dev.test.format.PluralFormatTest#TestSingular01Locales
+com.ibm.icu.dev.test.format.PluralFormatTest#TestSingular1Locales
+com.ibm.icu.dev.test.format.PluralFormatTest#TestSingularDual
+com.ibm.icu.dev.test.format.PluralFormatTest#TestSingularPaucal
+com.ibm.icu.dev.test.format.PluralFormatTest#TestSingularZeroSome
+com.ibm.icu.dev.test.format.PluralFormatTest#TestSpecial12_19
+com.ibm.icu.dev.test.format.PluralFormatTest#TestZeroSingularLocales
+com.ibm.icu.dev.test.format.PluralFormatUnitTest#TestApplyPatternAndFormat
+com.ibm.icu.dev.test.format.PluralFormatUnitTest#TestConstructor
+com.ibm.icu.dev.test.format.PluralFormatUnitTest#TestDecimals
+com.ibm.icu.dev.test.format.PluralFormatUnitTest#TestExtendedPluralFormat
+com.ibm.icu.dev.test.format.PluralFormatUnitTest#TestExtendedPluralFormatParsing
+com.ibm.icu.dev.test.format.PluralFormatUnitTest#TestNegative
+com.ibm.icu.dev.test.format.PluralFormatUnitTest#TestOrdinalFormat
+com.ibm.icu.dev.test.format.PluralFormatUnitTest#TestParse
+com.ibm.icu.dev.test.format.PluralFormatUnitTest#TestPattern
+com.ibm.icu.dev.test.format.PluralFormatUnitTest#TestSamples
+com.ibm.icu.dev.test.format.PluralFormatUnitTest#TestSetLocale
+com.ibm.icu.dev.test.format.PluralRangesTest#TestBasic
+com.ibm.icu.dev.test.format.PluralRangesTest#TestFormatting
+com.ibm.icu.dev.test.format.PluralRangesTest#TestLocaleData
+com.ibm.icu.dev.test.format.PluralRangesTest#TestRangePattern
+com.ibm.icu.dev.test.format.PluralRulesTest#testAvailableULocales
+com.ibm.icu.dev.test.format.PluralRulesTest#TestBasicFraction
+com.ibm.icu.dev.test.format.PluralRulesTest#testBuiltInRules
+com.ibm.icu.dev.test.format.PluralRulesTest#TestCreateRules
+com.ibm.icu.dev.test.format.PluralRulesTest#testEquality
+com.ibm.icu.dev.test.format.PluralRulesTest#TestEquals
+com.ibm.icu.dev.test.format.PluralRulesTest#testFunctionalEquivalent
+com.ibm.icu.dev.test.format.PluralRulesTest#TestGetAllKeywordValues
+com.ibm.icu.dev.test.format.PluralRulesTest#TestGetSamples
+com.ibm.icu.dev.test.format.PluralRulesTest#TestGetUniqueKeywordValue
+com.ibm.icu.dev.test.format.PluralRulesTest#TestHashCode
+com.ibm.icu.dev.test.format.PluralRulesTest#testInequality
+com.ibm.icu.dev.test.format.PluralRulesTest#testJavaLocaleFactory
+com.ibm.icu.dev.test.format.PluralRulesTest#TestKeywords
+com.ibm.icu.dev.test.format.PluralRulesTest#TestLimitedAndSamplesConsistency
+com.ibm.icu.dev.test.format.PluralRulesTest#TestLocales
+com.ibm.icu.dev.test.format.PluralRulesTest#testOperands
+com.ibm.icu.dev.test.format.PluralRulesTest#TestOrdinal
+com.ibm.icu.dev.test.format.PluralRulesTest#TestParseDescription
+com.ibm.icu.dev.test.format.PluralRulesTest#testParseEmpty
+com.ibm.icu.dev.test.format.PluralRulesTest#testParsing
+com.ibm.icu.dev.test.format.PluralRulesTest#testSamples
+com.ibm.icu.dev.test.format.PluralRulesTest#TestSerial
+com.ibm.icu.dev.test.format.PluralRulesTest#TestSerialization
+com.ibm.icu.dev.test.format.PluralRulesTest#testSyntaxRestrictions
+com.ibm.icu.dev.test.format.PluralRulesTest#testUniqueRules
+com.ibm.icu.dev.test.format.RbnfLenientScannerTest#TestAllLocales
+com.ibm.icu.dev.test.format.RbnfLenientScannerTest#TestDefaultProvider
+com.ibm.icu.dev.test.format.RbnfLenientScannerTest#TestDurations
+com.ibm.icu.dev.test.format.RbnfLenientScannerTest#TestEnglishSpellout
+com.ibm.icu.dev.test.format.RbnfLenientScannerTest#TestFrenchSpellout
+com.ibm.icu.dev.test.format.RbnfLenientScannerTest#TestGermanSpellout
+com.ibm.icu.dev.test.format.RBNFParseTest#TestLenientParse
+com.ibm.icu.dev.test.format.RBNFParseTest#TestParse
+com.ibm.icu.dev.test.format.RbnfRoundTripTest#TestDurationsRT
+com.ibm.icu.dev.test.format.RbnfRoundTripTest#TestDutchSpelloutRT
+com.ibm.icu.dev.test.format.RbnfRoundTripTest#TestEnglishSpelloutRT
+com.ibm.icu.dev.test.format.RbnfRoundTripTest#TestFrenchSpelloutRT
+com.ibm.icu.dev.test.format.RbnfRoundTripTest#TestGermanSpelloutRT
+com.ibm.icu.dev.test.format.RbnfRoundTripTest#TestGreekSpelloutRT
+com.ibm.icu.dev.test.format.RbnfRoundTripTest#TestHebrewNumberingRT
+com.ibm.icu.dev.test.format.RbnfRoundTripTest#TestItalianSpelloutRT
+com.ibm.icu.dev.test.format.RbnfRoundTripTest#TestJapaneseSpelloutRT
+com.ibm.icu.dev.test.format.RbnfRoundTripTest#TestRussianSpelloutRT
+com.ibm.icu.dev.test.format.RbnfRoundTripTest#TestSpanishSpelloutRT
+com.ibm.icu.dev.test.format.RbnfRoundTripTest#TestSwedishSpelloutRT
+com.ibm.icu.dev.test.format.RbnfRoundTripTest#TestSwissFrenchSpelloutRT
+com.ibm.icu.dev.test.format.RbnfTest#TestAllLocales
+com.ibm.icu.dev.test.format.RbnfTest#TestBigNumbers
+com.ibm.icu.dev.test.format.RbnfTest#TestChineseProcess
+com.ibm.icu.dev.test.format.RbnfTest#TestContext
+com.ibm.icu.dev.test.format.RbnfTest#TestCoverage
+com.ibm.icu.dev.test.format.RbnfTest#TestDurations
+com.ibm.icu.dev.test.format.RbnfTest#TestEnglishSpellout
+com.ibm.icu.dev.test.format.RbnfTest#TestEquals
+com.ibm.icu.dev.test.format.RbnfTest#TestFractionalRuleSet
+com.ibm.icu.dev.test.format.RbnfTest#TestFrenchSpellout
+com.ibm.icu.dev.test.format.RbnfTest#TestGermanSpellout
+com.ibm.icu.dev.test.format.RbnfTest#TestGetNameListForLocale
+com.ibm.icu.dev.test.format.RbnfTest#TestGetRuleDisplayNameLocales
+com.ibm.icu.dev.test.format.RbnfTest#TestGetRulesSetDisplayName
+com.ibm.icu.dev.test.format.RbnfTest#TestInfinityNaN
+com.ibm.icu.dev.test.format.RbnfTest#TestItalianSpellout
+com.ibm.icu.dev.test.format.RbnfTest#TestMultiplePluralRules
+com.ibm.icu.dev.test.format.RbnfTest#TestOrdinalAbbreviations
+com.ibm.icu.dev.test.format.RbnfTest#TestPluralRules
+com.ibm.icu.dev.test.format.RbnfTest#TestRounding
+com.ibm.icu.dev.test.format.RbnfTest#TestRuleSetDisplayName
+com.ibm.icu.dev.test.format.RbnfTest#TestSetDecimalFormatSymbols
+com.ibm.icu.dev.test.format.RbnfTest#TestSmallValues
+com.ibm.icu.dev.test.format.RbnfTest#TestSpanishSpellout
+com.ibm.icu.dev.test.format.RbnfTest#TestSwedishSpellout
+com.ibm.icu.dev.test.format.RbnfTest#TestSwissFrenchSpellout
+com.ibm.icu.dev.test.format.RbnfTest#TestThaiSpellout
+com.ibm.icu.dev.test.format.RbnfTest#TestTrailingSemicolon
+com.ibm.icu.dev.test.format.RbnfTest#TestUndefinedSpellout
+com.ibm.icu.dev.test.format.RbnfTest#TestVariableDecimalPoint
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestBadDisplayContext
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestCombineDateAndTime
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestCustomNumberFormat
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestFormatWithoutQuantityIllegalArgument
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestFormatWithQuantityIllegalArgument
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestGetters
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestJavaLocale
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestRelativeDateWithoutQuantity
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestRelativeDateWithoutQuantityCaps
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestRelativeDateWithoutQuantityNarrow
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestRelativeDateWithoutQuantityShort
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestRelativeDateWithQuantity
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestRelativeDateWithQuantityCaps
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestRelativeDateWithQuantityNarrow
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestRelativeDateWithQuantityShort
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestRelativeDateWithQuantitySr
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestRelativeDateWithQuantitySrFallback
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestSidewaysDataLoading
+com.ibm.icu.dev.test.format.RelativeDateTimeFormatterTest#TestTwoBeforeTwoAfter
+com.ibm.icu.dev.test.format.ScientificNumberFormatterTest#TestBasic
+com.ibm.icu.dev.test.format.ScientificNumberFormatterTest#TestFarsi
+com.ibm.icu.dev.test.format.ScientificNumberFormatterTest#TestFixedDecimalMarkup
+com.ibm.icu.dev.test.format.ScientificNumberFormatterTest#TestFixedDecimalSuperscript
+com.ibm.icu.dev.test.format.ScientificNumberFormatterTest#TestPlusSignInExponentMarkup
+com.ibm.icu.dev.test.format.ScientificNumberFormatterTest#TestPlusSignInExponentSuperscript
+com.ibm.icu.dev.test.format.SelectFormatAPITest#TestApplyPatternToPattern
+com.ibm.icu.dev.test.format.SelectFormatAPITest#TestConstructors
+com.ibm.icu.dev.test.format.SelectFormatAPITest#TestEquals
+com.ibm.icu.dev.test.format.SelectFormatAPITest#TestFormat
+com.ibm.icu.dev.test.format.SelectFormatAPITest#TestHashCode
+com.ibm.icu.dev.test.format.SelectFormatAPITest#TestParseObject
+com.ibm.icu.dev.test.format.SelectFormatAPITest#TestToPattern
+com.ibm.icu.dev.test.format.SelectFormatAPITest#TestToString
+com.ibm.icu.dev.test.format.SelectFormatUnitTest#TestApplyFormat
+com.ibm.icu.dev.test.format.SelectFormatUnitTest#TestInvalidKeyword
+com.ibm.icu.dev.test.format.SelectFormatUnitTest#TestPatternSyntax
+com.ibm.icu.dev.test.format.TestMessageFormat#TestAdopt
+com.ibm.icu.dev.test.format.TestMessageFormat#testApostropheInPluralAndSelect
+com.ibm.icu.dev.test.format.TestMessageFormat#TestApostropheMode
+com.ibm.icu.dev.test.format.TestMessageFormat#TestAutoQuoteApostrophe
+com.ibm.icu.dev.test.format.TestMessageFormat#TestBug1
+com.ibm.icu.dev.test.format.TestMessageFormat#TestBug2
+com.ibm.icu.dev.test.format.TestMessageFormat#TestBug3
+com.ibm.icu.dev.test.format.TestMessageFormat#TestClone
+com.ibm.icu.dev.test.format.TestMessageFormat#TestCompatibleApostrophe
+com.ibm.icu.dev.test.format.TestMessageFormat#TestDecimals
+com.ibm.icu.dev.test.format.TestMessageFormat#TestEquals
+com.ibm.icu.dev.test.format.TestMessageFormat#TestFormat
+com.ibm.icu.dev.test.format.TestMessageFormat#testFormatNamedArguments
+com.ibm.icu.dev.test.format.TestMessageFormat#TestFormatToCharacterIterator
+com.ibm.icu.dev.test.format.TestMessageFormat#TestGetFormatByArgumentName
+com.ibm.icu.dev.test.format.TestMessageFormat#TestHashCode
+com.ibm.icu.dev.test.format.TestMessageFormat#TestMsgFormatChoice
+com.ibm.icu.dev.test.format.TestMessageFormat#testNamedArguments
+com.ibm.icu.dev.test.format.TestMessageFormat#testNestedFormatsInPluralFormat
+com.ibm.icu.dev.test.format.TestMessageFormat#TestNotEquals
+com.ibm.icu.dev.test.format.TestMessageFormat#TestNullArgs
+com.ibm.icu.dev.test.format.TestMessageFormat#testNumericFormatWithMap
+com.ibm.icu.dev.test.format.TestMessageFormat#testNumericOnlyMethods
+com.ibm.icu.dev.test.format.TestMessageFormat#TestParse
+com.ibm.icu.dev.test.format.TestMessageFormat#testParseNamedArguments
+com.ibm.icu.dev.test.format.TestMessageFormat#TestPattern
+com.ibm.icu.dev.test.format.TestMessageFormat#testPluralFormat
+com.ibm.icu.dev.test.format.TestMessageFormat#testPluralFormatToPattern
+com.ibm.icu.dev.test.format.TestMessageFormat#TestRBNF
+com.ibm.icu.dev.test.format.TestMessageFormat#TestSample
+com.ibm.icu.dev.test.format.TestMessageFormat#testSelectFormat
+com.ibm.icu.dev.test.format.TestMessageFormat#testSelectFormatToPattern
+com.ibm.icu.dev.test.format.TestMessageFormat#TestSelectOrdinal
+com.ibm.icu.dev.test.format.TestMessageFormat#TestSetFormat
+com.ibm.icu.dev.test.format.TestMessageFormat#TestSetGetFormats
+com.ibm.icu.dev.test.format.TestMessageFormat#TestSetLocale
+com.ibm.icu.dev.test.format.TestMessageFormat#TestSimpleFormat
+com.ibm.icu.dev.test.format.TestMessageFormat#TestStaticFormat
+com.ibm.icu.dev.test.format.TestMessageFormat#TestTrimArgumentName
+com.ibm.icu.dev.test.format.TestMessageFormat#TestUnlimitedArgsAndSubformats
+com.ibm.icu.dev.test.format.TimeUnitTest#Test10219FactionalPluralsParse
+com.ibm.icu.dev.test.format.TimeUnitTest#Test10219FractionalPlurals
+com.ibm.icu.dev.test.format.TimeUnitTest#TestAPI
+com.ibm.icu.dev.test.format.TimeUnitTest#TestBasic
+com.ibm.icu.dev.test.format.TimeUnitTest#TestBritishShortHourFallback
+com.ibm.icu.dev.test.format.TimeUnitTest#TestClone
+com.ibm.icu.dev.test.format.TimeUnitTest#TestEqHashCode
+com.ibm.icu.dev.test.format.TimeUnitTest#TestFormat
+com.ibm.icu.dev.test.format.TimeUnitTest#TestGetLocale
+com.ibm.icu.dev.test.format.TimeUnitTest#TestGreek
+com.ibm.icu.dev.test.format.TimeUnitTest#TestGreekWithSanitization
+com.ibm.icu.dev.test.format.TimeUnitTest#TestSetLocale
+com.ibm.icu.dev.test.format.TimeUnitTest#TestSetNumberFormat
+com.ibm.icu.dev.test.format.TimeUnitTest#TestSetup
+com.ibm.icu.dev.test.format.TimeUnitTest#TestStandInForMeasureFormat
+com.ibm.icu.dev.test.format.TimeUnitTest#TestTimeUnitFormat
+com.ibm.icu.dev.test.format.TimeZoneFormatTest#TestFormat
+com.ibm.icu.dev.test.format.TimeZoneFormatTest#TestFormatTZDBNames
+com.ibm.icu.dev.test.format.TimeZoneFormatTest#TestISOFormat
+com.ibm.icu.dev.test.format.TimeZoneFormatTest#TestParse
+com.ibm.icu.dev.test.format.TimeZoneFormatTest#TestTimeRoundTrip
+com.ibm.icu.dev.test.format.TimeZoneFormatTest#TestTimeZoneRoundTrip
+com.ibm.icu.dev.test.format.TimeZoneFormatTest#TestTZDBNamesThreading
+com.ibm.icu.dev.test.iterator.TestUCharacterIterator#TestClone
+com.ibm.icu.dev.test.iterator.TestUCharacterIterator#TestIteration
+com.ibm.icu.dev.test.iterator.TestUCharacterIterator#TestIterationUChar32
+com.ibm.icu.dev.test.iterator.TestUCharacterIterator#TestJitterbug1952
+com.ibm.icu.dev.test.iterator.TestUCharacterIterator#TestPreviousNext
+com.ibm.icu.dev.test.iterator.TestUCharacterIterator#TestUCharacterIteratorWrapper
+com.ibm.icu.dev.test.lang.TestUScriptRun#TestContstruction
+com.ibm.icu.dev.test.lang.TestUScriptRun#TestReset
+com.ibm.icu.dev.test.lang.TestUScriptRun#TestRuns
+com.ibm.icu.dev.test.lang.TestUScript#TestAllCodepoints
+com.ibm.icu.dev.test.lang.TestUScript#TestGetCode
+com.ibm.icu.dev.test.lang.TestUScript#TestGetName
+com.ibm.icu.dev.test.lang.TestUScript#TestGetScript
+com.ibm.icu.dev.test.lang.TestUScript#TestGetScriptExtensions
+com.ibm.icu.dev.test.lang.TestUScript#TestGetScriptOfCharsWithScriptExtensions
+com.ibm.icu.dev.test.lang.TestUScript#TestGetShortName
+com.ibm.icu.dev.test.lang.TestUScript#TestHasScript
+com.ibm.icu.dev.test.lang.TestUScript#TestLocaleGetCode
+com.ibm.icu.dev.test.lang.TestUScript#TestMultipleCode
+com.ibm.icu.dev.test.lang.TestUScript#TestNewCode
+com.ibm.icu.dev.test.lang.TestUScript#TestScriptMetadata
+com.ibm.icu.dev.test.lang.TestUScript#TestScriptMetadataAPI
+com.ibm.icu.dev.test.lang.TestUScript#TestScriptNames
+com.ibm.icu.dev.test.lang.UCharacterCaseTest#TestCharacter
+com.ibm.icu.dev.test.lang.UCharacterCaseTest#TestDutchTitle
+com.ibm.icu.dev.test.lang.UCharacterCaseTest#TestFolding
+com.ibm.icu.dev.test.lang.UCharacterCaseTest#TestLower
+com.ibm.icu.dev.test.lang.UCharacterCaseTest#TestSpecial
+com.ibm.icu.dev.test.lang.UCharacterCaseTest#TestSpecialCasingTxt
+com.ibm.icu.dev.test.lang.UCharacterCaseTest#TestTitle
+com.ibm.icu.dev.test.lang.UCharacterCaseTest#TestTitleRegression
+com.ibm.icu.dev.test.lang.UCharacterCaseTest#TestUpper
+com.ibm.icu.dev.test.lang.UCharacterCaseTest#TestUpperLower
+com.ibm.icu.dev.test.lang.UCharacterCategoryTest#TestToString
+com.ibm.icu.dev.test.lang.UCharacterDirectionTest#TestToString
+com.ibm.icu.dev.test.lang.UCharacterSurrogateTest#TestCharCount
+com.ibm.icu.dev.test.lang.UCharacterSurrogateTest#TestCodePointAtBefore
+com.ibm.icu.dev.test.lang.UCharacterSurrogateTest#TestCodePointCount
+com.ibm.icu.dev.test.lang.UCharacterSurrogateTest#TestIsHighSurrogate
+com.ibm.icu.dev.test.lang.UCharacterSurrogateTest#TestIsLowSurrogate
+com.ibm.icu.dev.test.lang.UCharacterSurrogateTest#TestIsSupplementaryCodePoint
+com.ibm.icu.dev.test.lang.UCharacterSurrogateTest#TestIsSurrogatePair
+com.ibm.icu.dev.test.lang.UCharacterSurrogateTest#TestIsValidCodePoint
+com.ibm.icu.dev.test.lang.UCharacterSurrogateTest#TestOffsetByCodePoints
+com.ibm.icu.dev.test.lang.UCharacterSurrogateTest#TestToChars
+com.ibm.icu.dev.test.lang.UCharacterSurrogateTest#TestToCodePoint
+com.ibm.icu.dev.test.lang.UCharacterSurrogateTest#TestUnicodeBlockForName
+com.ibm.icu.dev.test.lang.UCharacterTest#TestAdditionalProperties
+com.ibm.icu.dev.test.lang.UCharacterTest#TestBase
+com.ibm.icu.dev.test.lang.UCharacterTest#TestBidiPairedBracketType
+com.ibm.icu.dev.test.lang.UCharacterTest#TestBlockData
+com.ibm.icu.dev.test.lang.UCharacterTest#TestCodePoint
+com.ibm.icu.dev.test.lang.UCharacterTest#TestCodePointAt
+com.ibm.icu.dev.test.lang.UCharacterTest#TestCodePointBefore
+com.ibm.icu.dev.test.lang.UCharacterTest#TestCodePointCount
+com.ibm.icu.dev.test.lang.UCharacterTest#TestConsistency
+com.ibm.icu.dev.test.lang.UCharacterTest#TestCoverage
+com.ibm.icu.dev.test.lang.UCharacterTest#TestDefined
+com.ibm.icu.dev.test.lang.UCharacterTest#TestDigits
+com.ibm.icu.dev.test.lang.UCharacterTest#TestForName
+com.ibm.icu.dev.test.lang.UCharacterTest#TestGetAge
+com.ibm.icu.dev.test.lang.UCharacterTest#TestGetCombiningClass
+com.ibm.icu.dev.test.lang.UCharacterTest#TestGetEuropeanDigit
+com.ibm.icu.dev.test.lang.UCharacterTest#TestGetHanNumericValue
+com.ibm.icu.dev.test.lang.UCharacterTest#TestGetInstance
+com.ibm.icu.dev.test.lang.UCharacterTest#TestGetIntPropertyMaxValue
+com.ibm.icu.dev.test.lang.UCharacterTest#TestGetIntPropertyValue
+com.ibm.icu.dev.test.lang.UCharacterTest#TestGetISOComment
+com.ibm.icu.dev.test.lang.UCharacterTest#TestGetName
+com.ibm.icu.dev.test.lang.UCharacterTest#TestGetNumericValue
+com.ibm.icu.dev.test.lang.UCharacterTest#TestGetProperty
+com.ibm.icu.dev.test.lang.UCharacterTest#TestGetUnicodeNumericValue
+com.ibm.icu.dev.test.lang.UCharacterTest#TestHasBinaryProperty
+com.ibm.icu.dev.test.lang.UCharacterTest#TestIdentifier
+com.ibm.icu.dev.test.lang.UCharacterTest#TestIsBMP
+com.ibm.icu.dev.test.lang.UCharacterTest#TestIsFrozen
+com.ibm.icu.dev.test.lang.UCharacterTest#TestIsLegal
+com.ibm.icu.dev.test.lang.UCharacterTest#TestISOControl
+com.ibm.icu.dev.test.lang.UCharacterTest#TestIteration
+com.ibm.icu.dev.test.lang.UCharacterTest#TestLetterNumber
+com.ibm.icu.dev.test.lang.UCharacterTest#TestMirror
+com.ibm.icu.dev.test.lang.UCharacterTest#TestNameIteration
+com.ibm.icu.dev.test.lang.UCharacterTest#TestNames
+com.ibm.icu.dev.test.lang.UCharacterTest#TestNextCaseMapCP
+com.ibm.icu.dev.test.lang.UCharacterTest#TestNumeric
+com.ibm.icu.dev.test.lang.UCharacterTest#TestNumericProperties
+com.ibm.icu.dev.test.lang.UCharacterTest#TestOf
+com.ibm.icu.dev.test.lang.UCharacterTest#TestPatternProperties
+com.ibm.icu.dev.test.lang.UCharacterTest#TestPrint
+com.ibm.icu.dev.test.lang.UCharacterTest#TestPropertyValues
+com.ibm.icu.dev.test.lang.UCharacterTest#TestReset
+com.ibm.icu.dev.test.lang.UCharacterTest#TestSetLimit
+com.ibm.icu.dev.test.lang.UCharacterTest#TestSpaces
+com.ibm.icu.dev.test.lang.UCharacterTest#TestSupplementary
+com.ibm.icu.dev.test.lang.UCharacterTest#TestToChars
+com.ibm.icu.dev.test.lang.UCharacterTest#TestToLowerCase
+com.ibm.icu.dev.test.lang.UCharacterTest#TestToString
+com.ibm.icu.dev.test.lang.UCharacterTest#TestToTitleCaseCoverage
+com.ibm.icu.dev.test.lang.UCharacterTest#TestToUpperCase
+com.ibm.icu.dev.test.lang.UCharacterTest#TestUCharFromNameUnderflow
+com.ibm.icu.dev.test.lang.UCharacterTest#TestUnicodeData
+com.ibm.icu.dev.test.lang.UCharacterTest#TestVersion
+com.ibm.icu.dev.test.lang.UCharacterTest#TestXSymbolTable
+com.ibm.icu.dev.test.lang.UCharacterThreadTest#TestUCharactersGetName
+com.ibm.icu.dev.test.lang.UnicodeSetStringSpanTest#TestInterestingStringSpan
+com.ibm.icu.dev.test.lang.UnicodeSetStringSpanTest#TestSimpleStringSpan
+com.ibm.icu.dev.test.lang.UnicodeSetStringSpanTest#TestSimpleStringSpanAndFreeze
+com.ibm.icu.dev.test.lang.UnicodeSetStringSpanTest#TestSimpleStringSpanSlow
+com.ibm.icu.dev.test.lang.UnicodeSetStringSpanTest#TestSpan
+com.ibm.icu.dev.test.lang.UnicodeSetStringSpanTest#TestSpanAndCount
+com.ibm.icu.dev.test.lang.UnicodeSetStringSpanTest#TestStringWithUnpairedSurrogateSpan
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestAddCollection
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestAddRemove
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestAPI
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestAStringRange
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestCategories
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestCharSequenceArgs
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestClone
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestCloseOver
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestCodePoints
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestComparison
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestConstants
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestContains
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestContainsString
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestCountIn
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestEscapePattern
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestExhaustive
+com.ibm.icu.dev.test.lang.UnicodeSetTest#testForSpanGaps
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestFrozen
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestGenerics
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestGetSet
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestHangulSyllable
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestIndexOf
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestIteration
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestMinimalRep
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestPatterns
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestPosixClasses
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestPropertyAccess
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestPropertySet
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestRangeConstructor
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestReplaceAndDelete
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestScriptNames
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestScriptSet
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestSetRelation
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestSetSpeed
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestStrings
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestSurrogate
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestSymbolTable
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestToPattern
+com.ibm.icu.dev.test.lang.UnicodeSetTest#TestUnicodeSetStrings
+com.ibm.icu.dev.test.lang.UPropertyAliasesTest#TestPropertyNames
+com.ibm.icu.dev.test.lang.UPropertyAliasesTest#TestUnknownPropertyNames
+com.ibm.icu.dev.test.lang.UTF16Test#TestAppend
+com.ibm.icu.dev.test.lang.UTF16Test#TestBounds
+com.ibm.icu.dev.test.lang.UTF16Test#TestCaseCompare
+com.ibm.icu.dev.test.lang.UTF16Test#TestCharAt
+com.ibm.icu.dev.test.lang.UTF16Test#TestCodePointCompare
+com.ibm.icu.dev.test.lang.UTF16Test#TestCountCodePoint
+com.ibm.icu.dev.test.lang.UTF16Test#TestDelete
+com.ibm.icu.dev.test.lang.UTF16Test#TestfindOffset
+com.ibm.icu.dev.test.lang.UTF16Test#TestGetCharCountSurrogate
+com.ibm.icu.dev.test.lang.UTF16Test#TestHasMoreCodePointsThan
+com.ibm.icu.dev.test.lang.UTF16Test#TestIndexOf
+com.ibm.icu.dev.test.lang.UTF16Test#TestInsert
+com.ibm.icu.dev.test.lang.UTF16Test#TestMoveCodePointOffset
+com.ibm.icu.dev.test.lang.UTF16Test#TestNewString
+com.ibm.icu.dev.test.lang.UTF16Test#TestReplace
+com.ibm.icu.dev.test.lang.UTF16Test#TestReverse
+com.ibm.icu.dev.test.lang.UTF16Test#TestSetCharAt
+com.ibm.icu.dev.test.lang.UTF16Test#TestStringComparator
+com.ibm.icu.dev.test.lang.UTF16Test#TestUtilities
+com.ibm.icu.dev.test.lang.UTF16Test#TestValueOf
+com.ibm.icu.dev.test.normalizer.BasicTest#TestBengali
+com.ibm.icu.dev.test.normalizer.BasicTest#TestBugJ2068
+com.ibm.icu.dev.test.normalizer.BasicTest#TestBugJ2324
+com.ibm.icu.dev.test.normalizer.BasicTest#TestCanonCompose
+com.ibm.icu.dev.test.normalizer.BasicTest#TestCanonIterData
+com.ibm.icu.dev.test.normalizer.BasicTest#TestCheckFCD
+com.ibm.icu.dev.test.normalizer.BasicTest#TestCombiningMarks
+com.ibm.icu.dev.test.normalizer.BasicTest#TestCompare
+com.ibm.icu.dev.test.normalizer.BasicTest#TestCompareDebug
+com.ibm.icu.dev.test.normalizer.BasicTest#TestCompatCompose
+com.ibm.icu.dev.test.normalizer.BasicTest#TestCompatDecomp
+com.ibm.icu.dev.test.normalizer.BasicTest#TestComposition
+com.ibm.icu.dev.test.normalizer.BasicTest#TestCompositionExclusion
+com.ibm.icu.dev.test.normalizer.BasicTest#TestConcatenate
+com.ibm.icu.dev.test.normalizer.BasicTest#TestCustomComp
+com.ibm.icu.dev.test.normalizer.BasicTest#TestCustomFCC
+com.ibm.icu.dev.test.normalizer.BasicTest#TestDebugIter
+com.ibm.icu.dev.test.normalizer.BasicTest#TestDebugIterOld
+com.ibm.icu.dev.test.normalizer.BasicTest#TestDebugStatic
+com.ibm.icu.dev.test.normalizer.BasicTest#TestDecomp
+com.ibm.icu.dev.test.normalizer.BasicTest#TestExplodingBase
+com.ibm.icu.dev.test.normalizer.BasicTest#TestFCNFKCClosure
+com.ibm.icu.dev.test.normalizer.BasicTest#TestFilteredAppend
+com.ibm.icu.dev.test.normalizer.BasicTest#TestFilteredNormalizer2
+com.ibm.icu.dev.test.normalizer.BasicTest#TestFindFoldFCDExceptions
+com.ibm.icu.dev.test.normalizer.BasicTest#TestGetCombiningClass
+com.ibm.icu.dev.test.normalizer.BasicTest#TestGetDecomposition
+com.ibm.icu.dev.test.normalizer.BasicTest#TestGetEasyToUseInstance
+com.ibm.icu.dev.test.normalizer.BasicTest#TestGetRawDecomposition
+com.ibm.icu.dev.test.normalizer.BasicTest#TestHangulCompose
+com.ibm.icu.dev.test.normalizer.BasicTest#TestHangulDecomp
+com.ibm.icu.dev.test.normalizer.BasicTest#TestNone
+com.ibm.icu.dev.test.normalizer.BasicTest#TestNormalizerAPI
+com.ibm.icu.dev.test.normalizer.BasicTest#TestPreviousNext
+com.ibm.icu.dev.test.normalizer.BasicTest#TestPreviousNextJCI
+com.ibm.icu.dev.test.normalizer.BasicTest#TestQuickCheckPerCP
+com.ibm.icu.dev.test.normalizer.BasicTest#TestQuickCheckResultMAYBE
+com.ibm.icu.dev.test.normalizer.BasicTest#TestQuickCheckResultNO
+com.ibm.icu.dev.test.normalizer.BasicTest#TestQuickCheckResultYES
+com.ibm.icu.dev.test.normalizer.BasicTest#TestQuickCheckStringResult
+com.ibm.icu.dev.test.normalizer.BasicTest#TestReturnFailure
+com.ibm.icu.dev.test.normalizer.BasicTest#TestSerializedSet
+com.ibm.icu.dev.test.normalizer.BasicTest#TestSkippable
+com.ibm.icu.dev.test.normalizer.BasicTest#TestTibetan
+com.ibm.icu.dev.test.normalizer.BasicTest#TestVerisign
+com.ibm.icu.dev.test.normalizer.BasicTest#TestZeroIndex
+com.ibm.icu.dev.test.normalizer.ConformanceTest#TestConformance
+com.ibm.icu.dev.test.normalizer.ConformanceTest#TestConformance_3_2
+com.ibm.icu.dev.test.normalizer.NormalizationMonkeyTest#TestNormalize
+com.ibm.icu.dev.test.normalizer.NormalizerRegressionTests#TestJB4472
+com.ibm.icu.dev.test.normalizer.TestCanonicalIterator#TestBasic
+com.ibm.icu.dev.test.normalizer.TestCanonicalIterator#TestExhaustive
+com.ibm.icu.dev.test.normalizer.TestCanonicalIterator#TestSpeed
+com.ibm.icu.dev.test.normalizer.TestDeprecatedNormalizerAPI#TestComposedCharIter
+com.ibm.icu.dev.test.normalizer.TestDeprecatedNormalizerAPI#TestNormalizerAPI
+com.ibm.icu.dev.test.normalizer.TestDeprecatedNormalizerAPI#TestRoundTrip
+com.ibm.icu.dev.test.normalizer.UTS46Test#TestAPI
+com.ibm.icu.dev.test.normalizer.UTS46Test#TestNotSTD3
+com.ibm.icu.dev.test.normalizer.UTS46Test#TestSomeCases
+com.ibm.icu.dev.test.rbbi.BreakIteratorRegTest#TestRegUnreg
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestBug4068133
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestBug4086052
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestBug4097779
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestBug4097920
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestBug4098467Characters
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestBug4098467Words
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestBug4111338
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestBug4117554Lines
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestBug4143071
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestBug4146175Lines
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestBug4152117
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestBug4152416
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestBug4153072
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestCharacterBreak
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestEmptyString
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestEndBehavior
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestFilteredBreakIteratorBuilder
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestGetAvailableLocales
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestLettersAndDigits
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestLineBreak
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestLineBreakContractions
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestNullLocale
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestPreceding
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestSentenceInvariants
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestT5615
+com.ibm.icu.dev.test.rbbi.BreakIteratorTest#TestTitleBreak
+com.ibm.icu.dev.test.rbbi.RBBIAPITest#TestCloneEquals
+com.ibm.icu.dev.test.rbbi.RBBIAPITest#TestFirstNextFollowing
+com.ibm.icu.dev.test.rbbi.RBBIAPITest#TestGetSetText
+com.ibm.icu.dev.test.rbbi.RBBIAPITest#TestHashCode
+com.ibm.icu.dev.test.rbbi.RBBIAPITest#TestIsBoundary
+com.ibm.icu.dev.test.rbbi.RBBIAPITest#TestLastPreviousPreceding
+com.ibm.icu.dev.test.rbbi.RBBIAPITest#TestRuleStatus
+com.ibm.icu.dev.test.rbbi.RBBIAPITest#TestToString
+com.ibm.icu.dev.test.rbbi.RBBITestExtended#TestExtended
+com.ibm.icu.dev.test.rbbi.RBBITestMonkey#TestCharMonkey
+com.ibm.icu.dev.test.rbbi.RBBITestMonkey#TestLineMonkey
+com.ibm.icu.dev.test.rbbi.RBBITestMonkey#TestRTCharMonkey
+com.ibm.icu.dev.test.rbbi.RBBITestMonkey#TestRTLineMonkey
+com.ibm.icu.dev.test.rbbi.RBBITestMonkey#TestRTSentMonkey
+com.ibm.icu.dev.test.rbbi.RBBITestMonkey#TestRTWordMonkey
+com.ibm.icu.dev.test.rbbi.RBBITestMonkey#TestSentMonkey
+com.ibm.icu.dev.test.rbbi.RBBITestMonkey#TestWordMonkey
+com.ibm.icu.dev.test.rbbi.RBBITest#TestClone
+com.ibm.icu.dev.test.rbbi.RBBITest#TestCurrent
+com.ibm.icu.dev.test.rbbi.RBBITest#TestDefaultRuleBasedCharacterIteration
+com.ibm.icu.dev.test.rbbi.RBBITest#TestDefaultRuleBasedLineIteration
+com.ibm.icu.dev.test.rbbi.RBBITest#TestDefaultRuleBasedSentenceIteration
+com.ibm.icu.dev.test.rbbi.RBBITest#TestDefaultRuleBasedWordIteration
+com.ibm.icu.dev.test.rbbi.RBBITest#TestDump
+com.ibm.icu.dev.test.rbbi.RBBITest#TestEquals
+com.ibm.icu.dev.test.rbbi.RBBITest#TestFirst
+com.ibm.icu.dev.test.rbbi.RBBITest#TestFollowing
+com.ibm.icu.dev.test.rbbi.RBBITest#TestLast
+com.ibm.icu.dev.test.rbbi.RBBITest#TestPreceding
+com.ibm.icu.dev.test.rbbi.RBBITest#TestTailoredBreaks
+com.ibm.icu.dev.test.rbbi.RBBITest#TestThaiDictionaryBreakIterator
+com.ibm.icu.dev.test.search.SearchTest#TestBasic
+com.ibm.icu.dev.test.search.SearchTest#TestBreakIterator
+com.ibm.icu.dev.test.search.SearchTest#TestBreakIteratorCanonical
+com.ibm.icu.dev.test.search.SearchTest#TestCanonical
+com.ibm.icu.dev.test.search.SearchTest#TestCollator
+com.ibm.icu.dev.test.search.SearchTest#TestCollatorCanonical
+com.ibm.icu.dev.test.search.SearchTest#TestCompositeBoundaries
+com.ibm.icu.dev.test.search.SearchTest#TestCompositeBoundariesCanonical
+com.ibm.icu.dev.test.search.SearchTest#TestConstructor
+com.ibm.icu.dev.test.search.SearchTest#TestContraction
+com.ibm.icu.dev.test.search.SearchTest#TestContractionCanonical
+com.ibm.icu.dev.test.search.SearchTest#TestDiactricMatch
+com.ibm.icu.dev.test.search.SearchTest#TestGetMatch
+com.ibm.icu.dev.test.search.SearchTest#TestGetSetAttribute
+com.ibm.icu.dev.test.search.SearchTest#TestGetSetOffset
+com.ibm.icu.dev.test.search.SearchTest#TestGetSetOffsetCanonical
+com.ibm.icu.dev.test.search.SearchTest#TestIgnorable
+com.ibm.icu.dev.test.search.SearchTest#TestIndicPrefixMatch
+com.ibm.icu.dev.test.search.SearchTest#TestInitialization
+com.ibm.icu.dev.test.search.SearchTest#TestNormCanonical
+com.ibm.icu.dev.test.search.SearchTest#TestNormExact
+com.ibm.icu.dev.test.search.SearchTest#TestOpenClose
+com.ibm.icu.dev.test.search.SearchTest#TestOverlap
+com.ibm.icu.dev.test.search.SearchTest#TestOverlapCanonical
+com.ibm.icu.dev.test.search.SearchTest#TestPattern
+com.ibm.icu.dev.test.search.SearchTest#TestPatternCanonical
+com.ibm.icu.dev.test.search.SearchTest#TestReset
+com.ibm.icu.dev.test.search.SearchTest#TestSetMatch
+com.ibm.icu.dev.test.search.SearchTest#TestStrength
+com.ibm.icu.dev.test.search.SearchTest#TestStrengthCanonical
+com.ibm.icu.dev.test.search.SearchTest#TestSubClass
+com.ibm.icu.dev.test.search.SearchTest#TestSupplementary
+com.ibm.icu.dev.test.search.SearchTest#TestSupplementaryCanonical
+com.ibm.icu.dev.test.search.SearchTest#TestText
+com.ibm.icu.dev.test.search.SearchTest#TestTextCanonical
+com.ibm.icu.dev.test.search.SearchTest#TestUsingSearchCollator
+com.ibm.icu.dev.test.search.SearchTest#TestVariable
+com.ibm.icu.dev.test.search.SearchTest#TestVariableCanonical
+com.ibm.icu.dev.test.serializable.CoverageTest#run-everything
+com.ibm.icu.dev.test.shaping.ArabicShapingRegTest#TestEquals
+com.ibm.icu.dev.test.shaping.ArabicShapingRegTest#TestError
+com.ibm.icu.dev.test.shaping.ArabicShapingRegTest#TestPreflight
+com.ibm.icu.dev.test.shaping.ArabicShapingRegTest#TestShape
+com.ibm.icu.dev.test.shaping.ArabicShapingRegTest#TestStandard
+com.ibm.icu.dev.test.stringprep.IDNAConformanceTest#TestConformance
+com.ibm.icu.dev.test.stringprep.TestIDNARef#TestChaining
+com.ibm.icu.dev.test.stringprep.TestIDNARef#TestCompare
+com.ibm.icu.dev.test.stringprep.TestIDNARef#TestConformance
+com.ibm.icu.dev.test.stringprep.TestIDNARef#TestErrorCases
+com.ibm.icu.dev.test.stringprep.TestIDNARef#TestIDNToASCII
+com.ibm.icu.dev.test.stringprep.TestIDNARef#TestIDNToUnicode
+com.ibm.icu.dev.test.stringprep.TestIDNARef#TestNamePrepConformance
+com.ibm.icu.dev.test.stringprep.TestIDNARef#TestRootLabelSeparator
+com.ibm.icu.dev.test.stringprep.TestIDNARef#TestToASCII
+com.ibm.icu.dev.test.stringprep.TestIDNARef#TestToUnicode
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestChaining
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestCompare
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestCompareRefImpl
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestConformance
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestConvertIDNToASCII
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestConvertIDNToUnicode
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestConvertToASCII
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestConvertToUnicode
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestDebug
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestErrorCases
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestIDNACompare
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestIDNToASCII
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestIDNToUnicode
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestJB4475
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestJB4490
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestJB5273
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestLength
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestNamePrepConformance
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestRootLabelSeparator
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestToASCII
+com.ibm.icu.dev.test.stringprep.TestIDNA#TestToUnicode
+com.ibm.icu.dev.test.stringprep.TestStringPrepProfiles#TestProfiles
+com.ibm.icu.dev.test.stringprep.TestStringPrep#TestCISPrep
+com.ibm.icu.dev.test.stringprep.TestStringPrep#TestCoverage
+com.ibm.icu.dev.test.stringprep.TestStringPrep#TestCSPrep
+com.ibm.icu.dev.test.stringprep.TestStringPrep#TestGetError
+com.ibm.icu.dev.test.stringprep.TestStringPrep#TestGetInstance
+com.ibm.icu.dev.test.stringprep.TestStringPrep#TestNFS4MixedPrep
+com.ibm.icu.dev.test.stringprep.TestStringPrep#TestPrepare
+com.ibm.icu.dev.test.stringprep.TestStringPrep#TestSetPreContext
+com.ibm.icu.dev.test.stringprep.TestStringPrep#TestStringPrepParseException
+com.ibm.icu.dev.test.stringprep.TestStringPrep#TestStringPrepParseExceptionEquals
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestAllowedChars
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestAllowedLocales
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestAreConfusable
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestAreConfusable1
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestBug11635
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestCheck
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestCheckResultToString11447
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestComparator
+com.ibm.icu.dev.test.text.SpoofCheckerTest#testConfData
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestGetSetAllowedChars
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestGetSetChecks
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestGetSetChecks1
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestGetSkeleton
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestIdentifierInfo
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestInvisible
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestMixedNumbers
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestOpenFromSourceRules
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestRestrictionLevel
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestSkeleton
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestSpoofAPI
+com.ibm.icu.dev.test.text.SpoofCheckerTest#TestUSpoof
+com.ibm.icu.dev.test.timescale.TimeScaleAPITest#TestBigDecimalFromBigDecimal
+com.ibm.icu.dev.test.timescale.TimeScaleAPITest#TestBigDecimalFromDouble
+com.ibm.icu.dev.test.timescale.TimeScaleAPITest#TestBigDecimalFromLong
+com.ibm.icu.dev.test.timescale.TimeScaleAPITest#TestFromLong
+com.ibm.icu.dev.test.timescale.TimeScaleAPITest#TestGetTimeScale
+com.ibm.icu.dev.test.timescale.TimeScaleAPITest#TestToBigDecimalFromBigDecimal
+com.ibm.icu.dev.test.timescale.TimeScaleAPITest#TestToBigDecimalFromLong
+com.ibm.icu.dev.test.timescale.TimeScaleAPITest#TestToBigDecimalTrunc
+com.ibm.icu.dev.test.timescale.TimeScaleAPITest#TestToLong
+com.ibm.icu.dev.test.timescale.TimeScaleDataTest#TestDotNet
+com.ibm.icu.dev.test.timescale.TimeScaleDataTest#TestEpochOffsets
+com.ibm.icu.dev.test.timescale.TimeScaleDataTest#TestFromLimits
+com.ibm.icu.dev.test.timescale.TimeScaleDataTest#TestToLimits
+com.ibm.icu.dev.test.timescale.TimeScaleMonkeyTest#TestRoundTrip
+com.ibm.icu.dev.test.timezone.TimeZoneBoundaryTest#TestBoundaries
+com.ibm.icu.dev.test.timezone.TimeZoneBoundaryTest#TestNewRules
+com.ibm.icu.dev.test.timezone.TimeZoneOffsetLocalTest#TestGetOffsetAroundTransition
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4052967
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4073209
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4073215
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4084933
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4096952
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4109314
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4126678
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4151406
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4151429
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4154525
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4154537
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4154542
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4154650
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4159922
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4162593
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4173604
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4176686
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4184229
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#Test4208960
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#TestJ449
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#TestJ5134
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#TestJohannesburg
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#TestT5280
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#TestT5432
+com.ibm.icu.dev.test.timezone.TimeZoneRegression#TestT7107
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestBasicTimeZoneCoverage
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestGetSimpleRules
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestHasEquivalentTransitions
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestHistoricalRuleBasedTimeZone
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestOlsonTransition
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestRBTZTransition
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestSimpleRuleBasedTimeZone
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestSimpleTimeZoneCoverage
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestT6216
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestT6669
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestT8943
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestTimeZoneRuleCoverage
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestVTimeZoneCoverage
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestVTimeZoneHeaderProps
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestVTimeZoneParse
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestVTimeZoneRoundTrip
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestVTimeZoneRoundTripPartial
+com.ibm.icu.dev.test.timezone.TimeZoneRuleTest#TestVTimeZoneSimpleWrite
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestAlternateRules
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestCanonicalID
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestCountries
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestCoverage
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestCustomParse
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestDisplayName
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestDisplayName2
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestDisplayNamesMeta
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestDSTSavings
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestEquivalencyGroups
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestFebruary
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestFractionalDST
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestFreezable
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestGenericAPI
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestGetAvailableIDs913
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestGetAvailableIDsNew
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestGetIDForWindowsID
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestGetOffsetDate
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestGetRegion
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestGetWindowsID
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestHashCode
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestMark
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestOddTimeZoneNames
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestPRTOffset
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestRuleAPI
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestSetDefault
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestShortZoneIDs
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestSimpleTimeZoneSerialization
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestVariousAPI518
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestZoneFields
+com.ibm.icu.dev.test.timezone.TimeZoneTest#TestZoneMeta
+com.ibm.icu.dev.test.translit.AnyScriptTest#TestCommonDigits
+com.ibm.icu.dev.test.translit.AnyScriptTest#TestContext
+com.ibm.icu.dev.test.translit.AnyScriptTest#TestForWidth
+com.ibm.icu.dev.test.translit.AnyScriptTest#TestScripts
+com.ibm.icu.dev.test.translit.CompoundTransliteratorTest#TestConstruction
+com.ibm.icu.dev.test.translit.CompoundTransliteratorTest#TestGetTransliterator
+com.ibm.icu.dev.test.translit.CompoundTransliteratorTest#TestTransliterate
+com.ibm.icu.dev.test.translit.ErrorTest#TestRBTErrors
+com.ibm.icu.dev.test.translit.ErrorTest#TestTransliteratorErrors
+com.ibm.icu.dev.test.translit.ErrorTest#TestUnicodeSetErrors
+com.ibm.icu.dev.test.translit.JamoTest#TestJamo
+com.ibm.icu.dev.test.translit.JamoTest#TestPiecemeal
+com.ibm.icu.dev.test.translit.JamoTest#TestRealText
+com.ibm.icu.dev.test.translit.JamoTest#TestRoundTrip
+com.ibm.icu.dev.test.translit.RegexUtilitiesTest#TestBnf
+com.ibm.icu.dev.test.translit.RegexUtilitiesTest#TestCharacters
+com.ibm.icu.dev.test.translit.RegexUtilitiesTest#TestConstruction
+com.ibm.icu.dev.test.translit.RegexUtilitiesTest#TestUnicodeProperties
+com.ibm.icu.dev.test.translit.ReplaceableTest#Test
+com.ibm.icu.dev.test.translit.ReplaceableTest#Test5789
+com.ibm.icu.dev.test.translit.RoundTripTest#TestArabic
+com.ibm.icu.dev.test.translit.RoundTripTest#TestCyrillic
+com.ibm.icu.dev.test.translit.RoundTripTest#TestDevanagariLatin
+com.ibm.icu.dev.test.translit.RoundTripTest#Testel
+com.ibm.icu.dev.test.translit.RoundTripTest#TestGreek
+com.ibm.icu.dev.test.translit.RoundTripTest#TestGreekUNGEGN
+com.ibm.icu.dev.test.translit.RoundTripTest#TestHan
+com.ibm.icu.dev.test.translit.RoundTripTest#TestHangul
+com.ibm.icu.dev.test.translit.RoundTripTest#TestHangul2
+com.ibm.icu.dev.test.translit.RoundTripTest#TestHebrew
+com.ibm.icu.dev.test.translit.RoundTripTest#TestHiragana
+com.ibm.icu.dev.test.translit.RoundTripTest#TestInterIndic
+com.ibm.icu.dev.test.translit.RoundTripTest#TestJamo
+com.ibm.icu.dev.test.translit.RoundTripTest#TestKana
+com.ibm.icu.dev.test.translit.RoundTripTest#TestKatakana
+com.ibm.icu.dev.test.translit.RoundTripTest#TestSingle
+com.ibm.icu.dev.test.translit.RoundTripTest#TestThai
+com.ibm.icu.dev.test.translit.TestUnicodeProperty#TestBasic
+com.ibm.icu.dev.test.translit.TestUnicodeProperty#TestSymbolTable
+com.ibm.icu.dev.test.translit.TestUnicodeProperty#TestSymbolTable2
+com.ibm.icu.dev.test.translit.ThreadTest#TestAnyTranslit
+com.ibm.icu.dev.test.translit.ThreadTest#TestThreads
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestAliasInverseID
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestAlternateSyntax
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestAnchorMasking
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestAnchors
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestAny
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestAnyX
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestArbitraryVariableValues
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestBeginEnd
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestBeginEndToRules
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCaseMap
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCasing
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCharUtils
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestChinese
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCompoundFilter
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCompoundFilterID
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCompoundHex
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCompoundInverse
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCompoundInverseID
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCompoundKana
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCompoundLatinRT
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCompoundRBT
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestContext
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCopyJ476
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCoverage
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCreateInstance
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestCursorOffset
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestDevanagariLatinRT
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestDisplayName
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestEmptyContext
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestEscape
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestFilterIDs
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestFiltering
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestFunction
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestGetAvailableTargets
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestGetAvailableVariants
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestGurmukhiDevanagari
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestHalfwidthFullwidth
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestHangul
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestHiraganaKatakana
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestIDForms
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestIncrementalProgress
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestInlineSet
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestInstantiation
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestInterIndic
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestInvalidBackRef
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestInvalidPostContext
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestJ277
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestJ329
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestKeyboard
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestKeyboard2
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestKeyboard3
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestLiberalizedID
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestLocaleInstantiation
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestLocaleResource
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestMulticharStringSet
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestNameMap
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestNewEngine
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestNextLine
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestNFDChainRBT
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestNormalizationTransliterator
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestNullInverse
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestOutputSet
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestParseError
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestPatternQuoting
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestPatternWhitespace
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestPositionAPI
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestPositionHandling
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestPropertySet
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestQuantifiedSegment
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestQuantifier
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestRegisterAlias
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestRegistry
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestRemove
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestRuleBasedInverse
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestSanskritLatinRT
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestScriptAllCodepoints
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestSegments
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestSimpleRules
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestSourceTargetSet
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestSpecialCases
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestSTV
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestSupplemental
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestSurrogateCasing
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestT5160
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestTeluguLatinRT
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestThai
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestTitleAccents
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestToRules
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestToRulesMark
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestUndefinedVariable
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestUserFunction
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestVariableNames
+com.ibm.icu.dev.test.translit.TransliteratorTest#TestVariableRange
+com.ibm.icu.dev.test.translit.UnicodeMapTest#TestAMonkey
+com.ibm.icu.dev.test.translit.UnicodeMapTest#TestCloneAsThawed11721
+com.ibm.icu.dev.test.translit.UnicodeMapTest#TestIterations
+com.ibm.icu.dev.test.translit.UnicodeMapTest#TestModify
+com.ibm.icu.dev.test.translit.UnicodeMapTest#TestRemove
+com.ibm.icu.dev.test.util.BytesTrieTest#Test00Builder
+com.ibm.icu.dev.test.util.BytesTrieTest#Test10Empty
+com.ibm.icu.dev.test.util.BytesTrieTest#Test11_a
+com.ibm.icu.dev.test.util.BytesTrieTest#Test12_a_ab
+com.ibm.icu.dev.test.util.BytesTrieTest#Test20ShortestBranch
+com.ibm.icu.dev.test.util.BytesTrieTest#Test21Branches
+com.ibm.icu.dev.test.util.BytesTrieTest#Test22LongSequence
+com.ibm.icu.dev.test.util.BytesTrieTest#Test23LongBranch
+com.ibm.icu.dev.test.util.BytesTrieTest#Test24ValuesForState
+com.ibm.icu.dev.test.util.BytesTrieTest#Test30Compact
+com.ibm.icu.dev.test.util.BytesTrieTest#Test40GetUniqueValue
+com.ibm.icu.dev.test.util.BytesTrieTest#Test41GetNextBytes
+com.ibm.icu.dev.test.util.BytesTrieTest#Test50IteratorFromBranch
+com.ibm.icu.dev.test.util.BytesTrieTest#Test51IteratorFromLinearMatch
+com.ibm.icu.dev.test.util.BytesTrieTest#Test52TruncatingIteratorFromRoot
+com.ibm.icu.dev.test.util.BytesTrieTest#Test53TruncatingIteratorFromLinearMatchShort
+com.ibm.icu.dev.test.util.BytesTrieTest#Test54TruncatingIteratorFromLinearMatchLong
+com.ibm.icu.dev.test.util.BytesTrieTest#Test59IteratorFromBytes
+com.ibm.icu.dev.test.util.CharsTrieTest#Test00Builder
+com.ibm.icu.dev.test.util.CharsTrieTest#Test10Empty
+com.ibm.icu.dev.test.util.CharsTrieTest#Test11_a
+com.ibm.icu.dev.test.util.CharsTrieTest#Test12_a_ab
+com.ibm.icu.dev.test.util.CharsTrieTest#Test20ShortestBranch
+com.ibm.icu.dev.test.util.CharsTrieTest#Test21Branches
+com.ibm.icu.dev.test.util.CharsTrieTest#Test22LongSequence
+com.ibm.icu.dev.test.util.CharsTrieTest#Test23LongBranch
+com.ibm.icu.dev.test.util.CharsTrieTest#Test24ValuesForState
+com.ibm.icu.dev.test.util.CharsTrieTest#Test30Compact
+com.ibm.icu.dev.test.util.CharsTrieTest#Test31FirstForCodePoint
+com.ibm.icu.dev.test.util.CharsTrieTest#Test32NextForCodePoint
+com.ibm.icu.dev.test.util.CharsTrieTest#Test37LargeTrie
+com.ibm.icu.dev.test.util.CharsTrieTest#Test40GetUniqueValue
+com.ibm.icu.dev.test.util.CharsTrieTest#Test41GetNextChars
+com.ibm.icu.dev.test.util.CharsTrieTest#Test50IteratorFromBranch
+com.ibm.icu.dev.test.util.CharsTrieTest#Test51IteratorFromLinearMatch
+com.ibm.icu.dev.test.util.CharsTrieTest#Test52TruncatingIteratorFromRoot
+com.ibm.icu.dev.test.util.CharsTrieTest#Test53TruncatingIteratorFromLinearMatchShort
+com.ibm.icu.dev.test.util.CharsTrieTest#Test54TruncatingIteratorFromLinearMatchLong
+com.ibm.icu.dev.test.util.CharsTrieTest#Test59IteratorFromChars
+com.ibm.icu.dev.test.util.CompactArrayTest#TestByteArrayCoverage
+com.ibm.icu.dev.test.util.CompactArrayTest#TestCharArrayCoverage
+com.ibm.icu.dev.test.util.CurrencyTest#TestAPI
+com.ibm.icu.dev.test.util.CurrencyTest#TestAvailableCurrencyCodes
+com.ibm.icu.dev.test.util.CurrencyTest#TestCoverage
+com.ibm.icu.dev.test.util.CurrencyTest#TestCurrencyData
+com.ibm.icu.dev.test.util.CurrencyTest#TestCurrencyDisplayNames
+com.ibm.icu.dev.test.util.CurrencyTest#TestCurrencyInfoCtor
+com.ibm.icu.dev.test.util.CurrencyTest#TestCurrencyKeyword
+com.ibm.icu.dev.test.util.CurrencyTest#TestCurrencyMetaInfo
+com.ibm.icu.dev.test.util.CurrencyTest#testCurrencyMetaInfoRanges
+com.ibm.icu.dev.test.util.CurrencyTest#testCurrencyMetaInfoRangesWithLongs
+com.ibm.icu.dev.test.util.CurrencyTest#TestDeprecatedCurrencyFormat
+com.ibm.icu.dev.test.util.CurrencyTest#TestGetAvailableCurrencies
+com.ibm.icu.dev.test.util.CurrencyTest#TestGetDisplayName
+com.ibm.icu.dev.test.util.CurrencyTest#TestGetNumericCode
+com.ibm.icu.dev.test.util.CurrencyTest#TestIsAvailable
+com.ibm.icu.dev.test.util.CurrencyTest#TestNames
+com.ibm.icu.dev.test.util.CurrencyTest#TestRegistration
+com.ibm.icu.dev.test.util.CurrencyTest#TestWithTender
+com.ibm.icu.dev.test.util.DebugUtilitiesTest#TestStrings
+com.ibm.icu.dev.test.util.GenderInfoTest#TestEmpty
+com.ibm.icu.dev.test.util.GenderInfoTest#TestFallback
+com.ibm.icu.dev.test.util.GenderInfoTest#TestOne
+com.ibm.icu.dev.test.util.GenderInfoTest#TestOther
+com.ibm.icu.dev.test.util.ICUBinaryTest#TestReadHeader
+com.ibm.icu.dev.test.util.ICUResourceBundleCollationTest#TestFunctionalEquivalent
+com.ibm.icu.dev.test.util.ICUResourceBundleCollationTest#TestGetWithFallback
+com.ibm.icu.dev.test.util.ICUResourceBundleCollationTest#TestKeywordValues
+com.ibm.icu.dev.test.util.ICUResourceBundleCollationTest#TestOpen
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestAlias
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestAliases
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestAliasFallback
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestBasicTypes
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestCircularAliases
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestCLDRStyleAliases
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestCoverage
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestFunctionalEquivalent
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestGetResources
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestGetWithFallback
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestICUGetKeysAtTopLevel
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestICUGetKeysForResourceItem
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestJavaULocaleBundleLoading
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestJB3879
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestJB4102
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestLoadingStatus
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestLocaleDisplayNames
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestNorwegian
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestOpen
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestPreventFallback
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestResourceBundleWrapper
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestT6844
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestTable32
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestUResourceBundleCoverage
+com.ibm.icu.dev.test.util.ICUResourceBundleTest#TestXPathAlias
+com.ibm.icu.dev.test.util.ICUServiceTest#TestAPI
+com.ibm.icu.dev.test.util.ICUServiceTest#TestCoverage
+com.ibm.icu.dev.test.util.ICUServiceTest#TestLocale
+com.ibm.icu.dev.test.util.ICUServiceTest#TestWrapFactory
+com.ibm.icu.dev.test.util.ICUServiceThreadTest#Test00_ConcurrentGet
+com.ibm.icu.dev.test.util.ICUServiceThreadTest#Test01_ConcurrentGetVisible
+com.ibm.icu.dev.test.util.ICUServiceThreadTest#Test02_ConcurrentGetDisplay
+com.ibm.icu.dev.test.util.ICUServiceThreadTest#Test03_ConcurrentRegUnreg
+com.ibm.icu.dev.test.util.ICUServiceThreadTest#Test04_WitheringService
+com.ibm.icu.dev.test.util.ICUServiceThreadTest#Test05_ConcurrentEverything
+com.ibm.icu.dev.test.util.LocaleAliasCollationTest#TestCollation
+com.ibm.icu.dev.test.util.LocaleAliasTest#TestCalendar
+com.ibm.icu.dev.test.util.LocaleAliasTest#TestDateFormat
+com.ibm.icu.dev.test.util.LocaleAliasTest#TestDisplayName
+com.ibm.icu.dev.test.util.LocaleAliasTest#TestULocale
+com.ibm.icu.dev.test.util.LocaleAliasTest#TestUResourceBundle
+com.ibm.icu.dev.test.util.LocaleBuilderTest#TestLocaleBuilder
+com.ibm.icu.dev.test.util.LocaleBuilderTest#TestSetLocale
+com.ibm.icu.dev.test.util.LocaleDataTest#TestCoverage
+com.ibm.icu.dev.test.util.LocaleDataTest#TestEnglishExemplarCharacters
+com.ibm.icu.dev.test.util.LocaleDataTest#TestExemplarSet
+com.ibm.icu.dev.test.util.LocaleDataTest#TestExemplarSet2
+com.ibm.icu.dev.test.util.LocaleDataTest#TestExemplarSetTypes
+com.ibm.icu.dev.test.util.LocaleDataTest#TestFallback
+com.ibm.icu.dev.test.util.LocaleDataTest#TestLocaleDisplayPattern
+com.ibm.icu.dev.test.util.LocaleDataTest#TestMeasurementSystem
+com.ibm.icu.dev.test.util.LocaleDataTest#TestPaperSize
+com.ibm.icu.dev.test.util.LocaleMatcherTest#Test8288
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testAsymmetry
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testBasics
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testBestMatchForTraditionalChinese
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testChinese
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testEmpty
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testenGB
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testExactMatches
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testFallback
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testFallbacks
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testGetBestMatchForList_closeEnoughMatchOnMaximized
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testGetBestMatchForList_exactMatch
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testGetBestMatchForList_matchOnMaximized
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testGetBestMatchForList_matchOnMaximized2
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testGetBestMatchForList_noMatchOnMaximized
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testGetBestMatchForList_simpleVariantMatch
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testGetBestMatchForPortuguese
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testGetBestMatch_googlePseudoLocales
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testGetBestMatch_regionDistance
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testHK
+com.ibm.icu.dev.test.util.LocaleMatcherTest#TestLocaleMatcherCoverage
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testMatch_exact
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testMatchGrandfatheredCode
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testMatch_matchOnMazimized
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testMatch_none
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testOverrideData
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testParentLocales
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testPerf
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testRegionalSpecials
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testSpecials
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testUndefined
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testVariantWithScriptMatch
+com.ibm.icu.dev.test.util.LocaleMatcherTest#testVariantWithScriptMatch2
+com.ibm.icu.dev.test.util.LocalePriorityListTest#testLanguagePriorityList
+com.ibm.icu.dev.test.util.RegionTest#TestAvailableTerritories
+com.ibm.icu.dev.test.util.RegionTest#TestContains
+com.ibm.icu.dev.test.util.RegionTest#TestGetContainedRegions
+com.ibm.icu.dev.test.util.RegionTest#TestGetContainedRegionsWithType
+com.ibm.icu.dev.test.util.RegionTest#TestGetContainingRegion
+com.ibm.icu.dev.test.util.RegionTest#TestGetContainingRegionWithType
+com.ibm.icu.dev.test.util.RegionTest#TestGetInstanceInt
+com.ibm.icu.dev.test.util.RegionTest#TestGetInstanceString
+com.ibm.icu.dev.test.util.RegionTest#TestGetPreferredValues
+com.ibm.icu.dev.test.util.RegionTest#TestKnownRegions
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestBigPlaceholder
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestFormatReplaceNoOptimization
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestFormatReplaceNoOptimizationLeadingPlaceholderUsedTwice
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestFormatReplaceNoOptimizationLeadingText
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestFormatReplaceNoOptimizationNoOffsets
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestFormatReplaceOptimization
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestFormatReplaceOptimizationNoOffsets
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestFormatUseAppendToAsPlaceholder
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestGetTextWithNoPlaceholders
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestOnePlaceholder
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestQuotingLikeMessageFormat
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestSyntaxErrors
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestTooFewPlaceholderValues
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestWithNoPlaceholders
+com.ibm.icu.dev.test.util.SimplePatternFormatterTest#TestWithPlaceholders
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestAdd_int
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestAdd_int_int
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestBug4423
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestCharAt
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestComplement_int_int
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestComplement_String
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestConstructors
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestContains_int
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestContains_int_int
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestContainsNone
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestCountTokens
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestCountTokensNoCoalesce
+com.ibm.icu.dev.test.util.StringTokenizerTest#Test_GeneratePattern
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestGetRegexEquivalent
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestGetSingleCP
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestIndexOf
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestMatches
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestMatchesAt
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestMatchRest
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestNextDelimiterToken
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestNextNewDelimiters
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestNextNonDelimiterToken
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestNoCoalesce
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestRemove
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestRemoveAllString
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestRetain_int_int
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestRetain_String
+com.ibm.icu.dev.test.util.StringTokenizerTest#TestSupplementary
+com.ibm.icu.dev.test.util.TextTrieMapTest#TestCaseInsensitive
+com.ibm.icu.dev.test.util.TextTrieMapTest#TestCaseSensitive
+com.ibm.icu.dev.test.util.Trie2Test#TestCharSequenceIterator
+com.ibm.icu.dev.test.util.Trie2Test#TestRanges
+com.ibm.icu.dev.test.util.Trie2Test#TestTrie2API
+com.ibm.icu.dev.test.util.Trie2Test#TestTrie2WritableAPI
+com.ibm.icu.dev.test.util.TrieTest#TestDummyCharTrie
+com.ibm.icu.dev.test.util.TrieTest#TestDummyIntTrie
+com.ibm.icu.dev.test.util.TrieTest#TestIntTrie
+com.ibm.icu.dev.test.util.ULocaleCollationTest#TestCollator
+com.ibm.icu.dev.test.util.ULocaleCollationTest#TestIllformedLocale
+com.ibm.icu.dev.test.util.ULocaleCollationTest#TestNameList
+com.ibm.icu.dev.test.util.ULocaleTest#Test4735
+com.ibm.icu.dev.test.util.ULocaleTest#TestAcceptLanguage
+com.ibm.icu.dev.test.util.ULocaleTest#TestAcceptLanguage2
+com.ibm.icu.dev.test.util.ULocaleTest#TestAddLikelySubtags
+com.ibm.icu.dev.test.util.ULocaleTest#TestBamBm
+com.ibm.icu.dev.test.util.ULocaleTest#TestBasicGetters
+com.ibm.icu.dev.test.util.ULocaleTest#TestCalendar
+com.ibm.icu.dev.test.util.ULocaleTest#TestCanonicalization
+com.ibm.icu.dev.test.util.ULocaleTest#TestCategoryDefault
+com.ibm.icu.dev.test.util.ULocaleTest#TestChineseToLocale
+com.ibm.icu.dev.test.util.ULocaleTest#TestCLDRVersion
+com.ibm.icu.dev.test.util.ULocaleTest#TestComparable
+com.ibm.icu.dev.test.util.ULocaleTest#TestCoverage
+com.ibm.icu.dev.test.util.ULocaleTest#TestDateFormat
+com.ibm.icu.dev.test.util.ULocaleTest#TestDisplayKeyword
+com.ibm.icu.dev.test.util.ULocaleTest#TestDisplayNames
+com.ibm.icu.dev.test.util.ULocaleTest#TestDisplayWithKeyword
+com.ibm.icu.dev.test.util.ULocaleTest#TestExtension
+com.ibm.icu.dev.test.util.ULocaleTest#TestForLanguageTag
+com.ibm.icu.dev.test.util.ULocaleTest#TestForLocale
+com.ibm.icu.dev.test.util.ULocaleTest#TestGetAvailable
+com.ibm.icu.dev.test.util.ULocaleTest#TestGetFallback
+com.ibm.icu.dev.test.util.ULocaleTest#TestIsRightToLeft
+com.ibm.icu.dev.test.util.ULocaleTest#TestJavaLocaleCompatibility
+com.ibm.icu.dev.test.util.ULocaleTest#TestJB3962
+com.ibm.icu.dev.test.util.ULocaleTest#TestMinimize
+com.ibm.icu.dev.test.util.ULocaleTest#TestNumberFormat
+com.ibm.icu.dev.test.util.ULocaleTest#TestObsoleteNames
+com.ibm.icu.dev.test.util.ULocaleTest#TestOrientation
+com.ibm.icu.dev.test.util.ULocaleTest#TestPrefixes
+com.ibm.icu.dev.test.util.ULocaleTest#TestSetULocaleKeywords
+com.ibm.icu.dev.test.util.ULocaleTest#TestToLanguageTag
+com.ibm.icu.dev.test.util.ULocaleTest#TestToLegacyKey
+com.ibm.icu.dev.test.util.ULocaleTest#TestToLegacyType
+com.ibm.icu.dev.test.util.ULocaleTest#TestToLocale
+com.ibm.icu.dev.test.util.ULocaleTest#TestToUnicodeLocaleKey
+com.ibm.icu.dev.test.util.ULocaleTest#TestToUnicodeLocaleType
+com.ibm.icu.dev.test.util.ULocaleTest#TestUnicodeLocaleExtension
+com.ibm.icu.dev.test.util.UtilityTest#TestAssert
+com.ibm.icu.dev.test.util.UtilityTest#TestByteArrayWrapper
+com.ibm.icu.dev.test.util.UtilityTest#TestCaseInsensitiveString
+com.ibm.icu.dev.test.util.UtilityTest#TestCompareUnsigned
+com.ibm.icu.dev.test.util.UtilityTest#TestFormat
+com.ibm.icu.dev.test.util.UtilityTest#TestHighBit
+com.ibm.icu.dev.test.util.UtilityTest#TestSourceLocation
+com.ibm.icu.dev.test.util.UtilityTest#TestUnescape
+com.ibm.icu.dev.test.util.UtilityTest#TestUnicodeSet
+com.ibm.icu.dev.test.util.VersionInfoTest#TestComparable
+com.ibm.icu.dev.test.util.VersionInfoTest#TestCompare
+com.ibm.icu.dev.test.util.VersionInfoTest#TestGetter
+com.ibm.icu.dev.test.util.VersionInfoTest#TestInstance
+com.ibm.icu.dev.test.util.VersionInfoTest#TestMultiThread
+com.ibm.icu.dev.test.util.VersionInfoTest#TesttoString
diff --git a/tests/tests/icu/tools/android/icu/cts/tools/GenerateTestCaseXML.java b/tests/tests/icu/tools/android/icu/cts/tools/GenerateTestCaseXML.java
new file mode 100644
index 0000000..f9dc6e0
--- /dev/null
+++ b/tests/tests/icu/tools/android/icu/cts/tools/GenerateTestCaseXML.java
@@ -0,0 +1,245 @@
+package android.icu.cts.tools;
+
+import com.google.common.base.Joiner;
+import com.android.compatibility.common.util.AbiUtils;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+/**
+ * Generates an XML file suitable for CTS version 1.
+ *
+ * <p>A lot of this code is copied from {@code tools/utils/DescriptionGenerator.java} and
+ * {@code tools/utils/CollectAllTests.java}. Ideally, that code should have been refactored to make
+ * it usable in this case but that would have taken quite a lot of time and given that CTS version 1
+ * is going away anyway and CTS version 2 doesn't need an XML file this seemed like the best
+ * approach.
+ */
+public class GenerateTestCaseXML {
+
+ private static final String ATTRIBUTE_RUNNER = "runner";
+
+ private static final String ATTRIBUTE_PACKAGE = "appPackageName";
+
+ private static final String ATTRIBUTE_NS = "appNameSpace";
+
+ static final String TAG_PACKAGE = "TestPackage";
+
+ static final String TAG_SUITE = "TestSuite";
+
+ static final String TAG_CASE = "TestCase";
+
+ static final String TAG_TEST = "Test";
+
+ static final String ATTRIBUTE_NAME_VERSION = "version";
+
+ static final String ATTRIBUTE_VALUE_VERSION = "1.0";
+
+ static final String ATTRIBUTE_NAME_FRAMEWORK = "AndroidFramework";
+
+ static final String ATTRIBUTE_VALUE_FRAMEWORK = "Android 1.0";
+
+ static final String ATTRIBUTE_NAME = "name";
+
+ static final String ATTRIBUTE_ABIS = "abis";
+
+ public static void main(String[] args) throws Exception {
+ if (args.length != 3) {
+ throw new IllegalStateException(
+ "... <test-list-path> <architecture> <output-file-path");
+ }
+
+ String testListPath = args[0];
+ String architecture = args[1];
+ String outputFilePath = args[2];
+
+ File testListFile = new File(testListPath);
+ String abis = Joiner.on(" ").join(AbiUtils.getAbisForArch(architecture));
+ File testCaseXML = new File(outputFilePath);
+
+ TestSuite root = new TestSuite("");
+ try (FileReader fileReader = new FileReader(testListFile);
+ BufferedReader reader = new BufferedReader(fileReader)) {
+
+ String line;
+ while ((line = reader.readLine()) != null) {
+ int index = line.indexOf('#');
+ String className = line.substring(0, index);
+ String methodName = line.substring(index + 1);
+
+ root.addTest(className, methodName);
+ }
+ }
+
+ Document mDoc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+
+ Element testPackageElem = mDoc.createElement(TAG_PACKAGE);
+ mDoc.appendChild(testPackageElem);
+
+ setAttribute(testPackageElem, ATTRIBUTE_NAME_VERSION, ATTRIBUTE_VALUE_VERSION);
+ setAttribute(testPackageElem, ATTRIBUTE_NAME_FRAMEWORK, ATTRIBUTE_VALUE_FRAMEWORK);
+ setAttribute(testPackageElem, ATTRIBUTE_NAME, "CtsIcuTestCases");
+ setAttribute(testPackageElem, ATTRIBUTE_RUNNER, ".IcuTestRunner");
+ setAttribute(testPackageElem, ATTRIBUTE_PACKAGE, "com.ibm.icu.dev.test");
+ setAttribute(testPackageElem, ATTRIBUTE_NS, "android.icu.cts");
+
+ root.addChildInformation(testPackageElem, abis);
+
+ Transformer t = TransformerFactory.newInstance().newTransformer();
+
+ // enable indent in result file
+ t.setOutputProperty("indent", "yes");
+ t.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
+
+ File directory = testCaseXML.getParentFile();
+ if (!directory.exists() && !directory.mkdirs()) {
+ throw new IOException("Could not create directory: " + directory);
+ }
+
+ t.transform(new DOMSource(mDoc), new StreamResult(new FileOutputStream(testCaseXML)));
+ }
+
+ /**
+ * Set the attribute of element.
+ *
+ * @param elem The element to be set attribute.
+ * @param name The attribute name.
+ * @param value The attribute value.
+ */
+ protected static void setAttribute(Node elem, String name, String value) {
+ Attr attr = elem.getOwnerDocument().createAttribute(name);
+ attr.setNodeValue(value);
+
+ elem.getAttributes().setNamedItem(attr);
+ }
+
+
+ /**
+ * The contents of a {@link TestSuite}, may be a {@link TestSuite} or a {@link TestCase}.
+ */
+ private static abstract class SuiteContent {
+
+ private final String name;
+
+ private SuiteContent(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public abstract void addInformation(Element parent, String abis);
+ }
+
+ public static class TestSuite extends SuiteContent {
+
+ private Map<String, SuiteContent> name2Content = new TreeMap<>();
+
+ public TestSuite(String name) {
+ super(name);
+ }
+
+ public TestSuite getSuite(String name) {
+ return getSuiteContent(TestSuite.class, name);
+ }
+
+ public TestCase getTestCase(String name) {
+ return getSuiteContent(TestCase.class, name);
+ }
+
+ private <S extends SuiteContent> S getSuiteContent(Class<? extends S> contentClass,
+ String name) {
+ SuiteContent content = name2Content.get(name);
+ S s;
+ if (content == null) {
+ try {
+ s = contentClass.getConstructor(String.class).newInstance(name);
+ } catch (Exception e) {
+ throw new RuntimeException("Could not create instance of " + contentClass, e);
+ }
+ name2Content.put(name, s);
+ } else if (contentClass.isInstance(content)) {
+ s = contentClass.cast(content);
+ } else {
+ throw new IllegalStateException("Expected " + this
+ + " to have a TestSuite called '" + name + "' but has "
+ + content + " instead");
+ }
+ return s;
+ }
+
+ public void addTest(String className, String methodName) {
+ int index = className.indexOf('.');
+ if (index == -1) {
+ TestCase testCase = getTestCase(className);
+ testCase.addMethod(methodName);
+ } else {
+ String suiteName = className.substring(0, index);
+ TestSuite childSuite = getSuite(suiteName);
+ childSuite.addTest(className.substring(index + 1), methodName);
+ }
+ }
+
+ @Override
+ public void addInformation(Element parent, String abis) {
+ Element suiteElement = appendElement(parent, TAG_SUITE);
+
+ setAttribute(suiteElement, ATTRIBUTE_NAME, getName());
+
+ addChildInformation(suiteElement, abis);
+ }
+
+ public void addChildInformation(Element parent, String abis) {
+ for (SuiteContent suiteContent : name2Content.values()) {
+ suiteContent.addInformation(parent, abis);
+ }
+ }
+ }
+
+ public static class TestCase extends SuiteContent {
+
+ private final Set<String> methods = new TreeSet<>();
+
+ public TestCase(String name) {
+ super(name);
+ }
+
+ @Override
+ public void addInformation(Element parent, String abis) {
+ Element testCaseElement = appendElement(parent, TAG_CASE);
+ setAttribute(testCaseElement, ATTRIBUTE_NAME, getName());
+ setAttribute(testCaseElement, ATTRIBUTE_ABIS, abis);
+
+ for (String method : methods) {
+ Element testElement = appendElement(testCaseElement, TAG_TEST);
+ setAttribute(testElement, ATTRIBUTE_NAME, method);
+ }
+ }
+
+ public void addMethod(String methodName) {
+ methods.add(methodName);
+ }
+ }
+
+ private static Element appendElement(Element parent, String tagName) {
+ Element testCaseElement = parent.getOwnerDocument().createElement(tagName);
+ parent.appendChild(testCaseElement);
+ return testCaseElement;
+ }
+}
diff --git a/tests/tests/icu/tools/update-test-list.sh b/tests/tests/icu/tools/update-test-list.sh
new file mode 100755
index 0000000..e73cbfb
--- /dev/null
+++ b/tests/tests/icu/tools/update-test-list.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# Extract a flat list of tests from a CTSv2 generated host log for use when generating the CTSv1
+# required list of tests.
+ZIP=$1
+
+TMP_DIR=/tmp/update-test-list-$$
+mkdir -p $TMP_DIR
+
+unzip $ZIP host_log.txt -d $TMP_DIR
+
+HOST_LOG=$TMP_DIR/host_log.txt
+
+ICU_DIR=$(dirname $0)/../
+
+grep "ModuleListener.testStarted" $HOST_LOG \
+ | sed 's%.*(\([^#]\+\)#\([^)]\+\))%\1#\2%' | sort > $ICU_DIR/test-list.txt
diff --git a/tests/tests/jni/libjnitest/android_jni_cts_LinkerNamespacesTest.cpp b/tests/tests/jni/libjnitest/android_jni_cts_LinkerNamespacesTest.cpp
index b43d05a..acc3b98 100644
--- a/tests/tests/jni/libjnitest/android_jni_cts_LinkerNamespacesTest.cpp
+++ b/tests/tests/jni/libjnitest/android_jni_cts_LinkerNamespacesTest.cpp
@@ -61,6 +61,7 @@
"libOpenSLES.so",
"libRS.so",
"libstdc++.so",
+ "libvulkan.so",
"libwebviewchromium_plat_support.so",
"libz.so"
};
diff --git a/tests/tests/media/res/raw/testvideo_with_2_subtitle_tracks.mp4 b/tests/tests/media/res/raw/testvideo_with_2_subtitle_tracks.mp4
new file mode 100755
index 0000000..b8dce17
--- /dev/null
+++ b/tests/tests/media/res/raw/testvideo_with_2_subtitle_tracks.mp4
Binary files differ
diff --git a/tests/tests/media/res/raw/testvideo_with_2_subtitles.3gp b/tests/tests/media/res/raw/testvideo_with_2_timedtext_tracks.3gp
similarity index 100%
rename from tests/tests/media/res/raw/testvideo_with_2_subtitles.3gp
rename to tests/tests/media/res/raw/testvideo_with_2_timedtext_tracks.3gp
Binary files differ
diff --git a/tests/tests/media/res/values/exifinterface.xml b/tests/tests/media/res/values/exifinterface.xml
index 8fc6adc..eb13ff3 100644
--- a/tests/tests/media/res/values/exifinterface.xml
+++ b/tests/tests/media/res/values/exifinterface.xml
@@ -76,9 +76,9 @@
<item>0</item>
</array>
<array name="lg_g4_iso_800_dng">
- <item>false</item>
- <item>0</item>
- <item>0</item>
+ <item>true</item>
+ <item>256</item>
+ <item>144</item>
<item>true</item>
<item>53.834507</item>
<item>10.69585</item>
diff --git a/tests/tests/media/src/android/media/cts/AudioRecordNotificationTest.java b/tests/tests/media/src/android/media/cts/AudioRecordNotificationTest.java
index d048c53..44a7115 100644
--- a/tests/tests/media/src/android/media/cts/AudioRecordNotificationTest.java
+++ b/tests/tests/media/src/android/media/cts/AudioRecordNotificationTest.java
@@ -18,6 +18,7 @@
import android.content.pm.PackageManager;
import android.cts.util.CtsAndroidTestCase;
+import android.media.AudioDeviceInfo;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioRecord;
@@ -113,8 +114,8 @@
// verify our recording shows as one of the recording configs
assertTrue("Test source/session not amongst active record configurations",
- verifyAudioSourceSession(TEST_AUDIO_SOURCE, mAudioRecord.getAudioSessionId(),
- configs));
+ verifyAudioConfig(TEST_AUDIO_SOURCE, mAudioRecord.getAudioSessionId(),
+ mAudioRecord.getFormat(), mAudioRecord.getRoutedDevice(), configs));
// stopping recording: verify there are less active record configurations
mAudioRecord.stop();
@@ -179,16 +180,36 @@
@Override
public void onRecordConfigChanged() {
mCalled = true;
- mParamMatch = verifyAudioSourceSession(mTestSource, mTestSession,
- mAM.getActiveRecordConfigurations());
+ mParamMatch = verifyAudioConfig(mTestSource, mTestSession, mAudioRecord.getFormat(),
+ mAudioRecord.getRoutedDevice(), mAM.getActiveRecordConfigurations());
}
}
- private static boolean verifyAudioSourceSession(int source, int session,
- AudioRecordConfiguration[] configs) {
+ private static boolean deviceMatch(AudioDeviceInfo devJoe, AudioDeviceInfo devJeff) {
+ return ((devJoe.getId() == devJeff.getId()
+ && (devJoe.getAddress() == devJeff.getAddress())
+ && (devJoe.getType() == devJeff.getType())));
+ }
+
+ private static boolean verifyAudioConfig(int source, int session, AudioFormat format,
+ AudioDeviceInfo device, AudioRecordConfiguration[] configs) {
for (int i = 0 ; i < configs.length ; i++) {
- if ((configs[i].getClientAudioSource() == source) &&
- (configs[i].getClientAudioSessionId() == session)) {
+ if ((configs[i].getClientAudioSource() == source)
+ && (configs[i].getClientAudioSessionId() == session)
+ // test the client format matches that requested (same as the AudioRecord's)
+ && (configs[i].getClientFormat().getEncoding() == format.getEncoding())
+ && (configs[i].getClientFormat().getSampleRate() == format.getSampleRate())
+ && (configs[i].getClientFormat().getChannelMask() == format.getChannelMask())
+ && (configs[i].getClientFormat().getChannelIndexMask() ==
+ format.getChannelIndexMask())
+ // test the device format is configured
+ && (configs[i].getFormat().getEncoding() != AudioFormat.ENCODING_INVALID)
+ && (configs[i].getFormat().getSampleRate() > 0)
+ // for the channel mask, either the position or index-based value must be valid
+ && ((configs[i].getFormat().getChannelMask() != AudioFormat.CHANNEL_INVALID)
+ || (configs[i].getFormat().getChannelIndexMask() !=
+ AudioFormat.CHANNEL_INVALID))
+ && deviceMatch(device, configs[i].getAudioDevice())) {
return true;
}
}
diff --git a/tests/tests/media/src/android/media/cts/DecoderTest.java b/tests/tests/media/src/android/media/cts/DecoderTest.java
index 448b417..f6c1a0c 100755
--- a/tests/tests/media/src/android/media/cts/DecoderTest.java
+++ b/tests/tests/media/src/android/media/cts/DecoderTest.java
@@ -1977,11 +1977,12 @@
break;
}
}
- assertTrue("Tunneled video playback timeout exceeded!",
- timeOut > System.currentTimeMillis());
Log.d(TAG, "playVideo player.reset()");
mMediaCodecPlayer.reset();
+
+ assertTrue("Tunneled video playback timeout exceeded!",
+ timeOut > System.currentTimeMillis());
}
/**
diff --git a/tests/tests/media/src/android/media/cts/EncoderTest.java b/tests/tests/media/src/android/media/cts/EncoderTest.java
index da81879..be6ed48 100644
--- a/tests/tests/media/src/android/media/cts/EncoderTest.java
+++ b/tests/tests/media/src/android/media/cts/EncoderTest.java
@@ -191,7 +191,7 @@
private int queueInputBuffer(
MediaCodec codec, ByteBuffer[] inputBuffers, int index,
- InputStream istream, int mode) {
+ InputStream istream, int mode, long timeUs) {
ByteBuffer buffer = inputBuffers[index];
buffer.rewind();
int size = buffer.limit();
@@ -238,7 +238,7 @@
}
}
- codec.queueInputBuffer(index, 0 /* offset */, size, 0 /* timeUs */, 0);
+ codec.queueInputBuffer(index, 0 /* offset */, size, timeUs, 0 /* flags */);
return size;
}
@@ -292,7 +292,8 @@
int muxidx = -1;
if (sSaveResults) {
try {
- String outFile = "/data/local/tmp/transcoded-" + componentName + "-" + outBitrate +
+ String outFile = "/data/local/tmp/transcoded-" + componentName +
+ "-" + sampleRate + "-" + channelCount + "-" + outBitrate +
"-" + mode + "-" + startSeed + ".mp4";
new File("outFile").delete();
muxer = new MediaMuxer(outFile, MediaMuxer.OutputFormat.MUXER_OUTPUT_MPEG_4);
@@ -340,12 +341,14 @@
index = codec.dequeueInputBuffer(kTimeoutUs /* timeoutUs */);
if (index != MediaCodec.INFO_TRY_AGAIN_LATER) {
+ long timeUs =
+ (long)numBytesSubmitted * 1000000 / (2 * channelCount * sampleRate);
if (numBytesSubmitted >= kNumInputBytes) {
codec.queueInputBuffer(
index,
0 /* offset */,
0 /* size */,
- 0 /* timeUs */,
+ timeUs,
MediaCodec.BUFFER_FLAG_END_OF_STREAM);
if (VERBOSE) {
@@ -355,7 +358,7 @@
doneSubmittingInput = true;
} else {
int size = queueInputBuffer(
- codec, codecInputBuffers, index, istream, mode);
+ codec, codecInputBuffers, index, istream, mode, timeUs);
numBytesSubmitted += size;
diff --git a/tests/tests/media/src/android/media/cts/ExifInterfaceTest.java b/tests/tests/media/src/android/media/cts/ExifInterfaceTest.java
index a51dd3d..5d4e328 100644
--- a/tests/tests/media/src/android/media/cts/ExifInterfaceTest.java
+++ b/tests/tests/media/src/android/media/cts/ExifInterfaceTest.java
@@ -34,7 +34,7 @@
private static final String TAG = ExifInterface.class.getSimpleName();
private static final boolean VERBOSE = false; // lots of logging
- private static final double DIFFERENCE_TOLERANCE = .0001;
+ private static final double DIFFERENCE_TOLERANCE = .001;
private static final int BUFFER_SIZE = 32768;
// List of files.
diff --git a/tests/tests/media/src/android/media/cts/MediaControllerTest.java b/tests/tests/media/src/android/media/cts/MediaControllerTest.java
index caf2a94..b8ec617 100644
--- a/tests/tests/media/src/android/media/cts/MediaControllerTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaControllerTest.java
@@ -214,6 +214,32 @@
mWaitLock.wait(TIME_OUT_MS);
assertTrue(mCallback.mOnSkipToQueueItemCalled);
assertEquals(queueItemId, mCallback.mQueueItemId);
+
+ mCallback.reset();
+ controls.prepare();
+ mWaitLock.wait(TIME_OUT_MS);
+ assertTrue(mCallback.mOnPrepareCalled);
+
+ mCallback.reset();
+ controls.prepareFromMediaId(mediaId, extras);
+ mWaitLock.wait(TIME_OUT_MS);
+ assertTrue(mCallback.mOnPrepareFromMediaIdCalled);
+ assertEquals(mediaId, mCallback.mMediaId);
+ assertEquals(EXTRAS_VALUE, mCallback.mExtras.getString(EXTRAS_KEY));
+
+ mCallback.reset();
+ controls.prepareFromSearch(query, extras);
+ mWaitLock.wait(TIME_OUT_MS);
+ assertTrue(mCallback.mOnPrepareFromSearchCalled);
+ assertEquals(query, mCallback.mQuery);
+ assertEquals(EXTRAS_VALUE, mCallback.mExtras.getString(EXTRAS_KEY));
+
+ mCallback.reset();
+ controls.prepareFromUri(uri, extras);
+ mWaitLock.wait(TIME_OUT_MS);
+ assertTrue(mCallback.mOnPrepareFromUriCalled);
+ assertEquals(uri, mCallback.mUri);
+ assertEquals(EXTRAS_VALUE, mCallback.mExtras.getString(EXTRAS_KEY));
}
}
@@ -244,6 +270,10 @@
private boolean mOnPlayFromUriCalled;
private boolean mOnCustomActionCalled;
private boolean mOnCommandCalled;
+ private boolean mOnPrepareCalled;
+ private boolean mOnPrepareFromMediaIdCalled;
+ private boolean mOnPrepareFromSearchCalled;
+ private boolean mOnPrepareFromUriCalled;
public void reset() {
mSeekPosition = -1;
@@ -272,6 +302,10 @@
mOnPlayFromUriCalled = false;
mOnCustomActionCalled = false;
mOnCommandCalled = false;
+ mOnPrepareCalled = false;
+ mOnPrepareFromMediaIdCalled = false;
+ mOnPrepareFromSearchCalled = false;
+ mOnPrepareFromUriCalled = false;
}
@Override
@@ -407,5 +441,43 @@
mWaitLock.notify();
}
}
+
+ @Override
+ public void onPrepare() {
+ synchronized (mWaitLock) {
+ mOnPrepareCalled = true;
+ mWaitLock.notify();
+ }
+ }
+
+ @Override
+ public void onPrepareFromMediaId(String mediaId, Bundle extras) {
+ synchronized (mWaitLock) {
+ mOnPrepareFromMediaIdCalled = true;
+ mMediaId = mediaId;
+ mExtras = extras;
+ mWaitLock.notify();
+ }
+ }
+
+ @Override
+ public void onPrepareFromSearch(String query, Bundle extras) {
+ synchronized (mWaitLock) {
+ mOnPrepareFromSearchCalled = true;
+ mQuery = query;
+ mExtras = extras;
+ mWaitLock.notify();
+ }
+ }
+
+ @Override
+ public void onPrepareFromUri(Uri uri, Bundle extras) {
+ synchronized (mWaitLock) {
+ mOnPrepareFromUriCalled = true;
+ mUri = uri;
+ mExtras = extras;
+ mWaitLock.notify();
+ }
+ }
}
}
diff --git a/tests/tests/media/src/android/media/cts/MediaPlayerTest.java b/tests/tests/media/src/android/media/cts/MediaPlayerTest.java
index bcc1e8d..1d0ab26 100644
--- a/tests/tests/media/src/android/media/cts/MediaPlayerTest.java
+++ b/tests/tests/media/src/android/media/cts/MediaPlayerTest.java
@@ -33,11 +33,11 @@
import android.media.MediaRecorder;
import android.media.MediaTimestamp;
import android.media.PlaybackParams;
+import android.media.SubtitleData;
import android.media.SyncParams;
import android.media.TimedText;
import android.media.audiofx.AudioEffect;
import android.media.audiofx.Visualizer;
-import android.media.cts.MediaPlayerTestBase.Monitor;
import android.net.Uri;
import android.os.Environment;
import android.os.IBinder;
@@ -74,9 +74,13 @@
private static final long RECORDED_DURATION_MS = 3000;
private static final float FLOAT_TOLERANCE = .0001f;
- private Vector<Integer> mTimedTextTrackIndex = new Vector<Integer>();
+ private final Vector<Integer> mTimedTextTrackIndex = new Vector<>();
+ private final Monitor mOnTimedTextCalled = new Monitor();
private int mSelectedTimedTextIndex;
- private Monitor mOnTimedTextCalled = new Monitor();
+
+ private final Vector<Integer> mSubtitleTrackIndex = new Vector<>();
+ private final Monitor mOnSubtitleDataCalled = new Monitor();
+ private int mSelectedSubtitleIndex;
private File mOutFile;
@@ -919,7 +923,7 @@
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
retriever.setDataSource(file);
String rotation = retriever.extractMetadata(
- MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION);
+ MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION);
retriever.release();
retriever = null;
assertNotNull(rotation);
@@ -1206,6 +1210,194 @@
R.raw.video_176x144_3gp_h263_300kbps_25fps_aac_stereo_128kbps_22050hz, 176, 144);
}
+ private void readSubtitleTracks() throws Exception {
+ mSubtitleTrackIndex.clear();
+ MediaPlayer.TrackInfo[] trackInfos = mMediaPlayer.getTrackInfo();
+ if (trackInfos == null || trackInfos.length == 0) {
+ return;
+ }
+
+ Vector<Integer> subtitleTrackIndex = new Vector<>();
+ for (int i = 0; i < trackInfos.length; ++i) {
+ assertTrue(trackInfos[i] != null);
+ if (trackInfos[i].getTrackType() == MediaPlayer.TrackInfo.MEDIA_TRACK_TYPE_SUBTITLE) {
+ subtitleTrackIndex.add(i);
+ }
+ }
+
+ mSubtitleTrackIndex.addAll(subtitleTrackIndex);
+ }
+
+ private void selectSubtitleTrack(int index) throws Exception {
+ int trackIndex = mSubtitleTrackIndex.get(index);
+ mMediaPlayer.selectTrack(trackIndex);
+ mSelectedSubtitleIndex = index;
+ }
+
+ private void deselectSubtitleTrack(int index) throws Exception {
+ int trackIndex = mSubtitleTrackIndex.get(index);
+ mMediaPlayer.deselectTrack(trackIndex);
+ if (mSelectedSubtitleIndex == index) {
+ mSelectedSubtitleIndex = -1;
+ }
+ }
+
+ public void testDeselectTrackForSubtitleTracks() throws Throwable {
+ if (!checkLoadResource(R.raw.testvideo_with_2_subtitle_tracks)) {
+ return; // skip;
+ }
+
+ getInstrumentation().waitForIdleSync();
+
+ mMediaPlayer.setOnSubtitleDataListener(new MediaPlayer.OnSubtitleDataListener() {
+ @Override
+ public void onSubtitleData(MediaPlayer mp, SubtitleData data) {
+ if (data != null && data.getData() != null) {
+ mOnSubtitleDataCalled.signal();
+ }
+ }
+ });
+ mMediaPlayer.setOnInfoListener(new MediaPlayer.OnInfoListener() {
+ @Override
+ public boolean onInfo(MediaPlayer mp, int what, int extra) {
+ if (what == MediaPlayer.MEDIA_INFO_METADATA_UPDATE) {
+ mOnInfoCalled.signal();
+ }
+ return false;
+ }
+ });
+
+ mMediaPlayer.setDisplay(getActivity().getSurfaceHolder());
+ mMediaPlayer.setScreenOnWhilePlaying(true);
+ mMediaPlayer.setWakeMode(mContext, PowerManager.PARTIAL_WAKE_LOCK);
+
+ mMediaPlayer.prepare();
+ mMediaPlayer.start();
+ assertTrue(mMediaPlayer.isPlaying());
+
+ // Closed caption tracks are in-band.
+ // So, those tracks will be found after processing a number of frames.
+ mOnInfoCalled.waitForSignal(1500);
+
+ mOnInfoCalled.reset();
+ mOnInfoCalled.waitForSignal(1500);
+
+ readSubtitleTracks();
+
+ // Run twice to check if repeated selection-deselection on the same track works well.
+ for (int i = 0; i < 2; i++) {
+ // Waits until at least one subtitle is fired. Timeout is 1.5 sec.
+ selectSubtitleTrack(i);
+ mOnSubtitleDataCalled.reset();
+ assertTrue(mOnSubtitleDataCalled.waitForSignal(1500));
+
+ // Try deselecting track.
+ deselectSubtitleTrack(i);
+ mOnSubtitleDataCalled.reset();
+ assertFalse(mOnSubtitleDataCalled.waitForSignal(1500));
+ }
+
+ try {
+ deselectSubtitleTrack(0);
+ fail("Deselecting unselected track: expected RuntimeException, " +
+ "but no exception has been triggered.");
+ } catch (RuntimeException e) {
+ // expected
+ }
+
+ mMediaPlayer.stop();
+ }
+
+ public void testChangeSubtitleTrack() throws Throwable {
+ if (!checkLoadResource(R.raw.testvideo_with_2_subtitle_tracks)) {
+ return; // skip;
+ }
+
+ mMediaPlayer.setOnSubtitleDataListener(new MediaPlayer.OnSubtitleDataListener() {
+ @Override
+ public void onSubtitleData(MediaPlayer mp, SubtitleData data) {
+ if (data != null && data.getData() != null) {
+ mOnSubtitleDataCalled.signal();
+ }
+ }
+ });
+ mMediaPlayer.setOnInfoListener(new MediaPlayer.OnInfoListener() {
+ @Override
+ public boolean onInfo(MediaPlayer mp, int what, int extra) {
+ if (what == MediaPlayer.MEDIA_INFO_METADATA_UPDATE) {
+ mOnInfoCalled.signal();
+ }
+ return false;
+ }
+ });
+
+ mMediaPlayer.setDisplay(getActivity().getSurfaceHolder());
+ mMediaPlayer.setScreenOnWhilePlaying(true);
+ mMediaPlayer.setWakeMode(mContext, PowerManager.PARTIAL_WAKE_LOCK);
+
+ mMediaPlayer.prepare();
+ mMediaPlayer.start();
+ assertTrue(mMediaPlayer.isPlaying());
+
+ // Closed caption tracks are in-band.
+ // So, those tracks will be found after processing a number of frames.
+ mOnInfoCalled.waitForSignal(1500);
+
+ mOnInfoCalled.reset();
+ mOnInfoCalled.waitForSignal(1500);
+
+ readSubtitleTracks();
+
+ // Waits until at least two captions are fired. Timeout is 2.5 sec.
+ selectSubtitleTrack(0);
+ assertTrue(mOnSubtitleDataCalled.waitForCountedSignals(2, 2500) >= 2);
+
+ mOnSubtitleDataCalled.reset();
+ selectSubtitleTrack(1);
+ assertTrue(mOnSubtitleDataCalled.waitForCountedSignals(2, 2500) >= 2);
+
+ mMediaPlayer.stop();
+ }
+
+ public void testGetTrackInfoForVideoWithSubtitleTracks() throws Throwable {
+ if (!checkLoadResource(R.raw.testvideo_with_2_subtitle_tracks)) {
+ return; // skip;
+ }
+
+ getInstrumentation().waitForIdleSync();
+
+ mMediaPlayer.setOnInfoListener(new MediaPlayer.OnInfoListener() {
+ @Override
+ public boolean onInfo(MediaPlayer mp, int what, int extra) {
+ if (what == MediaPlayer.MEDIA_INFO_METADATA_UPDATE) {
+ mOnInfoCalled.signal();
+ }
+ return false;
+ }
+ });
+
+ mMediaPlayer.setDisplay(getActivity().getSurfaceHolder());
+ mMediaPlayer.setScreenOnWhilePlaying(true);
+ mMediaPlayer.setWakeMode(mContext, PowerManager.PARTIAL_WAKE_LOCK);
+
+ mMediaPlayer.prepare();
+ mMediaPlayer.start();
+ assertTrue(mMediaPlayer.isPlaying());
+
+ // The media metadata will be changed while playing since closed caption tracks are in-band
+ // and those tracks will be found after processing a number of frames. These tracks will be
+ // found within one second.
+ mOnInfoCalled.waitForSignal(1500);
+
+ mOnInfoCalled.reset();
+ mOnInfoCalled.waitForSignal(1500);
+
+ readSubtitleTracks();
+ assertEquals(2, mSubtitleTrackIndex.size());
+
+ mMediaPlayer.stop();
+ }
+
private void readTimedTextTracks() throws Exception {
mTimedTextTrackIndex.clear();
MediaPlayer.TrackInfo[] trackInfos = mMediaPlayer.getTrackInfo();
@@ -1234,13 +1426,13 @@
return mTimedTextTrackIndex.size();
}
- private void selectSubtitleTrack(int index) throws Exception {
+ private void selectTimedTextTrack(int index) throws Exception {
int trackIndex = mTimedTextTrackIndex.get(index);
mMediaPlayer.selectTrack(trackIndex);
mSelectedTimedTextIndex = index;
}
- private void deselectSubtitleTrack(int index) throws Exception {
+ private void deselectTimedTextTrack(int index) throws Exception {
int trackIndex = mTimedTextTrackIndex.get(index);
mMediaPlayer.deselectTrack(trackIndex);
if (mSelectedTimedTextIndex == index) {
@@ -1248,8 +1440,8 @@
}
}
- public void testDeselectTrack() throws Throwable {
- if (!checkLoadResource(R.raw.testvideo_with_2_subtitles)) {
+ public void testDeselectTrackForTimedTextTrack() throws Throwable {
+ if (!checkLoadResource(R.raw.testvideo_with_2_timedtext_tracks)) {
return; // skip;
}
runTestOnUiThread(new Runnable() {
@@ -1287,31 +1479,31 @@
// Run twice to check if repeated selection-deselection on the same track works well.
for (int i = 0; i < 2; i++) {
- // Waits until at least one subtitle is fired. Timeout is 1 sec.
- selectSubtitleTrack(0);
+ // Waits until at least one subtitle is fired. Timeout is 1.5 sec.
+ selectTimedTextTrack(0);
mOnTimedTextCalled.reset();
assertTrue(mOnTimedTextCalled.waitForSignal(1500));
// Try deselecting track.
- deselectSubtitleTrack(0);
+ deselectTimedTextTrack(0);
mOnTimedTextCalled.reset();
assertFalse(mOnTimedTextCalled.waitForSignal(1500));
}
// Run the same test for external subtitle track.
for (int i = 0; i < 2; i++) {
- selectSubtitleTrack(2);
+ selectTimedTextTrack(2);
mOnTimedTextCalled.reset();
assertTrue(mOnTimedTextCalled.waitForSignal(1500));
// Try deselecting track.
- deselectSubtitleTrack(2);
+ deselectTimedTextTrack(2);
mOnTimedTextCalled.reset();
assertFalse(mOnTimedTextCalled.waitForSignal(1500));
}
try {
- deselectSubtitleTrack(0);
+ deselectTimedTextTrack(0);
fail("Deselecting unselected track: expected RuntimeException, " +
"but no exception has been triggered.");
} catch (RuntimeException e) {
@@ -1321,8 +1513,8 @@
mMediaPlayer.stop();
}
- public void testChangeSubtitleTrack() throws Throwable {
- if (!checkLoadResource(R.raw.testvideo_with_2_subtitles)) {
+ public void testChangeTimedTextTrack() throws Throwable {
+ if (!checkLoadResource(R.raw.testvideo_with_2_timedtext_tracks)) {
return; // skip;
}
@@ -1394,26 +1586,26 @@
getInstrumentation().waitForIdleSync();
assertEquals(getTimedTextTrackCount(), 4);
- selectSubtitleTrack(0);
+ selectTimedTextTrack(0);
mOnTimedTextCalled.reset();
mMediaPlayer.start();
assertTrue(mMediaPlayer.isPlaying());
- // Waits until at least two subtitles are fired. Timeout is 2 sec.
+ // Waits until at least two subtitles are fired. Timeout is 2.5 sec.
// Please refer the test srt files:
// test_subtitle1_srt.3gp and test_subtitle2_srt.3gp
assertTrue(mOnTimedTextCalled.waitForCountedSignals(2, 2500) >= 2);
- selectSubtitleTrack(1);
+ selectTimedTextTrack(1);
mOnTimedTextCalled.reset();
assertTrue(mOnTimedTextCalled.waitForCountedSignals(2, 2500) >= 2);
- selectSubtitleTrack(2);
+ selectTimedTextTrack(2);
mOnTimedTextCalled.reset();
assertTrue(mOnTimedTextCalled.waitForCountedSignals(2, 2500) >= 2);
- selectSubtitleTrack(3);
+ selectTimedTextTrack(3);
mOnTimedTextCalled.reset();
assertTrue(mOnTimedTextCalled.waitForCountedSignals(2, 2500) >= 2);
mMediaPlayer.stop();
@@ -1421,8 +1613,8 @@
assertEquals("Wrong bounds count", 2, mBoundsCount);
}
- public void testGetTrackInfo() throws Throwable {
- if (!checkLoadResource(R.raw.testvideo_with_2_subtitles)) {
+ public void testGetTrackInfoForVideoWithTimedText() throws Throwable {
+ if (!checkLoadResource(R.raw.testvideo_with_2_timedtext_tracks)) {
return; // skip;
}
runTestOnUiThread(new Runnable() {
@@ -1440,7 +1632,7 @@
mMediaPlayer.start();
readTimedTextTracks();
- selectSubtitleTrack(2);
+ selectTimedTextTrack(2);
int count = 0;
MediaPlayer.TrackInfo[] trackInfos = mMediaPlayer.getTrackInfo();
diff --git a/tests/tests/media/src/android/media/cts/VideoDecoderPerfTest.java b/tests/tests/media/src/android/media/cts/VideoDecoderPerfTest.java
index b999847..a153f78 100644
--- a/tests/tests/media/src/android/media/cts/VideoDecoderPerfTest.java
+++ b/tests/tests/media/src/android/media/cts/VideoDecoderPerfTest.java
@@ -80,7 +80,7 @@
super.tearDown();
}
- private static String[] getDecoderName(String mime, boolean isGoog) {
+ private static String[] getDecoderName(String mime, boolean isGoog, int width, int height) {
MediaCodecList mcl = new MediaCodecList(MediaCodecList.REGULAR_CODECS);
ArrayList<String> result = new ArrayList<String>();
for (MediaCodecInfo info : mcl.getCodecInfos()) {
@@ -88,10 +88,14 @@
info.getName().toLowerCase().startsWith("omx.google.") != isGoog) {
continue;
}
- CodecCapabilities caps = null;
try {
- caps = info.getCapabilitiesForType(mime);
- } catch (IllegalArgumentException e) { // mime is not supported
+ CodecCapabilities caps = info.getCapabilitiesForType(mime);
+ if (!caps.getVideoCapabilities().isSizeSupported(width, height)) {
+ Log.i(TAG, info.getName() + " does not support size " + width + "x" + height);
+ continue;
+ }
+ } catch (IllegalArgumentException | NullPointerException e) {
+ // mime is not supported or is not a video codec
continue;
}
result.add(info.getName());
@@ -101,29 +105,37 @@
private void decode(String mime, int video, int width, int height,
boolean isGoog) throws Exception {
- String[] names = getDecoderName(mime, isGoog);
- for (String name: names) {
- if (!MediaUtils.supports(name, mime, width, height)) {
- Log.i(TAG, "Codec " + name + " with " + width + "," + height + " not supported");
- continue;
- }
+ decode(mime, video, width, height, isGoog, 600000 /* timeoutMs */);
+ }
+ private void decode(String mime, int video, int width, int height,
+ boolean isGoog, long testTimeoutMs) throws Exception {
+ String[] names = getDecoderName(mime, isGoog, width, height);
+ if (names.length == 0) {
+ MediaUtils.skipTest("no codecs support this type or size");
+ return;
+ }
+ // Ensure we can finish this test within the test timeout. Allow 25% slack (4/5).
+ // We test each decoder twice per repeat.
+ long maxTimeMs = Math.min(
+ testTimeoutMs / names.length * 2 / 5 / NUMBER_OF_REPEAT, MAX_TIME_MS);
+ for (String name : names) {
boolean pass = false;
mMeasuredFps = new double[NUMBER_OF_REPEAT];
mResultRawData = new String[NUMBER_OF_REPEAT];
- Log.d(TAG, "testing " + name);
+ Log.d(TAG, "testing " + name + " for " + maxTimeMs + " msecs");
for (int i = 0; i < NUMBER_OF_REPEAT; ++i) {
// Decode to Surface.
Log.d(TAG, "round #" + i + " decode to surface");
Surface s = getActivity().getSurfaceHolder().getSurface();
// only verify the result for decode to surface case.
- if (doDecode(name, video, width, height, s, i)) {
+ if (doDecode(name, video, width, height, s, i, maxTimeMs)) {
pass = true;
}
// Decode to buffer.
Log.d(TAG, "round #" + i + " decode to buffer");
- doDecode(name, video, width, height, null, i);
+ doDecode(name, video, width, height, null, i, maxTimeMs);
}
if (!pass) {
@@ -141,7 +153,8 @@
mSamplesInMemory.clear();
}
- private boolean doDecode(String name, int video, int w, int h, Surface surface, int round)
+ private boolean doDecode(
+ String name, int video, int w, int h, Surface surface, int round, long maxTimeMs)
throws Exception {
AssetFileDescriptor testFd = mResources.openRawResourceFd(video);
MediaExtractor extractor = new MediaExtractor();
@@ -220,7 +233,7 @@
sawInputEOS = (++inputNum == TOTAL_FRAMES);
if (!sawInputEOS &&
- ((System.currentTimeMillis() - start) > MAX_TIME_MS)) {
+ ((System.currentTimeMillis() - start) > maxTimeMs)) {
sawInputEOS = true;
}
if (sawInputEOS) {
diff --git a/tests/tests/os/src/android/os/cts/SecurityPatchTest.java b/tests/tests/os/src/android/os/cts/SecurityPatchTest.java
new file mode 100644
index 0000000..5516a19
--- /dev/null
+++ b/tests/tests/os/src/android/os/cts/SecurityPatchTest.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2016 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package android.os.cts;
+
+import android.os.Build;
+import android.os.SystemProperties;
+import android.test.InstrumentationTestCase;
+import android.util.Log;
+
+/**
+ * Tests for Security Patch String settings
+ */
+public class SecurityPatchTest extends InstrumentationTestCase {
+
+ private static final String TAG = SecurityPatchTest.class.getSimpleName();
+ private static final String SECURITY_PATCH_ERROR =
+ "ro.build.version.security_patch should be in the format \"YYYY-MM-DD\". Found \"%s\"";
+ private static final String SECURITY_PATCH_DATE_ERROR =
+ "ro.build.version.security_patch should be \"%d-%02d\" or later. Found \"%s\"";
+ private static final int SECURITY_PATCH_YEAR = 2016;
+ private static final int SECURITY_PATCH_MONTH = 04;
+
+ private boolean mSkipTests = false;
+
+ @Override
+ protected void setUp() {
+ mSkipTests = (Build.VERSION.SDK_INT < Build.VERSION_CODES.M);
+ }
+
+ /** Security patch string must exist in M or higher **/
+ public void testSecurityPatchFound() {
+ if (mSkipTests) {
+ Log.w(TAG, "Skipping M+ Test.");
+ return;
+ }
+
+ String buildSecurityPatch = SystemProperties.get("ro.build.version.security_patch", "");
+ String error = String.format(SECURITY_PATCH_ERROR, buildSecurityPatch);
+ assertTrue(error, !buildSecurityPatch.isEmpty());
+ }
+
+ /** Security patch should be of the form YYYY-MM-DD in M or higher */
+ public void testSecurityPatchFormat() {
+ if (mSkipTests) {
+ Log.w(TAG, "Skipping M+ Test.");
+ return;
+ }
+
+ String buildSecurityPatch = SystemProperties.get("ro.build.version.security_patch", "");
+ String error = String.format(SECURITY_PATCH_ERROR, buildSecurityPatch);
+
+ assertEquals(error, 10, buildSecurityPatch.length());
+ assertTrue(error, Character.isDigit(buildSecurityPatch.charAt(0)));
+ assertTrue(error, Character.isDigit(buildSecurityPatch.charAt(1)));
+ assertTrue(error, Character.isDigit(buildSecurityPatch.charAt(2)));
+ assertTrue(error, Character.isDigit(buildSecurityPatch.charAt(3)));
+ assertEquals(error, '-', buildSecurityPatch.charAt(4));
+ assertTrue(error, Character.isDigit(buildSecurityPatch.charAt(5)));
+ assertTrue(error, Character.isDigit(buildSecurityPatch.charAt(6)));
+ assertEquals(error, '-', buildSecurityPatch.charAt(7));
+ assertTrue(error, Character.isDigit(buildSecurityPatch.charAt(8)));
+ assertTrue(error, Character.isDigit(buildSecurityPatch.charAt(9)));
+ }
+
+ /** Security patch should no older than the month this test was updated in M or higher **/
+ public void testSecurityPatchDate() {
+ if (mSkipTests) {
+ Log.w(TAG, "Skipping M+ Test.");
+ return;
+ }
+
+ String buildSecurityPatch = SystemProperties.get("ro.build.version.security_patch", "");
+ String error = String.format(SECURITY_PATCH_DATE_ERROR,
+ SECURITY_PATCH_YEAR,
+ SECURITY_PATCH_MONTH,
+ buildSecurityPatch);
+
+ int declaredYear = 0;
+ int declaredMonth = 0;
+
+ try {
+ declaredYear = Integer.parseInt(buildSecurityPatch.substring(0,4));
+ declaredMonth = Integer.parseInt(buildSecurityPatch.substring(5,7));
+ } catch (Exception e) {
+ assertTrue(error, false);
+ }
+
+ assertTrue(error, declaredYear >= SECURITY_PATCH_YEAR);
+ assertTrue(error, (declaredYear > SECURITY_PATCH_YEAR) ||
+ (declaredMonth >= SECURITY_PATCH_MONTH));
+ }
+}
diff --git a/tests/tests/permission2/res/raw/android_manifest.xml b/tests/tests/permission2/res/raw/android_manifest.xml
index 08bccc1..bc7119c 100644
--- a/tests/tests/permission2/res/raw/android_manifest.xml
+++ b/tests/tests/permission2/res/raw/android_manifest.xml
@@ -18,8 +18,8 @@
*/
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android" coreApp="true" android:sharedUserId="android.uid.system"
- android:sharedUserLabel="@string/android_system_label">
+ package="android" coreApp="true" android:sharedUserId="android.uid.system"
+ android:sharedUserLabel="@string/android_system_label">
<!-- ================================================ -->
<!-- Special broadcasts that only the system can send -->
@@ -33,6 +33,7 @@
<protected-broadcast android:name="android.intent.action.TIME_TICK" />
<protected-broadcast android:name="android.intent.action.TIMEZONE_CHANGED" />
<protected-broadcast android:name="android.intent.action.DATE_CHANGED" />
+ <protected-broadcast android:name="android.intent.action.PRE_BOOT_COMPLETED" />
<protected-broadcast android:name="android.intent.action.BOOT_COMPLETED" />
<protected-broadcast android:name="android.intent.action.PACKAGE_INSTALL" />
<protected-broadcast android:name="android.intent.action.PACKAGE_ADDED" />
@@ -46,6 +47,8 @@
<protected-broadcast android:name="android.intent.action.PACKAGE_FIRST_LAUNCH" />
<protected-broadcast android:name="android.intent.action.PACKAGE_NEEDS_VERIFICATION" />
<protected-broadcast android:name="android.intent.action.PACKAGE_VERIFIED" />
+ <protected-broadcast android:name="android.intent.action.PACKAGES_SUSPENDED" />
+ <protected-broadcast android:name="android.intent.action.PACKAGES_UNSUSPENDED" />
<protected-broadcast android:name="android.intent.action.UID_REMOVED" />
<protected-broadcast android:name="android.intent.action.QUERY_PACKAGE_RESTART" />
<protected-broadcast android:name="android.intent.action.CONFIGURATION_CHANGED" />
@@ -65,6 +68,7 @@
<protected-broadcast android:name="android.intent.action.NEW_OUTGOING_CALL" />
<protected-broadcast android:name="android.intent.action.REBOOT" />
<protected-broadcast android:name="android.intent.action.DOCK_EVENT" />
+ <protected-broadcast android:name="android.intent.action.THERMAL_EVENT" />
<protected-broadcast android:name="android.intent.action.MASTER_CLEAR_NOTIFICATION" />
<protected-broadcast android:name="android.intent.action.USER_ADDED" />
<protected-broadcast android:name="android.intent.action.USER_REMOVED" />
@@ -75,6 +79,7 @@
<protected-broadcast android:name="android.intent.action.USER_BACKGROUND" />
<protected-broadcast android:name="android.intent.action.USER_FOREGROUND" />
<protected-broadcast android:name="android.intent.action.USER_SWITCHED" />
+ <protected-broadcast android:name="android.intent.action.USER_INITIALIZE" />
<protected-broadcast android:name="android.intent.action.INTENT_FILTER_NEEDS_VERIFICATION" />
<protected-broadcast android:name="android.os.action.POWER_SAVE_MODE_CHANGED" />
@@ -91,6 +96,10 @@
<protected-broadcast android:name="android.app.action.EXIT_DESK_MODE" />
<protected-broadcast android:name="android.app.action.NEXT_ALARM_CLOCK_CHANGED" />
+ <protected-broadcast android:name="android.app.action.BUGREPORT_SHARING_DECLINED" />
+ <protected-broadcast android:name="android.app.action.BUGREPORT_FAILED" />
+ <protected-broadcast android:name="android.app.action.BUGREPORT_SHARE" />
+
<protected-broadcast android:name="android.appwidget.action.APPWIDGET_UPDATE_OPTIONS" />
<protected-broadcast android:name="android.appwidget.action.APPWIDGET_DELETED" />
<protected-broadcast android:name="android.appwidget.action.APPWIDGET_DISABLED" />
@@ -100,10 +109,11 @@
<protected-broadcast android:name="android.os.action.SETTING_RESTORED" />
- <protected-broadcast android:name="android.backup.intent.RUN" />
- <protected-broadcast android:name="android.backup.intent.CLEAR" />
- <protected-broadcast android:name="android.backup.intent.INIT" />
+ <protected-broadcast android:name="android.app.backup.intent.RUN" />
+ <protected-broadcast android:name="android.app.backup.intent.CLEAR" />
+ <protected-broadcast android:name="android.app.backup.intent.INIT" />
+ <protected-broadcast android:name="android.bluetooth.intent.DISCOVERABLE_TIMEOUT" />
<protected-broadcast android:name="android.bluetooth.adapter.action.STATE_CHANGED" />
<protected-broadcast android:name="android.bluetooth.adapter.action.SCAN_MODE_CHANGED" />
<protected-broadcast android:name="android.bluetooth.adapter.action.DISCOVERY_STARTED" />
@@ -130,43 +140,43 @@
<protected-broadcast android:name="android.bluetooth.devicepicker.action.LAUNCH" />
<protected-broadcast android:name="android.bluetooth.devicepicker.action.DEVICE_SELECTED" />
<protected-broadcast
- android:name="android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED" />
+ android:name="android.bluetooth.headset.profile.action.CONNECTION_STATE_CHANGED" />
<protected-broadcast
- android:name="android.bluetooth.headset.profile.action.AUDIO_STATE_CHANGED" />
+ android:name="android.bluetooth.headset.profile.action.AUDIO_STATE_CHANGED" />
<protected-broadcast
- android:name="android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT" />
+ android:name="android.bluetooth.headset.action.VENDOR_SPECIFIC_HEADSET_EVENT" />
<protected-broadcast
- android:name="android.bluetooth.headsetclient.profile.action.CONNECTION_STATE_CHANGED" />
+ android:name="android.bluetooth.headsetclient.profile.action.CONNECTION_STATE_CHANGED" />
<protected-broadcast
- android:name="android.bluetooth.headsetclient.profile.action.AUDIO_STATE_CHANGED" />
+ android:name="android.bluetooth.headsetclient.profile.action.AUDIO_STATE_CHANGED" />
<protected-broadcast
- android:name="android.bluetooth.headsetclient.profile.action.AG_EVENT" />
+ android:name="android.bluetooth.headsetclient.profile.action.AG_EVENT" />
<protected-broadcast
- android:name="android.bluetooth.headsetclient.profile.action.AG_CALL_CHANGED" />
+ android:name="android.bluetooth.headsetclient.profile.action.AG_CALL_CHANGED" />
<protected-broadcast
- android:name="android.bluetooth.headsetclient.profile.action.RESULT" />
+ android:name="android.bluetooth.headsetclient.profile.action.RESULT" />
<protected-broadcast
- android:name="android.bluetooth.headsetclient.profile.action.LAST_VTAG" />
+ android:name="android.bluetooth.headsetclient.profile.action.LAST_VTAG" />
<protected-broadcast
- android:name="android.bluetooth.a2dp.profile.action.CONNECTION_STATE_CHANGED" />
+ android:name="android.bluetooth.a2dp.profile.action.CONNECTION_STATE_CHANGED" />
<protected-broadcast
- android:name="android.bluetooth.a2dp.profile.action.PLAYING_STATE_CHANGED" />
+ android:name="android.bluetooth.a2dp.profile.action.PLAYING_STATE_CHANGED" />
<protected-broadcast
- android:name="android.bluetooth.a2dp-sink.profile.action.CONNECTION_STATE_CHANGED" />
+ android:name="android.bluetooth.a2dp-sink.profile.action.CONNECTION_STATE_CHANGED" />
<protected-broadcast
- android:name="android.bluetooth.a2dp-sink.profile.action.PLAYING_STATE_CHANGED" />
+ android:name="android.bluetooth.a2dp-sink.profile.action.PLAYING_STATE_CHANGED" />
<protected-broadcast
- android:name="android.bluetooth.a2dp-sink.profile.action.AUDIO_CONFIG_CHANGED" />
- <protected-broadcast
- android:name="android.bluetooth.avrcp-controller.profile.action.CONNECTION_STATE_CHANGED" />
+ android:name="android.bluetooth.a2dp-sink.profile.action.AUDIO_CONFIG_CHANGED" />
<protected-broadcast
- android:name="android.bluetooth.input.profile.action.CONNECTION_STATE_CHANGED" />
+ android:name="android.bluetooth.avrcp-controller.profile.action.CONNECTION_STATE_CHANGED" />
<protected-broadcast
- android:name="android.bluetooth.input.profile.action.PROTOCOL_MODE_CHANGED" />
+ android:name="android.bluetooth.input.profile.action.CONNECTION_STATE_CHANGED" />
<protected-broadcast
- android:name="android.bluetooth.input.profile.action.VIRTUAL_UNPLUG_STATUS" />
+ android:name="android.bluetooth.input.profile.action.PROTOCOL_MODE_CHANGED" />
<protected-broadcast
- android:name="android.bluetooth.pan.profile.action.CONNECTION_STATE_CHANGED" />
+ android:name="android.bluetooth.input.profile.action.VIRTUAL_UNPLUG_STATUS" />
+ <protected-broadcast
+ android:name="android.bluetooth.pan.profile.action.CONNECTION_STATE_CHANGED" />
<protected-broadcast android:name="android.bluetooth.pbap.intent.action.PBAP_STATE_CHANGED" />
<protected-broadcast android:name="android.btopp.intent.action.INCOMING_FILE_NOTIFICATION" />
<protected-broadcast android:name="android.btopp.intent.action.USER_CONFIRMATION_TIMEOUT" />
@@ -188,7 +198,7 @@
<protected-broadcast android:name="android.hardware.usb.action.USB_STATE" />
<protected-broadcast android:name="android.hardware.usb.action.USB_PORT_CHANGED" />
<protected-broadcast android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" />
- <protected-broadcast android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" />
+ <protected-broadcast android:name="android.hardware.usb.action.USB_ACCESSORY_DETACHED" />
<protected-broadcast android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
<protected-broadcast android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" />
@@ -201,6 +211,7 @@
<protected-broadcast android:name="android.media.VOLUME_CHANGED_ACTION" />
<protected-broadcast android:name="android.media.MASTER_VOLUME_CHANGED_ACTION" />
<protected-broadcast android:name="android.media.MASTER_MUTE_CHANGED_ACTION" />
+ <protected-broadcast android:name="android.media.MASTER_MONO_CHANGED_ACTION" />
<protected-broadcast android:name="android.media.SCO_AUDIO_STATE_CHANGED" />
<protected-broadcast android:name="android.media.ACTION_SCO_AUDIO_STATE_UPDATED" />
@@ -220,17 +231,27 @@
<!-- @deprecated. Only {@link android.net.ConnectivityManager.CONNECTIVITY_ACTION} is sent. -->
<protected-broadcast android:name="android.net.conn.CONNECTIVITY_CHANGE_IMMEDIATE" />
<protected-broadcast android:name="android.net.conn.DATA_ACTIVITY_CHANGE" />
+ <protected-broadcast android:name="android.net.conn.RESTRICT_BACKGROUND_CHANGED" />
<protected-broadcast android:name="android.net.conn.BACKGROUND_DATA_SETTING_CHANGED" />
<protected-broadcast android:name="android.net.conn.CAPTIVE_PORTAL_TEST_COMPLETED" />
<protected-broadcast android:name="android.net.nsd.STATE_CHANGED" />
- <protected-broadcast android:name="android.nfc.action.LLCP_LINK_STATE_CHANGED" />
+ <protected-broadcast android:name="android.nfc.action.ADAPTER_STATE_CHANGED" />
+ <protected-broadcast android:name="android.nfc.action.TRANSACTION_DETECTED" />
+ <protected-broadcast android:name="com.android.nfc.action.LLCP_UP" />
+ <protected-broadcast android:name="com.android.nfc.action.LLCP_DOWN" />
+ <protected-broadcast android:name="com.android.nfc.cardemulation.action.CLOSE_TAP_DIALOG" />
+ <protected-broadcast android:name="com.android.nfc.handover.action.ALLOW_CONNECT" />
+ <protected-broadcast android:name="com.android.nfc.handover.action.DENY_CONNECT" />
<protected-broadcast android:name="com.android.nfc_extras.action.RF_FIELD_ON_DETECTED" />
<protected-broadcast android:name="com.android.nfc_extras.action.RF_FIELD_OFF_DETECTED" />
<protected-broadcast android:name="com.android.nfc_extras.action.AID_SELECTED" />
-
- <protected-broadcast android:name="android.nfc.action.TRANSACTION_DETECTED" />
+ <!-- For NFC to BT handover -->
+ <protected-broadcast android:name="android.btopp.intent.action.WHITELIST_DEVICE" />
+ <protected-broadcast android:name="android.btopp.intent.action.STOP_HANDOVER_TRANSFER" />
+ <protected-broadcast android:name="android.nfc.handover.intent.action.HANDOVER_SEND" />
+ <protected-broadcast android:name="android.nfc.handover.intent.action.HANDOVER_SEND_MULTIPLE" />
<protected-broadcast android:name="android.intent.action.CLEAR_DNS_CACHE" />
<protected-broadcast android:name="android.intent.action.PROXY_CHANGE" />
@@ -240,11 +261,12 @@
<protected-broadcast android:name="android.intent.action.DREAMING_STARTED" />
<protected-broadcast android:name="android.intent.action.DREAMING_STOPPED" />
<protected-broadcast android:name="android.intent.action.ANY_DATA_STATE" />
- <protected-broadcast android:name="android.intent.action.DATA_CONNECTION_CONNECTED_TO_PROVISIONING_APN" />
<protected-broadcast android:name="com.android.server.WifiManager.action.START_SCAN" />
<protected-broadcast android:name="com.android.server.WifiManager.action.START_PNO" />
<protected-broadcast android:name="com.android.server.WifiManager.action.DELAYED_DRIVER_STOP" />
+ <protected-broadcast android:name="com.android.server.action.REMOTE_BUGREPORT_SHARING_ACCEPTED" />
+ <protected-broadcast android:name="com.android.server.action.REMOTE_BUGREPORT_SHARING_DECLINED" />
<protected-broadcast android:name="android.net.wifi.WIFI_STATE_CHANGED" />
<protected-broadcast android:name="android.net.wifi.WIFI_AP_STATE_CHANGED" />
<protected-broadcast android:name="android.net.wifi.WIFI_CREDENTIAL_CHANGED" />
@@ -274,11 +296,13 @@
<protected-broadcast android:name="android.intent.action.AIRPLANE_MODE" />
<protected-broadcast android:name="android.intent.action.ADVANCED_SETTINGS" />
<protected-broadcast android:name="android.intent.action.APPLICATION_RESTRICTIONS_CHANGED" />
- <protected-broadcast android:name="android.intent.action.BUGREPORT_FINISHED" />
+ <!-- Legacy -->
<protected-broadcast android:name="android.intent.action.ACTION_IDLE_MAINTENANCE_START" />
<protected-broadcast android:name="android.intent.action.ACTION_IDLE_MAINTENANCE_END" />
+ <protected-broadcast android:name="com.android.server.task.controllers.IdleController.ACTION_TRIGGER_IDLE" />
+
<protected-broadcast android:name="android.intent.action.HDMI_PLUGGED" />
<protected-broadcast android:name="android.intent.action.PHONE_STATE" />
@@ -294,11 +318,11 @@
<protected-broadcast android:name="android.telecom.action.DEFAULT_DIALER_CHANGED" />
<protected-broadcast
- android:name="com.android.server.connectivityservice.CONNECTED_TO_PROVISIONING_NETWORK_ACTION" />
+ android:name="com.android.server.connectivityservice.CONNECTED_TO_PROVISIONING_NETWORK_ACTION" />
<!-- Defined in RestrictionsManager -->
<protected-broadcast
- android:name="android.intent.action.PERMISSION_RESPONSE_RECEIVED" />
+ android:name="android.intent.action.PERMISSION_RESPONSE_RECEIVED" />
<!-- Defined in RestrictionsManager -->
<protected-broadcast android:name="android.intent.action.REQUEST_PERMISSION" />
@@ -320,6 +344,112 @@
<protected-broadcast android:name="android.internal.policy.action.BURN_IN_PROTECTION" />
<protected-broadcast android:name="android.app.action.SYSTEM_UPDATE_POLICY_CHANGED" />
<protected-broadcast android:name="android.app.action.DEVICE_OWNER_CHANGED" />
+
+ <protected-broadcast android:name="android.intent.action.MANAGED_PROFILE_AVAILABILITY_CHANGED" />
+
+ <!-- Added in N -->
+ <protected-broadcast android:name="android.intent.action.ANR" />
+ <protected-broadcast android:name="android.intent.action.CALL" />
+ <protected-broadcast android:name="android.intent.action.DROPBOX_ENTRY_ADDED" />
+ <protected-broadcast android:name="android.intent.action.INPUT_METHOD_CHANGED" />
+ <protected-broadcast android:name="android.intent.action.internal_sim_state_changed" />
+ <protected-broadcast android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
+ <protected-broadcast android:name="android.intent.action.PRECISE_CALL_STATE" />
+ <protected-broadcast android:name="android.intent.action.PRECISE_DATA_CONNECTION_STATE_CHANGED" />
+ <protected-broadcast android:name="android.intent.action.SUBSCRIPTION_PHONE_STATE" />
+ <protected-broadcast android:name="android.intent.action.USER_INFO_CHANGED" />
+ <protected-broadcast android:name="android.intent.action.USER_UNLOCKED" />
+ <protected-broadcast android:name="android.intent.action.WALLPAPER_CHANGED" />
+
+ <protected-broadcast android:name="android.app.action.DEVICE_POLICY_MANAGER_STATE_CHANGED" />
+ <protected-broadcast android:name="android.app.action.CHOOSE_PRIVATE_KEY_ALIAS" />
+ <protected-broadcast android:name="android.app.action.DEVICE_ADMIN_DISABLED" />
+ <protected-broadcast android:name="android.app.action.DEVICE_ADMIN_DISABLE_REQUESTED" />
+ <protected-broadcast android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
+ <protected-broadcast android:name="android.app.action.LOCK_TASK_ENTERING" />
+ <protected-broadcast android:name="android.app.action.LOCK_TASK_EXITING" />
+ <protected-broadcast android:name="android.app.action.NOTIFY_PENDING_SYSTEM_UPDATE" />
+ <protected-broadcast android:name="android.app.action.ACTION_PASSWORD_CHANGED" />
+ <protected-broadcast android:name="android.app.action.ACTION_PASSWORD_EXPIRING" />
+ <protected-broadcast android:name="android.app.action.ACTION_PASSWORD_FAILED" />
+ <protected-broadcast android:name="android.app.action.ACTION_PASSWORD_SUCCEEDED" />
+ <protected-broadcast android:name="com.android.server.ACTION_EXPIRED_PASSWORD_NOTIFICATION" />
+ <protected-broadcast android:name="android.intent.action.MANAGED_PROFILE_ADDED" />
+
+ <protected-broadcast android:name="android.bluetooth.adapter.action.BLE_STATE_CHANGED" />
+ <protected-broadcast android:name="android.content.jobscheduler.JOB_DELAY_EXPIRED" />
+ <protected-broadcast android:name="android.content.syncmanager.SYNC_ALARM" />
+ <protected-broadcast android:name="android.media.INTERNAL_RINGER_MODE_CHANGED_ACTION" />
+ <protected-broadcast android:name="android.media.STREAM_DEVICES_CHANGED_ACTION" />
+ <protected-broadcast android:name="android.media.STREAM_MUTE_CHANGED_ACTION" />
+ <protected-broadcast android:name="android.net.sip.SIP_SERVICE_UP" />
+ <protected-broadcast android:name="android.nfc.action.ADAPTER_STATE_CHANGED" />
+ <protected-broadcast android:name="android.os.action.CHARGING" />
+ <protected-broadcast android:name="android.os.action.DISCHARGING" />
+ <protected-broadcast android:name="android.search.action.SEARCHABLES_CHANGED" />
+ <protected-broadcast android:name="android.security.STORAGE_CHANGED" />
+ <protected-broadcast android:name="android.telecom.action.PHONE_ACCOUNT_REGISTERED" />
+ <protected-broadcast android:name="android.telecom.action.PHONE_ACCOUNT_UNREGISTERED" />
+ <protected-broadcast android:name="android.telecom.action.SHOW_MISSED_CALLS_NOTIFICATION" />
+ <protected-broadcast android:name="android.telephony.action.CARRIER_CONFIG_CHANGED" />
+
+ <protected-broadcast android:name="com.android.bluetooth.btservice.action.ALARM_WAKEUP" />
+ <protected-broadcast android:name="com.android.ims.IMS_SERVICE_UP" />
+ <protected-broadcast android:name="com.android.server.action.NETWORK_STATS_POLL" />
+ <protected-broadcast android:name="com.android.server.action.NETWORK_STATS_UPDATED" />
+ <protected-broadcast android:name="com.android.server.NetworkTimeUpdateService.action.POLL" />
+ <protected-broadcast android:name="com.android.server.telecom.intent.action.CALLS_ADD_ENTRY" />
+ <protected-broadcast android:name="com.android.settings.location.MODE_CHANGING" />
+
+ <protected-broadcast android:name="ScheduleConditionProvider.EVALUATE" />
+ <protected-broadcast android:name="EventConditionProvider.EVALUATE" />
+ <protected-broadcast android:name="wifi_scan_available" />
+
+ <protected-broadcast android:name="action.cne.started" />
+ <protected-broadcast android:name="android.content.jobscheduler.JOB_DEADLINE_EXPIRED" />
+ <protected-broadcast android:name="android.intent.action.ACTION_UNSOL_RESPONSE_OEM_HOOK_RAW" />
+ <protected-broadcast android:name="android.net.conn.CONNECTIVITY_CHANGE_SUPL" />
+ <protected-broadcast android:name="android.os.action.ACTION_EFFECTS_SUPPRESSOR_CHANGED" />
+ <protected-broadcast android:name="android.os.action.LIGHT_DEVICE_IDLE_MODE_CHANGED" />
+ <protected-broadcast android:name="android.os.storage.action.VOLUME_STATE_CHANGED" />
+ <protected-broadcast android:name="com.android.server.action.UPDATE_TWILIGHT_STATE" />
+ <protected-broadcast android:name="com.android.server.device_idle.STEP_IDLE_STATE" />
+ <protected-broadcast android:name="com.android.server.device_idle.STEP_LIGHT_IDLE_STATE" />
+ <protected-broadcast android:name="com.android.server.Wifi.action.TOGGLE_PNO" />
+ <protected-broadcast android:name="intent.action.ACTION_RF_BAND_INFO" />
+ <protected-broadcast android:name="android.intent.action.MEDIA_RESOURCE_GRANTED" />
+ <protected-broadcast android:name="android.app.action.SECURITY_LOGS_AVAILABLE" />
+
+ <protected-broadcast android:name="android.app.action.INTERRUPTION_FILTER_CHANGED" />
+ <protected-broadcast android:name="android.app.action.INTERRUPTION_FILTER_CHANGED_INTERNAL" />
+ <protected-broadcast android:name="android.app.action.NOTIFICATION_POLICY_CHANGED" />
+ <protected-broadcast android:name="android.app.action.NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED" />
+ <protected-broadcast android:name="android.os.action.ACTION_EFFECTS_SUPPRESSOR_CHANGED" />
+
+ <protected-broadcast android:name="android.permission.GET_APP_GRANTED_URI_PERMISSIONS" />
+ <protected-broadcast android:name="android.permission.CLEAR_APP_GRANTED_URI_PERMISSIONS" />
+
+ <protected-broadcast android:name="android.intent.action.DYNAMIC_SENSOR_CHANGED" />
+
+ <protected-broadcast android:name="android.intent.action.ACTION_RADIO_OFF" />
+ <protected-broadcast android:name="android.intent.action.MANAGED_PROFILE_UNLOCKED" />
+
+ <protected-broadcast android:name="android.accounts.LOGIN_ACCOUNTS_CHANGED" />
+ <protected-broadcast android:name="com.android.sync.SYNC_CONN_STATUS_CHANGED" />
+
+ <protected-broadcast android:name="com.android.phone.SIP_INCOMING_CALL" />
+ <protected-broadcast android:name="com.android.phone.SIP_ADD_PHONE" />
+ <protected-broadcast android:name="com.android.phone.SIP_REMOVE_PHONE" />
+ <protected-broadcast android:name="com.android.phone.SIP_CALL_OPTION_CHANGED" />
+
+ <protected-broadcast android:name="android.bluetooth.adapter.action.BLE_ACL_CONNECTED" />
+ <protected-broadcast android:name="android.bluetooth.adapter.action.BLE_ACL_DISCONNECTED" />
+
+ <protected-broadcast android:name="android.bluetooth.input.profile.action.HANDSHAKE" />
+ <protected-broadcast android:name="android.bluetooth.input.profile.action.REPORT" />
+
+ <protected-broadcast android:name="android.intent.action.TWILIGHT_CHANGED" />
+
<!-- ====================================================================== -->
<!-- RUNTIME PERMISSIONS -->
<!-- ====================================================================== -->
@@ -332,28 +462,28 @@
<!-- Used for runtime permissions related to user's contacts and profile. -->
<permission-group android:name="android.permission-group.CONTACTS"
- android:icon="@drawable/perm_group_contacts"
- android:label="@string/permgrouplab_contacts"
- android:description="@string/permgroupdesc_contacts"
- android:priority="100" />
+ android:icon="@drawable/perm_group_contacts"
+ android:label="@string/permgrouplab_contacts"
+ android:description="@string/permgroupdesc_contacts"
+ android:priority="100" />
<!-- Allows an application to read the user's contacts data.
<p>Protection level: dangerous
-->
<permission android:name="android.permission.READ_CONTACTS"
- android:permissionGroup="android.permission-group.CONTACTS"
- android:label="@string/permlab_readContacts"
- android:description="@string/permdesc_readContacts"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.CONTACTS"
+ android:label="@string/permlab_readContacts"
+ android:description="@string/permdesc_readContacts"
+ android:protectionLevel="dangerous" />
<!-- Allows an application to write the user's contacts data.
<p>Protection level: dangerous
-->
<permission android:name="android.permission.WRITE_CONTACTS"
- android:permissionGroup="android.permission-group.CONTACTS"
- android:label="@string/permlab_writeContacts"
- android:description="@string/permdesc_writeContacts"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.CONTACTS"
+ android:label="@string/permlab_writeContacts"
+ android:description="@string/permdesc_writeContacts"
+ android:protectionLevel="dangerous" />
<!-- ====================================================================== -->
<!-- Permissions for accessing user's calendar -->
@@ -362,28 +492,28 @@
<!-- Used for runtime permissions related to user's calendar. -->
<permission-group android:name="android.permission-group.CALENDAR"
- android:icon="@drawable/perm_group_calendar"
- android:label="@string/permgrouplab_calendar"
- android:description="@string/permgroupdesc_calendar"
- android:priority="200" />
+ android:icon="@drawable/perm_group_calendar"
+ android:label="@string/permgrouplab_calendar"
+ android:description="@string/permgroupdesc_calendar"
+ android:priority="200" />
<!-- Allows an application to read the user's calendar data.
<p>Protection level: dangerous
-->
<permission android:name="android.permission.READ_CALENDAR"
- android:permissionGroup="android.permission-group.CALENDAR"
- android:label="@string/permlab_readCalendar"
- android:description="@string/permdesc_readCalendar"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.CALENDAR"
+ android:label="@string/permlab_readCalendar"
+ android:description="@string/permdesc_readCalendar"
+ android:protectionLevel="dangerous" />
<!-- Allows an application to write the user's calendar data.
<p>Protection level: dangerous
-->
<permission android:name="android.permission.WRITE_CALENDAR"
- android:permissionGroup="android.permission-group.CALENDAR"
- android:label="@string/permlab_writeCalendar"
- android:description="@string/permdesc_writeCalendar"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.CALENDAR"
+ android:label="@string/permlab_writeCalendar"
+ android:description="@string/permdesc_writeCalendar"
+ android:protectionLevel="dangerous" />
<!-- ====================================================================== -->
<!-- Permissions for accessing and modifying user's SMS messages -->
@@ -392,56 +522,56 @@
<!-- Used for runtime permissions related to user's SMS messages. -->
<permission-group android:name="android.permission-group.SMS"
- android:icon="@drawable/perm_group_sms"
- android:label="@string/permgrouplab_sms"
- android:description="@string/permgroupdesc_sms"
- android:priority="300" />
+ android:icon="@drawable/perm_group_sms"
+ android:label="@string/permgrouplab_sms"
+ android:description="@string/permgroupdesc_sms"
+ android:priority="300" />
<!-- Allows an application to send SMS messages.
<p>Protection level: dangerous
-->
<permission android:name="android.permission.SEND_SMS"
- android:permissionGroup="android.permission-group.SMS"
- android:label="@string/permlab_sendSms"
- android:description="@string/permdesc_sendSms"
- android:permissionFlags="costsMoney"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.SMS"
+ android:label="@string/permlab_sendSms"
+ android:description="@string/permdesc_sendSms"
+ android:permissionFlags="costsMoney"
+ android:protectionLevel="dangerous" />
<!-- Allows an application to receive SMS messages.
<p>Protection level: dangerous
-->
<permission android:name="android.permission.RECEIVE_SMS"
- android:permissionGroup="android.permission-group.SMS"
- android:label="@string/permlab_receiveSms"
- android:description="@string/permdesc_receiveSms"
- android:protectionLevel="dangerous"/>
+ android:permissionGroup="android.permission-group.SMS"
+ android:label="@string/permlab_receiveSms"
+ android:description="@string/permdesc_receiveSms"
+ android:protectionLevel="dangerous"/>
<!-- Allows an application to read SMS messages.
<p>Protection level: dangerous
-->
<permission android:name="android.permission.READ_SMS"
- android:permissionGroup="android.permission-group.SMS"
- android:label="@string/permlab_readSms"
- android:description="@string/permdesc_readSms"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.SMS"
+ android:label="@string/permlab_readSms"
+ android:description="@string/permdesc_readSms"
+ android:protectionLevel="dangerous" />
<!-- Allows an application to receive WAP push messages.
<p>Protection level: dangerous
-->
<permission android:name="android.permission.RECEIVE_WAP_PUSH"
- android:permissionGroup="android.permission-group.SMS"
- android:label="@string/permlab_receiveWapPush"
- android:description="@string/permdesc_receiveWapPush"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.SMS"
+ android:label="@string/permlab_receiveWapPush"
+ android:description="@string/permdesc_receiveWapPush"
+ android:protectionLevel="dangerous" />
<!-- Allows an application to monitor incoming MMS messages.
<p>Protection level: dangerous
-->
<permission android:name="android.permission.RECEIVE_MMS"
- android:permissionGroup="android.permission-group.SMS"
- android:label="@string/permlab_receiveMms"
- android:description="@string/permdesc_receiveMms"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.SMS"
+ android:label="@string/permlab_receiveMms"
+ android:description="@string/permdesc_receiveMms"
+ android:protectionLevel="dangerous" />
<!-- Allows an application to read previously received cell broadcast
messages and to register a content observer to get notifications when
@@ -456,10 +586,10 @@
<p>Protection level: dangerous
@hide Pending API council approval -->
<permission android:name="android.permission.READ_CELL_BROADCASTS"
- android:permissionGroup="android.permission-group.SMS"
- android:label="@string/permlab_readCellBroadcasts"
- android:description="@string/permdesc_readCellBroadcasts"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.SMS"
+ android:label="@string/permlab_readCellBroadcasts"
+ android:description="@string/permdesc_readCellBroadcasts"
+ android:protectionLevel="dangerous" />
<!-- ====================================================================== -->
<!-- Permissions for accessing external storage -->
@@ -468,10 +598,10 @@
<!-- Used for runtime permissions related to the shared external storage. -->
<permission-group android:name="android.permission-group.STORAGE"
- android:icon="@drawable/perm_group_storage"
- android:label="@string/permgrouplab_storage"
- android:description="@string/permgroupdesc_storage"
- android:priority="900" />
+ android:icon="@drawable/perm_group_storage"
+ android:label="@string/permgrouplab_storage"
+ android:description="@string/permgroupdesc_storage"
+ android:priority="900" />
<!-- Allows an application to read from external storage.
<p>Any app that declares the {@link #WRITE_EXTERNAL_STORAGE} permission is implicitly
@@ -496,10 +626,10 @@
<p>Protection level: dangerous
-->
<permission android:name="android.permission.READ_EXTERNAL_STORAGE"
- android:permissionGroup="android.permission-group.STORAGE"
- android:label="@string/permlab_sdcardRead"
- android:description="@string/permdesc_sdcardRead"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.STORAGE"
+ android:label="@string/permlab_sdcardRead"
+ android:description="@string/permdesc_sdcardRead"
+ android:protectionLevel="dangerous" />
<!-- Allows an application to write to external storage.
<p class="note"><strong>Note:</strong> If <em>both</em> your <a
@@ -517,10 +647,10 @@
<p>Protection level: dangerous
-->
<permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
- android:permissionGroup="android.permission-group.STORAGE"
- android:label="@string/permlab_sdcardWrite"
- android:description="@string/permdesc_sdcardWrite"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.STORAGE"
+ android:label="@string/permlab_sdcardWrite"
+ android:description="@string/permdesc_sdcardWrite"
+ android:protectionLevel="dangerous" />
<!-- ====================================================================== -->
<!-- Permissions for accessing the device location -->
@@ -529,28 +659,28 @@
<!-- Used for permissions that allow accessing the device location. -->
<permission-group android:name="android.permission-group.LOCATION"
- android:icon="@drawable/perm_group_location"
- android:label="@string/permgrouplab_location"
- android:description="@string/permgroupdesc_location"
- android:priority="400" />
+ android:icon="@drawable/perm_group_location"
+ android:label="@string/permgrouplab_location"
+ android:description="@string/permgroupdesc_location"
+ android:priority="400" />
<!-- Allows an app to access precise location.
<p>Protection level: dangerous
-->
<permission android:name="android.permission.ACCESS_FINE_LOCATION"
- android:permissionGroup="android.permission-group.LOCATION"
- android:label="@string/permlab_accessFineLocation"
- android:description="@string/permdesc_accessFineLocation"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.LOCATION"
+ android:label="@string/permlab_accessFineLocation"
+ android:description="@string/permdesc_accessFineLocation"
+ android:protectionLevel="dangerous" />
<!-- Allows an app to access approximate location.
<p>Protection level: dangerous
-->
<permission android:name="android.permission.ACCESS_COARSE_LOCATION"
- android:permissionGroup="android.permission-group.LOCATION"
- android:label="@string/permlab_accessCoarseLocation"
- android:description="@string/permdesc_accessCoarseLocation"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.LOCATION"
+ android:label="@string/permlab_accessCoarseLocation"
+ android:description="@string/permdesc_accessCoarseLocation"
+ android:protectionLevel="dangerous" />
<!-- ====================================================================== -->
<!-- Permissions for accessing the device telephony -->
@@ -559,10 +689,10 @@
<!-- Used for permissions that are associated telephony features. -->
<permission-group android:name="android.permission-group.PHONE"
- android:icon="@drawable/perm_group_phone_calls"
- android:label="@string/permgrouplab_phone"
- android:description="@string/permgroupdesc_phone"
- android:priority="500" />
+ android:icon="@drawable/perm_group_phone_calls"
+ android:label="@string/permgrouplab_phone"
+ android:description="@string/permgroupdesc_phone"
+ android:priority="500" />
<!-- Allows read only access to phone state.
<p class="note"><strong>Note:</strong> If <em>both</em> your <a
@@ -576,32 +706,32 @@
<p>Protection level: dangerous
-->
<permission android:name="android.permission.READ_PHONE_STATE"
- android:permissionGroup="android.permission-group.PHONE"
- android:label="@string/permlab_readPhoneState"
- android:description="@string/permdesc_readPhoneState"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.PHONE"
+ android:label="@string/permlab_readPhoneState"
+ android:description="@string/permdesc_readPhoneState"
+ android:protectionLevel="dangerous" />
<!-- Allows an application to initiate a phone call without going through
the Dialer user interface for the user to confirm the call.
<p>Protection level: dangerous
-->
<permission android:name="android.permission.CALL_PHONE"
- android:permissionGroup="android.permission-group.PHONE"
- android:permissionFlags="costsMoney"
- android:label="@string/permlab_callPhone"
- android:description="@string/permdesc_callPhone"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.PHONE"
+ android:permissionFlags="costsMoney"
+ android:label="@string/permlab_callPhone"
+ android:description="@string/permdesc_callPhone"
+ android:protectionLevel="dangerous" />
<!-- Allows an application to access the IMS call service: making and
modifying a call
- <p>Protection level: signature|system
+ <p>Protection level: signature|privileged
@hide
-->
<permission android:name="android.permission.ACCESS_IMS_CALL_SERVICE"
- android:permissionGroup="android.permission-group.PHONE"
- android:label="@string/permlab_accessImsCallService"
- android:description="@string/permdesc_accessImsCallService"
- android:protectionLevel="signature|system" />
+ android:permissionGroup="android.permission-group.PHONE"
+ android:label="@string/permlab_accessImsCallService"
+ android:description="@string/permdesc_accessImsCallService"
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to read the user's call log.
<p class="note"><strong>Note:</strong> If your app uses the
@@ -616,13 +746,13 @@
<p>Protection level: dangerous
-->
<permission android:name="android.permission.READ_CALL_LOG"
- android:permissionGroup="android.permission-group.PHONE"
- android:label="@string/permlab_readCallLog"
- android:description="@string/permdesc_readCallLog"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.PHONE"
+ android:label="@string/permlab_readCallLog"
+ android:description="@string/permdesc_readCallLog"
+ android:protectionLevel="dangerous" />
<!-- Allows an application to write (but not read) the user's
- contacts data.
+ call log data.
<p class="note"><strong>Note:</strong> If your app uses the
{@link #WRITE_CONTACTS} permission and <em>both</em> your <a
href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
@@ -635,28 +765,28 @@
<p>Protection level: dangerous
-->
<permission android:name="android.permission.WRITE_CALL_LOG"
- android:permissionGroup="android.permission-group.PHONE"
- android:label="@string/permlab_writeCallLog"
- android:description="@string/permdesc_writeCallLog"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.PHONE"
+ android:label="@string/permlab_writeCallLog"
+ android:description="@string/permdesc_writeCallLog"
+ android:protectionLevel="dangerous" />
<!-- Allows an application to add voicemails into the system.
<p>Protection level: dangerous
-->
<permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL"
- android:permissionGroup="android.permission-group.PHONE"
- android:label="@string/permlab_addVoicemail"
- android:description="@string/permdesc_addVoicemail"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.PHONE"
+ android:label="@string/permlab_addVoicemail"
+ android:description="@string/permdesc_addVoicemail"
+ android:protectionLevel="dangerous" />
<!-- Allows an application to use SIP service.
<p>Protection level: dangerous
-->
<permission android:name="android.permission.USE_SIP"
- android:permissionGroup="android.permission-group.PHONE"
- android:description="@string/permdesc_use_sip"
- android:label="@string/permlab_use_sip"
- android:protectionLevel="dangerous"/>
+ android:permissionGroup="android.permission-group.PHONE"
+ android:description="@string/permdesc_use_sip"
+ android:label="@string/permlab_use_sip"
+ android:protectionLevel="dangerous"/>
<!-- Allows an application to see the number being dialed during an outgoing
call with the option to redirect the call to a different number or
@@ -664,10 +794,10 @@
<p>Protection level: dangerous
-->
<permission android:name="android.permission.PROCESS_OUTGOING_CALLS"
- android:permissionGroup="android.permission-group.PHONE"
- android:label="@string/permlab_processOutgoingCalls"
- android:description="@string/permdesc_processOutgoingCalls"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.PHONE"
+ android:label="@string/permlab_processOutgoingCalls"
+ android:description="@string/permdesc_processOutgoingCalls"
+ android:protectionLevel="dangerous" />
<!-- ====================================================================== -->
<!-- Permissions for accessing the device microphone -->
@@ -678,19 +808,19 @@
microphone audio from the device. Note that phone calls also capture audio
but are in a separate (more visible) permission group. -->
<permission-group android:name="android.permission-group.MICROPHONE"
- android:icon="@drawable/perm_group_microphone"
- android:label="@string/permgrouplab_microphone"
- android:description="@string/permgroupdesc_microphone"
- android:priority="600" />
+ android:icon="@drawable/perm_group_microphone"
+ android:label="@string/permgrouplab_microphone"
+ android:description="@string/permgroupdesc_microphone"
+ android:priority="600" />
<!-- Allows an application to record audio.
<p>Protection level: dangerous
-->
<permission android:name="android.permission.RECORD_AUDIO"
- android:permissionGroup="android.permission-group.MICROPHONE"
- android:label="@string/permlab_recordAudio"
- android:description="@string/permdesc_recordAudio"
- android:protectionLevel="dangerous"/>
+ android:permissionGroup="android.permission-group.MICROPHONE"
+ android:label="@string/permlab_recordAudio"
+ android:description="@string/permdesc_recordAudio"
+ android:protectionLevel="dangerous"/>
<!-- ====================================================================== -->
<!-- Permissions for accessing the device camera -->
@@ -700,25 +830,25 @@
<!-- Used for permissions that are associated with accessing
camera or capturing images/video from the device. -->
<permission-group android:name="android.permission-group.CAMERA"
- android:icon="@drawable/perm_group_camera"
- android:label="@string/permgrouplab_camera"
- android:description="@string/permgroupdesc_camera"
- android:priority="700" />
+ android:icon="@drawable/perm_group_camera"
+ android:label="@string/permgrouplab_camera"
+ android:description="@string/permgroupdesc_camera"
+ android:priority="700" />
<!-- Required to be able to access the camera device.
<p>This will automatically enforce the <a
- href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code
- <uses-feature>}</a> manifest element for <em>all</em> camera features.
+ href="{@docRoot}guide/topics/manifest/uses-feature-element.html">
+ <uses-feature>}</a> manifest element for <em>all</em> camera features.
If you do not require all camera features or can properly operate if a camera
is not available, then you must modify your manifest as appropriate in order to
install on devices that don't support all camera features.</p>
<p>Protection level: dangerous
-->
<permission android:name="android.permission.CAMERA"
- android:permissionGroup="android.permission-group.CAMERA"
- android:label="@string/permlab_camera"
- android:description="@string/permdesc_camera"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.CAMERA"
+ android:label="@string/permlab_camera"
+ android:description="@string/permdesc_camera"
+ android:protectionLevel="dangerous" />
<!-- ====================================================================== -->
@@ -729,28 +859,28 @@
<!-- Used for permissions that are associated with accessing
camera or capturing images/video from the device. -->
<permission-group android:name="android.permission-group.SENSORS"
- android:icon="@drawable/perm_group_sensors"
- android:label="@string/permgrouplab_sensors"
- android:description="@string/permgroupdesc_sensors"
- android:priority="800" />
+ android:icon="@drawable/perm_group_sensors"
+ android:label="@string/permgrouplab_sensors"
+ android:description="@string/permgroupdesc_sensors"
+ android:priority="800" />
<!-- Allows an application to access data from sensors that the user uses to
measure what is happening inside his/her body, such as heart rate.
<p>Protection level: dangerous -->
<permission android:name="android.permission.BODY_SENSORS"
- android:permissionGroup="android.permission-group.SENSORS"
- android:label="@string/permlab_bodySensors"
- android:description="@string/permdesc_bodySensors"
- android:protectionLevel="dangerous" />
+ android:permissionGroup="android.permission-group.SENSORS"
+ android:label="@string/permlab_bodySensors"
+ android:description="@string/permdesc_bodySensors"
+ android:protectionLevel="dangerous" />
<!-- Allows an app to use fingerprint hardware.
<p>Protection level: normal
-->
<permission android:name="android.permission.USE_FINGERPRINT"
- android:permissionGroup="android.permission-group.SENSORS"
- android:label="@string/permlab_useFingerprint"
- android:description="@string/permdesc_useFingerprint"
- android:protectionLevel="normal" />
+ android:permissionGroup="android.permission-group.SENSORS"
+ android:label="@string/permlab_useFingerprint"
+ android:description="@string/permdesc_useFingerprint"
+ android:protectionLevel="normal" />
<!-- ====================================================================== -->
<!-- REMOVED PERMISSIONS -->
@@ -758,78 +888,93 @@
<!-- @hide We need to keep this around for backwards compatibility -->
<permission android:name="android.permission.READ_PROFILE"
- android:protectionLevel="normal"
- android:permissionFlags="hidden"/>
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
<!-- @hide We need to keep this around for backwards compatibility -->
<permission android:name="android.permission.WRITE_PROFILE"
- android:protectionLevel="normal"
- android:permissionFlags="hidden"/>
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
<!-- @hide We need to keep this around for backwards compatibility -->
<permission android:name="android.permission.READ_SOCIAL_STREAM"
- android:protectionLevel="normal"
- android:permissionFlags="hidden"/>
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
<!-- @hide We need to keep this around for backwards compatibility -->
<permission android:name="android.permission.WRITE_SOCIAL_STREAM"
- android:protectionLevel="normal"
- android:permissionFlags="hidden"/>
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
<!-- @hide We need to keep this around for backwards compatibility -->
<permission android:name="android.permission.READ_USER_DICTIONARY"
- android:protectionLevel="normal"
- android:permissionFlags="hidden"/>
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
<!-- @hide We need to keep this around for backwards compatibility -->
<permission android:name="android.permission.WRITE_USER_DICTIONARY"
- android:protectionLevel="normal"
- android:permissionFlags="hidden"/>
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
<!-- @hide We need to keep this around for backwards compatibility -->
<permission android:name="android.permission.WRITE_SMS"
- android:protectionLevel="normal"
- android:permissionFlags="hidden"/>
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
<!-- @hide We need to keep this around for backwards compatibility -->
<permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"
- android:protectionLevel="normal"
- android:permissionFlags="hidden"/>
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
<!-- @hide We need to keep this around for backwards compatibility -->
<permission android:name="com.android.browser.permission.WRITE_HISTORY_BOOKMARKS"
- android:protectionLevel="normal"
- android:permissionFlags="hidden"/>
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
<!-- @hide We need to keep this around for backwards compatibility -->
<permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"
- android:protectionLevel="normal"
- android:permissionFlags="hidden"/>
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
<!-- @hide We need to keep this around for backwards compatibility -->
<permission android:name="android.permission.MANAGE_ACCOUNTS"
- android:protectionLevel="normal"
- android:permissionFlags="hidden"/>
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
<!-- @hide We need to keep this around for backwards compatibility -->
<permission android:name="android.permission.USE_CREDENTIALS"
- android:protectionLevel="normal"
- android:permissionFlags="hidden"/>
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
<!-- @hide We need to keep this around for backwards compatibility -->
<permission android:name="android.permission.SUBSCRIBED_FEEDS_READ"
- android:protectionLevel="normal"
- android:permissionFlags="hidden"/>
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
<!-- @hide We need to keep this around for backwards compatibility -->
<permission android:name="android.permission.SUBSCRIBED_FEEDS_WRITE"
- android:protectionLevel="normal"
- android:permissionFlags="hidden"/>
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
+
+ <!-- @hide We need to keep this around for backwards compatibility -->
+ <permission android:name="android.permission.FLASHLIGHT"
+ android:protectionLevel="normal"
+ android:permissionFlags="removed"/>
<!-- ====================================================================== -->
<!-- INSTALL PERMISSIONS -->
<!-- ====================================================================== -->
+ ` <!-- =========================================== -->
+ <!-- Permissions for accessing contact metadata -->
+ <!-- =========================================== -->
+ <eat-comment />
+
+ <!-- @SystemApi Allows an application to read/write contact metadata.
+ <p>Not for use by third-party applications. -->
+ <permission android:name="android.permission.READ_WRITE_CONTACT_METADATA"
+ android:protectionLevel="signature|system" />
+
<!-- ================================== -->
<!-- Permissions for accessing messages -->
<!-- ================================== -->
@@ -839,31 +984,35 @@
to handle the respond-via-message action during incoming calls.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.SEND_RESPOND_VIA_MESSAGE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to filter carrier specific sms.
@hide -->
<permission android:name="android.permission.CARRIER_FILTER_SMS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to receive emergency cell broadcast messages,
to record or display them to the user.
- <p>Not for use by third-party applications.
- @hide Pending API council approval -->
+ <p>Not for use by third-party applications. -->
<permission android:name="android.permission.RECEIVE_EMERGENCY_BROADCAST"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to monitor incoming Bluetooth MAP messages, to record
or perform processing on them. -->
<!-- @hide -->
<permission android:name="android.permission.RECEIVE_BLUETOOTH_MAP"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi @hide Allows an application to execute contacts directory search.
This should only be used by ContactsProvider.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.BIND_DIRECTORY_SEARCH"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
+
+ <!-- @SystemApi @hide Allows an application to modify cell broadcasts through the content provider.
+ <p>Not for use by third-party applications. -->
+ <permission android:name="android.permission.MODIFY_CELL_BROADCASTS"
+ android:protectionLevel="signature|privileged" />
<!-- =============================================================== -->
<!-- Permissions for setting the device alarm -->
@@ -874,9 +1023,9 @@
<p>Protection level: normal
-->
<permission android:name="com.android.alarm.permission.SET_ALARM"
- android:label="@string/permlab_setAlarm"
- android:description="@string/permdesc_setAlarm"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_setAlarm"
+ android:description="@string/permdesc_setAlarm"
+ android:protectionLevel="normal" />
<!-- =============================================================== -->
<!-- Permissions for accessing the user voicemail -->
@@ -884,16 +1033,16 @@
<eat-comment />
<!-- Allows an application to modify and remove existing voicemails in the system
- <p>Protection level: system|signature
+ <p>Protection level: signature|privileged
-->
<permission android:name="com.android.voicemail.permission.WRITE_VOICEMAIL"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to read voicemails in the system.
- <p>Protection level: system|signature
+ <p>Protection level: signature|privileged
-->
<permission android:name="com.android.voicemail.permission.READ_VOICEMAIL"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
<!-- ======================================= -->
<!-- Permissions for accessing location info -->
@@ -904,26 +1053,26 @@
<p>Protection level: normal
-->
<permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"
- android:label="@string/permlab_accessLocationExtraCommands"
- android:description="@string/permdesc_accessLocationExtraCommands"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_accessLocationExtraCommands"
+ android:description="@string/permdesc_accessLocationExtraCommands"
+ android:protectionLevel="normal" />
<!-- @SystemApi Allows an application to install a location provider into the Location Manager.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.INSTALL_LOCATION_PROVIDER"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi @hide Allows HDMI-CEC service to access device and configuration files.
This should only be used by HDMI-CEC service.
-->
<permission android:name="android.permission.HDMI_CEC"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to use location features in hardware,
such as the geofencing api.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.LOCATION_HARDWARE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<uses-permission android:name="android.permission.LOCATION_HARDWARE"/>
<!-- @SystemApi Allows an application to create mock location providers for testing.
@@ -931,7 +1080,7 @@
@hide
-->
<permission android:name="android.permission.ACCESS_MOCK_LOCATION"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- ======================================= -->
<!-- Permissions for accessing networks -->
@@ -942,67 +1091,73 @@
<p>Protection level: normal
-->
<permission android:name="android.permission.INTERNET"
- android:description="@string/permdesc_createNetworkSockets"
- android:label="@string/permlab_createNetworkSockets"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_createNetworkSockets"
+ android:label="@string/permlab_createNetworkSockets"
+ android:protectionLevel="normal" />
<!-- Allows applications to access information about networks
<p>Protection level: normal
-->
<permission android:name="android.permission.ACCESS_NETWORK_STATE"
- android:description="@string/permdesc_accessNetworkState"
- android:label="@string/permlab_accessNetworkState"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_accessNetworkState"
+ android:label="@string/permlab_accessNetworkState"
+ android:protectionLevel="normal" />
<!-- Allows applications to access information about Wi-Fi networks.
<p>Protection level: normal
-->
<permission android:name="android.permission.ACCESS_WIFI_STATE"
- android:description="@string/permdesc_accessWifiState"
- android:label="@string/permlab_accessWifiState"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_accessWifiState"
+ android:label="@string/permlab_accessWifiState"
+ android:protectionLevel="normal" />
<!-- Allows applications to change Wi-Fi connectivity state.
<p>Protection level: normal
-->
<permission android:name="android.permission.CHANGE_WIFI_STATE"
- android:description="@string/permdesc_changeWifiState"
- android:label="@string/permlab_changeWifiState"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_changeWifiState"
+ android:label="@string/permlab_changeWifiState"
+ android:protectionLevel="normal" />
<!-- @SystemApi @hide Allows applications to read Wi-Fi credential.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.READ_WIFI_CREDENTIAL"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
+
+ <!-- @SystemApi @hide Allows applications to change tether state and run
+ tether carrier provisioning.
+ <p>Not for use by third-party applications. -->
+ <permission android:name="android.permission.TETHER_PRIVILEGED"
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi @hide Allow system apps to receive broadcast
when a wifi network credential is changed.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.RECEIVE_WIFI_CREDENTIAL_CHANGE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi @hide Allows an application to modify any wifi configuration, even if created
by another application. Once reconfigured the original creator cannot make any further
modifications.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.OVERRIDE_WIFI_CONFIG"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @hide -->
<permission android:name="android.permission.ACCESS_WIMAX_STATE"
- android:description="@string/permdesc_accessWimaxState"
- android:label="@string/permlab_accessWimaxState"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_accessWimaxState"
+ android:label="@string/permlab_accessWimaxState"
+ android:protectionLevel="normal" />
<!-- @hide -->
<permission android:name="android.permission.CHANGE_WIMAX_STATE"
- android:description="@string/permdesc_changeWimaxState"
- android:label="@string/permlab_changeWimaxState"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_changeWimaxState"
+ android:label="@string/permlab_changeWimaxState"
+ android:protectionLevel="normal" />
<!-- Allows applications to act as network scorers. @hide @SystemApi-->
<permission android:name="android.permission.SCORE_NETWORKS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- ======================================= -->
<!-- Permissions for short range, peripheral networks -->
@@ -1013,68 +1168,68 @@
<p>Protection level: normal
-->
<permission android:name="android.permission.BLUETOOTH"
- android:description="@string/permdesc_bluetooth"
- android:label="@string/permlab_bluetooth"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_bluetooth"
+ android:label="@string/permlab_bluetooth"
+ android:protectionLevel="normal" />
<!-- Allows applications to discover and pair bluetooth devices.
<p>Protection level: normal
-->
<permission android:name="android.permission.BLUETOOTH_ADMIN"
- android:description="@string/permdesc_bluetoothAdmin"
- android:label="@string/permlab_bluetoothAdmin"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_bluetoothAdmin"
+ android:label="@string/permlab_bluetoothAdmin"
+ android:protectionLevel="normal" />
<!-- @SystemApi Allows applications to pair bluetooth devices without user interaction, and to
allow or disallow phonebook access or message access.
This is not available to third party applications. -->
<permission android:name="android.permission.BLUETOOTH_PRIVILEGED"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
<!-- Control access to email providers exclusively for Bluetooth
@hide
-->
<permission android:name="android.permission.BLUETOOTH_MAP"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows bluetooth stack to access files
@hide This should only be used by Bluetooth apk.
-->
<permission android:name="android.permission.BLUETOOTH_STACK"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows applications to perform I/O operations over NFC.
<p>Protection level: normal
-->
<permission android:name="android.permission.NFC"
- android:description="@string/permdesc_nfc"
- android:label="@string/permlab_nfc"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_nfc"
+ android:label="@string/permlab_nfc"
+ android:protectionLevel="normal" />
<!-- @SystemApi Allows an internal user to use privileged ConnectivityManager APIs.
@hide -->
<permission android:name="android.permission.CONNECTIVITY_INTERNAL"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows a system application to access hardware packet offload capabilities.
@hide -->
<permission android:name="android.permission.PACKET_KEEPALIVE_OFFLOAD"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi
@hide -->
<permission android:name="android.permission.RECEIVE_DATA_ACTIVITY_CHANGE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows access to the loop radio (Android@Home mesh network) device.
@hide -->
<permission android:name="android.permission.LOOP_RADIO"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows sending and receiving handover transfer status from Wifi and Bluetooth
@hide -->
<permission android:name="android.permission.NFC_HANDOVER_STATUS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- ================================== -->
<!-- Permissions for accessing accounts -->
@@ -1085,15 +1240,15 @@
<p>Protection level: normal
-->
<permission android:name="android.permission.GET_ACCOUNTS"
- android:permissionGroup="android.permission-group.CONTACTS"
- android:protectionLevel="dangerous"
- android:description="@string/permdesc_getAccounts"
- android:label="@string/permlab_getAccounts" />
+ android:permissionGroup="android.permission-group.CONTACTS"
+ android:protectionLevel="dangerous"
+ android:description="@string/permdesc_getAccounts"
+ android:label="@string/permlab_getAccounts" />
<!-- @SystemApi Allows applications to call into AccountAuthenticators.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.ACCOUNT_MANAGER"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- ================================== -->
<!-- Permissions for accessing hardware that may effect battery life-->
@@ -1104,42 +1259,34 @@
<p>Protection level: normal
-->
<permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"
- android:description="@string/permdesc_changeWifiMulticastState"
- android:label="@string/permlab_changeWifiMulticastState"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_changeWifiMulticastState"
+ android:label="@string/permlab_changeWifiMulticastState"
+ android:protectionLevel="normal" />
<!-- Allows access to the vibrator.
<p>Protection level: normal
-->
<permission android:name="android.permission.VIBRATE"
- android:label="@string/permlab_vibrate"
- android:description="@string/permdesc_vibrate"
- android:protectionLevel="normal" />
-
- <!-- Allows access to the flashlight.
- <p>Protection level: normal
- -->
- <permission android:name="android.permission.FLASHLIGHT"
- android:label="@string/permlab_flashlight"
- android:description="@string/permdesc_flashlight"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_vibrate"
+ android:description="@string/permdesc_vibrate"
+ android:protectionLevel="normal" />
<!-- Allows using PowerManager WakeLocks to keep processor from sleeping or screen
from dimming.
<p>Protection level: normal
-->
<permission android:name="android.permission.WAKE_LOCK"
- android:label="@string/permlab_wakeLock"
- android:description="@string/permdesc_wakeLock"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_wakeLock"
+ android:description="@string/permdesc_wakeLock"
+ android:protectionLevel="normal" />
<!-- Allows using the device's IR transmitter, if available.
<p>Protection level: normal
-->
<permission android:name="android.permission.TRANSMIT_IR"
- android:label="@string/permlab_transmitIr"
- android:description="@string/permdesc_transmitIr"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_transmitIr"
+ android:description="@string/permdesc_transmitIr"
+ android:protectionLevel="normal" />
<!-- ==================================================== -->
<!-- Permissions related to changing audio settings -->
@@ -1150,9 +1297,9 @@
<p>Protection level: normal
-->
<permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"
- android:label="@string/permlab_modifyAudioSettings"
- android:description="@string/permdesc_modifyAudioSettings"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_modifyAudioSettings"
+ android:description="@string/permdesc_modifyAudioSettings"
+ android:protectionLevel="normal" />
<!-- ================================== -->
<!-- Permissions for accessing hardware -->
@@ -1162,68 +1309,68 @@
<!-- @SystemApi Allows an application to manage preferences and permissions for USB devices
@hide -->
<permission android:name="android.permission.MANAGE_USB"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to access the MTP USB kernel driver.
For use only by the device side MTP implementation.
@hide -->
<permission android:name="android.permission.ACCESS_MTP"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows access to hardware peripherals. Intended only for hardware testing.
<p>Not for use by third-party applications.
@hide
-->
<permission android:name="android.permission.HARDWARE_TEST"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows access to FM
@hide This is not a third-party API (intended for system apps).-->
<permission android:name="android.permission.ACCESS_FM_RADIO"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows access to configure network interfaces, configure/use IPSec, etc.
@hide -->
<permission android:name="android.permission.NET_ADMIN"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows registration for remote audio playback. @hide -->
<permission android:name="android.permission.REMOTE_AUDIO_PLAYBACK"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows TvInputService to access underlying TV input hardware such as
built-in tuners and HDMI-in's.
@hide This should only be used by OEM's TvInputService's.
-->
<permission android:name="android.permission.TV_INPUT_HARDWARE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows to capture a frame of TV input hardware such as
built-in tuners and HDMI-in's.
@hide <p>Not for use by third-party applications.
-->
<permission android:name="android.permission.CAPTURE_TV_INPUT"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @hide Allows TvInputService to access DVB device.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.DVB_DEVICE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @hide Allows enabling/disabling OEM unlock
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.OEM_UNLOCK_STATE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @hide Allows querying state of PersistentDataBlock
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.ACCESS_PDB_STATE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @hide Allows system update service to notify device owner about pending updates.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.NOTIFY_PENDING_SYSTEM_UPDATE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- =========================================== -->
<!-- Permissions associated with camera and image capture -->
@@ -1234,12 +1381,12 @@
a camera is in use by an application.
@hide -->
<permission android:name="android.permission.CAMERA_DISABLE_TRANSMIT_LED"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows sending the camera service notifications about system-wide events.
@hide -->
<permission android:name="android.permission.CAMERA_SEND_SYSTEM_EVENTS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- =========================================== -->
<!-- Permissions associated with telephony state -->
@@ -1250,43 +1397,50 @@
Does not include placing calls.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.MODIFY_PHONE_STATE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows read only access to precise phone state.
@hide Pending API council approval -->
<permission android:name="android.permission.READ_PRECISE_PHONE_STATE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows read access to privileged phone state.
@hide Used internally. -->
<permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Protects the ability to register any PhoneAccount with
PhoneAccount#CAPABILITY_SIM_SUBSCRIPTION. This capability indicates that the PhoneAccount
corresponds to a device SIM.
@hide -->
<permission android:name="android.permission.REGISTER_SIM_SUBSCRIPTION"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Protects the ability to register any PhoneAccount with
PhoneAccount#CAPABILITY_CALL_PROVIDER.
@hide -->
<permission android:name="android.permission.REGISTER_CALL_PROVIDER"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Protects the ability to register any PhoneAccount with
PhoneAccount#CAPABILITY_CONNECTION_MANAGER
@hide -->
<permission android:name="android.permission.REGISTER_CONNECTION_MANAGER"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
<!-- Must be required by a {@link android.telecom.InCallService},
to ensure that only the system can bind to it.
- <p>Protection level: system|signature
+ <p>Protection level: signature|privileged
-->
<permission android:name="android.permission.BIND_INCALL_SERVICE"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
+
+ <!-- Must be required by a {@link android.telecom.CallScreeningService},
+ to ensure that only the system can bind to it.
+ <p>Protection level: signature|privileged
+ -->
+ <permission android:name="android.permission.BIND_SCREENING_SERVICE"
+ android:protectionLevel="signature|privileged" />
<!-- Must be required by a {@link android.telecom.ConnectionService},
to ensure that only the system can bind to it.
@@ -1295,24 +1449,24 @@
@SystemApi
@hide -->
<permission android:name="android.permission.BIND_CONNECTION_SERVICE"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
<!-- Must be required by a {@link android.telecom.ConnectionService},
to ensure that only the system can bind to it.
- <p>Protection level: system|signature
+ <p>Protection level: signature|privileged
-->
<permission android:name="android.permission.BIND_TELECOM_CONNECTION_SERVICE"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to control the in-call experience.
@hide -->
<permission android:name="android.permission.CONTROL_INCALL_EXPERIENCE"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to receive STK related commands.
@hide -->
<permission android:name="android.permission.RECEIVE_STK_COMMANDS"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
<!-- ================================== -->
<!-- Permissions for sdcard interaction -->
@@ -1322,14 +1476,14 @@
<!-- @SystemApi Allows an application to write to internal media storage
@hide -->
<permission android:name="android.permission.WRITE_MEDIA_STORAGE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to manage access to documents, usually as part
of a document picker.
<p>Protection level: signature
-->
<permission android:name="android.permission.MANAGE_DOCUMENTS"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- ================================== -->
<!-- Permissions for screenlock -->
@@ -1340,9 +1494,9 @@
<p>Protection level: normal
-->
<permission android:name="android.permission.DISABLE_KEYGUARD"
- android:description="@string/permdesc_disableKeyguard"
- android:label="@string/permlab_disableKeyguard"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_disableKeyguard"
+ android:label="@string/permlab_disableKeyguard"
+ android:protectionLevel="normal" />
<!-- ================================== -->
<!-- Permissions to access other installed applications -->
@@ -1351,9 +1505,9 @@
<!-- @deprecated No longer enforced. -->
<permission android:name="android.permission.GET_TASKS"
- android:label="@string/permlab_getTasks"
- android:description="@string/permdesc_getTasks"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_getTasks"
+ android:description="@string/permdesc_getTasks"
+ android:protectionLevel="normal" />
<!-- New version of GET_TASKS that apps can request, since GET_TASKS doesn't really
give access to task information. We need this new one because there are
@@ -1366,87 +1520,93 @@
@hide
@SystemApi -->
<permission android:name="android.permission.REAL_GET_TASKS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to start a task from a ActivityManager#RecentTaskInfo.
@hide -->
<permission android:name="android.permission.START_TASKS_FROM_RECENTS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi @hide Allows an application to call APIs that allow it to do interactions
across the users on the device, using singleton services and
user-targeted broadcasts. This permission is not available to
third party applications. -->
<permission android:name="android.permission.INTERACT_ACROSS_USERS"
- android:protectionLevel="signature|privileged|development" />
+ android:protectionLevel="signature|privileged|development" />
<!-- @hide Fuller form of {@link android.Manifest.permission#INTERACT_ACROSS_USERS}
that removes restrictions on where broadcasts can be sent and allows other
types of interactions. -->
<permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL"
- android:protectionLevel="signature|installer" />
+ android:protectionLevel="signature|installer" />
<!-- @SystemApi @hide Allows an application to call APIs that allow it to query and manage
users on the device. This permission is not available to
third party applications. -->
<permission android:name="android.permission.MANAGE_USERS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @hide Allows an application to set the profile owners and the device owner.
This permission is not available to third party applications.-->
<permission android:name="android.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS"
- android:protectionLevel="signature"
- android:label="@string/permlab_manageProfileAndDeviceOwners"
- android:description="@string/permdesc_manageProfileAndDeviceOwners" />
+ android:protectionLevel="signature"
+ android:label="@string/permlab_manageProfileAndDeviceOwners"
+ android:description="@string/permdesc_manageProfileAndDeviceOwners" />
<!-- Allows an application to get full detailed information about
recently running tasks, with full fidelity to the real state.
@hide -->
<permission android:name="android.permission.GET_DETAILED_TASKS"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows an application to change the Z-order of tasks.
<p>Protection level: normal
-->
<permission android:name="android.permission.REORDER_TASKS"
- android:label="@string/permlab_reorderTasks"
- android:description="@string/permdesc_reorderTasks"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_reorderTasks"
+ android:description="@string/permdesc_reorderTasks"
+ android:protectionLevel="normal" />
<!-- @hide Allows an application to change to remove/kill tasks -->
<permission android:name="android.permission.REMOVE_TASKS"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi @hide Allows an application to create/manage/remove stacks -->
<permission android:name="android.permission.MANAGE_ACTIVITY_STACKS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to start any activity, regardless of permission
protection or exported state.
@hide -->
<permission android:name="android.permission.START_ANY_ACTIVITY"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @deprecated The {@link android.app.ActivityManager#restartPackage}
API is no longer supported. -->
<permission android:name="android.permission.RESTART_PACKAGES"
- android:label="@string/permlab_killBackgroundProcesses"
- android:description="@string/permdesc_killBackgroundProcesses"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_killBackgroundProcesses"
+ android:description="@string/permdesc_killBackgroundProcesses"
+ android:protectionLevel="normal" />
<!-- Allows an application to call
{@link android.app.ActivityManager#killBackgroundProcesses}.
<p>Protection level: normal
-->
<permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"
- android:label="@string/permlab_killBackgroundProcesses"
- android:description="@string/permdesc_killBackgroundProcesses"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_killBackgroundProcesses"
+ android:description="@string/permdesc_killBackgroundProcesses"
+ android:protectionLevel="normal" />
+
+ <!-- @SystemApi @hide Allows an application to query process states and current
+ OOM adjustment scores.
+ <p>Not for use by third-party applications. -->
+ <permission android:name="android.permission.GET_PROCESS_STATE_AND_OOM_SCORE"
+ android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi @hide Allows an application to retrieve a package's importance.
This permission is not available to third party applications. -->
<permission android:name="android.permission.GET_PACKAGE_IMPORTANCE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- ================================== -->
<!-- Permissions affecting the display of other applications -->
@@ -1459,9 +1619,9 @@
should use this permission; these windows are intended for
system-level interaction with the user. -->
<permission android:name="android.permission.SYSTEM_ALERT_WINDOW"
- android:label="@string/permlab_systemAlertWindow"
- android:description="@string/permdesc_systemAlertWindow"
- android:protectionLevel="signature|preinstalled|appop|pre23|development" />
+ android:label="@string/permlab_systemAlertWindow"
+ android:description="@string/permdesc_systemAlertWindow"
+ android:protectionLevel="signature|preinstalled|appop|pre23|development" />
<!-- ================================== -->
<!-- Permissions affecting the system wallpaper -->
@@ -1472,17 +1632,17 @@
<p>Protection level: normal
-->
<permission android:name="android.permission.SET_WALLPAPER"
- android:label="@string/permlab_setWallpaper"
- android:description="@string/permdesc_setWallpaper"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_setWallpaper"
+ android:description="@string/permdesc_setWallpaper"
+ android:protectionLevel="normal" />
<!-- Allows applications to set the wallpaper hints.
<p>Protection level: normal
-->
<permission android:name="android.permission.SET_WALLPAPER_HINTS"
- android:label="@string/permlab_setWallpaperHints"
- android:description="@string/permdesc_setWallpaperHints"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_setWallpaperHints"
+ android:description="@string/permdesc_setWallpaperHints"
+ android:protectionLevel="normal" />
<!-- ============================================ -->
<!-- Permissions for changing the system clock -->
@@ -1492,15 +1652,15 @@
<!-- @SystemApi Allows applications to set the system time.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_TIME"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows applications to set the system time zone.
<p>Protection level: normal
-->
<permission android:name="android.permission.SET_TIME_ZONE"
- android:label="@string/permlab_setTimeZone"
- android:description="@string/permdesc_setTimeZone"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_setTimeZone"
+ android:description="@string/permdesc_setTimeZone"
+ android:protectionLevel="normal" />
<!-- ==================================================== -->
<!-- Permissions related to changing status bar -->
@@ -1511,9 +1671,9 @@
<p>Protection level: normal
-->
<permission android:name="android.permission.EXPAND_STATUS_BAR"
- android:label="@string/permlab_expandStatusBar"
- android:description="@string/permdesc_expandStatusBar"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_expandStatusBar"
+ android:description="@string/permdesc_expandStatusBar"
+ android:protectionLevel="normal" />
<!-- ============================================================== -->
<!-- Permissions related to adding/removing shortcuts from Launcher -->
@@ -1524,17 +1684,17 @@
<p>Protection level: normal
-->
<permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"
- android:label="@string/permlab_install_shortcut"
- android:description="@string/permdesc_install_shortcut"
- android:protectionLevel="normal"/>
+ android:label="@string/permlab_install_shortcut"
+ android:description="@string/permdesc_install_shortcut"
+ android:protectionLevel="normal"/>
<!-- Allows an application to uninstall a shortcut in Launcher.
<p>Protection level: normal
-->
<permission android:name="com.android.launcher.permission.UNINSTALL_SHORTCUT"
- android:label="@string/permlab_uninstall_shortcut"
- android:description="@string/permdesc_uninstall_shortcut"
- android:protectionLevel="normal"/>
+ android:label="@string/permlab_uninstall_shortcut"
+ android:description="@string/permdesc_uninstall_shortcut"
+ android:protectionLevel="normal"/>
<!-- ==================================================== -->
<!-- Permissions related to accessing sync settings -->
@@ -1545,25 +1705,25 @@
<p>Protection level: normal
-->
<permission android:name="android.permission.READ_SYNC_SETTINGS"
- android:description="@string/permdesc_readSyncSettings"
- android:label="@string/permlab_readSyncSettings"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_readSyncSettings"
+ android:label="@string/permlab_readSyncSettings"
+ android:protectionLevel="normal" />
<!-- Allows applications to write the sync settings.
<p>Protection level: normal
-->
<permission android:name="android.permission.WRITE_SYNC_SETTINGS"
- android:description="@string/permdesc_writeSyncSettings"
- android:label="@string/permlab_writeSyncSettings"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_writeSyncSettings"
+ android:label="@string/permlab_writeSyncSettings"
+ android:protectionLevel="normal" />
<!-- Allows applications to read the sync stats.
<p>Protection level: normal
-->
<permission android:name="android.permission.READ_SYNC_STATS"
- android:description="@string/permdesc_readSyncStats"
- android:label="@string/permlab_readSyncStats"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_readSyncStats"
+ android:label="@string/permlab_readSyncStats"
+ android:protectionLevel="normal" />
<!-- ============================================ -->
<!-- Permissions for low-level system interaction -->
@@ -1572,62 +1732,62 @@
<!-- @SystemApi @hide Change the screen compatibility mode of applications -->
<permission android:name="android.permission.SET_SCREEN_COMPATIBILITY"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to modify the current configuration, such
as locale. -->
<permission android:name="android.permission.CHANGE_CONFIGURATION"
- android:protectionLevel="signature|privileged|development" />
+ android:protectionLevel="signature|privileged|development" />
<!-- Allows an application to read or write the system settings.
<p>Protection level: signature
-->
<permission android:name="android.permission.WRITE_SETTINGS"
- android:label="@string/permlab_writeSettings"
- android:description="@string/permdesc_writeSettings"
- android:protectionLevel="signature|preinstalled|appop|pre23" />
+ android:label="@string/permlab_writeSettings"
+ android:description="@string/permdesc_writeSettings"
+ android:protectionLevel="signature|preinstalled|appop|pre23" />
<!-- @SystemApi Allows an application to modify the Google service map.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.WRITE_GSERVICES"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to call
{@link android.app.ActivityManager#forceStopPackage}.
@hide -->
<permission android:name="android.permission.FORCE_STOP_PACKAGES"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi @hide Allows an application to retrieve the content of the active window
An active window is the window that has fired an accessibility event. -->
<permission android:name="android.permission.RETRIEVE_WINDOW_CONTENT"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Modify the global animation scaling factor.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_ANIMATION_SCALE"
- android:protectionLevel="signature|privileged|development" />
+ android:protectionLevel="signature|privileged|development" />
<!-- @deprecated This functionality will be removed in the future; please do
not use. Allow an application to make its activities persistent. -->
<permission android:name="android.permission.PERSISTENT_ACTIVITY"
- android:label="@string/permlab_persistentActivity"
- android:description="@string/permdesc_persistentActivity"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_persistentActivity"
+ android:description="@string/permdesc_persistentActivity"
+ android:protectionLevel="normal" />
<!-- Allows an application to find out the space used by any package.
<p>Protection level: normal
-->
<permission android:name="android.permission.GET_PACKAGE_SIZE"
- android:label="@string/permlab_getPackageSize"
- android:description="@string/permdesc_getPackageSize"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_getPackageSize"
+ android:description="@string/permdesc_getPackageSize"
+ android:protectionLevel="normal" />
<!-- @deprecated No longer useful, see
{@link android.content.pm.PackageManager#addPackageToPreferred}
for details. -->
<permission android:name="android.permission.SET_PREFERRED_APPLICATIONS"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows an application to receive the
{@link android.content.Intent#ACTION_BOOT_COMPLETED} that is
@@ -1643,9 +1803,9 @@
<p>Protection level: normal
-->
<permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"
- android:label="@string/permlab_receiveBootCompleted"
- android:description="@string/permdesc_receiveBootCompleted"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_receiveBootCompleted"
+ android:description="@string/permdesc_receiveBootCompleted"
+ android:protectionLevel="normal" />
<!-- Allows an application to broadcast sticky intents. These are
broadcasts whose data is held by the system after being finished,
@@ -1654,86 +1814,90 @@
<p>Protection level: normal
-->
<permission android:name="android.permission.BROADCAST_STICKY"
- android:label="@string/permlab_broadcastSticky"
- android:description="@string/permdesc_broadcastSticky"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_broadcastSticky"
+ android:description="@string/permdesc_broadcastSticky"
+ android:protectionLevel="normal" />
<!-- @SystemApi Allows mounting and unmounting file systems for removable storage.
<p>Not for use by third-party applications.-->
<permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows formatting file systems for removable storage.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.MOUNT_FORMAT_FILESYSTEMS"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
+
+ <!-- @hide -->
+ <permission android:name="android.permission.STORAGE_INTERNAL"
+ android:protectionLevel="signature" />
<!-- Allows access to ASEC non-destructive API calls
@hide -->
<permission android:name="android.permission.ASEC_ACCESS"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows creation of ASEC volumes
@hide -->
<permission android:name="android.permission.ASEC_CREATE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows destruction of ASEC volumes
@hide -->
<permission android:name="android.permission.ASEC_DESTROY"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows mount / unmount of ASEC volumes
@hide -->
<permission android:name="android.permission.ASEC_MOUNT_UNMOUNT"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows rename of ASEC volumes
@hide -->
<permission android:name="android.permission.ASEC_RENAME"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows applications to write the apn settings.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.WRITE_APN_SETTINGS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows applications to change network connectivity state.
<p>Protection level: normal
-->
<permission android:name="android.permission.CHANGE_NETWORK_STATE"
- android:description="@string/permdesc_changeNetworkState"
- android:label="@string/permlab_changeNetworkState"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_changeNetworkState"
+ android:label="@string/permlab_changeNetworkState"
+ android:protectionLevel="normal" />
<!-- Allows an application to clear the caches of all installed
applications on the device.
<p>Protection level: system|signature
-->
<permission android:name="android.permission.CLEAR_APP_CACHE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to use any media decoder when decoding for playback
@hide -->
<permission android:name="android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to install and/or uninstall CA certificates on
behalf of the user.
@hide -->
<permission android:name="android.permission.MANAGE_CA_CERTIFICATES"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to do certain operations needed for
interacting with the recovery (system update) system.
@hide -->
<permission android:name="android.permission.RECOVERY"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows the system to bind to an application's task services
@hide -->
<permission android:name="android.permission.BIND_JOB_SERVICE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<uses-permission android:name="android.permission.BIND_JOB_SERVICE"/>
<!-- Allows an application to initiate configuration updates
@@ -1742,7 +1906,7 @@
it off to the various individual installer components
@hide -->
<permission android:name="android.permission.UPDATE_CONFIG"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- ========================================= -->
<!-- Permissions for special development tools -->
@@ -1752,40 +1916,40 @@
<!-- @SystemApi Allows an application to read or write the secure system settings.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.WRITE_SECURE_SETTINGS"
- android:protectionLevel="signature|privileged|development" />
+ android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Allows an application to retrieve state dump information from system services.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.DUMP"
- android:protectionLevel="signature|privileged|development" />
+ android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Allows an application to read the low-level system log files.
<p>Not for use by third-party applications, because
Log entries can contain the user's private information. -->
<permission android:name="android.permission.READ_LOGS"
- android:protectionLevel="signature|privileged|development" />
+ android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Configure an application for debugging.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_DEBUG_APP"
- android:protectionLevel="signature|privileged|development" />
+ android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Allows an application to set the maximum number of (not needed)
application processes that can be running.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_PROCESS_LIMIT"
- android:protectionLevel="signature|privileged|development" />
+ android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Allows an application to control whether activities are immediately
finished when put in the background.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.SET_ALWAYS_FINISH"
- android:protectionLevel="signature|privileged|development" />
+ android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Allow an application to request that a signal be sent to all persistent processes.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.SIGNAL_PERSISTENT_PROCESSES"
- android:protectionLevel="signature|privileged|development" />
+ android:protectionLevel="signature|privileged|development" />
<!-- ==================================== -->
<!-- Private permissions -->
@@ -1794,23 +1958,29 @@
<!-- @SystemApi Allows access to the list of accounts in the Accounts Service. -->
<permission android:name="android.permission.GET_ACCOUNTS_PRIVILEGED"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows applications to RW to diagnostic resources.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.DIAGNOSTIC"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to open, close, or disable the status bar
and its icons.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.STATUS_BAR"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to be the status bar. Currently used only by SystemUI.apk
@hide -->
<permission android:name="android.permission.STATUS_BAR_SERVICE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
+
+ <!-- Allows an application to bind to third party quick settings tiles.
+ <p>Should only be requested by the System, should be required by
+ TileService declarations.-->
+ <permission android:name="android.permission.BIND_QUICK_SETTINGS_TILE"
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to force a BACK operation on whatever is the
top activity.
@@ -1818,21 +1988,27 @@
@hide
-->
<permission android:name="android.permission.FORCE_BACK"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to update device statistics.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.UPDATE_DEVICE_STATS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi @hide Allows an application to collect battery statistics -->
<permission android:name="android.permission.GET_APP_OPS_STATS"
- android:protectionLevel="signature|privileged|development" />
+ android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Allows an application to update application operation statistics. Not for
use by third party apps. @hide -->
<permission android:name="android.permission.UPDATE_APP_OPS_STATS"
- android:protectionLevel="signature|privileged|installer" />
+ android:protectionLevel="signature|privileged|installer" />
+
+ <!-- Allows an application to update the user app op restrictions.
+ Not for use by third party apps.
+ @hide -->
+ <permission android:name="android.permission.MANAGE_APP_OPS_RESTRICTIONS"
+ android:protectionLevel="signature|installer" />
<!-- @SystemApi Allows an application to open windows that are for use by parts
of the system user interface.
@@ -1840,7 +2016,7 @@
@hide
-->
<permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to manage (create, destroy,
Z-order) application tokens in the window manager.
@@ -1848,12 +2024,17 @@
@hide
-->
<permission android:name="android.permission.MANAGE_APP_TOKENS"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
+
+ <!-- Allows System UI to register listeners for events from Window Manager.
+ @hide -->
+ <permission android:name="android.permission.REGISTER_WINDOW_MANAGER_LISTENERS"
+ android:protectionLevel="signature" />
<!-- @hide Allows the application to temporarily freeze the screen for a
full-screen transition. -->
<permission android:name="android.permission.FREEZE_SCREEN"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to inject user events (keys, touch, trackball)
into the event stream and deliver them to ANY window. Without this
@@ -1862,24 +2043,24 @@
@hide
-->
<permission android:name="android.permission.INJECT_EVENTS"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @hide Allows an application to register an input filter which filters the stream
of user events (keys, touch, trackball) before they are dispatched to any window. -->
<permission android:name="android.permission.FILTER_EVENTS"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @hide Allows an application to retrieve the window token from the accessibility manager. -->
<permission android:name="android.permission.RETRIEVE_WINDOW_TOKEN"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @hide Allows an application to collect frame statistics -->
<permission android:name="android.permission.FRAME_STATS"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @hide Allows an application to temporary enable accessibility on the device. -->
<permission android:name="android.permission.TEMPORARY_ENABLE_ACCESSIBILITY"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to watch and control how activities are
started globally in the system. Only for is in debugging
@@ -1888,13 +2069,13 @@
@hide
-->
<permission android:name="android.permission.SET_ACTIVITY_WATCHER"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to call the activity manager shutdown() API
to put the higher-level system there into a shutdown state.
@hide -->
<permission android:name="android.permission.SHUTDOWN"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to tell the activity manager to temporarily
stop application switches, putting it into a special mode that
@@ -1902,7 +2083,7 @@
critical UI such as the home screen.
@hide -->
<permission android:name="android.permission.STOP_APP_SWITCHES"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to retrieve private information about
the current top activity, such as any assist context it can provide.
@@ -1910,42 +2091,42 @@
@hide
-->
<permission android:name="android.permission.GET_TOP_ACTIVITY_INFO"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows an application to retrieve the current state of keys and
switches.
<p>Not for use by third-party applications.
@deprecated The API that used this permission has been removed. -->
<permission android:name="android.permission.READ_INPUT_STATE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Must be required by an {@link android.inputmethodservice.InputMethodService},
to ensure that only the system can bind to it.
<p>Protection level: signature
-->
<permission android:name="android.permission.BIND_INPUT_METHOD"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Must be required by an {@link android.media.midi.MidiDeviceService},
to ensure that only the system can bind to it.
<p>Protection level: signature
-->
<permission android:name="android.permission.BIND_MIDI_DEVICE_SERVICE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Must be required by an {@link android.accessibilityservice.AccessibilityService},
to ensure that only the system can bind to it.
<p>Protection level: signature
-->
<permission android:name="android.permission.BIND_ACCESSIBILITY_SERVICE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Must be required by a {@link android.printservice.PrintService},
to ensure that only the system can bind to it.
<p>Protection level: signature
-->
<permission android:name="android.permission.BIND_PRINT_SERVICE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Must be required by a {@link android.nfc.cardemulation.HostApduService}
or {@link android.nfc.cardemulation.OffHostApduService} to ensure that only
@@ -1953,84 +2134,84 @@
<p>Protection level: signature
-->
<permission android:name="android.permission.BIND_NFC_SERVICE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Must be required by the PrintSpooler to ensure that only the system can bind to it.
@hide -->
<permission android:name="android.permission.BIND_PRINT_SPOOLER_SERVICE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Must be required by a TextService (e.g. SpellCheckerService)
to ensure that only the system can bind to it.
<p>Protection level: signature
-->
<permission android:name="android.permission.BIND_TEXT_SERVICE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Must be required by a {@link android.net.VpnService},
to ensure that only the system can bind to it.
<p>Protection level: signature
-->
<permission android:name="android.permission.BIND_VPN_SERVICE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Must be required by a {@link android.service.wallpaper.WallpaperService},
to ensure that only the system can bind to it.
<p>Protection level: system|signature
-->
<permission android:name="android.permission.BIND_WALLPAPER"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Must be required by a {@link android.service.voice.VoiceInteractionService},
to ensure that only the system can bind to it.
<p>Protection level: signature
-->
<permission android:name="android.permission.BIND_VOICE_INTERACTION"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Must be required by hotword enrollment application,
to ensure that only the system can interact with it.
@hide <p>Not for use by third-party applications.</p> -->
<permission android:name="android.permission.MANAGE_VOICE_KEYPHRASES"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Must be required by a {@link com.android.media.remotedisplay.RemoteDisplayProvider},
to ensure that only the system can bind to it.
@hide -->
<permission android:name="android.permission.BIND_REMOTE_DISPLAY"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Must be required by a {@link android.media.tv.TvInputService}
to ensure that only the system can bind to it.
<p>Protection level: signature
-->
<permission android:name="android.permission.BIND_TV_INPUT"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to modify parental controls
<p>Not for use by third-party applications.
@hide -->
<permission android:name="android.permission.MODIFY_PARENTAL_CONTROLS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Must be required by a {@link android.media.routing.MediaRouteService}
to ensure that only the system can interact with it.
@hide -->
<permission android:name="android.permission.BIND_ROUTE_PROVIDER"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Must be required by device administration receiver, to ensure that only the
system can interact with it.
<p>Protection level: signature
-->
<permission android:name="android.permission.BIND_DEVICE_ADMIN"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Required to add or remove another application as a device admin.
<p>Not for use by third-party applications.
@hide -->
<permission android:name="android.permission.MANAGE_DEVICE_ADMINS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows low-level access to setting the orientation (actually
rotation) of the screen.
@@ -2038,33 +2219,33 @@
@hide
-->
<permission android:name="android.permission.SET_ORIENTATION"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows low-level access to setting the pointer speed.
<p>Not for use by third-party applications.
@hide
-->
<permission android:name="android.permission.SET_POINTER_SPEED"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows low-level access to setting input device calibration.
<p>Not for use by normal applications.
@hide -->
<permission android:name="android.permission.SET_INPUT_CALIBRATION"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows low-level access to setting the keyboard layout.
<p>Not for use by third-party applications.
@hide -->
<permission android:name="android.permission.SET_KEYBOARD_LAYOUT"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows an application to query tablet mode state and monitor changes
in it.
<p>Not for use by third-party applications.
@hide -->
<permission android:name="android.permission.TABLET_MODE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows an application to request installing packages. Apps
targeting APIs greater than 22 must hold this permission in
@@ -2072,277 +2253,292 @@
<p>Protection level: normal
-->
<permission android:name="android.permission.REQUEST_INSTALL_PACKAGES"
- android:label="@string/permlab_requestInstallPackages"
- android:description="@string/permdesc_requestInstallPackages"
- android:protectionLevel="normal" />
+ android:label="@string/permlab_requestInstallPackages"
+ android:description="@string/permdesc_requestInstallPackages"
+ android:protectionLevel="normal" />
<!-- @SystemApi Allows an application to install packages.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.INSTALL_PACKAGES"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to clear user data.
<p>Not for use by third-party applications
@hide
-->
<permission android:name="android.permission.CLEAR_APP_USER_DATA"
- android:protectionLevel="signature|installer" />
+ android:protectionLevel="signature|installer" />
+
+ <!-- @hide Allows an application to get the URI permissions
+ granted to another application.
+ <p>Not for use by third-party applications
+ -->
+ <permission android:name="android.permission.GET_APP_GRANTED_URI_PERMISSIONS"
+ android:protectionLevel="signature" />
+
+ <!-- @hide Allows an application to clear the URI permissions
+ granted to another application.
+ <p>Not for use by third-party applications
+ -->
+ <permission
+ android:name="android.permission.CLEAR_APP_GRANTED_URI_PERMISSIONS"
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to delete cache files.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.DELETE_CACHE_FILES"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to delete packages.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.DELETE_PACKAGES"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to move location of installed package.
@hide -->
<permission android:name="android.permission.MOVE_PACKAGE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to change whether an application component (other than its own) is
enabled or not.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to grant specific permissions.
@hide -->
<permission android:name="android.permission.GRANT_RUNTIME_PERMISSIONS"
- android:protectionLevel="signature|installer|verifier" />
+ android:protectionLevel="signature|installer|verifier" />
<!-- Allows an app that has this permission and the permissions to install packages
to request certain runtime permissions to be granted at installation.
@hide
@SystemApi -->
<permission android:name="android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS"
- android:protectionLevel="signature|installer|verifier" />
+ android:protectionLevel="signature|installer|verifier" />
<!-- Allows an application to revoke specific permissions.
@hide
@SystemApi -->
<permission android:name="android.permission.REVOKE_RUNTIME_PERMISSIONS"
- android:protectionLevel="signature|installer|verifier" />
+ android:protectionLevel="signature|installer|verifier" />
<!-- @hide Allows an application to observe permission changes. -->
<permission android:name="android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to use SurfaceFlinger's low level features.
<p>Not for use by third-party applications.
@hide
-->
<permission android:name="android.permission.ACCESS_SURFACE_FLINGER"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to take screen shots and more generally
get access to the frame buffer data.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.READ_FRAME_BUFFER"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to use InputFlinger's low level features.
@hide -->
<permission android:name="android.permission.ACCESS_INPUT_FLINGER"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows an application to configure and connect to Wifi displays
@hide -->
<permission android:name="android.permission.CONFIGURE_WIFI_DISPLAY"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows an application to control low-level features of Wifi displays
such as opening an RTSP socket. This permission should only be used
by the display manager.
@hide -->
<permission android:name="android.permission.CONTROL_WIFI_DISPLAY"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows an application to control the color transforms applied to
displays system-wide.
<p>Not for use by third-party applications.</p>
@hide -->
<permission android:name="android.permission.CONFIGURE_DISPLAY_COLOR_TRANSFORM"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to control VPN.
<p>Not for use by third-party applications.</p>
@hide -->
<permission android:name="android.permission.CONTROL_VPN"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<uses-permission android:name="android.permission.CONTROL_VPN" />
<!-- @SystemApi Allows an application to capture audio output.
<p>Not for use by third-party applications.</p> -->
<permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to capture audio for hotword detection.
<p>Not for use by third-party applications.</p>
@hide -->
<permission android:name="android.permission.CAPTURE_AUDIO_HOTWORD"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to modify audio routing and override policy decisions.
<p>Not for use by third-party applications.</p>
@hide -->
<permission android:name="android.permission.MODIFY_AUDIO_ROUTING"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to capture video output.
<p>Not for use by third-party applications.</p> -->
<permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to capture secure video output.
<p>Not for use by third-party applications.</p> -->
<permission android:name="android.permission.CAPTURE_SECURE_VIDEO_OUTPUT"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to know what content is playing and control its playback.
<p>Not for use by third-party applications due to privacy of media consumption</p> -->
<permission android:name="android.permission.MEDIA_CONTENT_CONTROL"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Required to be able to disable the device (very dangerous!).
<p>Not for use by third-party applications.
@hide
-->
<permission android:name="android.permission.BRICK"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Required to be able to reboot the device.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.REBOOT"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
- <!-- @SystemApi Allows low-level access to power management.
- <p>Not for use by third-party applications.
- @hide
- -->
- <permission android:name="android.permission.DEVICE_POWER"
- android:protectionLevel="signature" />
+ <!-- @SystemApi Allows low-level access to power management.
+ <p>Not for use by third-party applications.
+ @hide
+ -->
+ <permission android:name="android.permission.DEVICE_POWER"
+ android:protectionLevel="signature" />
- <!-- Allows access to the PowerManager.userActivity function.
- <p>Not for use by third-party applications. @hide @SystemApi -->
+ <!-- Allows access to the PowerManager.userActivity function.
+ <p>Not for use by third-party applications. @hide @SystemApi -->
<permission android:name="android.permission.USER_ACTIVITY"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
- <!-- @hide Allows low-level access to tun tap driver -->
+ <!-- @hide Allows low-level access to tun tap driver -->
<permission android:name="android.permission.NET_TUNNELING"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Run as a manufacturer test application, running as the root user.
Only available when the device is running in manufacturer test mode.
<p>Not for use by third-party applications.
-->
<permission android:name="android.permission.FACTORY_TEST"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows an application to broadcast a notification that an application
package has been removed.
<p>Not for use by third-party applications.
-->
<permission android:name="android.permission.BROADCAST_PACKAGE_REMOVED"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows an application to broadcast an SMS receipt notification.
<p>Not for use by third-party applications.
-->
<permission android:name="android.permission.BROADCAST_SMS"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows an application to broadcast a WAP PUSH receipt notification.
<p>Not for use by third-party applications.
-->
<permission android:name="android.permission.BROADCAST_WAP_PUSH"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to broadcast privileged networking requests.
<p>Not for use by third-party applications. @hide -->
<permission android:name="android.permission.BROADCAST_NETWORK_PRIVILEGED"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Not for use by third-party applications. -->
<permission android:name="android.permission.MASTER_CLEAR"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to call any phone number, including emergency
numbers, without going through the Dialer user interface for the user
to confirm the call being placed.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.CALL_PRIVILEGED"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to perform CDMA OTA provisioning @hide -->
<permission android:name="android.permission.PERFORM_CDMA_PROVISIONING"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to perform SIM Activation @hide -->
<permission android:name="android.permission.PERFORM_SIM_ACTIVATION"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows enabling/disabling location update notifications from
the radio.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.CONTROL_LOCATION_UPDATES"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows read/write access to the "properties" table in the checkin
database, to change values that get uploaded.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.ACCESS_CHECKIN_PROPERTIES"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to collect component usage
statistics
<p>Declaring the permission implies intention to use the API and the user of the
device can grant permission through the Settings application. -->
<permission android:name="android.permission.PACKAGE_USAGE_STATS"
- android:protectionLevel="signature|privileged|development|appop" />
+ android:protectionLevel="signature|privileged|development|appop" />
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" />
<!-- @hide Allows an application to change the app idle state of an app.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.CHANGE_APP_IDLE_STATE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @hide @SystemApi Allows an application to temporarily whitelist an inactive app to
access the network and acquire wakelocks.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
<!-- Permission an application must hold in order to use
{@link android.provider.Settings#ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS}.
This is a normal permission: an app requesting it will always be granted the
permission, without the user needing to approve or see it. -->
<permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"
- android:protectionLevel="normal" />
+ android:protectionLevel="normal" />
<!-- @SystemApi Allows an application to collect battery statistics -->
<permission android:name="android.permission.BATTERY_STATS"
- android:protectionLevel="signature|privileged|development" />
+ android:protectionLevel="signature|privileged|development" />
<!-- @SystemApi Allows an application to control the backup and restore process.
<p>Not for use by third-party applications.
@hide pending API council -->
<permission android:name="android.permission.BACKUP"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows a package to launch the secure full-backup confirmation UI.
ONLY the system process may hold this permission.
@hide -->
<permission android:name="android.permission.CONFIRM_FULL_BACKUP"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Must be required by a {@link android.widget.RemoteViewsService},
to ensure that only the system can bind to it. -->
<permission android:name="android.permission.BIND_REMOTEVIEWS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to tell the AppWidget service which application
can access AppWidget's data. The normal user flow is that a user
@@ -2351,25 +2547,25 @@
An application that has this permission should honor that contract.
<p>Not for use by third-party applications. -->
<permission android:name="android.permission.BIND_APPWIDGET"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Private permission, to restrict who can bring up a dialog to add a new
keyguard widget
@hide -->
<permission android:name="android.permission.BIND_KEYGUARD_APPWIDGET"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Internal permission allowing an application to query/set which
applications can bind AppWidgets.
@hide -->
<permission android:name="android.permission.MODIFY_APPWIDGET_BIND_PERMISSIONS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows applications to change the background data setting.
<p>Not for use by third-party applications.
@hide pending API council -->
<permission android:name="android.permission.CHANGE_BACKGROUND_DATA_SETTING"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi This permission can be used on content providers to allow the global
search system to access their data. Typically it used when the
@@ -2380,7 +2576,7 @@
it is used by applications to protect themselves from everyone else
besides global search. -->
<permission android:name="android.permission.GLOBAL_SEARCH"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Internal permission protecting access to the global search
system: ensures that only the system can access the provider
@@ -2390,33 +2586,33 @@
ranking).
@hide -->
<permission android:name="android.permission.GLOBAL_SEARCH_CONTROL"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Internal permission to allows an application to read indexable data.
@hide -->
<permission android:name="android.permission.READ_SEARCH_INDEXABLES"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows applications to set a live wallpaper.
@hide XXX Change to signature once the picker is moved to its
own apk as Ghod Intended. -->
<permission android:name="android.permission.SET_WALLPAPER_COMPONENT"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows applications to read dream settings and dream state.
@hide -->
<permission android:name="android.permission.READ_DREAM_STATE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows applications to write dream settings, and start or stop dreaming.
@hide -->
<permission android:name="android.permission.WRITE_DREAM_STATE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allow an application to read and write the cache partition.
@hide -->
<permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Must be required by default container service so that only
the system can bind to it and use it to copy
@@ -2424,67 +2620,67 @@
accessible to the system.
@hide -->
<permission android:name="android.permission.COPY_PROTECTED_DATA"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Internal permission protecting access to the encryption methods
@hide
-->
<permission android:name="android.permission.CRYPT_KEEPER"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to read historical network usage for
specific networks and applications. @hide -->
<permission android:name="android.permission.READ_NETWORK_USAGE_HISTORY"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to manage network policies (such as warning and disable
limits) and to define application-specific rules. @hide -->
<permission android:name="android.permission.MANAGE_NETWORK_POLICY"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to account its network traffic against other UIDs. Used
by system services like download manager and media server. Not for use by
third party apps. @hide -->
<permission android:name="android.permission.MODIFY_NETWORK_ACCOUNTING"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- C2DM permission.
@hide Used internally.
-->
<permission android:name="android.intent.category.MASTER_CLEAR.permission.C2D_MESSAGE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<uses-permission android:name="android.intent.category.MASTER_CLEAR.permission.C2D_MESSAGE"/>
<!-- @SystemApi @hide Package verifier needs to have this permission before the PackageManager will
trust it to verify packages.
-->
<permission android:name="android.permission.PACKAGE_VERIFICATION_AGENT"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Must be required by package verifier receiver, to ensure that only the
system can interact with it.
@hide
-->
<permission android:name="android.permission.BIND_PACKAGE_VERIFIER"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi @hide Intent filter verifier needs to have this permission before the
PackageManager will trust it to verify intent filters.
-->
<permission android:name="android.permission.INTENT_FILTER_VERIFICATION_AGENT"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Must be required by intent filter verifier receiver, to ensure that only the
system can interact with it.
@hide
-->
<permission android:name="android.permission.BIND_INTENT_FILTER_VERIFIER"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows applications to access serial ports via the SerialManager.
@hide -->
<permission android:name="android.permission.SERIAL_PORT"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows the holder to access content providers from outside an ApplicationThread.
This permission is enforced by the ActivityManagerService on the corresponding APIs,
@@ -2493,67 +2689,73 @@
@hide
-->
<permission android:name="android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to hold an UpdateLock, recommending that a headless
OTA reboot *not* occur while the lock is held.
@hide -->
<permission android:name="android.permission.UPDATE_LOCK"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to read the current set of notifications, including
any metadata and intents attached.
@hide -->
<permission android:name="android.permission.ACCESS_NOTIFICATIONS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Marker permission for applications that wish to access notification policy.
<p>Protection level: normal
-->
<permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY"
- android:description="@string/permdesc_access_notification_policy"
- android:label="@string/permlab_access_notification_policy"
- android:protectionLevel="normal" />
+ android:description="@string/permdesc_access_notification_policy"
+ android:label="@string/permlab_access_notification_policy"
+ android:protectionLevel="normal" />
+
+ <!-- Allows modification of do not disturb rules and policies. Only allowed for system
+ processes.
+ @hide -->
+ <permission android:name="android.permission.MANAGE_NOTIFICATIONS"
+ android:protectionLevel="signature" />
<!-- Allows access to keyguard secure storage. Only allowed for system processes.
@hide -->
<permission android:name="android.permission.ACCESS_KEYGUARD_SECURE_STORAGE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows managing (adding, removing) fingerprint templates. Reserved for the system. @hide -->
<permission android:name="android.permission.MANAGE_FINGERPRINT"
- android:protectionLevel="system|signature" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an app to reset fingerprint attempt counter. Reserved for the system. @hide -->
<permission android:name="android.permission.RESET_FINGERPRINT_LOCKOUT"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows an application to control keyguard. Only allowed for system processes.
@hide -->
<permission android:name="android.permission.CONTROL_KEYGUARD"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Allows an application to listen to trust changes. Only allowed for system processes.
@hide -->
<permission android:name="android.permission.TRUST_LISTENER"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to provide a trust agent.
@hide For security reasons, this is a platform-only permission. -->
<permission android:name="android.permission.PROVIDE_TRUST_AGENT"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to launch the trust agent settings activity.
@hide -->
<permission android:name="android.permission.LAUNCH_TRUST_AGENT_SETTINGS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Must be required by an {@link
android.service.trust.TrustAgentService},
to ensure that only the system can bind to it.
@hide -->
<permission android:name="android.permission.BIND_TRUST_AGENT"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Must be required by an {@link
android.service.notification.NotificationListenerService},
@@ -2561,7 +2763,16 @@
<p>Protection level: signature
-->
<permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
+
+ <!-- Must be required by an {@link
+ android.service.notification.NotificationAssistantService},
+ to ensure that only the system can bind to it.
+ <p>Protection level: signature
+ @hide This is not a third-party API (intended for system apps). -->
+ -->
+ <permission android:name="android.permission.BIND_NOTIFICATION_ASSISTANT_SERVICE"
+ android:protectionLevel="signature" />
<!-- Must be required by a {@link
android.service.chooser.ChooserTargetService}, to ensure that
@@ -2569,64 +2780,65 @@
<p>Protection level: signature
-->
<permission android:name="android.permission.BIND_CHOOSER_TARGET_SERVICE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
- <!-- @SystemApi Must be required by a {@link
+ <!-- Must be required by a {@link
android.service.notification.ConditionProviderService},
to ensure that only the system can bind to it.
- @hide -->
+ <p>Protection level: signature
+ -->
<permission android:name="android.permission.BIND_CONDITION_PROVIDER_SERVICE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- Must be required by an {@link android.service.dreams.DreamService},
to ensure that only the system can bind to it.
<p>Protection level: signature
-->
<permission android:name="android.permission.BIND_DREAM_SERVICE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to call into a carrier setup flow. It is up to the
carrier setup application to enforce that this permission is required
@hide This is not a third-party API (intended for OEMs and system apps). -->
<permission android:name="android.permission.INVOKE_CARRIER_SETUP"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to listen for network condition observations.
@hide This is not a third-party API (intended for system apps). -->
<permission android:name="android.permission.ACCESS_NETWORK_CONDITIONS"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @SystemApi Allows an application to provision and access DRM certificates
@hide This is not a third-party API (intended for system apps). -->
<permission android:name="android.permission.ACCESS_DRM_CERTIFICATES"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Api Allows an application to manage media projection sessions.
@hide This is not a third-party API (intended for system apps). -->
<permission android:name="android.permission.MANAGE_MEDIA_PROJECTION"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- @SystemApi Allows an application to read install sessions
@hide This is not a third-party API (intended for system apps). -->
<permission android:name="android.permission.READ_INSTALL_SESSIONS"
- android:label="@string/permlab_readInstallSessions"
- android:description="@string/permdesc_readInstallSessions"
- android:protectionLevel="normal"/>
+ android:label="@string/permlab_readInstallSessions"
+ android:description="@string/permdesc_readInstallSessions"
+ android:protectionLevel="normal"/>
<!-- @SystemApi Allows an application to remove DRM certificates
@hide This is not a third-party API (intended for system apps). -->
<permission android:name="android.permission.REMOVE_DRM_CERTIFICATES"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- @deprecated Use {@link android.Manifest.permission#BIND_CARRIER_SERVICES} instead -->
<permission android:name="android.permission.BIND_CARRIER_MESSAGING_SERVICE"
- android:protectionLevel="signature|privileged" />
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to interact with the currently active
{@link android.service.voice.VoiceInteractionService}.
@hide -->
<permission android:name="android.permission.ACCESS_VOICE_INTERACTION_SERVICE"
- android:protectionLevel="signature" />
+ android:protectionLevel="signature" />
<!-- The system process that is allowed to bind to services in carrier apps will
have this permission. Carrier apps should use this permission to protect
@@ -2634,9 +2846,9 @@
<p>Protection level: system|signature
-->
<permission android:name="android.permission.BIND_CARRIER_SERVICES"
- android:label="@string/permlab_bindCarrierServices"
- android:description="@string/permdesc_bindCarrierServices"
- android:protectionLevel="signature|privileged" />
+ android:label="@string/permlab_bindCarrierServices"
+ android:description="@string/permdesc_bindCarrierServices"
+ android:protectionLevel="signature|privileged" />
<!-- Allows an application to query whether DO_NOT_ASK_CREDENTIALS_ON_BOOT
flag is set.
@@ -2667,10 +2879,53 @@
<permission android:name="android.permission.DISPATCH_NFC_MESSAGE"
android:protectionLevel="signature|privileged" />
+ <!-- @SystemApi Allows changing day / night mode when system is configured with
+ config_lockDayNightMode set to true. If requesting app does not have permission,
+ it will be ignored.
+ @hide -->
+ <permission android:name="android.permission.MODIFY_DAY_NIGHT_MODE"
+ android:protectionLevel="signature|privileged" />
+
<!-- The system process is explicitly the only one allowed to launch the
confirmation UI for full backup/restore -->
<uses-permission android:name="android.permission.CONFIRM_FULL_BACKUP"/>
+
+ <!-- Allows the holder to access the ephemeral applications on the device.
+ @hide -->
+ <permission android:name="android.permission.ACCESS_EPHEMERAL_APPS"
+ android:protectionLevel="signature" />
+
+ <!-- Allows receiving the usage of media resource e.g. video/audio codec and
+ graphic memory.
+ @hide -->
+ <permission android:name="android.permission.RECEIVE_MEDIA_RESOURCE_USAGE"
+ android:protectionLevel="signature|privileged" />
+
+ <!-- Must be required by system/priv apps when accessing the sound trigger
+ APIs given by {@link SoundTriggerManager}.
+ @hide <p>Not for use by third-party applications.</p> -->
+ <permission android:name="android.permission.MANAGE_SOUND_TRIGGER"
+ android:protectionLevel="signature|privileged" />
+
+ <!-- @SystemApi Allows trusted applications to dispatch managed provisioning message to Managed
+ Provisioning app. If requesting app does not have permission, it will be ignored.
+ @hide -->
+ <permission android:name="android.permission.DISPATCH_PROVISIONING_MESSAGE"
+ android:protectionLevel="signature|privileged" />
+
+ <!-- Allows the holder to read blocked numbers. See
+ {@link android.provider.BlockedNumberContract}.
+ @hide -->
+ <permission android:name="android.permission.READ_BLOCKED_NUMBERS"
+ android:protectionLevel="signature" />
+
+ <!-- Allows the holder to write blocked numbers. See
+ {@link android.provider.BlockedNumberContract}.
+ @hide -->
+ <permission android:name="android.permission.WRITE_BLOCKED_NUMBERS"
+ android:protectionLevel="signature" />
+
<application android:process="system"
android:persistent="true"
android:hasCode="false"
@@ -2679,14 +2934,17 @@
android:backupAgent="com.android.server.backup.SystemBackupAgent"
android:killAfterRestore="false"
android:icon="@drawable/ic_launcher_android"
- android:supportsRtl="true">
+ android:supportsRtl="true"
+ android:theme="@style/Theme.Material.DayNight.DarkActionBar"
+ android:forceDeviceEncrypted="true"
+ android:encryptionAware="true">
<activity android:name="com.android.internal.app.ChooserActivity"
- android:theme="@style/Theme.DeviceDefault.Resolver"
- android:finishOnCloseSystemDialogs="true"
- android:excludeFromRecents="true"
- android:documentLaunchMode="never"
- android:relinquishTaskIdentity="true"
- android:process=":ui">
+ android:theme="@style/Theme.DeviceDefault.Resolver"
+ android:finishOnCloseSystemDialogs="true"
+ android:excludeFromRecents="true"
+ android:documentLaunchMode="never"
+ android:relinquishTaskIdentity="true"
+ android:process=":ui">
<intent-filter>
<action android:name="android.intent.action.CHOOSER" />
<category android:name="android.intent.category.DEFAULT" />
@@ -2694,102 +2952,102 @@
</intent-filter>
</activity>
<activity android:name="com.android.internal.app.IntentForwarderActivity"
- android:finishOnCloseSystemDialogs="true"
- android:theme="@style/Theme.NoDisplay"
- android:excludeFromRecents="true"
- android:label="@string/user_owner_label"
- android:exported="true"
- >
+ android:finishOnCloseSystemDialogs="true"
+ android:theme="@style/Theme.NoDisplay"
+ android:excludeFromRecents="true"
+ android:label="@string/user_owner_label"
+ android:exported="true"
+ >
</activity>
- <activity-alias android:name="com.android.internal.app.ForwardIntentToUserOwner"
- android:targetActivity="com.android.internal.app.IntentForwarderActivity"
- android:exported="true"
- android:label="@string/user_owner_label">
+ <activity-alias android:name="com.android.internal.app.ForwardIntentToParent"
+ android:targetActivity="com.android.internal.app.IntentForwarderActivity"
+ android:exported="true"
+ android:label="@string/user_owner_label">
</activity-alias>
<activity-alias android:name="com.android.internal.app.ForwardIntentToManagedProfile"
- android:targetActivity="com.android.internal.app.IntentForwarderActivity"
- android:icon="@drawable/ic_corp_icon"
- android:exported="true"
- android:label="@string/managed_profile_label">
+ android:targetActivity="com.android.internal.app.IntentForwarderActivity"
+ android:icon="@drawable/ic_corp_icon"
+ android:exported="true"
+ android:label="@string/managed_profile_label">
</activity-alias>
<activity android:name="com.android.internal.app.HeavyWeightSwitcherActivity"
- android:theme="@style/Theme.Material.Light.Dialog"
- android:label="@string/heavy_weight_switcher_title"
- android:finishOnCloseSystemDialogs="true"
- android:excludeFromRecents="true"
- android:process=":ui">
+ android:theme="@style/Theme.Material.DayNight.Dialog"
+ android:label="@string/heavy_weight_switcher_title"
+ android:finishOnCloseSystemDialogs="true"
+ android:excludeFromRecents="true"
+ android:process=":ui">
</activity>
<activity android:name="com.android.internal.app.PlatLogoActivity"
- android:theme="@style/Theme.Wallpaper.NoTitleBar.Fullscreen"
- android:configChanges="orientation|keyboardHidden"
- android:process=":ui">
+ android:theme="@style/Theme.Wallpaper.NoTitleBar.Fullscreen"
+ android:configChanges="orientation|keyboardHidden"
+ android:process=":ui">
</activity>
<activity android:name="com.android.internal.app.DisableCarModeActivity"
- android:theme="@style/Theme.NoDisplay"
- android:excludeFromRecents="true"
- android:process=":ui">
+ android:theme="@style/Theme.NoDisplay"
+ android:excludeFromRecents="true"
+ android:process=":ui">
</activity>
<activity android:name="com.android.internal.app.DumpHeapActivity"
- android:theme="@style/Theme.Translucent.NoTitleBar"
- android:label="@string/dump_heap_title"
- android:finishOnCloseSystemDialogs="true"
- android:noHistory="true"
- android:excludeFromRecents="true"
- android:process=":ui">
+ android:theme="@style/Theme.Translucent.NoTitleBar"
+ android:label="@string/dump_heap_title"
+ android:finishOnCloseSystemDialogs="true"
+ android:noHistory="true"
+ android:excludeFromRecents="true"
+ android:process=":ui">
</activity>
<provider android:name="com.android.server.am.DumpHeapProvider"
- android:authorities="com.android.server.heapdump"
- android:grantUriPermissions="true"
- android:multiprocess="false"
- android:singleUser="true" />
+ android:authorities="com.android.server.heapdump"
+ android:grantUriPermissions="true"
+ android:multiprocess="false"
+ android:singleUser="true" />
<activity android:name="android.accounts.ChooseAccountActivity"
- android:excludeFromRecents="true"
- android:exported="true"
- android:theme="@style/Theme.Material.Light.Dialog"
- android:label="@string/choose_account_label"
- android:process=":ui">
+ android:excludeFromRecents="true"
+ android:exported="true"
+ android:theme="@style/Theme.Material.DayNight.Dialog"
+ android:label="@string/choose_account_label"
+ android:process=":ui">
</activity>
<activity android:name="android.accounts.ChooseTypeAndAccountActivity"
- android:excludeFromRecents="true"
- android:exported="true"
- android:theme="@style/Theme.Material.Light.Dialog"
- android:label="@string/choose_account_label"
- android:process=":ui">
+ android:excludeFromRecents="true"
+ android:exported="true"
+ android:theme="@style/Theme.Material.DayNight.Dialog"
+ android:label="@string/choose_account_label"
+ android:process=":ui">
</activity>
<activity android:name="android.accounts.ChooseAccountTypeActivity"
- android:excludeFromRecents="true"
- android:theme="@style/Theme.Material.Light.Dialog"
- android:label="@string/choose_account_label"
- android:process=":ui">
+ android:excludeFromRecents="true"
+ android:theme="@style/Theme.Material.DayNight.Dialog"
+ android:label="@string/choose_account_label"
+ android:process=":ui">
</activity>
<activity android:name="android.accounts.CantAddAccountActivity"
- android:excludeFromRecents="true"
- android:exported="true"
- android:theme="@style/Theme.Material.Light.Dialog.NoActionBar"
- android:process=":ui">
+ android:excludeFromRecents="true"
+ android:exported="true"
+ android:theme="@style/Theme.Material.DayNight.Dialog.NoActionBar"
+ android:process=":ui">
</activity>
<activity android:name="android.accounts.GrantCredentialsPermissionActivity"
- android:excludeFromRecents="true"
- android:exported="true"
- android:theme="@style/Theme.Material.Light.DialogWhenLarge"
- android:process=":ui">
+ android:excludeFromRecents="true"
+ android:exported="true"
+ android:theme="@style/Theme.Material.DayNight.DialogWhenLarge"
+ android:process=":ui">
</activity>
<activity android:name="android.content.SyncActivityTooManyDeletes"
- android:theme="@style/Theme.Material.Light.Dialog"
- android:label="@string/sync_too_many_deletes"
- android:process=":ui">
+ android:theme="@style/Theme.Material.DayNight.Dialog"
+ android:label="@string/sync_too_many_deletes"
+ android:process=":ui">
</activity>
<activity android:name="com.android.internal.app.ShutdownActivity"
- android:permission="android.permission.SHUTDOWN"
- android:theme="@style/Theme.NoDisplay"
- android:excludeFromRecents="true">
+ android:permission="android.permission.SHUTDOWN"
+ android:theme="@style/Theme.NoDisplay"
+ android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.ACTION_REQUEST_SHUTDOWN" />
<category android:name="android.intent.category.DEFAULT" />
@@ -2801,20 +3059,49 @@
</activity>
<activity android:name="com.android.internal.app.NetInitiatedActivity"
- android:theme="@style/Theme.Material.Light.Dialog.Alert"
- android:excludeFromRecents="true"
- android:process=":ui">
+ android:theme="@style/Theme.Material.DayNight.Dialog.Alert"
+ android:excludeFromRecents="true"
+ android:process=":ui">
+ </activity>
+
+ <activity android:name="com.android.internal.app.SystemUserHomeActivity"
+ android:enabled="false"
+ android:process=":ui"
+ android:systemUserOnly="true"
+ android:theme="@style/Theme.Translucent.NoTitleBar">
+ <intent-filter android:priority="-100">
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.HOME" />
+ </intent-filter>
+ </activity>
+
+ <!-- Activity to prompt user if it's ok to create a new user sandbox for a
+ specified account. -->
+ <activity android:name="com.android.internal.app.ConfirmUserCreationActivity"
+ android:excludeFromRecents="true"
+ android:process=":ui"
+ android:theme="@style/Theme.Material.DayNight.Dialog.Alert">
+ <intent-filter android:priority="1000">
+ <action android:name="android.os.action.CREATE_USER" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity>
+
+ <activity android:name="com.android.internal.app.UnlaunchableAppActivity"
+ android:theme="@style/Theme.Material.DayNight.Dialog.Alert"
+ android:excludeFromRecents="true"
+ android:process=":ui">
</activity>
<receiver android:name="com.android.server.BootReceiver"
- android:primaryUserOnly="true">
+ android:systemUserOnly="true">
<intent-filter android:priority="1000">
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<receiver android:name="com.android.server.updates.CertPinInstallReceiver"
- android:permission="android.permission.UPDATE_CONFIG">
+ android:permission="android.permission.UPDATE_CONFIG">
<intent-filter>
<action android:name="android.intent.action.UPDATE_PINS" />
<data android:scheme="content" android:host="*" android:mimeType="*/*" />
@@ -2822,7 +3109,7 @@
</receiver>
<receiver android:name="com.android.server.updates.IntentFirewallInstallReceiver"
- android:permission="android.permission.UPDATE_CONFIG">
+ android:permission="android.permission.UPDATE_CONFIG">
<intent-filter>
<action android:name="android.intent.action.UPDATE_INTENT_FIREWALL" />
<data android:scheme="content" android:host="*" android:mimeType="*/*" />
@@ -2830,15 +3117,23 @@
</receiver>
<receiver android:name="com.android.server.updates.SmsShortCodesInstallReceiver"
- android:permission="android.permission.UPDATE_CONFIG">
+ android:permission="android.permission.UPDATE_CONFIG">
<intent-filter>
<action android:name="android.intent.action.UPDATE_SMS_SHORT_CODES" />
<data android:scheme="content" android:host="*" android:mimeType="*/*" />
</intent-filter>
</receiver>
+ <receiver android:name="com.android.server.updates.ApnDbInstallReceiver"
+ android:permission="android.permission.UPDATE_CONFIG">
+ <intent-filter>
+ <action android:name="android.intent.action.UPDATE_APN_DB" />
+ <data android:scheme="content" android:host="*" android:mimeType="*/*" />
+ </intent-filter>
+ </receiver>
+
<receiver android:name="com.android.server.updates.CarrierProvisioningUrlsInstallReceiver"
- android:permission="android.permission.UPDATE_CONFIG">
+ android:permission="android.permission.UPDATE_CONFIG">
<intent-filter>
<action android:name="android.intent.action.UPDATE_CARRIER_PROVISIONING_URLS" />
<data android:scheme="content" android:host="*" android:mimeType="*/*" />
@@ -2846,7 +3141,7 @@
</receiver>
<receiver android:name="com.android.server.updates.TzDataInstallReceiver"
- android:permission="android.permission.UPDATE_CONFIG">
+ android:permission="android.permission.UPDATE_CONFIG">
<intent-filter>
<action android:name="android.intent.action.UPDATE_TZDATA" />
<data android:scheme="content" android:host="*" android:mimeType="*/*" />
@@ -2854,7 +3149,7 @@
</receiver>
<receiver android:name="com.android.server.updates.SELinuxPolicyInstallReceiver"
- android:permission="android.permission.UPDATE_CONFIG">
+ android:permission="android.permission.UPDATE_CONFIG">
<intent-filter>
<action android:name="android.intent.action.UPDATE_SEPOLICY" />
<data android:scheme="content" android:host="*" android:mimeType="*/*" />
@@ -2862,7 +3157,7 @@
</receiver>
<receiver android:name="com.android.server.MasterClearReceiver"
- android:permission="android.permission.MASTER_CLEAR">
+ android:permission="android.permission.MASTER_CLEAR">
<intent-filter
android:priority="100" >
<!-- For Checkin, Settings, etc.: action=MASTER_CLEAR -->
@@ -2875,12 +3170,12 @@
</receiver>
<service android:name="android.hardware.location.GeofenceHardwareService"
- android:permission="android.permission.LOCATION_HARDWARE"
- android:exported="false" />
+ android:permission="android.permission.LOCATION_HARDWARE"
+ android:exported="false" />
<service android:name="com.android.internal.backup.LocalTransportService"
- android:permission="android.permission.CONFIRM_FULL_BACKUP"
- android:exported="false">
+ android:permission="android.permission.CONFIRM_FULL_BACKUP"
+ android:exported="false">
<intent-filter>
<action android:name="android.backup.TRANSPORT_HOST" />
</intent-filter>
@@ -2900,10 +3195,14 @@
android:permission="android.permission.BIND_JOB_SERVICE" >
</service>
+ <service android:name="com.android.server.content.SyncJobService"
+ android:permission="android.permission.BIND_JOB_SERVICE" >
+ </service>
+
<service
- android:name="com.android.server.pm.BackgroundDexOptService"
- android:exported="true"
- android:permission="android.permission.BIND_JOB_SERVICE">
+ android:name="com.android.server.pm.BackgroundDexOptService"
+ android:exported="true"
+ android:permission="android.permission.BIND_JOB_SERVICE">
</service>
</application>
diff --git a/tests/tests/provider/src/android/provider/cts/BlockedNumberContractTest.java b/tests/tests/provider/src/android/provider/cts/BlockedNumberContractTest.java
index d4f81b5..af5df67 100644
--- a/tests/tests/provider/src/android/provider/cts/BlockedNumberContractTest.java
+++ b/tests/tests/provider/src/android/provider/cts/BlockedNumberContractTest.java
@@ -95,8 +95,8 @@
try {
mContentResolver.update(
BlockedNumbers.CONTENT_URI, getContentValues("123"), null, null);
- fail("Should throw UnsupportedOperationException");
- } catch (UnsupportedOperationException expected) {
+ fail("Should throw SecurityException");
+ } catch (SecurityException expected) {
}
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java b/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java
index 686281c..1400d86 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java
@@ -582,67 +582,67 @@
}
static public void computeAcos(TestAcos.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(4, 128, false);
+ t.setPrecision(4, 128);
args.out = acos(args.inV, t);
}
static public void computeAcosh(TestAcosh.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(4, 128, false);
+ t.setPrecision(4, 128);
args.out = acosh(args.inV, t);
}
static public void computeAcospi(TestAcospi.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(5, 128, false);
+ t.setPrecision(5, 128);
args.out = acospi(args.inV, t);
}
static public void computeAsin(TestAsin.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(4, 128, false);
+ t.setPrecision(4, 128);
args.out = asin(args.inV, t);
}
static public void computeAsinh(TestAsinh.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(4, 128, false);
+ t.setPrecision(4, 128);
args.out = asinh(args.inV, t);
}
static public void computeAsinpi(TestAsinpi.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(5, 128, false);
+ t.setPrecision(5, 128);
args.out = asinpi(args.inV, t);
}
static public void computeAtan(TestAtan.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(5, 128, false);
+ t.setPrecision(5, 128);
args.out = atan(args.inV, t);
}
static public void computeAtanh(TestAtanh.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(5, 128, false);
+ t.setPrecision(5, 128);
args.out = atanh(args.inV, t);
}
static public void computeAtanpi(TestAtanpi.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(5, 128, false);
+ t.setPrecision(5, 128);
args.out = atanpi(args.inV, t);
}
static public void computeAtan2(TestAtan2.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(6, 128, false);
+ t.setPrecision(6, 128);
args.out = atan2(args.inNumerator, args.inDenominator, t);
}
static public void computeAtan2pi(TestAtan2pi.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(6, 128, false);
+ t.setPrecision(6, 128);
args.out = atan2pi(args.inNumerator, args.inDenominator, t);
}
static public void computeCbrt(TestCbrt.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(2, 128, false);
+ t.setPrecision(2, 128);
args.out = cbrt(args.inV, t);
}
static public void computeCeil(TestCeil.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(0, 1, false);
+ t.setPrecision(0, 1);
Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
ceil(in.mid32()),
@@ -675,7 +675,7 @@
}
static public void computeClamp(TestClamp.ArgumentsFloatFloatFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new32(Math.min(args.inMaxValue,
Math.max(args.inValue, args.inMinValue)));
}
@@ -740,11 +740,11 @@
args.out = convertCharToUlong(args.inV);
}
static public void computeConvert(TestConvert.ArgumentsCharFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new32(convertCharToFloat(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsCharDouble args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new64(convertCharToDouble(args.inV));
}
@@ -773,11 +773,11 @@
args.out = convertUcharToUlong(args.inV);
}
static public void computeConvert(TestConvert.ArgumentsUcharFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new32(convertUcharToFloat(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsUcharDouble args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new64(convertUcharToDouble(args.inV));
}
@@ -806,11 +806,11 @@
args.out = convertShortToUlong(args.inV);
}
static public void computeConvert(TestConvert.ArgumentsShortFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new32(convertShortToFloat(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsShortDouble args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new64(convertShortToDouble(args.inV));
}
@@ -839,11 +839,11 @@
args.out = convertUshortToUlong(args.inV);
}
static public void computeConvert(TestConvert.ArgumentsUshortFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new32(convertUshortToFloat(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsUshortDouble args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new64(convertUshortToDouble(args.inV));
}
@@ -872,11 +872,11 @@
args.out = convertIntToUlong(args.inV);
}
static public void computeConvert(TestConvert.ArgumentsIntFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
args.out = t.new32(convertIntToFloat(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsIntDouble args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new64(convertIntToDouble(args.inV));
}
@@ -905,11 +905,11 @@
args.out = convertUintToUlong(args.inV);
}
static public void computeConvert(TestConvert.ArgumentsUintFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
args.out = t.new32(convertUintToFloat(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsUintDouble args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new64(convertUintToDouble(args.inV));
}
@@ -938,11 +938,11 @@
args.out = convertLongToUlong(args.inV);
}
static public void computeConvert(TestConvert.ArgumentsLongFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
args.out = t.new32(convertLongToFloat(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsLongDouble args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
args.out = t.new64(convertLongToDouble(args.inV));
}
@@ -971,11 +971,11 @@
args.out = convertUlongToUlong(args.inV);
}
static public void computeConvert(TestConvert.ArgumentsUlongFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
args.out = t.new32(convertUlongToFloat(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsUlongDouble args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
args.out = t.new64(convertUlongToDouble(args.inV));
}
@@ -1004,11 +1004,11 @@
args.out = convertFloatToUlong(args.inV);
}
static public void computeConvert(TestConvert.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new32(convertFloatToFloat(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsFloatDouble args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new64(convertFloatToDouble(args.inV));
}
@@ -1037,65 +1037,65 @@
args.out = convertDoubleToUlong(args.inV);
}
static public void computeConvert(TestConvert.ArgumentsDoubleFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
args.out = t.new32(convertDoubleToFloat(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsDoubleDouble args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new64(convertDoubleToDouble(args.inV));
}
static public void computeCopysign(TestCopysign.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new32(Math.copySign(args.inMagnitudeValue, args.inSignValue));
}
static public void computeCos(TestCos.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(4, 128, false);
+ t.setPrecision(4, 128);
args.out = cos(args.inV, t);
}
static public void computeCosh(TestCosh.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(4, 128, false);
+ t.setPrecision(4, 128);
args.out = cosh(args.inV, t);
}
static public void computeCospi(TestCospi.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(4, 128, false);
+ t.setPrecision(4, 128);
args.out = cospi(args.inV, t);
}
static public void computeCross(TestCross.ArgumentsFloatNFloatNFloatN args, Target t) {
- t.setPrecision(1, 4, false);
+ t.setPrecision(1, 4);
cross(args.inLeftVector, args.inRightVector, args.out, t);
}
static public void computeDegrees(TestDegrees.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(3, 3, false);
+ t.setPrecision(3, 3);
Target.Floaty in = t.new32(args.inV);
Target.Floaty k = t.new32((float)(180.0 / Math.PI));
args.out = t.multiply(in, k);
}
static public void computeDistance(TestDistance.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
args.out = distance(new float[] {args.inLeftVector}, new float[] {args.inRightVector}, t);
}
static public void computeDistance(TestDistance.ArgumentsFloatNFloatNFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
args.out = distance(args.inLeftVector, args.inRightVector, t);
}
static public void computeDot(TestDot.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(1, 4, false);
+ t.setPrecision(1, 4);
Target.Floaty a = t.new32(args.inLeftVector);
Target.Floaty b = t.new32(args.inRightVector);
args.out = t.multiply(a, b);
}
static public void computeDot(TestDot.ArgumentsFloatNFloatNFloat args, Target t) {
- t.setPrecision(1, 4, false);
+ t.setPrecision(1, 4);
Target.Floaty sum = t.new32(0.f);
for (int i = 0; i < args.inLeftVector.length; i++) {
Target.Floaty a = t.new32(args.inLeftVector[i]);
@@ -1106,7 +1106,7 @@
}
static public void computeErf(TestErf.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(16, 128, false);
+ t.setPrecision(16, 128);
Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
erf(args.inV),
@@ -1115,7 +1115,7 @@
}
static public void computeErfc(TestErfc.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(16, 128, false);
+ t.setPrecision(16, 128);
Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
erfc(args.inV),
@@ -1124,27 +1124,27 @@
}
static public void computeExp(TestExp.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(3, 16, false);
+ t.setPrecision(3, 16);
args.out = exp(args.inV, t);
}
static public void computeExp10(TestExp10.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(3, 32, false);
+ t.setPrecision(3, 32);
args.out = exp10(args.inV, t);
}
static public void computeExp2(TestExp2.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(3, 16, false);
+ t.setPrecision(3, 16);
args.out = exp2(args.inV, t);
}
static public void computeExpm1(TestExpm1.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(3, 16, false);
+ t.setPrecision(3, 16);
args.out = expm1(args.inV, t);
}
static public void computeFabs(TestFabs.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
Math.abs(args.inV),
@@ -1153,39 +1153,39 @@
}
static public void computeFastDistance(TestFastDistance.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(FAST_PRECISION, FAST_PRECISION, false);
+ t.setPrecision(FAST_PRECISION, FAST_PRECISION);
args.out = distance(new float[] {args.inLeftVector}, new float[] {args.inRightVector}, t);
}
static public void computeFastDistance(TestFastDistance.ArgumentsFloatNFloatNFloat args, Target t) {
- t.setPrecision(FAST_PRECISION, FAST_PRECISION, false);
+ t.setPrecision(FAST_PRECISION, FAST_PRECISION);
args.out = distance(args.inLeftVector, args.inRightVector, t);
}
static public void computeFastLength(TestFastLength.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(FAST_PRECISION, FAST_PRECISION, false);
+ t.setPrecision(FAST_PRECISION, FAST_PRECISION);
args.out = length(new float[] {args.inV}, t);
}
static public void computeFastLength(TestFastLength.ArgumentsFloatNFloat args, Target t) {
- t.setPrecision(FAST_PRECISION, FAST_PRECISION, false);
+ t.setPrecision(FAST_PRECISION, FAST_PRECISION);
args.out = length(args.inV, t);
}
static public void computeFastNormalize(TestFastNormalize.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(FAST_PRECISION, FAST_PRECISION, false);
+ t.setPrecision(FAST_PRECISION, FAST_PRECISION);
Target.Floaty[] out = new Target.Floaty[1];
normalize(new float[] {args.inV}, out, t);
args.out = out[0];
}
static public void computeFastNormalize(TestFastNormalize.ArgumentsFloatNFloatN args, Target t) {
- t.setPrecision(FAST_PRECISION, FAST_PRECISION, false);
+ t.setPrecision(FAST_PRECISION, FAST_PRECISION);
normalize(args.inV, args.out, t);
}
static public void computeFdim(TestFdim.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
Target.Floaty inA = t.new32(args.inA);
Target.Floaty inB = t.new32(args.inB);
Target.Floaty r = t.subtract(inA, inB);
@@ -1196,7 +1196,7 @@
}
static public void computeFloor(TestFloor.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
floor(args.inV),
@@ -1205,13 +1205,13 @@
}
static public void computeFma(TestFma.ArgumentsFloatFloatFloatFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
Target.Floaty ab = t.multiply(t.new32(args.inMultiplicand1), t.new32(args.inMultiplicand2));
args.out = t.add(ab, t.new32(args.inOffset));
}
static public void computeFmax(TestFmax.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
Target.Floaty a = t.new32(args.inA);
Target.Floaty b = t.new32(args.inB);
args.out = t.new32(
@@ -1223,7 +1223,7 @@
}
static public void computeFmin(TestFmin.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
Target.Floaty a = t.new32(args.inA);
Target.Floaty b = t.new32(args.inB);
args.out = t.new32(
@@ -1235,7 +1235,7 @@
}
static public void computeFmod(TestFmod.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
Target.Floaty numerator = t.new32(args.inNumerator);
Target.Floaty denominator = t.new32(args.inDenominator);
args.out = t.new32(
@@ -1247,7 +1247,7 @@
}
static public void computeFract(TestFract.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
float floor = floor(args.inV);
args.outFloor = t.new32(floor);
// 0x1.fffffep-1f is 0.999999...
@@ -1255,36 +1255,36 @@
}
static public void computeFract(TestFract.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
float floor = floor(args.inV);
// 0x1.fffffep-1f is 0.999999...
args.out = t.new32(Math.min(args.inV - floor, 0x1.fffffep-1f));
}
static public void computeFrexp(TestFrexp.ArgumentsFloatIntFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
FrexpResult result = frexp(args.inV);
args.out = t.new32(result.significand);
args.outExponent = result.exponent;
}
static public void computeHalfRecip(TestHalfRecip.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(HALF_PRECISION, HALF_PRECISION, false);
+ t.setPrecision(HALF_PRECISION, HALF_PRECISION);
args.out = recip(args.inV, t);
}
static public void computeHalfRsqrt(TestHalfRsqrt.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(HALF_PRECISION, HALF_PRECISION, false);
+ t.setPrecision(HALF_PRECISION, HALF_PRECISION);
args.out = rsqrt(args.inV, t);
}
static public void computeHalfSqrt(TestHalfSqrt.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(HALF_PRECISION, HALF_PRECISION, false);
+ t.setPrecision(HALF_PRECISION, HALF_PRECISION);
args.out = sqrt(args.inV, t);
}
static public void computeHypot(TestHypot.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(4, 4, false);
+ t.setPrecision(4, 4);
args.out = hypot(args.inA, args.inB, t);
}
@@ -1305,7 +1305,7 @@
}
static public void computeLdexp(TestLdexp.ArgumentsFloatIntFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
Target.Floaty inMantissa = t.new32(args.inMantissa);
args.out = t.new32(
ldexp(inMantissa.mid32(), args.inExponent),
@@ -1314,17 +1314,17 @@
}
static public void computeLength(TestLength.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
args.out = length(new float[]{args.inV}, t);
}
static public void computeLength(TestLength.ArgumentsFloatNFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
args.out = length(args.inV, t);
}
static public void computeLgamma(TestLgamma.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(16, 128, false);
+ t.setPrecision(16, 128);
Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
lgamma(in.mid32()),
@@ -1336,7 +1336,7 @@
* disable the verification of -0. We do this with a custom verifier. Once bionic
* is fixed, we can restore computeLgamma and remove verifyLgamma.
static public void computeLgamma(TestLgamma.ArgumentsFloatIntFloat args, Target t) {
- t.setPrecision(16, 128, false);
+ t.setPrecision(16, 128);
Target.Floaty in = t.new32(args.inV);
LgammaResult result = lgamma2(in.mid32());
LgammaResult resultMin = lgamma2(in.min32());
@@ -1346,7 +1346,7 @@
}
*/
static public String verifyLgamma(TestLgamma.ArgumentsFloatIntFloat args, Target t) {
- t.setPrecision(16, 128, false);
+ t.setPrecision(16, 128);
Target.Floaty in = t.new32(args.inV);
LgammaResult result = lgamma2(in.mid32());
LgammaResult resultMin = lgamma2(in.min32());
@@ -1375,27 +1375,27 @@
// TODO The relaxed ulf for the various log are taken from the old tests.
// They are not consistent.
static public void computeLog(TestLog.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(3, 16, false);
+ t.setPrecision(3, 16);
args.out = log(args.inV, t);
}
static public void computeLog10(TestLog10.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(3, 16, false);
+ t.setPrecision(3, 16);
args.out = log10(args.inV, t);
}
static public void computeLog1p(TestLog1p.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(2, 16, false);
+ t.setPrecision(2, 16);
args.out = log1p(args.inV, t);
}
static public void computeLog2(TestLog2.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(3, 128, false);
+ t.setPrecision(3, 128);
args.out = log2(args.inV, t);
}
static public void computeLogb(TestLogb.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
logb(in.mid32()),
@@ -1404,7 +1404,7 @@
}
static public void computeMad(TestMad.ArgumentsFloatFloatFloatFloat args, Target t) {
- t.setPrecision(1, 4, false);
+ t.setPrecision(1, 4);
Target.Floaty ab = t.multiply(t.new32(args.inMultiplicand1), t.new32(args.inMultiplicand2));
args.out = t.add(ab, t.new32(args.inOffset));
}
@@ -1442,7 +1442,7 @@
}
static public void computeMax(TestMax.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
Target.Floaty a = t.new32(args.inA);
Target.Floaty b = t.new32(args.inB);
args.out = t.new32(
@@ -1486,12 +1486,12 @@
}
static public void computeMin(TestMin.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new32(Math.min(args.inA, args.inB));
}
static public void computeMix(TestMix.ArgumentsFloatFloatFloatFloat args, Target t) {
- t.setPrecision(1, 4, false);
+ t.setPrecision(1, 4);
Target.Floaty start = t.new32(args.inStart);
Target.Floaty stop = t.new32(args.inStop);
Target.Floaty diff = t.subtract(stop, start);
@@ -1499,146 +1499,146 @@
}
static public void computeModf(TestModf.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
float ret = (float)(int)args.inV;
args.outIntegralPart = t.new32(ret);
args.out = t.new32(args.inV - ret);
}
static public void computeNan(TestNan.ArgumentsUintFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
// TODO(jeanluc) We're not using the input argument
args.out = t.new32(Float.NaN);
}
static public void computeNativeAcos(TestNativeAcos.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = acos(args.inV, t);
}
static public void computeNativeAcosh(TestNativeAcosh.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = acosh(args.inV, t);
}
static public void computeNativeAcospi(TestNativeAcospi.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = acospi(args.inV, t);
}
static public void computeNativeAsin(TestNativeAsin.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = asin(args.inV, t);
}
static public void computeNativeAsinh(TestNativeAsinh.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = asinh(args.inV, t);
}
static public void computeNativeAsinpi(TestNativeAsinpi.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = asinpi(args.inV, t);
}
static public void computeNativeAtan(TestNativeAtan.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = atan(args.inV, t);
}
static public void computeNativeAtanh(TestNativeAtanh.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = atanh(args.inV, t);
}
static public void computeNativeAtanpi(TestNativeAtanpi.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = atanpi(args.inV, t);
}
static public void computeNativeAtan2(TestNativeAtan2.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = atan2(args.inNumerator, args.inDenominator, t);
}
static public void computeNativeAtan2pi(TestNativeAtan2pi.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = atan2pi(args.inNumerator, args.inDenominator, t);
}
static public void computeNativeCbrt(TestNativeCbrt.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = cbrt(args.inV, t);
}
static public void computeNativeCos(TestNativeCos.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = cos(args.inV, t);
}
static public void computeNativeCosh(TestNativeCosh.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = cosh(args.inV, t);
}
static public void computeNativeCospi(TestNativeCospi.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = cospi(args.inV, t);
}
static public void computeNativeDistance(TestNativeDistance.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = distance(new float[]{args.inLeftVector}, new float[]{args.inRightVector}, t);
}
static public void computeNativeDistance(TestNativeDistance.ArgumentsFloatNFloatNFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = distance(args.inLeftVector, args.inRightVector, t);
}
static public void computeNativeDivide(TestNativeDivide.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = t.divide(t.new32(args.inLeftVector), t.new32(args.inRightVector));
}
static public void computeNativeExp(TestNativeExp.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = exp(args.inV, t);
}
static public void computeNativeExp10(TestNativeExp10.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = exp10(args.inV, t);
}
static public void computeNativeExp2(TestNativeExp2.ArgumentsFloatFloat args, Target t) {
// TODO we would like to use NATIVE_PRECISION, NATIVE_PRECISION
- t.setPrecision(13000, 13000, true);
+ t.setPrecision(13000, 13000);
args.out = exp2(args.inV, t);
}
static public void computeNativeExpm1(TestNativeExpm1.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = expm1(args.inV, t);
}
static public void computeNativeHypot(TestNativeHypot.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = hypot(args.inA, args.inB, t);
}
static public void computeNativeLength(TestNativeLength.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = length(new float[] {args.inV}, t);
}
static public void computeNativeLength(TestNativeLength.ArgumentsFloatNFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = length(args.inV, t);
}
static public void computeNativeLog(TestNativeLog.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
// For very small values, allow anything.
if (Math.abs(args.inV) < 1.e-20) {
args.out = any32(t);
@@ -1648,7 +1648,7 @@
}
static public void computeNativeLog10(TestNativeLog10.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
// For very small values, allow anything.
if (Math.abs(args.inV) < 1.e-20) {
args.out = any32(t);
@@ -1658,12 +1658,12 @@
}
static public void computeNativeLog1p(TestNativeLog1p.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = log1p(args.inV, t);
}
static public void computeNativeLog2(TestNativeLog2.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
// For very small values, allow anything.
if (Math.abs(args.inV) < 1.e-20) {
args.out = any32(t);
@@ -1673,20 +1673,20 @@
}
static public void computeNativeNormalize(TestNativeNormalize.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
Target.Floaty[] out = new Target.Floaty[1];
normalize(new float[] {args.inV}, out, t);
args.out = out[0];
}
static public void computeNativeNormalize(TestNativeNormalize.ArgumentsFloatNFloatN args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
normalize(args.inV, args.out, t);
}
static public void computeNativePowr(TestNativePowr.ArgumentsFloatFloatFloat args, Target t) {
// TODO we would like to use NATIVE_PRECISION, NATIVE_PRECISION
- t.setPrecision(32000, 32000, true);
+ t.setPrecision(32000, 32000);
// For very small values, allow anything.
if (Math.abs(args.inBase) < 1.e-20) {
args.out = any32(t);
@@ -1696,12 +1696,12 @@
}
static public void computeNativeRecip(TestNativeRecip.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = recip(args.inV, t);
}
static public void computeNativeRootn(TestNativeRootn.ArgumentsFloatIntFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
// Allow anything for zero.
if (args.inN == 0) {
args.out = any32(t);
@@ -1711,70 +1711,70 @@
}
static public void computeNativeRsqrt(TestNativeRsqrt.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = rsqrt(args.inV, t);
}
static public void computeNativeSin(TestNativeSin.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = sin(args.inV, t);
}
static public void computeNativeSincos(TestNativeSincos.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.outCos = cos(args.inV, t);
args.out = sin(args.inV, t);
}
static public void computeNativeSinh(TestNativeSinh.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = sinh(args.inV, t);
}
static public void computeNativeSinpi(TestNativeSinpi.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = sinpi(args.inV, t);
}
static public void computeNativeSqrt(TestNativeSqrt.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = sqrt(args.inV, t);
}
static public void computeNativeTan(TestNativeTan.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = tan(args.inV, t);
}
static public void computeNativeTanh(TestNativeTanh.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = tanh(args.inV, t);
}
static public void computeNativeTanpi(TestNativeTanpi.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION);
args.out = tanpi(args.inV, t);
}
static public void computeNextafter(TestNextafter.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new32(Math.nextAfter(args.inV, args.inTarget));
}
static public void computeNormalize(TestNormalize.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
Target.Floaty[] out = new Target.Floaty[1];
normalize(new float[] {args.inV}, out, t);
args.out = out[0];
}
static public void computeNormalize(TestNormalize.ArgumentsFloatNFloatN args, Target t) {
- t.setPrecision(1, 1, false);
+ t.setPrecision(1, 1);
normalize(args.inV, args.out, t);
}
static public void computePow(TestPow.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(16, 128, false);
+ t.setPrecision(16, 128);
Target.Floaty base = t.new32(args.inBase);
Target.Floaty exponent = t.new32(args.inExponent);
args.out = t.new32(
@@ -1786,7 +1786,7 @@
}
static public void computePown(TestPown.ArgumentsFloatIntFloat args, Target t) {
- t.setPrecision(16, 128, false);
+ t.setPrecision(16, 128);
Target.Floaty in = t.new32(args.inBase);
// We use double for the calculations because floats does not have enough
// mantissa bits. Knowing if an int is odd or even will matter for negative
@@ -1799,25 +1799,25 @@
}
static public void computePowr(TestPowr.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(16, 128, false);
+ t.setPrecision(16, 128);
args.out = powr(args.inBase, args.inExponent, t);
}
static public void computeRadians(TestRadians.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(3, 3, false);
+ t.setPrecision(3, 3);
Target.Floaty in = t.new32(args.inV);
Target.Floaty k = t.new32((float)(Math.PI / 180.0));
args.out = t.multiply(in, k);
}
static public void computeRemainder(TestRemainder.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
RemquoResult result = remquo(args.inNumerator, args.inDenominator);
args.out = t.new32(result.remainder);
}
static public String verifyRemquo(TestRemquo.ArgumentsFloatFloatIntFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
RemquoResult expected = remquo(args.inNumerator, args.inDenominator);
// If the expected remainder is NaN, we don't validate the quotient. It's because of
// a division by zero.
@@ -1844,7 +1844,7 @@
}
static public void computeRint(TestRint.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
rint(in.mid32()),
@@ -1853,12 +1853,12 @@
}
static public void computeRootn(TestRootn.ArgumentsFloatIntFloat args, Target t) {
- t.setPrecision(16, 16, false);
+ t.setPrecision(16, 16);
args.out = rootn(args.inV, args.inN, t);
}
static public void computeRound(TestRound.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
round(in.mid32()),
@@ -1867,63 +1867,63 @@
}
static public void computeRsqrt(TestRsqrt.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(2, 2, false);
+ t.setPrecision(2, 2);
args.out = rsqrt(args.inV, t);
}
static public void computeSign(TestSign.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new32(Math.signum(args.inV));
}
static public void computeSin(TestSin.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(4, 128, false);
+ t.setPrecision(4, 128);
args.out = sin(args.inV, t);
}
static public void computeSincos(TestSincos.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(4, 128, false);
+ t.setPrecision(4, 128);
args.outCos = cos(args.inV,t );
args.out = sin(args.inV, t);
}
static public void computeSinh(TestSinh.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(4, 128, false);
+ t.setPrecision(4, 128);
args.out = sinh(args.inV, t);
}
static public void computeSinpi(TestSinpi.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(4, 128, false);
+ t.setPrecision(4, 128);
args.out = sinpi(args.inV, t);
}
static public void computeSqrt(TestSqrt.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(3, 3, false);
+ t.setPrecision(3, 3);
args.out = sqrt(args.inV, t);
}
static public void computeStep(TestStep.ArgumentsFloatFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
args.out = t.new32(args.inV < args.inEdge ? 0.f : 1.f);
}
static public void computeTan(TestTan.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(5, 128, false);
+ t.setPrecision(5, 128);
args.out = tan(args.inV, t);
}
static public void computeTanh(TestTanh.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(5, 128, false);
+ t.setPrecision(5, 128);
args.out = tanh(args.inV, t);
}
static public void computeTanpi(TestTanpi.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(4, 128, false);
+ t.setPrecision(4, 128);
args.out = tanpi(args.inV, t);
}
static public void computeTgamma(TestTgamma.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(16, 128, false);
+ t.setPrecision(16, 128);
Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
tgamma(in.mid32()),
@@ -1932,7 +1932,7 @@
}
static public void computeTrunc(TestTrunc.ArgumentsFloatFloat args, Target t) {
- t.setPrecision(0, 0, false);
+ t.setPrecision(0, 0);
Target.Floaty in = t.new32(args.inV);
args.out = t.new32(
trunc(in.mid32()),
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/DoubleTest.java b/tests/tests/renderscript/src/android/renderscript/cts/DoubleTest.java
index 2de6afd..2ff23fc 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/DoubleTest.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/DoubleTest.java
@@ -19,6 +19,7 @@
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
+import android.renderscript.cts.Target;
public class DoubleTest extends RSBaseCompute {
@@ -33,8 +34,8 @@
float[] data = new float[big];
out.copyTo(data);
- Target t = new Target(true);
- t.setPrecision(1, 1, false);
+ Target t = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, true);
+ t.setPrecision(1, 1);
double pi = 3.14159265359;
Target.Floaty pi2 = t.new32((float) (pi * 2));
for (int x = 0; x < data.length; x++) {
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/FloatyUnitTest.java b/tests/tests/renderscript/src/android/renderscript/cts/FloatyUnitTest.java
new file mode 100644
index 0000000..ccce349
--- /dev/null
+++ b/tests/tests/renderscript/src/android/renderscript/cts/FloatyUnitTest.java
@@ -0,0 +1,227 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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.
+ */
+
+package android.renderscript.cts;
+
+import android.renderscript.cts.Target;
+
+public class FloatyUnitTest extends RSBaseCompute {
+ static float subnormalFloat = 10000 * Float.MIN_VALUE;
+ static float normalFloat1 = 1.7833920e+16f;
+ static float normalFloat2 = -1.9905756e-16f;
+
+ static double subnormalDouble = 10000 * Double.MIN_VALUE;
+ static double normalDouble = 1.7833920e+16;
+
+ // Fail if Floaty f doesn't accept value
+ private void shouldAccept(Target.Floaty f, double value) {
+ if (!f.couldBe(value)) {
+ StringBuilder message = new StringBuilder();
+ message.append("Floaty: ");
+ appendVariableToMessage(message, f);
+ message.append("\n");
+ message.append("Value: ");
+ appendVariableToMessage(message, (float) value);
+ message.append("\n");
+ assertTrue("Floaty incorrectly doesn't accept value:\n" + message.toString(), false);
+ }
+ }
+
+ // Fail if Floaty f accepts value
+ private void shouldNotAccept(Target.Floaty f, double value) {
+ if (f.couldBe(value)) {
+ StringBuilder message = new StringBuilder();
+ message.append("Floaty: ");
+ appendVariableToMessage(message, f);
+ message.append("\n");
+ message.append("Value: ");
+ appendVariableToMessage(message, (float) value);
+ message.append("\n");
+ assertTrue("Floaty incorrectly accepts value:\n" + message.toString(), false);
+ }
+ }
+
+ // Test Target that accepts precise 1ulp error for floating values.
+ public void testFloat1Ulp() {
+ Target t = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, false);
+ t.setPrecision(1, 1);
+
+ Target.Floaty subnormalFloaty = t.new32(subnormalFloat);
+ Target.Floaty normalFloaty = t.new32(normalFloat1);
+
+ // for subnormal
+ shouldAccept(subnormalFloaty, (double) subnormalFloat);
+ shouldAccept(subnormalFloaty, (double) subnormalFloat + Math.ulp(subnormalFloat));
+ shouldAccept(subnormalFloaty, (double) subnormalFloat - Math.ulp(subnormalFloat));
+ shouldNotAccept(subnormalFloaty, (double) subnormalFloat + 2 * Math.ulp(subnormalFloat));
+ shouldNotAccept(subnormalFloaty, (double) subnormalFloat - 2 * Math.ulp(subnormalFloat));
+ shouldNotAccept(subnormalFloaty, (double) normalFloat1);
+
+ // for normalFloaty
+ shouldAccept(normalFloaty, (double) normalFloat1);
+ shouldAccept(normalFloaty, (double) normalFloat1 + Math.ulp(normalFloat1));
+ shouldAccept(normalFloaty, (double) normalFloat1 - Math.ulp(normalFloat1));
+ shouldNotAccept(normalFloaty, (double) normalFloat1 + 2 * Math.ulp(normalFloat1));
+ shouldNotAccept(normalFloaty, (double) normalFloat1 - 2 * Math.ulp(normalFloat1));
+ shouldNotAccept(normalFloaty, (double) subnormalFloat);
+ }
+
+ // Test Target that accepts precise 8192ulp error for floating values.
+ public void testFloat8192Ulp() {
+ Target t = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, false);
+ t.setPrecision(8192, 8192);
+
+ Target.Floaty subnormalFloaty = t.new32(subnormalFloat);
+ Target.Floaty normalFloaty = t.new32(normalFloat2);
+
+ // for subnormalFloaty
+ shouldAccept(subnormalFloaty, (double) subnormalFloat);
+ shouldAccept(subnormalFloaty, (double) subnormalFloat + 8192 * Math.ulp(subnormalFloat));
+ shouldAccept(subnormalFloaty, (double) subnormalFloat - 8192 * Math.ulp(subnormalFloat));
+ shouldNotAccept(subnormalFloaty, (double) subnormalFloat + 8193 * Math.ulp(subnormalFloat));
+ shouldNotAccept(subnormalFloaty, (double) subnormalFloat - 8193 * Math.ulp(subnormalFloat));
+ shouldNotAccept(subnormalFloaty, (double) normalFloat1);
+
+ // for normalFloaty
+ shouldAccept(normalFloaty, (double) normalFloat2);
+ shouldAccept(normalFloaty, (double) normalFloat2 + 8192 * Math.ulp(normalFloat2));
+ shouldAccept(normalFloaty, (double) normalFloat2 - 8192 * Math.ulp(normalFloat2));
+ shouldNotAccept(normalFloaty, (double) normalFloat2 + 8193 * Math.ulp(normalFloat2));
+ shouldNotAccept(normalFloaty, (double) normalFloat2 - 8193 * Math.ulp(normalFloat2));
+ shouldNotAccept(normalFloaty, (double) subnormalFloat);
+ }
+
+ // Test Target that accepts relaxed 1ulp error for floating values.
+ public void testFloat1UlpRelaxed() {
+ Target t = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, true);
+ t.setPrecision(1, 1);
+
+ Target.Floaty subnormalFloaty = t.new32(subnormalFloat);
+
+ // for subnormal
+ shouldAccept(subnormalFloaty, (double) subnormalFloat);
+ // In relaxed mode, Floaty uses the smallest normal as the ULP if ULP is subnormal.
+ shouldAccept(subnormalFloaty, (double) Float.MIN_NORMAL + Float.MIN_NORMAL);
+ shouldAccept(subnormalFloaty, (double) 0.f - Float.MIN_NORMAL);
+ shouldNotAccept(subnormalFloaty, (double) Float.MIN_NORMAL + 2 * Float.MIN_NORMAL);
+ shouldNotAccept(subnormalFloaty, (double) 0.f - 2 * Float.MIN_NORMAL);
+ shouldNotAccept(subnormalFloaty, (double) normalFloat1);
+ }
+
+ // Test Target that accepts relaxed 8192ulp error for floating values.
+ public void testFloat8192UlpRelaxed() {
+ Target t = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, true);
+ t.setPrecision(8192, 8192);
+
+ Target.Floaty subnormalFloaty = t.new32(subnormalFloat);
+
+ // for subnormalFloaty
+ shouldAccept(subnormalFloaty, (double) subnormalFloat);
+ // In relaxed mode, Floaty uses the smallest normal as the ULP if ULP is subnormal.
+ shouldAccept(subnormalFloaty, (double) Float.MIN_NORMAL + 8192 * Float.MIN_NORMAL);
+ shouldAccept(subnormalFloaty, (double) 0.f - 8192 * Float.MIN_NORMAL);
+ shouldNotAccept(subnormalFloaty, (double) Float.MIN_NORMAL + 8193 * Float.MIN_NORMAL);
+ shouldNotAccept(subnormalFloaty, (double) 0.f - 8193 * Float.MIN_NORMAL);
+ shouldNotAccept(subnormalFloaty, (double) normalFloat1);
+ }
+
+ // Test Target that accepts precise 1ulp error for double values.
+ public void testDouble1Ulp() {
+ Target t = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, false);
+ t.setPrecision(1, 1);
+
+ Target.Floaty subnormalFloaty = t.new64(subnormalDouble);
+ Target.Floaty normalFloaty = t.new64(normalDouble);
+
+ // for subnormal
+ shouldAccept(subnormalFloaty, subnormalDouble);
+ shouldAccept(subnormalFloaty, subnormalDouble + Math.ulp(subnormalDouble));
+ shouldAccept(subnormalFloaty, subnormalDouble - Math.ulp(subnormalDouble));
+ shouldNotAccept(subnormalFloaty, subnormalDouble + 2 * Math.ulp(subnormalDouble));
+ shouldNotAccept(subnormalFloaty, subnormalDouble - 2 * Math.ulp(subnormalDouble));
+ shouldNotAccept(subnormalFloaty, normalDouble);
+
+ // for normalFloaty
+ shouldAccept(normalFloaty, normalDouble);
+ shouldAccept(normalFloaty, normalDouble + Math.ulp(normalDouble));
+ shouldAccept(normalFloaty, normalDouble - Math.ulp(normalDouble));
+ shouldNotAccept(normalFloaty, subnormalDouble + 2 * Math.ulp(normalDouble));
+ shouldNotAccept(normalFloaty, subnormalDouble - 2 * Math.ulp(normalDouble));
+ shouldNotAccept(normalFloaty, subnormalDouble);
+ }
+
+ // Test Target that accepts precise 8192ulp error for double values.
+ public void testDouble8192Ulp() {
+ Target t = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, false);
+ t.setPrecision(8192, 8192);
+
+ Target.Floaty subnormalFloaty = t.new64(subnormalDouble);
+ Target.Floaty normalFloaty = t.new64(normalDouble);
+
+ // for subnormal
+ shouldAccept(subnormalFloaty, subnormalDouble);
+ shouldAccept(subnormalFloaty, subnormalDouble + 8192 * Math.ulp(subnormalDouble));
+ shouldAccept(subnormalFloaty, subnormalDouble - 8192 * Math.ulp(subnormalDouble));
+ shouldNotAccept(subnormalFloaty, subnormalDouble + 8193 * Math.ulp(subnormalDouble));
+ shouldNotAccept(subnormalFloaty, subnormalDouble - 8193 * Math.ulp(subnormalDouble));
+ shouldNotAccept(subnormalFloaty, normalDouble);
+
+ // for normalFloaty
+ shouldAccept(normalFloaty, normalDouble);
+ shouldAccept(normalFloaty, normalDouble + 8192 * Math.ulp(normalDouble));
+ shouldAccept(normalFloaty, normalDouble - 8192 * Math.ulp(normalDouble));
+ shouldNotAccept(normalFloaty, subnormalDouble + 8193 * Math.ulp(normalDouble));
+ shouldNotAccept(normalFloaty, subnormalDouble - 8193 * Math.ulp(normalDouble));
+ shouldNotAccept(normalFloaty, subnormalDouble);
+ }
+
+ // Test that range of allowed error is trimmed at the zero boundary. This function tests both
+ // float and double Targets.
+ public void testRangeDoesNotAcrossZero() {
+ Target t;
+ Target.Floaty floaty;
+
+ t = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, false);
+ t.setPrecision(4, 4);
+
+ floaty = t.new32(Float.MIN_VALUE);
+ shouldAccept(floaty, (double) Float.MIN_VALUE);
+ shouldAccept(floaty, (double) Float.MIN_VALUE + 4 * Float.MIN_VALUE);
+ shouldAccept(floaty, (double) 0.f);
+ shouldNotAccept(floaty, (double) 0.f - Float.MIN_VALUE);
+
+ floaty = t.new32(-Float.MIN_VALUE);
+ shouldAccept(floaty, (double) -Float.MIN_VALUE);
+ shouldAccept(floaty, (double) -Float.MIN_VALUE - 4 * Float.MIN_VALUE);
+ shouldAccept(floaty, (double) 0.f);
+ shouldNotAccept(floaty, (double) 0.f + Float.MIN_VALUE);
+
+ t = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, false);
+ t.setPrecision(4, 4);
+
+ floaty = t.new64(Double.MIN_VALUE);
+ shouldAccept(floaty, Double.MIN_VALUE);
+ shouldAccept(floaty, Double.MIN_VALUE + 4 * Double.MIN_VALUE);
+ shouldAccept(floaty, 0.f);
+ shouldNotAccept(floaty, 0.f - Double.MIN_VALUE);
+
+ floaty = t.new64(-Double.MIN_VALUE);
+ shouldAccept(floaty, -Double.MIN_VALUE);
+ shouldAccept(floaty, -Double.MIN_VALUE - 4 * Double.MIN_VALUE);
+ shouldAccept(floaty, 0.f);
+ shouldNotAccept(floaty, 0.f + Double.MIN_VALUE);
+ }
+}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/Target.java b/tests/tests/renderscript/src/android/renderscript/cts/Target.java
index c423792..556c95f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/Target.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/Target.java
@@ -28,6 +28,31 @@
*/
public class Target {
/**
+ * Broad classification of the type of function being tested.
+ */
+ public enum FunctionType {
+ NORMAL,
+ HALF,
+ NATIVE,
+ FAST,
+ }
+
+ /**
+ * Floating point precision of the result of the function being tested.
+ */
+ public enum ReturnType {
+ HALF,
+ FLOAT,
+ DOUBLE
+ }
+
+ /* The classification of the function being tested */
+ private FunctionType mFunctionType;
+
+ /* The floating point precision of the result of the function being tested */
+ private ReturnType mReturnType;
+
+ /*
* In relaxed precision mode, we allow:
* - less precision in the computation
* - using only normalized values
@@ -36,18 +61,8 @@
*/
private boolean mIsRelaxedPrecision;
- /*
- * The following two fields are set just before the expected values are computed for a specific
- * RenderScript function. Hence, we can't use one instance of this class to test two APIs
- * in parallel. The generated Test*.java code uses one instance of Target per test, so we're
- * safe.
- */
-
- /**
- * For native, we allow the same things as relaxed precision, plus:
- * - operations don't have to return +/- infinity
- */
- private boolean mIsNative;
+ /* If false, zero or the closest normal value are also accepted for subnormal results. */
+ private boolean mHandleSubnormal;
/**
* How much we'll allow the values tested to diverge from the values
@@ -55,16 +70,30 @@
*/
private int mUlpFactor;
- Target(boolean relaxed) {
+ Target(FunctionType functionType, ReturnType returnType, boolean relaxed) {
+ mFunctionType = functionType;
+ mReturnType = returnType;
mIsRelaxedPrecision = relaxed;
+
+ if (mReturnType == ReturnType.HALF) {
+ // Subnormal numbers need not be handled for HALF.
+ mHandleSubnormal = false;
+ } else if (mReturnType == ReturnType.FLOAT) {
+ // NORMAL functions, when in non-relaxed mode, need to handle subnormals. Subnormals
+ // need not be handled in any other mode.
+ mHandleSubnormal = (mFunctionType == FunctionType.NORMAL) && !relaxed;
+ } else if (mReturnType == ReturnType.DOUBLE) {
+ // We only have NORMAL functions for DOUBLE and they need to handle subnormal values.
+ assert(mFunctionType == FunctionType.NORMAL);
+ mHandleSubnormal = true;
+ }
}
/**
* Sets whether we are testing a native_* function and how many ulp we allow
* for full and relaxed precision.
*/
- void setPrecision(int fullUlpFactor, int relaxedUlpFactor, boolean isNative) {
- mIsNative = isNative;
+ void setPrecision(int fullUlpFactor, int relaxedUlpFactor) {
mUlpFactor = mIsRelaxedPrecision ? relaxedUlpFactor : fullUlpFactor;
}
@@ -287,7 +316,7 @@
// For relaxed mode, we don't require support of subnormal values.
// If we have a subnormal value, we'll allow both the normalized value and zero,
// to cover the two ways this small value might be handled.
- if (mIsRelaxedPrecision || mIsNative) {
+ if (!mHandleSubnormal) {
if (IsSubnormal(f)) {
updateMinAndMax(0.f);
updateMinAndMax(smallestNormal(f));
@@ -349,7 +378,7 @@
mMinValue = newValue;
}
// If subnormal, also allow the normalized value if it's smaller.
- if ((mIsRelaxedPrecision || mIsNative) && IsSubnormal(mMinValue)) {
+ if (!mHandleSubnormal && IsSubnormal(mMinValue)) {
if (mMinValue < 0) {
mMinValue = smallestNormal(-1.0f);
} else {
@@ -384,7 +413,7 @@
mMaxValue = newValue;
}
// If subnormal, also allow the normalized value if it's smaller.
- if ((mIsRelaxedPrecision || mIsNative) && IsSubnormal(mMaxValue)) {
+ if (!mHandleSubnormal && IsSubnormal(mMaxValue)) {
if (mMaxValue > 0) {
mMaxValue = smallestNormal(1.0f);
} else {
@@ -423,7 +452,7 @@
} else {
u = Math.ulp(mMaxValue);
}
- if (mIsRelaxedPrecision || mIsNative) {
+ if (!mHandleSubnormal) {
u = Math.max(u, smallestNormal(1.f));
}
return u;
@@ -437,7 +466,7 @@
} else {
u = -Math.ulp(mMinValue);
}
- if (mIsRelaxedPrecision || mIsNative) {
+ if (!mHandleSubnormal) {
u = Math.min(u, smallestNormal(-1.f));
}
return u;
@@ -469,7 +498,7 @@
}
// For native, we don't require returning +/- infinity. If that's what we expect,
// allow all answers.
- if (mIsNative) {
+ if (mFunctionType == FunctionType.NATIVE) {
if (mMinValue == Double.NEGATIVE_INFINITY &&
mMaxValue == Double.NEGATIVE_INFINITY) {
return true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAbs.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAbs.java
index ecc5319..0ab7c31 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAbs.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAbs.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAcos.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAcos.java
index a08c9b0..aa22c0a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAcos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAcos.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAcos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAcos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAcos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAcos(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAcosh.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAcosh.java
index 743da9a..e5e3766 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAcosh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAcosh.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAcospi.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAcospi.java
index 4bc0f9a..2287fc7 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAcospi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAcospi.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAsin.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAsin.java
index 6a49d0a..53ec3c5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAsin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAsin.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAsin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAsin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAsin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAsin(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAsinh.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAsinh.java
index 701d03a..d14dc53 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAsinh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAsinh.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAsinpi.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAsinpi.java
index 3c46013..8f4a825 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAsinpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAsinpi.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtan.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtan.java
index 84d2bb1..1bbc4dc 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtan.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtan.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtan(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtan(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtan(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtan(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtan2.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtan2.java
index cc33c23..6ea47d5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtan2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtan2.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inNumerator = arrayInNumerator[i];
args.inDenominator = arrayInDenominator[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inNumerator = arrayInNumerator[i * 2 + j];
args.inDenominator = arrayInDenominator[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inNumerator = arrayInNumerator[i * 4 + j];
args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inNumerator = arrayInNumerator[i * 4 + j];
args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtan2pi.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtan2pi.java
index a921273..6068cea 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtan2pi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtan2pi.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inNumerator = arrayInNumerator[i];
args.inDenominator = arrayInDenominator[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inNumerator = arrayInNumerator[i * 2 + j];
args.inDenominator = arrayInDenominator[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inNumerator = arrayInNumerator[i * 4 + j];
args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inNumerator = arrayInNumerator[i * 4 + j];
args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtanh.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtanh.java
index a9617e7..feebf49 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtanh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtanh.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtanpi.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtanpi.java
index 44e5dba..d38e400 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtanpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestAtanpi.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCbrt.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCbrt.java
index 1e3515a..bfd98e6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCbrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCbrt.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCeil.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCeil.java
index 3dbbc15..e5e0f6b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCeil.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCeil.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCeil(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCeil(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCeil(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCeil(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestClamp.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestClamp.java
index 7028410..8f9b5e4 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestClamp.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestClamp.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -91,7 +92,7 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeClamp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -181,7 +182,7 @@
args.inMinValue = arrayInMinValue[i * 2 + j];
args.inMaxValue = arrayInMaxValue[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeClamp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -271,7 +272,7 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeClamp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -361,7 +362,7 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeClamp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -451,7 +452,7 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeClamp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -541,7 +542,7 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeClamp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -631,7 +632,7 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeClamp(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestClz.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestClz.java
index c29e3ec..fac24c9 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestClz.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestClz.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestConvert.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestConvert.java
index ae72af6..464200d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestConvert.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestConvert.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -286,7 +287,7 @@
ArgumentsCharFloat args = new ArgumentsCharFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -355,7 +356,7 @@
ArgumentsCharFloat args = new ArgumentsCharFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -424,7 +425,7 @@
ArgumentsCharFloat args = new ArgumentsCharFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -498,7 +499,7 @@
ArgumentsUcharFloat args = new ArgumentsUcharFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -567,7 +568,7 @@
ArgumentsUcharFloat args = new ArgumentsUcharFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -636,7 +637,7 @@
ArgumentsUcharFloat args = new ArgumentsUcharFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -710,7 +711,7 @@
ArgumentsShortFloat args = new ArgumentsShortFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -779,7 +780,7 @@
ArgumentsShortFloat args = new ArgumentsShortFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -848,7 +849,7 @@
ArgumentsShortFloat args = new ArgumentsShortFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -922,7 +923,7 @@
ArgumentsUshortFloat args = new ArgumentsUshortFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -991,7 +992,7 @@
ArgumentsUshortFloat args = new ArgumentsUshortFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -1060,7 +1061,7 @@
ArgumentsUshortFloat args = new ArgumentsUshortFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -1134,7 +1135,7 @@
ArgumentsIntFloat args = new ArgumentsIntFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -1203,7 +1204,7 @@
ArgumentsIntFloat args = new ArgumentsIntFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -1272,7 +1273,7 @@
ArgumentsIntFloat args = new ArgumentsIntFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -1346,7 +1347,7 @@
ArgumentsUintFloat args = new ArgumentsUintFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -1415,7 +1416,7 @@
ArgumentsUintFloat args = new ArgumentsUintFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -1484,7 +1485,7 @@
ArgumentsUintFloat args = new ArgumentsUintFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -10336,7 +10337,7 @@
ArgumentsDoubleDouble args = new ArgumentsDoubleDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -10405,7 +10406,7 @@
ArgumentsDoubleDouble args = new ArgumentsDoubleDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -10474,7 +10475,7 @@
ArgumentsDoubleDouble args = new ArgumentsDoubleDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -10548,7 +10549,7 @@
ArgumentsLongDouble args = new ArgumentsLongDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -10617,7 +10618,7 @@
ArgumentsLongDouble args = new ArgumentsLongDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -10686,7 +10687,7 @@
ArgumentsLongDouble args = new ArgumentsLongDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -10760,7 +10761,7 @@
ArgumentsUlongDouble args = new ArgumentsUlongDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -10829,7 +10830,7 @@
ArgumentsUlongDouble args = new ArgumentsUlongDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -10898,7 +10899,7 @@
ArgumentsUlongDouble args = new ArgumentsUlongDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -12226,7 +12227,7 @@
ArgumentsDoubleFloat args = new ArgumentsDoubleFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -12295,7 +12296,7 @@
ArgumentsDoubleFloat args = new ArgumentsDoubleFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -12364,7 +12365,7 @@
ArgumentsDoubleFloat args = new ArgumentsDoubleFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -12438,7 +12439,7 @@
ArgumentsLongFloat args = new ArgumentsLongFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -12507,7 +12508,7 @@
ArgumentsLongFloat args = new ArgumentsLongFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -12576,7 +12577,7 @@
ArgumentsLongFloat args = new ArgumentsLongFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -12650,7 +12651,7 @@
ArgumentsUlongFloat args = new ArgumentsUlongFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -12719,7 +12720,7 @@
ArgumentsUlongFloat args = new ArgumentsUlongFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -12788,7 +12789,7 @@
ArgumentsUlongFloat args = new ArgumentsUlongFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -16624,7 +16625,7 @@
ArgumentsFloatDouble args = new ArgumentsFloatDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -16693,7 +16694,7 @@
ArgumentsFloatDouble args = new ArgumentsFloatDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -16762,7 +16763,7 @@
ArgumentsFloatDouble args = new ArgumentsFloatDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -16836,7 +16837,7 @@
ArgumentsCharDouble args = new ArgumentsCharDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -16905,7 +16906,7 @@
ArgumentsCharDouble args = new ArgumentsCharDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -16974,7 +16975,7 @@
ArgumentsCharDouble args = new ArgumentsCharDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -17048,7 +17049,7 @@
ArgumentsUcharDouble args = new ArgumentsUcharDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -17117,7 +17118,7 @@
ArgumentsUcharDouble args = new ArgumentsUcharDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -17186,7 +17187,7 @@
ArgumentsUcharDouble args = new ArgumentsUcharDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -17260,7 +17261,7 @@
ArgumentsShortDouble args = new ArgumentsShortDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -17329,7 +17330,7 @@
ArgumentsShortDouble args = new ArgumentsShortDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -17398,7 +17399,7 @@
ArgumentsShortDouble args = new ArgumentsShortDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -17472,7 +17473,7 @@
ArgumentsUshortDouble args = new ArgumentsUshortDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -17541,7 +17542,7 @@
ArgumentsUshortDouble args = new ArgumentsUshortDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -17610,7 +17611,7 @@
ArgumentsUshortDouble args = new ArgumentsUshortDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -17684,7 +17685,7 @@
ArgumentsIntDouble args = new ArgumentsIntDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -17753,7 +17754,7 @@
ArgumentsIntDouble args = new ArgumentsIntDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -17822,7 +17823,7 @@
ArgumentsIntDouble args = new ArgumentsIntDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -17896,7 +17897,7 @@
ArgumentsUintDouble args = new ArgumentsUintDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -17965,7 +17966,7 @@
ArgumentsUintDouble args = new ArgumentsUintDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
@@ -18034,7 +18035,7 @@
ArgumentsUintDouble args = new ArgumentsUintDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.DOUBLE, relaxed);
CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCopysign.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCopysign.java
index d4abf83..be650c5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCopysign.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCopysign.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inMagnitudeValue = arrayInMagnitudeValue[i];
args.inSignValue = arrayInSignValue[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCopysign(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inMagnitudeValue = arrayInMagnitudeValue[i * 2 + j];
args.inSignValue = arrayInSignValue[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCopysign(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inMagnitudeValue = arrayInMagnitudeValue[i * 4 + j];
args.inSignValue = arrayInSignValue[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCopysign(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inMagnitudeValue = arrayInMagnitudeValue[i * 4 + j];
args.inSignValue = arrayInSignValue[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCopysign(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCos.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCos.java
index 8369ec9..4b7751b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCos.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCos(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCosh.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCosh.java
index d156408..0740285 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCosh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCosh.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCosh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCosh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCosh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCosh(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCospi.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCospi.java
index 2e28c03..dab5d2f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCospi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCospi.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCospi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCospi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCospi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCospi(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCross.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCross.java
index 5062f62..31927b1 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCross.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestCross.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -88,7 +89,7 @@
for (int j = 0; j < 3 ; j++) {
args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCross(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -179,7 +180,7 @@
for (int j = 0; j < 4 ; j++) {
args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeCross(args, target);
// Compare the expected outputs to the actual values returned by RS.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestDegrees.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestDegrees.java
index cb90de3..c5928b7 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestDegrees.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestDegrees.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeDegrees(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeDegrees(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeDegrees(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeDegrees(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestDistance.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestDistance.java
index 452b25c..c527040 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestDistance.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestDistance.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -81,7 +82,7 @@
// Fill args with the input values
args.inLeftVector = arrayInLeftVector[i];
args.inRightVector = arrayInRightVector[i];
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -169,7 +170,7 @@
for (int j = 0; j < 2 ; j++) {
args.inRightVector[j] = arrayInRightVector[i * 2 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -255,7 +256,7 @@
for (int j = 0; j < 3 ; j++) {
args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -341,7 +342,7 @@
for (int j = 0; j < 4 ; j++) {
args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestDot.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestDot.java
index 2b92390..2385856 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestDot.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestDot.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -81,7 +82,7 @@
// Fill args with the input values
args.inLeftVector = arrayInLeftVector[i];
args.inRightVector = arrayInRightVector[i];
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeDot(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -169,7 +170,7 @@
for (int j = 0; j < 2 ; j++) {
args.inRightVector[j] = arrayInRightVector[i * 2 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeDot(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -255,7 +256,7 @@
for (int j = 0; j < 3 ; j++) {
args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeDot(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -341,7 +342,7 @@
for (int j = 0; j < 4 ; j++) {
args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeDot(args, target);
// Compare the expected outputs to the actual values returned by RS.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestErf.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestErf.java
index 0147b325..b36c5e5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestErf.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestErf.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeErf(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeErf(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeErf(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeErf(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestErfc.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestErfc.java
index 9acd955..8b73a82 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestErfc.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestErfc.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeErfc(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeErfc(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeErfc(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeErfc(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExp.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExp.java
index 2b46ee4..556331d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExp.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExp.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExp(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExp10.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExp10.java
index f1e73b7..12a1f8a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExp10.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExp10.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExp10(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExp10(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExp10(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExp10(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExp2.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExp2.java
index ac08d0f..a8d7520 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExp2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExp2.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExp2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExp2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExp2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExp2(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExpm1.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExpm1.java
index 0f0ed83..2b72471 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExpm1.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestExpm1.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFabs.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFabs.java
index 698c198..3421871 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFabs.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFabs.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFabs(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFabs(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFabs(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFabs(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFastDistance.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFastDistance.java
index 40436d5..4c7a065 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFastDistance.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFastDistance.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -81,7 +82,7 @@
// Fill args with the input values
args.inLeftVector = arrayInLeftVector[i];
args.inRightVector = arrayInRightVector[i];
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.FAST, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFastDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -169,7 +170,7 @@
for (int j = 0; j < 2 ; j++) {
args.inRightVector[j] = arrayInRightVector[i * 2 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.FAST, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFastDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -255,7 +256,7 @@
for (int j = 0; j < 3 ; j++) {
args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.FAST, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFastDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -341,7 +342,7 @@
for (int j = 0; j < 4 ; j++) {
args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.FAST, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFastDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFastLength.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFastLength.java
index a6ea42e..e2cb9a9 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFastLength.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFastLength.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -73,7 +74,7 @@
// Create the appropriate sized arrays in args
// Fill args with the input values
args.inV = arrayInV[i];
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.FAST, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFastLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -147,7 +148,7 @@
for (int j = 0; j < 2 ; j++) {
args.inV[j] = arrayInV[i * 2 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.FAST, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFastLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -218,7 +219,7 @@
for (int j = 0; j < 3 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.FAST, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFastLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -289,7 +290,7 @@
for (int j = 0; j < 4 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.FAST, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFastLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFastNormalize.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFastNormalize.java
index 8bc5c8c..31193e7 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFastNormalize.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFastNormalize.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -73,7 +74,7 @@
// Create the appropriate sized arrays in args
// Fill args with the input values
args.inV = arrayInV[i];
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.FAST, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFastNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -148,7 +149,7 @@
for (int j = 0; j < 2 ; j++) {
args.inV[j] = arrayInV[i * 2 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.FAST, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFastNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -224,7 +225,7 @@
for (int j = 0; j < 3 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.FAST, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFastNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -300,7 +301,7 @@
for (int j = 0; j < 4 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.FAST, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFastNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFdim.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFdim.java
index 660eac2..1dea48f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFdim.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFdim.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inA = arrayInA[i];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFdim(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inA = arrayInA[i * 2 + j];
args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFdim(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFdim(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFdim(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFloor.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFloor.java
index 962858b..96c70b9 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFloor.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFloor.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFloor(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFloor(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFloor(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFloor(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFma.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFma.java
index f6df612..cd02537 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFma.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFma.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -90,7 +91,7 @@
args.inMultiplicand2 = arrayInMultiplicand2[i];
args.inOffset = arrayInOffset[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFma(args, target);
// Validate the outputs.
boolean valid = true;
@@ -179,7 +180,7 @@
args.inMultiplicand2 = arrayInMultiplicand2[i * 2 + j];
args.inOffset = arrayInOffset[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFma(args, target);
// Validate the outputs.
boolean valid = true;
@@ -268,7 +269,7 @@
args.inMultiplicand2 = arrayInMultiplicand2[i * 4 + j];
args.inOffset = arrayInOffset[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFma(args, target);
// Validate the outputs.
boolean valid = true;
@@ -357,7 +358,7 @@
args.inMultiplicand2 = arrayInMultiplicand2[i * 4 + j];
args.inOffset = arrayInOffset[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFma(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFmax.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFmax.java
index 07453c1..5b8d11e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFmax.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFmax.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inA = arrayInA[i];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmax(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inA = arrayInA[i * 2 + j];
args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmax(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmax(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmax(args, target);
// Validate the outputs.
boolean valid = true;
@@ -398,7 +399,7 @@
args.inA = arrayInA[i * 2 + j];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmax(args, target);
// Validate the outputs.
boolean valid = true;
@@ -477,7 +478,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmax(args, target);
// Validate the outputs.
boolean valid = true;
@@ -556,7 +557,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmax(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFmin.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFmin.java
index 9d67357..7ce9ce6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFmin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFmin.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inA = arrayInA[i];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inA = arrayInA[i * 2 + j];
args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -398,7 +399,7 @@
args.inA = arrayInA[i * 2 + j];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -477,7 +478,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -556,7 +557,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmin(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFmod.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFmod.java
index 10b6781..cdbd1ec 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFmod.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFmod.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inNumerator = arrayInNumerator[i];
args.inDenominator = arrayInDenominator[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmod(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inNumerator = arrayInNumerator[i * 2 + j];
args.inDenominator = arrayInDenominator[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmod(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inNumerator = arrayInNumerator[i * 4 + j];
args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmod(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inNumerator = arrayInNumerator[i * 4 + j];
args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFmod(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFract.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFract.java
index fc1117b..4040b43 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFract.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFract.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
@@ -170,7 +171,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
@@ -258,7 +259,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
@@ -346,7 +347,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
@@ -432,7 +433,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
@@ -501,7 +502,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
@@ -570,7 +571,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
@@ -639,7 +640,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFrexp.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFrexp.java
index 0716dff..c4f9c33 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFrexp.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestFrexp.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFrexp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -170,7 +171,7 @@
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFrexp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -258,7 +259,7 @@
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFrexp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -346,7 +347,7 @@
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeFrexp(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHalfRecip.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHalfRecip.java
index 256ebb4..f60f372 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHalfRecip.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHalfRecip.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.HALF, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHalfRecip(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.HALF, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHalfRecip(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.HALF, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHalfRecip(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.HALF, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHalfRecip(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHalfRsqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHalfRsqrt.java
index 6ac7aff..072ba59 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHalfRsqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHalfRsqrt.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.HALF, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHalfRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.HALF, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHalfRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.HALF, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHalfRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.HALF, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHalfRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHalfSqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHalfSqrt.java
index 9700a02..04e191e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHalfSqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHalfSqrt.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.HALF, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHalfSqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.HALF, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHalfSqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.HALF, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHalfSqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.HALF, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHalfSqrt(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHypot.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHypot.java
index 1dff70e..e0144b8 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHypot.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestHypot.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inA = arrayInA[i];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHypot(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inA = arrayInA[i * 2 + j];
args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHypot(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHypot(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeHypot(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestIlogb.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestIlogb.java
index 61a417c..329a759 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestIlogb.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestIlogb.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLdexp.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLdexp.java
index 635e6db..2bcc552 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLdexp.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLdexp.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inMantissa = arrayInMantissa[i];
args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLdexp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inMantissa = arrayInMantissa[i * 2 + j];
args.inExponent = arrayInExponent[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLdexp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inMantissa = arrayInMantissa[i * 4 + j];
args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLdexp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inMantissa = arrayInMantissa[i * 4 + j];
args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLdexp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -398,7 +399,7 @@
args.inMantissa = arrayInMantissa[i * 2 + j];
args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLdexp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -477,7 +478,7 @@
args.inMantissa = arrayInMantissa[i * 4 + j];
args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLdexp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -556,7 +557,7 @@
args.inMantissa = arrayInMantissa[i * 4 + j];
args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLdexp(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLength.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLength.java
index 4beb4db..db9c4c0 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLength.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLength.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -73,7 +74,7 @@
// Create the appropriate sized arrays in args
// Fill args with the input values
args.inV = arrayInV[i];
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -147,7 +148,7 @@
for (int j = 0; j < 2 ; j++) {
args.inV[j] = arrayInV[i * 2 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -218,7 +219,7 @@
for (int j = 0; j < 3 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -289,7 +290,7 @@
for (int j = 0; j < 4 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLgamma.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLgamma.java
index 1b65459..d1eaa9f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLgamma.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLgamma.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLgamma(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLgamma(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLgamma(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLgamma(args, target);
// Validate the outputs.
boolean valid = true;
@@ -366,7 +367,7 @@
args.outSignOfGamma = arrayOutSignOfGamma[i * 1 + j];
args.out = arrayOut[i * 1 + j];
// Ask the CoreMathVerifier to validate.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
String errorMessage = CoreMathVerifier.verifyLgamma(args, target);
boolean valid = errorMessage == null;
if (!valid) {
@@ -439,7 +440,7 @@
args.outSignOfGamma = arrayOutSignOfGamma[i * 2 + j];
args.out = arrayOut[i * 2 + j];
// Ask the CoreMathVerifier to validate.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
String errorMessage = CoreMathVerifier.verifyLgamma(args, target);
boolean valid = errorMessage == null;
if (!valid) {
@@ -512,7 +513,7 @@
args.outSignOfGamma = arrayOutSignOfGamma[i * 4 + j];
args.out = arrayOut[i * 4 + j];
// Ask the CoreMathVerifier to validate.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
String errorMessage = CoreMathVerifier.verifyLgamma(args, target);
boolean valid = errorMessage == null;
if (!valid) {
@@ -585,7 +586,7 @@
args.outSignOfGamma = arrayOutSignOfGamma[i * 4 + j];
args.out = arrayOut[i * 4 + j];
// Ask the CoreMathVerifier to validate.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
String errorMessage = CoreMathVerifier.verifyLgamma(args, target);
boolean valid = errorMessage == null;
if (!valid) {
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog.java
index d8166b5..64a91b2 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog10.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog10.java
index 9a22615..d01ec9e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog10.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog10.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog10(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog10(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog10(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog10(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog1p.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog1p.java
index b943262..405ef89 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog1p.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog1p.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog2.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog2.java
index 211abe8..fce95f2 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLog2.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLog2(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLogb.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLogb.java
index e92f1f2..f176573 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLogb.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestLogb.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLogb(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLogb(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLogb(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeLogb(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMad.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMad.java
index a9578ca..f905f98 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMad.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMad.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -90,7 +91,7 @@
args.inMultiplicand2 = arrayInMultiplicand2[i];
args.inOffset = arrayInOffset[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMad(args, target);
// Validate the outputs.
boolean valid = true;
@@ -179,7 +180,7 @@
args.inMultiplicand2 = arrayInMultiplicand2[i * 2 + j];
args.inOffset = arrayInOffset[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMad(args, target);
// Validate the outputs.
boolean valid = true;
@@ -268,7 +269,7 @@
args.inMultiplicand2 = arrayInMultiplicand2[i * 4 + j];
args.inOffset = arrayInOffset[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMad(args, target);
// Validate the outputs.
boolean valid = true;
@@ -357,7 +358,7 @@
args.inMultiplicand2 = arrayInMultiplicand2[i * 4 + j];
args.inOffset = arrayInOffset[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMad(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMax.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMax.java
index 9fa4646..61a8292 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMax.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMax.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inA = arrayInA[i];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMax(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inA = arrayInA[i * 2 + j];
args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMax(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMax(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMax(args, target);
// Validate the outputs.
boolean valid = true;
@@ -398,7 +399,7 @@
args.inA = arrayInA[i * 2 + j];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMax(args, target);
// Validate the outputs.
boolean valid = true;
@@ -477,7 +478,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMax(args, target);
// Validate the outputs.
boolean valid = true;
@@ -556,7 +557,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMax(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMin.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMin.java
index cb9089d..28fea4e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMin.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inA = arrayInA[i];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inA = arrayInA[i * 2 + j];
args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -398,7 +399,7 @@
args.inA = arrayInA[i * 2 + j];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -477,7 +478,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -556,7 +557,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMin(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMix.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMix.java
index fe0bc81..cc14f0e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMix.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestMix.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -90,7 +91,7 @@
args.inStop = arrayInStop[i];
args.inFraction = arrayInFraction[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMix(args, target);
// Validate the outputs.
boolean valid = true;
@@ -179,7 +180,7 @@
args.inStop = arrayInStop[i * 2 + j];
args.inFraction = arrayInFraction[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMix(args, target);
// Validate the outputs.
boolean valid = true;
@@ -268,7 +269,7 @@
args.inStop = arrayInStop[i * 4 + j];
args.inFraction = arrayInFraction[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMix(args, target);
// Validate the outputs.
boolean valid = true;
@@ -357,7 +358,7 @@
args.inStop = arrayInStop[i * 4 + j];
args.inFraction = arrayInFraction[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMix(args, target);
// Validate the outputs.
boolean valid = true;
@@ -446,7 +447,7 @@
args.inStop = arrayInStop[i * 2 + j];
args.inFraction = arrayInFraction[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMix(args, target);
// Validate the outputs.
boolean valid = true;
@@ -535,7 +536,7 @@
args.inStop = arrayInStop[i * 4 + j];
args.inFraction = arrayInFraction[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMix(args, target);
// Validate the outputs.
boolean valid = true;
@@ -624,7 +625,7 @@
args.inStop = arrayInStop[i * 4 + j];
args.inFraction = arrayInFraction[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeMix(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestModf.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestModf.java
index d3a55b2..d45efc4 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestModf.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestModf.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeModf(args, target);
// Validate the outputs.
boolean valid = true;
@@ -170,7 +171,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeModf(args, target);
// Validate the outputs.
boolean valid = true;
@@ -258,7 +259,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeModf(args, target);
// Validate the outputs.
boolean valid = true;
@@ -346,7 +347,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeModf(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNan.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNan.java
index 526d0e5..6558ab3 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNan.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNan.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsUintFloat args = new ArgumentsUintFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNan(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAcos.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAcos.java
index 74d41ff..24059a1 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAcos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAcos.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAcos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAcos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAcos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAcos(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAcosh.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAcosh.java
index 20dd367..561419c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAcosh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAcosh.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAcospi.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAcospi.java
index a65353e..02625f8 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAcospi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAcospi.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAsin.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAsin.java
index 4f25bb6..513147f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAsin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAsin.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAsin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAsin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAsin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAsin(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAsinh.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAsinh.java
index d5dbf84..ebdb5de 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAsinh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAsinh.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAsinpi.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAsinpi.java
index da09481..e0acde3 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAsinpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAsinpi.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtan.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtan.java
index 9f6091d4..54b52cd 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtan.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtan.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtan(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtan(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtan(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtan(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtan2.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtan2.java
index 16dd8af..63569fd 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtan2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtan2.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inNumerator = arrayInNumerator[i];
args.inDenominator = arrayInDenominator[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inNumerator = arrayInNumerator[i * 2 + j];
args.inDenominator = arrayInDenominator[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inNumerator = arrayInNumerator[i * 4 + j];
args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inNumerator = arrayInNumerator[i * 4 + j];
args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtan2pi.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtan2pi.java
index 01eab0b..c12db90 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtan2pi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtan2pi.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inNumerator = arrayInNumerator[i];
args.inDenominator = arrayInDenominator[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inNumerator = arrayInNumerator[i * 2 + j];
args.inDenominator = arrayInDenominator[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inNumerator = arrayInNumerator[i * 4 + j];
args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inNumerator = arrayInNumerator[i * 4 + j];
args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtanh.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtanh.java
index 4daa06d..72009d6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtanh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtanh.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtanpi.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtanpi.java
index 7de17cd..f3c64c6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtanpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeAtanpi.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCbrt.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCbrt.java
index 6982ef8..1a98da2 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCbrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCbrt.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCos.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCos.java
index caa8b2aa..51b85fa 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCos.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCos(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCosh.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCosh.java
index b0ae753..c9918d2 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCosh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCosh.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCosh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCosh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCosh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCosh(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCospi.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCospi.java
index cb9029a..bbefc75 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCospi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeCospi.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCospi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCospi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCospi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeCospi(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeDistance.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeDistance.java
index ca81d70..bf4f898 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeDistance.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeDistance.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -81,7 +82,7 @@
// Fill args with the input values
args.inLeftVector = arrayInLeftVector[i];
args.inRightVector = arrayInRightVector[i];
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -169,7 +170,7 @@
for (int j = 0; j < 2 ; j++) {
args.inRightVector[j] = arrayInRightVector[i * 2 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -255,7 +256,7 @@
for (int j = 0; j < 3 ; j++) {
args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -341,7 +342,7 @@
for (int j = 0; j < 4 ; j++) {
args.inRightVector[j] = arrayInRightVector[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeDivide.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeDivide.java
index 0784402..4c864e6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeDivide.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeDivide.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inLeftVector = arrayInLeftVector[i];
args.inRightVector = arrayInRightVector[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeDivide(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inLeftVector = arrayInLeftVector[i * 2 + j];
args.inRightVector = arrayInRightVector[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeDivide(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inLeftVector = arrayInLeftVector[i * 4 + j];
args.inRightVector = arrayInRightVector[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeDivide(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inLeftVector = arrayInLeftVector[i * 4 + j];
args.inRightVector = arrayInRightVector[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeDivide(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExp.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExp.java
index 7ddbcb8..edef95d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExp.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExp.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExp(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExp(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExp10.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExp10.java
index dd630e3..84dbdae 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExp10.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExp10.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExp10(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExp10(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExp10(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExp10(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExp2.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExp2.java
index 420a9ca..094fa1d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExp2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExp2.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExp2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExp2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExp2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExp2(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExpm1.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExpm1.java
index 6fd7013..edae2df 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExpm1.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeExpm1.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeHypot.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeHypot.java
index 360ceb4..a6f1c7f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeHypot.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeHypot.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inA = arrayInA[i];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeHypot(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inA = arrayInA[i * 2 + j];
args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeHypot(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeHypot(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeHypot(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLength.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLength.java
index efd6598..e6ba53d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLength.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLength.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -73,7 +74,7 @@
// Create the appropriate sized arrays in args
// Fill args with the input values
args.inV = arrayInV[i];
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -147,7 +148,7 @@
for (int j = 0; j < 2 ; j++) {
args.inV[j] = arrayInV[i * 2 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -218,7 +219,7 @@
for (int j = 0; j < 3 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -289,7 +290,7 @@
for (int j = 0; j < 4 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog.java
index acca159..c9dd50e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog10.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog10.java
index b21baad..a5cf87f5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog10.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog10.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog10(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog10(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog10(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog10(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog1p.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog1p.java
index 54a6472..5e1d2c5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog1p.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog1p.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog2.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog2.java
index 826bcd1..402a746 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeLog2.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog2(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeLog2(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeNormalize.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeNormalize.java
index 8601374..10efcf0 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeNormalize.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeNormalize.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -73,7 +74,7 @@
// Create the appropriate sized arrays in args
// Fill args with the input values
args.inV = arrayInV[i];
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -148,7 +149,7 @@
for (int j = 0; j < 2 ; j++) {
args.inV[j] = arrayInV[i * 2 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -224,7 +225,7 @@
for (int j = 0; j < 3 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -300,7 +301,7 @@
for (int j = 0; j < 4 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativePowr.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativePowr.java
index f4a8f73..c1ef937 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativePowr.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativePowr.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inBase = arrayInBase[i];
args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativePowr(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inBase = arrayInBase[i * 2 + j];
args.inExponent = arrayInExponent[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativePowr(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inBase = arrayInBase[i * 4 + j];
args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativePowr(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inBase = arrayInBase[i * 4 + j];
args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativePowr(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeRecip.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeRecip.java
index 908a12c..c78885b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeRecip.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeRecip.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeRecip(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeRecip(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeRecip(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeRecip(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeRootn.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeRootn.java
index 03b9d86..8143573 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeRootn.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeRootn.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inV = arrayInV[i];
args.inN = arrayInN[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeRootn(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inV = arrayInV[i * 2 + j];
args.inN = arrayInN[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeRootn(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inV = arrayInV[i * 4 + j];
args.inN = arrayInN[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeRootn(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inV = arrayInV[i * 4 + j];
args.inN = arrayInN[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeRootn(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeRsqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeRsqrt.java
index 49ecddf..6e7389d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeRsqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeRsqrt.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSin.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSin.java
index e2328ab..0f6d59e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSin.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSin(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSincos.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSincos.java
index a46ede7..50776e3 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSincos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSincos.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSincos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -170,7 +171,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSincos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -258,7 +259,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSincos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -346,7 +347,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSincos(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSinh.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSinh.java
index 4418f7e..99b8c44 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSinh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSinh.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSinh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSinh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSinh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSinh(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSinpi.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSinpi.java
index f18a611..6d6b552 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSinpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSinpi.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSqrt.java
index 4592144..b280792 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeSqrt.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeTan.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeTan.java
index 02e8613..c6c32b6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeTan.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeTan.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeTan(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeTan(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeTan(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeTan(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeTanh.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeTanh.java
index 5806307..2898543 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeTanh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeTanh.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeTanh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeTanh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeTanh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeTanh(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeTanpi.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeTanpi.java
index fcf4ab4..90afaa9 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeTanpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNativeTanpi.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NATIVE, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNativeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNextafter.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNextafter.java
index b154ed0..596909f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNextafter.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNextafter.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inV = arrayInV[i];
args.inTarget = arrayInTarget[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNextafter(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inV = arrayInV[i * 2 + j];
args.inTarget = arrayInTarget[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNextafter(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inV = arrayInV[i * 4 + j];
args.inTarget = arrayInTarget[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNextafter(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inV = arrayInV[i * 4 + j];
args.inTarget = arrayInTarget[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNextafter(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNormalize.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNormalize.java
index e2d65b2..567abe8 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNormalize.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestNormalize.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -73,7 +74,7 @@
// Create the appropriate sized arrays in args
// Fill args with the input values
args.inV = arrayInV[i];
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -148,7 +149,7 @@
for (int j = 0; j < 2 ; j++) {
args.inV[j] = arrayInV[i * 2 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -224,7 +225,7 @@
for (int j = 0; j < 3 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
@@ -300,7 +301,7 @@
for (int j = 0; j < 4 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestPow.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestPow.java
index 13443a3..660df1b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestPow.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestPow.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inBase = arrayInBase[i];
args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computePow(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inBase = arrayInBase[i * 2 + j];
args.inExponent = arrayInExponent[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computePow(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inBase = arrayInBase[i * 4 + j];
args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computePow(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inBase = arrayInBase[i * 4 + j];
args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computePow(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestPown.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestPown.java
index ad1d58a..2e16f21 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestPown.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestPown.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inBase = arrayInBase[i];
args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computePown(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inBase = arrayInBase[i * 2 + j];
args.inExponent = arrayInExponent[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computePown(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inBase = arrayInBase[i * 4 + j];
args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computePown(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inBase = arrayInBase[i * 4 + j];
args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computePown(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestPowr.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestPowr.java
index 995c948..557e293 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestPowr.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestPowr.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inBase = arrayInBase[i];
args.inExponent = arrayInExponent[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computePowr(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inBase = arrayInBase[i * 2 + j];
args.inExponent = arrayInExponent[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computePowr(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inBase = arrayInBase[i * 4 + j];
args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computePowr(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inBase = arrayInBase[i * 4 + j];
args.inExponent = arrayInExponent[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computePowr(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRadians.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRadians.java
index 73a5ab8..8eeaea0 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRadians.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRadians.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRadians(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRadians(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRadians(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRadians(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRemainder.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRemainder.java
index c346012..f921c5b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRemainder.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRemainder.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inNumerator = arrayInNumerator[i];
args.inDenominator = arrayInDenominator[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRemainder(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inNumerator = arrayInNumerator[i * 2 + j];
args.inDenominator = arrayInDenominator[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRemainder(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inNumerator = arrayInNumerator[i * 4 + j];
args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRemainder(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inNumerator = arrayInNumerator[i * 4 + j];
args.inDenominator = arrayInDenominator[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRemainder(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRemquo.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRemquo.java
index 6dbe11d..2aafac6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRemquo.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRemquo.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -93,7 +94,7 @@
args.outQuotient = arrayOutQuotient[i * 1 + j];
args.out = arrayOut[i * 1 + j];
// Ask the CoreMathVerifier to validate.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
String errorMessage = CoreMathVerifier.verifyRemquo(args, target);
boolean valid = errorMessage == null;
if (!valid) {
@@ -176,7 +177,7 @@
args.outQuotient = arrayOutQuotient[i * 2 + j];
args.out = arrayOut[i * 2 + j];
// Ask the CoreMathVerifier to validate.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
String errorMessage = CoreMathVerifier.verifyRemquo(args, target);
boolean valid = errorMessage == null;
if (!valid) {
@@ -259,7 +260,7 @@
args.outQuotient = arrayOutQuotient[i * 4 + j];
args.out = arrayOut[i * 4 + j];
// Ask the CoreMathVerifier to validate.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
String errorMessage = CoreMathVerifier.verifyRemquo(args, target);
boolean valid = errorMessage == null;
if (!valid) {
@@ -342,7 +343,7 @@
args.outQuotient = arrayOutQuotient[i * 4 + j];
args.out = arrayOut[i * 4 + j];
// Ask the CoreMathVerifier to validate.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
String errorMessage = CoreMathVerifier.verifyRemquo(args, target);
boolean valid = errorMessage == null;
if (!valid) {
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRint.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRint.java
index 7f5fc7e..f829798 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRint.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRint.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRint(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRint(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRint(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRint(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRootn.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRootn.java
index b22394d..7bb77a5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRootn.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRootn.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inV = arrayInV[i];
args.inN = arrayInN[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRootn(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inV = arrayInV[i * 2 + j];
args.inN = arrayInN[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRootn(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inV = arrayInV[i * 4 + j];
args.inN = arrayInN[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRootn(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inV = arrayInV[i * 4 + j];
args.inN = arrayInN[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRootn(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRound.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRound.java
index 5d13540..55f16f5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRound.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRound.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRound(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRound(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRound(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRound(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRsqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRsqrt.java
index 736b4cf..f91495c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRsqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestRsqrt.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSign.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSign.java
index 4cab338..2a002df 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSign.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSign.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSign(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSign(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSign(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSign(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSin.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSin.java
index 372ae23..1eeca79 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSin.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSin(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSin(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSincos.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSincos.java
index be38237..0b0d0d1 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSincos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSincos.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSincos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -170,7 +171,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSincos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -258,7 +259,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSincos(args, target);
// Validate the outputs.
boolean valid = true;
@@ -346,7 +347,7 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSincos(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSinh.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSinh.java
index 43e38ac..8d77970 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSinh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSinh.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSinh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSinh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSinh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSinh(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSinpi.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSinpi.java
index adb03d2..a5d983e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSinpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSinpi.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSqrt.java
index 6026960..e9ac826 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestSqrt.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestStep.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestStep.java
index e3451c8..a8e4fb9 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestStep.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestStep.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -82,7 +83,7 @@
args.inEdge = arrayInEdge[i];
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
@@ -161,7 +162,7 @@
args.inEdge = arrayInEdge[i * 2 + j];
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
@@ -240,7 +241,7 @@
args.inEdge = arrayInEdge[i * 4 + j];
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
@@ -319,7 +320,7 @@
args.inEdge = arrayInEdge[i * 4 + j];
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
@@ -398,7 +399,7 @@
args.inEdge = arrayInEdge[i * 2 + j];
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
@@ -477,7 +478,7 @@
args.inEdge = arrayInEdge[i * 4 + j];
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
@@ -556,7 +557,7 @@
args.inEdge = arrayInEdge[i * 4 + j];
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
@@ -635,7 +636,7 @@
args.inEdge = arrayInEdge[i];
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
@@ -714,7 +715,7 @@
args.inEdge = arrayInEdge[i];
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
@@ -793,7 +794,7 @@
args.inEdge = arrayInEdge[i];
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTan.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTan.java
index 5f23b3c..72f0a0b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTan.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTan.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTan(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTan(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTan(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTan(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTanh.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTanh.java
index 60143ed..7d1e96c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTanh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTanh.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTanh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTanh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTanh(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTanh(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTanpi.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTanpi.java
index 773f358..e5b9af6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTanpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTanpi.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTgamma.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTgamma.java
index e2337fc..fe2b832 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTgamma.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTgamma.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTgamma(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTgamma(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTgamma(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTgamma(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTrunc.java b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTrunc.java
index a61a739..6b6075e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTrunc.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/generated/TestTrunc.java
@@ -21,6 +21,7 @@
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import android.renderscript.Element;
+import android.renderscript.cts.Target;
import java.util.Arrays;
@@ -74,7 +75,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTrunc(args, target);
// Validate the outputs.
boolean valid = true;
@@ -143,7 +144,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTrunc(args, target);
// Validate the outputs.
boolean valid = true;
@@ -212,7 +213,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTrunc(args, target);
// Validate the outputs.
boolean valid = true;
@@ -281,7 +282,7 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Target target = new Target(relaxed);
+ Target target = new Target(Target.FunctionType.NORMAL, Target.ReturnType.FLOAT, relaxed);
CoreMathVerifier.computeTrunc(args, target);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/single_source_alloc.rs b/tests/tests/renderscript/src/android/renderscript/cts/single_source_alloc.rs
index 2575d54..40566a0 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/single_source_alloc.rs
+++ b/tests/tests/renderscript/src/android/renderscript/cts/single_source_alloc.rs
@@ -55,6 +55,7 @@
_RS_ASSERT_EQU(in.w, (CT) (val + 3)); \
} \
+VERIFY_KERNEL(half)
VERIFY_KERNEL(float)
VERIFY_KERNEL(double)
VERIFY_KERNEL(char)
@@ -182,6 +183,7 @@
// Store to a cell based on the type, vector size and
// dimensionality
switch (dt) {
+ STORE_TO_ALLOC(RS_TYPE_FLOAT_16, half);
STORE_TO_ALLOC(RS_TYPE_FLOAT_32, float);
STORE_TO_ALLOC(RS_TYPE_FLOAT_64, double);
STORE_TO_ALLOC(RS_TYPE_SIGNED_8, char);
@@ -203,6 +205,7 @@
// Launch the appropriate verify_ kernel
switch (dt) {
+ LAUNCH_VERIFY_KERNEL(RS_TYPE_FLOAT_16, half);
LAUNCH_VERIFY_KERNEL(RS_TYPE_FLOAT_32, float);
LAUNCH_VERIFY_KERNEL(RS_TYPE_FLOAT_64, double);
LAUNCH_VERIFY_KERNEL(RS_TYPE_SIGNED_8, char);
@@ -224,8 +227,7 @@
void TestAllocationCreationAndAccess() {
rs_data_type all_types[] = {
RS_TYPE_BOOLEAN,
- // Bug 24862914: Uncomment the following line to add half once the bug is fixed
- // RS_TYPE_FLOAT_16,
+ RS_TYPE_FLOAT_16,
RS_TYPE_FLOAT_32,
RS_TYPE_FLOAT_64,
RS_TYPE_SIGNED_8,
@@ -447,7 +449,7 @@
void TestHelperFunctions() {
failed = false;
- // Bug: 24862914: Add half once the bug is fixed
+ TEST_HELPER(half);
TEST_HELPERS(float);
TEST_HELPERS(double);
TEST_HELPERS(char);
diff --git a/tests/tests/security/jni/Android.mk b/tests/tests/security/jni/Android.mk
index 8ea6a96..bf229e7 100644
--- a/tests/tests/security/jni/Android.mk
+++ b/tests/tests/security/jni/Android.mk
@@ -40,10 +40,10 @@
LOCAL_C_INCLUDES := $(JNI_H_INCLUDE) \
$(TOP)/frameworks/native/include/media/openmax
-LOCAL_SHARED_LIBRARIES := libnativehelper_compat_libc++ liblog libdl libmedia libcrypto
+LOCAL_SHARED_LIBRARIES := libbinder libnativehelper_compat_libc++ liblog libdl libmedia libcrypto
LOCAL_C_INCLUDES += ndk/sources/cpufeatures
-LOCAL_STATIC_LIBRARIES := cpufeatures libbinder libselinux libutils libcutils
+LOCAL_STATIC_LIBRARIES := cpufeatures libselinux libutils libcutils
LOCAL_CXX_STL := libc++_static
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/tests/security/src/android/security/cts/CertificateData.java b/tests/tests/security/src/android/security/cts/CertificateData.java
index 59803d3..ae216ad 100644
--- a/tests/tests/security/src/android/security/cts/CertificateData.java
+++ b/tests/tests/security/src/android/security/cts/CertificateData.java
@@ -50,6 +50,7 @@
"8E:1C:74:F8:A6:20:B9:E5:8A:F4:61:FA:EC:2B:47:56:51:1A:52:C6",
"27:96:BA:E6:3F:18:01:E2:77:26:1B:A0:D7:77:70:02:8F:20:EE:E4",
"AD:7E:1C:28:B0:64:EF:8F:60:03:40:20:14:C3:D0:E3:37:0E:B5:8A",
+ "FB:ED:DC:90:65:B7:27:20:37:BC:55:0C:9C:56:DE:BB:F2:78:94:E1",
"8D:17:84:D5:37:F3:03:7D:EC:70:FE:57:8B:51:9A:99:E6:10:D7:B0",
"1F:24:C6:30:CD:A4:18:EF:20:69:FF:AD:4F:DD:5F:46:3A:1B:69:AA",
"DA:FA:F7:FA:66:84:EC:06:8F:14:50:BD:C7:C2:81:A5:BC:A9:64:57",
@@ -74,11 +75,9 @@
"2F:78:3D:25:52:18:A7:4A:65:39:71:B5:2C:A2:9C:45:15:6F:E9:19",
"BA:29:41:60:77:98:3F:F4:F3:EF:F2:31:05:3B:2E:EA:6D:4D:45:FD",
"85:A4:08:C0:9C:19:3E:5D:51:58:7D:CD:D6:13:30:FD:8C:DE:37:BF",
- "58:11:9F:0E:12:82:87:EA:50:FD:D9:87:45:6F:4F:78:DC:FA:D6:D4",
"9B:AA:E5:9F:56:EE:21:CB:43:5A:BE:25:93:DF:A7:F0:40:D1:1D:CB",
"36:79:CA:35:66:87:72:30:4D:30:A5:FB:87:3B:0F:A7:7B:B7:0D:54",
"1B:8E:EA:57:96:29:1A:C9:39:EA:B8:0A:81:1A:73:73:C0:93:79:67",
- "B4:35:D4:E1:11:9D:1C:66:90:A7:49:EB:B3:94:BD:63:7B:A7:82:B7",
"A9:E9:78:08:14:37:58:88:F2:05:19:B0:6D:2B:0D:2B:60:16:90:7D",
"60:D6:89:74:B5:C2:65:9E:8A:0F:C1:88:7C:88:D2:46:69:1B:18:2C",
"D8:EB:6B:41:51:92:59:E0:F3:E7:85:00:C0:3D:B6:88:97:C9:EE:FC",
@@ -103,7 +102,6 @@
"5F:B7:EE:06:33:E2:59:DB:AD:0C:4C:9A:E6:D3:8F:1A:61:C7:DC:25",
"49:0A:75:74:DE:87:0A:47:FE:58:EE:F6:C7:6B:EB:C6:0B:12:40:99",
"25:01:90:19:CF:FB:D9:99:1C:B7:68:25:74:8D:94:5F:30:93:95:42",
- "79:98:A3:08:E1:4D:65:85:E6:C2:1E:15:3A:71:9F:BA:5A:D3:4A:D9",
"B5:1C:06:7C:EE:2B:0C:3D:F8:55:AB:2D:92:F4:FE:39:D4:E7:0F:0E",
"29:36:21:02:8B:20:ED:02:F5:66:C5:32:D1:D6:ED:90:9F:45:00:2F",
"37:9A:19:7B:41:85:45:35:0C:A6:03:69:F3:3C:2E:AF:47:4F:20:79",
@@ -129,8 +127,8 @@
"36:B1:2B:49:F9:81:9E:D7:4C:9E:BC:38:0F:C6:56:8F:5D:AC:B2:F7",
"37:F7:6D:E6:07:7C:90:C5:B1:3E:93:1A:B7:41:10:B4:F2:E4:9A:27",
"AA:DB:BC:22:23:8F:C4:01:A1:27:BB:38:DD:F4:1D:DB:08:9E:F0:12",
+ "E2:52:FA:95:3F:ED:DB:24:60:BD:6E:28:F3:9C:CC:CF:5E:B3:3F:DE",
"3B:C4:9F:48:F8:F3:73:A0:9C:1E:BD:F8:5B:B1:C3:65:C7:D8:11:B3",
- "AC:ED:5F:65:53:FD:25:CE:01:5F:1F:7A:48:3B:6A:74:9F:61:78:C6",
"28:90:3A:63:5B:52:80:FA:E6:77:4C:0B:6D:A7:D6:BA:A6:4A:F2:E8",
"9C:BB:48:53:F6:A4:F6:D3:52:A4:E8:32:52:55:60:13:F5:AD:AF:65",
"B1:BC:96:8B:D4:F4:9D:62:2A:A8:9A:81:F2:15:01:52:A4:1D:82:9C",
@@ -140,26 +138,25 @@
"47:BE:AB:C9:22:EA:E8:0E:78:78:34:62:A7:9F:45:C2:54:FD:E6:8B",
"3A:44:73:5A:E5:81:90:1F:24:86:61:46:1E:3B:9C:C4:5F:F5:3A:1B",
"B3:1E:B1:B7:40:E3:6C:84:02:DA:DC:37:D4:4D:F5:D4:67:49:52:F9",
- "D3:C0:63:F2:19:ED:07:3E:34:AD:5D:75:0B:32:76:29:FF:D5:9A:F2",
"F5:17:A2:4F:9A:48:C6:C9:F8:A2:00:26:9F:DC:0F:48:2C:AB:30:89",
"3B:C0:38:0B:33:C3:F6:A6:0C:86:15:22:93:D9:DF:F5:4B:81:C0:04",
- "C8:EC:8C:87:92:69:CB:4B:AB:39:E9:8D:7E:57:67:F3:14:95:73:9D",
"03:9E:ED:B8:0B:E7:A0:3C:69:53:89:3B:20:D2:D9:32:3A:4C:2A:FD",
"DF:3C:24:F9:BF:D6:66:76:1B:26:80:73:FE:06:D1:CC:8D:4F:82:A4",
"51:C6:E7:08:49:06:6E:F3:92:D4:5C:A0:0D:6D:A3:62:8F:C3:52:39",
+ "D3:DD:48:3E:2B:BF:4C:05:E8:AF:10:F5:FA:76:26:CF:D3:DC:30:92",
"B8:23:6B:00:2F:1D:16:86:53:01:55:6C:11:A4:37:CA:EB:FF:C3:BB",
- "10:1D:FA:3F:D5:0B:CB:BB:9B:B5:60:0C:19:55:A4:1A:F4:73:3A:04",
"87:82:C6:C3:04:35:3B:CF:D2:96:92:D2:59:3E:7D:44:D9:34:FF:11",
"59:0D:2D:7D:88:4F:40:2E:61:7E:A5:62:32:17:65:CF:17:D8:94:E9",
"AE:C5:FB:3F:C8:E1:BF:C4:E5:4F:03:07:5A:9A:E8:00:B7:F7:B6:FA",
"DF:71:7E:AA:4A:D9:4E:C9:55:84:99:60:2D:48:DE:5F:BC:F0:3A:25",
"AF:E5:D2:44:A8:D1:19:42:30:FF:47:9F:E2:F8:97:BB:CD:7A:8C:B4",
+ "D2:7A:D2:BE:ED:94:C0:A1:3C:C7:25:21:EA:5D:71:BE:81:19:F3:2B",
"5F:3B:8C:F2:F8:10:B3:7D:78:B4:CE:EC:19:19:C3:73:34:B9:C7:74",
- "2A:C8:D5:8B:57:CE:BF:2F:49:AF:F2:FC:76:8F:51:14:62:90:7A:41",
"F1:7F:6F:B6:31:DC:99:E3:A3:C8:7F:FE:1C:F1:81:10:88:D9:60:33",
"9D:70:BB:01:A5:A4:A0:18:11:2E:F7:1C:01:B9:32:C5:34:E7:88:A8",
"96:C9:1B:0B:95:B4:10:98:42:FA:D0:D8:22:79:FE:60:FA:B9:16:83",
"D8:A6:33:2C:E0:03:6F:B1:85:F6:63:4F:7D:6A:06:65:26:32:28:27",
+ "0F:F9:40:76:18:D3:D7:6A:4B:98:F0:A8:35:9E:0C:FD:27:AC:CC:ED",
"CC:AB:0E:A0:4C:23:01:D6:69:7B:DD:37:9F:CD:12:EB:24:E3:94:9D",
"48:12:BD:92:3C:A8:C4:39:06:E7:30:6D:27:96:E6:A4:CF:22:2E:7D",
"F9:B5:B6:32:45:5F:9C:BE:EC:57:5F:80:DC:E9:6E:2C:C7:B2:78:B7",
@@ -170,7 +167,6 @@
"7E:04:DE:89:6A:3E:66:6D:00:E6:87:D3:3F:FA:D9:3B:E8:3D:34:9E",
"6E:3A:55:A4:19:0C:19:5C:93:84:3C:C0:DB:72:2E:31:30:61:F0:B1",
"31:F1:FD:68:22:63:20:EE:C6:3B:3F:9D:EA:4A:3E:53:7C:7C:39:17",
- "F9:CD:0E:2C:DA:76:24:C1:8F:BD:F0:F0:AB:B6:45:B8:F7:FE:D5:7A",
"23:88:C9:D3:71:CC:9E:96:3D:FF:7D:3C:A7:CE:FC:D6:25:EC:19:0D",
"8C:96:BA:EB:DD:2B:07:07:48:EE:30:32:66:A0:F3:98:6E:7C:AE:58",
"7F:8A:B0:CF:D0:51:87:6A:66:F3:36:0F:47:C8:8D:8C:D3:35:FC:74",
diff --git a/tests/tests/security/src/android/security/cts/SELinuxTest.java b/tests/tests/security/src/android/security/cts/SELinuxTest.java
index 3df7396..736bdc9 100644
--- a/tests/tests/security/src/android/security/cts/SELinuxTest.java
+++ b/tests/tests/security/src/android/security/cts/SELinuxTest.java
@@ -73,12 +73,6 @@
assertFalse(checkSELinuxAccess("u:r:zygote:s0", "u:object_r:runas_exec:s0", "file", "getattr", "/system/bin/run-as"));
}
- public void testNoBooleans() throws Exception {
- // Intentionally not using JNI bindings to keep things simple
- File[] files = new File("/sys/fs/selinux/booleans/").listFiles();
- assertEquals(0, files.length);
- }
-
public void testCTSIsUntrustedApp() throws IOException {
String found = KernelSettingsTest.getFile("/proc/self/attr/current");
String expected = "u:r:untrusted_app:s0";
diff --git a/tests/tests/telecom/src/android/telecom/cts/BaseTelecomTestWithMockServices.java b/tests/tests/telecom/src/android/telecom/cts/BaseTelecomTestWithMockServices.java
index 219dfec..932603d 100644
--- a/tests/tests/telecom/src/android/telecom/cts/BaseTelecomTestWithMockServices.java
+++ b/tests/tests/telecom/src/android/telecom/cts/BaseTelecomTestWithMockServices.java
@@ -138,7 +138,9 @@
}
protected void tearDownConnectionService(PhoneAccountHandle accountHandle) throws Exception {
- assertNumConnections(this.connectionService, 0);
+ if (this.connectionService != null) {
+ assertNumConnections(this.connectionService, 0);
+ }
mTelecomManager.unregisterPhoneAccount(accountHandle);
CtsConnectionService.tearDown();
assertCtsConnectionServiceUnbound();
@@ -814,12 +816,12 @@
new Condition() {
@Override
public Object expected() {
- return true;
+ return false;
}
@Override
public Object actual() {
- return CtsConnectionService.isServiceUnbound();
+ return CtsConnectionService.isServiceBound();
}
},
WAIT_FOR_STATE_CHANGE_TIMEOUT_MS,
diff --git a/tests/tests/telecom/src/android/telecom/cts/CtsConnectionService.java b/tests/tests/telecom/src/android/telecom/cts/CtsConnectionService.java
index d8d5773..2364986 100644
--- a/tests/tests/telecom/src/android/telecom/cts/CtsConnectionService.java
+++ b/tests/tests/telecom/src/android/telecom/cts/CtsConnectionService.java
@@ -16,7 +16,7 @@
package android.telecom.cts;
-import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import android.content.Intent;
import android.telecom.Conference;
@@ -52,11 +52,13 @@
private static ConnectionService sConnectionService;
// This is the connection service registered with Telecom
private static ConnectionService sTelecomConnectionService;
- private static boolean mIsServiceUnbound;
+ private static boolean mIsServiceBound = false;
public CtsConnectionService() throws Exception {
super();
sTelecomConnectionService = this;
+ // Cant override the onBind method for ConnectionService, so reset it here.
+ mIsServiceBound = true;
}
// ConnectionService used by default as a fallback if no connection service is specified
@@ -77,13 +79,12 @@
throw new Exception("Mock ConnectionService exists. Failed to call tearDown().");
}
sConnectionService = connectionService;
- // Cant override the onBind method for ConnectionService, so reset it here.
- mIsServiceUnbound = false;
}
}
public static void tearDown() {
synchronized(sLock) {
+ sTelecomConnectionService = null;
sConnectionService = null;
}
}
@@ -188,13 +189,17 @@
@Override
public boolean onUnbind(Intent intent) {
- Log.i(LOG_TAG, "Service unbounded");
- assertFalse(mIsServiceUnbound);
- mIsServiceUnbound = true;
+ Log.i(LOG_TAG, "Service has been unbound");
+ assertTrue(mIsServiceBound);
+ mIsServiceBound = false;
return super.onUnbind(intent);
}
- public static boolean isServiceUnbound() {
- return mIsServiceUnbound;
+ public static boolean isServiceBound() {
+ return mIsServiceBound;
+ }
+
+ public static boolean isServiceRegisteredToTelecom() {
+ return sTelecomConnectionService != null;
}
}
diff --git a/tests/tests/telecom/src/android/telecom/cts/IncomingCallTest.java b/tests/tests/telecom/src/android/telecom/cts/IncomingCallTest.java
new file mode 100644
index 0000000..7f5e7ce
--- /dev/null
+++ b/tests/tests/telecom/src/android/telecom/cts/IncomingCallTest.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 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
+ */
+
+package android.telecom.cts;
+
+import android.content.ComponentName;
+import android.os.Bundle;
+import android.telecom.Connection;
+import android.telecom.PhoneAccountHandle;
+import android.telecom.TelecomManager;
+
+import java.util.Collection;
+
+import static android.telecom.cts.TestUtils.COMPONENT;
+import static android.telecom.cts.TestUtils.PACKAGE;
+
+/**
+ * Tests valid/invalid incoming calls that are received from the ConnectionService
+ * and registered through TelecomManager
+ */
+public class IncomingCallTest extends BaseTelecomTestWithMockServices {
+
+ private static final PhoneAccountHandle TEST_INVALID_HANDLE = new PhoneAccountHandle(
+ new ComponentName(PACKAGE, COMPONENT), "WRONG_ID");
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ mContext = getInstrumentation().getContext();
+ }
+
+ public void testAddNewIncomingCall_CorrectPhoneAccountHandle() throws Exception {
+ if (!mShouldTestTelecom) {
+ return;
+ }
+ setupConnectionService(null, FLAG_REGISTER | FLAG_ENABLE);
+ addAndVerifyNewIncomingCall(createTestNumber(), null);
+ final Connection connection3 = verifyConnectionForIncomingCall();
+ Collection<Connection> connections = CtsConnectionService.getAllConnectionsFromTelecom();
+ assertEquals(1, connections.size());
+ assertTrue(connections.contains(connection3));
+ }
+
+ /**
+ * Tests to be sure that new incoming calls can only be added using a valid PhoneAccountHandle
+ * (b/26864502). If a PhoneAccount has not been registered for the PhoneAccountHandle, then
+ * a SecurityException will be thrown.
+ */
+ public void testAddNewIncomingCall_IncorrectPhoneAccountHandle() {
+ if (!mShouldTestTelecom) {
+ return;
+ }
+
+ Bundle extras = new Bundle();
+ extras.putParcelable(TelecomManager.EXTRA_INCOMING_CALL_ADDRESS, createTestNumber());
+ try {
+ mTelecomManager.addNewIncomingCall(TEST_INVALID_HANDLE, extras);
+ fail();
+ } catch (SecurityException e) {
+ // This should create a security exception!
+ }
+
+ assertFalse(CtsConnectionService.isServiceRegisteredToTelecom());
+ }
+
+ /**
+ * Tests to be sure that new incoming calls can only be added if a PhoneAccount is enabled
+ * (b/26864502). If a PhoneAccount is not enabled for the PhoneAccountHandle, then
+ * a SecurityException will be thrown.
+ */
+ public void testAddNewIncomingCall_PhoneAccountNotEnabled() throws Exception {
+ if (!mShouldTestTelecom) {
+ return;
+ }
+
+ // Do not enable PhoneAccount
+ setupConnectionService(null, FLAG_REGISTER);
+ assertFalse(mTelecomManager.getPhoneAccount(TEST_PHONE_ACCOUNT_HANDLE).isEnabled());
+ try {
+ addAndVerifyNewIncomingCall(createTestNumber(), null);
+ fail();
+ } catch (SecurityException e) {
+ // This should create a security exception!
+ }
+
+ assertFalse(CtsConnectionService.isServiceRegisteredToTelecom());
+ }
+}
diff --git a/tests/tests/telephony/src/android/telephony/cts/SmsManagerTest.java b/tests/tests/telephony/src/android/telephony/cts/SmsManagerTest.java
index 5a80802..6b72b82 100755
--- a/tests/tests/telephony/src/android/telephony/cts/SmsManagerTest.java
+++ b/tests/tests/telephony/src/android/telephony/cts/SmsManagerTest.java
@@ -101,6 +101,7 @@
"311230", // C SPire Wireless + Celluar South
"310600", // Cellcom
"31000", // Republic Wireless US
+ "310260", // Republic Wireless US
"310026", // T-Mobile US
"330120", // OpenMobile communication
// Verizon
@@ -142,6 +143,7 @@
"45005", // SKT Mobility
"45002", // SKT Mobility
"45006", // LGT
+ "310260", // Republic Wireless US
// Verizon
"310004",
"310012",
diff --git a/tests/tests/telephony/src/android/telephony/cts/SmsMessageTest.java b/tests/tests/telephony/src/android/telephony/cts/SmsMessageTest.java
index 2db9ba1..2406ad8 100644
--- a/tests/tests/telephony/src/android/telephony/cts/SmsMessageTest.java
+++ b/tests/tests/telephony/src/android/telephony/cts/SmsMessageTest.java
@@ -66,6 +66,9 @@
"Long dkkshsh jdjsusj kbsksbdf jfkhcu hhdiwoqiwyrygrvn?*?*!\";:'/,."
+ "__?9#9292736&4;\"$+$+((]\\[\\℅©℅™^®°¥°¥=¢£}}£∆~¶~÷|√×."
+ " 😯😆😉😇😂😀👕🎓😀👙🐕🐀🐶🐰🐩⛪⛲ ";
+ private static final String LONG_TEXT_WITH_FLAGS =
+ "🇦🇫🇦🇽🇦🇱🇩🇿🇦🇸🇦🇩🇦🇴🇦🇮🇦🇶🇦🇬🇦🇷🇦🇲🇦🇼🇦🇨"
+ + "🇦🇺🇦🇹🇦🇿🇧🇸🇧🇭🇧🇩🇧🇧🇧🇾🇧🇪🇧🇿🇧🇯🇧🇲🇧🇹🇧🇴🇧🇦";
@Override
protected void setUp() throws Exception {
@@ -317,6 +320,14 @@
assertEquals(SmsMessage.ENCODING_16BIT, result[3]);
}
+ public void testCalculateLengthFlags() throws Exception {
+ if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
+ return;
+ }
+ int[] result = SmsMessage.calculateLength(LONG_TEXT_WITH_FLAGS, false);
+ assertEquals(2, result[0]);
+ }
+
private final static char[] HEX_DIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F' };
diff --git a/tests/tests/telephony/src/android/telephony/cts/SmsUsageMonitorShortCodeTest.java b/tests/tests/telephony/src/android/telephony/cts/SmsUsageMonitorShortCodeTest.java
index 0527e9a..d89e944 100644
--- a/tests/tests/telephony/src/android/telephony/cts/SmsUsageMonitorShortCodeTest.java
+++ b/tests/tests/telephony/src/android/telephony/cts/SmsUsageMonitorShortCodeTest.java
@@ -23,6 +23,8 @@
import android.telephony.TelephonyManager;
import com.android.internal.telephony.SmsUsageMonitor;
+import android.telephony.PhoneNumberUtils;
+
/**
* Test cases for SMS short code pattern matching in SmsUsageMonitor.
*/
@@ -80,7 +82,7 @@
new ShortCodeTest("al", "55600", CATEGORY_PREMIUM_SHORT_CODE),
new ShortCodeTest("al", "654321", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("am", "112", CATEGORY_NOT_SHORT_CODE),
+ new ShortCodeTest("am", "112", expectedReturnCode("112")),
new ShortCodeTest("am", "101", CATEGORY_FREE_SHORT_CODE),
new ShortCodeTest("am", "102", CATEGORY_FREE_SHORT_CODE),
new ShortCodeTest("am", "103", CATEGORY_FREE_SHORT_CODE),
@@ -205,7 +207,7 @@
new ShortCodeTest("dk", "16123", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
new ShortCodeTest("dk", "987654321", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("ee", "112", CATEGORY_NOT_SHORT_CODE),
+ new ShortCodeTest("ee", "112", expectedReturnCode("112")),
new ShortCodeTest("ee", "116117", CATEGORY_FREE_SHORT_CODE),
new ShortCodeTest("ee", "123", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
new ShortCodeTest("ee", "1259", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
@@ -317,7 +319,7 @@
new ShortCodeTest("kz", "7790", CATEGORY_PREMIUM_SHORT_CODE),
new ShortCodeTest("kz", "98765", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("lt", "112", CATEGORY_NOT_SHORT_CODE),
+ new ShortCodeTest("lt", "112", expectedReturnCode("112")),
new ShortCodeTest("lt", "116117", CATEGORY_FREE_SHORT_CODE),
new ShortCodeTest("lt", "123", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
new ShortCodeTest("lt", "1234", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
@@ -370,7 +372,7 @@
new ShortCodeTest("no", "23456", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
new ShortCodeTest("no", "234567", CATEGORY_NOT_SHORT_CODE),
- new ShortCodeTest("nz", "112", CATEGORY_NOT_SHORT_CODE),
+ new ShortCodeTest("nz", "112", expectedReturnCode("112")),
new ShortCodeTest("nz", "123", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
new ShortCodeTest("nz", "2345", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
new ShortCodeTest("nz", "3903", CATEGORY_PREMIUM_SHORT_CODE),
@@ -473,12 +475,12 @@
new ShortCodeTest("zz", "54321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
new ShortCodeTest("zz", "4321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
new ShortCodeTest("zz", "321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest("zz", "112", CATEGORY_NOT_SHORT_CODE),
+ new ShortCodeTest("zz", "112", expectedReturnCode("112")),
new ShortCodeTest(null, "2000000", CATEGORY_NOT_SHORT_CODE),
new ShortCodeTest(null, "54321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
new ShortCodeTest(null, "4321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
new ShortCodeTest(null, "321", CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE),
- new ShortCodeTest(null, "112", CATEGORY_NOT_SHORT_CODE),
+ new ShortCodeTest(null, "112", expectedReturnCode("112")),
};
@Override
@@ -494,6 +496,11 @@
&& "112".equals(address);
}
+ private static int expectedReturnCode(String address) {
+ return PhoneNumberUtils.isEmergencyNumber(address) ?
+ CATEGORY_NOT_SHORT_CODE : CATEGORY_POSSIBLE_PREMIUM_SHORT_CODE;
+ }
+
@UiThreadTest
public void testSmsUsageMonitor() {
if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
diff --git a/tests/tests/text/src/android/text/cts/StaticLayoutTest.java b/tests/tests/text/src/android/text/cts/StaticLayoutTest.java
index 9dca753..17a0fd0 100644
--- a/tests/tests/text/src/android/text/cts/StaticLayoutTest.java
+++ b/tests/tests/text/src/android/text/cts/StaticLayoutTest.java
@@ -16,23 +16,26 @@
package android.text.cts;
+import android.graphics.Typeface;
import android.test.AndroidTestCase;
import android.text.Editable;
-import android.text.GetChars;
-import android.text.GraphicsOperations;
+import android.text.Layout;
import android.text.Layout.Alignment;
-import android.text.TextUtils.TruncateAt;
import android.text.SpannableString;
import android.text.SpannableStringBuilder;
+import android.text.Spanned;
import android.text.SpannedString;
import android.text.StaticLayout;
import android.text.TextDirectionHeuristics;
import android.text.TextPaint;
import android.text.TextUtils;
+import android.text.TextUtils.TruncateAt;
+import android.text.style.StyleSpan;
import java.text.Normalizer;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
public class StaticLayoutTest extends AndroidTestCase {
private static final float SPACE_MULTI = 1.0f;
@@ -1014,4 +1017,20 @@
DEFAULT_ALIGN, SPACE_MULTI, SPACE_ADD, true);
assertNotNull(layout);
}
+
+ public void testDoesntCrashWhenWordStyleOverlap() {
+ // test case where word boundary overlaps multiple style spans
+ SpannableStringBuilder text = new SpannableStringBuilder("word boundaries, overlap style");
+ // span covers "boundaries"
+ text.setSpan(new StyleSpan(Typeface.BOLD),
+ "word ".length(), "word boundaries".length(),
+ Spanned.SPAN_INCLUSIVE_INCLUSIVE);
+ mDefaultPaint.setTextLocale(Locale.US);
+ StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(),
+ mDefaultPaint, DEFAULT_OUTER_WIDTH)
+ .setBreakStrategy(Layout.BREAK_STRATEGY_HIGH_QUALITY) // enable hyphenation
+ .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL)
+ .build();
+ assertNotNull(layout);
+ }
}
diff --git a/tests/tests/tv/src/android/media/tv/cts/TvContractTest.java b/tests/tests/tv/src/android/media/tv/cts/TvContractTest.java
index 596f5fa..9f26f46 100644
--- a/tests/tests/tv/src/android/media/tv/cts/TvContractTest.java
+++ b/tests/tests/tv/src/android/media/tv/cts/TvContractTest.java
@@ -64,8 +64,9 @@
TvContract.Programs._ID,
TvContract.Programs.COLUMN_CHANNEL_ID,
TvContract.Programs.COLUMN_TITLE,
- TvContract.Programs.COLUMN_SEASON_NUMBER,
- TvContract.Programs.COLUMN_EPISODE_NUMBER,
+ TvContract.Programs.COLUMN_SEASON_DISPLAY_NUMBER,
+ TvContract.Programs.COLUMN_SEASON_TITLE,
+ TvContract.Programs.COLUMN_EPISODE_DISPLAY_NUMBER,
TvContract.Programs.COLUMN_EPISODE_TITLE,
TvContract.Programs.COLUMN_START_TIME_UTC_MILLIS,
TvContract.Programs.COLUMN_END_TIME_UTC_MILLIS,
@@ -154,7 +155,10 @@
private static ContentValues createDummyProgramValues(long channelId) {
ContentValues values = new ContentValues();
values.put(TvContract.Programs.COLUMN_CHANNEL_ID, channelId);
- values.put(TvContract.Programs.COLUMN_EPISODE_TITLE, "Title");
+ values.put(TvContract.Programs.COLUMN_EPISODE_DISPLAY_NUMBER , "1A");
+ values.put(TvContract.Programs.COLUMN_EPISODE_TITLE, "episode_title");
+ values.put(TvContract.Programs.COLUMN_SEASON_DISPLAY_NUMBER , "2B");
+ values.put(TvContract.Programs.COLUMN_SEASON_TITLE, "season_title");
values.put(TvContract.Programs.COLUMN_CANONICAL_GENRE, TvContract.Programs.Genres.encode(
TvContract.Programs.Genres.MOVIES, TvContract.Programs.Genres.DRAMA));
TvContentRating rating = TvContentRating.createRating("android.media.tv", "US_TVPG",
@@ -164,11 +168,13 @@
return values;
}
- private static ContentValues createDummyRecordedProgramValues(long channelId) {
+ private static ContentValues createDummyRecordedProgramValues(String inputId, long channelId) {
ContentValues values = new ContentValues();
+ values.put(TvContract.RecordedPrograms.COLUMN_INPUT_ID, inputId);
values.put(TvContract.RecordedPrograms.COLUMN_CHANNEL_ID, channelId);
- values.put(TvContract.RecordedPrograms.COLUMN_SEASON_NUMBER, 6);
- values.put(TvContract.RecordedPrograms.COLUMN_EPISODE_NUMBER, 3);
+ values.put(TvContract.RecordedPrograms.COLUMN_SEASON_DISPLAY_NUMBER , "3B");
+ values.put(TvContract.RecordedPrograms.COLUMN_SEASON_TITLE, "season_title");
+ values.put(TvContract.RecordedPrograms.COLUMN_EPISODE_DISPLAY_NUMBER , "2A");
values.put(TvContract.RecordedPrograms.COLUMN_EPISODE_TITLE, "episode_title");
values.put(TvContract.RecordedPrograms.COLUMN_START_TIME_UTC_MILLIS, 1000);
values.put(TvContract.RecordedPrograms.COLUMN_END_TIME_UTC_MILLIS, 2000);
@@ -301,8 +307,11 @@
assertEquals(programId, cursor.getLong(cursor.getColumnIndex(TvContract.Programs._ID)));
verifyLongColumn(cursor, expectedValues, TvContract.Programs.COLUMN_CHANNEL_ID);
verifyStringColumn(cursor, expectedValues, TvContract.Programs.COLUMN_TITLE);
- verifyIntegerColumn(cursor, expectedValues, TvContract.Programs.COLUMN_SEASON_NUMBER);
- verifyIntegerColumn(cursor, expectedValues, TvContract.Programs.COLUMN_EPISODE_NUMBER);
+ verifyStringColumn(cursor, expectedValues,
+ TvContract.Programs.COLUMN_SEASON_DISPLAY_NUMBER);
+ verifyStringColumn(cursor, expectedValues, TvContract.Programs.COLUMN_SEASON_TITLE);
+ verifyStringColumn(cursor, expectedValues,
+ TvContract.Programs.COLUMN_EPISODE_DISPLAY_NUMBER);
verifyStringColumn(cursor, expectedValues, TvContract.Programs.COLUMN_EPISODE_TITLE);
verifyLongColumn(cursor, expectedValues,
TvContract.Programs.COLUMN_START_TIME_UTC_MILLIS);
@@ -325,6 +334,21 @@
}
}
+ private void verifyDeprecatedColumsInProgram(Uri programUri, ContentValues expectedValues) {
+ final String[] DEPRECATED_COLUMNS_PROJECTION = {
+ TvContract.Programs.COLUMN_SEASON_NUMBER,
+ TvContract.Programs.COLUMN_EPISODE_NUMBER,
+ };
+ try (Cursor cursor = mContentResolver.query(
+ programUri, DEPRECATED_COLUMNS_PROJECTION, null, null, null)) {
+ assertNotNull(cursor);
+ assertEquals(cursor.getCount(), 1);
+ assertTrue(cursor.moveToNext());
+ verifyIntegerColumn(cursor, expectedValues, TvContract.Programs.COLUMN_SEASON_NUMBER);
+ verifyIntegerColumn(cursor, expectedValues, TvContract.Programs.COLUMN_EPISODE_NUMBER);
+ }
+ }
+
private void verifyLogoIsReadable(Uri logoUri) throws Exception {
try (AssetFileDescriptor fd = mContentResolver.openAssetFileDescriptor(logoUri, "r")) {
try (InputStream is = fd.createInputStream()) {
@@ -389,6 +413,45 @@
}
}
+ public void verifyProgramsTableWithDeprecatedColumns(Uri programsUri, long channelId) {
+ if (!Utils.hasTvInputFramework(getContext())) {
+ return;
+ }
+ // Test: insert
+ ContentValues expected = createDummyProgramValues(channelId);
+ expected.put(TvContract.Programs.COLUMN_SEASON_DISPLAY_NUMBER, "3");
+ expected.put(TvContract.Programs.COLUMN_EPISODE_DISPLAY_NUMBER, "9");
+
+ ContentValues input = new ContentValues(expected);
+ input.remove(TvContract.Programs.COLUMN_SEASON_DISPLAY_NUMBER);
+ input.remove(TvContract.Programs.COLUMN_EPISODE_DISPLAY_NUMBER);
+ input.put(TvContract.Programs.COLUMN_SEASON_NUMBER, 3);
+ input.put(TvContract.Programs.COLUMN_EPISODE_NUMBER, 9);
+
+ Uri rowUri = mContentResolver.insert(programsUri, input);
+ long programId = ContentUris.parseId(rowUri);
+ Uri programUri = TvContract.buildProgramUri(programId);
+ verifyProgram(programUri, expected, programId);
+ verifyDeprecatedColumsInProgram(programUri, input);
+
+ // Test: update
+ expected.put(TvContract.Programs.COLUMN_SEASON_DISPLAY_NUMBER, "4");
+ expected.put(TvContract.Programs.COLUMN_EPISODE_DISPLAY_NUMBER, "10");
+ input.put(TvContract.Programs.COLUMN_SEASON_NUMBER, 4);
+ input.put(TvContract.Programs.COLUMN_EPISODE_NUMBER, 10);
+
+ mContentResolver.update(programUri, input, null, null);
+ verifyProgram(programUri, expected, programId);
+ verifyDeprecatedColumsInProgram(programUri, input);
+
+ // Test: delete
+ mContentResolver.delete(programsUri, null, null);
+ try (Cursor cursor = mContentResolver.query(
+ programsUri, PROGRAMS_PROJECTION, null, null, null)) {
+ assertEquals(0, cursor.getCount());
+ }
+ }
+
public void testProgramsTable() throws Exception {
if (!Utils.hasTvInputFramework(getContext())) {
return;
@@ -400,6 +463,10 @@
verifyProgramsTable(TvContract.buildProgramsUriForChannel(channelId), channelId);
verifyProgramsTable(TvContract.buildProgramsUriForChannel(channelUri), channelId);
+ verifyProgramsTableWithDeprecatedColumns(TvContract.buildProgramsUriForChannel(channelId),
+ channelId);
+ verifyProgramsTableWithDeprecatedColumns(TvContract.buildProgramsUriForChannel(channelUri),
+ channelId);
}
private void verifyOverlap(long startMillis, long endMillis, int expectedCount,
@@ -463,8 +530,11 @@
assertEquals(recordedProgramId, cursor.getLong(cursor.getColumnIndex(
RecordedPrograms._ID)));
verifyLongColumn(cursor, expectedValues, RecordedPrograms.COLUMN_CHANNEL_ID);
- verifyIntegerColumn(cursor, expectedValues, RecordedPrograms.COLUMN_SEASON_NUMBER);
- verifyIntegerColumn(cursor, expectedValues, RecordedPrograms.COLUMN_EPISODE_NUMBER);
+ verifyStringColumn(cursor, expectedValues,
+ RecordedPrograms.COLUMN_SEASON_DISPLAY_NUMBER);
+ verifyStringColumn(cursor, expectedValues, RecordedPrograms.COLUMN_SEASON_TITLE);
+ verifyStringColumn(cursor, expectedValues,
+ RecordedPrograms.COLUMN_EPISODE_DISPLAY_NUMBER);
verifyStringColumn(cursor, expectedValues, RecordedPrograms.COLUMN_EPISODE_TITLE);
verifyLongColumn(cursor, expectedValues, RecordedPrograms.COLUMN_START_TIME_UTC_MILLIS);
verifyLongColumn(cursor, expectedValues, RecordedPrograms.COLUMN_END_TIME_UTC_MILLIS);
@@ -502,7 +572,7 @@
private void verifyRecordedProgramsTable(Uri recordedProgramsUri, long channelId) {
// Test: insert
- ContentValues values = createDummyRecordedProgramValues(channelId);
+ ContentValues values = createDummyRecordedProgramValues(mInputId, channelId);
Uri rowUri = mContentResolver.insert(recordedProgramsUri, values);
long recordedProgramId = ContentUris.parseId(rowUri);
@@ -873,4 +943,12 @@
// There are two channels which belong to MUSIC genre - channel 2 and 3.
verifyChannelCountWithCanonicalGenre(Genres.MUSIC, 2);
}
+
+ public void testGenresIsCanonical() {
+ if (!Utils.hasTvInputFramework(getContext())) {
+ return;
+ }
+ assertTrue(Genres.isCanonical(Genres.DRAMA));
+ assertFalse(Genres.isCanonical("Not a genre"));
+ }
}
diff --git a/tests/tests/uirendering/res/drawable-nodpi/black1.png b/tests/tests/uirendering/res/drawable-nodpi/black1.png
index bbfc2c1..d1c246a 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/black1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/black1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/blackitalic1.png b/tests/tests/uirendering/res/drawable-nodpi/blackitalic1.png
index 6a8a830..d162afc 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/blackitalic1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/blackitalic1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/bold1.png b/tests/tests/uirendering/res/drawable-nodpi/bold1.png
index cd0465b..b9f5218 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/bold1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/bold1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/bolditalic1.png b/tests/tests/uirendering/res/drawable-nodpi/bolditalic1.png
index 0819c8a..3a0aa23 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/bolditalic1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/bolditalic1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/condensed1.png b/tests/tests/uirendering/res/drawable-nodpi/condensed1.png
index 16f03e2..88c8bef 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/condensed1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/condensed1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/condensedbold1.png b/tests/tests/uirendering/res/drawable-nodpi/condensedbold1.png
index 98174f0..8318a51 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/condensedbold1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/condensedbold1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/condensedbolditalic1.png b/tests/tests/uirendering/res/drawable-nodpi/condensedbolditalic1.png
index 8b017ba..4cae84d 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/condensedbolditalic1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/condensedbolditalic1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/condenseditalic1.png b/tests/tests/uirendering/res/drawable-nodpi/condenseditalic1.png
index 5fc1f9c..50d0d38 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/condenseditalic1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/condenseditalic1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/condensedlight1.png b/tests/tests/uirendering/res/drawable-nodpi/condensedlight1.png
index 1aca9cf..df758a5 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/condensedlight1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/condensedlight1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/condensedlightitalic1.png b/tests/tests/uirendering/res/drawable-nodpi/condensedlightitalic1.png
index 47ecd67..f2959d6 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/condensedlightitalic1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/condensedlightitalic1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/hello1.png b/tests/tests/uirendering/res/drawable-nodpi/hello1.png
index 6c9cb58..6ae9850 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/hello1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/hello1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/italic1.png b/tests/tests/uirendering/res/drawable-nodpi/italic1.png
index 0afb3ae..5083186 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/italic1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/italic1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/light1.png b/tests/tests/uirendering/res/drawable-nodpi/light1.png
index 6822edb..bb829d7 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/light1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/light1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/lightitalic1.png b/tests/tests/uirendering/res/drawable-nodpi/lightitalic1.png
index b49d2d6..ee3a210 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/lightitalic1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/lightitalic1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/medium1.png b/tests/tests/uirendering/res/drawable-nodpi/medium1.png
index 5b187bc..c4c047d 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/medium1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/medium1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/mediumitalic1.png b/tests/tests/uirendering/res/drawable-nodpi/mediumitalic1.png
index 057edc0..1f94b86 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/mediumitalic1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/mediumitalic1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/thin1.png b/tests/tests/uirendering/res/drawable-nodpi/thin1.png
index a780f16..af0aabd 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/thin1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/thin1.png
Binary files differ
diff --git a/tests/tests/uirendering/res/drawable-nodpi/thinitalic1.png b/tests/tests/uirendering/res/drawable-nodpi/thinitalic1.png
index 6ddb52b..da6c3bc 100644
--- a/tests/tests/uirendering/res/drawable-nodpi/thinitalic1.png
+++ b/tests/tests/uirendering/res/drawable-nodpi/thinitalic1.png
Binary files differ
diff --git a/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ShadowTests.java b/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ShadowTests.java
index 2ca8bc8..ec5c773 100644
--- a/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ShadowTests.java
+++ b/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ShadowTests.java
@@ -48,7 +48,7 @@
Color.rgb(shadowColorValue, shadowColorValue, shadowColorValue),
Color.rgb(shadowColorValue, shadowColorValue, shadowColorValue),
},
- 30);
+ 35);
createTest()
.addLayout(R.layout.simple_shadow_layout, null, true/* HW only */)
.runWithVerifier(verifier);
diff --git a/tests/tests/view/res/drawable/custom_pointer_icon.xml b/tests/tests/view/res/drawable/custom_pointer_icon.xml
new file mode 100644
index 0000000..fc5a9e1
--- /dev/null
+++ b/tests/tests/view/res/drawable/custom_pointer_icon.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ 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.
+-->
+
+<pointer-icon xmlns:android="http://schemas.android.com/apk/res/android"
+ android:bitmap="@drawable/icon_red"
+ android:hotSpotX="16dp"
+ android:hotSpotY="16dp" />
diff --git a/tests/tests/view/res/layout/view_layout.xml b/tests/tests/view/res/layout/view_layout.xml
index 07a9f0d..9769aa4 100644
--- a/tests/tests/view/res/layout/view_layout.xml
+++ b/tests/tests/view/res/layout/view_layout.xml
@@ -110,13 +110,16 @@
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="50px"
+ android:layout_height="70px"
android:pointerShape="crosshair">
<View android:layout_width="match_parent"
android:layout_height="20px"
android:pointerShape="help"/>
<View android:layout_width="match_parent"
android:layout_height="20px"/>
+ <View android:layout_width="match_parent"
+ android:layout_height="20px"
+ android:pointerShape="@drawable/custom_pointer_icon"/>
</LinearLayout>
</LinearLayout>
diff --git a/tests/tests/view/src/android/view/cts/MockView.java b/tests/tests/view/src/android/view/cts/MockView.java
index d6939dc..0a56369 100644
--- a/tests/tests/view/src/android/view/cts/MockView.java
+++ b/tests/tests/view/src/android/view/cts/MockView.java
@@ -17,7 +17,6 @@
package android.view.cts;
import android.content.Context;
-import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
@@ -28,9 +27,9 @@
import android.view.ContextMenu;
import android.view.KeyEvent;
import android.view.MotionEvent;
+import android.view.PointerIcon;
import android.view.View;
import android.view.ViewGroup;
-import android.view.ViewParent;
import android.view.ContextMenu.ContextMenuInfo;
public class MockView extends View {
@@ -70,6 +69,7 @@
private boolean mCalledComputeScroll = false;
private boolean mCalledDispatchKeyEventPreIme = false;
private boolean mCalledOnKeyPreIme = false;
+ private boolean mCalledGetPointerIcon = false;
private int mOldWidth = -1;
private int mOldHeight = -1;
@@ -606,6 +606,16 @@
return mCalledOnKeyPreIme;
}
+ @Override
+ public PointerIcon getPointerIcon(MotionEvent event, float x, float y) {
+ mCalledGetPointerIcon = true;
+ return super.getPointerIcon(event, x, y);
+ }
+
+ public boolean hasCalledGetPointerIcon() {
+ return mCalledGetPointerIcon;
+ }
+
public void reset() {
mCalledOnCreateContextMenu = false;
@@ -644,6 +654,7 @@
mCalledComputeScroll = false;
mCalledDispatchKeyEventPreIme = false;
mCalledOnKeyPreIme = false;
+ mCalledGetPointerIcon = false;
mOldWidth = -1;
mOldHeight = -1;
diff --git a/tests/tests/view/src/android/view/cts/ViewTest.java b/tests/tests/view/src/android/view/cts/ViewTest.java
index c3fe030..1e23660 100644
--- a/tests/tests/view/src/android/view/cts/ViewTest.java
+++ b/tests/tests/view/src/android/view/cts/ViewTest.java
@@ -18,6 +18,7 @@
import static org.mockito.Mockito.*;
+import android.graphics.BitmapFactory;
import com.android.internal.view.menu.ContextMenuBuilder;
import android.content.Context;
@@ -353,29 +354,104 @@
assertNull(view.getTouchDelegate());
}
+ public void testMouseEventCallsGetPointerIcon() {
+ final MockView view = (MockView) mActivity.findViewById(R.id.mock_view);
+
+ final int[] xy = new int[2];
+ view.getLocationOnScreen(xy);
+ final int viewWidth = view.getWidth();
+ final int viewHeight = view.getHeight();
+ float x = xy[0] + viewWidth / 2.0f;
+ float y = xy[1] + viewHeight / 2.0f;
+
+ long eventTime = SystemClock.uptimeMillis();
+
+ MotionEvent.PointerCoords[] pointerCoords = new MotionEvent.PointerCoords[1];
+ pointerCoords[0] = new MotionEvent.PointerCoords();
+ pointerCoords[0].x = x;
+ pointerCoords[0].y = y;
+
+ final int[] pointerIds = new int[1];
+ pointerIds[0] = 0;
+
+ MotionEvent event = MotionEvent.obtain(0, eventTime, MotionEvent.ACTION_HOVER_MOVE,
+ 1, pointerIds, pointerCoords, 0, 0, 0, 0, 0, InputDevice.SOURCE_MOUSE, 0);
+ getInstrumentation().sendPointerSync(event);
+ getInstrumentation().waitForIdleSync();
+
+ assertTrue(view.hasCalledGetPointerIcon());
+
+ final MockView view2 = (MockView) mActivity.findViewById(R.id.scroll_view);
+ assertFalse(view2.hasCalledGetPointerIcon());
+ }
+
public void testAccessPointerShape() {
View view = mActivity.findViewById(R.id.pointer_icon_layout);
MotionEvent event = MotionEvent.obtain(0, 0, MotionEvent.ACTION_HOVER_MOVE,
view.getX(), view.getY(), 0);
+ // First view has pointerShape="help"
assertEquals(PointerIcon.getSystemIcon(mActivity, PointerIcon.STYLE_HELP),
view.getPointerIcon(event, 0, 0));
+ // Second view inherits pointerShape="crosshair" from the parent
event.setLocation(0, 21);
assertEquals(PointerIcon.getSystemIcon(mActivity, PointerIcon.STYLE_CROSSHAIR),
view.getPointerIcon(event, 0, 21));
+
+ // Third view has custom pointer shape defined in a resource.
event.setLocation(0, 41);
+ assertNotNull(view.getPointerIcon(event, 0, 41));
+
+ // Parent view has pointerShape="crosshair"
+ event.setLocation(0, 61);
assertEquals(PointerIcon.getSystemIcon(mActivity, PointerIcon.STYLE_CROSSHAIR),
- view.getPointerIcon(event, 0, 41));
- event.setLocation(0, 51);
- assertNull(view.getPointerIcon(event, 0, 51));
+ view.getPointerIcon(event, 0, 61));
+
+ // Outside of the parent view, no pointer shape defined.
+ event.setLocation(0, 71);
+ assertNull(view.getPointerIcon(event, 0, 71));
view.setPointerIcon(PointerIcon.getSystemIcon(mActivity, PointerIcon.STYLE_TEXT));
assertEquals(PointerIcon.getSystemIcon(mActivity, PointerIcon.STYLE_TEXT),
- view.getPointerIcon(event, 0, 51));
+ view.getPointerIcon(event, 0,71));
event.recycle();
}
+ public void testCreatePointerIcons() {
+ assertSystemPointerIcon(PointerIcon.STYLE_NULL);
+ assertSystemPointerIcon(PointerIcon.STYLE_DEFAULT);
+ assertSystemPointerIcon(PointerIcon.STYLE_ARROW);
+ assertSystemPointerIcon(PointerIcon.STYLE_CONTEXT_MENU);
+ assertSystemPointerIcon(PointerIcon.STYLE_HAND);
+ assertSystemPointerIcon(PointerIcon.STYLE_HELP);
+ assertSystemPointerIcon(PointerIcon.STYLE_WAIT);
+ assertSystemPointerIcon(PointerIcon.STYLE_CELL);
+ assertSystemPointerIcon(PointerIcon.STYLE_CROSSHAIR);
+ assertSystemPointerIcon(PointerIcon.STYLE_TEXT);
+ assertSystemPointerIcon(PointerIcon.STYLE_VERTICAL_TEXT);
+ assertSystemPointerIcon(PointerIcon.STYLE_ALIAS);
+ assertSystemPointerIcon(PointerIcon.STYLE_COPY);
+ assertSystemPointerIcon(PointerIcon.STYLE_NO_DROP);
+ assertSystemPointerIcon(PointerIcon.STYLE_ALL_SCROLL);
+ assertSystemPointerIcon(PointerIcon.STYLE_HORIZONTAL_DOUBLE_ARROW);
+ assertSystemPointerIcon(PointerIcon.STYLE_VERTICAL_DOUBLE_ARROW);
+ assertSystemPointerIcon(PointerIcon.STYLE_TOP_RIGHT_DIAGONAL_DOUBLE_ARROW);
+ assertSystemPointerIcon(PointerIcon.STYLE_TOP_LEFT_DIAGONAL_DOUBLE_ARROW);
+ assertSystemPointerIcon(PointerIcon.STYLE_ZOOM_IN);
+ assertSystemPointerIcon(PointerIcon.STYLE_ZOOM_OUT);
+ assertSystemPointerIcon(PointerIcon.STYLE_GRAB);
+
+ assertNotNull(PointerIcon.loadCustomIcon(mResources, R.drawable.custom_pointer_icon));
+
+ Bitmap bitmap = BitmapFactory.decodeResource(mResources, R.drawable.icon_blue);
+ assertNotNull(PointerIcon.createCustomIcon(bitmap, 0, 0));
+ }
+
+ private void assertSystemPointerIcon(int style) {
+ assertNotNull(PointerIcon.getSystemIcon(mActivity, style));
+ }
+
@UiThreadTest
public void testAccessTag() {
ViewGroup viewGroup = (ViewGroup) mActivity.findViewById(R.id.viewlayout_root);
diff --git a/tests/tests/view/src/android/view/inputmethod/cts/InputConnectionWrapperTest.java b/tests/tests/view/src/android/view/inputmethod/cts/InputConnectionWrapperTest.java
index 432fa20..b939346 100644
--- a/tests/tests/view/src/android/view/inputmethod/cts/InputConnectionWrapperTest.java
+++ b/tests/tests/view/src/android/view/inputmethod/cts/InputConnectionWrapperTest.java
@@ -18,6 +18,7 @@
import android.os.Bundle;
+import android.os.Handler;
import android.test.AndroidTestCase;
import android.text.TextUtils;
import android.view.KeyEvent;
@@ -88,6 +89,9 @@
assertTrue(inputConnection.isSetComposingRegionCalled);
wrapper.requestCursorUpdates(InputConnection.CURSOR_UPDATE_IMMEDIATE);
assertTrue(inputConnection.isRequestCursorUpdatesCalled);
+ assertFalse(inputConnection.isGetHandlerCalled);
+ assertNull(inputConnection.getHandler());
+ assertTrue(inputConnection.isGetHandlerCalled);
}
private class MockInputConnection implements InputConnection {
@@ -114,6 +118,7 @@
public boolean isSetComposingRegionCalled;
public boolean isSetSelectionCalled;
public boolean isRequestCursorUpdatesCalled;
+ public boolean isGetHandlerCalled;
public boolean beginBatchEdit() {
isBeginBatchEditCalled = true;
@@ -229,5 +234,10 @@
isRequestCursorUpdatesCalled = true;
return false;
}
+
+ public Handler getHandler() {
+ isGetHandlerCalled = true;
+ return null;
+ }
}
}
diff --git a/tests/tests/view/src/android/view/inputmethod/cts/InputMethodInfoTest.java b/tests/tests/view/src/android/view/inputmethod/cts/InputMethodInfoTest.java
index 1a067b4..2b02324 100644
--- a/tests/tests/view/src/android/view/inputmethod/cts/InputMethodInfoTest.java
+++ b/tests/tests/view/src/android/view/inputmethod/cts/InputMethodInfoTest.java
@@ -25,6 +25,7 @@
import android.content.pm.ServiceInfo;
import android.content.res.Resources;
import android.os.Parcel;
+import android.os.storage.StorageManager;
import android.test.AndroidTestCase;
import android.util.Printer;
import android.view.inputmethod.InputMethod;
@@ -37,7 +38,6 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.HashMap;
import java.util.List;
public class InputMethodInfoTest extends AndroidTestCase {
@@ -202,10 +202,9 @@
return;
}
- final InputMethodManager imm = (InputMethodManager) mContext
- .getSystemService(Context.INPUT_METHOD_SERVICE);
+ final InputMethodManager imm = mContext.getSystemService(InputMethodManager.class);
final List<InputMethodInfo> imis = imm.getInputMethodList();
- final ArrayList<String> localeList = new ArrayList<String>(Arrays.asList(
+ final ArrayList<String> localeList = new ArrayList<>(Arrays.asList(
Resources.getSystem().getAssets().getLocales()));
boolean foundEnabledSystemImeSubtypeWithValidLanguage = false;
for (InputMethodInfo imi : imis) {
@@ -239,6 +238,36 @@
assertTrue(foundEnabledSystemImeSubtypeWithValidLanguage);
}
+ public void testAtLeastOneEncryptionAwareInputMethodIsAvailable() {
+ if (!getContext().getPackageManager().hasSystemFeature(
+ PackageManager.FEATURE_INPUT_METHODS)) {
+ return;
+ }
+
+ if (!StorageManager.isFileBasedEncryptionEnabled()) {
+ return;
+ }
+
+ final InputMethodManager imm = mContext.getSystemService(InputMethodManager.class);
+ final List<InputMethodInfo> imis = imm.getInputMethodList();
+ boolean hasEncryptionAwareInputMethod = false;
+ for (final InputMethodInfo imi : imis) {
+ final ServiceInfo serviceInfo = imi.getServiceInfo();
+ if (serviceInfo == null) {
+ continue;
+ }
+ if ((serviceInfo.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) !=
+ ApplicationInfo.FLAG_SYSTEM) {
+ continue;
+ }
+ if (serviceInfo.encryptionAware) {
+ hasEncryptionAwareInputMethod = true;
+ break;
+ }
+ }
+ assertTrue(hasEncryptionAwareInputMethod);
+ }
+
class MockPrinter implements Printer {
@Override
public void println(String x) {
diff --git a/tests/tests/widget/src/android/widget/cts/PopupWindowTest.java b/tests/tests/widget/src/android/widget/cts/PopupWindowTest.java
index ff580e3..db67787 100644
--- a/tests/tests/widget/src/android/widget/cts/PopupWindowTest.java
+++ b/tests/tests/widget/src/android/widget/cts/PopupWindowTest.java
@@ -494,7 +494,7 @@
TransitionListener exitListener = mock(TransitionListener.class);
Transition exitTransition = new BaseTransition();
- enterTransition.addListener(enterListener);
+ exitTransition.addListener(exitListener);
OnDismissListener dismissListener = mock(OnDismissListener.class);
@@ -513,7 +513,7 @@
}
});
mInstrumentation.waitForIdleSync();
- verify(enterListener, times(1)).onTransitionStart(enterTransition);
+ verify(enterListener, times(1)).onTransitionStart(any(Transition.class));
verify(exitListener, never()).onTransitionStart(any(Transition.class));
verify(dismissListener, never()).onDismiss();
@@ -523,13 +523,9 @@
}
});
mInstrumentation.waitForIdleSync();
- verify(enterListener, times(1)).onTransitionStart(enterTransition);
- verify(exitListener, times(1)).onTransitionStart(exitTransition);
+ verify(enterListener, times(1)).onTransitionStart(any(Transition.class));
+ verify(exitListener, times(1)).onTransitionStart(any(Transition.class));
verify(dismissListener, times(1)).onDismiss();
-
- InOrder inOrder = inOrder(exitListener, dismissListener);
- inOrder.verify(exitListener).onTransitionEnd(exitTransition);
- inOrder.verify(dismissListener).onDismiss();
}
public void testUpdatePositionAndDimension() {
@@ -860,7 +856,7 @@
private View createPopupContent() {
View popupView = new View(mActivity);
popupView.setLayoutParams(new ViewGroup.LayoutParams(50, 50));
- popupView.setBackgroundColor(Color.WHITE);
+ popupView.setBackgroundColor(Color.MAGENTA);
return popupView;
}
diff --git a/tests/tests/widget/src/android/widget/cts/ToolbarTest.java b/tests/tests/widget/src/android/widget/cts/ToolbarTest.java
index 6bbcd4c..09414ce 100644
--- a/tests/tests/widget/src/android/widget/cts/ToolbarTest.java
+++ b/tests/tests/widget/src/android/widget/cts/ToolbarTest.java
@@ -47,7 +47,7 @@
@UiThreadTest
public void testSetTitleMargins() {
- Toolbar toolbar = new Toolbar(mContext);
+ Toolbar toolbar = new Toolbar(mContext, null, 0, 0);
assertEquals(0, toolbar.getTitleMarginStart());
assertEquals(0, toolbar.getTitleMarginTop());
assertEquals(0, toolbar.getTitleMarginEnd());
diff --git a/tools/cts-device-info/src/com/android/cts/deviceinfo/SampleDeviceInfo.java b/tools/cts-device-info/src/com/android/cts/deviceinfo/SampleDeviceInfo.java
index 9e0dd23..8d3d7ada 100644
--- a/tools/cts-device-info/src/com/android/cts/deviceinfo/SampleDeviceInfo.java
+++ b/tools/cts-device-info/src/com/android/cts/deviceinfo/SampleDeviceInfo.java
@@ -18,7 +18,7 @@
import android.os.Bundle;
import com.android.compatibility.common.deviceinfo.DeviceInfo;
-import com.android.compatibility.common.util.InfoStore;
+import com.android.compatibility.common.util.DeviceInfoStore;
import java.util.Arrays;
@@ -28,7 +28,7 @@
public class SampleDeviceInfo extends DeviceInfo {
@Override
- protected void collectDeviceInfo(InfoStore store) throws Exception {
+ protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
boolean[] booleans = {Boolean.TRUE, Boolean.FALSE};
double[] doubles = {Double.MAX_VALUE, Double.MIN_VALUE};
int[] ints = {Integer.MAX_VALUE, Integer.MIN_VALUE};
diff --git a/tools/cts-tradefed/Android.mk b/tools/cts-tradefed/Android.mk
index 2f743e6..adc6386 100644
--- a/tools/cts-tradefed/Android.mk
+++ b/tools/cts-tradefed/Android.mk
@@ -21,7 +21,8 @@
LOCAL_JAVA_RESOURCE_DIRS := res
LOCAL_JAVA_RESOURCE_DIRS += ../../common/host-side/tradefed/res
-LOCAL_SUITE_BUILD_NUMBER := $(BUILD_NUMBER)
+LOCAL_SUITE_BUILD_NUMBER := $(BUILD_NUMBER_FROM_FILE)
+LOCAL_SUITE_TARGET_ARCH := $(TARGET_ARCH)
LOCAL_SUITE_NAME := CTS_V2
LOCAL_SUITE_FULLNAME := "Compatibility Test Suite"
LOCAL_SUITE_VERSION := 5.0
diff --git a/tools/cts-tradefed/res/config/basic-reporters.xml b/tools/cts-tradefed/res/config/basic-reporters.xml
new file mode 100644
index 0000000..df51e4c
--- /dev/null
+++ b/tools/cts-tradefed/res/config/basic-reporters.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ 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.
+-->
+<configuration description="Configuration with basic cts v2 reporters" >
+</configuration>
diff --git a/tools/cts-tradefed/res/config/cts-preconditions.xml b/tools/cts-tradefed/res/config/cts-preconditions.xml
index 0aa1af2..7f93182 100644
--- a/tools/cts-tradefed/res/config/cts-preconditions.xml
+++ b/tools/cts-tradefed/res/config/cts-preconditions.xml
@@ -19,12 +19,18 @@
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.DynamicConfigPusher">
<option name="target" value="host" />
- <option name="module" value="cts_v2"/>
+ <option name="config-filename" value="cts_v2"/>
<option name="version" value="1.0"/>
</target_preparer>
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.StayAwakePreparer" />
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.SettingsPreparer">
+ <option name="device-setting" value="verifier_verify_adb_installs"/>
+ <option name="setting-type" value="global"/>
+ <option name="set-value" value="0"/>
+ </target_preparer>
+
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.ApkPreconditionCheck">
<option name="apk" value="CtsPreconditions.apk"/>
<option name="package" value="com.android.preconditions.cts"/>
diff --git a/tools/cts-tradefed/res/config/cts.xml b/tools/cts-tradefed/res/config/cts.xml
index 8e34297..8104570 100644
--- a/tools/cts-tradefed/res/config/cts.xml
+++ b/tools/cts-tradefed/res/config/cts.xml
@@ -40,5 +40,5 @@
<option name="expected-value" value="en-US"/> <!-- Device locale should be US English -->
<option name="throw-error" value="false"/> <!-- Only print warning if not en-US -->
</target_preparer>
-
+ <template-include name="reporters" default="basic-reporters" />
</configuration>
diff --git a/tools/utils/buildCts.py b/tools/utils/buildCts.py
index d8529f5..9001440 100755
--- a/tools/utils/buildCts.py
+++ b/tools/utils/buildCts.py
@@ -339,6 +339,7 @@
plan.Exclude('.*')
plan.Include(r'android\.security$')
plan.Include('android\.host\.jdwpsecurity$')
+ plan.Include('android\.host\.abioverride$')
self.__WritePlan(plan, 'Security')
def BuildAospMediumSizeTestList():
@@ -365,7 +366,6 @@
already published to aosp. """
return {
'android.aadb' : [],
- 'android.abioverride' : [],
'android.acceleration' : [],
'android.accessibility' : [],
'android.accessibilityservice' : [],
diff --git a/tools/vm-tests-tf/Android.mk b/tools/vm-tests-tf/Android.mk
index 4958d4e..90410fa 100644
--- a/tools/vm-tests-tf/Android.mk
+++ b/tools/vm-tests-tf/Android.mk
@@ -34,7 +34,7 @@
# ============================================================
include $(CLEAR_VARS)
-# custom variables used to generate test description. do not touch!
+# custom variables used by cts/tools/utils/CollectAllTests.java to generate test description. do not touch!
LOCAL_TEST_TYPE := vmHostTest
LOCAL_JAR_PATH := android.core.vm-tests-tf.jar
@@ -57,25 +57,38 @@
include $(CLEAR_VARS)
LOCAL_JACK_ENABLED := $(strip $(LOCAL_JACK_ENABLED))
-intermediates := $(call intermediates-dir-for,JAVA_LIBRARIES,vm-tests-tf,HOST)
-vmteststf_jar := $(intermediates)/android.core.vm-tests-tf.jar
+LOCAL_MODULE := vm-tests-tf
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
+LOCAL_IS_HOST_MODULE := true
+LOCAL_BUILT_MODULE_STEM := javalib.jar
+intermediates := $(call local-intermediates-dir)
+# Install the module as $(intermediates)/android.core.vm-tests-tf.jar.
+LOCAL_INSTALLED_MODULE_STEM := android.core.vm-tests-tf.jar
+LOCAL_MODULE_PATH := $(intermediates)
+
+LOCAL_COMPATIBILITY_SUITE := cts_v2
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
vmteststf_dep_jars := $(addprefix $(HOST_OUT_JAVA_LIBRARIES)/, cts-tf-dalvik-buildutil.jar dasm.jar dx.jar cfassembler.jar junit.jar)
-$(vmteststf_jar): PRIVATE_JACK_EXTRA_ARGS := $(LOCAL_JACK_EXTRA_ARGS)
+$(LOCAL_BUILT_MODULE): PRIVATE_JACK_EXTRA_ARGS := $(LOCAL_JACK_EXTRA_ARGS)
ifdef LOCAL_JACK_ENABLED
vmteststf_dep_jars += $(cts-tf-dalvik-lib.jack)
endif
-$(vmteststf_jar): PRIVATE_SRC_FOLDER := $(LOCAL_PATH)/src
-$(vmteststf_jar): PRIVATE_INTERMEDIATES_CLASSES := $(call intermediates-dir-for,JAVA_LIBRARIES,cts-tf-dalvik-buildutil,HOST)/classes
-$(vmteststf_jar): PRIVATE_INTERMEDIATES := $(intermediates)/tests
-$(vmteststf_jar): PRIVATE_INTERMEDIATES_DEXCORE_JAR := $(intermediates)/tests/dot/junit/dexcore.jar
-$(vmteststf_jar): PRIVATE_INTERMEDIATES_MAIN_FILES := $(intermediates)/main_files
-$(vmteststf_jar): PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES := $(intermediates)/hostjunit_files
-$(vmteststf_jar): PRIVATE_CLASS_PATH := $(subst $(space),:,$(vmteststf_dep_jars)):$(HOST_JDK_TOOLS_JAR)
+$(LOCAL_BUILT_MODULE): PRIVATE_SRC_FOLDER := $(LOCAL_PATH)/src
+$(LOCAL_BUILT_MODULE): PRIVATE_INTERMEDIATES_CLASSES := $(call intermediates-dir-for,JAVA_LIBRARIES,cts-tf-dalvik-buildutil,HOST)/classes
+$(LOCAL_BUILT_MODULE): PRIVATE_INTERMEDIATES := $(intermediates)/tests
+$(LOCAL_BUILT_MODULE): PRIVATE_INTERMEDIATES_DEXCORE_JAR := $(intermediates)/tests/dot/junit/dexcore.jar
+$(LOCAL_BUILT_MODULE): PRIVATE_INTERMEDIATES_MAIN_FILES := $(intermediates)/main_files
+$(LOCAL_BUILT_MODULE): PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES := $(intermediates)/hostjunit_files
+$(LOCAL_BUILT_MODULE): PRIVATE_CLASS_PATH := $(subst $(space),:,$(vmteststf_dep_jars)):$(HOST_JDK_TOOLS_JAR)
+$(LOCAL_BUILT_MODULE): PRIVATE_JACK_VERSION := $(LOCAL_JACK_VERSION)
ifndef LOCAL_JACK_ENABLED
-$(vmteststf_jar) : $(vmteststf_dep_jars) $(HOST_OUT_JAVA_LIBRARIES)/tradefed-prebuilt.jar
+$(LOCAL_BUILT_MODULE) : $(vmteststf_dep_jars) $(HOST_OUT_JAVA_LIBRARIES)/tradefed-prebuilt.jar
$(hide) rm -rf $(dir $@) && mkdir -p $(dir $@)
$(hide) mkdir -p $(PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES)/dot/junit $(dir $(PRIVATE_INTERMEDIATES_DEXCORE_JAR))
# generated and compile the host side junit tests
@@ -88,35 +101,36 @@
$(addprefix -C $(PRIVATE_INTERMEDIATES_CLASSES) , dot/junit/DxUtil.class dot/junit/DxAbstractMain.class)
$(hide) $(DX) -JXms16M -JXmx768M --dex --output=$(PRIVATE_INTERMEDIATES_DEXCORE_JAR) \
$(if $(NO_OPTIMIZE_DX), --no-optimize) $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).jar && rm -f $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).jar
- $(hide) cd $(PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES)/classes && zip -q -r ../../android.core.vm-tests-tf.jar .
- $(hide) cd $(dir $@) && zip -q -r android.core.vm-tests-tf.jar tests
+ $(hide) cd $(PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES)/classes && zip -q -r ../../$(notdir $@) .
+ $(hide) cd $(dir $@) && zip -q -r $(notdir $@) tests
else # LOCAL_JACK_ENABLED
oj_jack := $(call intermediates-dir-for,JAVA_LIBRARIES,core-oj,,COMMON)/classes.jack
libart_jack := $(call intermediates-dir-for,JAVA_LIBRARIES,core-libart,,COMMON)/classes.jack
-$(vmteststf_jar): PRIVATE_DALVIK_SUITE_CLASSPATH := $(oj_jack):$(libart_jack):$(cts-tf-dalvik-lib.jack):$(HOST_OUT_JAVA_LIBRARIES)/tradefed-prebuilt.jar
-$(vmteststf_jar) : $(vmteststf_dep_jars) $(JACK) $(oj_jack) $(libart_jack) $(HOST_OUT_JAVA_LIBRARIES)/tradefed-prebuilt.jar | setup-jack-server
+$(LOCAL_BUILT_MODULE): PRIVATE_DALVIK_SUITE_CLASSPATH := $(oj_jack):$(libart_jack):$(cts-tf-dalvik-lib.jack):$(HOST_OUT_JAVA_LIBRARIES)/tradefed-prebuilt.jar
+$(LOCAL_BUILT_MODULE) : $(vmteststf_dep_jars) $(JACK) $(oj_jack) $(libart_jack) $(HOST_OUT_JAVA_LIBRARIES)/tradefed-prebuilt.jar | setup-jack-server
$(hide) rm -rf $(dir $@) && mkdir -p $(dir $@)
$(hide) mkdir -p $(PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES)/dot/junit $(dir $(PRIVATE_INTERMEDIATES_DEXCORE_JAR))
# generated and compile the host side junit tests
@echo "Write generated Main_*.java files to $(PRIVATE_INTERMEDIATES_MAIN_FILES)"
- $(hide) JACK_VERSION=$(JACK_DEFAULT_VERSION) java -cp $(PRIVATE_CLASS_PATH) util.build.JackBuildDalvikSuite $(JACK) $(PRIVATE_SRC_FOLDER) $(PRIVATE_INTERMEDIATES) \
+ $(hide) JACK_VERSION=$(PRIVATE_JACK_VERSION) java -cp $(PRIVATE_CLASS_PATH) util.build.JackBuildDalvikSuite $(JACK) $(PRIVATE_SRC_FOLDER) $(PRIVATE_INTERMEDIATES) \
$(PRIVATE_DALVIK_SUITE_CLASSPATH) \
$(PRIVATE_INTERMEDIATES_MAIN_FILES) $(PRIVATE_INTERMEDIATES_CLASSES) $(PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES) $$RUN_VM_TESTS_RTO
@echo "Generate $(PRIVATE_INTERMEDIATES_DEXCORE_JAR)"
$(hide) jar -cf $(PRIVATE_INTERMEDIATES_DEXCORE_JAR)-class.jar \
$(addprefix -C $(PRIVATE_INTERMEDIATES_CLASSES) , dot/junit/DxUtil.class dot/junit/DxAbstractMain.class)
- $(hide) $(JACK) --import $(PRIVATE_INTERMEDIATES_DEXCORE_JAR)-class.jar --output-jack $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).jack
+ $(hide) $(call call-jack) --import $(PRIVATE_INTERMEDIATES_DEXCORE_JAR)-class.jar --output-jack $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).jack
$(hide) mkdir -p $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).tmp
$(hide) $(call call-jack,$(PRIVATE_JACK_EXTRA_ARGS)) --output-dex $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).tmp \
$(if $(NO_OPTIMIZE_DX), -D jack.dex.optimize "false") --import $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).jack && rm -f $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).jack
$(hide) cd $(PRIVATE_INTERMEDIATES_DEXCORE_JAR).tmp && zip -q -r $(abspath $(PRIVATE_INTERMEDIATES_DEXCORE_JAR)) .
- $(hide) cd $(PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES)/classes && zip -q -r ../../android.core.vm-tests-tf.jar .
- $(hide) cd $(dir $@) && zip -q -r android.core.vm-tests-tf.jar tests
+ $(hide) cd $(PRIVATE_INTERMEDIATES_HOSTJUNIT_FILES)/classes && zip -q -r ../../$(notdir $@) .
+ $(hide) cd $(dir $@) && zip -q -r $(notdir $@) tests
oj_jack :=
libart_jack :=
endif # LOCAL_JACK_ENABLED
# Clean up temp vars
intermediates :=
-vmteststf_jar :=
vmteststf_dep_jars :=
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/hostsidetests/vm/AndroidTest.xml b/tools/vm-tests-tf/AndroidTest.xml
similarity index 100%
rename from hostsidetests/vm/AndroidTest.xml
rename to tools/vm-tests-tf/AndroidTest.xml
diff --git a/hostsidetests/vm/targetprep/Android.mk b/tools/vm-tests-tf/targetprep/Android.mk
similarity index 100%
rename from hostsidetests/vm/targetprep/Android.mk
rename to tools/vm-tests-tf/targetprep/Android.mk
diff --git a/hostsidetests/vm/targetprep/src/android/core/vm/targetprep/VmTestPreparer.java b/tools/vm-tests-tf/targetprep/src/android/core/vm/targetprep/VmTestPreparer.java
similarity index 100%
rename from hostsidetests/vm/targetprep/src/android/core/vm/targetprep/VmTestPreparer.java
rename to tools/vm-tests-tf/targetprep/src/android/core/vm/targetprep/VmTestPreparer.java