()
| 713 | |
| 714 | //#if android |
| 715 | public static final String compute(){ |
| 716 | final String manufact = System.getProperty("device.manufacturer"); |
| 717 | final String model = System.getProperty("device.model"); |
| 718 | final String manufact_ = manufact.trim().toLowerCase(); |
| 719 | final String model_ = model.trim().toLowerCase(); |
| 720 | String result = ""; |
| 721 | int total = manufact_.length(); |
| 722 | if(total>model_.length()) total = model_.length(); |
| 723 | int matches = 0; |
| 724 | for(int i=0; i<total; i++){ |
| 725 | if(manufact_.charAt(i) == model_.charAt(i)) matches++; |
| 726 | } |
| 727 | final int percentage = matches*100/total; |
| 728 | if(percentage > 20){ |
| 729 | result = model; |
| 730 | }else{ |
| 731 | result = manufact+" "+model; |
| 732 | } |
| 733 | return result; |
| 734 | } |
| 735 | //#endif |
| 736 | public static String getPlatformName() { |
| 737 | String device = System.getProperty("device.model"); |
no test coverage detected