本文整理汇总了Java中org.md2k.mcerebrum.commons.permission.ActivityPermission类的典型用法代码示例。如果您正苦于以下问题:Java ActivityPermission类的具体用法?Java ActivityPermission怎么用?Java ActivityPermission使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ActivityPermission类属于org.md2k.mcerebrum.commons.permission包,在下文中一共展示了ActivityPermission类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: update
import org.md2k.mcerebrum.commons.permission.ActivityPermission; //导入依赖的package包/类
@Override
public void update(final Context context){
MCerebrum.setBackgroundService(context, ServiceCerebralCortex.class);
MCerebrum.setClearActivity(context, ActivityClear.class);
MCerebrum.setConfigureActivity(context, ActivitySettings.class);
MCerebrum.setPermissionActivity(context, ActivityPermission.class);
MCerebrum.setConfigured(context, true);
MCerebrum.setConfigureExact(context, true);
if(!MCerebrum.getPermission(context)) {
PermissionInfo p = new PermissionInfo();
p.getPermissions(context, new ResultCallback<Boolean>() {
@Override
public void onResult(Boolean result) {
MCerebrum.setPermission(context, result);
}
});
}
}
示例2: update
import org.md2k.mcerebrum.commons.permission.ActivityPermission; //导入依赖的package包/类
@Override
public void update(final Context context){
MCerebrum.setBackgroundService(context, ServiceAutoSenses.class);
MCerebrum.setConfigureActivity(context, ActivitySettings.class);
MCerebrum.setPermissionActivity(context, ActivityPermission.class);
MCerebrum.setConfigured(context, Configuration.isConfigured());
MCerebrum.setConfigureExact(context, Configuration.isEqualDefault());
MCerebrum.setReportActivity(context, ActivityPlot.class);
if(!MCerebrum.getPermission(context)){
if(Permission.hasPermission(context))
MCerebrum.setPermission(context, true);
else{
Intent intent = new Intent(context, ActivityPermission.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
}
}
示例3: update
import org.md2k.mcerebrum.commons.permission.ActivityPermission; //导入依赖的package包/类
@Override
public void update(final Context context) {
MCerebrum.setBackgroundService(context, ServiceStreamProcessor.class);
MCerebrum.setConfigureActivity(context, ActivitySettings.class);
MCerebrum.setPermissionActivity(context, ActivityPermission.class);
MCerebrum.setConfigured(context, true);
MCerebrum.setConfigureExact(context, true);
if(!Permission.hasPermission(context)){
Intent intent = new Intent(context, ActivityPermission.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
}