152771272f4f018f4fc6846224bf047497e784af1Stan Iliev/*
252771272f4f018f4fc6846224bf047497e784af1Stan Iliev * Copyright (C) 2006 The Android Open Source Project
352771272f4f018f4fc6846224bf047497e784af1Stan Iliev *
452771272f4f018f4fc6846224bf047497e784af1Stan Iliev * Licensed under the Apache License, Version 2.0 (the "License");
552771272f4f018f4fc6846224bf047497e784af1Stan Iliev * you may not use this file except in compliance with the License.
652771272f4f018f4fc6846224bf047497e784af1Stan Iliev * You may obtain a copy of the License at
752771272f4f018f4fc6846224bf047497e784af1Stan Iliev *
852771272f4f018f4fc6846224bf047497e784af1Stan Iliev *      http://www.apache.org/licenses/LICENSE-2.0
952771272f4f018f4fc6846224bf047497e784af1Stan Iliev *
1052771272f4f018f4fc6846224bf047497e784af1Stan Iliev * Unless required by applicable law or agreed to in writing, software
1152771272f4f018f4fc6846224bf047497e784af1Stan Iliev * distributed under the License is distributed on an "AS IS" BASIS,
1252771272f4f018f4fc6846224bf047497e784af1Stan Iliev * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1352771272f4f018f4fc6846224bf047497e784af1Stan Iliev * See the License for the specific language governing permissions and
1452771272f4f018f4fc6846224bf047497e784af1Stan Iliev * limitations under the License.
1552771272f4f018f4fc6846224bf047497e784af1Stan Iliev */
1652771272f4f018f4fc6846224bf047497e784af1Stan Iliev
1752771272f4f018f4fc6846224bf047497e784af1Stan Ilievpackage android.app.activity;
1852771272f4f018f4fc6846224bf047497e784af1Stan Iliev
1952771272f4f018f4fc6846224bf047497e784af1Stan Ilievimport android.content.BroadcastReceiver;
2052771272f4f018f4fc6846224bf047497e784af1Stan Ilievimport android.content.Context;
2152771272f4f018f4fc6846224bf047497e784af1Stan Ilievimport android.content.Intent;
2252771272f4f018f4fc6846224bf047497e784af1Stan Ilievimport android.os.RemoteException;
2352771272f4f018f4fc6846224bf047497e784af1Stan Ilievimport android.os.IBinder;
2452771272f4f018f4fc6846224bf047497e784af1Stan Ilievimport android.os.Parcel;
2552771272f4f018f4fc6846224bf047497e784af1Stan Iliev
2652771272f4f018f4fc6846224bf047497e784af1Stan Ilievclass LocalDeniedReceiver extends BroadcastReceiver {
2752771272f4f018f4fc6846224bf047497e784af1Stan Iliev    public LocalDeniedReceiver() {
2852771272f4f018f4fc6846224bf047497e784af1Stan Iliev    }
2952771272f4f018f4fc6846224bf047497e784af1Stan Iliev
3052771272f4f018f4fc6846224bf047497e784af1Stan Iliev    public void onReceive(Context context, Intent intent) {
3152771272f4f018f4fc6846224bf047497e784af1Stan Iliev        try {
3252771272f4f018f4fc6846224bf047497e784af1Stan Iliev            IBinder caller = intent.getIBinderExtra("caller");
3352771272f4f018f4fc6846224bf047497e784af1Stan Iliev            Parcel data = Parcel.obtain();
3452771272f4f018f4fc6846224bf047497e784af1Stan Iliev            data.writeInterfaceToken(LaunchpadActivity.LAUNCH);
3552771272f4f018f4fc6846224bf047497e784af1Stan Iliev            data.writeString(BroadcastTest.RECEIVER_LOCAL);
3652771272f4f018f4fc6846224bf047497e784af1Stan Iliev            caller.transact(BroadcastTest.GOT_RECEIVE_TRANSACTION, data, null, 0);
3752771272f4f018f4fc6846224bf047497e784af1Stan Iliev            data.recycle();
3852771272f4f018f4fc6846224bf047497e784af1Stan Iliev        } catch (RemoteException ex) {
3952771272f4f018f4fc6846224bf047497e784af1Stan Iliev        }
4052771272f4f018f4fc6846224bf047497e784af1Stan Iliev    }
4152771272f4f018f4fc6846224bf047497e784af1Stan Iliev}
4252771272f4f018f4fc6846224bf047497e784af1Stan Iliev
4352771272f4f018f4fc6846224bf047497e784af1Stan Iliev