summaryrefslogtreecommitdiffstats
path: root/core
Commit message (Collapse)AuthorAgeFilesLines
* Camera: Working barcode scanning with software renderingWolfgang Wiedmeyer2017-01-042-1/+64
| | | | | | | | | | | | | | | | | | | | Barcode scanner apps expect YUV as preview format. However, the software renderer cannot handle YUV. Thus, RGB 565 is used. Barcode scanner apps only need the first plane Y which is basically greyscale. The solution is a conversion from RGB to greyscale of preview frames that are requested by apps for processing. Apps request preview frames via onPreviewFrame(). The conversion is done using native code for optimal speed. The conversion algorithm is based on the implementations in the RGBLuminanceSource class of ZXing[1] and the RGB565LuminanceSource class of FastBarcodeScanner[2]. Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> [1] https://github.com/zxing/zxing/blob/cc16a72c85e4958ce406af9547764e5eee9adb6e/core/src/main/java/com/google/zxing/RGBLuminanceSource.java [2] https://github.com/tschaumburg/FastBarcodeScanner/blob/5a4c166a722730d0099d4c6a1c15d312b93547da/tracking-barcode-scanner/src/main/java/dk/schaumburgit/trackingbarcodescanner/RGB565LuminanceSource.java
* LockPatternUtils: userId is requiredWolfgang Wiedmeyer2016-12-161-2/+2
| | | | Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
* support separate encryption/lockscreen passwordsDaniel Micay2016-12-162-3/+76
| | | | | | | | | | | | This adds the necessary infrastructure for allowing users to opt-in to a distinct device encryption passphrase. The passwords are still tied together by default. This makes it possible to use a complex encryption passphrase without losing the convenience of a very simple lockscreen pin. This feature can be combined with a forced reboot after a chosen number of failed unlocking attempts to prevent brute-forcing by requiring the entry of the encryption password instead.
* Merge branch 'cm-13.0' of ↵Wolfgang Wiedmeyer2016-12-12195-1298/+41750
|\ | | | | | | https://github.com/CyanogenMod/android_frameworks_base into replicant-6.0
| * Automatic translation importinky@build012016-12-022-2/+2
| | | | | | | | | | Change-Id: Ic80541e78c8570809868ce067a5176acb9d6a5a2 Ticket: -
| * Automatic translation importinky@build012016-11-292-94/+1
| | | | | | | | | | Change-Id: I38a02ada64c66994c99ba5aee59a522931227337 Ticket: -
| * Themes: Don't cache explicitly themed resourcesBharadwaj Narasimha2016-11-281-26/+1
| | | | | | | | | | | | | | | | | | When a nav bar should be unchanged in the process of customization(like changing icons,fonts) the nav bar changes due to explicitly caching themed resources. Change-Id: I3135fac9df82a0551879908f6bf24deba0da0339
| * Build: use UserHandle.isApp for M compatibilityZhao Wei Liew2016-11-271-1/+1
| | | | | | | | Change-Id: Ie4511c547d9afe2697e1ac3519f41a9b19784f18
| * Make Build.TYPE and Build.FINGERPRINT consistent for apps.Danny Baumann2016-11-252-0/+43
| | | | | | | | | | | | | | | | | | | | Some apps (namely Android Wear) like to do comparisons between TYPE and FINGERPRINT and throw errors on inconsistencies. As our fingerprints are almost always taken from stock ROMs, they don't really match our builds, causing said comparisons to fail. Avoid those failures by taking build type out of fingerprint for apps. Change-Id: I8e8db64de7ea224572ecb3695c85abea91e0e29f
| * zygote: Allow device to append extra whitelisted pathsLuca Stefani2016-11-172-1/+35
| | | | | | | | Change-Id: Ic5b056d7ead520da8648db9be28e16a81ec27c73
| * zygote: Add /proc/ged to the FD whitelistRicardo Cerqueira2016-11-121-1/+2
| | | | | | | | | | | | This is used by some platforms' gfx stack Change-Id: Ife6e1b0df30fc23eff7fb6a16ff95c3e7b16a9c7
| * frameworks/base: Addition of Changes for ZeroBalance featurePragnya Paramita2016-11-103-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --Addition of code to receive broadcast from ZeroBalanceHelper application for executing command to write block/unblock rule to Iptable. --Addition of ZeroBalanceHelper file to be accesible by other modules to notify ZeroBalanceHelper application about update on change of SIM balance. --Addition of rule to allow browser uid when rest all applications are in blocked state. --Addition of feature flag to control the zerobalance feature. CRs-Fixed: 927258 Change-Id: Ifdf4c46fd63ab78193047a9bc8b62bf41065a665
| * NotificationManager: Concentrate LED light capabilities at a single locationRicardo Cerqueira2016-11-104-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | We had(have) a bunch of individual boolean toggles for various LED behaviors and combinations, which end up getting used as a similarly sprawling bunch of getResource() calls across various locations. And they keep piling up... So... create a new overlayable array of LED capabilities (config_deviceLightCapabilities) where we can throw everything (and expand in the future). Also, create a helper to abstract usage of the old (multi-resource) and new (single resource array) formats to avoid breaking any deployed devices. Change-Id: I7d627914b058861048071fc15776031c4152157f
| * Add CMSDK resource APK to Zygote FD whitelistSteve Kondik2016-11-101-1/+2
| | | | | | | | Change-Id: Ica91b23e467db61f142b183316db4afee2a2a283
| * Merge tag 'android-6.0.1_r74' into HEADJessica Wagantall2016-11-098-15/+602
| |\ | | | | | | | | | | | | | | | CYNGNOS-3303 Android 6.0.1 release 74
| | * Merge commit '0a9d537f623b2c11dce707fb9b91fea016fd0e9f' into ↵Jeff Sharkey2016-09-271-3/+3
| | | | | | | | | | | | | | | | | | manual_merge_0a9d537 Change-Id: Ib1a0bbb34edb61666ac5739f0b0eaadbe4c5fe06
| | * Ensure munmap matches mmapJohn Reck2016-09-274-10/+11
| | | | | | | | | | | | | | | | | | Bug: 31350622 Change-Id: I6d3f9faec32d54360caa6706d17405e20b50966c (cherry picked from commit aa394dd42c049479bface1991f11b863dc1a0922)
| | * Fix setPairingConfirmation permissions issue (2/2)Marie Janssen2016-09-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setPairingConfirmation was set to only require BLUETOOTH_ADMIN permission which shouldn't be able to set the confirmation itself. This is restricted to BLUETOOTH_PRIVILEGED permission. Bug: 29043989 Change-Id: I887de32d156e672ec44aa0b286cd7ea7f9f8ad55 (cherry picked from commit 93326cfd9fb8a20081baa9b975275772798cfd80)
| | * Backport changes to whitelist sockets opened by the zygote.Narayan Kamath2016-09-272-0/+586
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the backport of the following commits : Commit c5f27a7cb2ec816f483a65255034a1b57a8aa22: ----------------------------------------------- Reopen whitelisted zygote file descriptors after a fork. We don't want these descriptors to be shared post-fork, so we'll have to close and reopen them when the zygote forks. The set of open descriptors is checked against a whitelist and it is a fatal error if a non whitelisted FD is opened. It is also a fatal error if anything other than a regular file / character device or socket is opened at the time of forking. This work is done in two stages : - An initial list of FDs is constructed and cached prior to the first zygote fork. - On each subsequent fork, we check whether the list of open FDs has changed. We are currently tolerant of changes, but in the longer term, it should be a fatal error if the set of open file descriptors in the zygote changes. - Post fork, we traverse the list of open descriptors and reopen them if necessary. bug: 30963384 Commit 3764a260f0c90dcb323caeda14baf903cc108759: ----------------------------------------------- Add a whitelist of sockets on fork. Maintain a whitelist of AF_UNIX sockets that are permitted to exist at the time of forking. If an open socket does not belong to the whitelist (or is not AF_UNIX), the process will abort. If an open socket is whitelisted, it will be redirected to /dev/null after a sucessful fork. This allows us to unify our handling of the special zygote sockets (/dev/socket/zygote[_secondary]) with the existing whitelist of non socket file descriptors. This change also removes non-fatal ALOGW messages since they have the side effect of reopening the logging socket. bug: 30963384 Commit 0b76d6a28e6978151bf245a775329cdae5e574d5: ----------------------------------------------- fd_utils: Fix broken usage of iterators. There were two separate issues here : - RestatInternal was using an iterator after a call to erase(). This will not work because it will be invalidated. - The "standard" for loop idiom for iterating over a map while making structural changes to it is broken. Switch to a while loop and treat cases where elements are erased differently from cases where they aren't. bug: 31092930 bug: 30963384 Plus additional changes: ----------------------------------------------- - add /dev/__properties__ to the whitelist. Change-Id: I709a7f4913e807a8fec8a58c81e98fe5b5222820 (cherry picked from commit 41ca1bce01af7e86aeff9009df54bbc81e3c77d0)
| | * Bind fingerprint when we start authentication - DO NOT MERGEJim Miller2016-08-252-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug where it was possible to authenticate the wrong user. We now bind the userId when we start authentication and confirm it when authentication completes. Fixes bug 30744668 Change-Id: I346d92c301414ed81e11fa9c171584c7ae4341c2 (cherry picked from commit b6f4b48df273d210d13631b4c2426482feb40c97)
| | * Process: Fix communication with zygote.Narayan Kamath2016-08-251-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't write partial requests, and don't return (or throw) early after partially reading a response. bug: 30143607 (cherry-picked from commit 448be0a62209c977593d81617853a8a428d013df) Change-Id: I5881fdd5e81023cd21fb4d23a471a5031987a1f1 (cherry picked from commit e29c6493c07acf1a0b706917e9af0c8d761c8ae9)
| | * Fix vulnerability in LockSettings serviceJim Miller2016-08-251-2/+2
| | | | | | | | | | | | | | | | | | | | | Fixes bug 30003944 Change-Id: I8700d4424c6186c8d5e71d2fdede0223ad86904d (cherry picked from commit 2d71384a139ae27cbc7b57f06662bf6ee2010f2b)
| * | Support enforcing a minimum delay between notification sounds of an app.Danny Baumann2016-10-201-0/+3
| | | | | | | | | | | | | | | | | | Useful e.g. for messenger apps. Change-Id: If8e8cc9e2f02d70537c1f9dc14f22bbd0ec1e9a6
| * | (Optionally) allow vibration during priority zen mode.Danny Baumann2016-10-192-3/+3
| | | | | | | | | | | | Change-Id: I6fb81c5898fbfe9e89a4af3fdc042266c8a9be6c
| * | Merge tag 'android-6.0.1_r72' into HEADJessica Wagantall2016-10-064-15/+33
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Android 6.0.1 Release 72 (M4B30X) # gpg: Signature made Tue 04 Oct 2016 09:47:40 AM PDT using DSA key ID 9AB10E78 # gpg: Can't check signature: public key not found
| | * | Bind fingerprint when we start authentication - DO NOT MERGEJim Miller2016-08-262-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug where it was possible to authenticate the wrong user. We now bind the userId when we start authentication and confirm it when authentication completes. Fixes bug 30744668 Change-Id: I346d92c301414ed81e11fa9c171584c7ae4341c2 (cherry picked from commit b6f4b48df273d210d13631b4c2426482feb40c97)
| | * | Process: Fix communication with zygote.Narayan Kamath2016-08-261-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't write partial requests, and don't return (or throw) early after partially reading a response. bug: 30143607 (cherry-picked from commit 448be0a62209c977593d81617853a8a428d013df) Change-Id: I5881fdd5e81023cd21fb4d23a471a5031987a1f1 (cherry picked from commit e29c6493c07acf1a0b706917e9af0c8d761c8ae9)
| | * | Fix vulnerability in LockSettings serviceJim Miller2016-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 30003944 Change-Id: I8700d4424c6186c8d5e71d2fdede0223ad86904d (cherry picked from commit 2d71384a139ae27cbc7b57f06662bf6ee2010f2b)
| | * | Reduce shell power over user management.Sudheer Shanka2016-08-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove MANAGE_USERS permission from shell and whitelist it for some specific functionality. Bug: 29189712 Change-Id: Ifb37448c091af91991964511e3efb1bb4dea1ff3
| * | | Automatic translation importpinky@build012016-09-272-121/+59
| | | | | | | | | | | | | | | | | | | | Change-Id: I77a3c0eb997d6f2aaf9b1add59480c496e55e43d Ticket: -
| * | | PhoneWindowManager: set focus flags on keyguard panelsRoman Birg2016-09-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Ticket: CYNGNOS-3251 Change-Id: I394514335bdaeafdc7b89918ece1fe3d2794647f Signed-off-by: Roman Birg <roman@cyngn.com>
| * | | Automatic translation importclyde@build012016-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I4ba7d41862a729eaa6034b5e1285fd08b959b05b Ticket: -
| * | | Automatic translation importpinky@build012016-08-278-21/+5135
| | | | | | | | | | | | | | | | | | | | Change-Id: If7eac9a9fa7e145c9d35ece91a8ccab33601a1ca Ticket: -
| * | | Themes: Give power dialogs own set of volume icons for themesBryan Owens2016-08-265-4/+80
| | | | | | | | | | | | | | | | | | | | Change-Id: Ica874be3be89f12b6ecea444d442706bc1fd91ba Signed-off-by: Bryan Owens <djbryan3540@gmail.com>
| * | | Apps on adopted storage should stay there during updateSam Mortimer2016-08-171-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An update to an app on adopted storage via a PackageInstaller.Session (eg gplay) will result in the app silently ending up back on internal storage if the (new) manifest sets INSTALL_LOCATION_INTERNAL_ONLY. However, the app data is not moved with it so the end result is that data looks like it's been wiped. Ideally, the app and data would be moved to internal. Next best would be that the user is informed that they need to uninstall and reinstall. For now, persist the app in the adopted storage location so that the user doesn't lose app data. Change-Id: I1f178ea361a875c6df6b3b20a2e44071124c39c4
| * | | Automatic translation importblinky@build012016-08-132-5/+7
| | | | | | | | | | | | | | | | | | | | Change-Id: I599894bfd30ff9d78253482981737fc8a440a826 Ticket: -
| * | | [2/2] base: cm custom boot dexopt UIAlexander Martinz2016-08-103-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Pass app info and number of installed packages to boot message UI * Ui by Asher and Joey, based on Alexander's previous work Change-Id: I9ec9d0cb0e20a9bac73e126f6b6f3965400f05e7
| * | | IconPackHelper:Use un-tinted iconback when no defaultSwatchcolor is specifiedBharadwaj Narasimha2016-08-091-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After applying the theme which supports paletteback feature and if there is no defaultSwatchColor specified then the background should go to the original color. Instead in a particular FootballDemo theme the theme would never get applied and just flood the logcat with null exceptions for each and every app. TICKET:CYNGNOS-2942 Change-Id: If2bd3d23ab5075dac1d8ff3f197cebc28c9c1f20
| * | | Automatic translation importblinky@build012016-08-081-4/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: I2ffd5b1ee1b0a1645d07dd008b87cf13899adda8 Ticket: -
| * | | fw: enforce android.permission.PREVENT_SYSTEM_KEYS in system serverScott Mertz2016-08-051-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since privateFlags can be accessed and modified via reflection due to change 5d927c2d8e, the prevent system keys or prevent power keys flag can be set and deployed without ever calling setPrivateFlags directly. Move enforcing to system server to prevent app tampering. TICKET: CYAN-7921 (open source JIRA) Found by Maciej Krysztofiak Change-Id: I53c2804d0283692036f5cc95e6ad57821bc0655a
| * | | Themes: Add permission to themes protected broadcastsd34d2016-08-021-2/+5
| | | | | | | | | | | | | | | | Change-Id: I3c9d347a3165434a955407e5d0509b54a0d918e1
| * | | Merge tag 'android-6.0.1_r61' into HEADJessica Wagantall2016-08-024-6/+25
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | Android 6.0.1 Release 61 (MOB30Z) Change-Id: Ib003ccb606e0d77209291b757ea36399d3b65814
| | * | Reduce shell power over user management.Sudheer Shanka2016-06-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove MANAGE_USERS permission from shell and whitelist it for some specific functionality. Bug: 29189712 Change-Id: Ifb37448c091af91991964511e3efb1bb4dea1ff3
| | * | DO NOT MERGE Fix intent filter prioritiesTodd Kennedy2016-06-241-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since this is a backport, there is only one rule that guards intent filter priorities: 1) Updates will NOT be granted a priority greater than the priority defined on the system image. Bug: 27450489 Change-Id: Ifcec4d7a59e684331399abc41eea1bd6876155a4
| | * | Don't trust callers to supply app info to bindBackupAgent()Christopher Tate2016-06-242-5/+7
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get the canonical identity and metadata about the package from the Package Manager at time of usage rather than rely on the caller to have gotten things right, even when the caller has the system uid. Bug 28795098 Change-Id: I215786bc894dedf7ca28e9c80cefabd0e40ca877 Merge conflict resolution for ag/1133474 (referencing ag/1148862) - directly to mnc-mr2-release
| * | Improve the scan processmqi2016-07-261-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use multi task to speed up the scan process CRs-Fixed: 984513 base: fix native crash in system_server Currently PackageManagerService uses multi-thread to scan packages to speed up, when scan each package, it sometimes will call SELinux's restorecon, then libselinux uses global variable fc_sehandle to selabel_lookup and write in compile_regex, so it's not thread-safe, so will cause invalid address with possibility. From backtrace, the final crash happens in pcre_exec. Add one lock in NativeLibraryHelper to make restorecon safe. Change-Id: Ida43fcda01d3450befea6afa0be5da27bb195def CRs-Fixed: 1002406, 1027381
| * | Factory reset: Wipe media by defaultScott Mertz2016-07-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These hidden APIs are called from some public APIs (DevicePolicyManager), so we shouldn't change the default behavior. The intent API should also be considered public, so change that as well. FEIJ-1610 Change-Id: Ib9591c122dbe6168e7e237444c754b9608be0953
| * | Automatic translation importinky@build012016-07-221-3/+3
| | | | | | | | | | | | | | | Change-Id: I6e9839888dbd859b6691112bd2b217f82b603e1c Ticket: -
| * | PackageManager: make protected-broadcasts permission awareRoman Birg2016-07-213-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This extends the <protected-broadcast> mechanism to allow protecting actions based on a permission for system apps. For instance: <protected-broadcast android:name="ACTION_A" android:permission="PERMISSION_X" /> will restrict intents with action "ACTION_A" to be only sent with apps holding the "PERMISSION_X" permission. Note that system UIDs will bypass the permission check and always be allowed, just like the normal protected-broadcast mechanism. You must still be a system application to delcare a protected broadcast. Change-Id: Id25cffd233d400800dcb5249c5f487134e1b4152 Signed-off-by: Roman Birg <roman@cyngn.com>
| * | Automatic translation importpinky@build012016-07-192-1/+2
| | | | | | | | | | | | | | | Change-Id: Id6a830b775d7a32c8d00a9a30e441f781d1fbe95 Ticket: -