OSDN Git Service

android-x86/frameworks-base.git
6 years agoFix security hole in GateKeeperResponse.
Charles He [Fri, 14 Jul 2017 13:41:06 +0000 (14:41 +0100)]
Fix security hole in GateKeeperResponse.

GateKeeperResponse has inconsistent writeToParcel() and
createFromParcel() methods, making it possible for a malicious app to
create a Bundle that changes contents after reserialization. Such
Bundles can be used to execute Intents with system privileges.

This CL changes writeToParcel() to make serialization and
deserialization consistent, thus fixing the issue.

Bug: 62998805
Test: use the debug app (see bug)
Change-Id: Ie1c64172c454c3a4b7a0919eb3454f0e38efcd09
(cherry picked from commit e74cae8f7c3e6b12f2bf2b75427ee8f5b53eca3c)

6 years agoEnforce policy for camera gesture in keyguard
Tony Mak [Fri, 28 Jul 2017 10:53:56 +0000 (11:53 +0100)]
Enforce policy for camera gesture in keyguard

Test:
1. Set lock screen, set keyguard policy. Lock the device.
   Observe that double tap is not showing camera

2. Set lock screen, unset the keyguard policy. Lock the device.
   Observe that double tap is showing camera

3. Unset lock screen (swipe), set the keyguard policy. Lock the device.
   Observe that double tap is showing camera.

4. Unset lock screen (swipe), unset the keyguard policy. Lock the device.
   Observe that double tap is showing camera.

Bug: 63787722
Merged-In: I104688eaad719528376e2851f837d5956a6a1169

Change-Id: I42e6d9015682998176fe41971356bde22e1b37b2
(cherry picked from commit 65f02e8ba7a9f013d6971b3d6d1bd95f1785cb3d)

6 years agoSystemUI: Cleanup BatteryMeter
Michael W [Sat, 23 Sep 2017 14:27:41 +0000 (16:27 +0200)]
SystemUI: Cleanup BatteryMeter

* Remove unused imports and variables from BatteryMeterView and -Drawable
* Remove some commented stuff about themes

Change-Id: Iab057e510a4478ac1f026f004eef9d6f46e6032f

6 years agoSystemUI: Improve battery icons
Michael W [Sat, 23 Sep 2017 13:39:11 +0000 (15:39 +0200)]
SystemUI: Improve battery icons

* When the battery saver is on, always show the percentage (if option is
  set)
* Change color of exclamation mark when the battery saver is on so it's
  visible

Change-Id: Ia7e6bc05225b131aaa62370314b035f2b874b5ec

6 years agoRevert "Camera: ignore torch status update for aux or compsite camera"
Eric Meddaugh [Fri, 29 Sep 2017 21:53:56 +0000 (21:53 +0000)]
Revert "Camera: ignore torch status update for aux or compsite camera"

This reverts commit 92add565cf47afc67fbb8b709bb45bd687126c3c.

Causes soft reboots for devices with more than 2 cameras.

Change-Id: I687488f3de9e28854785fc44fd1ce24ce01be02a

6 years agoSystemUI: Hide ambient display tile if device does not support it
Michael Bestas [Sun, 17 Sep 2017 19:51:15 +0000 (22:51 +0300)]
SystemUI: Hide ambient display tile if device does not support it

* Add a check similar to the Settings app

Change-Id: I603cd28b8dd1fadff9ffcfb6953c7b72514b5857

6 years agoDon't crash when checking if components are protected
Gabriele M [Mon, 25 Sep 2017 09:29:38 +0000 (11:29 +0200)]
Don't crash when checking if components are protected

intent.getComponent() can be null, but isComponentProtected() expects
a valid object. Add a null pointer check and don't treat the app as
protected if null.

Fixes 15360dfe60a2c81187e4edcaf08679100260e2f9
("Always hide protected apps from the recent tasks list")

Change-Id: I2e0ccdfb9ded7aa32305bc2ac97e0950940d186b

6 years agoSystemUI: locked tasks should have a valid view
thecrazyskull [Sat, 9 Sep 2017 15:03:18 +0000 (17:03 +0200)]
SystemUI: locked tasks should have a valid view

If the view doesn't exist, the card won't be able to receive touch
events. We need those touch events to have a bounce-back animation
when trying to swipe away a locked card.

Change-Id: If7b3c5e5094d2752926eb306dd54264da0ceaa3e
Signed-off-by: Joey Rizzoli <joey@lineageos.org>
6 years agoSystem Profiles in QS Tiles
Roman Birg [Thu, 22 Jan 2015 19:21:56 +0000 (11:21 -0800)]
System Profiles in QS Tiles

Change-Id: I2a438af301212241533b969bf2c6c8390ef09cbc

6 years ago[1/3] SystemUI: add burnIn protection setting
Park Ju Hyung [Sat, 14 Jan 2017 18:33:04 +0000 (03:33 +0900)]
[1/3] SystemUI: add burnIn protection setting

Devices with OLED display suffer from
status-bar's notification items and nagivation bar's software keys
causing permanent burn-ins when used long-term.

Moving all items in the area
both horizontally and vertically workarounds this problem.

jrizzoli: integrate with runtime cmsdk preference

Change-Id: I35b04d1edff86a556adb3ad349569e5d82653f16
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
Signed-off-by: Thecrazyskull <anaskarbila@gmail.com>
Signed-off-by: Joey Rizzoli <joey@lineageos.org>
6 years agoAutomatic translation import
Abhisek Devkota [Mon, 18 Sep 2017 18:47:33 +0000 (11:47 -0700)]
Automatic translation import

Change-Id: I73e8fe40dcc6d8412dc5fe5497a28a02de8b36d8

6 years agoSystemServer: Don't start widget service when it is alarm boot
Mao Jinlong [Tue, 1 Aug 2017 11:27:01 +0000 (19:27 +0800)]
SystemServer: Don't start widget service when it is alarm boot

In alarm boot mode, only power off alarm apps are installed. If
starting widget service in alarm boot mode, the widget record will be
changed. So don't start widget service when it is alarm boot.

CRs-Fixed: 2082007
Change-Id: I3d1b1882cac7eb76fb09684811bb01a96fbc7f62

6 years agoActivityManager: Remove POWER_OFF_ALARM intent leftover
Michael Bestas [Fri, 8 Sep 2017 13:42:57 +0000 (16:42 +0300)]
ActivityManager: Remove POWER_OFF_ALARM intent leftover

Change-Id: I7768b7d93803aa84416ad4f63f15bfcf0f13c46e

6 years agoAlways hide protected apps from the recent tasks list
Gabriele M [Sat, 22 Jul 2017 11:28:06 +0000 (13:28 +0200)]
Always hide protected apps from the recent tasks list

If a protected app is started by a protected component manager, it
will be available in the recent tasks list. This allows to bypass
the protection since restarting an app from recents doesn't require
authentication. Fix this changing the flags of the activity so that
it's never added to the recent tasks list.

This change also ensures that apps don't add entries to the recent
tasks list: a protected component that starts a new instance of
itself it's treated like a protected component manager and therefore
its entries are not removed from the recent tasks list.

Change-Id: Ib44b392cc9c27ec2b7c8f16735c38ee45011be3e

6 years agoRecents: Add accessibility descriptions for lock ImageViews
Harry Youd [Sun, 27 Aug 2017 19:29:57 +0000 (21:29 +0200)]
Recents: Add accessibility descriptions for lock ImageViews

Change-Id: I09ce342ce135017294f5a4197b7e52dded3fb17e

6 years agoSystemUI: Add separate pref screen for the status bar tuner
Gabriele M [Sat, 16 Sep 2017 17:35:38 +0000 (19:35 +0200)]
SystemUI: Add separate pref screen for the status bar tuner

Keep the status bar preferences separate and allow to start them
directly without loading the main tuner fragment.

Change-Id: Ie1a0d9395b7bc01d585616a1976adeda3c457a0d

6 years agoSystemUI: Revert some Tuner changes
Gabriele M [Sat, 16 Sep 2017 17:35:28 +0000 (19:35 +0200)]
SystemUI: Revert some Tuner changes

These changes were done to start the status bar tuner directly without
showing the main Tuner screen. However, they negatively affect the
management of the fragments. Revert them so that a different solution
can be implemented in a follow-up change.

This reverts the following commits:

 - 338de6728d8910d450f8962a44bbe69feba1ced4
   "Handle onOptionsItemSelected for TunerActivity"

 - b3eba6af8e3253efc1332b55821fd08e4fbf77b0
   "SystemUI: Remove nav bar and status bar options from SystemUI Tuner"

 - 82b9f95f761e7b5cc94ea2542b30460e48f8fb02 (partially)
   "systemui: Fix a few issues with Tuner"

BUGBASH-661

Change-Id: I35182248566ff31ed08d2836d66d5bd3f947ee9a

6 years agoBack-port fixes for b/62196835
Phil Weaver [Wed, 12 Jul 2017 21:04:16 +0000 (14:04 -0700)]
Back-port fixes for b/62196835

Bug: 62196835
Test: Created an accessibility service that displays a system
and a toast overlay, confirmed that it disappeared when we
reached the accessibility permission screen that uses this
flag.

Change-Id: Ic51ead670fc480e549512ba1d02f49d9c13bc3f0
(cherry picked from commit 41ff5389daa6e6ce4aa853bfae96e5ced0b1d8df)

6 years agoDon't disable the GPS prematurely
Gabriele M [Wed, 30 Aug 2017 22:25:21 +0000 (00:25 +0200)]
Don't disable the GPS prematurely

Since commit b2b4489760230258d23f72f8f8dd643b09cd5b04
("Use SystemClock.elapsedRealtime() to calc TTFF") mLastFixTime
stores the time since boot rather than the current real time.

REGRESSION-1032

Change-Id: I39474a66c6d7dbd9ca0ff50a5a1b9c06007725c4

6 years agoPrivateStorageInfo: Exclude primary physical volume total space
Dominggoes Isakh [Tue, 25 Jul 2017 20:57:17 +0000 (22:57 +0200)]
PrivateStorageInfo: Exclude primary physical volume total space

BUGBASH-355

Change-Id: If811545e352d7e499630e11e7583d643e1510431

6 years agoKeyguard: Change fingerprint listening behavior
Paul Keith [Sat, 19 Aug 2017 15:45:21 +0000 (17:45 +0200)]
Keyguard: Change fingerprint listening behavior

* This patch affects devices that disable fingerprint
  wake-and-unlock via config_fingerprintWakeAndUnlock,
  and is mainly for fp scanners in the power button
* Don't listen to fingerprints when going to sleep
  to avoid a wakeup being triggered after pressing
  the power button to turn the screen off
* Fixes the following scenario:
 - Turn device on with not registered finger
 - Check time (or something on lock screen)
 - Use registered finger to turn off device,
   and leave finger on the scanner
 - Device screen turns off
 - Device wakes up at home screen

Change-Id: Ia40a6a763420cd716796515ddb9b816232218dc0

6 years agoAllow to ignore presentation indicator of outgoing calls [1/3]
Gabriele M [Thu, 3 Mar 2016 20:16:40 +0000 (21:16 +0100)]
Allow to ignore presentation indicator of outgoing calls [1/3]

With some mobile network operators, the presentation indicator of
outgoing calls is always set to either "unknown" or "restricted".
As consequence, the dialed number doesn't show up in clear in the
call history. Allow to ignore the presentation indicator of outgoing
calls to never hide the dialed numbers.

Change-Id: Ia40de2ce40fee5068f82abd69595b34d2596caae

6 years agoUse SystemClock.elapsedRealtime() to calc TTFF
Yingjie Wang [Mon, 13 Mar 2017 04:03:20 +0000 (12:03 +0800)]
Use SystemClock.elapsedRealtime() to calc TTFF

SystemClock.elapsedRealtime() returns milliseconds since boot, and
is less vulnerable to system time issue.

Change-Id: I01c2c1205c4306c6d8ce62875ff1295001ed8491
CRs-fixed: 2015708

6 years agoTweak Privacy Guard dialog layout
Veeti Paananen [Wed, 16 Aug 2017 21:24:26 +0000 (00:24 +0300)]
Tweak Privacy Guard dialog layout

Make the "remember choice" check text clickable. Adjust margins to match
Material spec. Remove crazy table layout.

Change-Id: Ibeabdf693dc9273ba80f21fab399868fecac9054

6 years agoAutomatic translation import
Abhisek Devkota [Sat, 19 Aug 2017 22:34:09 +0000 (15:34 -0700)]
Automatic translation import

Change-Id: I92ceaa006a8c4b411afcc271384679d2f36ca1a3

6 years agoPowerManager: Allow to distinguish different keypresses
Corinna Vinschen [Sat, 12 Aug 2017 11:42:58 +0000 (13:42 +0200)]
PowerManager: Allow to distinguish different keypresses

* Use keypress info to exclude pressing volume keys from
  illuminating HW buttons in config_buttonLightOnKeypressOnly
  mode.

Change-Id: I6bfc7ddd075e12e1ad10c3663a63e80c8d7f983d
Signed-off-by: Corinna Vinschen <xda@vinschen.de>
6 years agoAdd @hide annotation to the privacy guard ops set
Gabriele M [Fri, 18 Aug 2017 17:36:48 +0000 (19:36 +0200)]
Add @hide annotation to the privacy guard ops set

Otherwise the system API check fails.

Change-Id: I75c096ee22cc15577f7887bd900667c2a6b213d5

6 years agoChange visibility of the Privacy Guard ops set
Gabriele M [Sun, 6 Aug 2017 11:08:33 +0000 (13:08 +0200)]
Change visibility of the Privacy Guard ops set

Change-Id: Iafcf058f5e2074982bf45f8c82ef8d027b9358f0

6 years agoCamera2: Fix Error Callback if buffer lost.
Shukla Mradul [Thu, 1 Jun 2017 08:08:02 +0000 (13:38 +0530)]
Camera2: Fix Error Callback if buffer lost.

Existing Android Code doesnt provide support to detect
bufferlost callback at App level.

Bug is fixed to add the callback function which will give
callback to App.

Change-Id: If1656fa3835303b22a230753933c650eca58bcc2

6 years agoCamera: ignore torch status update for aux or compsite camera
Gaoxiang Chen [Wed, 12 Apr 2017 12:05:24 +0000 (20:05 +0800)]
Camera: ignore torch status update for aux or compsite camera

Issue:
  we only expose aux and composite camera ids to whitelist app,
  but don't check the whitelist in torch status update.
  So for apps not in whitelist like CTS,
  they might receive extra unexpected torch status update,
  from aux and composite camera, which could cause CTS failure.

Fix:
  Also ignore torch status update, if app not in whitelist.
  It can fixe CTS issues in FlashlightTest.java.

CRs-Fixed: 2033688
Change-Id: I308bccfc027017b590f9f91089d644f7d8a206ff

6 years agobase: audioservice: Set BT_SCO status
Humberto Borba [Wed, 9 Aug 2017 15:11:25 +0000 (12:11 -0300)]
base: audioservice: Set BT_SCO status

It is expected from audio HAL during BT SCO routing.

Signed-off-by: Humberto Borba <humberos@gmail.com>
Change-Id: Ifdf7529ff292e9f73fc820400ccc7b6ac7ad112a

6 years agoSEEMP: Adding auth framework for outgoing SMS messages.
ahmedsh [Thu, 8 Dec 2016 22:18:03 +0000 (17:18 -0500)]
SEEMP: Adding auth framework for outgoing SMS messages.

This change adds the APIs required to register an authorization agent
in order to allow/reject outgoing SMS messages and the core service
that implements the sms security model.

Change-Id: I5f7195dbdf1d6ff9e0bc5b3118d4a585b51bead8

6 years agoPowerManagerService: fix HW button illumination timeout
Corinna Vinschen [Sun, 6 Aug 2017 13:05:54 +0000 (15:05 +0200)]
PowerManagerService: fix HW button illumination timeout

Patch 20a3c7c4e823a89e428997a1c2771c0c4f1d4684, introducing hardware
button backlight on button keypress only, also introduced a bug:

When touching a button and then performing display activity while
the buttons are still on, the buttons would keep lightened up until
the next user interaction, potentially only switched off at the next
screen off timeout.  Also, the buttons were not illuminated on
device wakeup.

This patch fixes it, together with another, long-standing problem:

When touching a hardware button, nextTimeout was set to
now + mButtonTimeout, even if mButtonTimeout is longer than the timeout
determined by the screen off timeout.  To wit, if screen timeout is set
to 15 secs, but button timeout to values > 15 secs.

Change-Id: I8a56f1d1e0138c38ed6fe294e4816a9f7f744f1e
Signed-off-by: Corinna Vinschen <xda@vinschen.de>
6 years agoAutomatic translation import
Abhisek Devkota [Wed, 9 Aug 2017 03:15:08 +0000 (20:15 -0700)]
Automatic translation import

Change-Id: I932e63cc0dbc1e592cc61adbd902d7bf208974a4

6 years agoMerge tag 'android-7.1.2_r29' into cm-14.1
Dan Pasanen [Mon, 7 Aug 2017 23:38:44 +0000 (18:38 -0500)]
Merge tag 'android-7.1.2_r29' into cm-14.1

Android 7.1.2 Release 29 (NJH47F)

# gpg: Signature made Fri Jul 28 13:56:01 2017 CDT
# gpg:                using DSA key E8AD3F819AB10E78
# gpg: Can't check signature: No public key

6 years agoSystemUI: Remove unnecessary brightness icons
qjohn [Sun, 18 Jun 2017 09:28:10 +0000 (16:28 +0700)]
SystemUI: Remove unnecessary brightness icons

Change-Id: I7e60ff73125bd0304f9ca14ad5c5a9ce11ffceda

6 years agoSystemUI: Fix battery meter view blacklist handling
LuK1337 [Sat, 5 Aug 2017 08:42:59 +0000 (10:42 +0200)]
SystemUI: Fix battery meter view blacklist handling

* Fixes /weird padding/ after adding any icon while
  using battery level icon set to text or hidden.

Change-Id: If3468d25d961169b87f43d2c5f7f2e7d2f8dc12f

6 years agoAutomatic translation import
Abhisek Devkota [Fri, 4 Aug 2017 05:46:02 +0000 (22:46 -0700)]
Automatic translation import

Change-Id: Ida033525846eb1096c419751b81f058f0fc8371c

6 years agoAppOps: Fix yet another deadlock
Gabriele M [Thu, 27 Jul 2017 18:18:53 +0000 (20:18 +0200)]
AppOps: Fix yet another deadlock

A = AppOpsService.this
B = PowerManagerService.mLock

Thread 1:
  AppOpsService.noteOperation() (lock A) ->
  PowerManagerService.isInteractive() (lock B)

Thread 2:
  PowerManagerService.acquireWakeLockInternal() (lock B) ->
  AppOpsService.startOperation() (lock A)

Move PowerManagerService.isInteractive() so that 'Thread 1' becomes:
  PowerManagerService.isInteractive() (lock and release B) ->
  AppOpsService.noteOperation() (lock A)

Change-Id: I6b2050bf6deaf6db94b9243c1a81c37e25ad55a2

6 years agoLocationTile: Improve strings
PMS22 [Thu, 20 Jul 2017 15:00:46 +0000 (15:00 +0000)]
LocationTile: Improve strings

- Change the "GPS only" to "Device Only"
  and thus keep aligned with strings in Settings
- Make it two-line as others

Change-Id: I7ea259f1554fb82099d0c18e2f18b23bf21e5a8c
Signed-off-by: PMS22 <prathams99@rediff.com>
6 years agoAutomatic translation import
Abhisek Devkota [Fri, 28 Jul 2017 02:51:59 +0000 (19:51 -0700)]
Automatic translation import

Change-Id: I16604d8c90016956f8d529f1f386ca28c6889632

6 years agoAppOps: Prevent deadlock when making note of applications
Gabriele M [Tue, 25 Jul 2017 16:47:06 +0000 (18:47 +0200)]
AppOps: Prevent deadlock when making note of applications

If noteOperation() is called with ActivityManagerService locked,
AppOpsService won't be able to show the PermissionDialog, causing
noteOperation() to wait indefinitely. Keep a reference to the
current ActivityManagerService instance so that we can check
whether showing the PermissionDialog is safe or not.

Even though there's currently no code path that causes startOperation()
to be called with ActivityManagerService locked, add the same check
there to prevent the same from happening in future.

BUGBASH-17

Change-Id: I118aac6ddf91774a038d73047162cfdb8395e58d

6 years agoAutomatic translation import
Abhisek Devkota [Wed, 26 Jul 2017 03:23:11 +0000 (20:23 -0700)]
Automatic translation import

Change-Id: I98792cbf854f2f705a0b7c53168f695369789b14

6 years agoAutomatic translation import
Abhisek Devkota [Sat, 22 Jul 2017 19:41:07 +0000 (12:41 -0700)]
Automatic translation import

Change-Id: I417037c372b7e809419fba115caf76ba9e18d759

6 years agoBootReceiver: check console-ramoops-0
Mark Salyzyn [Fri, 14 Jul 2017 20:08:47 +0000 (13:08 -0700)]
BootReceiver: check console-ramoops-0

On later kernels /sys/pstore/console-ramoops becomes
/sys/fs/pstore/console-ramoops-0

Test: none
Bug: 63058217
Change-Id: Ia68c0b5741c35cb35f10be6bbce93e0f0c92480f

6 years agoPowerProfile: allow overriding default power profile
Alexander Martinz [Mon, 5 Jan 2015 21:20:05 +0000 (22:20 +0100)]
PowerProfile: allow overriding default power profile

  * override it with ro.power_profile.override

Change-Id: I2b229822b18a54060d577f25c0ddaf5b7e7563b7
Signed-off-by: Alexander Martinz <eviscerationls@gmail.com>
6 years agoScreenCap : Add jpeg support
Danesh M [Fri, 17 Apr 2015 03:00:24 +0000 (20:00 -0700)]
ScreenCap : Add jpeg support

Change-Id: Ibd5050c79774d06f30b2f668160cdeca75f1bc58
(cherry picked from commit c1fd7edd8fc48f3308105df8cc845ec4b6652e17)
(cherry picked from commit 32339bf975f80e5610c44cad608f230c448caf7f)

6 years agoSystemUI: Fix Notification Background Color Issue
mqi [Thu, 18 May 2017 07:19:27 +0000 (15:19 +0800)]
SystemUI: Fix Notification Background Color Issue

Buttons in notification can not be seen for some 3rd party apk.
change the background color to black(#ff1a1a1a) when apk's
targetSdk<19.

Change-Id: I642bc9c1f8de7081eb5b67596923c3a4ce9f6117
CRs-Fixed: 2044424

6 years agoframeworks/base: reduce the setTransactions
Sanjeev Jakkilinki [Tue, 25 Apr 2017 10:47:54 +0000 (16:17 +0530)]
frameworks/base: reduce the setTransactions

reduce the setTransactions from window manager service to
reduce the janks during animations for more numbered layers

Change-Id: Idb7a6d65b0602a6bbee01dc88411f1ebee453515

6 years agoSoundPool: decrease binder call when calling SoundPool.play
yidongh [Wed, 10 May 2017 06:29:44 +0000 (14:29 +0800)]
SoundPool: decrease binder call when calling SoundPool.play

When playing SoundPool, SoundPool will call binder to get service
every time, thus causing delay in SoundPool and performance for
apps/games will be worse.

Remove binder call at the beginning of SoundPool.play.

Change-Id: Ic6b036e5997ef9518bc62689eb1ec62d231fbcb0
CRs-Fixed: 2044501

6 years agoAutomatic translation import
Abhisek Devkota [Sat, 8 Jul 2017 04:19:54 +0000 (21:19 -0700)]
Automatic translation import

Change-Id: Ida2d3d847cbb1793a579b6c15144663942a74b44

6 years agoPowerManagerService: add a config to light up buttons only when pressed
Anas Karbila [Fri, 2 Jun 2017 18:21:32 +0000 (03:21 +0900)]
PowerManagerService: add a config to light up buttons only when pressed

 * Right now capactive, lit hardware keys are being
   lit every time you either touch them or the screen.

   But some devices handle this differently on stock:

   Display touch => buttons not lit
   Buttons touch => buttons lit

 * Thus, add a config in order to make this behavior
   consistent to stock ROMs for some devices.

Change-Id: I3bc214d9062f6762ebe5ab0fff949da0460a0fec

6 years agoMerge tag 'android-7.1.2_r24' into cm-14.1
Dan Pasanen [Wed, 5 Jul 2017 22:30:19 +0000 (17:30 -0500)]
Merge tag 'android-7.1.2_r24' into cm-14.1

Android 7.1.2 release 24

# gpg: Signature made Fri 30 Jun 2017 01:19:30 PM CDT
# gpg:                using DSA key E8AD3F819AB10E78
# gpg: Can't check signature: No public key

6 years agoAutomatic translation import
Abhisek Devkota [Tue, 4 Jul 2017 00:24:37 +0000 (17:24 -0700)]
Automatic translation import

Change-Id: If44a156960f9cf4f3d7f240f850effd2b274c106

6 years agoSystemUI: Fix heads up tile off color
qjohn [Sun, 2 Jul 2017 18:52:50 +0000 (01:52 +0700)]
SystemUI: Fix heads up tile off color

* Should match other icons when disabled.

Change-Id: Iba83c96f395db8b55f9395f74a7fa2285e7587ec

6 years agoAdded show volume panel tile to QS
stofstik [Mon, 17 Aug 2015 15:42:53 +0000 (17:42 +0200)]
Added show volume panel tile to QS

Change-Id: Ic583c24e304d1edc903127237fc9eb5c7eeb7e4d
JIRA: CYAN-6721

6 years agoSystemUI: add USB Tether tile
BestPig [Sun, 1 Feb 2015 02:04:41 +0000 (03:04 +0100)]
SystemUI: add USB Tether tile

Drawables by blunden

Change-Id: Ic44f2b596fe32152f3f722347a855325c52113c6

6 years agoQS: add Sync tile (1/2)
Altaf-Mahdi [Sat, 31 Jan 2015 22:45:50 +0000 (22:45 +0000)]
QS: add Sync tile (1/2)

Change-Id: I0c0bb51e736a01661566f1118f955e32eba96063

6 years agoSystemUI: Add heads up tile (1/2)
Michael Bestas [Tue, 21 Apr 2015 23:15:28 +0000 (02:15 +0300)]
SystemUI: Add heads up tile (1/2)

Change-Id: I0e3cff73752c59d804dcec43b86524c2e8df4f57

6 years agoSystemUI: add caffeine qs tile (1/2)
Keith Mok [Thu, 4 Feb 2016 19:10:22 +0000 (11:10 -0800)]
SystemUI: add caffeine qs tile (1/2)

Change-Id: I5d4aa97ae63fc0bcc40f0fa7d9305efbba091029

6 years agoSystemUI: Readd AmbientDisplayTile.
Adnan Begovic [Sat, 12 Dec 2015 00:16:02 +0000 (16:16 -0800)]
SystemUI: Readd AmbientDisplayTile.

Change-Id: Ie7b93ba0f87d505206b5d60f193c2234d83d7eac

6 years agoSystemUI: Add adb over network tile
Danesh M [Fri, 23 Jan 2015 19:57:52 +0000 (11:57 -0800)]
SystemUI: Add adb over network tile

Change-Id: Ib1fa0c87562ff3a077bf9c7283ce81fc4a8271db

6 years agoAutomatic translation import
Abhisek Devkota [Sat, 1 Jul 2017 05:06:16 +0000 (22:06 -0700)]
Automatic translation import

Change-Id: Ia7bf1d777dc0d056038d0a071ed3f0f5aa1070ec

6 years agoActivityStarter: Fix protected app intents
Gabriele M [Sat, 24 Jun 2017 14:30:28 +0000 (16:30 +0200)]
ActivityStarter: Fix protected app intents

Same as commit 109de5be669a1019ce40738e69614eea8209267b ("base:
instrumentation: fix protected apps intents"), but needed after
d183b09709632145a6c4798fa3f7463b7fe3c9ae ("am: Handle unchecked
activity starts for protected components (2)")

Change-Id: I1f63ace853f97819c4166a534540d8239b158926

6 years agoSystemUI: Make play queue toggle more visible
Sebastian Haderecker [Thu, 15 Jun 2017 23:45:16 +0000 (01:45 +0200)]
SystemUI: Make play queue toggle more visible

Previously the toggle for the media player queue setting was nearly invisible (white on white).
Now it has a more material like Teal color.

Change-Id: I3e88776865dad0a52b3e7a3d4d30846457408fca

6 years agoVolume Panel: Fix Bluetooth music stream icon when muted
Sebastian Haderecker [Thu, 15 Jun 2017 20:44:50 +0000 (22:44 +0200)]
Volume Panel: Fix Bluetooth music stream icon when muted

This fixes the Bluetooth music stream icon not updating
when the volume is decreased to zero with hardware volume buttons.

Change-Id: I280cba64f94bbe2b3566b213f6182b5f654169cf

6 years agoAdd support for the .opus file format
Ayke van Laethem [Sat, 24 Jun 2017 16:32:25 +0000 (18:32 +0200)]
Add support for the .opus file format

The codec and container format are already supported, but not in that
combination. Simply add the file extension as a type of Ogg file (which
it is).

Change-Id: Ia9134a8d1205f73da12f579b3ad62367b2b8d88e
See: https://issuetracker.google.com/issues/37054258

6 years agoBinder: Be forceful about a forceful exit
Narayan Kamath [Wed, 12 Apr 2017 10:50:10 +0000 (11:50 +0100)]
Binder: Be forceful about a forceful exit

We were previously using exit(1) when code servicing an IPC threw
any subclass of Error. That made it much harder to diagnose cases
where that happened because :

- exit runs global destructors, which might prove problematic (see
  linked bug).
- such exits are often due to bugs in application code (things like
  AssertionErrors being thrown) but aren't flagged as such by our
  infrastructure, or by humans for that matter.

To address both issues, use FatalError() so that the runtime can dump
more useful information to the logs before it aborts.

Test: manual
Bug: 36813403
Change-Id: I5826090229109dc7cb19f0c3571c609f990cd36a
(cherry picked from commit d64abfcf93b59500a0dba1626e73861848eb4407)

6 years agoAutomatic translation import
Abhisek Devkota [Fri, 23 Jun 2017 03:55:54 +0000 (20:55 -0700)]
Automatic translation import

Change-Id: I0569555992bc98ddec61d5c770bf98ac32c747b7

6 years agoSystemUI: Fix task lock & freeform buttons placement
LuK1337 [Mon, 19 Jun 2017 23:28:27 +0000 (01:28 +0200)]
SystemUI: Fix task lock & freeform buttons placement

* Get rid of hardcoded margin
* Use proper gravity flags for task lock button

Change-Id: Ib864b23f405ad34a56c37e2d9b9d0d391cf4dc8e

6 years ago[1/3] Torch long press power: add auto-off function
Sam Mortimer [Sat, 24 Dec 2016 21:22:53 +0000 (13:22 -0800)]
[1/3] Torch long press power: add auto-off function

Change-Id: Icdf50082324f8292859f0df8b271e730b02c84e7

6 years agoAapt2: Fix png leak
Andreas Gampe [Fri, 28 Apr 2017 20:51:39 +0000 (13:51 -0700)]
Aapt2: Fix png leak

do9Patch is leaking two rows of data.

Bug: 37782695
Test: ASAN_OPTIONS= SANITIZE_HOST=address m
Change-Id: Ibd2198919cd9c24f2de9f50b23c87753f2190708

6 years agoDestroy Allocation right away on exception
Yang Ni [Fri, 28 Apr 2017 15:49:01 +0000 (08:49 -0700)]
Destroy Allocation right away on exception

Bug: 28053584

To avoid holding the resource (surface) for too long.

Test: CTS on x86_64 emulator
Change-Id: I2fdec107c2a16b7dadbf78a9aee79c33423a3676

6 years agoSymbolComparator operator() is missing const
Yi Kong [Mon, 1 May 2017 17:57:39 +0000 (10:57 -0700)]
SymbolComparator operator() is missing const

Clean up, no functionality change.

Test: build
Bug: 37752547
Change-Id: I7b6f368c0d0776f956a8b99353df7b23cbbc388d

6 years agoStatusBar: Catch OOM caused by third-party icons
Adrian Roos [Tue, 31 Jan 2017 23:10:00 +0000 (15:10 -0800)]
StatusBar: Catch OOM caused by third-party icons

Bug: 31825355
Change-Id: I3e2a8c3da43a572a026ea0bbe1d39234035a4801
Merged-In: I3e2a8c3da43a572a026ea0bbe1d39234035a4801

6 years agoAdopt lockscreen shortcut hint from AOSP
Sebastian Haderecker [Thu, 13 Apr 2017 19:18:21 +0000 (21:18 +0200)]
Adopt lockscreen shortcut hint from AOSP

In AOSP for icons like Camera, Phone or voice assist it says "Swipe from icon for..."
When adding custom lockscreen shortcuts it currently says "Swipe left/right for..."
It would be better if we have some consistency here.

This patch adopts the AOSP hint for all custom lockscreen shortcuts.

Change-Id: I68222750f07daa64fb0ac42eb903317cfad2bc1c
Signed-off-by: Sebastian Haderecker <sebastian.haderecker@gmail.com>
6 years agoMerge cherrypicks of [2413849, 2413760, 2413901, 2413776, 2413658, 2413792, 2413850...
android-build-team Robot [Thu, 15 Jun 2017 19:04:44 +0000 (19:04 +0000)]
Merge cherrypicks of [24138492413760241390124137762413658241379224138502413851241379324138662413738241365924136602413867241386824138852413829241381424138862413921241377724138872413854241388924138902413855241386924137402413816241383124138322413817241389224137972413779] into nyc-mr2-pixel-monthly-release

Change-Id: Ie45c0ee51a7a5d2f9ba6718011d7fc3461825584

6 years agoClose connection before retrying
Marco Nelissen [Fri, 2 Jun 2017 19:16:44 +0000 (12:16 -0700)]
Close connection before retrying

Otherwise the (CTS) server might run out of connections.
Bug: 38391487
Bug: 22771132
Test: build, run CTS, stream music

Change-Id: I92c782a6799ab36eec8df3f7c3217bea667b838a
(cherry picked from commit 46132afee7783665ae12538edd024770dbd93ecb)

6 years agoCaptivePortalLoginActivity correctly gets UserAgent
Hugo Benichi [Tue, 7 Mar 2017 06:10:03 +0000 (15:10 +0900)]
CaptivePortalLoginActivity correctly gets UserAgent

Change I33cbcdab9809c712d998da6d925bdd4e3093f8ff added to the intent
passed from NetworkMonitor to the CaptivePortalLoginActivity an extra
argument to set the UserAgent header of probes done by the
CaptivePortalLoginActivity.

However that extra String argument is not correctly retrieved from the
Intent and instead a null pointer is returned by getParcelableExtra().
Consequently the UserAgent header field is never set.

This patch fixes this bug and replace getParcelableExtra() with
getStringExtra().

It also adds logging of the request header and response header for every
network probes sent by CaptivePortalLoginActivity.

Bug: 3593736732369183
Test: manually tested
Change-Id: If5c463023474ffb0401f3cda5875ccd9fc6f79f9

6 years agoPrettify the captive portal sign-in activity
Hugo Benichi [Wed, 17 May 2017 00:26:30 +0000 (09:26 +0900)]
Prettify the captive portal sign-in activity

- fuses url bar with activity header: url is now the subtitle
- url appears as text and not as editable content
- url only shows host name
- header style is the device default for Settings
- Material progress bar
- progress bar disappears at page load finished
- webview does not jump at page load finished

Bug: 62107381
Bug: 38197949
Test: tested by manually triggering the sign-in activity
Merged-In: Id75023acad04f444dbfc41de56814a09e70cc6f9

(cherry pick from commit a206649a6f66f16cc56db2f4e32b846d9b03501c)

Change-Id: I5c3e5ebac18fef6611c215d04d88ffef67b2b640

6 years agoLocationTile: Behave like other tiles
Michael W [Mon, 12 Jun 2017 17:13:09 +0000 (19:13 +0200)]
LocationTile: Behave like other tiles

* Behave equal to WiFi and Bluetooth Tiles:
  Secondary click enables and disables location

Change-Id: I9767b9f2e812f85c664ff7721ff3d8dc9ba54aca

6 years agoFix a use-of-uninitialized-value warning.
George Burgess IV [Tue, 10 Jan 2017 23:33:57 +0000 (15:33 -0800)]
Fix a use-of-uninitialized-value warning.

This warning was generated by the static analyzer:
warning: The left expression of the compound assignment is an
uninitialized value. The computed value will also be garbage
        *mDirtyMask |= animator->dirtyMask();

This can be fixed by initializing dirtyMask before using it in
AnimateFunctor.

Bug: None
Test: Static analyzer no longer complains about this.
Change-Id: I892749079cf93a012f1bed059a3f0c8bbaed9d7e

6 years agoFix a use-of-uninitialized-value warning.
George Burgess IV [Tue, 24 Jan 2017 23:48:28 +0000 (15:48 -0800)]
Fix a use-of-uninitialized-value warning.

Caught by clang's static analyzer:
frameworks/base/core/jni/android_hardware_SoundTrigger.cpp:660:20:
warning: Assigned value is garbage or undefined
        nHandle[0] = (jint)handle;

Given that we return an error code anyway, we can just set it to 0 and
move on.

Bug: None
Test: Still builds; static analyzer doesn't complain.
Change-Id: I9a5be562a0d96fd6c48bb98eca0867fc754bba63

6 years agoCheck for spurious wake ups
Tom Cherry [Tue, 28 Feb 2017 22:07:09 +0000 (14:07 -0800)]
Check for spurious wake ups

Condition::wait() can spuriously wake up, so we must guard it with
another check to ensure that a given wake was truly due to having
been signaled.

Bug: 34592766
Test: Boot bullhead
Change-Id: Iaa5a0ca6186aea50c51e2c402ef95d7ba861be92

6 years agoReduce hwui CPU time by using glDrawRangeElements
Arun [Mon, 23 Jan 2017 11:41:06 +0000 (11:41 +0000)]
Reduce hwui CPU time by using glDrawRangeElements

The CPU overhead of glDrawElements in the GPU driver is significant
with client-side vertex data (unique per draw call) as the driver has
to calculate the mininimum and maximum indices from the index buffer
in order to evaluate the range of vertex data required. This can be
avoided by keeping track of the min-max in hwui and passing it with
glDrawRangeElements. This requires OpenGL ES3.0 support (which is
already checked for elsewhere in hwui).

Test: manual - visual inspection on fugu (nexus player)

Change-Id: I57bb1ddd239a1032f74f1cd2683bbe0970e84bd9

6 years agoStop holding mProxyLock while downloading PAC script data.
Daichi Hirono [Fri, 17 Mar 2017 00:12:12 +0000 (09:12 +0900)]
Stop holding mProxyLock while downloading PAC script data.

Holding PacManager#mProxyLock for long time eventually causes ANR when
launching new applications.

1. ActivityThread#handleBindApplication blocks until

   ActivityThread#handleBindApplication
   -> ConnectivityService#getProxyForNetwork()
   -> ConnectivityService#getDefaultProxy()

  obtains the lock of ConnectivityService#mProxyLock

2. ConnectivityService#mProxyLock can be held by
   ConnectivityService#setGlobalProxy() running on another thread until

   ConnectivityService#setGlobalProxy()
   -> ConnectivityService#sendProxyBroadcast()
   -> PacManager#setCurrentProxyScriptUrl()

  obtains the lock of PacManager#mProxyLock

3. Before the CL, PacManager#mProxyLock could be held by
   mPacDownloader#run() on mNetThread until downloading a PAC script
   completed.

The CL fixes the step 3 so that mPacDownloader#run does not keep the
lock of PacManager#mProxyLock. It eventually fixes long blocking at
ActivityThread#handleBindApplication and ANR when launching an
application.

Bug: 36317236
Test: Build succeeded
Merged-In: I864e41e1142178681f8f1b4fb7750d37e3ab2076
Change-Id: I864e41e1142178681f8f1b4fb7750d37e3ab2076
Signed-off-by: Simao Gomes Viana <xdevs23@outlook.com>
6 years agoFormat Japanese numbers using national format when in Japan.
Tyler Gunn [Mon, 13 Feb 2017 05:26:13 +0000 (21:26 -0800)]
Format Japanese numbers using national format when in Japan.

Similar to the like change for Korean phone numbers, ensure that when the
user is in Japan, Japanese phone numbers are formatted using the national
format rather than the international format.

Test: Unit
Bug: 27090466
Change-Id: I3487eea9fddbe7ee15c03da3f03d53f9dcea0834

6 years agoNullPointerException: Attempt to invoke virtual method 'int android.os.Parcel.dataSiz...
liangweikang@xiaomi.com [Thu, 30 Mar 2017 10:48:35 +0000 (18:48 +0800)]
NullPointerException: Attempt to invoke virtual method 'int android.os.Parcel.dataSize()' on a null object reference

https://code.google.com/p/android/issues/detail?id=285790&thanks=285790&ts=1490870694

Test: null

Change-Id: I0d6d1ce2db8d66d600af89c09f847f4bb5708b49
Signed-off-by: liangweikang@xiaomi.com <liangweikang@xiaomi.com>
6 years agoSystemUI: allow user to dismiss a locked task by swiping it away manually
Joey Rizzoli [Sun, 4 Jun 2017 12:00:48 +0000 (14:00 +0200)]
SystemUI: allow user to dismiss a locked task by swiping it away manually

Change-Id: Icf4e851a9d9dead5ea6c25dd2e020b814af0b779
Signed-off-by: Joey Rizzoli <joey@lineageos.org>
6 years agoSystemUI: animate icon when locking a task
Joey Rizzoli [Sat, 3 Jun 2017 15:00:43 +0000 (17:00 +0200)]
SystemUI: animate icon when locking a task

Change-Id: Ic153cb3707a14dba96d8889b11f149a339fb55e0
Signed-off-by: Joey Rizzoli <joey@lineageos.org>
6 years agoSystemUI: Support recents task locking
Anas Karbila [Sun, 30 Apr 2017 17:20:07 +0000 (02:20 +0900)]
SystemUI: Support recents task locking

This adds the ability to lock task in recents so they won't be cleared when removing all tasks

Ticket: NOUGAT-1

Drawables from material.io

Change-Id: I06ffe411e72d4e837cfec7b9b77fb2519e417bc7

6 years agofingerprint: handle PerformanceStats NULL pointers
Ícaro Hoff [Sun, 4 Jun 2017 15:17:51 +0000 (12:17 -0300)]
fingerprint: handle PerformanceStats NULL pointers

bcc100a has added support for this feature, but the NULL checks
weren't complete, only "handleAcquired" was checking if PerformanceStats
was supported before calling the API.
Extend the NULL checks to "handleAuthenticated" and "handleFailedAttempt"
calls as well.

Change-Id: I3cc9b35ea6b81dc0c503b9feab940873b344323e
Signed-off-by: Ícaro Hoff <icarohoff@gmail.com>
7 years agoOptimised hwui rounded corners shader
Arun [Mon, 23 Jan 2017 11:59:21 +0000 (11:59 +0000)]
Optimised hwui rounded corners shader

This is a ~2x performance increase for the rounded corners shader which
was previously shader limited even on many high-end GPUs. It simplifies
the calculations by pre-dividing by the radius, which also allows to
maintain mediump/FP16 precision (this improves performance and might
improve image quality on GPUs that don't support highp e.g. Mali-400).
It also uses a conditional in the shader to save much of the work on
the vast majority of pixels which are not close to the corners.

Test: manual - visual inspection on fugu (nexus player)

Change-Id: I38f491cfb006e2991ef0b9d6b3d67d2c4d328d44

7 years agoRemove FastJNI optimization on AssetManager to avoid dead lock.
Tim Zhang [Thu, 16 Feb 2017 01:55:27 +0000 (09:55 +0800)]
Remove FastJNI optimization on AssetManager to avoid dead lock.

I found there was a dead lock among main, android.display and GC threads
when running monkey test.
 - Main thread got a mutex and was suspended by GC thread.
 - Android.display thread waited for mutex held by main thread.
 - GC thread waited for suspention of android.display thread.

This will lead to ANR or screen freeze.

Merged-In: I13cf1eca3cb3b7c01aa754874f2b48aab0b472e8
Change-Id: I13cf1eca3cb3b7c01aa754874f2b48aab0b472e8

7 years agoFixed NPE in canAddMoreManagedProfiles
yuanhao [Wed, 18 Jan 2017 01:54:45 +0000 (09:54 +0800)]
Fixed NPE in canAddMoreManagedProfiles

We can use the command 'adb shell pm create-user --profileOf -10000
--managed TestProfile_12345678' to reproduce the problem.

Change-Id: I004ef8dd2aee4e911c292ddf85422a22ecbecd15

7 years agoQS: Remove listeners only if added
Gabriele M [Mon, 5 Jun 2017 15:55:03 +0000 (17:55 +0200)]
QS: Remove listeners only if added

handleDestroy() calls setListening(false) unconditionally. This
causes an error if no listener was never added. Check if we added
a listener and then try to remove it.

Change-Id: Iefe8aacbe87ba1c2c19c9e77cf132fc7c84798f9

7 years agoMerge tag 'android-7.1.2_r17' into cm-14.1
Dan Pasanen [Mon, 5 Jun 2017 23:03:19 +0000 (18:03 -0500)]
Merge tag 'android-7.1.2_r17' into cm-14.1

Android 7.1.2 Release 17 (NJH47B)

# gpg: Signature made Fri 02 Jun 2017 05:09:05 PM CDT
# gpg:                using DSA key E8AD3F819AB10E78
# gpg: Can't check signature: No public key

7 years agoSystemUI: Remove trailing whitespace on high_accuracy_description
Adrian DC [Mon, 5 Jun 2017 08:52:11 +0000 (10:52 +0200)]
SystemUI: Remove trailing whitespace on high_accuracy_description

Change-Id: I26d1a6dd99e4f34b383fe25f69702957b7c6c53a

7 years agoStorageManager: Improve exception handling
Alex Naidis [Wed, 4 Jan 2017 17:52:36 +0000 (18:52 +0100)]
StorageManager: Improve exception handling

When "getPrimaryStorageSize" provides a path
to "readLong", the option that the path
doesn't exist is expected, since it tries
all paths from "INTERNAL_STORAGE_SIZE_PATHS"
until there is success.

This patch makes us catch the "FileNotFoundException"
and "NumberFormatException" seperately.

For the above reason a "FileNotFoundException"
is now treated as an information only.
The "NumberFormatException" and other exceptions
are now treated as error since those are not
expected to happen.

Change-Id: I5316f9c3108e36c31b27dc5df8bf8ac4d4257629
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
7 years agoAdd support for page theme color to WebView and WebChromeClient.
Danny Baumann [Thu, 18 May 2017 12:00:39 +0000 (14:00 +0200)]
Add support for page theme color to WebView and WebChromeClient.

Will only be implemented by system WebView, so users will have to call
the isThemeColorSupported() method in order to check whether the current
WebView implementation supports this.

Change-Id: Iaf4c3b8e4b8b7d8a74303b32d1c17c836dc744da