1/** 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 * in compliance with the License. You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software distributed under the 10 * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 11 * express or implied. See the License for the specific language governing permissions and 12 * limitations under the License. 13 */ 14 15package android.accessibilityservice; 16 17import com.android.frameworks.coretests.R; 18 19import android.app.Activity; 20import android.os.Bundle; 21import android.view.View; 22 23/** 24 * Activity for testing the accessibility APIs for "interrogation" of 25 * the screen content. These APIs allow exploring the screen and 26 * requesting an action to be performed on a given view from an 27 * AccessiiblityService. 28 */ 29public class InterrogationActivity extends Activity { 30 31 @Override 32 public void onCreate(Bundle savedInstanceState) { 33 super.onCreate(savedInstanceState); 34 setContentView(R.layout.interrogation_activity); 35 36 findViewById(R.id.button5).setOnClickListener(new View.OnClickListener() { 37 public void onClick(View v) { 38 /* do nothing */ 39 } 40 }); 41 findViewById(R.id.button5).setOnLongClickListener(new View.OnLongClickListener() { 42 public boolean onLongClick(View v) { 43 return true; 44 } 45 }); 46 } 47} 48