mt6735 home界面点击fm图标后,fm不自动播放
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
home界面点击fm图标后,只进入Activity界面,fm不自动播放
[SOLUTION]
1、在FmRadioActivity中的
public void onServiceConnected(ComponentName className, IBinder service) {
LogUtils.d(TAG, "FMRadioActivity.onServiceConnected start");
……
else {
LogUtils.d(TAG, "ServiceConnection: FM service is not init");
mService.initService(mCurrentStation);
//删除以下
LogUtils.d(TAG, "ServiceConnection: call power up to service");
powerUpFM();
//删除以上
}
2、在FmRadioActivity中的
public boolean onPrepareOptionsMenu(Menu menu) {
……
refreshActionMenuItem((isSeeking || isScan) ? false : isPlaying);
refreshActionMenuPower((isScan || isSeeking) ? false: (isPlaying || (isMakePowerdown &&
!mIsNeedDisablePower)));//删除此行
refreshActionMenuPower((isScan || isSeeking)? false: true);//添加此行
3、在在FmRadioService中的
public IBinder onBind(Intent intent){
……
int iCurrentStation = FMRadioStation.getCurrentStation(mContext);
powerUpAsync(FMRadioUtils.computeFrequency(iCurrentStation));//删除该行
home界面点击fm图标后,只进入Activity界面,fm不自动播放
[SOLUTION]
1、在FmRadioActivity中的
public void onServiceConnected(ComponentName className, IBinder service) {
LogUtils.d(TAG, "FMRadioActivity.onServiceConnected start");
……
else {
LogUtils.d(TAG, "ServiceConnection: FM service is not init");
mService.initService(mCurrentStation);
//删除以下
LogUtils.d(TAG, "ServiceConnection: call power up to service");
powerUpFM();
//删除以上
}
2、在FmRadioActivity中的
public boolean onPrepareOptionsMenu(Menu menu) {
……
refreshActionMenuItem((isSeeking || isScan) ? false : isPlaying);
refreshActionMenuPower((isScan || isSeeking) ? false: (isPlaying || (isMakePowerdown &&
!mIsNeedDisablePower)));//删除此行
refreshActionMenuPower((isScan || isSeeking)? false: true);//添加此行
3、在在FmRadioService中的
public IBinder onBind(Intent intent){
……
int iCurrentStation = FMRadioStation.getCurrentStation(mContext);
powerUpAsync(FMRadioUtils.computeFrequency(iCurrentStation));//删除该行