summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorAaron Whyte <awhyte@google.com>2014-05-12 22:08:53 -0700
committerAaron Whyte <awhyte@google.com>2014-05-12 22:08:53 -0700
commit1fb617fecd68c69f510164fc42aba0bc38c2cf66 (patch)
tree1c7af0743f8dbb3117983697e78289b45d688bc7 /policy
parentd6a8e083c23b4ddc53a89c7f77b9f1c78d793031 (diff)
downloadframeworks_base-1fb617fecd68c69f510164fc42aba0bc38c2cf66.zip
frameworks_base-1fb617fecd68c69f510164fc42aba0bc38c2cf66.tar.gz
frameworks_base-1fb617fecd68c69f510164fc42aba0bc38c2cf66.tar.bz2
Disallow FEATURE_INDETERMINATE_PROGRESS for clockwork.
Make LauncherActivity CTS tests pass on clockwork. Bug: 14657859 Change-Id: I342eea5afafd56bed9b4138b97c2e906a10d300d
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindow.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 78020e9..c670b5c 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -43,6 +43,7 @@ import com.android.internal.widget.SwipeDismissLayout;
import android.app.KeyguardManager;
import android.content.Context;
import android.content.pm.ActivityInfo;
+import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
@@ -278,6 +279,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);
}