IntentCompat.java revision 0574ca37da4619afe4e26753f5a1b4de314b6565
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 android.support.v4.content; 18 19/** 20 * Helper for accessing features in {@link android.content.Intent} 21 * introduced after API level 4 in a backwards compatible fashion. 22 */ 23public class IntentCompat { 24 25 private IntentCompat() { 26 /* Hide constructor */ 27 } 28 29 /** 30 * Broadcast Action: Resources for a set of packages (which were 31 * previously unavailable) are currently 32 * available since the media on which they exist is available. 33 * The extra data {@link #EXTRA_CHANGED_PACKAGE_LIST} contains a 34 * list of packages whose availability changed. 35 * The extra data {@link #EXTRA_CHANGED_UID_LIST} contains a 36 * list of uids of packages whose availability changed. 37 * Note that the 38 * packages in this list do <em>not</em> receive this broadcast. 39 * The specified set of packages are now available on the system. 40 * <p>Includes the following extras: 41 * <ul> 42 * <li> {@link #EXTRA_CHANGED_PACKAGE_LIST} is the set of packages 43 * whose resources(were previously unavailable) are currently available. 44 * {@link #EXTRA_CHANGED_UID_LIST} is the set of uids of the 45 * packages whose resources(were previously unavailable) 46 * are currently available. 47 * </ul> 48 * 49 * <p class="note">This is a protected intent that can only be sent 50 * by the system. 51 */ 52 public static final String ACTION_EXTERNAL_APPLICATIONS_AVAILABLE = 53 "android.intent.action.EXTERNAL_APPLICATIONS_AVAILABLE"; 54 55 /** 56 * Broadcast Action: Resources for a set of packages are currently 57 * unavailable since the media on which they exist is unavailable. 58 * The extra data {@link #EXTRA_CHANGED_PACKAGE_LIST} contains a 59 * list of packages whose availability changed. 60 * The extra data {@link #EXTRA_CHANGED_UID_LIST} contains a 61 * list of uids of packages whose availability changed. 62 * The specified set of packages can no longer be 63 * launched and are practically unavailable on the system. 64 * <p>Inclues the following extras: 65 * <ul> 66 * <li> {@link #EXTRA_CHANGED_PACKAGE_LIST} is the set of packages 67 * whose resources are no longer available. 68 * {@link #EXTRA_CHANGED_UID_LIST} is the set of packages 69 * whose resources are no longer available. 70 * </ul> 71 * 72 * <p class="note">This is a protected intent that can only be sent 73 * by the system. 74 */ 75 public static final String ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE = 76 "android.intent.action.EXTERNAL_APPLICATIONS_UNAVAILABLE"; 77 78 /** 79 * This field is part of 80 * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE}, 81 * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE} 82 * and contains a string array of all of the components that have changed. 83 */ 84 public static final String EXTRA_CHANGED_PACKAGE_LIST = 85 "android.intent.extra.changed_package_list"; 86 87 /** 88 * This field is part of 89 * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE}, 90 * {@link android.content.Intent#ACTION_EXTERNAL_APPLICATIONS_UNAVAILABLE} 91 * and contains an integer array of uids of all of the components 92 * that have changed. 93 */ 94 public static final String EXTRA_CHANGED_UID_LIST = 95 "android.intent.extra.changed_uid_list"; 96} 97