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

Commit d5d4ffeb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix broken android.view.DisabledTest." into oc-dev

parents 5262ae9b 54e221a4
Loading
Loading
Loading
Loading
+21 −16
Original line number Diff line number Diff line
@@ -16,15 +16,15 @@

package android.view;

import com.android.frameworks.coretests.R;
import android.test.ActivityInstrumentationTestCase;
import android.test.TouchUtils;
import android.test.suitebuilder.annotation.MediumTest;
import android.test.suitebuilder.annotation.LargeTest;

import android.test.ActivityInstrumentationTestCase;
import android.widget.Button;
import android.test.suitebuilder.annotation.MediumTest;
import android.view.KeyEvent;
import android.view.View;
import android.widget.Button;

import com.android.frameworks.coretests.R;

/**
 * Exercises {@link android.view.View}'s disabled property.
@@ -45,19 +45,24 @@ public class DisabledTest extends ActivityInstrumentationTestCase<Disabled> {

        final Disabled a = getActivity();
        mDisabled = (Button) a.findViewById(R.id.disabledButton);
        mDisabledParent = a.findViewById(R.id.clickableParent);
        getInstrumentation().runOnMainSync(
                new Runnable() {
                    @Override
                    public void run() {
                        mDisabled.setOnClickListener(new View.OnClickListener() {
                            public void onClick(View v) {
                                mClicked = true;
                            }
                        });

        mDisabledParent = a.findViewById(R.id.clickableParent);
                        mDisabledParent.setOnClickListener(new View.OnClickListener() {
                            public void onClick(View v) {
                                mParentClicked = true;
                            }
                        });
                    }
                });
    }

    @Override
    protected void tearDown() throws Exception {