diff options
author | Aaron Whyte <awhyte@google.com> | 2014-05-09 14:43:07 -0700 |
---|---|---|
committer | Aaron Whyte <awhyte@google.com> | 2014-05-12 17:20:02 -0700 |
commit | 3f3e3e87e2a8f899d896c0c54441a37a23fdba3b (patch) | |
tree | dd3088845614319224eb07a1451f0919e963b1e5 | |
parent | 8028e4a063b49aadfb08fab012d2388a7466a9a1 (diff) | |
download | frameworks_base-3f3e3e87e2a8f899d896c0c54441a37a23fdba3b.zip frameworks_base-3f3e3e87e2a8f899d896c0c54441a37a23fdba3b.tar.gz frameworks_base-3f3e3e87e2a8f899d896c0c54441a37a23fdba3b.tar.bz2 |
Disallow FEATURE_INDETERMINATE_PROGRESS for clockwork.
Make LauncherActivity CTS tests pass on clockwork.
Bug: 14657859
Change-Id: I0a8641894b41058f53a5bf241763a9a0605244d1
-rw-r--r-- | core/java/android/app/LauncherActivity.java | 12 | ||||
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 5 |
2 files changed, 13 insertions, 4 deletions
diff --git a/core/java/android/app/LauncherActivity.java b/core/java/android/app/LauncherActivity.java index 96c7246..5657aad 100644 --- a/core/java/android/app/LauncherActivity.java +++ b/core/java/android/app/LauncherActivity.java @@ -340,9 +340,11 @@ public abstract class LauncherActivity extends ListActivity { super.onCreate(icicle); mPackageManager = getPackageManager(); - - requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); - setProgressBarIndeterminateVisibility(true); + + if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) { + requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); + setProgressBarIndeterminateVisibility(true); + } onSetContentView(); mIconResizer = new IconResizer(); @@ -357,7 +359,9 @@ public abstract class LauncherActivity extends ListActivity { updateAlertTitle(); updateButtonText(); - setProgressBarIndeterminateVisibility(false); + if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) { + setProgressBarIndeterminateVisibility(false); + } } private void updateAlertTitle() { 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); } |