Ignore:
Timestamp:
Dec 18, 2013 11:42:04 AM (10 years ago)
Author:
nanang
Message:

Re #1716: Misc fixes/updates on Android app based on pjsua2+SWIG, e.g: fixed java string comparisons, added build config for ndk-build (for native debugging), updates on SVN props.

Location:
pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/java/android
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/java/android

    • Property svn:ignore
      •  

        old new  
        11bin 
        22gen 
         3obj 
         4.cproject 
  • pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/java/android/AndroidManifest.xml

    • Property svn:eol-style set to LF
  • pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/java/android/libs/armeabi

    • Property svn:ignore set to
      *
  • pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/java/android/project.properties

    • Property svn:eol-style set to LF
  • pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/java/android/src/org/pjsip/pjsua2/app/MainActivity.java

    r4693 r4697  
    2626import android.content.DialogInterface; 
    2727import android.content.Intent; 
     28import android.content.pm.ApplicationInfo; 
    2829import android.view.LayoutInflater; 
    2930import android.view.Menu; 
     
    8384                if (app == null) { 
    8485                        app = new MyApp(); 
     86                        /* Wait for GDB to init */ 
     87                        if ((getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0) { 
     88                                try { 
     89                                        Thread.sleep(5000); 
     90                                } catch (InterruptedException e) {} 
     91                        } 
     92                         
    8593                    app.init(this, getFilesDir().getAbsolutePath()); 
    8694                } 
     
    128136        @Override 
    129137        public boolean onOptionsItemSelected(MenuItem item) { 
    130                 CharSequence str = item.getTitle(); 
    131138                switch (item.getItemId()) { 
    132139                case R.id.action_acc_config: 
     
    368375                                                buddyListSelectedIdx = -1; 
    369376                                } else { 
    370                                         if (old_cfg.getUri() != cfg.getUri()) { 
     377                                        if (!old_cfg.getUri().equals(cfg.getUri())) { 
    371378                                                account.delBuddy(buddyListSelectedIdx); 
    372379                                                account.addBuddy(cfg); 
  • pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/java/android/src/org/pjsip/pjsua2/app/MyApp.java

    r4696 r4697  
    168168                        if (bi.getPresStatus().getStatus() == pjsua_buddy_status.PJSUA_BUDDY_STATUS_ONLINE) { 
    169169                                status = bi.getPresStatus().getStatusText(); 
    170                                 if (status == null || status == "") { 
     170                                if (status == null || status.isEmpty()) { 
    171171                                        status = "Online"; 
    172172                                } 
     
    340340        public void delAcc(MyAccount acc) { 
    341341                accList.remove(acc); 
    342                 /* GC will delete the acc soon? */ 
    343342        } 
    344343         
     
    369368                        System.out.println(e); 
    370369                } 
     370                 
     371                /* Suggest to delete, as we found this causes crash when the Java 
     372                 * deletes it later after lib has been destroyed. 
     373                 */ 
     374                json.delete(); 
    371375        } 
    372376 
     
    410414                        json.saveFile(filename); 
    411415                } catch (Exception e) {} 
     416 
     417                /* Suggest to delete, as we found this causes crash when the Java 
     418                 * deletes it later after lib has been destroyed. 
     419                 */ 
     420                json.delete(); 
    412421        } 
    413422         
     
    415424                String configPath = appDir + "/" + configName; 
    416425                saveConfig(configPath); 
     426                 
     427                /* Try force GC to avoid late destroy of PJ objects as they should be 
     428                 * deleted before lib is destroyed. 
     429                 */ 
     430                System.gc(); 
     431                 
    417432                try { 
    418433                        ep.libDestroy(); 
Note: See TracChangeset for help on using the changeset viewer.