OSDN Git Service

android-x86/frameworks-base.git
7 years agoSystemUI: Restrict persistent USB drive notifications to USB disks
AdrianDC [Tue, 28 Jun 2016 14:20:28 +0000 (16:20 +0200)]
SystemUI: Restrict persistent USB drive notifications to USB disks

 * Without the addition of the isUsb check, a regular FAT32 MicroSD
    would have a persistent notification that is unwished

Change-Id: I396a861702674d0a6a70beb5206fb4c7374ec85d

7 years agoSystemUI: Add support for persistent usb drive notification.
Adnan Begovic [Thu, 2 Jun 2016 22:29:16 +0000 (15:29 -0700)]
SystemUI: Add support for persistent usb drive notification.

  This option can be enabled via config_persistUsbDriveNotification

Change-Id: I331a759aeb914e46e3ef4842896d3465d894707a
TICKET: PAELLA-225

7 years agoappops: Privacy Guard for N
Steve Kondik [Mon, 21 Oct 2013 06:48:00 +0000 (23:48 -0700)]
appops: Privacy Guard for N

 * Squashed commit of all PG-related features including superuser

   Authors:
   - Sam Mortimer
   - Danesh Mondegarian
   - Jorge Ruesga
   - Diogo Ferreira
   - Roman Birg
   - Adnan Begovic
   - Chirayu Desai
   - Lars Greiss
   - Steve Kondik
   - CodeAurora

AppOps: track op persistence by name instead of id

On XML write, include the op name.  On XML read, map
the name back to op id (if it exists).

Persistent AppOp state now follows the op name instead
numeric id.  This allows upgrades between versions of
android that have different code<>name mappings.

AppOpsService: Add MODE_ASK support to AppOps.

Add support for new mode(MODE_ASK) in AppOpsService to show a permission
dialog box to user to confirm user permission before allowing or ignoring
that operation.
All strict operations (defined in AppOpsManager) are going to be in
MODE_ASK by default.
Operations will be moved to MODE_ALLOWED or MODE_IGNORED according to
user's choice.

AppOps: Add support for AppOps policy file

Add support to read AppOps policy file.
AppOps policy file can be used to configure Ops default policy.

[1/2] frameworks/base: Privacy Guard

PS2: * add missing call to updatePrivacyGuardNotificationLocked()
     * remove ic_privacy_guard and ic_privacy_guard_off
     * use stat_notify_privacy_guard drawable from Björn
     * rebase

PS3: * exclude MODE_IGNORED from causing
       getPrivacyGuardSettingForPackage() returning true.
       multiuser restrictions on calls/sms otherwise
       cause privacyguard to appear to be on when really
       it isn't.
     * rebase

Pulled together from:

Author: Danesh M <daneshm90@gmail.com>
Date:   Thu Sep 5 19:23:15 2013 -0700
Privacy Guard : Reimplement backed by AppOps
Re-implements privacy guard to use appops.

Author: Jorge Ruesga <jorge@ruesga.com>
Date:   Sat Jan 4 01:34:39 2014 +0100
privacyguard: Share privacy package name between activity stacks
AOSP 4.4 now has a stack supervisor with differents activity stacks for home and focus activities.
Every ActivityStack instance has a ref to this supervisor. Just share the privacy guard package name
throught the supervisor.
Patchset 2: Fix formatting
JIRA: CYAN-2874
Issue: https://jira.cyanogenmod.org/browse/CYAN-2874

Author: Steve Kondik <shade@chemlab.org>
Date:   Sun Feb 23 19:23:31 2014 +0100
Use MODE_ASK as the default ops mode in Privacy Guard
* Prompting the user is far more useful as a default behavior. The
  choice will be remembered after the first request.

Author: Steve Kondik <shade@chemlab.org>
Date:   Tue Feb 25 13:11:12 2014 +0100
Relocate and cleanup new app ops features and PGify it

[2/2] Framework AppOps: Add per Op allowed and ignored counters

Port from cm-10.2 and cm-11.0

Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Wed Oct 2 22:06:42 2013 -0700
[2/2] AppOps: Add per Op allowed and ignored counters

wifi: Confirm user permission before toggling wifi

Check user permissions before enabling/disabling wifi.

AppOps: Add Bluetooth enable control into AppOps

Check user permission before enabling bluetooth.

AppOps: Add BOOT_COMPLETED operation

Add BOOT_COMPLETED operation in AppOps.

This operation is used to allow user to control auto start of
applications and services at bootup.

AppOps: Add nfc enable control into AppOps.

Check user permission before enabling nfc.

appops: Add support for SU

This patch adds support for superuser app-ops control. The end-goal
is to better prepare superuser for the multi-user experience while
also replacing the superuser app with existing components.

su: Add an indicator when a 'su' session is active

This adds an indicator to the statusbar that is visible whenever a root
session is active, akin to the fine location icon.

AppOps: fix wifi scan op

There's no direct permission tied to it and fix the op-to-switch entry.

AppOps: add a default constructor

Frameworks: Redirect appops strings to string references

adapted to reflect new permission indices and codes

appops: Disassociate appops requests from notification broadcasts

The AppOpsService is essentially a manager for a set of counters
and permissions. Each operation request has the potential to change
the state and, as such, access to such state is synchronized.

We are whitnessing deadlocks caused by the broadcast and, in fact,
while we want to notify superuser changes eventually, it does not
have to be synchronous with the app ops request. This patch uses the
request to schedule the notification on a handler, leaving the locking
semantics of appops intact.

add missing app ops to string array

Also added op codes to prevent further mismatches.

Add new OP_RUN_IN_BACKGROUND to list

AppOps: fix deadlock issue when showing dialog

WindowManagerService need call PowerManagerService to release
wakelock. The Notifier in PowerManagerService need call AppOpsService
to notify holding wakelock ops is finished.  Meanwhile, AppOpsService
may need call WindowManagerService to show dialog. This scenario
will lead to deadlock issue.
To move showing dialog action out of lock section to fix this issue.
Since only UI work is moved out of lock area, it is supposed to be
safe.

AppOps: relax some system appops for systemui

Grant wifi, bt, boot_complete, nfc, and data changes for systemui.

Also remove the bluetooth permission tied to the bluetooth_change op -
it is not always directly tied to BLUETOOTH or BLUETOOTH_ADMIN, so we
can't force one there.

cyanogen: Add missing RUN_IN_BACKGROUND where required

Revert "AppOps: add a default constructor"

* Not needed after http://review.cyanogenmod.org/126381

This reverts commit 19e0ce0755d191204ac3bd3106b779898d5daadd.

appops: Implement concept of delayedcount.

 High frequency request ops will be delayed until their ignore count
 ceiling is met. This is to mitigate the overloading the main activity
 manager service handler and having watchdog kill our service.

 Google play services likes to share its uid with numerous packages to avoid
 having to grant permissions from the users perspective and thus is the worst
 example of overloading this queue -- so, to not encourage bad behavior,
 we move them to the back of the line. NOTE: these values are magic, and may need
 tuning. Ideally we'd want a ringbuffer or token bucket here to do proper rate
 limiting.

appops: Respect screen interactivity before creating dialogs.

  If the device's screen is currently off, do not queue ask
  runnables who cannot be interacted with. Since these events
  are gating mechanisms for closing an IPC loop, they need to
  happen when the user is interacting with the device.

  Likewise, on screen off, clear the queue of every op as they
  become unnecessary.

Change-Id: Ia2bbb56509bedb4aa7272e53cb67a4d94fec450d

Allow disabling the privacy guard notification - port from cm-12.1 (2/3)

Change-Id: Iab0288f50685220c8be0c11ea5075f91ec1bbe32

Launch app privacy settings when tapping on PG notification (1/2)

Based on https://github.com/SlimRoms/frameworks_base/commit/97ccae06cd0ad1aa366c3a70e8e744277c409b06

JIRA: CYAN-6077
Change-Id: I8632e8c944c1d5d7ad2fb2a2276bae5fe2d4a0a0

7 years agotelephony: Add getDefaultDataSubId for compatibility
Steve Kondik [Fri, 2 Sep 2016 08:25:47 +0000 (01:25 -0700)]
telephony: Add getDefaultDataSubId for compatibility

 * Some applications are still using getDefaultDataSubId, which
   has changed to the more verbose getDefaultDataSubscriptionId.

Change-Id: I006fa6bd85222ae16edb4aa83dc9c3552e28500e

7 years agoRevert "framework: Add permission dialog"
Steve Kondik [Fri, 2 Sep 2016 05:43:04 +0000 (22:43 -0700)]
Revert "framework: Add permission dialog"

 * Conflicts with Privacy Guard

This reverts commit cfd88000aa4efc90353a4f7dcbfdce962dfdab7f.

Change-Id: I2b30acf4ccdbfd316389b1f6cf4c4ef20012ff0a

7 years agoGuard in short-circuit evaluations for stringSplit methods.
Mohammed Irfan [Tue, 21 Jul 2015 08:34:04 +0000 (04:34 -0400)]
Guard in short-circuit evaluations for stringSplit methods.

* splitRange function should also check if string is empty instead of
  just checking for null, as a faulty camera can return
  an empty RangeLength string.
* See (stripped) logcat: http://pastebin.com/kVV3ZJhz

Change-Id: Icbb8f12d1c2511366856889edc9b2060b764f2d0

7 years agoAllow sending vendor- or device-specific commands to the camera HAL.
Danny Baumann [Tue, 3 Mar 2015 09:43:28 +0000 (10:43 +0100)]
Allow sending vendor- or device-specific commands to the camera HAL.

Change-Id: I2aaa9e526b6f1a35d45e96b6d23e3db972d82733

7 years agoalarmmanager: Remove stacktrace spamming from poweroff alarm
Steve Kondik [Thu, 1 Sep 2016 20:28:33 +0000 (13:28 -0700)]
alarmmanager: Remove stacktrace spamming from poweroff alarm

Change-Id: I8435ae7c7cffecbb651884cf8b00de7e85500e64

7 years agoFramework: Fix GSM signal strength
Ricardo Cerqueira [Mon, 4 Nov 2013 02:57:54 +0000 (02:57 +0000)]
Framework: Fix GSM signal strength

Certain OEM gsm ril libs send back a bogus value for LTE signal
that causes SignalStrength.java to default to LTE and report
incorrect signal values.
Use prop value ro.telephony.ril.config=signalstrength to get proper
GSM signal reading on certain devices.

Commit includes "telephony: hide needsOldRilFeature" from Chirayu Desai.

Change-Id: I9a0b68f6c3789218a4a20337496e6264996deab7

7 years agoFix "ghost" weather display in expanded status bar
cristianomatos [Wed, 7 Jan 2015 20:49:29 +0000 (18:49 -0200)]
Fix "ghost" weather display in expanded status bar

- How to repoduce -
1 - Disable weather in status bar option
2 - Expanded status bar
3 - Click, for example, in modile data to open Cellular data sub settings
4 - Toggel cellular data on/off or click in "DONE"
5 - Now check the status bar and you'll see weather info!

NOTE: If you swipe up and down again all get back to normal because updateVisibilities() is called in StatusBarHeaderView.java

Simple solve it (i don't know if this is the better way) by updating weather settings visibility inside handleShowingDetail(final QSTile.DetailAdapter detail)

Correct fix "ghost" weather display in expanded status bar

- Thanks to the hint of @Altaf-Mahdi. All credits gos to him. check our comments here:
https://github.com/crdroidandroid/android_frameworks_base/commit/607175f0fe6469600e01339f2b93e4b1edabc275

Change-Id: If36339ecad00296e81e42dc99748f30f5f6447e8

7 years agoSystemUI: fix MediaProjection cast crash
Pawit Pornkitprasan [Sat, 20 Dec 2014 07:58:47 +0000 (14:58 +0700)]
SystemUI: fix MediaProjection cast crash

Clicking on the "cast" icon of an app using the MediaProjection API will
crash as the code assume that it is a device.

java.lang.ClassCastException: android.media.projection.MediaProjectionInfo cannot be cast to android.media.MediaRouter$RouteInfo
at com.android.systemui.statusbar.policy.CastControllerImpl.startCasting(CastControllerImpl.java:177)
at com.android.systemui.qs.tiles.CastTile$CastDetailAdapter.onDetailItemClick(CastTile.java:237)
at com.android.systemui.qs.QSDetailItems$1.onClick(QSDetailItems.java:177)
at android.view.View.performClick(View.java:4756)
at android.view.View$PerformClick.run(View.java:19749)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)

Change-Id: Icfdf745c03da7bd1bbb228e06005f55324c1b8fa

7 years agoAdding back pdf_printer_media_sizes for values-zh-rCN to accomodate mediasize_default
Raj Yengisetty [Fri, 19 Dec 2014 23:14:58 +0000 (15:14 -0800)]
Adding back pdf_printer_media_sizes for values-zh-rCN to accomodate mediasize_default

Change-Id: I45cfd8babe813fa5dba49bb444e10517a3771f30

7 years agotelephony: SignalStrengh: Don't calculate a LTE snr if the srq is invalid
Ricardo Cerqueira [Thu, 22 Nov 2012 06:02:18 +0000 (06:02 +0000)]
telephony: SignalStrengh: Don't calculate a LTE snr if the srq is invalid

If the previous values are invalid and signal quality is -1, chances are there's
no LTE signal at all, so don't calculate the SNR and mark it invalid as well.

This fixes the strength indicator in GSM devices where it was being skewed
by the ghost LTE value

Change-Id: I070573401c141aa99941a332ee256246697abb90

7 years agoPackageManager: allow build-time disabling of components
Pawit Pornkitprasan [Sun, 1 Sep 2013 09:24:14 +0000 (16:24 +0700)]
PackageManager: allow build-time disabling of components

Allow components to be specified as disabled at build time
(applied on boot).

This allows stock OTA components to be marked as disabled in
CM builds.

Change-Id: I6e4499cc40a779792a5ea97a10137399dad7d69f

SystemUpdateService: enable service but lock its receivers [1/2]

Added a check for ensure that disabled components are not
re-enabled at runtime

Added code for forcing enable of previously disabled components

Change-Id: Icfcfa26ccb85028d32edbb5cdb3dd7cdae85b720

7 years agoPort: Wake on plug (1/2)
Jon Evans [Mon, 1 Dec 2014 01:55:42 +0000 (20:55 -0500)]
Port: Wake on plug (1/2)

Change-Id: I5e50a7fd351857d76c1c2fd13c6e737d8902a2f3

7 years agoFramework: Forward port ADB over network (Part 2 of 2)
Ricardo Cerqueira [Mon, 4 Nov 2013 02:17:27 +0000 (02:17 +0000)]
Framework: Forward port ADB over network (Part 2 of 2)

Includes:
- ADB Over Network, integration of the adb-host mode (already present)
  The feature can be used/tested without the Settings part:

    setprop service.adb.tcp.port 5555

  Note: This ADB setting is not persistent (for security purpose) and
  require init.rc implementation event like this : http://bit.ly/AdbTcpIP

  Author: Tanguy Pruvot
  Id: I5c61a53948349c785356cb5aae165110d75e3074

  Author: sssemil <suleymanovemil8@gmail.com>
  Show notification on adb over network too

  Screenshots - http://goo.gl/TgsRI6
  Id: I9ddc0aa9a4f330a06ab5d97a8645d1b31bb6f299

Change-Id: I101216c5b8ddff5040d9eeaf35afefc5cd98bbf3

7 years agoAlso dump widget options in 'dumpsys appwidget'.
Danny Baumann [Thu, 20 Nov 2014 11:55:05 +0000 (12:55 +0100)]
Also dump widget options in 'dumpsys appwidget'.

Change-Id: Ia002c4b93d453ecb94be9312371ec71853a9774b

7 years agoTreat default value that wasn't found as empty value.
Danny Baumann [Fri, 14 Nov 2014 17:44:51 +0000 (09:44 -0800)]
Treat default value that wasn't found as empty value.

Fixes http://code.google.com/p/android/issues/detail?id=33220

Change-Id: If22e8b245f688d922c168aa54c8acf743c0644d7

7 years agoPackageManager: Restrict system packages to protected storage
Ricardo Cerqueira [Wed, 4 May 2011 00:19:03 +0000 (01:19 +0100)]
PackageManager: Restrict system packages to protected storage

Don't allow packages signed with the platform key to be
installed into user (or app) controlled storage

Change-Id: I7390b3bdf5289411f7a335c69635bed9f74bbfb3

PackageManager: Limit the platform-key protection to test-keys builds

This block (change I7390b3bdf5289411f7a335c69635bed9f74bbfb3) is intended
to protect the system from abuse of well-known keys. That's not the case
if the system is signed with dev or release keys.

Change-Id: Ifb66f775dd28c577447634ae177442732a18b592

7 years agoVectone UK (MNC01) considered non-roaming on T-Mobile (MNC30)
dh-harald [Fri, 21 Nov 2014 10:00:36 +0000 (10:00 +0000)]
Vectone UK (MNC01) considered non-roaming on T-Mobile (MNC30)

Change-Id: Id74c854f958be721be12451a124cfd2f8b150255

7 years agoLycamobile (MNC04) considered non-roaming on Vodafone (MNC01)
neatchee [Fri, 22 Aug 2014 00:25:13 +0000 (17:25 -0700)]
Lycamobile (MNC04) considered non-roaming on Vodafone (MNC01)

Change-Id: Icff916672e5ed666adf2cdfeb26d24bf43b64683

7 years agoVectone/Delight (MNC07) considered non-roaming on NOS (MNC03)
neatchee [Fri, 22 Aug 2014 00:22:03 +0000 (17:22 -0700)]
Vectone/Delight (MNC07) considered non-roaming on NOS (MNC03)

Change-Id: I743935b94bb531d78b784550e3028378cdc01959

7 years agoNoverca (MNC07) considered non-romaing on TIM (MNC01)
neatchee [Fri, 27 Jun 2014 21:52:15 +0000 (14:52 -0700)]
Noverca (MNC07) considered non-romaing on TIM (MNC01)

Change-Id: I473e1f88db0fe0d5e1799f6d6d892649abb7dc74

7 years agoTele2 considered non-roaming on T-Mo
neatchee [Thu, 15 May 2014 23:17:42 +0000 (16:17 -0700)]
Tele2 considered non-roaming on T-Mo

Change-Id: Ibb05f277b701861b8716168b54e96f63127e686d

7 years agoSaunalahti considered non-roaming on Elisa
neatchee [Wed, 21 May 2014 23:56:22 +0000 (16:56 -0700)]
Saunalahti considered non-roaming on Elisa

Change-Id: I51b554cf578c6027d52ad6e111e41d269c1f579f

7 years agoNational Roaming: Allow T-Mobile AT (MNC03) to roam on 3 AT (MNC10) in Austria
Phil Eichinger [Tue, 13 May 2014 08:00:47 +0000 (10:00 +0200)]
National Roaming: Allow T-Mobile AT (MNC03) to roam on 3 AT (MNC10) in Austria

Change-Id: Ief827259fdcb5bfa13bd643f80a8547a56cc934c

7 years agoAllow 3 AT (mnc05) to roam on T-Mobile in Austria
Arne Coucheron [Mon, 12 May 2014 22:36:20 +0000 (00:36 +0200)]
Allow 3 AT (mnc05) to roam on T-Mobile in Austria

Change-Id: Ie1a62db9a48cfaf594ddda7b413299a9b587ddd4

7 years agoAdded Non-Roaming for carrier BSNL in UP East and WEST INDIA
Aditya Pandey [Sun, 4 May 2014 07:13:59 +0000 (12:43 +0530)]
Added Non-Roaming for carrier BSNL in UP East and WEST INDIA

Added No-roaming for BSNL from circle UP East to UP West, India

Change-Id: I45e804da143e844d794cca98652f5fc6ac4e209b

7 years agocore: added national roaming info for Spring Mobil in Sweden...
d95andek [Fri, 17 Jan 2014 21:20:33 +0000 (22:20 +0100)]
core: added national roaming info for Spring Mobil in Sweden...

Spring Mobil users in Sweden (MCC 240, MNC 10)
can roam on Sweden 3G (MNC 05) and on Sweden 2G (MNC 24).

Change-Id: Ie27ad3561de32557a1713d4962fcc9ec52a8b7fe

7 years agocore: added national roaming info for Tesco Mobile in Ireland.
broodplank [Wed, 18 Dec 2013 23:15:21 +0000 (00:15 +0100)]
core: added national roaming info for Tesco Mobile in Ireland.

Users of Tesco Mobile in Ireland(MCC 272 MNC 11)
  can roam on O2 Ireland (MNC 02)

Change-Id: Ie0b32d51511c2bbc726c43cdec78332397d1ecb9

7 years agoNational roaming info for 3 in Ireland
Nebojsa Cvetkovic [Sun, 15 Dec 2013 19:23:49 +0000 (19:23 +0000)]
National roaming info for 3 in Ireland

Change-Id: I451831f4144b72feac1a38ef1e8693cb947d6d7e

7 years agoNational roaming info for Drei in Austria
Phil Eichinger [Fri, 13 Dec 2013 08:53:05 +0000 (09:53 +0100)]
National roaming info for Drei in Austria

3AT roams in T-Mobile AT networks

Change-Id: I915edccf92bcbb088fa25b958eb345c624f61597

7 years agobase: added national roaming info for Play in Poland
maxwen [Sat, 7 Dec 2013 16:33:32 +0000 (17:33 +0100)]
base: added national roaming info for Play in Poland

Cherry-picked from OmniROM:
https://gerrit.omnirom.org/#/c/3382/

Users of Play in Poland (MCC 260 MNC 06) can roam on
Plus, T-Mobile, Orange (MNCs 01/02/03)

Change-Id: I8ea62b0ca40bac9ced11802ee8ef583d6392a199

7 years agoAllow override of DUN settings
Dave Daynard [Sun, 15 Dec 2013 20:35:04 +0000 (15:35 -0500)]
Allow override of DUN settings

Allow override of system DUN settings by setting
persist.sys.dun.override
to one of the following values:
2 = not set, 0 = DUN not required, 1 = DUN required
If the prop is not set or is set to an invalid value the system setting
will be used.

Change-Id: I296f303a23351e4ab29898895abfcd313c747db9

7 years agoCamera: Longshot with Burst Functionality.
Vijay Kumar Tumati [Wed, 22 Apr 2015 07:20:02 +0000 (12:50 +0530)]
Camera: Longshot with Burst Functionality.

New Longshot stop command is sent after receiving all the required YUV
callbacks or releasing the shutter before reaching Max number.

Change-Id: I264d94cde624b5f2ead88236bdff8d6db41e12e6

7 years agoandroidfw: Fix CMSDK resource handling on N
Steve Kondik [Wed, 31 Aug 2016 08:32:13 +0000 (01:32 -0700)]
androidfw: Fix CMSDK resource handling on N

 * Consider the CMSDK package identifier in the new dynamic resource
   conditions.

Change-Id: I3e84d12ac86a6eb1d3407aa64234f80a0e945e70

7 years agoaapt: Fix compiler warning (clobbered by longjmp)
Christopher R. Palmer [Thu, 29 Oct 2015 10:04:21 +0000 (06:04 -0400)]
aapt: Fix compiler warning (clobbered by longjmp)

The error handling can clobber the fp variable when the code is
being optimized and therefore fp must be marked as volatile to
stop it from doing unsafe optimizations.

Change-Id: Ib133587687c7fc0e788c4b9673669ef9b5bbe91a

7 years agoaapt: add check for untranslatable "string-array"s
Chirayu Desai [Sun, 5 May 2013 14:05:45 +0000 (19:35 +0530)]
aapt: add check for untranslatable "string-array"s

Change-Id: Id884af0505c0bcdfa20b400fcdd54f699f8ef38f
Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
7 years agoaapt: Use a std::map instead of a SortedVector
Christopher R. Palmer [Tue, 5 Jan 2016 01:29:02 +0000 (20:29 -0500)]
aapt: Use a std::map instead of a SortedVector

Android's SortedVectorImpl uses arrays that it must
insert into the middle of.  Each insertion is O(N) time
because it must move on average half the elements of
the array to make room for the new element.  That is,
O(N^2) time to build this sorted vector.

std::map on the other hand normally uses red/black
trees and has a cost of NlogN to add N elements to it.

Change-Id: I5da0363ba806ab615b2aad0fb2a43ef9a9bec327

7 years agoaapt: Speed up the style pruning
Christopher R. Palmer [Mon, 4 Jan 2016 10:18:31 +0000 (05:18 -0500)]
aapt: Speed up the style pruning

Prior to this commit it removed each style one by one which
causes the vector to repeatedly be shrunk and reallocated and
copied (aka either quadratic or NlogN in the number of items
removed).

This commit simply makes it remove them all at once to make it
linear instead.

Change-Id: I541d151675ab19f37d9de1e7a323104d0d3b3c63

7 years agoandroidfw: Allow package ID to be overriden at runtime
Clark Scheff [Thu, 27 Aug 2009 14:45:44 +0000 (07:45 -0700)]
androidfw: Allow package ID to be overriden at runtime

Modify aapt tool to provide proper support for -x option.

Change-Id: Icc118b1afdc64d9f19c646c63d40f7243bf5265c

7 years agoAllow permissions to be granted via whitelisted signatures
Roman Birg [Wed, 10 Jun 2015 17:34:35 +0000 (10:34 -0700)]
Allow permissions to be granted via whitelisted signatures

When an application defines a permission, it can now add a new
attribute "allowViaWhitelist", a boolean value. If set to true,
the permission may be granted to a package signed with a predefined key,
if it is defined via <allow-permission> in
/system/etc/permissions/someapp.xml.

Since this is a hidden attribute, it must use the prv namespace XML
declaration. E.g.: add the following to the <manifest> tag:

       xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"

In the permission declaration:

        <permission
            android:name=""
            android:protectionLevel="signature"
            androidprv:allowViaWhitelist"true" />

And a corresponding entry in /system/etc/permissions/someapp.xml:

        <allow-permission
            name="some.android.PERMISSION"
            signature="<known public signature>" />

Note: if the permission never declares "allowViaWhitelist", then the
whitelisted permissions will be ignored.

Change-Id: Ie4597a07eb0a193375fa2724bd9cf468184a7926
Signed-off-by: Roman Birg <roman@cyngn.com>
PackageManager: copy allowViaWhitelist flag for perm trees

Ref: CYNGNOS-622
Change-Id: Ic52f179d79ac69a055f994df05a502f893435a26
Signed-off-by: Roman Birg <roman@cyngn.com>
Explicitly declare which permissions can be granted via signature

This moves the older <allow-permissions> implementation inline with the
newer one, which requires any permission that can be granted via a
signature to explicitly add the attribute allowViaWhitelist="true".

Change-Id: Ie9f9bf6e2138075b750c58090dcd7030eff174f1
Signed-off-by: Roman Birg <roman@cyngn.com>
Allow CAPTURE_AUDIO_HOTWORD to be whitelisted by signature.

Change-Id: Ia4589c0fd5480a6f462812f5081160262632f09f

Allow additional permissions to be whitelisted by signature.

- android.permission.SET_PREFERRED_APPLICATIONS.
- android.permission.INTERACT_ACROSS_USERS_FULL.

Change-Id: I3fdb3fd412d3eb641a5745eb298afa1121540ccf

allow GET_ACCOUNTS_PRIVELEGED to be whitelisted

Change-Id: Idc5e5535476015800e47f0a3a472729a926dd7b1
Signed-off-by: Roman Birg <roman@cyngn.com>
allow priveleged phone state permission to be whitelisted

Ref: CYNGNOS-1660

Change-Id: I377ad833e44d5c54bbcf2f7447fe5383edc457fb
Signed-off-by: Roman Birg <roman@cyngn.com>
allow whitelisting of ACCESS_KEYGUARD_SECURE_STORAGE

Ref: CYNGNOS-1727

Change-Id: I7151ce3fa7c57ee89fecf691d6e92c4ab39ecf37
Signed-off-by: Roman Birg <roman@cyngn.com>
Allow granting permissions based on signature in <allow-permission/>

This patch allows us to either specify a sharedUserId or a package
signature to use when granting the specific permission.

Change-Id: I8aed78d40316e0e94ac1bfefc7c4a3016a2a9a6b

Explicitly declare which permissions can be granted via signature

This moves the older <allow-permissions> implementation inline with the
newer one, which requires any permission that can be granted via a
signature to explicitly add the attribute allowViaWhitelist="true".

Change-Id: Ie9f9bf6e2138075b750c58090dcd7030eff174f1
Signed-off-by: Roman Birg <roman@cyngn.com>
7 years agosystemui: Fix compilation
Steve Kondik [Wed, 31 Aug 2016 01:11:35 +0000 (18:11 -0700)]
systemui: Fix compilation

Change-Id: I03fad10b746e2bba81c30ba396a5af92b1ea75c9

7 years agoWindowManager: Add clearPrivateFlags
Michael Bestas [Thu, 3 Dec 2015 18:08:42 +0000 (20:08 +0200)]
WindowManager: Add clearPrivateFlags

Change-Id: I0b51a52bf26f3566e74063e22f5c1b187c74b525

7 years agoSettingsProvider : Add functions for delimited strings
Danesh M [Sun, 18 Jan 2015 08:33:46 +0000 (00:33 -0800)]
SettingsProvider : Add functions for delimited strings

Change-Id: Ie4660540de9c6a33ede46c4df7637c0b2b2fc8d4

7 years agopm: Use /system/bin/sh instead of /bin/sh
LuK1337 [Mon, 9 Nov 2015 19:18:42 +0000 (20:18 +0100)]
pm: Use /system/bin/sh instead of /bin/sh

We aren't symlinking /system/bin to /bin.

Change-Id: Ic49fddfaa4c213b6b399ee53095772e6de45ed57
(cherry picked from commit b373b628de273d1879359d15aa5f8c721074b168)

7 years agofix: fw: Utilize CMSettings for specific buttons settings.
Steve Kondik [Mon, 29 Aug 2016 22:30:11 +0000 (15:30 -0700)]
fix: fw: Utilize CMSettings for specific buttons settings.

Change-Id: Ic6bdf6bd7753721dcf01df5f7463b810effdbfdc

7 years agoFIX: fw: Move Secure settings to CMSettings
Steve Kondik [Mon, 29 Aug 2016 22:29:36 +0000 (15:29 -0700)]
FIX: fw: Move Secure settings to CMSettings

Change-Id: I3f69ccd108edd3b0787ea6b093fd6bd06f8f4cb2

7 years agoCompilation fixes
Steve Kondik [Mon, 29 Aug 2016 22:11:48 +0000 (15:11 -0700)]
Compilation fixes

Change-Id: Id9d70e26f2970a696abb77dd73a323347f673035

7 years agoFramework : Move System settings to CMSettings
Danesh M [Thu, 12 Nov 2015 18:52:11 +0000 (10:52 -0800)]
Framework : Move System settings to CMSettings

Change-Id: I4e9fb06db7b9ba05e4a7bbe11916bb2271af4727

7 years agofw: Move NAVBAR_LEFT_IN_LANDSCAPE to CMSettings.
Adnan Begovic [Wed, 11 Nov 2015 21:34:54 +0000 (13:34 -0800)]
fw: Move NAVBAR_LEFT_IN_LANDSCAPE to CMSettings.

Change-Id: I30824dc84bd32e335dde53cee7e40c085894827c

7 years agofw: Move STATUS_BAR_SHOW_WEATHER to CMSettings.
Adnan Begovic [Wed, 11 Nov 2015 20:38:00 +0000 (12:38 -0800)]
fw: Move STATUS_BAR_SHOW_WEATHER to CMSettings.

Change-Id: I00b547053ea02b4888cdde1a4ed3e842b14f5d70

7 years agofw: Move DOUBLE_TAP_SLEEP_GESTURE to CMSettings.
Adnan Begovic [Wed, 11 Nov 2015 20:05:59 +0000 (12:05 -0800)]
fw: Move DOUBLE_TAP_SLEEP_GESTURE to CMSettings.

Change-Id: I8274b7c241cef6835a1114a702e68c95b6d2e036

7 years agoSystemUI: double tap to sleep improvements
Roman Birg [Sun, 23 Nov 2014 14:54:06 +0000 (06:54 -0800)]
SystemUI: double tap to sleep improvements

* Make it more reliable
* Add it to keyguard
* Add a content observer to not always query Settings.System on every
touch event

Change-Id: I292c4d9d9f810843590b7a9ec6e15b99ac44009d
Signed-off-by: Roman Birg <roman@cyngn.com>
7 years agoSystemUI: add quick settings pull down with one finger
Roman Birg [Mon, 10 Nov 2014 03:52:34 +0000 (19:52 -0800)]
SystemUI: add quick settings pull down with one finger

Logic is currently set to use 1/3 of right hand side of the statusbar to
trigger a quick settings quick pull down, quickly.

Change-Id: I3f536496f724f07d2419a5b2db5fa8f8261609e7
Signed-off-by: Roman Birg <roman@cyngn.com>
SystemUI: fix right hand side gestures on lockscreen

two finger quick pulldown was not accounting for being in the keyguard
adn was eating touch events when it shouldn't be.

Change-Id: I625d48a4002aaaf2d55d7efaed65d892ab7aa13c
Signed-off-by: Roman Birg <roman@cyngn.com>
SystemUI: add Settings.System toggle for quick-quick settings pulldown

Change-Id: I3c5dcfc23f39bf8be6c402e25f61e6f57a8add2c
Signed-off-by: Roman Birg <roman@cyngn.com>
7 years agoLEDs Brightness: Update the slider for M
AdrianDC [Wed, 11 Nov 2015 20:06:22 +0000 (21:06 +0100)]
LEDs Brightness: Update the slider for M

 * Add notification details needed for M
 * Sync with some changes made in the Display Brightness dialog
 * Clean ic_settings indents with Settings ic_settings_24dp.xml

Change-Id: I8b6ac1920704f43f4776cbd3bdfb3d0ed8d223dc
Signed-off-by: AdrianDC <radian.dc@gmail.com>
7 years agofw: Move Notification LEDs settings to CMSettings
AdrianDC [Wed, 11 Nov 2015 18:16:33 +0000 (19:16 +0100)]
fw: Move Notification LEDs settings to CMSettings

 * Lights with Screen On
 * LEDs Brightness
 * Multiple LEDs

Change-Id: Ife49a2f8077e9361f56990fb4b0b49e1c44bdd5e
Signed-off-by: AdrianDC <radian.dc@gmail.com>
7 years agoPowerManager: don't pass NULL pointers to power HAL
Gabriele M [Sat, 7 Nov 2015 23:42:35 +0000 (00:42 +0100)]
PowerManager: don't pass NULL pointers to power HAL

Sending a NULL pointer here is likely going to cause system crashes and
doesn't seem to be the correct thing to do, a value equals to zero is
no different from the others.

Change-Id: I2678387715b3ec1d12627abe2dd5d3e189579dc4

7 years agofw: Move battery light settings to CMSettings.
Adnan Begovic [Tue, 10 Nov 2015 00:26:00 +0000 (16:26 -0800)]
fw: Move battery light settings to CMSettings.

Change-Id: I28e60473356b2a9af152df82d34ad7abc9918682

7 years agofw: Move Secure settings to CMSettings
d34d [Tue, 10 Nov 2015 18:47:58 +0000 (10:47 -0800)]
fw: Move Secure settings to CMSettings

This moves all Settings.Secure.* settings that, were added to
CyanogenMod, to CMSettings.

 * KEYBOARD_BRIGHTNESS
 * BUTTON_BRIGHTNESS
 * BUTTON_BACKLIGHT_TIMEOUT
 * DEV_FORCE_SHOW_NAVBAR
 * ADB_NOTIFY
 * ADB_PORT
 * DEVICE_HOSTNAME
 * KILL_APP_LONGPRESS_BACK
 * PROTECTED_COMPONENTS
 * LIVE_DISPLAY_COLOR_MATRIX
 * ADVANCED_REBOOT
 * POWER_MENU_ACTIONS
 * DEFAULT_THEME_COMPONENTS
 * THEME_PREV_BOOT_API_LEVEL

Change-Id: I49e9160177ffc727b20008817ac2b5ce5e89ead5

7 years agoPort "Option to hide Adb notification icon (2/2)"
Tanguy Pruvot [Tue, 27 Nov 2012 19:09:18 +0000 (14:09 -0500)]
Port "Option to hide Adb notification icon (2/2)"

Change-Id: I5d40f5b0990fa3a1d02210ad4cc2ff5ada15e69c

7 years agoambient display: Fix volume key music control
Christopher R. Palmer [Fri, 1 May 2015 10:15:47 +0000 (06:15 -0400)]
ambient display: Fix volume key music control

Previously the dream service would only report whether or not it was dreaming.
Ambient display counts as dreaming.  When dreaming, the volume inputs are
passed back to the application which is not what we want for ambient
display.

Fix this by exposing isDozing() and allow volume keys to control music
when we are dreaming and have moved into doze mode (aka, sleeping).

Change-Id: I3b1e72b95ec8b1b63ef0219259dfee77a5d339d3

7 years agoSystemUI: small optimization for notification icon numbers
Roman Birg [Thu, 19 Mar 2015 21:32:33 +0000 (14:32 -0700)]
SystemUI: small optimization for notification icon numbers

Don't create the paint object used to draw notification icon count
badges in the status bar unless the user actually wants to see those
counts.

Change-Id: Iabba316102583a798acdc124d9fb51c0d7826a0d
Signed-off-by: Roman Birg <roman@cyngn.com>
7 years agoDo not check mHomePressed on HOME in interceptKeyBeforeDispatching
Raj Yengisetty [Thu, 16 Apr 2015 01:16:24 +0000 (18:16 -0700)]
Do not check mHomePressed on HOME in interceptKeyBeforeDispatching

Repro:
 - Open power menu
 - Press home
 - Observe: does not go home

Change-Id: I56cb33b95e2b7d5ee378b0e1b8ce7bc6bbd5e757
(cherry picked from commit d2c7133f52cd20ce6afcff3d36c528775a24bab2)
(cherry picked from commit 5db942f0045a2b6e863aa9fb3e77d424d147c315)

7 years agoOnly go HOME if screen is fully awake
willl03 [Mon, 8 Dec 2014 16:13:28 +0000 (11:13 -0500)]
Only go HOME if screen is fully awake

Avoid going home when hardware home button is used to wake the device on an insecure keyguard

Change-Id: I5d5d8c4fff76967c29e70251f7b165205005ba11

7 years agoProperly clean up when setting new InputFilter.
Matt Garnes [Thu, 12 Mar 2015 23:11:14 +0000 (16:11 -0700)]
Properly clean up when setting new InputFilter.

In f1b93471565c43e57e9e199596d51f7caaec8ebd, the single InputFilter that
is set in InputManagerService was replaced with a chain of filters that
are all listening for InputEvents.

The original field mInputFilter was replaced in this patch but not
removed. When a new InputFilter is added, we check that this unused
field mInputFilter != null before doing necessary teardown of the previous
filter. Since this is always null, this causes the previous filter to
not be disconnected when a new one is set with setInputFilter().

If the user toggles "Magnification Gestures" on and off twice in Accessibility
Settings, this will send the old and new InputFilters into a loop
sending and receiving touch events, locking up the device completely
until reboot.

Remove all references to the unused mInputFilter field.

Change-Id: I6ef67a664f1e783f3f0402b7c2a0984499a4b614

7 years agoSettings: Don't attempt to forward writes from System -> Secure.
Adnan [Fri, 27 Feb 2015 01:57:29 +0000 (17:57 -0800)]
Settings: Don't attempt to forward writes from System -> Secure.

  This breaks 3rd party apps since they can't get access to
  WRITE_SECURE_SETTINGS.

Change-Id: Ibf27f3e5f9194dd4380d8c59dce9b36c3408e0e6

7 years agoFix comment block in Settings declaration, breaks checkapi
Raj Yengisetty [Thu, 19 Feb 2015 21:09:47 +0000 (13:09 -0800)]
Fix comment block in Settings declaration, breaks checkapi

Change-Id: I4ce5cb4ef36e572203b423eed162563a8b1c714f

7 years agoEnable Buttons and Status Bar settings Multi-user enabled
linus_lee [Thu, 5 Feb 2015 23:47:37 +0000 (15:47 -0800)]
Enable Buttons and Status Bar settings Multi-user enabled

The main issue is SystemUI process is shared across users, so calling getString(...)
will call UserHandle.myUserId() which will return the user id of the process.
To fix this, all relevant calls should be changed to get*ForUser as well as listen
to UserChanged event so that when the user switches, the settings are updated

Change-Id: I9ac3fbfec1646993028c34789a4299d85079f8f1

7 years agoGlobalActions: Always add power off option to power menu
Dave Kessler [Wed, 18 Feb 2015 08:27:58 +0000 (10:27 +0200)]
GlobalActions: Always add power off option to power menu

Change-Id: I3083cda3b8c665a65f1260984a5be41faa384510

7 years agoSystemUI: add Weather display to status bar header
Roman Birg [Fri, 12 Dec 2014 01:41:40 +0000 (17:41 -0800)]
SystemUI: add Weather display to status bar header

Change-Id: Ic2fea861c36f405d8a0e64cc9224f47088ac6351
Signed-off-by: Roman Birg <roman@cyngn.com>
frameworks: fix make updateapi for weather setting

Change-Id: I3a23cd432138e63e037b427ceaf62a87627dfde6
Signed-off-by: Roman Birg <roman@cyngn.com>
7 years agoSystemUI: make clock and time clickable in statusbar
Roman Birg [Mon, 1 Dec 2014 22:05:52 +0000 (14:05 -0800)]
SystemUI: make clock and time clickable in statusbar

Clicking clock opens alarms, clicking the date will open the calendar.

Change-Id: I622527c1f144a8867aa543348b70a4fefe3f6403
Signed-off-by: Roman Birg <roman@cyngn.com>
7 years agoLeft handed navbar during landscape mode
Shuhao Wu [Tue, 23 Dec 2014 16:30:14 +0000 (16:30 +0000)]
Left handed navbar during landscape mode

This patch allows for the navbar to be moved to the left side of the
screen during landscape mode. Left handed people are more used to this
option.

This patch must go with another patch that changes
packages/apps/Settings

Screenshot: http://i.imgur.com/jWqJcEV.png

Change-Id: Ic95e3fda1f55efd2ec908c8d7226e638ec0ab80a

Expanded Desktop : Fix Left handed navbar during landscape mode

from http://review.cyanogenmod.org/#/c/57454
when you enable expanded desktop and left handed navbar.
you need to swipe from right edge to show navbar.
but this patch will change to swipe from left edge to show navbar.
Video avalible at http://youtu.be/rUy14LQj9iE

Patchset2 : change tab to whitespace
Patchset3 : remove \r after @override in PhoneWindowManager.java
Patchset4 : Update commit message
Patchset5 : Address code formating comments
Patchset6 : Whitespace

Altaf-Mahdi
Add left gesture for edge gesture service

Change-Id: I65a15c6f5e662e429a818484de6b71e81c7ae713

7 years agosystemui: Forward-port notification counters
Steve Kondik [Fri, 5 Dec 2014 16:31:29 +0000 (08:31 -0800)]
systemui: Forward-port notification counters

 * Port from CM11

Change-Id: Id9d0954acffd00bdb470b9eccbdb3b45fbd995c1

7 years agoPower menu customizations [1/2]
DvTonder [Fri, 14 Nov 2014 17:44:49 +0000 (09:44 -0800)]
Power menu customizations [1/2]

power
reboot
screenshot
profile switcher
airplane mode
user switcher
bug reports
sound modes

[mikeioannina]: Modify for CyanogenMod

framework: Add advanced reboot options (2 of 2)

This commit is an squash of the commits below and re-adds the reboot
logic to CM.

I took the liberty to rewrite some of the ShutdownThread code because
it had some lingering issues present since I originally wrote this
for CM7 (!!). Namely, the reboot reason was being changed when the items
are pressed instead of when the user presses the positive button. This
made some people add workarounds like handling back button presses and
whatnot, these are gone now.

commit 588464bea40b92b04c4aeee35c47f7becceeed56
Author: Roman Birg <roman@cyngn.com>
Date:   Thu Jul 10 14:20:42 2014 -0700

    advanced reboot: add soft reboot option

    Adds a "Soft reboot" option which restarts zygote, as requested in JIRA
    CYAN-3998

Signed-off-by: Roman Birg <roman@cyngn.com>
    Conflicts:
        core/res/res/values/cm_arrays.xml
        core/res/res/values/cm_strings.xml
        services/java/com/android/server/power/ShutdownThread.java

commit 3e7b92551bbf818ace41cd9b9532473ed7d18f2f
Author: Veeti Paananen <veeti.paananen@rojekti.fi>
Date:   Tue Jul 23 16:34:35 2013 +0300

    Show advanced reboot if using an insecure lock screen

    Enables the advanced reboot menu when locked if the selected lock method
    is insecure (= slide unlock).

    Conflicts:
        services/java/com/android/server/power/ShutdownThread.java

commit cf42ed3993d5d05c9b2591883fefb6338fbcdd40
Author: DvTonder <david.vantonder@gmail.com>
Date:   Thu Feb 21 18:20:01 2013 -0500

    Framework: Show the Advanced reboot menu only for the primary user

    Conflicts:
        services/java/com/android/server/power/ShutdownThread.java

commit 08aa6fd643e0359114b86f50053921dd2d86fc50
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Mon Nov 4 03:37:40 2013 +0000

    Framework: Add Advanced reboot (2 of 2)

    This commit responds to a setting in Development settings for including
    options in the power menu for rebooting into recovery or bootloader. It
    is defauled to off.

    When enabled, the Advanced reboot options will only be available once the
    device is unlocked.

Enhance power menu reboot option

* Use our old reboot icon
* Set correct dialog title & message when rebooting
* Move strings to cm_strings
* Add back reboot_download string used by samsung devices
* Remove Chinese translations, will be handled through crowdin

policy: Remove references of Profiles in android.policy.

  We can't reference the CMSDK within a jar that is exported in the
  BOOTCLASSPATH, otherwise we end up overriding the 3rd party
  applications classloaded jar and causing various issues during
  runtime.

Change-Id: Ia0b7950d17bb7450347b57d8a423c44df982b195

7 years agocore: Update PREVENT_POWER_KEY permission for M
Michael Bestas [Thu, 3 Dec 2015 21:55:26 +0000 (23:55 +0200)]
core: Update PREVENT_POWER_KEY permission for M

Change-Id: Iac053a317314fad08545c8dc411ad44f977b8f3e

7 years agoCamera : allow camera to use power key as shutter
Danesh M [Fri, 30 Nov 2012 03:26:21 +0000 (22:26 -0500)]
Camera : allow camera to use power key as shutter

Provides a way for an app to take control of the power key.
Used by the camera to make the power key control the shutter.

Change-Id: I85a1e1761199f4604672be42a3a5005227f5451a
(cherry picked from commit 15661444ae1faea831218f0c936b756de2f0698b)

Prevent power key capture when screen is off

The ability for an activity to capture the power key, which was
added to support power key as shutter in the camera, should only
allow the capture when the screen is on. Otherwise, if an activity
that captures the power key is to the front when the device turns
off, the user will be unable to turn it back on.

Change-Id: Ib119d6914ec72554b404c1cc17eef3a932d5d402

7 years agoFramework: Generic Blacklist support (4 of 5)
DvTonder [Fri, 14 Nov 2014 17:44:50 +0000 (09:44 -0800)]
Framework: Generic Blacklist support (4 of 5)

Change-Id: Id6c85c9a537713ec77d00deb7f7fe5a9150be2cd

frameworks: add blacklist call logging (1/3)

Change-Id: Id3413a298ba1bdf2ecdcc256d02fda85c3221bb6
Signed-off-by: Roman Birg <roman@cyngn.com>
frameworks: fix Blacklist support for L (3/3)

Change-Id: Ide9847344dd1260cc4d8e4fa5c6b461ea7aa3ded
Signed-off-by: Roman Birg <roman@cyngn.com>
framework: add blacklist disconnect cause

Constant to be used when marking a Call as blacklisted.

Change-Id: If8e0ba7a2fb9b3ebbcfde04df48cd0ab14bba864
Signed-off-by: Roman Birg <roman@cyngn.com>
Fix blacklist unknown number mode query string.

The same was string was being used to query the database for both private and
unknown numbers, with the effect that enabling private number blocking also
blocked unknown numbers.

Change-Id: I5a77566fde3187ff6044415c64e74ce4e10cd4dc

base: Add blacklist provider permission

Change-Id: I4febc2c0aa1a690d607b2a459e2d60d30ecf5abf
JIRA: CYAN-3727
Issue: https://jira.cyanogenmod.org/browse/CYAN-3727
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
base: add back permission-group SECURITY  to fix blacklist

  This will allow READ|CHANGE_PHONE_BLACKLIST
to be accepted by system. CM's MMS app should
work fine now.

Original commit message:

base: Add blacklist provider permission

JIRA: CYAN-3727
Issue: https://jira.cyanogenmod.org/browse/CYAN-3727
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Change-Id: Id911dcf40a509b2233cae3964802531f5b0d55c1

7 years agoSystemUI: Add global reboot option
haiyangl [Fri, 8 Aug 2014 03:32:16 +0000 (11:32 +0800)]
SystemUI: Add global reboot option

Add global reboot option when long press power key and confirmation dialog
when user chooses to reboot device

Change-Id: I23286cb655a4fead8dfc450f08f27d9588e47686

7 years agoSystemUI : Port forward statusbar brightness control
Danesh Mondegarian [Mon, 11 Nov 2013 07:30:56 +0000 (23:30 -0800)]
SystemUI : Port forward statusbar brightness control

Brings back the status bar brightness control from cm-10.2/cm-11

Change-Id: Icc04e7da3286e9925f8b90528c1e022b33d33e9d

SystemUI: improve brightness slider behavior

Mimic the brightness slider behavior in the statusbar.
This adds logic to make the statusbar slider also work with automatic
brightness mode enabled and it will instead adjust the temporary automatic
brightness overrride.

Change-Id: I78814a785decc83df94844fcc2f489c8cbec2b65
Signed-off-by: Roman Birg <roman@cyngn.com>
SystemUI: status bar brightness: store value as int

Non-automatic brightness value is stored as int, not float.

Symptom: adjust the brightness in the status bar, the brightness
         slider in the notification bar will always be set to full

Change-Id: I5f9a6e97bae2c44c3aff7c9222186a6dbda5d902

7 years agoRuntime toggle of navbar
Timo Wendt [Thu, 30 Aug 2012 09:18:41 +0000 (12:18 +0300)]
Runtime toggle of navbar

This adds the framework support for enabling the Navigation bar
on devices with hardware keys. It is toggled from Settings, and
depends on device-specific support for the KeyDisabler hardware
control

Change-Id: I88fecb2ca1e8613591c327a93f53909b00239cd8

wm: Nullify hardkey function assignments if enabling the navbar

This caused erroneous (and sometimes duplicate) events being generated
due to the regular key function assignments. The navbar does its
own action management, so don't try to derive from the actions
usually present in hard keys.

Change-Id: I82866e24547f8145cac4f07820ae90aacce09281

Update DEV_FORCE_SHOW_NAVBAR constant.

Change-Id: Ie5b4317162c514d22276956f81007e064a3d0f32

Settings: Move DEV_FORCE_SHOW_NAVBAR load to loadSecureSettings.

Change-Id: I6ac53b8c9f7fce6f9ca6b4ad7bf31a1c1e896863

7 years agoRotation related corrections
eray orçunus [Mon, 22 Jun 2015 19:47:40 +0000 (22:47 +0300)]
Rotation related corrections

- There are some conditions deleted while placing rotation angles code, I added them.

- Rotation lock was screwed up since CM 12. Fixed it by fetching allowed rotations from CM's
allowed rotations setting.

- Also, a CAF commit had killed rotation lock ability.

Change-Id: I8f1b468249c68e7b6514d1a96bdb3fc638af84fd
Signed-off-by: eray orçunus <erayorcunus@gmail.com>
7 years agoAdd overlay option for Settings.System.ACCELEROMETER_ROTATION_ANGLES
Howard M. Harte [Sun, 12 Apr 2015 19:07:49 +0000 (12:07 -0700)]
Add overlay option for Settings.System.ACCELEROMETER_ROTATION_ANGLES

Change-Id: Icd5e47051554a7b2464e4fbdaac868aafda7b853
(cherry picked from commit 6bfea6065178a29d4622a89e2944c16e086923b1)

7 years agoConfigurable 0, 90, 180 and 270 degree rotation
Ricardo Cerqueira [Mon, 4 Nov 2013 01:56:16 +0000 (01:56 +0000)]
Configurable 0, 90, 180 and 270 degree rotation

Change-Id: Ia1859c51d71ef9d01cec2d13c6468ed89c6ac53e
Contributor: jonasl

- Add system setting

Change-Id: Ia7bf8cb64258e1d602230a8f9ea227d3b56a4dab

7 years agoForward port 'Swap volume buttons' (1/3)
nadlabak [Sat, 20 Dec 2014 21:56:55 +0000 (23:56 +0200)]
Forward port 'Swap volume buttons' (1/3)

[mikeioannina]: Adjust for 5.0 changes

Change-Id: I1b45da63b815aa1b3ddf7cda2b7afb0872ab433f

7 years agoframework: port IME selector notification toggle (2/2)
Aaron Echols [Fri, 28 Nov 2014 23:39:26 +0000 (18:39 -0500)]
framework: port IME selector notification toggle (2/2)

Change-Id: Ia35960d88468dba44cdfad26c7cc74f811a6844f

framework: fix 'port IME selector notification toggle'

Change-Id: I7801cc9edc2341c447e2c3eafd9344216eb6c0c6

7 years agoKeyguard: Fix scramblepin logic.
Adnan Begovic [Wed, 5 Aug 2015 23:21:27 +0000 (16:21 -0700)]
Keyguard: Fix scramblepin logic.

Change-Id: I71e6d26e853fa7bfaeea4b3256902881ac7f74fc

7 years agoKeyguard: Don't disable visibility when scrambling pin.
Adnan Begovic [Wed, 5 Aug 2015 17:40:41 +0000 (10:40 -0700)]
Keyguard: Don't disable visibility when scrambling pin.

  Otherwise the first numbers text is flipped to invisible
  even though it shouldn't be.

Change-Id: Ia2b80d594e7f11af7a60a85bdb4ea9909d0ac20b

7 years agoKeyguard: Add option to scramble pin layout when unlocking (2/2).
Adnan [Mon, 4 Aug 2014 00:00:20 +0000 (17:00 -0700)]
Keyguard: Add option to scramble pin layout when unlocking (2/2).

Change-Id: Ibe8611eb0b8a5bd9275bc96682d2cbafaa37d8f5

Add global scramble pin layout setting.

Change-Id: I87e6baf041644cdde55fef34f4032c6950ac428f

Keyguard: Fix bad merge from 12.0 on pin scramble.

Change-Id: Ia9ee6bd43c45228ec7042ef8300ff9ca6f92f60f

7 years agofw: Utilize CMSettings for specific buttons settings.
Adnan Begovic [Fri, 6 Nov 2015 22:05:14 +0000 (14:05 -0800)]
fw: Utilize CMSettings for specific buttons settings.

Change-Id: Ie42d08a2a024634f9e0482e15d809c05ae16c681

7 years agoButtons: Allow setting default long-press app switch behavior
Kra1o5 [Mon, 25 May 2015 10:22:48 +0000 (12:22 +0200)]
Buttons: Allow setting default long-press app switch behavior

Enables the ability to assign different default actions to longpress on
the app switch button.

Change-Id: I6fa124d4ad97d1014f9f71052abf5c6081cf6ef0

7 years agoCamera button support
HazouPH [Sun, 7 Jun 2015 18:58:52 +0000 (20:58 +0200)]
Camera button support

Add support for camera button

Based on commit http://review.cyanogenmod.org/#/c/51487/

This patch adds:
- Use camera button as wake key
- Use focus button as peek and wake key
- Use camera button to launch (secure) camera

Depends on:
[2/2] Camera button support in packages/apps/Settings

Change-Id: Ia515c04cca098bf0d20b077ebffc079ee4008f21

7 years agoIf a wake key is disabled by the user, do not wake from doze.
Matt Garnes [Tue, 31 Mar 2015 21:39:38 +0000 (14:39 -0700)]
If a wake key is disabled by the user, do not wake from doze.

Currently, any wake key will wake the device from a doze, even if that
key has not been enabled as a wake key in Settings.

If the device is 'dreaming' in the Doze state, check if the user has
explicitly disabled the wake key (or never enabled the setting in the
first place) before waking the device.

Change-Id: I7397087c143161e8e1ddb84d0e23f6027fea0aac

7 years agoAndroid Policy: handle volume key event as wake key when preference is set
Martin Brabham [Wed, 3 Dec 2014 19:48:28 +0000 (11:48 -0800)]
Android Policy: handle volume key event as wake key when preference is set

Change-Id: If9a61cd65553bf00f0efda1a75b1ab75b9129090

7 years agoCleanup button wake settings (2/2)
Michael Bestas [Thu, 18 Dec 2014 02:26:38 +0000 (04:26 +0200)]
Cleanup button wake settings (2/2)

Change-Id: Ie37136cbd57c4c334321abbfa4543727e940bc43

Keep quiet when volume keys are used to wake up device

- Userspace will make a 'beep' with it receives a key up, so
  consume that event as well.
- Removed wake key check in music control code as it will already
  be disabled here.

Change-Id: I93839acd39aec8a2ee40291f833a31f6b048c9f8

Wake Keys: enforce the wake keys overlay

* Keys disabled as wake keys by the overlay were
  still being allowed to wake the device. This change
  enforces the hardwareWakeKeys settings.

Change-Id: Ifde0491b2de64a7f61a101cf22f5589cb5e841e2

Allow disabling Search/Recents button wake (2/2)

Change-Id: I6a2ac064efc4fe85413bf0b935c28aa7bde5d672

7 years agofw/base: allow home button to wake device [1/2]
Danny Baumann [Mon, 1 Dec 2014 05:04:37 +0000 (23:04 -0600)]
fw/base: allow home button to wake device [1/2]

Change-Id: I2b79561dcfa7e569b2e24bbabfffb11517d4d313

7 years agoFramework: Forward port Long press back to kill app (2/2)
Danesh Mondegarian [Mon, 17 Nov 2014 04:26:45 +0000 (22:26 -0600)]
Framework: Forward port Long press back to kill app (2/2)

Change-Id: Ia88d8a2753e203afb8d6117a643c33127f991c4a

7 years agoFix volume key music controls and wake up
Michael Bestas [Thu, 18 Dec 2014 12:43:22 +0000 (14:43 +0200)]
Fix volume key music controls and wake up

- Forward port code from cm-11.0 and adjust for 5.0
- Fix not being able to adjust volume when music control is on
- Disable screen off volume/music control when wake key is enabled

Change-Id: Ie0ad83965c41fd33120490c25a4ff3d9b2cbeb37

7 years agoSettings: Forward Port Volume Long Press Skip Tracks (1/2)
Austin T. Conn [Wed, 17 Dec 2014 18:28:00 +0000 (13:28 -0500)]
Settings: Forward Port Volume Long Press Skip Tracks (1/2)

Bring Forward Volume Rocker Track Change

Requires Settings Change
http://review.cyanogenmod.org/#/c/82222/

Change-Id: I70b00e08fe48707110725dd1daa56b1e48d15a03

7 years agoFramework: Volume key cursor control (1/2)
Konsta [Mon, 20 Aug 2012 07:39:57 +0000 (10:39 +0300)]
Framework: Volume key cursor control (1/2)

This feature is moved to framework so it also works with third
party keyboards.

Change-Id: I8e20240e7bee5351ab20bb3d701eb95a5fd3e112