1 /* 2 * Copyright (C) 2019 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.internal.app.chooser; 18 19 import android.app.Activity; 20 import android.content.ComponentName; 21 import android.content.Intent; 22 import android.content.pm.ResolveInfo; 23 import android.os.Bundle; 24 import android.os.UserHandle; 25 import android.service.chooser.ChooserTarget; 26 27 import com.android.internal.app.ResolverActivity; 28 29 import java.util.List; 30 31 /** 32 * Distinguish between targets that selectable by the user, vs those that are 33 * placeholders for the system while information is loading in an async manner. 34 */ 35 public abstract class NotSelectableTargetInfo implements ChooserTargetInfo { 36 getResolvedIntent()37 public Intent getResolvedIntent() { 38 return null; 39 } 40 getResolvedComponentName()41 public ComponentName getResolvedComponentName() { 42 return null; 43 } 44 start(Activity activity, Bundle options)45 public boolean start(Activity activity, Bundle options) { 46 return false; 47 } 48 startAsCaller(ResolverActivity activity, Bundle options, int userId)49 public boolean startAsCaller(ResolverActivity activity, Bundle options, int userId) { 50 return false; 51 } 52 startAsUser(Activity activity, Bundle options, UserHandle user)53 public boolean startAsUser(Activity activity, Bundle options, UserHandle user) { 54 return false; 55 } 56 getResolveInfo()57 public ResolveInfo getResolveInfo() { 58 return null; 59 } 60 getDisplayLabel()61 public CharSequence getDisplayLabel() { 62 return null; 63 } 64 getExtendedInfo()65 public CharSequence getExtendedInfo() { 66 return null; 67 } 68 cloneFilledIn(Intent fillInIntent, int flags)69 public TargetInfo cloneFilledIn(Intent fillInIntent, int flags) { 70 return null; 71 } 72 getAllSourceIntents()73 public List<Intent> getAllSourceIntents() { 74 return null; 75 } 76 getModifiedScore()77 public float getModifiedScore() { 78 return -0.1f; 79 } 80 getChooserTarget()81 public ChooserTarget getChooserTarget() { 82 return null; 83 } 84 isSuspended()85 public boolean isSuspended() { 86 return false; 87 } 88 isPinned()89 public boolean isPinned() { 90 return false; 91 } 92 } 93