-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix up protected apps filter. Move filtering to correct place (when querying providers, ResolveInfo.activityInfo is null), and port over commit 4dad4a4 from cm-11.0. Protected Apps: do not filter components from the same UID pm: Use ArraySet instead of HashSet packagemanager: Use ArrayMap/ArraySet as per AOSP * To reduce memory consumption Change-Id: Ic690387cd21fdfa09ef5fb19bd3de9305050cf6e fw: Fix protected apps implementation. Currently a protected component could be accessed from any other means other than the launcher, entirely defeating its purpose. Instead, hook into the activity stack supervisor and quelch attempts at invocation of protected components. This implementation also provides feedback to the user on any attempt to start the component when its in a protected state. TICKET: CYNGNOS-84 Change-Id: Ib0165e7504adb08e21e9566c7394b37dffd280d4 pm: Avoid filtering out protected components in implicit queries. Implicity queries resolve the target component for an intent, the intent (if fired) will be gated by the protected apps feature implementation within the activity stack supervisor. Change-Id: Ib079cfa6093f472d4b85f6b4a986440a764affa3 TICKET: FEIJ-1449 am: Don't protect apps that atttempt to grant uri perms. If an application is delegating uri permissions through the disambiguation dialog, we need to ignore the global protected apps concept to make sure the functionality still works. TODO: Refactor the protected apps implementation to function with startActivityAsCaller within the system process and the android package. TICKET: FEIJ-420 Change-Id: I8ba974a7b25dffe654d32e859064ae86cd9dc7f8 am: Handle unchecked activity starts for protected components. Previously if you received a notification from a protected app, since AM would state that the calling package was also the target package, the protected apps implementation would allow you to launch into the application. Mitigate this by hooking into the unchecked activity start stack (pending intent launches) globally. Change-Id: I0371593ade9e4af2554962873d89a0f82a639b57 TICKET: PAELLA-216 FEIJ-160 FEIJ-177 pm: Allow fall through for protected apps validator activity. Otherwise protecting the settings application leads to some weird behavior. TICKET: CYNGNOS-1915 Change-Id: I4821a07aadf73e7664c44275d8ed80709c7fde8c am: Cancel protected app notification on validation launch. Change-Id: I89d7366e97db04874baa5b19c2dfee7f0100c848 TICKET: CYNGNOS-2130 am: clear protected apps from recents Remove newly protected apps from recent tasks if any activity in the stack is a restricted component. FEIJ-1361 Change-Id: Ifd337bfe8356613d098ff00c575db117d35f2017 am: clear state for every protected app invocation. Change-Id: I7766e050b8bedb46ff9293a5d61451e6c998fb0b TICKET: CYNGNOS-2962 pm: Use sourcerecord if available for protected app validation. A source record serves as a beneficial historical record to see if an activity start has been redirected numerous times. This fixes issues where applications that redirect implicitly and are protected would constantly spam to be authed. Change-Id: Ibeb9eae4279a0cdd65635392316eabb485adfa27 TICKET: PAELLA-216 FEIJ-160 FEIJ-177 core: Improve protected apps notification message Change-Id: Ib8bce9494bae2203260bdc844fe1f367d599b719
- Loading branch information
1 parent
8617c54
commit ad00cb0
Showing
19 changed files
with
577 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
Copyright (C) 2016 The CyanogenMod Project | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="26dp" | ||
android:height="24dp" | ||
android:viewportWidth="26" | ||
android:viewportHeight="24"> | ||
|
||
<path | ||
android:pathData="M0 0h24v24H0z" /> | ||
<path | ||
android:fillColor="#000000" | ||
android:pathData="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z" /> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.