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

Commit 71dfd44c authored by Aaron Whyte's avatar Aaron Whyte Committed by Android Git Automerger
Browse files

am 064789ef: am 24f3d091: Merge "Disallow FEATURE_INDETERMINATE_PROGRESS for...

am 064789ef: am 24f3d091: Merge "Disallow FEATURE_INDETERMINATE_PROGRESS for clockwork. Make LauncherActivity CTS tests pass on clockwork. Bug: 14657859" into klp-modular-dev

* commit '064789ef':
  Disallow FEATURE_INDETERMINATE_PROGRESS for clockwork. Make LauncherActivity CTS tests pass on clockwork. Bug: 14657859
parents 5152c098 064789ef
Loading
Loading
Loading
Loading
+8 −4
Original line number Original line Diff line number Diff line
@@ -341,8 +341,10 @@ public abstract class LauncherActivity extends ListActivity {
        
        
        mPackageManager = getPackageManager();
        mPackageManager = getPackageManager();


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


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


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


    private void updateAlertTitle() {
    private void updateAlertTitle() {
        TextView alertTitle = (TextView) findViewById(com.android.internal.R.id.alertTitle);
        TextView alertTitle = (TextView) findViewById(com.android.internal.R.id.alertTitle);
+5 −0
Original line number Original line Diff line number Diff line
@@ -301,6 +301,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            throw new AndroidRuntimeException(
            throw new AndroidRuntimeException(
                    "You cannot combine swipe dismissal and the action bar.");
                    "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);
        return super.requestFeature(featureId);
    }
    }