public class Partner extends Object
com.android.setupwizard.action.PARTNER_CUSTOMIZATION
in its manifest. There can only be one customization APK on a device, and it must be bundled with
the system.
Derived from com.android.launcher3/Partner.java
Modifier and Type | Class and Description |
---|---|
static class |
Partner.ResourceEntry |
Modifier and Type | Method and Description |
---|---|
static Partner |
get(Context context)
Find and return partner details, or
null if none exists. |
static Drawable |
getDrawable(Context context,
int id)
Convenience to get a drawable from partner overlay, or if not available, the drawable from
the original context.
|
int |
getIdentifier(String name,
String defType) |
String |
getPackageName() |
static Partner.ResourceEntry |
getResourceEntry(Context context,
int id)
Find an entry of resource in the overlay package provided by partners.
|
Resources |
getResources() |
static String |
getString(Context context,
int id)
Convenience to get a string from partner overlay, or if not available, the string from the
original context.
|
static void |
resetForTesting() |
public static Drawable getDrawable(Context context, int id)
public static String getString(Context context, int id)
public static Partner.ResourceEntry getResourceEntry(Context context, int id)
entry.resources.getString(entry.id)
, or other methods available in
Resources
.public static Partner get(Context context)
null
if none exists. A partner package is marked
by a broadcast receiver declared in the manifest that handles the
com.android.setupwizard.action.PARTNER_CUSTOMIZATION
intent action. The overlay
package must also be a system package.public static void resetForTesting()
public String getPackageName()
public Resources getResources()