rajashri2 / apndroid

Automatically exported from code.google.com/p/apndroid
0 stars 0 forks source link

Truncates APN when manually edited #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Launch APNDroid, turn OFF 3G/EDGE/GPRS.

2. Go to Setting->Wireless controls->Mobile networks->Access Point Names.

3. Tap the first configured APN and then tap APN to change the APN.

4. Remove "apndroid" from the tail of the APN.

5. Go back to APNDroid and turn ON 3G/EDGE/GPRS.

6 . Go back to the settings screen above.

What is the expected output?

I expected that APNDroid would only delete the text "apndroid" if it were
actually present at the end of the APN.

What do you see instead?

APNDroid deleted the last 8 characters of the actual APN. For example,
"epc.tmobile.com" was mangled into "epc.tmo".

What version of the product are you using? On what operating system?

8, Android 1.6 (Cyanogenmod-4.2.15.1)

Please provide any additional information below.

When turning the APNs back on. APNDroid should check to see that "apndroid"
is still at the end. This bug would also be annoying if someone added an
APN during the time when APNDroid had 3G/EDGE/GPRS turned off.

Here is one way to do it:

String restored_apn = current_apn.replace("apndroid", "");

Original issue reported on code.google.com by RayDar.R...@gmail.com on 15 Mar 2010 at 6:14

GoogleCodeExporter commented 8 years ago
Wow, I really think it was done that way before (checking the suffix)... We'll 
definitely fix it.

Original comment by martin.adamek on 15 Mar 2010 at 7:15

GoogleCodeExporter commented 8 years ago
Checking was explictly removed for some code optimisation. You removed suffix 
from
apn field only, but, when restroing apns, APNdroid selects apns that have 
suffix in
apn field and a type field. I'm not sure if this really need, to perform this 
check
(after all using APNdroid you make a choice of automatic APN management).
We can make the following thing: make a selection of modified apn entries only 
by one
field - for example apn and remove without any checks the end of the string 
with the
lenght of suffix.

Original comment by zeldigas on 15 Mar 2010 at 7:57

GoogleCodeExporter commented 8 years ago
added checking of suffix before truncating it.

Original comment by zeldigas on 16 Mar 2010 at 9:29