Loading android/app/src/com/android/bluetooth/avrcpcontroller/BluetoothMediaBrowserService.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -112,8 +112,9 @@ public class BluetoothMediaBrowserService extends MediaBrowserServiceCompat { Intent launchIntent = new Intent(); Intent launchIntent = new Intent(); launchIntent.setAction(BluetoothPrefs.BLUETOOTH_SETTING_ACTION); launchIntent.setAction(BluetoothPrefs.BLUETOOTH_SETTING_ACTION); launchIntent.addCategory(BluetoothPrefs.BLUETOOTH_SETTING_CATEGORY); launchIntent.addCategory(BluetoothPrefs.BLUETOOTH_SETTING_CATEGORY); int flags = PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE; PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0, PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0, launchIntent, PendingIntent.FLAG_UPDATE_CURRENT); launchIntent, flags); extras.putParcelable(ERROR_RESOLUTION_ACTION_INTENT, pendingIntent); extras.putParcelable(ERROR_RESOLUTION_ACTION_INTENT, pendingIntent); PlaybackStateCompat errorState = new PlaybackStateCompat.Builder() PlaybackStateCompat errorState = new PlaybackStateCompat.Builder() .setErrorMessage(getString(R.string.bluetooth_disconnected)) .setErrorMessage(getString(R.string.bluetooth_disconnected)) Loading android/app/src/com/android/bluetooth/opp/BluetoothOppNotification.java +28 −1 Original line number Original line Diff line number Diff line Loading @@ -569,7 +569,7 @@ class BluetoothOppNotification { mContext.getText(R.string.incoming_file_confirm_ok), mContext.getText(R.string.incoming_file_confirm_ok), PendingIntent.getBroadcast(mContext, 0, PendingIntent.getBroadcast(mContext, 0, new Intent(baseIntent).setAction(Constants.ACTION_ACCEPT), 0)).build(); new Intent(baseIntent).setAction(Constants.ACTION_ACCEPT), 0)).build(); Notification n = Notification public_n = new Notification.Builder(mContext, OPP_NOTIFICATION_CHANNEL).setOnlyAlertOnce( new Notification.Builder(mContext, OPP_NOTIFICATION_CHANNEL).setOnlyAlertOnce( true) true) .setOngoing(true) .setOngoing(true) Loading @@ -596,6 +596,33 @@ class BluetoothOppNotification { .setSmallIcon(R.drawable.bt_incomming_file_notification) .setSmallIcon(R.drawable.bt_incomming_file_notification) .setLocalOnly(true) .setLocalOnly(true) .build(); .build(); Notification n = new Notification.Builder(mContext, OPP_NOTIFICATION_CHANNEL).setOnlyAlertOnce( true) .setOngoing(true) .setWhen(info.mTimeStamp) .setContentIntent(PendingIntent.getBroadcast(mContext, 0, new Intent(baseIntent).setAction( Constants.ACTION_INCOMING_FILE_CONFIRM), 0)) .setDeleteIntent(PendingIntent.getBroadcast(mContext, 0, new Intent(baseIntent).setAction(Constants.ACTION_HIDE), 0)) .setColor(mContext.getResources() .getColor( com.android.internal.R.color .system_notification_accent_color, mContext.getTheme())) .setContentTitle(mContext.getText( R.string.incoming_file_confirm_Notification_title)) .setContentText(info.mFileName) .setStyle(new Notification.BigTextStyle().bigText(mContext.getString( R.string.incoming_file_confirm_Notification_content, info.mDeviceName, info.mFileName))) .setSubText(Formatter.formatFileSize(mContext, info.mTotalBytes)) .setSmallIcon(R.drawable.bt_incomming_file_notification) .setLocalOnly(true) .setVisibility(Notification.VISIBILITY_PRIVATE) .setPublicVersion(public_n) .build(); mNotificationMgr.notify(NOTIFICATION_ID_PROGRESS, n); mNotificationMgr.notify(NOTIFICATION_ID_PROGRESS, n); } } cursor.close(); cursor.close(); Loading Loading
android/app/src/com/android/bluetooth/avrcpcontroller/BluetoothMediaBrowserService.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -112,8 +112,9 @@ public class BluetoothMediaBrowserService extends MediaBrowserServiceCompat { Intent launchIntent = new Intent(); Intent launchIntent = new Intent(); launchIntent.setAction(BluetoothPrefs.BLUETOOTH_SETTING_ACTION); launchIntent.setAction(BluetoothPrefs.BLUETOOTH_SETTING_ACTION); launchIntent.addCategory(BluetoothPrefs.BLUETOOTH_SETTING_CATEGORY); launchIntent.addCategory(BluetoothPrefs.BLUETOOTH_SETTING_CATEGORY); int flags = PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE; PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0, PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0, launchIntent, PendingIntent.FLAG_UPDATE_CURRENT); launchIntent, flags); extras.putParcelable(ERROR_RESOLUTION_ACTION_INTENT, pendingIntent); extras.putParcelable(ERROR_RESOLUTION_ACTION_INTENT, pendingIntent); PlaybackStateCompat errorState = new PlaybackStateCompat.Builder() PlaybackStateCompat errorState = new PlaybackStateCompat.Builder() .setErrorMessage(getString(R.string.bluetooth_disconnected)) .setErrorMessage(getString(R.string.bluetooth_disconnected)) Loading
android/app/src/com/android/bluetooth/opp/BluetoothOppNotification.java +28 −1 Original line number Original line Diff line number Diff line Loading @@ -569,7 +569,7 @@ class BluetoothOppNotification { mContext.getText(R.string.incoming_file_confirm_ok), mContext.getText(R.string.incoming_file_confirm_ok), PendingIntent.getBroadcast(mContext, 0, PendingIntent.getBroadcast(mContext, 0, new Intent(baseIntent).setAction(Constants.ACTION_ACCEPT), 0)).build(); new Intent(baseIntent).setAction(Constants.ACTION_ACCEPT), 0)).build(); Notification n = Notification public_n = new Notification.Builder(mContext, OPP_NOTIFICATION_CHANNEL).setOnlyAlertOnce( new Notification.Builder(mContext, OPP_NOTIFICATION_CHANNEL).setOnlyAlertOnce( true) true) .setOngoing(true) .setOngoing(true) Loading @@ -596,6 +596,33 @@ class BluetoothOppNotification { .setSmallIcon(R.drawable.bt_incomming_file_notification) .setSmallIcon(R.drawable.bt_incomming_file_notification) .setLocalOnly(true) .setLocalOnly(true) .build(); .build(); Notification n = new Notification.Builder(mContext, OPP_NOTIFICATION_CHANNEL).setOnlyAlertOnce( true) .setOngoing(true) .setWhen(info.mTimeStamp) .setContentIntent(PendingIntent.getBroadcast(mContext, 0, new Intent(baseIntent).setAction( Constants.ACTION_INCOMING_FILE_CONFIRM), 0)) .setDeleteIntent(PendingIntent.getBroadcast(mContext, 0, new Intent(baseIntent).setAction(Constants.ACTION_HIDE), 0)) .setColor(mContext.getResources() .getColor( com.android.internal.R.color .system_notification_accent_color, mContext.getTheme())) .setContentTitle(mContext.getText( R.string.incoming_file_confirm_Notification_title)) .setContentText(info.mFileName) .setStyle(new Notification.BigTextStyle().bigText(mContext.getString( R.string.incoming_file_confirm_Notification_content, info.mDeviceName, info.mFileName))) .setSubText(Formatter.formatFileSize(mContext, info.mTotalBytes)) .setSmallIcon(R.drawable.bt_incomming_file_notification) .setLocalOnly(true) .setVisibility(Notification.VISIBILITY_PRIVATE) .setPublicVersion(public_n) .build(); mNotificationMgr.notify(NOTIFICATION_ID_PROGRESS, n); mNotificationMgr.notify(NOTIFICATION_ID_PROGRESS, n); } } cursor.close(); cursor.close(); Loading