Merge "New API for getting enabledcomponent"
This commit is contained in:
@@ -40,4 +40,9 @@ interface ISystemConfig {
|
||||
* @see SystemConfigManager#getSystemPermissionUids
|
||||
*/
|
||||
int[] getSystemPermissionUids(String permissionName);
|
||||
|
||||
/**
|
||||
* @see SystemConfigManager#getEnabledComponentOverrides
|
||||
*/
|
||||
List<String> getEnabledComponentOverrides(String packageName);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ package android.os;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.RequiresPermission;
|
||||
import android.annotation.SystemApi;
|
||||
import android.annotation.SystemService;
|
||||
@@ -129,4 +130,21 @@ public class SystemConfigManager {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get enabled component for a specific package
|
||||
*
|
||||
* @param packageName The target package.
|
||||
* @return The enabled component
|
||||
* {@hide}
|
||||
*/
|
||||
@SystemApi
|
||||
@NonNull
|
||||
public List<String> getEnabledComponentOverrides(@NonNull String packageName) {
|
||||
try {
|
||||
return mInterface.getEnabledComponentOverrides(packageName);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user