Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f3e3e87 authored by Aaron Whyte's avatar Aaron Whyte
Browse files

Disallow FEATURE_INDETERMINATE_PROGRESS for clockwork.

Make LauncherActivity CTS tests pass on clockwork.
Bug: 14657859

Change-Id: I0a8641894b41058f53a5bf241763a9a0605244d1
parent 8028e4a0
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -341,8 +341,10 @@ public abstract class LauncherActivity extends ListActivity {
        
        mPackageManager = getPackageManager();

        if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
            requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
            setProgressBarIndeterminateVisibility(true);
        }
        onSetContentView();

        mIconResizer = new IconResizer();
@@ -357,8 +359,10 @@ public abstract class LauncherActivity extends ListActivity {
        updateAlertTitle();
        updateButtonText();

        if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)) {
            setProgressBarIndeterminateVisibility(false);
        }
    }

    private void updateAlertTitle() {
        TextView alertTitle = (TextView) findViewById(com.android.internal.R.id.alertTitle);
+5 −0
Original line number Diff line number Diff line
@@ -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);
    }