mt6735 [Audio Profile]量调为震动后,重启手机,按一次音量向上键,音量被调到最...

将AudioService.中将“if ((lastAudibleIndex ==

0) &&

mVoiceCapable &&(mStreamVolumeAlias[mStreamType]

==

AudioSystem.STREAM_RING))”

这段得实现,让lastAudioIndex有可能为0。这样再

开机后从vibrate转成normal

mode的时候,取lastAudioIndex可以取到0,则向上按

侧键时升为1:

readSettings() {

....

defaultIndex = (index > 0) ?

index :

AudioManager.DEFAULT_STREAM_VOLUME[mStreamType];

int

lastAudibleIndex =

Settings.System.getIntForUser(

mContentResolver, name, defaultIndex,

UserHandle.USER_CURRENT);

// a last

audible index of 0 should never be stored for ring

and

notification

// streams

on phones (voice capable devices).

// if

((lastAudibleIndex == 0) && mVoiceCapable

&&

//

(mStreamVolumeAlias[mStreamType] == AudioSystem.STREAM_RING))

{

//

lastAudibleIndex =

AudioManager.DEFAULT_STREAM_VOLUME[mStreamType];

// Correct

the data base

//

sendMsg(mAudioHandler,

//

MSG_PERSIST_VOLUME,

//

SENDMSG_QUEUE,

//

PERSIST_LAST_AUDIBLE,

//

device,

//

this,

//

PERSIST_DELAY);

//

}

....

}

资料来源:一牛网MT6735

你可能感兴趣的:(mt6735 [Audio Profile]量调为震动后,重启手机,按一次音量向上键,音量被调到最...)