Commit Graph

54 Commits

Author SHA1 Message Date
Amit Mahajan
1eee1f8bbc Disallow adding/editing dun APNs unless allowed by carrier.
Test: WIP
Bug: 38186417
Change-Id: If1cc34ad979659a56a3886da2a02fdbf642739ac
2017-05-22 16:01:46 -07:00
Fan Zhang
d57ce3af8f Properly index developer options.
Change-Id: Id9ab629438f52c65fd774341b1200dacb4efd93b
Fix: 37724514
Test: make RunSettingsRoboTests
2017-04-27 16:06:32 -07:00
Tony Mantler
76f46fc869 Fix sketchy usage of new PreferenceScreen
Things get weird if you don't use PreferenceManager#createPreferenceScreen

Bug: 37216851
Test: Compiles and runs
Change-Id: I7cebec133c4f27f7eeda83c95d8acb4823f67dc4
2017-04-11 10:35:24 -07:00
Wei Huang
d4cfac304a Fix mvno match data is incorrect for APNs
[Cause of Defect]
When user editing an existing apn, ApnPreference won't pass
the subId to ApnEditor.
As a result, if use change the mvno type to 'imsi', ApnEditor
can NOT fetch the correct IMSI due to invalid subId.

[How To Fix]
Pass subId to ApnEditor, which is same as adding new APN.

Bug: 34646368
Test: manual - edited an existing apn
Change-Id: I79fe55ccdeb8dab0ffcc7dfb22ba680beb58b9cd
2017-03-30 15:54:14 -07:00
minoru.x.sakuma
ad3c71cefd Merge "Unify the design of add icon in setting" am: bc9731a575 am: 398eca1067
am: 36b2de22cf

Change-Id: I5d139de04c1cfd02f339ab947e0708b8d6c4a31f
2017-03-06 01:29:19 +00:00
minoru.x.sakuma
f014ae5bc5 Unify the design of add icon in setting
Add icon "+" displayed in APN setting differs from ones in other
settings like VPN settings, SIP accounts etc. Change the icon to
align with others.

Bug: 35936472
Test: Manually check icon display with fix
Change-Id: I99a57fbeb55bb04f911d28e85752ec04edab6f0e
2017-03-03 05:15:02 +00:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
d65184faef Log visibility change for DialogCreatable in Settings.
Bug: 30681529
Test: adb logcat -b events | egrep "(sysui_|notification_)"
Test: make RunSettingsRoboTests
Change-Id: I51754d258ba1ddfae24323681f21cd02de4dbb4e
2016-09-21 16:30:32 -07:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Amit Mahajan
68026dbac5 Merge "Fix cannot build prefer or restore APN for Secondary SIM/Sub." am: 5620699fb9
am: 1545987bec

* commit '1545987bec5f2f8c5b98c1cfbba610ece2d537b0':
  Fix cannot build prefer or restore APN for Secondary SIM/Sub.

Change-Id: I739817ba6a0adfdd1b8edf9d04ee135346f1283a
2016-05-13 16:54:49 +00:00
Yifan Bai
e00ab6c5d9 Fix cannot build prefer or restore APN for Secondary SIM/Sub.
When built prefer or restore APN with URI, the URI does not contain Sub
Id. This leads to the fail of display selected APN on Secondary SIM/Sub.
To fix, SubId needs to be appended in the URI.

Change-Id: If4b98b0bdd02474b3e7b7537c5a1257dcdbe9511
2016-05-13 01:36:30 +00:00
yifan.bai
27b908f6d1 Fix ApnSettings crash issue.
Steps:
1. Add a new APN;
2. Click 'Reset to default';
3. During reset, click the new APN;
4. Crash happened.
Solution:
Disable menu items when reseting default APN.

Bug: 28314239
Change-Id: I8df439d066e58039e9f91a9be642127eb7298159
2016-04-21 19:23:25 +00:00
Sudheer Shanka
4249d7589b Fix crash in ApnSettings.
ApnSettings runs with uid android.uid.phone and since it doesn't has
the MANAGE_DEVICE_ADMINS and MANAGE_PROFILE_AND_DEVICE_OWNERS
permission, show the generic support instead of the admin specific
message.

Bug: 27826969
Change-Id: I556a8b74aa1f692ebac1f4e30aeab3ed78ec5078
2016-03-24 15:39:24 -07:00
Sudheer Shanka
f1e78d35dc Add disabled by policy empty views to more screens.
Bug: 27588316
Bug: 27588671
Bug: 27588740
Change-Id: Id614067d76e936e9c3c585fdaed304bfbc88dc74
2016-03-16 22:33:37 -07:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Amit Mahajan
2ffc11c069 am 7b990298: am f20d51f3: am 6d042a69: am 1704ca96: Merge "Change to add user_visible field to Carriers table." into mnc-dr-dev
* commit '7b990298323f0e24c87123d955cfd08717a079d3':
  Change to add user_visible field to Carriers table.
2015-10-14 23:54:00 +00:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Amit Mahajan
5787be339f Change to add user_visible field to Carriers table.
Also adding config to control if adding APNs is allowed.

Bug: 24519879
Bug: 24681288
Change-Id: I59466f5489606162a10e883ede378e575a189fb3
2015-10-08 10:36:03 -07:00
Sungmin Choi
7149a85507 am 605685ce: am 5fc62441: am 9819dcb9: am 9fcc7e1b: Hide or show APNs with type="ims" as CarrierConfig
* commit '605685ceae58d6a0c920ec4f809cf11cd32c34e1':
  Hide or show APNs with type="ims" as CarrierConfig
2015-09-09 18:32:10 +00:00
Sungmin Choi
9fcc7e1b20 Hide or show APNs with type="ims" as CarrierConfig
APN with type="ims" is used to attach IMS APN to the modem.
This APN is meaningless and confusing to end users.
Most carriers don't care to show this APN from apn list.
Some carriers want to show this APN from apn list and others don't.
This change hides or shows this as CarrierConfig from the APN list.

Bug: 23770219
Change-Id: Ia632f39401d84e8c63ac96f1c3b12aa3d8d2a4e6
2015-09-08 17:23:14 -07:00
Xiaohui Chen
44879a387a sys user split: first pass updating Settings
Update various places in Settings to use "admin" ueser flag
instead of checking user id "0".  This should be no-op in
single user mode since the only admin user would be user 0.
In split system user mode, this will correctly ACL admin
user instead of non-interactive system user.

Bug: 19913735
Change-Id: Ida4d59c5f689ea0dc34b3b3ff0822b087fa0afd6
2015-07-27 15:39:28 -07:00
Nicolas Prevot
a5df4779a0 Don't allow secondary users apps to start restricted Settings fragment.
On a secondary user, the fragments ApnSettings, TetherSettings and VpnSettings
should not be started.

But an app can still send an intent to start these fragments.
Prevent this by checkin the userId in these fragments.

BUG:15313261
BUG:15312781
BUG:15312494

Change-Id: I2a36bb89a8e37e4440aa28372d7a1800b33dae37
2015-06-02 16:49:20 -07:00
Amit Mahajan
17b0c481e0 Show only APNs belonging to carrier (mno/mvno) under apn settings.
Bug: 10719093
Change-Id: I942ce59995afffd395f7d73e4fd70674db0f643f
2015-05-12 17:17:56 -07:00
Stuart Scott
f51d006350 Correct the way settings deals with subscriptions.
Change-Id: I19e9dfaf248fce7376b124ee91de7e73fdc99fb3
2015-04-08 11:11:34 -07:00
Chris Wren
8a963babe2 log visibility of views
Depends-On: I5b1dccb5d103ece3112acf38889bae16273b092f
Change-Id: I116aed2bb805f723a5bf2ec9eb94257de0b4a7b5
2015-03-27 13:39:07 -04:00
John Spurlock
9a23adf69d Settings: Remove all unused imports.
Change-Id: Iebfa52cb849d69974c94902b0b020893cf5618a3
2015-03-18 15:51:15 -04:00
Mick Lin
09c9e5eb5d [DS] Correct the access method for telephony system property
Bug: 18675498

    Review: https://partner-android-review.git.corp.google.com/#/c/198822

Change-Id: I7d6eab7d8f513de20bd8995b999a124097f725e7
2015-01-27 05:30:47 +00:00
Sanket Padawe
a7f21a3100 Hide APNs with type="ia" and apn=""
APNs with type="ia" and no APN address (apn="") are used to
prevent an initial attach APN from being sent to the modem. This
in turn prevents the LTE ESM information procedure from being
used during the LTE attach. These APNs are meaningless and confusing to end users - so this
change hides them from the APN list.

Bug: 19101183
Change-Id: I9aacf787f8c175a301ad546f972f8972aad2a6b3
2015-01-23 09:53:48 -08:00
Sanket Padawe
19627ca215 Getting mcc/mnc from system prop instead of subInfoRecord.
Bug: 18781129
Change-Id: Idb4c70c9b936a947460e6c6d03bd40dc2ae4279a
2014-12-18 10:29:16 -08:00
Sanket Padawe
4be06d9c48 Revert "Getting mcc/mnc from system prop instead of subInfoRecord."
This reverts commit 579b66f28d.

Change-Id: I0b142b40c697992b60bca9020673a0828ec44977
2014-12-18 06:24:36 +00:00
Sanket Padawe
579b66f28d Getting mcc/mnc from system prop instead of subInfoRecord.
Bug: 18781129
Change-Id: Idefe2dfc26bef2bba2b5b1792bb5ac43a44aa6cc
2014-12-17 19:31:30 -08:00
PauloftheWest
6f341b2c3e Added Multi-SIM capability to Access Point Names
+ In Settings->More->Cellular networks->AccessPoint Names will display
the APNs for the selected SubscriptionInfo.

Bug: 18246837
Change-Id: If8f46c2fa82cf4b2051ddb5f15afc8c59cb9b850
2014-12-08 10:48:20 -08:00
Fabrice Di Meglio
3e825febca Fix bug #17976062 Stability: ISE in Settings: Fragment ApnSettings{4da9ae0} not attached to Activity
- prevent IllegalStateException

Change-Id: I63fa1bb6240c7ff82c04be938b72940049409dee
2014-10-14 16:21:22 -07:00
Julia Reynolds
6cc7cccf11 Supress menu if screen ought to be hidden.
Bug: 14081992
Change-Id: I56183413a001b3e6dd74de249e9afc131e6671e4
2014-08-18 16:04:48 -04:00
Fabrice Di Meglio
61a1fec49f Fix bug #16703191 APN settings shows back button even when you intent into it
- change a bit the way we recognize a SubSetting. Now we can pass the new
":settings:show_fragment_as_subsetting" Intent extra for forcing it.
- convert ApnSettings to a SettingsPreferenceFragment

Change-Id: I22167ad317530c0a58c4d522a72826f9d34ad2d3
2014-08-15 11:36:31 -07:00
Julia Reynolds
ee27b9de8f Settings user restriction changes: wireless & networks changes.
Bug: 14081992
Change-Id: I32b0f06da7e7ff9bd8303ce26be2584e6cddbedc
2014-05-29 13:21:29 -04:00
Fabrice Di Meglio
e6c9a5da01 Fix bug #12979102 Menu (Reset to default) and Add icon missing in APNs
- revert the changes on the ApnSettings to be again an Activity...

Change-Id: I7a12e25456f0a0df0f7618183f49fd8db10a5441
2014-02-11 19:03:27 -08:00
Fabrice Di Meglio
ca915668af Fix bug #12910775 Settings crash after tap on Access Point Names under Mobile networks
- ApnSettings is now a fragment so introduce a new ApnSettingsActivity
- ApsSettingsActivity will use the ApnSettings fragment
- move the getListView() call to onActivityCreated(...) as the ListView
needs to be created before this call can be done.
- add also an alias for the old activity name ".ApsSettings"

Change-Id: Id228722d7f34415d4b036282f0845e28546111df
2014-02-06 17:23:03 -08:00
Fabrice Di Meglio
263bcc8b73 Use Drawer in Settings app
- get rid of PreferenceActivity as much as we can and use fragments instead
- add Drawer widget
- add Dashboard high level entry into the Drawer (but this is work in progress and would be done in another CL)
- add bypass of fragment's Header  validation when launched from the Drawer but *force* validation if external
call thru an Intent

Be aware that WifiPickerActivity should remain for now a PreferenceActivity. It is used by SetupWizard and should
not trigger running the SettingsActivity's header building code. SetupWizard is a Home during the provisionnig process
and then deactivate itself as a Home but would make the Home header to appear in the Drawer (because momentarily we
would have two Home).

Also, verified that:

- the WiFi settings still work when called from SetupWizard
- when you have multiple Launchers, the Home header will appear in the list of Headers in the Drawer

Change-Id: I407a5e0fdd843ad7615d3d511c416a44e3d97c90
2014-02-03 16:36:46 -08:00
Hyejin Kim
88c80b10a2 avoid stopping app in case of accessing empty db
When accessing empty database, Setting App is stopped, sometimes.
To avoid stopping app, check null for cursor

Change-Id: I71ec067f502d12a9215a9abdbe9e23fc07af17bb
2013-02-16 01:02:30 +09:00
Manuel R. Ciosici
ec8f68a527 Makes the add button for new APNs appear in the action bar.
The APN add button (a plus sign) now appears in the action bar if possible. The APN list interface is now more consistent with the WiFi list interface. Previously the user had to press the 'Menu' hardware button or the three dot button on the screen in order to reveal the actions.

Change-Id: Iae622054ec080ba4775c22223dd75a865c83fc27
Signed-off-by: Manuel R. Ciosici <manuelrciosici@gmail.com>
2012-09-21 16:57:55 +02:00
Jack Wang
481582f4ec Fix memory leak in ApnSettings-activity
When destroying the activity, the HandlerThread isnt stopped. This
results in that the thread remains, and if you enter/exit the
activity multiple times, you will end up with multiple threads and
a small memory leak

Change-Id: I4779d2625e6002b55066dd034c84d743b9f80ef5
2012-08-13 15:25:04 +02:00
Wink Saville
9ad4a89877 Use telephony-common - DO NOT MERGE
Change-Id: Ic95136fd5934afdd53a08bfd640d40add67fdb44
2012-07-17 12:23:26 -07:00
Jeff Brown
b4ea1e491f Fix crash in APN settings.
Bug: 4968921

Don't use managedQuery for one-shot queries.

Change-Id: I5d2e1bef0f399cb9dbe95d633c2ee014f6cd7f79
2011-09-12 14:59:51 -07:00
Michael Chan
8762093e00 Findbug fixes in Settings app
modified:   src/com/android/settings/ApnPreference.java
	modified:   src/com/android/settings/ApnSettings.java
	modified:   src/com/android/settings/BandMode.java
	modified:   src/com/android/settings/BatteryInfo.java
	modified:   src/com/android/settings/LanguageSettings.java
	modified:   src/com/android/settings/ManageApplications.java
	modified:   src/com/android/settings/RadioInfo.java
	modified:   src/com/android/settings/SdCardSettings.java
	modified:   src/com/android/settings/UsageStats.java
	modified:   src/com/android/settings/ZoneList.java
	modified:   src/com/android/settings/bluetooth/LocalBluetoothDevice.java
	modified:   src/com/android/settings/deviceinfo/Status.java
	modified:   src/com/android/settings/quicklaunch/QuickLaunchSettings.java
	modified:   src/com/android/settings/wifi/AccessPointDialog.java
	modified:   src/com/android/settings/wifi/AccessPointPreference.java
	modified:   src/com/android/settings/wifi/WifiLayer.java
	modified:   src/com/android/settings/wifi/WifiSettings.java
2009-05-14 17:47:02 -07:00
Wink Saville
c38866843e AI 144245: Fix merge conflict for megering in the CDMA changes in to master from donutburger.
Automated import of CL 144245
2009-04-02 11:00:56 -07:00
John Huang
6829688706 Automated import from //branches/master/...@140758,140758 2009-03-24 18:26:28 -07:00
The Android Open Source Project
afc4ab2ffb auto import from //depot/cupcake/@135843 2009-03-03 19:32:34 -08:00
The Android Open Source Project
4e14e5ccbf auto import from //depot/cupcake/@135843 2009-03-03 18:28:52 -08:00
The Android Open Source Project
a578a6c4ad auto import from //depot/cupcake/@132589 2009-03-03 14:04:35 -08:00