diff options
author | Aaron Whyte <awhyte@google.com> | 2014-05-13 20:32:21 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-05-13 20:32:21 +0000 |
commit | 5ff35f8a7fa543e43b2e1ea8a23ba6d32563e34b (patch) | |
tree | 78d188626dbdee3b851ed635c1cf4c5e6edb9939 /policy | |
parent | e95500878c5a36b9b930aaf0c2bdc9cfe4601f1e (diff) | |
parent | 1fb617fecd68c69f510164fc42aba0bc38c2cf66 (diff) | |
download | frameworks_base-5ff35f8a7fa543e43b2e1ea8a23ba6d32563e34b.zip frameworks_base-5ff35f8a7fa543e43b2e1ea8a23ba6d32563e34b.tar.gz frameworks_base-5ff35f8a7fa543e43b2e1ea8a23ba6d32563e34b.tar.bz2 |
Merge "Disallow FEATURE_INDETERMINATE_PROGRESS for clockwork. Make LauncherActivity CTS tests pass on clockwork. Bug: 14657859" into klp-modular-dev
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 6 |
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); } |