Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

framework: Add home button unlock option (1/2) @invisiblek #2

Merged
merged 1 commit into from
Oct 24, 2012
Merged

framework: Add home button unlock option (1/2) @invisiblek #2

merged 1 commit into from
Oct 24, 2012

Conversation

corcoran
Copy link

Adds modified CM10 patch for home button unlock (by invisiblek). Matches d2-common patch in SlimRoms: SlimRoms/device_samsung_d2-common@57ac03d

krarvind added a commit that referenced this pull request Oct 24, 2012
framework: Add home button unlock option (1/2) @invisiblek
@krarvind krarvind merged commit 86f4ccc into SlimRoms:jb Oct 24, 2012
slimgerrit pushed a commit that referenced this pull request Nov 29, 2012
This change fixes the following bug:

1. Playing a movie (especially Full HD) by Gallery.
2. Press the Home button.
3. Press the Gallery shortcut on Launcher.
4. Very quickly repeat #2 and #3 several times.

Result: "Sorry, this video cannot be played" alert is shown.

Change-Id: Idf9d222ca1e0bb90bfe06f6dc807dfbc71b6415b
Signed-off-by: Yuriy Zabroda <[email protected]>
slimgerrit pushed a commit that referenced this pull request Jan 23, 2013
This commit cleans up the AlarmTile class by removing the unnecessary
listener on the alarm intent. It now listens only to the next alarm
setting value, which was fetched after receiving the intent anyway.

These changes also fix a bug that would cause the tile to not show up
after some actions, like reordering the tiles due to the visibility not
being set on tile creation.

Lastly, some minor code styling issues have been fixed.

Patch set #2: collapse onNextAlarmChanged into onChangeUri, remove
mEnabled, use TextUtils to check for string emptiness and mark
updateQuickSettings explicitly as public.

Change-Id: Ic5871a9cc4874f33181dfac14e25a89499c182f2
slimgerrit pushed a commit that referenced this pull request Jun 4, 2013
Patchset  #2: Vector icons.

Change-Id: Ief201d9f0c80bca3c8d37fdf3283cbbb15004b5b
corcoran pushed a commit to corcoran/frameworks_base that referenced this pull request Jun 4, 2013
Patchset  SlimRoms#2: Vector icons.

Change-Id: Ief201d9f0c80bca3c8d37fdf3283cbbb15004b5b
slimgerrit pushed a commit that referenced this pull request Oct 31, 2013
Also:
 * add a second history section that logs
 * log mesg as text instead of number
 * dump Sync Status as a table

 Sample log:
Recent Sync History
  #1  : 2012-10-11 15:06:11     USER    0.4s            [email protected]/com.google u0  com.android.calendar                                  com.google.android.calendar
  #2  : 2012-10-11 15:06:11     USER    0.1s            [email protected]/com.google u0  subscribedfeeds                                       android.uid.system:1000
    mesg=parse-error
  #3  : 2012-10-11 15:06:11     USER    0.0s            [email protected]/com.google u0  com.google.android.apps.uploader.PicasaUploadProvider android.uid.system:1000
  #4  : 2012-10-11 15:06:10     USER    0.1s            [email protected]/com.google u0  com.google.android.gms.plus.action                    android.uid.system:1000

Recent Sync History Extras
  #1  : 2012-10-11 15:06:11     USER   [email protected]/com.google u0  com.android.calendar                                  Bundle[{[email protected], force=true, ignore_settings=true, ignore_backoff=true}]
  #2  : 2012-10-11 15:06:11     USER   [email protected]/com.google u0  subscribedfeeds                                       Bundle[{ignore_backoff=true, force=true, ignore_settings=true}]
  #3  : 2012-10-11 15:06:11     USER   [email protected]/com.google u0  com.google.android.apps.uploader.PicasaUploadProvider Bundle[{ignore_backoff=true, force=true, ignore_settings=true}]
  #4  : 2012-10-11 15:06:10     USER   [email protected]/com.google u0  com.google.android.gms.plus.action                    Bundle[{ignore_backoff=true, force=true, ignore_settings=true}]

Sync Status
Account [email protected] u0 com.google
=======================================================================
Authority                                           Syncable  Enabled  Delay  Loc  Poll  Per  Serv  User  Tot  Time  Last Sync            Periodic
-------------------------------------------------------------------------------------------------------------------------------------------------------------
com.google.android.apps.currents                    1         true            0    2     1    2     1     6    0:35  PERIODIC SUCCESS     86400
                                                                                                                     2012-10-12 14:59:40  2012-10-13 14:58:13
com.google.android.music.MusicContent               1         true            0    0     1    2     1     4    0:09  PERIODIC SUCCESS     86400
                                                                                                                     2012-10-12 14:59:18  2012-10-13 14:58:13
com.google.android.gms.plus.action                  1         true            0    0     1    1     1     3    0:00  PERIODIC SUCCESS     86400
                                                                                                                     2012-10-12 14:59:15  2012-10-13 14:58:13
com.google.android.apps.magazines                   1         true            0    1     1    2     1     5    0:14  PERIODIC SUCCESS     86400
                                                                                                                     2012-10-12 14:59:00  2012-10-13 14:58:13

Change-Id: Iffeb825e4b4f6217940a39b0dd71e06856f08f3f
SeniorLimpio added a commit to SeniorLimpio/frameworks_base that referenced this pull request Mar 24, 2014
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
Missed one bad javadoc.

Change-Id: Ic70abce0404e966bc9caeabfbd5fd40d170af4de
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
Bug: 14280857
Change-Id: Ib868cc7a01d24f7169310774a5397b90a2d5b35f
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
Bug: 14280857
Change-Id: Ib868cc7a01d24f7169310774a5397b90a2d5b35f
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
* commit '767c01161ad4c18bf476e224a93345a7e8a02746':
  Attemp to fix blank lockscreen #2.
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
Bug: 14656767
Bug: 14294001
Change-Id: Ibc428cbba8b48b6adc26756d8276a63183b8a690
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
* commit 'f80ea6a9a7ef17e67a0f528659347ab0b3242f09':
  Fix lockscreen occluded states #2.
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
Bug: 14656767
Bug: 14294001
Change-Id: Ibc428cbba8b48b6adc26756d8276a63183b8a690
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
Change-Id: I4cbaa762d61e19016f925556c8e02720249dc22c
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
* commit '1fc9180b3437a028085d165de54d0ff8a15919af':
  Fix measure performance of whole status bar window #2.
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
The change appeared to be dropped.
See commit 65ba94f for details.

Change-Id: Ib60968d6327ef04d21e4adca2c394f66343f204b
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
…ounters

an int[] return type.

There are two such instances:

1. "private int[] mRules" within RelativeLayout LayoutParams.
2. "public int[] getLocationOnScreen" in View.

When I added #2, we noticed missing annotated fields/methods in Hierarchy
Viewer, but #1 also caused the same issue (mainly not exporting
alignWithParent field)

Bug: 16844914
Change-Id: I0d83a4391aa0565897cd7f0523995c97b7a4976d
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
Bug: 17138703
Bug: 17047680
Change-Id: I4058d9a2e349c4a52ab167638471a1eb11753380
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
Bug: 17439581
Change-Id: Ib38d9be3271081b33c23b3b17b2ed7790c71729b
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
Bug: 17439581
Change-Id: Ib38d9be3271081b33c23b3b17b2ed7790c71729b
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
Change-Id: I649d8d735bda2b0c657217bc86c1a29a2d7eddc2
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
… Recommendations #2" into klp-modular-docs

* commit '1b12b1dc6f0203913ceb0a88dcf5ef1639fe6515':
  docs: remove bad link in the quick view box for TV Recommendations #2
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
…w box for TV Recommendations #2" into klp-modular-docs

* commit '02480cbffabd1ca80441c9676db01b177468883a':
  docs: remove bad link in the quick view box for TV Recommendations #2
slimgerrit pushed a commit that referenced this pull request Nov 4, 2014
…he quick view box for TV Recommendations #2" into klp-modular-docs

* commit '41b12f2932893ed251a68cb0fe657ee918318c77':
  docs: remove bad link in the quick view box for TV Recommendations #2
letmedanz added a commit to letmedanz2/frameworks_base that referenced this pull request Mar 14, 2015
- Patch SlimRoms#1: Remove Slim HeadsUp customizations

  **Patchset by @CPA-Poke <[email protected]> **

- Patch SlimRoms#2: HeadsUp Options (1/2)

  ** Patchset by @LinuxXxxX <[email protected]> **

  * Includes:
     * Base: forward port Headsup options (1/2)
     * Global on/off
     * Blacklist and Do not disturb
     * HeadsUp: fix settings not being applied after reboot
     * blacklist and dnd setting were not being applied at boot
     * clean up the SettingsObserver
     * Let user choose if headsup swype action hides or dimisses notification

- Patch SlimRoms#3: Frameworks: Actually start to use HEADS_UP_REQUESTED extra

  ** Patchset by @kufikugel **

- Patch SlimRoms#4: HeadsUp: add timeout option (1/2)

  ** Patchset by @kufikugel **

- Patch SlimRoms#5: HeadsUp: check if headsup is attached and not null when adding view

  ** Patchset by @bigbrother1984 <[email protected]> **

- Patch SlimRoms#6: [Heads up swipe] Disable by default

  ** Patchset by @cristianomatos <[email protected]> **

- Patch SlimRoms#7: [Heads up] Add touch outside event

  ** Patchset by @bigbrother1984 <[email protected]> **

- Patch SlimRoms#8: [Heads up] Touch outside to hide (1/2)

  ** Patchset by @cristianomatos <[email protected]> **

- Patch SlimRoms#9: HeadsUp: fix headsup for incoming calls

  ** Patchset by @Altaf-Mahdi **

- Patch SlimRoms#10: [Heads up] Don't show heads up while IME is showing

  ** Patchset by @bigbrother1984 <[email protected]> **

- Patch SlimRoms#11: HeadsUp: Don't reset Y coordinate and improve edge
  swipe readability

  ** Patchset by @bigbrother1984 <[email protected]> **

- Patch SlimRoms#12: Fix heads up dismiss not working

  ** Patchset by @cristianomatos <[email protected]> **

Change-Id: Id0e903d1f8c3040d0724dc59568332e99f346b84

Conflicts:
	core/java/android/provider/Settings.java
	core/java/com/android/internal/statusbar/IStatusBar.aidl
	core/java/com/android/internal/statusbar/IStatusBarService.aidl
	core/res/res/values/liquid_strings.xml
	packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/res/layout/notification_guts.xml
	packages/SystemUI/res/values/config.xml
	packages/SystemUI/res/values/liquid_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	services/core/java/com/android/server/am/ActivityStackSupervisor.java
	services/core/java/com/android/server/statusbar/StatusBarManagerService.java

Conflicts:
	packages/SystemUI/res/values/config.xml
	services/core/java/com/android/server/am/ActivityStackSupervisor.java
kagwind pushed a commit to kagwind/frameworks_base that referenced this pull request Mar 21, 2015
- Patch SlimRoms#1: Remove Slim HeadsUp customizations

  **Patchset by @CPA-Poke <[email protected]> **

- Patch SlimRoms#2: HeadsUp Options (1/2)

  ** Patchset by @LinuxXxxX <[email protected]> **

  * Includes:
     * Base: forward port Headsup options (1/2)
     * Global on/off
     * Blacklist and Do not disturb
     * HeadsUp: fix settings not being applied after reboot
     * blacklist and dnd setting were not being applied at boot
     * clean up the SettingsObserver
     * Let user choose if headsup swype action hides or dimisses notification

- Patch SlimRoms#3: Frameworks: Actually start to use HEADS_UP_REQUESTED extra

  ** Patchset by @kufikugel **

- Patch SlimRoms#4: HeadsUp: add timeout option (1/2)

  ** Patchset by @kufikugel **

- Patch SlimRoms#5: HeadsUp: check if headsup is attached and not null when adding view

  ** Patchset by @bigbrother1984 <[email protected]> **

- Patch SlimRoms#6: [Heads up swipe] Disable by default

  ** Patchset by @cristianomatos <[email protected]> **

- Patch SlimRoms#7: [Heads up] Add touch outside event

  ** Patchset by @bigbrother1984 <[email protected]> **

- Patch SlimRoms#8: [Heads up] Touch outside to hide (1/2)

  ** Patchset by @cristianomatos <[email protected]> **

- Patch SlimRoms#9: HeadsUp: fix headsup for incoming calls

  ** Patchset by @Altaf-Mahdi **

- Patch SlimRoms#10: [Heads up] Don't show heads up while IME is showing

  ** Patchset by @bigbrother1984 <[email protected]> **

- Patch SlimRoms#11: HeadsUp: Don't reset Y coordinate and improve edge
  swipe readability

  ** Patchset by @bigbrother1984 <[email protected]> **

- Patch SlimRoms#12: Fix heads up dismiss not working

  ** Patchset by @cristianomatos <[email protected]> **

Change-Id: Id0e903d1f8c3040d0724dc59568332e99f346b84

Conflicts:
	core/java/android/provider/Settings.java
	core/java/com/android/internal/statusbar/IStatusBar.aidl
	core/java/com/android/internal/statusbar/IStatusBarService.aidl
	core/res/res/values/liquid_strings.xml
	packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/res/layout/notification_guts.xml
	packages/SystemUI/res/values/config.xml
	packages/SystemUI/res/values/liquid_strings.xml
	packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
	packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
	services/core/java/com/android/server/am/ActivityStackSupervisor.java
	services/core/java/com/android/server/statusbar/StatusBarManagerService.java

Conflicts:
	packages/SystemUI/res/values/config.xml
	services/core/java/com/android/server/am/ActivityStackSupervisor.java
teemodk pushed a commit to teemodk/frameworks_base that referenced this pull request Sep 6, 2015
With this commit, cellular tile detailed view works again you just have to longpress the cellular tile and it will launch into detailed view no matter where you place it
SlimAdmin pushed a commit that referenced this pull request Dec 26, 2015
…" into mnc-dev

* commit '97b68bbe7180ca15ab10d6f65bbdac6c7e64885b':
  UsbDeviceManager: fix b/21429947 regression (try #2)
csolanol added a commit to reposte/frameworks_base that referenced this pull request Sep 9, 2016
Change-Id: I65b88dd6116e0d8c5d18699f73ef782d003469a2
SlimAdmin pushed a commit that referenced this pull request Mar 7, 2019
*1 -- not truncate(2) but "PRAGMA wal_checkpoint(TRUNCATE)"

Otherwise, depending on how an app operate on a DB, SQLite may not
have a chance to "shrink" the WAL file.

Fixes: 112777941
Bug: 111939259
Test: atest /android/master/frameworks/base/core/tests/coretests/src/android/database/sqlite/SQLiteCompatibilityWalFlagsTest.java
Test: Manual test with google dailer:
1. With normalized_spam.db-wal > 100MB and receive a phone call
-> WAL file gets truncated to 0 bytes.

2. Restart the dialer process and receive a phone call again
-> WAL file is already 0 bytes; won't be truncated.

3. Restart with the WAL file deleted
Same as #2. WAL file will be created before the added logic, but is 0 bytes,
so it won't be truncated.

4. Test with settings put global sqlite_compatibility_wal_flags truncate_size=1024
-> make sure the threshold is overridden

Merged-in: I2b193603e5dfa493ccccb8123db592f0e9c0e7ae
Change-Id: I2b193603e5dfa493ccccb8123db592f0e9c0e7ae
(cherry picked from commit 96e0600)
Flinny pushed a commit that referenced this pull request Oct 26, 2019
…bad link in the quick view box for TV Recommendations #2" into klp-modular-docs

* commit '85c953ef4493ee19a6aed616f0bcbcdf1db590d4':
  docs: remove bad link in the quick view box for TV Recommendations #2
Flinny pushed a commit that referenced this pull request Oct 26, 2019
Change-Id: If5e2b62556e6ee158e09e399c7ddec337dba15d5
Flinny pushed a commit that referenced this pull request Oct 26, 2019
Stop assuming that a Java Bitmap has a SkBitmap* that
has some externally managed lifecycle, and instead switch
a bunch of users to accessing the bitmap by providing
their own SkBitmap* on which to set the (ref counted!)
SkPixelRef* instead

Attempt #2 to land this, original issue was in getSkBitmap
and should be fixed

Change-Id: I0fd9e193968b41e5597784140d56b4885906864a
Flinny pushed a commit that referenced this pull request Oct 26, 2019
Creating the thumbnail of the header for the transition was on the
critical path for starting the activity. This moves it off this path
by doing it after onPause().

Change-Id: Ic54a104d5ad4c40e88638566a3a69cc265a0a0fe
Flinny pushed a commit that referenced this pull request Oct 26, 2019
Flinny pushed a commit that referenced this pull request Oct 26, 2019
* commit '81f2992fac1667336cc526a380c696258569de09':
  Speed up recents -> app #2
Flinny pushed a commit that referenced this pull request Oct 26, 2019
Bug: 26396656
Change-Id: Icb0419489a1b7a756a4622383c4c2462ee0d8d90
Flinny pushed a commit that referenced this pull request Oct 26, 2019
It opens a an alert dialog that tells user application X is requesting
access to folder Y on volume Z; if user accepts, it returns the proper
URI, otherwise it returns RESULT_CANCELED.

The requested path must satisfy the following requirements:

1.It's directory (getName()) must be one of the pre-definied folders on
  Environment.
2.It's root (getParent()) must be a valid external storage root.

In order to satisfy #2, DocumentsUI calls the ExternalStorageProvider,
through a custom call() implementation.

BUG:  23011462
Change-Id: I8e491e82ae320df88f7b8923286c4c1ad050ae80
Flinny pushed a commit that referenced this pull request Oct 26, 2019
Change from the previous attempt:
- Fixed the helper class.  The original version had a few bugs.
- Bundle.readFromParcel() now handles a Parcel with a read-write helper
properly.

** Comparison **
The following charts are the actual measurement with and without the fix,
using "dumpsys system".
- The red bar is "total private dirty".
- The X axsis is time since boot.

Without fix:
- #1 First boot:
-- https://docs.google.com/spreadsheets/d/1CbmU8cQQQw7n7tyqbZi3beRHNuzqcmJgdvzDpi40Q1I/edit#gid=1971317391
-- Private dirty stabilizes at ~16.8M.
-- Loading system packages took 1.8 seconds.

- #2 Second boot:
-- https://docs.google.com/spreadsheets/d/1CbmU8cQQQw7n7tyqbZi3beRHNuzqcmJgdvzDpi40Q1I/edit#gid=982210726
-- Private dirty stabilizes at ~17.5M.
-- Loading system packages took 0.5 seconds.

With fix:
- #3 First boot:
-- https://docs.google.com/spreadsheets/d/1R6lL0AnAp93HnrqWujJFNgOjj6wvGicgDlbDAevbc3g/edit#gid=791764875
-- Private dirty stabilizes at around the same level as #1.
-- Loading system packages took 1.9 seconds.

- #4 Second boot:
-- https://docs.google.com/spreadsheets/d/1CbmU8cQQQw7n7tyqbZi3beRHNuzqcmJgdvzDpi40Q1I/edit#gid=1820894299
-- Private dirty stabilizes at around the same level as #1.
-- Loading system packages took 0.7 seconds.

Package manager start up time with and without the fix:
- (Ignored ones that are too fast; probably the thermal throttling didn't kick in.)
- https://docs.google.com/spreadsheets/d/1CbmU8cQQQw7n7tyqbZi3beRHNuzqcmJgdvzDpi40Q1I/edit#gid=499396796
- Before: 3.5 seconds (average of 5 reboots)
- After: 3.6 seconds (average of 5 reboots)

Package scan speed comparison:
- With the fix, first boot.
08-03 08:49:56.851  1000   779   779 I PackageManager: Finished scanning system apps. Time: 2133 ms, packageCount: 143 , timePerPackage: 14 , cached: 0
08-03 08:49:56.971  1000   779   779 I PackageManager: Finished scanning non-system apps. Time: 121 ms, packageCount: 11 , timePerPackage: 11 , cached: 0

- With the fix, second boot.
08-03 08:53:29.387  1000   779   779 I PackageManager: Finished scanning system apps. Time: 484 ms, packageCount: 143 , timePerPackage: 3 , cached: 143
08-03 08:53:29.424  1000   779   779 I PackageManager: Finished scanning non-system apps. Time: 37 ms, packageCount: 11 , timePerPackage: 3 , cached: 11

** Conclusion **
- This CL wil slightly slow down the boot time (0.2 seconds on a thermal-throttled bullhead), but
the system server's ram consumption will go down to the no-cache level.

- Using the package cache is still faster than not using it.

Test: build, boot, reboot, adb-install, reboot
Test: bit FrameworksCoreTests:android.content.pm.PackageParserTest
Test: bit FrameworksServicesTests:com.android.server.pm.PackageParserTest
Test: cts-tradefed run cts-dev --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -l INFO -m CtsOsTestCases -t android.os.cts.BundleTest

Bug: 64112468
Change-Id: I30691a032cb1dd1c7f6c1966a096c2f0d07a09cb
Flinny pushed a commit that referenced this pull request Oct 26, 2019
There are two existing cases where apps that share a sharedUserId
potentially end up in separate SELinux domains.

1. An app installed in /system/priv-app runs in the priv_app domain.
   An app installed on the /data partition which shares a
   sharedUserId with that priv_app would run in the untrusted_app
   domain (e.g. GTS b/72235911). This issue has existed since
   Android N.
2. The untrusted_app domain may now deprecate permissions based on
   targetSdkVersion, so apps with sharedUserId may have different
   permissions based on which targetSdkVersion they use. This issue
   has existed since Android O, but is particularly problematic for
   feature "Deprecate world accessible app data" which puts every app
   targeting P+ into its own selinux domain.

This change fixes #1 and adds a temporary workaround to prevent #2.

Test: cts-tradefed run cts -m CtsSelinuxTargetSdkCurrentTestCases
Test: cts-tradefed run cts -m CtsSelinuxTargetSdk27TestCases
Test: cts-tradefed run cts -m CtsSelinuxTargetSdk25TestCases
Bug: 72290969
Change-Id: I211de05ad6f10b69e3e082cfe977f2dd43d90549
Flinny pushed a commit that referenced this pull request Oct 26, 2019
There are two existing cases where apps that share a sharedUserId
potentially end up in separate SELinux domains.

1. An app installed in /system/priv-app runs in the priv_app domain.
   An app installed on the /data partition which shares a
   sharedUserId with that priv_app would run in the untrusted_app
   domain (e.g. GTS b/72235911). This issue has existed since
   Android N.
2. The untrusted_app domain may now deprecate permissions based on
   targetSdkVersion, so apps with sharedUserId may have different
   permissions based on which targetSdkVersion they use. This issue
   has existed since Android O, but is particularly problematic for
   feature "Deprecate world accessible app data" which puts every app
   targeting P+ into its own selinux domain.

This change fixes #1 and adds a temporary workaround to prevent #2.

Updated version considers both SharedUserSetting.isPrivileged() and
pkg.isPrivileged() for the case where the app has a shared User.

Test: cts-tradefed run cts -m CtsSelinuxTargetSdkCurrentTestCases
Test: cts-tradefed run cts -m CtsSelinuxTargetSdk27TestCases
Test: cts-tradefed run cts -m CtsSelinuxTargetSdk25TestCases
Test: confirm via packages.list that apps end up in the same
    selinux domain before and after this patch.
Bug: 72290969
Change-Id: I974bea88004622b70633fdeb54a1372fd04c6eff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants