| | |
| | | import com.safeluck.floatwindow.manager.AndroidCameraRecordManager; |
| | | import com.safeluck.floatwindow.manager.UsbCameraPushManager; |
| | | import com.safeluck.floatwindow.manager.UsbCameraRecordManager; |
| | | import com.safeluck.floatwindow.util.GlobalData; |
| | | |
| | | import timber.log.Timber; |
| | | |
| | |
| | | Timber.d("stopMedia called via AIDL"); |
| | | FloatingService.this.stopMedia(media); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void sendInfo(String s, int processId) throws RemoteException { |
| | | if (processId == 2) { |
| | | ensureP2Bound(); |
| | | if (p2Service != null) { |
| | | p2Service.sendInfo(s,processId); |
| | | } |
| | | }else{ |
| | | GlobalData.getInstance().setWaterMaskInfo(s); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void registerCallback(IMyCallback cb) throws RemoteException { |
| | | if (cb != null) { |
| | |
| | | response.setMessage(message); |
| | | notifyCallback(response); |
| | | } |
| | | /* private BroadcastReceiver mCloseBroadCastReceiver = new BroadcastReceiver() { |
| | | @Override |
| | | public void onReceive(Context context, Intent intent) { |
| | | String action = intent.getAction(); |
| | | if (action.equals("com.safeluck.floatwindow_video2.studyinfo")) { |
| | | String str= intent.getStringExtra("info"); |
| | | Log.i(TAG, "广播"+str); |
| | | GlobalData.getInstance().setWaterMaskInfo(str); |
| | | } |
| | | } |
| | | }; |
| | | private void registBroadCastReceiver() { |
| | | IntentFilter filter = new IntentFilter(); |
| | | filter.addAction("com.safeluck.floatwindow_video2.studyinfo"); |
| | | registerReceiver(mCloseBroadCastReceiver,filter); |
| | | |
| | | } |
| | | private void unRegisterTestBroadReceiver() { |
| | | if (mCloseBroadCastReceiver != null) { |
| | | |
| | | //查询到相应的BroadcastReceiver |
| | | unregisterReceiver(mCloseBroadCastReceiver); |
| | | |
| | | } |
| | | }*/ |
| | | } |