1 /* 2 * Copyright (C) 2015 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.messaging.ui; 18 19 import android.os.Bundle; 20 import android.view.MenuItem; 21 22 import com.android.messaging.R; 23 24 /** 25 * Show a list of currently blocked participants. 26 */ 27 public class BlockedParticipantsActivity extends BugleActionBarActivity { 28 29 @Override onCreate(final Bundle savedInstanceState)30 protected void onCreate(final Bundle savedInstanceState) { 31 super.onCreate(savedInstanceState); 32 setContentView(R.layout.blocked_participants_activity); 33 34 getSupportActionBar().setDisplayHomeAsUpEnabled(true); 35 } 36 37 @Override onOptionsItemSelected(final MenuItem item)38 public boolean onOptionsItemSelected(final MenuItem item) { 39 switch (item.getItemId()) { 40 case android.R.id.home: 41 // Treat the home press as back press so that when we go back to 42 // ConversationActivity, it doesn't lose its original intent (conversation id etc.) 43 onBackPressed(); 44 return true; 45 46 default: 47 return super.onOptionsItemSelected(item); 48 } 49 } 50 } 51