android限制安装包来源,Android系统设置settings应用学习(一)--允许未知来源应用安装...

settings,是Android系统应用--设置的源代码,包名称为:com.android.settings

安全设置代码:SecuritySettings.java

/*

* Copyright (C) 2007 The Android Open Source Project

*

* Licensed under the Apache License, Version 2.0 (the "License");

* you may not use this file except in compliance with the License.

* You may obtain a copy of the License at

*

* http://www.apache.org/licenses/LICENSE-2.0

*

* Unless required by applicable law or agreed to in writing, software

* distributed under the License is distributed on an "AS IS" BASIS,

* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

* See the License for the specific language governing permissions and

* limitations under the License.

*/

package com.android.settings;

import static android.provider.Settings.System.SCREEN_OFF_TIMEOUT;

import android.app.Activity;

import android.app.AlertDialog;

import android.app.admin.DevicePolicyManager;

import android.content.Context;

import android.content.DialogInterface;

import android.content.Intent;

import android.os.Bundle;

import android.os.Vibrator;

import android.preference.CheckBoxPreference;

import android.preference.ListPreference;

import android.preference.Preference;

import android.preference.Preference.OnPreferenceChangeListener;

import android.preference.PreferenceGroup;

import android.preference.PreferenceScreen;

import android.provider.Settings;

import android.provider.Telephony.SIMInfo;

import android.security.KeyStore;

import android.telephony.TelephonyManager;

import android.util.Log;

import com.android.internal.telephony.Phone;

import com.android.internal.widget.LockPatternUtils;

import com.android.settings.gemini.SimListEntrance;

import com.mediatek.xlog.Xlog;

import java.util.ArrayList;

import java.util.List;

import com.mediatek.featureoption.FeatureOption;

/**

* Gesture lock pattern settings.

*/

public class SecuritySettings extends SettingsPreferenceFragment

implements OnPreferenceChangeListener, DialogInterface.OnClickListener {

private static final String TAG = "SecuritySettings";

// Lock Settings

private static final String KEY_UNLOCK_SET_OR_CHANGE = "unlock_set_or_change";

private static final String KEY_BIOMETRIC_WEAK_IMPROVE_MATCHING =

"biometric_weak_improve_matching";

private static final String KEY_LOCK_ENABLED = "lockenabled";

private static final String KEY_VISIBLE_PATTERN = "visiblepattern";

private static final String KEY_TACTILE_FEEDBACK_ENABLED = "unlock_tactile_feedback";

private static final String KEY_SECURITY_CATEGORY = "security_category";

private static final String KEY_LOCK_AFTER_TIMEOUT = "lock_after_timeout";

private static final int SET_OR_CHANGE_LOCK_METHOD_REQUEST = 123;

private static final int CONFIRM_EXISTING_FOR_BIOMETRIC_IMPROVE_REQUEST = 124;

// Misc Settings

private static final String KEY_SIM_LOCK = "sim_lock";

private static final String KEY_SIM_LOCK_PREF = "sim_lock_pref";

private static final String KEY_SHOW_PASSWORD = "show_password";

private static final String KEY_RESET_CREDENTIALS = "reset_credentials";

private static final String KEY_TOGGLE_INSTALL_APPLICATIONS = "toggle_install_applications";

DevicePolicyManager mDPM;

private ChooseLockSettingsHelper mChooseLockSettingsHelper;

private LockPatternUtils mLockPatternUtils;

private ListPreference mLockAfter;

private CheckBoxPreference mVisiblePattern;

private CheckBoxPreference mTactileFeedback;

private CheckBoxPreference mShowPassword;

private Preference mResetCredentials;

private CheckBoxPreference mToggleAppInstallation;

private DialogInterface mWarnInstallApps;

@Override

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

mLockPatternUtils = new LockPatternUtils(getActivity());

mDPM = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE);

mChooseLockSettingsHelper = new ChooseLockSettingsHelper(getActivity());

}

private PreferenceScreen createPreferenceHierarchy() {

PreferenceScreen root = getPreferenceScreen();

if (root != null) {

root.removeAll();

}

addPreferencesFromResource(R.xml.security_settings);

root = getPreferenceScreen();

// Add options for lock/unlock screen

int resid = 0;

if (!mLockPatternUtils.isSecure()) {

if (mLockPatternUtils.isLockScreenDisabled()) {

resid = R.xml.security_settings_lockscreen;

} else {

resid = R.xml.security_settings_chooser;

}

} else if (mLockPatternUtils.usingBiometricWeak() &&

mLockPatternUtils.isBiometricWeakInstalled()) {

resid = R.xml.security_settings_biometric_weak;

} else {

switch (mLockPatternUtils.getKeyguardStoredPasswordQuality()) {

case DevicePolicyManager.PASSWORD_QUALITY_SOMETHING:

resid = R.xml.security_settings_pattern;

break;

case DevicePolicyManager.PASSWORD_QUALITY_NUMERIC:

resid = R.xml.security_settings_pin;

break;

case DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC:

case DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC:

case DevicePolicyManager.PASSWORD_QUALITY_COMPLEX:

resid = R.xml.security_settings_password;

break;

}

}

addPreferencesFromResource(resid);

// Add options for device encryption

Xlog.d(TAG,"FeatureOption.MTK_EMMC_SUPPORT="+FeatureOption.MTK_EMMC_SUPPORT);

if(FeatureOption.MTK_EMMC_SUPPORT) {

// Add options for device encryption

DevicePolicyManager dpm =

(DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);

switch (dpm.getStorageEncryptionStatus()) {

case DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE:

// The device is currently encrypted.

addPreferencesFromResource(R.xml.security_settings_encrypted);

break;

case DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE:

// This device supports encryption but isn't encrypted.

addPreferencesFromResource(R.xml.security_settings_unencrypted);

break;

}

}

// lock after preference

mLockAfter = (ListPreference) root.findPreference(KEY_LOCK_AFTER_TIMEOUT);

if (mLockAfter != null) {

setupLockAfterPreference();

updateLockAfterPreferenceSummary();

}

// visible pattern

mVisiblePattern = (CheckBoxPreference) root.findPreference(KEY_VISIBLE_PATTERN);

// don't display visible pattern if biometric and backup is not pattern

if (resid == R.xml.security_settings_biometric_weak &&

mLockPatternUtils.getKeyguardStoredPasswordQuality() !=

DevicePolicyManager.PASSWORD_QUALITY_SOMETHING) {

PreferenceGroup securityCategory = (PreferenceGroup)

root.findPreference(KEY_SECURITY_CATEGORY);

if (securityCategory != null && mVisiblePattern != null) {

securityCategory.removePreference(root.findPreference(KEY_VISIBLE_PATTERN));

}

}

// tactile feedback. Should be common to all unlock preference screens.

mTactileFeedback = (CheckBoxPreference) root.findPreference(KEY_TACTILE_FEEDBACK_ENABLED);

if (!((Vibrator) getSystemService(Context.VIBRATOR_SERVICE)).hasVibrator()) {

PreferenceGroup securityCategory = (PreferenceGroup)

root.findPreference(KEY_SECURITY_CATEGORY);

if (securityCategory != null && mTactileFeedback != null) {

securityCategory.removePreference(mTactileFeedback);

}

}

// Append the rest of the settings

addPreferencesFromResource(R.xml.security_settings_misc);

// Do not display SIM lock for CDMA phone

TelephonyManager tm = TelephonyManager.getDefault();

if ((TelephonyManager.PHONE_TYPE_CDMA == tm.getCurrentPhoneType()) &&

(tm.getLteOnCdmaMode() != Phone.LTE_ON_CDMA_TRUE)) {

root.removePreference(root.findPreference(KEY_SIM_LOCK));

}else{

//Preference simLockPreferences = root.findPreference(KEY_SIM_LOCK);

Preference simLockPref = root.findPreference(KEY_SIM_LOCK_PREF);

List simList = SIMInfo.getInsertedSIMList(getActivity());

int nSimNum = simList.size();

if (nSimNum == 0) {

Xlog.d(TAG,"No sim found");

simLockPref.setEnabled(false);

}else if (nSimNum == 1) {

SIMInfo simInfo = simList.get(0);

Xlog.d(TAG,"Only one Sim inserted");

if (simInfo != null) {

Intent intent = new Intent();

intent.setClassName("com.android.settings", "com.android.settings.IccLockSettings");

int slot = SIMInfo.getSlotById(getActivity(), simInfo.mSimId);

intent.putExtra("slotid", simInfo.mSlot);

simLockPref.setIntent(intent);

}

} else if (nSimNum>1) {

Xlog.d(TAG,"two Sims inserted");

simLockPref.getExtras().putInt("type", SimListEntrance.PIN_SETTING_INDEX);

simLockPref.setFragment(SimListEntrance.class.getName());

}

}

// Show password

mShowPassword = (CheckBoxPreference) root.findPreference(KEY_SHOW_PASSWORD);

// Credential storage

mResetCredentials = root.findPreference(KEY_RESET_CREDENTIALS);

mToggleAppInstallation = (CheckBoxPreference) findPreference(

KEY_TOGGLE_INSTALL_APPLICATIONS);

mToggleAppInstallation.setChecked(isNonMarketAppsAllowed());

return root;

}

private boolean isNonMarketAppsAllowed() {

return Settings.Secure.getInt(getContentResolver(),

Settings.Secure.INSTALL_NON_MARKET_APPS, 0) > 0;

}

private void setNonMarketAppsAllowed(boolean enabled) {

// Change the system setting

Settings.Secure.putInt(getContentResolver(), Settings.Secure.INSTALL_NON_MARKET_APPS,

enabled ? 1 : 0);

}

private void warnAppInstallation() {

// TODO: DialogFragment?

mWarnInstallApps = new AlertDialog.Builder(getActivity()).setTitle(

getResources().getString(R.string.error_title))

.setIcon(com.android.internal.R.drawable.ic_dialog_alert)

.setMessage(getResources().getString(R.string.install_all_warning))

.setPositiveButton(android.R.string.yes, this)

.setNegativeButton(android.R.string.no, null)

.show();

}

public void onClick(DialogInterface dialog, int which) {

if (dialog == mWarnInstallApps && which == DialogInterface.BUTTON_POSITIVE) {

setNonMarketAppsAllowed(true);

mToggleAppInstallation.setChecked(true);

}

}

@Override

public void onDestroy() {

super.onDestroy();

if (mWarnInstallApps != null) {

mWarnInstallApps.dismiss();

}

}

private void setupLockAfterPreference() {

// Compatible with pre-Froyo

long currentTimeout = Settings.Secure.getLong(getContentResolver(),

Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT, 5000);

mLockAfter.setValue(String.valueOf(currentTimeout));

mLockAfter.setOnPreferenceChangeListener(this);

final long adminTimeout = (mDPM != null ? mDPM.getMaximumTimeToLock(null) : 0);

final long displayTimeout = Math.max(0,

Settings.System.getInt(getContentResolver(), SCREEN_OFF_TIMEOUT, 0));

if (adminTimeout > 0) {

// This setting is a slave to display timeout when a device policy is enforced.

// As such, maxLockTimeout = adminTimeout - displayTimeout.

// If there isn't enough time, shows "immediately" setting.

disableUnusableTimeouts(Math.max(0, adminTimeout - displayTimeout));

}

}

private void updateLockAfterPreferenceSummary() {

// Update summary message with current value

long currentTimeout = Settings.Secure.getLong(getContentResolver(),

Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT, 5000);

final CharSequence[] entries = mLockAfter.getEntries();

final CharSequence[] values = mLockAfter.getEntryValues();

int best = 0;

for (int i = 0; i < values.length; i++) {

long timeout = Long.valueOf(values[i].toString());

if (currentTimeout >= timeout) {

best = i;

}

}

mLockAfter.setSummary(getString(R.string.lock_after_timeout_summary, entries[best]));

}

private void disableUnusableTimeouts(long maxTimeout) {

final CharSequence[] entries = mLockAfter.getEntries();

final CharSequence[] values = mLockAfter.getEntryValues();

ArrayList revisedEntries = new ArrayList();

ArrayList revisedValues = new ArrayList();

for (int i = 0; i < values.length; i++) {

long timeout = Long.valueOf(values[i].toString());

if (timeout <= maxTimeout) {

revisedEntries.add(entries[i]);

revisedValues.add(values[i]);

}

}

if (revisedEntries.size() != entries.length || revisedValues.size() != values.length) {

mLockAfter.setEntries(

revisedEntries.toArray(new CharSequence[revisedEntries.size()]));

mLockAfter.setEntryValues(

revisedValues.toArray(new CharSequence[revisedValues.size()]));

final int userPreference = Integer.valueOf(mLockAfter.getValue());

if (userPreference <= maxTimeout) {

mLockAfter.setValue(String.valueOf(userPreference));

} else {

// There will be no highlighted selection since nothing in the list matches

// maxTimeout. The user can still select anything less than maxTimeout.

// TODO: maybe append maxTimeout to the list and mark selected.

}

}

mLockAfter.setEnabled(revisedEntries.size() > 0);

}

@Override

public void onResume() {

super.onResume();

// Make sure we reload the preference hierarchy since some of these settings

// depend on others...

createPreferenceHierarchy();

final LockPatternUtils lockPatternUtils = mChooseLockSettingsHelper.utils();

if (mVisiblePattern != null) {

mVisiblePattern.setChecked(lockPatternUtils.isVisiblePatternEnabled());

}

if (mTactileFeedback != null) {

mTactileFeedback.setChecked(lockPatternUtils.isTactileFeedbackEnabled());

}

mShowPassword.setChecked(Settings.System.getInt(getContentResolver(),

Settings.System.TEXT_SHOW_PASSWORD, 1) != 0);

KeyStore.State state = KeyStore.getInstance().state();

mResetCredentials.setEnabled(state != KeyStore.State.UNINITIALIZED);

}

@Override

public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {

final String key = preference.getKey();

final LockPatternUtils lockPatternUtils = mChooseLockSettingsHelper.utils();

if (KEY_UNLOCK_SET_OR_CHANGE.equals(key)) {

startFragment(this, "com.android.settings.ChooseLockGeneric$ChooseLockGenericFragment",

SET_OR_CHANGE_LOCK_METHOD_REQUEST, null);

} else if (KEY_BIOMETRIC_WEAK_IMPROVE_MATCHING.equals(key)) {

ChooseLockSettingsHelper helper =

new ChooseLockSettingsHelper(this.getActivity(), this);

if (!helper.launchConfirmationActivity(

CONFIRM_EXISTING_FOR_BIOMETRIC_IMPROVE_REQUEST, null, null)) {

startBiometricWeakImprove(); // no password set, so no need to confirm

}

} else if (KEY_LOCK_ENABLED.equals(key)) {

lockPatternUtils.setLockPatternEnabled(isToggled(preference));

} else if (KEY_VISIBLE_PATTERN.equals(key)) {

lockPatternUtils.setVisiblePatternEnabled(isToggled(preference));

} else if (KEY_TACTILE_FEEDBACK_ENABLED.equals(key)) {

lockPatternUtils.setTactileFeedbackEnabled(isToggled(preference));

} else if (preference == mShowPassword) {

Settings.System.putInt(getContentResolver(), Settings.System.TEXT_SHOW_PASSWORD,

mShowPassword.isChecked() ? 1 : 0);

} else if (preference == mToggleAppInstallation) {

if (mToggleAppInstallation.isChecked()) {

mToggleAppInstallation.setChecked(false);

warnAppInstallation();

} else {

setNonMarketAppsAllowed(false);

}

} else {

// If we didn't handle it, let preferences handle it.

return super.onPreferenceTreeClick(preferenceScreen, preference);

}

return true;

}

private boolean isToggled(Preference pref) {

return ((CheckBoxPreference) pref).isChecked();

}

/**

* see confirmPatternThenDisableAndClear

*/

@Override

public void onActivityResult(int requestCode, int resultCode, Intent data) {

super.onActivityResult(requestCode, resultCode, data);

if (requestCode == CONFIRM_EXISTING_FOR_BIOMETRIC_IMPROVE_REQUEST &&

resultCode == Activity.RESULT_OK) {

startBiometricWeakImprove();

return;

}

createPreferenceHierarchy();

}

public boolean onPreferenceChange(Preference preference, Object value) {

if (preference == mLockAfter) {

int timeout = Integer.parseInt((String) value);

try {

Settings.Secure.putInt(getContentResolver(),

Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT, timeout);

} catch (NumberFormatException e) {

Log.e("SecuritySettings", "could not persist lockAfter timeout setting", e);

}

updateLockAfterPreferenceSummary();

}

return true;

}

public void startBiometricWeakImprove(){

Intent intent = new Intent();

intent.setClassName("com.android.facelock", "com.android.facelock.AddToSetup");

startActivity(intent);

}

}

其中有关未知来源应用安装的有:

mToggleAppInstallation = (CheckBoxPreference) findPreference(

KEY_TOGGLE_INSTALL_APPLICATIONS);

mToggleAppInstallation.setChecked(isNonMarketAppsAllowed());

private boolean isNonMarketAppsAllowed() {

return Settings.Secure.getInt(getContentResolver(),

Settings.Secure.INSTALL_NON_MARKET_APPS, 0) > 0;

}

private void setNonMarketAppsAllowed(boolean enabled) {

// Change the system setting

Settings.Secure.putInt(getContentResolver(), Settings.Secure.INSTALL_NON_MARKET_APPS,

enabled ? 1 : 0);

}

public void onClick(DialogInterface dialog, int which) {

if (dialog == mWarnInstallApps && which == DialogInterface.BUTTON_POSITIVE) {

setNonMarketAppsAllowed(true);

mToggleAppInstallation.setChecked(true);

}

}

源代码Settings$Secure.class中有关允许未知来源应用安装

/**

* Whether the package installer should allow installation of apps downloaded from

* sources other than the Android Market (vending machine).

*

* 1 = allow installing from other sources

* 0 = only allow installing from the Android Market

*/

public static final String INSTALL_NON_MARKET_APPS = "install_non_market_apps";

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/575640.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

浏览器与服务器响应流程-----(转)

一. 解析域名地址为IP地址 浏览器DNS缓存&#xff1a;以Chrome为例&#xff0c;在浏览器窗口中输入chrome://net-internals/#dns&#xff0c;就可以查看当前浏览器DNS缓存记录&#xff0c;chrome的DNS缓存过期时间还是比较短的&#xff0c;大约为1分钟。 本机DNS缓存&#xff1…

android关键应用程序,Android应用程序的四个关键点

对于一个Android应用程序来说&#xff0c;是由四种关键构造块组织而成的&#xff0c;这四种构造块分别是&#xff1a;Activity、Intent Receiver、Service、Content Provider但是&#xff0c;并不是每一个Android应用程序都需要这四种构造块&#xff0c;这不是必须的&#xff0…

手把手教你使用FineUI开发一个b/s结构的取送货管理信息系统(附源码+视频教程(第6节))...

一 本系列随笔概览及产生的背景 近阶段接到一些b/s类型的软件项目&#xff0c;但是团队成员之前大部分没有这方面的开发经验&#xff0c;于是自己选择了一套目前网上比较容易上手的开发框架&#xff08;FineUI&#xff09;&#xff0c;计划录制一套视频讲座&#xff0c;来讲解如…

Pc-98 android,PC安卓多功能搞机助手3.98

V3.98版本更新日志&#xff1a;1.全新多设备检测机制&#xff0c;底层代码重写&#xff1b;2.新增支持检测安卓用户是否允许当前电脑调试设备&#xff1b;3.软件冻结#卸载中新增清除指定应用数据&#xff1b;4.小米线刷检测功能优化&#xff0c;修复之前版本不能正确识别设备是…

拼接路径的两种方式

//本文永久链接,转载请注明出处:http://www.cnblogs.com/ChenYilong/p/3490669.html https://www.evernote.com/shard/s227/sh/1401e497-899e-4b04-9ff6-e1d9638e9f25/f6b722ed5cb2c5f603a9b242ee7fe230转载于:https://www.cnblogs.com/ChenYilong/p/3490669.html

android像素鸟,像素鸟Flappy Bird

Flappy Bird是最近非常热门的一款像素游戏&#xff0c;Flappy Bird 的游戏规则异常简单&#xff1a;和Frogmind Games的成名作品BADLAND类似&#xff0c;玩家只需要点击屏幕就可以操作游戏&#xff0c;控制角色通过各种障碍。看似简单的规则下是让人抓狂的游戏难度。首先&#…

Android是什么 之三手机之硬件形态

手机硬件形态  本节可能与Android无关&#xff0c;但是Android系统现在这个阶段更多的是移动终端形态的开发平台&#xff0c;本节给出了Android背后的工作-Android管理的硬件是什么&#xff0c;Android的本质就是要管理好这些硬件部分&#xff0c;为用户提供一个体验更好&…

Android CPU 深度睡眠,处理器的深度和深度睡眠状态之间的差异

深度睡眠(C3)和深度睡眠(C4)是用于描述移动平台电源管理的术语。电源管理就是通过将 CPU 置于不使用状态时休眠来延长电池续航时间。C3 深度睡眠和 C4 深度睡眠是 ACPI 电源管理状态。更深的睡眠源自 CPU 和芯片组交互的改进&#xff0c;以重定向 snoop 周期。CPU 的深度 C4 状…

品味性能之道十一:JAVA中switch和if性能比较

通常而言大家普遍的认知里switch case的效率高于if else。根据我的理解而言switch的查找类似于二叉树&#xff0c;if则是线性查找。按照此逻辑推理对于对比条件数目大于3时switch更优&#xff0c;并且对比条件数目越多时switch的优势越为明显。一、测试目的最近与开发同学对于前…

miniblink载入html,winform使用miniblink展示html(全屏)

【实例简介】使用miniblink 展示html的例子&#xff0c;miniblink基于chromium的浏览器控件【实例截图】点击下图中的百度&#xff0c;即可 实现全屏访问 百度网页 &#xff0c;如下图&#xff1a;其实是winform嵌入的这个网页&#xff0c;打开即是 全屏效果【核心代码】using …

javax.imageio.IIOException: Unsupported Image Type

把图片的模式用ps从CMYK转为RGB就ok了。 CMYK也称作印刷色彩模式&#xff0c;是一种依靠反光的色彩模式&#xff0c;和RGB类似&#xff0c;CMY是3种印刷油墨名称的首字母&#xff1a;青色Cyan、品红色Magenta、黄色Yellow。而K取的是black最后一个字母&#xff0c;之所以不取首…

html 手机访问优化,移动端首屏优化

[TOC]## 页面加载为什么打开一个 H5 页面会有一长段白屏时间&#xff1f;因为它做了很多事情&#xff0c;大概是&#xff1a;~~~初始化 webview -> 请求页面 -> 下载数据 -> 解析HTML -> 请求 js/css 资源 -> dom 渲染 -> 解析 JS 执行 -> JS 请求数据 -&…

2014年10月末

迄今&#xff0c;我的第一个目标已达到。接下来就要为第二个目标做准备了&#xff0c;而且是长期&#xff0c;不可松懈的准备。大体上计划用10个月吧&#xff01; 2014年&#xff0c;10月末&#xff0c;到时给出一个结果&#xff01;转载于:https://www.cnblogs.com/zhangyabin…

html5 indexeddb 排序,html5 – 在IndexedDB中,有没有办法进行排序复合查询?

本回答中使用的术语“复合查询”是指在其WHERE子句中涉及多个条件的SQL SELECT语句。虽然indexedDB规范中没有提到这样的查询&#xff0c;但您可以通过创建一个包含一组属性名称的keypath的索引来近似复合查询的行为。这与创建索引时使用多条目标志完全无关。多条目标志调整ind…

Spark源码分析 -- SchedulableBuilder

SchedulableBuilder就是对Scheduleable tree的封装, 在Pool层面(中间节点), 完成对TaskSet的调度(FIFO, FAIR) 在TaskSetManager 层面(叶子节点), 完成对TaskSet中task的调度(locality)以及track(retry) TaskSetManager 用于封装TaskSet, 主要提供对单个TaskSet内部的tasks的t…

html设置照片模糊效果,CSS如何实现照片模糊?

在开发网页时&#xff0c;照片模糊处理会经常被使用&#xff0c;比如当我们背景图的模糊&#xff0c;当我们不想背景图片过于突出影响美观时&#xff0c;就可以设置将照片模糊处理&#xff0c;突出文字部分。那么 CSS 如何实现照片模糊呢&#xff1f;这篇文章 w3cschool 小编告…

rhel6用centos163 yum源

cd /etc/yum.repos.d/wget wget http://mirrors.163.com/.help/CentOS6-Base-163.reposed -i "s/\$releasever/6/" CentOS6-Base-163.repo 转载于:https://www.cnblogs.com/yanghuahui/p/3507313.html

女生学计算机未来出路,计算机真的已经烂大街了吗,女生学计算机没出路吗?...

假的。先说第一个问题&#xff1a;情况是&#xff0c;现在程序员是很多&#xff0c;但多半是中低端程序员&#xff0c;高端程序员供不应求&#xff0c;薪资一涨再涨。现在的程序员门槛一高再高&#xff0c;就是为了淘汰掉那些半吊子的程序员。如果你是靠从网上复制粘贴代码的“…

简明易懂的call apply

在iteye看到一篇对call解释得相当简明易懂&#xff0c;觉得得宣传一下 &#xff1a; http://uule.iteye.com/blog/1158829 一、方法的定义 call方法: 语法&#xff1a;call([thisObj[,arg1[, arg2[, [,.argN]]]]]) 定义&#xff1a;调用一个对象的一个方法&#xff0c;以另一…

计算机网络有哪些技能知识,网络基础知识及操作技能.ppt

网络基础知识及操作技能 主讲人 李春报 一、计算机网络概述 1、计算机网络的概念 计算机网络是把分布在不同地理位置上的计算机、终端&#xff0c;用通信设备和通信线路连结起来&#xff0c;再配以相应的网络软件&#xff0c;从而使众多计算机可以方便地互相传递信息&#xff0…