本文整理汇总了Java中com.lody.virtual.server.accounts.VAccountManagerService类的典型用法代码示例。如果您正苦于以下问题:Java VAccountManagerService类的具体用法?Java VAccountManagerService怎么用?Java VAccountManagerService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VAccountManagerService类属于com.lody.virtual.server.accounts包,在下文中一共展示了VAccountManagerService类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.lody.virtual.server.accounts.VAccountManagerService; //导入依赖的package包/类
@Override
public boolean onCreate() {
Context context = getContext();
DaemonService.startup(context);
if (!VirtualCore.get().isStartup()) {
return true;
}
VPackageManagerService.systemReady();
addService(ServiceManagerNative.PACKAGE, VPackageManagerService.get());
VActivityManagerService.systemReady(context);
addService(ServiceManagerNative.ACTIVITY, VActivityManagerService.get());
addService(ServiceManagerNative.USER, VUserManagerService.get());
VAppManagerService.systemReady();
addService(ServiceManagerNative.APP, VAppManagerService.get());
BroadcastSystem.attach(VActivityManagerService.get(), VAppManagerService.get());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
addService(ServiceManagerNative.JOB, VJobSchedulerService.get());
}
VNotificationManagerService.systemReady(context);
addService(ServiceManagerNative.NOTIFICATION, VNotificationManagerService.get());
VAppManagerService.get().scanApps();
VAccountManagerService.systemReady();
addService(ServiceManagerNative.ACCOUNT, VAccountManagerService.get());
addService(ServiceManagerNative.VS, VirtualStorageService.get());
return true;
}
示例2: notifyAppInstalled
import com.lody.virtual.server.accounts.VAccountManagerService; //导入依赖的package包/类
private void notifyAppInstalled(PackageSetting setting, int userId) {
final String pkg = setting.packageName;
int N = mRemoteCallbackList.beginBroadcast();
while (N-- > 0) {
try {
if (userId == -1) {
sendInstalledBroadcast(pkg);
mRemoteCallbackList.getBroadcastItem(N).onPackageInstalled(pkg);
mRemoteCallbackList.getBroadcastItem(N).onPackageInstalledAsUser(0, pkg);
} else {
mRemoteCallbackList.getBroadcastItem(N).onPackageInstalledAsUser(userId, pkg);
}
} catch (RemoteException e) {
e.printStackTrace();
}
}
mRemoteCallbackList.finishBroadcast();
VAccountManagerService.get().refreshAuthenticatorCache(null);
}
示例3: notifyAppUninstalled
import com.lody.virtual.server.accounts.VAccountManagerService; //导入依赖的package包/类
private void notifyAppUninstalled(PackageSetting setting, int userId) {
final String pkg = setting.packageName;
int N = mRemoteCallbackList.beginBroadcast();
while (N-- > 0) {
try {
if (userId == -1) {
sendUninstalledBroadcast(pkg);
mRemoteCallbackList.getBroadcastItem(N).onPackageUninstalled(pkg);
mRemoteCallbackList.getBroadcastItem(N).onPackageUninstalledAsUser(0, pkg);
} else {
mRemoteCallbackList.getBroadcastItem(N).onPackageUninstalledAsUser(userId, pkg);
}
} catch (RemoteException e) {
e.printStackTrace();
}
}
mRemoteCallbackList.finishBroadcast();
VAccountManagerService.get().refreshAuthenticatorCache(null);
}
示例4: onCreate
import com.lody.virtual.server.accounts.VAccountManagerService; //导入依赖的package包/类
@Override
public boolean onCreate() {
Context context = getContext();
DaemonService.startup(context);
if (!VirtualCore.get().isStartup()) {
return true;
}
VPackageManagerService.systemReady();
addService(ServiceManagerNative.PACKAGE, VPackageManagerService.get());
VActivityManagerService.systemReady(context);
addService(ServiceManagerNative.ACTIVITY, VActivityManagerService.get());
addService(ServiceManagerNative.USER, VUserManagerService.get());
VAppManagerService.systemReady();
addService(ServiceManagerNative.APP, VAppManagerService.get());
BroadcastSystem.attach(VActivityManagerService.get(), VAppManagerService.get());
VAccountManagerService.systemReady();
addService(ServiceManagerNative.ACCOUNT, VAccountManagerService.get());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
addService(ServiceManagerNative.JOB, VJobSchedulerService.get());
}
VNotificationManagerService.systemReady(context);
addService(ServiceManagerNative.NOTIFICATION, VNotificationManagerService.get());
VAppManagerService.get().preloadAllApps();
return true;
}
示例5: notifyAppInstalled
import com.lody.virtual.server.accounts.VAccountManagerService; //导入依赖的package包/类
private void notifyAppInstalled(AppSetting setting) {
int N = mRemoteCallbackList.beginBroadcast();
while (N-- > 0) {
try {
mRemoteCallbackList.getBroadcastItem(N).onNewApp(setting.packageName);
} catch (RemoteException e) {
// Ignore
}
}
mRemoteCallbackList.finishBroadcast();
Intent virtualIntent = new Intent(Constants.ACTION_PACKAGE_ADDED);
Uri uri = Uri.fromParts("package", setting.packageName, null);
virtualIntent.setData(uri);
for (int userId : VUserManagerService.get().getUserIds()) {
Intent intent = new Intent(virtualIntent);
intent.putExtra(Intent.EXTRA_UID, VUserHandle.getUid(userId, setting.appId));
VirtualCore.get().getContext().sendBroadcast(virtualIntent);
}
VAccountManagerService.get().refreshAuthenticatorCache(null);
}
示例6: notifyAppUninstalled
import com.lody.virtual.server.accounts.VAccountManagerService; //导入依赖的package包/类
private void notifyAppUninstalled(AppSetting setting) {
int N = mRemoteCallbackList.beginBroadcast();
while (N-- > 0) {
try {
mRemoteCallbackList.getBroadcastItem(N).onRemoveApp(setting.packageName);
} catch (RemoteException e) {
// Ignore
}
}
mRemoteCallbackList.finishBroadcast();
Intent virtualIntent = new Intent(Constants.ACTION_PACKAGE_REMOVED);
Uri uri = Uri.fromParts("package", setting.packageName, null);
virtualIntent.setData(uri);
for (int userId : VUserManagerService.get().getUserIds()) {
Intent intent = new Intent(virtualIntent);
intent.putExtra(Intent.EXTRA_UID, VUserHandle.getUid(userId, setting.appId));
VirtualCore.get().getContext().sendBroadcast(virtualIntent);
}
VAccountManagerService.get().refreshAuthenticatorCache(null);
}
示例7: onCreate
import com.lody.virtual.server.accounts.VAccountManagerService; //导入依赖的package包/类
@Override
public boolean onCreate() {
Context context = getContext();
DaemonService.startup(context);
if (!VirtualCore.get().isStartup()) {
return true;
}
VPackageManagerService.systemReady();
addService(ServiceManagerNative.PACKAGE, VPackageManagerService.get());
VActivityManagerService.systemReady(context);
addService(ServiceManagerNative.ACTIVITY, VActivityManagerService.get());
addService(ServiceManagerNative.USER, VUserManagerService.get());
VAppManagerService.systemReady();
addService(ServiceManagerNative.APP, VAppManagerService.get());
BroadcastSystem.attach(VActivityManagerService.get(), VAppManagerService.get());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
addService(ServiceManagerNative.JOB, VJobSchedulerService.get());
}
VNotificationManagerService.systemReady(context);
addService(ServiceManagerNative.NOTIFICATION, VNotificationManagerService.get());
VAppManagerService.get().scanApps();
VAccountManagerService.systemReady();
addService(ServiceManagerNative.ACCOUNT, VAccountManagerService.get());
addService(ServiceManagerNative.VS, VirtualStorageService.get());
addService(ServiceManagerNative.DEVICE, VDeviceManagerService.get());
addService(ServiceManagerNative.VIRTUAL_LOC, VirtualLocationService.get());
return true;
}