[Faq10059] Releasing the photo key during the continuous shooting process does not stop download
Platform: mt6589mt6572mt6582
Branch: jb2jb3jb5
FAQ content
[Description]
Go to camera and press the camera to start continuous shooting. You may encounter the problem of releasing the camera key, but you can modify it as follows.
This problem is a performance problem. The ENG version performs mtklog and other operations more than the user version, and the loading itself is heavy, so the performance is relatively poor, we recommend that you perform a test on the user version after modification.
[Solution]
1. Modify inputdispatcher. cpp as follows:
Void inputdispatcher: policymotion (const extends ymotionargs * ARGs ){
# If debug_inbound_event_details
Alogd ("policymotion-eventtime = % LLD, DeviceID = % d, source = 0x % x, policyflags = 0x % x ,"
"Action = 0x % x, flags = 0x % x, metastate = 0x % x, buttonstate = 0x % x, edgeflags = 0x % x ,"
"Xprecision = % F, yprecision = % F, downtime = % LLD ",
ARGs-> eventtime, argS-> DeviceID, argS-> source, argS-> policyflags,
ARGs-> action, argS-> flags, argS-> metastate, argS-> buttonstate,
ARGs-> edgeflags, argS-> xprecision, argS-> yprecision, argS-> downtime );
For (uint32_t I = 0; I <ARGs-> pointercount; I ++ ){
Alogd ("pointer % d: Id = % d, tooltype = % d ,"
"X = % F, y = % F, pressure = % F, size = % F ,"
"Touchmajor = % F, touchminor = % F, toolmajor = % F, toolminor = % F ,"
"Orientation = % F ",
I, argS-> pointerproperties [I]. ID,
ARGs-> pointerproperties [I]. tooltype,
ARGs-> pointercoords [I]. getaxisvalue (amotion_event_axis_x ),
ARGs-> pointercoords [I]. getaxisvalue (amotion_event_axis_y ),
ARGs-> pointercoords [I]. getaxisvalue (amotion_event_axis_pressure ),
ARGs-> pointercoords [I]. getaxisvalue (amotion_event_axis_size ),
ARGs-> pointercoords [I]. getaxisvalue (amotion_event_axis_touch_major ),
ARGs-> pointercoords [I]. getaxisvalue (amotion_event_axis_touch_minor ),
ARGs-> pointercoords [I]. getaxisvalue (amotion_event_axis_tool_major ),
ARGs-> pointercoords [I]. getaxisvalue (amotion_event_axis_tool_minor ),
ARGs-> pointercoords [I]. getaxisvalue (amotion_event_axis_orientation ));
}
# Endif
// Add start
Bool isempty = minboundqueue. isempty ();
If (! Isempty)
{
Evententry * tail = static_cast <motionentry *> (minboundqueue. Tail );
If (tail! = NULL & tail-> type = evententry: type_motion)
{
Motionentry * tailentry = static_cast <motionentry *> (tail );
If (tailentry-> action = ARGs-> action
& Tailentry-> downtime = ARGs-> downtime
& Tailentry-> pointercoords [0]. getaxisvalue (amotion_event_axis_x) = ARGs-> pointercoords [0]. getaxisvalue (amotion_event_axis_x)
& Tailentry-> pointercoords [0]. getaxisvalue (amotion_event_axis_y) = ARGs-> pointercoords [0]. getaxisvalue (amotion_event_axis_y)
)
{
Alogd ("MTK debug policymotion drop motion event because of same X and Y, Action = 0x % x", argS-> action );
Return;
}
}
}
Alogd ("MTK debug policymotion not drop ");
// Add end
If (! Validatemotionevent (ARGs-> action, argS-> pointercount, argS-> pointerproperties )){
Return;
}
....
}
2. Add the following two functions to orientationmanager. Java:
Public void enableorientationmanager (){
Morientationlistener. Enable ();
}
Public void disableorientationmanager (){
Morientationlistener. Disable ();
}
3. Add the following two functions in abstractgalleryactivity. Java:
Public void enableorientationmanager (){
Morientationmanager. enableorientationmanager ();
}
Public void disableorientationmanager (){
Morientationmanager. disableorientationmanager ();
}
4. Add the following code to apps/camera/src/COM/Android/camera. Java:
Public void enableorientationlistener (){
Morientationlistener. Enable ();
}
Public void disableorientationlistener (){
Morientationlistener. Disable ();
}
@ Override
Public void enableorientationmanager (){
Super. enableorientationmanager ();
}
@ Override
Public void disableorientationmanager (){
Super. disableorientationmanager ();
}
5. In apps/camera/src/COM/Android/camera/actor/photoactor. Java:
5.1 modify onburstsavedone () as follows:
Public void onburstsavedone (){
If (! Mcameraclosed &&! Mcamera. isimagecaptureintent ()){
Mcamera. cancelcontinuousshot ();
Restartpreview (false );
}
// Add start
Mcamera. enableorientationlistener ();
Mcamera. enableorientationmanager ();
// Add end
Msavingpictures = false;
}
5.2 modify onshutterbuttonlongpressed () as follows:
Mmemorymanager. initmemory ();
Mcontinuousshotmongomed = true;
Mcurrentshotsnum = 0;
// Add start
Mcamera. disableorientationlistener ();
Mcamera. disableorientationmanager ();
// Add end
Mcamera. applycontinousshot ();
Mcamera. getthumbnailmanager (). setrefreshinterval (thumbnail_refresh_continuous );
Mcamera. getfocusmanager (). clearfocusoncontinuous ();
Mcamera. getfocusmanager (). dosnap ();
[Faq10059] Releasing the photo key during the continuous shooting process does not stop download