1/* 2 * Copyright (C) 2011 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 17package com.android.systemui.recent; 18 19import android.content.Intent; 20import android.content.pm.ResolveInfo; 21import android.graphics.Bitmap; 22import android.graphics.drawable.Drawable; 23 24public final class TaskDescription { 25 final ResolveInfo resolveInfo; 26 final int taskId; // application task id for curating apps 27 final int persistentTaskId; // persistent id 28 final Intent intent; // launch intent for application 29 final String packageName; // used to override animations (see onClick()) 30 final CharSequence description; 31 32 private Bitmap mThumbnail; // generated by Activity.onCreateThumbnail() 33 private Drawable mIcon; // application package icon 34 private CharSequence mLabel; // application package label 35 36 public TaskDescription(int _taskId, int _persistentTaskId, 37 ResolveInfo _resolveInfo, Intent _intent, 38 String _packageName, CharSequence _description) { 39 resolveInfo = _resolveInfo; 40 intent = _intent; 41 taskId = _taskId; 42 persistentTaskId = _persistentTaskId; 43 44 description = _description; 45 packageName = _packageName; 46 } 47 48 // mark all these as locked? 49 public CharSequence getLabel() { 50 return mLabel; 51 } 52 53 public void setLabel(CharSequence label) { 54 mLabel = label; 55 } 56 57 public Drawable getIcon() { 58 return mIcon; 59 } 60 61 public void setIcon(Drawable icon) { 62 mIcon = icon; 63 } 64 65 public void setThumbnail(Bitmap thumbnail) { 66 mThumbnail = thumbnail; 67 } 68 69 public Bitmap getThumbnail() { 70 return mThumbnail; 71 } 72} 73