Commit Graph

20 Commits

Author SHA1 Message Date
Andras Kloczl
d4f04398c7 Prevent using invalid result uri during multi user image change
Test: manual
Bug: 172939189
Change-Id: I3e6f6200e82e86d6a2085652906ad2d0d44814f5
Merged-In: Id2e598878b3250e8b3590905c6def561e2437d55
Merged-In: I15e15ad88b768a5b679de32c5429d921d850a3cb
(cherry picked from commit 07e414017c)
2021-03-19 00:00:22 +00:00
Andras Kloczl
106431e525 Improve multi user functionality for restricted users
- Restricted users can change their name
- Improved App&Content access screen
- Remove "Turn on phone calls" from restricted user detail page

Doc: http://shortn/_Prb3SJ3xJ3
Bug: 142798722
Test: Run robo tests with this command:
  make -j64 RunSettingsRoboTests
Change-Id: I2aadf32aef52ba5ad0db7aa0cd83bac9d9941589
(cherry picked from commit f4759e00d5)
2020-05-29 12:55:18 +00:00
Philip P. Moltmann
e3f721132a RestrictedLockUtils was split into ...Internal
This means that in some cases RestrictedLockUtils has to be used and in
some RestrictedLockUtilsInternal.

This causes a lot of trivial code changes.

I also updated the ordering of the imports in all affected files.

Bug: 110953302
Test: Built
      make -j RunSettingsRoboTests
Change-Id: I9bdf8b89134f853bae4f38c81af436715c73e924
2018-08-30 08:11:39 -07:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
tmfang
99cc23d0da Settings Fragment Migration (Change imports)
This commit *only* changes imports and optimize imports.
We don't do anything else.

This patch can't compile pass and run test case.
We will update other patches to fix these problem.

Change list.

1. import android.app.Fragment; ->
   import androidx.fragment.app.Fragment;
2. import android.app.DialogFragment; ->
   import androidx.fragment.app.DialogFragment;
3. import android.app.ListFragment; ->
   import androidx.fragment.app.ListFragment;
4. import android.app.LoaderManager; ->
   import androidx.loader.app.LoaderManager;
5. import android.content.AsyncTaskLoader; ->
   import androidx.loader.content.AsyncTaskLoader;
6. import android.content.Loader; ->
   import androidx.loader.content.Loader;
7. import android.app.FragmentTransaction; ->
   import androidx.fragment.app.FragmentTransaction;
8. import android.app.FragmentManager; ->
   import androidx.fragment.app.FragmentManager;
9. import android.app.LoaderManager.LoaderCallbacks; ->
    import androidx.loader.app.LoaderManager.LoaderCallbacks;

Bug: 110259478
Test: Can't test it.
Change-Id: I0a3f98fff34a3494a839c3c42aeabcec3df2c8b3
2018-07-11 18:23:51 -07:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Jeff Sharkey
5e2fc68668 Don't try using a detached fragment.
Test: builds, boots
Bug: 36486843
Change-Id: I3e2d2bcd56edcc86370f4b64dabdf155d63f40d3
2017-04-03 17:19:19 -06:00
Jeff Sharkey
d29c6aedbd Only crop photos owned by Settings.
A recent security change locks down the ability for the system UID to
issue Uri permission grants.  This helps mitigate an entire class of
confused deputy security issues.

However, Settings (which runs as the system UID) was still relying on
issuing Uri permission grants to the photo cropper.  The simplest way
to keep that working is to add the "com.android.settings.files"
authority to a whitelist, and only request cropping of Uris from that
location.

This means that if the GET_CONTENT decides to return a Uri (instead
of streaming it into mTakePictureUri), then we need to copy it
ourselves locally before we can send it along to the cropper.

Test: builds, boots, both take/choose photos work
Bug: 33019296, 35158271
Change-Id: I2541c33e8d9452357cb9fc2e021ca74d5a43d5ff
2017-03-13 12:40:48 -06:00
Jason Monk
f7b1ae4ef3 Workaround to avoid crash in user photo selection
Bug: 29556966
Change-Id: I0715dee2a4cef2252b4ed1cc4d242b8b3d0ab45c
2016-06-22 14:46:56 -04:00
Oleksandr Peletskyi
dccb31525a Improved UX for DISALLOW_SET_USER_ICON restriction.
Modified popup menu, so that each item has a hint, why it is
blocked (in case the DISALLOW_SET_USER_ICON is set).

BUG:27914812
Change-Id: I1f891ffe725f383285d577cf47d89c294f2c3986
2016-04-12 15:34:46 +02:00
Suprabh Shukla
90b71c644d Merge "Fix user photo popup layout for RTL" into nyc-dev 2016-04-07 00:56:04 +00:00
Ryoji Miyazaki
9238e50a80 Fix user photo popup layout for RTL
When RTL language is set, the edit-photo popup window
on user profile info is not shown fully.
The popup window should be aligned with the anchor.
Cherrypick of https://android-review.googlesource.com/#/c/207762/

Bug: 27955356
Change-Id: Ia928c99fbfff3596b048cc3949aef6d03594fed7
2016-04-06 17:24:16 -07:00
Fyodor Kupolov
7a5e897db0 Do not store bitmap into Bundle in onSaveInstanceState
It may cause TransactionTooLargeException because of the parcel size limit

Bug: 27990767
Change-Id: Ie1a702810a5c26e25fc485ebae09dc65e2b48e41
2016-04-05 10:46:20 -07:00
Oleksandr Peletskyi
ef1584312b Added check of the restriction if a user is allowed to change their icon.
BUG: 25305966

Change-Id: I35fda2e4f157463d69a109409c3f8767d54eab4a
2016-01-22 11:57:44 +01:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Wei Liu
6e58d516f0 Refactor UidDetailProvider and its dependencies to SettingsLib.
so that it can be reused by Wear app data usage.

Change-Id: Id05f888274e15fbeffa175ee8073de02a8966867
2015-08-25 11:02:59 -07:00
Fabrice Di Meglio
2a8f7cb736 Fix bug #17459965 Take photo for Profile twice leads to "A resource was acquired at attached stack trace but never released
- close the stream properly in all cases

Change-Id: I3a593be534ea444a2e2659458918cce221891456
2014-09-10 17:20:17 -07:00
Alexandra Gherghina
fe47a8dc89 Toggle between primary and managed profile in Print Settings
This adds a spinner to the print settings screen which can be used to toggle
between the Settings app in the primary and managed profile so that the user
can edit settings belonging to both profiles.

Bug: 16369104
Change-Id: I2556a331d09379c2a501bc6b192ab1631b5215f5
2014-07-29 10:22:15 +01:00
Amith Yamasani
ee3987475e Refactor User Profile editor dialog for reuse
Move the dialog code into a separate class.
Use it from RestrictedProfileSettings
and UserSettings for the current user.

Bug: 15761405
Change-Id: I0b9a95ba8463304525e6a4b8cf3b4ca77b15796f
2014-07-24 23:13:34 +00:00