svn 加锁与解锁lock是什么锁

&&|&&责编:张楠
&&&&近日,Fuz&Design为自行车爱好者设计的U-Lock智能U型锁,登录众筹网站Kickstarter上众筹募集资金。这款U-Lock智能U型锁专为骑自行车而设计,使用了用了Noke的蓝压锁技术原理,并且将支持苹果的智能手表。参与活动的用户可以用99美元的价格买到这款智能锁。图片来自kickstarter图片来自kickstarter图片来自kickstarter&&&&据悉,U-Lock智能U型锁采用先进的钢合金材料,除了防水之后,Fuz&Design表示,这款产品还可以在沙尘等恶劣环境当中使用。U-Lock智能U型锁带有配套的APP,可支持蓝牙解锁功能,此外还有报警功能,可发出30秒报警声,50米处都能听到。
产品类型 屏幕尺寸
天津重庆哈尔滨沈阳长春石家庄呼和浩特西安太原兰州乌鲁木齐成都昆明贵阳长沙武汉郑州济南青岛烟台合肥南京杭州东莞南宁南昌福州厦门深圳温州佛山宁波泉州惠州银川
本城市下暂无经销商
其他小论坛精选
下载中关村在线Android 客户端
下载中关村在线 iPhone 客户端
下载中关村在线Windows8客户端
成为中关村在线微信好友
4¥3995¥13006¥7987¥4998¥4689¥37610¥298[AndroidTips]Android中系统自带的锁:WalkLock、KeyguardLock
- 坚持,淡定 - ITeye技术网站
博客分类:
WalkLock - 顾名思义 唤醒锁 点亮屏幕用的
KeyguardLock - 顾名思义 键盘锁 解锁键盘用的
详细介绍:
1: WalkLock 唤醒锁
- WalkLock真的能点亮屏幕吗?
答案是肯定的。 可是有时候为什么不点亮屏幕,这个就是参数设置的问题了。
PowerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, "Gank");
PowerManager.FULL_WAKE_LOCK 这个参数是手机点亮的程度,(什么Cpu,屏幕亮度,键盘灯)
PowerManager.ACQUIRE_CAUSES_WAKEUP 关键是这个参数的理解。
WalkLock点亮屏幕并非真的去点亮了屏幕,你可以理解为,它通过Android组件(Activity)去点亮了屏幕。
假如一个通知想去点亮屏幕,问题来了,它能点亮吗? 肯定不行。
不过拥有这个PowerManager.ACQUIRE_CAUSES_WAKEU参数,你就可以点亮屏幕了。它使WalkLock不再依赖组件就可以点亮屏幕了。
- WalkLock如何获得屏幕的状态?
PowerManager.isScreenOn()方法;这个方法返回true: 屏幕是唤醒的
返回false:屏幕是休眠的
- WalkLock唤醒和休眠的方法?
WalkLock.aquire() 在屏幕休眠的状态下唤醒屏幕
WalkLock.release() 在屏幕点亮的状态下,使屏幕休眠。
WalkLock.release()这个方法有个需要注意的地方:
例如:WalkLockA对象先唤醒了屏幕再使屏幕休眠,ok没问题
屏幕本身就是唤醒状态,WalkLockA对象没有唤醒过屏幕,WalkLockA对象如果尝试使屏幕休眠。会产生一个异常 UnLock Sreen。
2:KeyguardLock 键盘锁
- KeyguardLock获得当前屏幕是否解锁?
KeygroundManager.inKeyguardRestrictedInputMode() 返回true表示键盘锁住, 返回false表示键盘解锁中
- KeyguardLock给屏幕解锁和上锁?
KeyguardLock.disableKeyguard()解锁键盘
KeyguardLock.reenableKeyguard()锁键盘
KeyguardLock没有上面唤醒锁的问题,就是无论你键盘是否由KeyguardLockA解锁,你调用KeyguardLockA对象的reenableKeyguard()方法都不会有异常。
这两把锁一些概念性的理解,假如你认为你获得了一个键盘锁对象,你就可以锁屏幕了。这个就大错特错了。
你锁不了其他程序打开的屏幕(如果可以的话,一个for循环一直锁你屏幕,你哭都没眼泪)
你可以控制自己的锁,别想着别人的锁。
最后总结下用法:
一般这两把锁都是配合使用的,你解锁屏幕的时候肯定不希望屏幕漆黑一片。关闭键盘锁的时候希望屏幕也同时休眠。
1:我尝试手动关闭屏幕,可是总继续亮那么一小会。
2:如果手机自动关闭屏幕的话,不会有这个问题。
public void unlockScreen() {
// 获取PowerManager的实例
PowerManager pm = (PowerManager) mContext
.getSystemService(Context.POWER_SERVICE);
// 得到一个WakeLock唤醒锁
mWakelock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK
| PowerManager.ACQUIRE_CAUSES_WAKEUP
| PowerManager.ON_AFTER_RELEASE, "SimpleTimer");
if (!mWakelock.isHeld()) {
// 唤醒屏幕
mWakelock.acquire();
// 获得一个KeyguardManager的实例
km = (KeyguardManager) mContext
.getSystemService(Context.KEYGUARD_SERVICE);
// 得到一个键盘锁KeyguardLock
mKeyguardLock = km.newKeyguardLock("SimpleTimer");
if (km.inKeyguardRestrictedInputMode()) {
// 解锁键盘
mKeyguardLock.disableKeyguard();
注意,这里使用的mWakelock.isHeld())来判断屏幕当前是否是休眠状态,从Android 2.1 API Level7开始增加了一个判断屏幕是否处于点亮状态可以使用public boolean isScreenOn ()这个方法。
锁屏幕的代码是
public void lockScreen() {
// release screen
if (!km.inKeyguardRestrictedInputMode()) {
mKeyguardLock.reenableKeyguard();
// 使屏幕休眠
if (mWakelock.isHeld()) {
mWakelock.release();
laiyangdeli
浏览: 719430 次
来自: 南京
Sorry~~
When I build &call ...
借地请教个问题:fatal: open /dev/null o ...
多谢楼主分享,感激不尽
不错,有收获第三人称单数:
lock是什么意思,词典释义与在线翻译:
船闸,水闸,闸
【军】枪机
止动器,制动器,锁定器
关闭的状态
(使)固定
锁,锁上,锁定,(被)锁住,把…锁在屋里,把…锁在门外,锁好门窗,把…锁起来
卡住,塞住, 煞住
过闸,通过水闸
使紧密衔接
卷入争论,陷入
把…关押起来,把某人关进监狱,拘禁
把…收好并锁起来
把(钱)搁死(成为不易兑现的资本)
紧抱住,挽住
被紧紧抓住
交结,连接
vt. & vi. 锁住,锁上 fastebecome fixed
vt. & vi. (使)固定 (cause to) become fixed, unable to move
[C]锁 an apparatus for closing and fastening sth, usually, by means of a key
[C]水闸,船闸 a stretch of water closed off by gates, especially on a canal, so that the water level can be raised or lowered to move boats up or down a slope
[C][U](头发的)一缕 a small piece of hair
提示:各行业词典APP中含有本词条的独家正版内容,在手机上可看到更多释义内容。
lock&:&锁 ...
在&&中查看更多...
lock&:&锁上, 锁住 ...
在&&中查看更多...
lock&:&锁, ...
在&&中查看更多...
lock&:&锁上 ...
在&&中查看更多...
lock&:&锁 ...
在&&中查看更多...
lock&:&锁 ...
在&&中查看更多...
lock&:&水闸 ...
在&&中查看更多...
a fastener fitted to a door or drawer to keep it firmly closed
a strand or cluster of hair
a mechanism that detonates the charge of a gun
enclosure consisting of a section of canal that can be closed to con used to raise or lower vessels that pass through it
a restraint incorporated into the ignition switch to prevent the use of a vehicle by persons who do not have the key
any wrestling hold in which some part of the opponent's body is twisted or pressured
"lock the bike to the fence"
"engaged the gears"
"The therapist noticed that the patient's knees tended to lock in this exercise"
"He locked his hands around her neck"
become engaged or intermes
"They were locked in embrace"
hold fast (in a certain state);
"He was locked in a laughing fit"
place in a place where something cannot be removed or s
"The parents locked her daughter up for the weekend"
"She locked her jewels in the safe"
pass by means through a lock in a waterway
build locks in order to facilitate the navigation of vessels
lock的用法和样例:
用作名词 (n.)
He chiseled a hole in the door to fit a new lock.
他在门上凿了个孔,以便装一把新锁。
Water went rushing through the lock gates.
水流经水闸时十分湍急。
He keeps a lock of her hair.
他保存着她的一绺头发。
用作动词 (v.)
The ship was locked in the ice through the winter.
整个冬天船只被冻在冰层里。
Be sure to lock your bicycle.
自行车务必上锁。
She locked her child in her arms.
她把孩子紧紧搂在怀里。
The ship locked into the canal.
船过闸驶入运河。
用作动词 (v.)
用作不及物动词
The safe locks easily.
这保险柜容易锁。
This trunk won't lock.
这个皮箱锁不上。
This suitcase won't lock because it is too full.
这个箱子锁不上,因为装得太满了。
I can't control the car, the wheels have locked.
我无法操纵这辆汽车,车轮给卡死了。
The wheel locked when he braked and the car skidded.
他刹车后轮子就不转动了,车还是滑行了一段。
用作及物动词
S+~+ n./pron.
Be sure to lock the warehouse when you leave.
你离开仓库时,请一定把它锁上。
Race locked the door and took the key with him.
雷斯锁上了门,并带走了钥匙。
He locked the rear wheel of the bike to prevent it from being stolen.
他把自行车后轮锁上,以防被盗。
The students locked arms and sang the school song.
学生们挽着手臂,唱起校歌。
We should avoid locking the stable door after the horse has been stolen.
我们应该避免亡羊补牢。
用于be ~ed结构
The door was locked and we were unable to enter.
门是锁住的,我们进不去。
He pulled the door, but the door was locked.
他拉了拉门,但门是锁着的。
One of the bedrooms was locked and a low moan came from it.
有一间寝室的门锁着,里面传出了微弱的呻吟声。
He had overlooked the fact that the back door was not locked.
他忽略了后门没有锁这一事实。
Her jaws were tightly locked.
她牙关紧闭。
v -ed as o-Compl.
I have a secret safely locked in my breast.
我将秘密隐藏在心底。
用作名词 (n.)
This lock is damaged.This door will never open!
这把锁坏了,门开不开了!
Something has gone wrong with the lock;it won't work.
这把锁有毛病,锁不上了。
He found the thieves were forcing the lock of the jewel case.
他发现窃贼在撬珠宝盒上的锁。
He lost his temper when he broke the key in the lock.
当钥匙断在锁中时,他发了火。
I can't force the key into this lock, it won't work.
我不能把钥匙插进锁里,这把钥匙开不了这把锁。
She has a lock but she bought another one as an additional insurance against thieves.
她有一把锁,但她又买了一把作为防范盗贼的另外一个保险措施。
Each drawer was fitted with a lock.
每个抽屉上都安装了一把锁。
In ideological work, we must learn to open different locks with different keys because a method that answers with one person may not answer with another.
做思想工作时,必须学会“一把钥匙开一把锁”,因为适用于一个人的方法不一定适用于另一个人。
After the burglary she had all the locks changed.
在遭到盗窃以后,她把所有的锁都换了。
The ship passed through a lock in a canal.
轮船通过了运河上的船闸。
The lock keeper closed the lock gates.
水闸管理员关上了闸门。
She keeps a lock of his hair.
她保留着他的一缕头发。
He gazed in the mirror at his greying locks.
他凝视着镜中自己日渐花白的头发,感慨岁月不待人。
用作动词 (v.)
lock away (v.+adv.)
把(某物)锁起来 keep sth safe under lock and key
She locked her memories of him away in her heart.她把对他的怀念埋藏在心里。
This is too valuable to be left lying about, lock it away somewhere.这东西太贵重了,不能随处放置,找个地方锁起来。
用于 be ~ed 结构
The prisoner is securely locked away.那个犯人已被监禁起来了。
Don't worry, the dangerous criminals have all been locked away.别担心,所有的危险犯人都已被关起来了。
lock in1 (v.+adv.)
将(某人或某物)锁〔包围〕在里面 keep (sth, sb, or oneself) inside a building or container, with or assurround sth
I locked him in by mistake.
我没留心,把他锁在屋里了。
The guard locked the prisoners in for the night.
看守把犯人监禁起来过夜。
用于 be ~ed 结构
He's locked in and nobody knows where the key is.
他被反锁在屋里,没人知道钥匙在哪儿。
使固定 become fixed, unable to move
On the newer television sets, the colour is locked in so that you don't need to keep changing the control.
这些较新式的电视机的色彩已经调定,你不必老去动控制钮。
Money paid into this insurance contract is locked in until you die or stop working.
按这份保险合同的规定,交付的钱一直要冻结到你去世或不工作的时候。
lock in2 (v.+prep.)
把…锁在…内 keep sb/sth safe under lock and key
lock sb/oneself/sth in sth
Tom has locked himself in his room and refuses to speak to any member of the family.汤姆把自己锁在他的房间内,拒绝和家里任何人讲话。
用于 be ~ed 结构
Although the jewels were locked in a strong box, the thieves stole them without any difficulty.尽管珠宝被锁在一个结实的箱子里,小偷还是毫不费力地把它们偷走了。
lock out (v.+adv.)
关在外边,不准(某人)进入… prevent sb, oneself, or sth from entering a room or building, with a lock and key
lock sb/oneself
The management has locked the men out.资方封闭工厂,阻止工人进厂开工。
I locked myself out by mistake.我没留心,把自己锁在外面了。
用于 be ~ed 结构
The men were locked out in response to their refusal to operate the new machines.作为对工人们拒绝操作新机器的回答,雇主不准他们进厂。
lock up (v.+adv.)
将(某人或某物)锁住〔关押〕 keep sth safprevput sb in prison or a hospital
lock sb/sth
Will you lock up the house, please?请将房门锁起来,好吗?
He locked up the jewels in a box.他把珠宝放在箱子里锁好。
I always lock up my money in a strong box.我总是把钱放在一个结实的盒子里,锁好保管起来。
People usually lock up the house before they go to bed at night.人们通常在夜晚睡觉之前将房门锁好。
I can't imagine how the rain got in, because we had locked up all the windows tightly.所有窗户都关得很严实,我想象不到雨是怎么进来的。
They have locked up all their capital in that enterprise.他们已把他们的所有资本都滞压在那家企业了。
They have locked the prisoners up in their cell.他们已把犯人监禁在单身牢房里。
用于 be ~ed 结构
She'she ought to be locked up.她疯了,应该关进疯人院。
He's been locked up for receiving stolen goods.他由于窝藏赃物而被关押起来。
When he became violent, the drunk was taken to the police station and locked up for the night.那个醉汉行凶,被带到派出所里关了一夜。
The idea is locked up in his brains.We know nothing.他把自己的想法藏在脑子里,我们一无所知。
All my money has been locked up in property for the last ten years.最近10年,我所有的钱都套死在房地产上了。
The idea of being locked up in jail filled her with horror.想到要被关进监狱,她充满恐惧。
用作名词 (n.)
lock, stock and barrel
完全,全部 completely
The fire destroyed the house, lock, stock and barrel.
这场火彻底烧毁了这幢房子。
He turned them out lock, stock and barrel.
他把他们全部驱逐出去。
They decided to drop this foreign business in future lock, stock and barrel.
他们决定今后干脆不做这种外交上的交易了。
under lock and key
锁藏于建筑物〔集装箱、房间〕之中 in a locked building〔container,room〕
The judge said that the convicted criminal was a danger to society and should be kept under lock and key for the rest of his life.
法官说那个罪犯对社会是个危害,因此,必须将他关起来。
She would keep any sensitive documents under lock and key.
她总是把任何机密文件锁得好好的。
用作动词 (v.)
不放心地锁
把…锁起来
把记录锁藏起来
将…锁在里面,把…包围起来
将…锁在外面
将…锁住,把(某人)关押起来
用作名词 (n.)
用力把锁撬开
(用非钥匙之物)撬锁
未加工的锁
(将钥匙转动两次的)双重锁
牢固的锁头
浓密的头发
乱蓬蓬的头发
摇晃的头发
浓密的头发
散乱的头发
湿淋淋的头发
吓人的头发
扁平的头发
漂动的头发
光滑的头发
光滑的头发
金发式的头发
灰白的头发
长而浓密的头发
粗硬的头发
乌油油的头发
稀少的头发
光亮的头发
修剪过的头发
柔软光滑的头发
弯曲的头发
稀疏的头发
硬挺挺的头发
稀疏的头发
杂乱的头发
难梳理的头发
变白了的头发
He wore his hair so long that his auburn locks almost touched his shoulders.
出自:D. Carnegie
Long black locks streamed down her forehead.
出自:J. Cary
Though this..hair was turning from grey to white, Mrs. Arbuthnot snipped off two locks.
出自:E. Longford
He had new locks put on the doors.
出自:D. L. Sayers
Her second diary..had..a lock, making it safer for private thoughts.
出自:S. Quinn
The reformers locked up the church and departed with the keys.
出自:Ld Macaulay
Then he closed, locked, bolted and chained the door.
出自:G. Greene
lock的详细讲解:
lock的基本意思是“锁上”“锁住”,也可表示“卡住”,引申可作“使…固定”解。
lock用作及物动词时接名词或代词作宾语,可用于被动结构。
lock用作不及物动词时主动形式常含有被动意义。
lock作名词是“锁”的意思,指安在门、箱子、抽屉等的开合处或铁链的环孔中,使人不能随便打开的金属器具,一般要用钥匙才能开。是可数名词。
lock作“水闸,船闸”解时,指拦在河道上的可使水位升降或船只通过的闸门。
lock还可作“一缕头发”解,这时可用作可数名词,也可用作不可数名词。
她锁上了门。
误 She locked the door with a lock.
正 She locked the door.
析 “把门锁上”只需说lock the door,而无需再接with a lock。
☆ 直接源自古英语的loc,意为锁。
lock的海词问答与网友补充:
lock的相关资料:
lock&:&锁,(运河、 ...
在&&中查看更多...
【同义词】
lock的相关缩略词,共有3条
逻辑Co-processing内核
锁上公共汽车
乐公司潼南T(撤走)
lock:lock n. 锁v. 锁, 锁上, 锁住 英英解释:名词lock:1. a fastener fitted to a door or drawer to keep it firmly closed2…
相关词典网站:

我要回帖

更多关于 frp lock解锁教程 的文章

 

随机推荐