Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff42d622 authored by Benson Huang's avatar Benson Huang Committed by Leo Wang
Browse files

[FM] There is no response after tapping FM in notification bar while FM is recoding

    SD card inserted and launch FM -> Select "Start Recording"
    in option menu -> Press "Home" key, drag-down notification
    bar -> Tap on FM, there is no response.

    The fix is to enter record screen when clicking record
    notification while recording.

    Bug 18762408

    Review: https://partner-android-review.git.corp.google.com/#/c/188811



    Signed-off-by: default avatarBenson Huang <benson.huang@mediatek.com>

Change-Id: I5efdd042eb04ed11051fe2f23a81298e18481805
parent 6982b3ad
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ public class FmRecordActivity extends Activity implements
        }
    }

    private void updateNotification(long recordTime) {
    private void updateRecordingNotification(long recordTime) {
        if (mNotificationBuilder == null) {
            Intent intent = new Intent();
            intent.setClass(mContext, FmRecordActivity.class);
@@ -178,6 +178,13 @@ public class FmRecordActivity extends Activity implements
                    .setLargeIcon(largeIcon)
                    .addAction(R.drawable.btn_fm_rec_stop_enabled, getText(R.string.stop_record),
                            pendingIntent);

            Intent cIntent = new Intent();
            cIntent.setClass(mContext, FmRecordActivity.class);
            cIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            PendingIntent contentPendingIntent = PendingIntent.getActivity(mContext, 0, cIntent,
                    PendingIntent.FLAG_UPDATE_CURRENT);
            mNotificationBuilder.setContentIntent(contentPendingIntent);
        }
        // Format record time to show on title
        Date date = new Date(recordTime);
@@ -348,7 +355,7 @@ public class FmRecordActivity extends Activity implements

                case MSG_UPDATE_NOTIFICATION:
                    if (mService != null) {
                        updateNotification(mService.getRecordTime());
                        updateRecordingNotification(mService.getRecordTime());
                    }
                    mHandler.sendEmptyMessageDelayed(MSG_UPDATE_NOTIFICATION, 1000);
                    break;