From 3f3e3e87e2a8f899d896c0c54441a37a23fdba3b Mon Sep 17 00:00:00 2001 From: Aaron Whyte Date: Fri, 9 May 2014 14:43:07 -0700 Subject: Disallow FEATURE_INDETERMINATE_PROGRESS for clockwork. Make LauncherActivity CTS tests pass on clockwork. Bug: 14657859 Change-Id: I0a8641894b41058f53a5bf241763a9a0605244d1 --- policy/src/com/android/internal/policy/impl/PhoneWindow.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'policy/src') diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 78020e9..0961a33 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -278,6 +278,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { throw new AndroidRuntimeException( "You cannot combine swipe dismissal and the action bar."); } + + if (featureId == FEATURE_INDETERMINATE_PROGRESS && + getContext().getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) { + throw new AndroidRuntimeException("You cannot use indeterminate progress on a watch."); + } return super.requestFeature(featureId); } -- cgit v1.1