blob: 4b3e85d43f9ded0926c1927e757acefdfa8d7c76 [file] [log] [blame]
/*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.compatibility.common.util;
import android.app.Activity;
import android.content.Intent;
import android.content.ComponentName;
import android.os.Bundle;
import android.util.Log;
public class BroadcastTestStartActivity extends Activity {
static final String TAG = "BroadcastTestStartActivity";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.i(TAG, " in onCreate");
}
@Override
protected void onResume() {
super.onResume();
Log.i(TAG, " in onResume");
}
void startTest(String testCaseType, String pkg, String cls) {
Intent intent = new Intent();
Log.i(TAG, "received_testcasetype = " + testCaseType);
intent.putExtra(BroadcastUtils.TESTCASE_TYPE, testCaseType);
intent.setAction("android.intent.action.VIMAIN_" + testCaseType);
intent.setComponent(new ComponentName(pkg, cls));
startActivity(intent);
}
@Override
protected void onPause() {
Log.i(TAG, " in onPause");
super.onPause();
}
@Override
protected void onStart() {
super.onStart();
Log.i(TAG, " in onStart");
}
@Override
protected void onRestart() {
super.onRestart();
Log.i(TAG, " in onRestart");
}
@Override
protected void onStop() {
Log.i(TAG, " in onStop");
super.onStop();
}
@Override
protected void onDestroy() {
Log.i(TAG, " in onDestroy");
super.onDestroy();
}
}