@@ -2914,69 +2914,6 @@ private void onRunActivityResult(int p_result_code, Intent p_data)
29142914 doProcess (false );
29152915 }
29162916
2917- ////////////////////////////////////////////////////////////////////////////////
2918-
2919- // EngineApi implementation
2920-
2921- public Activity getActivity ()
2922- {
2923- return (LiveCodeActivity )getContext ();
2924- }
2925-
2926- public ViewGroup getContainer ()
2927- {
2928- return (ViewGroup )getParent ();
2929- }
2930-
2931- private boolean m_pending_activity_running = false ;
2932- private int m_pending_activity_result_code = 0 ;
2933- private Intent m_pending_activity_data = null ;
2934- public void runActivity (Intent p_intent , ActivityResultCallback p_callback )
2935- {
2936- // We aren't re-entrant, so just invoke the callback as 'cancelled' if one is
2937- // already running.
2938- if (m_pending_activity_running )
2939- {
2940- p_callback . handleActivityResult (Activity .RESULT_CANCELED , null );
2941- return ;
2942- }
2943-
2944- // Mark an activity as running.
2945- m_pending_activity_running = true ;
2946-
2947- // Run the activity.
2948- ((LiveCodeActivity )getContext ()) . startActivityForResult (p_intent , RUN_ACTIVITY_RESULT );
2949-
2950- // Wait until the activity returns.
2951- while (m_pending_activity_running )
2952- doWait (60.0 , false , true );
2953-
2954- // Take local copies of the instance vars (to stop hanging data).
2955- Intent t_data ;
2956- int t_result_code ;
2957- t_data = m_pending_activity_data ;
2958- t_result_code = m_pending_activity_result_code ;
2959-
2960- // Reset the instance vars (to stop hanging data and so that the callback
2961- // can start another activity if it wants).
2962- m_pending_activity_data = null ;
2963- m_pending_activity_result_code = 0 ;
2964-
2965- p_callback . handleActivityResult (t_result_code , t_data );
2966- }
2967-
2968- private void onRunActivityResult (int p_result_code , Intent p_data )
2969- {
2970- // Store the result details.
2971- m_pending_activity_data = p_data ;
2972- m_pending_activity_result_code = p_result_code ;
2973- m_pending_activity_running = false ;
2974-
2975- // Make sure we signal a switch back to the script thread.
2976- if (m_wake_on_event )
2977- doProcess (false );
2978- }
2979-
29802917 ////////////////////////////////////////////////////////////////////////////////
29812918
29822919 // url launch callback
0 commit comments