Commit Graph

4768 Commits

Author SHA1 Message Date
Jim Miller
2e56339a4a am bcedcde8: am 204c2de8: am c7b0435c: resolved conflicts for merge of 1d4247c4 to mnc-dr-dev
* commit 'bcedcde8093b48c3d013cc57dde42bdd17d6dcb9':
  Improve tracking of screen on reasons.
2015-07-15 22:26:05 +00:00
Jim Miller
c7b0435cc7 resolved conflicts for merge of 1d4247c4 to mnc-dr-dev
Change-Id: I057c529dcd5d48e0dcf256a9d096c5d8b815892a
2015-07-15 14:33:10 -07:00
Dianne Hackborn
280a64e793 Improve tracking of screen on reasons.
- New screen on app op to record the last time each app has
  caused the screen to be turned on.
- New battery stats event that tells us the reason the screen
  has been asked to turn on.
- Propagate out power manager API to specify the reason a caller
  is asking to have the screen turned on.

Note that currently the window flag to turn the screen on bypasses
much of this because it is being handled in the window manager by
just directly telling the power manager to turn the screen on.  To
make this better we need a new API where it can specify who it is
calling the API for.

Change-Id: I667e56cb1f80508d054da004db667efbcc22e971
2015-07-15 09:59:07 -07:00
Adam Powell
45756ec5ab am 86234afe: am 19dd44c2: am 5e078458: am 18709f9a: Merge "Relax strict ActionMode instance checking when finishing action modes" into mnc-dev
* commit '86234afe59c53d957d8cd5281045ac8aeea69961':
  Relax strict ActionMode instance checking when finishing action modes
2015-07-15 03:24:15 +00:00
Adam Powell
5e078458c2 am 18709f9a: Merge "Relax strict ActionMode instance checking when finishing action modes" into mnc-dev
* commit '18709f9a0095afe6dba11f9dd71e3210c5f4e1db':
  Relax strict ActionMode instance checking when finishing action modes
2015-07-15 02:43:10 +00:00
Adam Powell
18709f9a00 Merge "Relax strict ActionMode instance checking when finishing action modes" into mnc-dev 2015-07-15 02:31:21 +00:00
Adam Powell
c3cb6c9b22 Relax strict ActionMode instance checking when finishing action modes
In previous platform versions, finishing an action mode would clean up
the current action mode even if it was not the same ActionMode
instance. Some common shared code inadvertently relied on this
behavior, so stay bug-compatible with it based on targetSdkVersion.
New apps will get the stricter behavior.

Bug 22265882

Change-Id: Id5d6341aefc07a3cb788d5d6d0b531816f761e42
2015-07-14 19:08:39 -07:00
Adam Lesinski
f488fc2810 am c678d23d: am f96a3386: am e5c0550d: am 267240f2: Merge "BatteryStats: Clear power use when removing a UID from uid_cputime kernel module" into mnc-dev
* commit 'c678d23d987a5b72abfca6f5e383140e9cb543db':
  BatteryStats: Clear power use when removing a UID from uid_cputime kernel module
2015-07-15 01:22:26 +00:00
Adam Lesinski
e5c0550dfe am 267240f2: Merge "BatteryStats: Clear power use when removing a UID from uid_cputime kernel module" into mnc-dev
* commit '267240f2ddbaa0ea2828d7466f310c6ffc7c91cd':
  BatteryStats: Clear power use when removing a UID from uid_cputime kernel module
2015-07-15 00:39:13 +00:00
Adam Lesinski
267240f2dd Merge "BatteryStats: Clear power use when removing a UID from uid_cputime kernel module" into mnc-dev 2015-07-15 00:30:20 +00:00
Adam Lesinski
b6675209e2 am 9de0c930: am b3b21b46: am d4d190ca: am d4c1861a: Merge "BatteryStats: Fix units in wakelock distribution calculation" into mnc-dev
* commit '9de0c930ef7cd683c0449d051c26f31e67b3f817':
  BatteryStats: Fix units in wakelock distribution calculation
2015-07-14 23:56:01 +00:00
Adam Lesinski
bdb0273455 BatteryStats: Clear power use when removing a UID from uid_cputime kernel module
Bug:22461683
Change-Id: Iffb847268d2872bd2a843e28dc41fa22b1e36828
2015-07-14 16:51:53 -07:00
Adam Lesinski
d4d190caed am d4c1861a: Merge "BatteryStats: Fix units in wakelock distribution calculation" into mnc-dev
* commit 'd4c1861a536d022b00505c75c30529c50688f26a':
  BatteryStats: Fix units in wakelock distribution calculation
2015-07-14 23:13:43 +00:00
Adam Lesinski
d4c1861a53 Merge "BatteryStats: Fix units in wakelock distribution calculation" into mnc-dev 2015-07-14 23:00:24 +00:00
Jorim Jaggi
b4d4cc9d5c am c98e7fa3: am 07e3cbc3: am 4cfdcf5b: Touch, wake and unlock
* commit 'c98e7fa30e4faa328c21a9b4afb6938325a049ec':
  Touch, wake and unlock
2015-07-14 22:01:05 +00:00
Jorim Jaggi
4cfdcf5b05 Touch, wake and unlock
- Add onFingerprintAcquired, so Keyguard can grab a wakelock to prevent
the device from sleeping.
- If we get a successful fingerprint, wake the device up, immediately
dismiss the keyguard and tell PWM that we kicked off our frame that
will represent the correct state.
- PWM then waits for this frame to be drawn, and then turns on the
screen, which results in unlocking directly to the previsouly
opened app.

Bug: 21855614
Change-Id: I0c43bcc9d334b509632704fb0c123ab3351edff2
2015-07-14 21:05:26 +00:00
Adam Lesinski
c636107771 am 8e81f616: am 36ba8b1b: am ba7e39d5: am 92a3914f: Merge "BatteryStats: Remove uid_cputime Slog.wtf for high cpu times" into mnc-dev
* commit '8e81f6164e93c8a69dc196d83e0a8ee0ebb7297e':
  BatteryStats: Remove uid_cputime Slog.wtf for high cpu times
2015-07-14 21:04:27 +00:00
Adam Lesinski
062e66cb15 BatteryStats: Fix units in wakelock distribution calculation
This is mostly for checkin stats, this is not used in any computation.

Bug:22468534
Bug:22391540
Change-Id: Ib3d0c86db5044092d3d76acf8f001337272af2ff
2015-07-14 20:27:20 +00:00
Adam Lesinski
92a3914fb3 Merge "BatteryStats: Remove uid_cputime Slog.wtf for high cpu times" into mnc-dev 2015-07-14 20:08:43 +00:00
Adam Lesinski
67eea87e0d BatteryStats: Remove uid_cputime Slog.wtf for high cpu times
High cpu times are expected as multiple cores can be running at the
same time, so comparing against the time between samples is incorrect.

I am reasonable certain that the values we see now are correct, so disabling this
check. However, checking for negative values (overflows) is still enabled and
will remain enabled because there is no case where we will be ok with negative deltas.

Bug:22461683
Change-Id: If9c7cdbb75ceaed059d1e0f4dd83cfdd3e021a93
2015-07-14 11:33:53 -07:00
Yohei Yukawa
a6b4eaf5bb am 1e01d621: am 17dce343: am be27832b: am 12952c79: Merge "Allow FloatingToolbar to be outside of the attached window." into mnc-dev
* commit '1e01d62160b65ca326b015ba542a52fe22c442b7':
  Allow FloatingToolbar to be outside of the attached window.
2015-07-14 18:15:27 +00:00
Chris Wren
92c5e77520 am 01a73cd8: am 500db3c1: am d5b0f69a: am 208934ff: Merge "fix build by restoring deleted enum" into mnc-dev
* commit '01a73cd81ea35f18eba96916e1c80eb5b800e922':
  fix build by restoring deleted enum
2015-07-14 16:28:54 +00:00
Chris Wren
23652ff538 am 4810bf5d: am ea794192: am 2d8e0173: am 4502bfb8: Merge "add new enums to MetricsConstans" into mnc-dev
* commit '4810bf5de92caa55494e484ef36043f2c8fc52b7':
  add new enums to MetricsConstans
2015-07-14 16:28:28 +00:00
Rubin Xu
5571a986f0 am afe3c2b3: am 474f987d: am f5d6d432: am cf9aebf1: Merge "Remove ExternalStorageFormatter" into mnc-dev
* commit 'afe3c2b3e51b254826b44559d6f4aebe40855168':
  Remove ExternalStorageFormatter
2015-07-14 16:28:06 +00:00
Yohei Yukawa
bafc908304 Allow FloatingToolbar to be outside of the attached window.
Currently PopupWindow used for the floating toolbar specifies
neither FLAG_LAYOUT_NO_LIMITS nor FLAG_LAYOUT_IN_SCREEN.
As a result, the floating toolbar can overlap the selected
text when the attached window does not have enough height.

Here is the repro code.

    final TextView textView = new TextView(this);
    textView.setLayoutParams(
            new ViewGroup.LayoutParams(
                    ViewGroup.LayoutParams.MATCH_PARENT,
                    ViewGroup.LayoutParams.WRAP_CONTENT));
    textView.setText("A test sentence.");
    textView.setTextIsSelectable(true);
    final AlertDialog dialog = new AlertDialog.Builder(this)
            .setView(textView)
            .create();
    dialog.getWindow().setGravity(Gravity.BOTTOM)
    dialog.show();

If you tap a word in the dialog, the floating toolbar
unintentionally overlaps the selected text due to the limited
height of the AlertDialog.

It also turns out that just calling
  PopupWindow.setClippingEnabled(false)
to specify FLAG_LAYOUT_NO_LIMITS is not sufficient and ends up
showing the toolbar on the NavBar because we have mistakenly
compared bounds in window-local coordinates
(e.g. FloatingActionModemContentRectOnWindow) with bounds in
screen coordinates (e.g. FloatingActionMode#mScreenRect).
Hence the confusion of window-local coordinates and screen
coordinates in FloatingToolbar and FloatingToolbar also needs
to be addresses.

To summarize here are the notable changes in this CL:
  - Specify FLAG_LAYOUT_NO_LIMITS so that the floating
    toolbar can be placed outside of the attached window.
    (We do this with PopupWindow#setClippingEnabled)
  - Switch to use screen coordinates from window-local
    coordiantes in FloatingToolbar and FloatingActionMode
    because some system components such as WindowManager
    prefer screen coordinates.
  - Put -OnScreen suffix for Rect and Point variables
    as long as they are in screen coordinates.

Bug: 22335001
Change-Id: I71a8d356e868dc7715b030ca1078da4ec39368c3
2015-07-14 05:59:05 -07:00
Chris Wren
8cba70fb05 fix build by restoring deleted enum
Bug: 21114836
Change-Id: Ied4a6e48c66f882f43343a21bce0b3ccccd81713
2015-07-13 12:59:01 -04:00
Chris Wren
4502bfb8fd Merge "add new enums to MetricsConstans" into mnc-dev 2015-07-13 16:21:24 +00:00
Rubin Xu
cf9aebf138 Merge "Remove ExternalStorageFormatter" into mnc-dev 2015-07-13 13:55:53 +00:00
Chris Wren
05aa88a937 add new enums to MetricsConstans
Bug: 21114836
Change-Id: Id62701be012c10bc11ee1ff8aa8435e178d35684
2015-07-10 17:33:39 -04:00
Rubin Xu
cb746a860c Remove ExternalStorageFormatter
Bug: 9433509
Change-Id: I815770e0e0314fc7012ebc213f2167a13d6f37d1
2015-07-09 21:39:01 +01:00
Jorim Jaggi
46e30763df am 5175b3c9: am 9acf475c: am 35094376: am 3cc5c24b: Merge "Fix assist for hardware long-press" into mnc-dev
* commit '5175b3c9923f5eaf5eafa01798966f8711ce9547':
  Fix assist for hardware long-press
2015-07-09 20:16:30 +00:00
Jorim Jaggi
3cc5c24b83 Merge "Fix assist for hardware long-press" into mnc-dev 2015-07-09 19:19:05 +00:00
Adam Lesinski
8e82c794bb am 3e2b53ff: am 1ad61b33: am 1549adb4: am 7fb1655a: Merge "BatteryStats: Fail gracefully on corrupt battery stats" into mnc-dev
* commit '3e2b53ff6981b7ef857cb28c5b2ddb3bc71002b9':
  BatteryStats: Fail gracefully on corrupt battery stats
2015-07-09 02:09:26 +00:00
Adam Lesinski
7fb1655a89 Merge "BatteryStats: Fail gracefully on corrupt battery stats" into mnc-dev 2015-07-09 01:15:15 +00:00
Adam Lesinski
9ae9cba020 BatteryStats: Fail gracefully on corrupt battery stats
Bug:22328963
Change-Id: Id0b4c6334706e58483d5fdfd2c1137bfb821c409
2015-07-08 17:35:42 -07:00
Jorim Jaggi
165ce066b7 Fix assist for hardware long-press
Activating the assistant will now route through SysUI, so
we have the logic whether to start an activity or to start a voice
interaction session in one single place.

Bug: 22201770
Change-Id: I0f4699533aea2a1e595ee25a844434c82f548c01
2015-07-08 22:26:24 +00:00
Adam Powell
2ed094090a am 940abed2: am 6f3f660c: am 24bf1226: am e9cbf415: Merge "Sort and limit ChooserActivity targets from ChooserTargetServices" into mnc-dev
* commit '940abed246f37454426f56c9cbb37e12ec4cdfb5':
  Sort and limit ChooserActivity targets from ChooserTargetServices
2015-07-08 01:37:38 +00:00
Dongwon Kang
6ac3a48544 am e94f5f55: am 279864ca: am aaac72ac: am 0c582293: Merge "Revert "Use AlertDialog for MediaRouteControllerDialog"" into mnc-dev
* commit 'e94f5f556f5a46cf6745ae642d245ca712e1f254':
  Revert "Use AlertDialog for MediaRouteControllerDialog"
2015-07-08 01:36:36 +00:00
Adam Powell
e9cbf41561 Merge "Sort and limit ChooserActivity targets from ChooserTargetServices" into mnc-dev 2015-07-07 21:55:45 +00:00
Dongwon Kang
0c58229306 Merge "Revert "Use AlertDialog for MediaRouteControllerDialog"" into mnc-dev 2015-07-07 20:22:40 +00:00
Abodunrinwa Toki
2487557a16 am 10daed5e: am b9e46b9d: am 0bb0e226: am 4603bd34: Merge "FloatingToolbar: Offset visible rect by the rootview\'s offset" into mnc-dev
* commit '10daed5ebf3e176a4486721017055c0598740fdf':
  FloatingToolbar: Offset visible rect by the rootview's offset
2015-07-07 17:33:52 +00:00
Abodunrinwa Toki
4603bd34ce Merge "FloatingToolbar: Offset visible rect by the rootview's offset" into mnc-dev 2015-07-07 03:59:46 +00:00
Dongwon Kang
7980d10d7c Revert "Use AlertDialog for MediaRouteControllerDialog"
This reverts commit 001d51496d.

Background: To just inherit AlertDialog, the content view should include
a title as we do in support library (AlertDialog uses NO_TITLE feature),
but up-streaming support library implementation to the framework at this
point might cause more issues. Verified that the narrow dialog issue
(b/22044600) does not happen in the framework implementation regardless of
whether it uses AlertDialog or not.

Bug: 22286869
Change-Id: Ic2554cc9e683beff29d1deee91945c1dace83ab1
2015-07-06 20:09:03 -07:00
Adam Powell
a182e45c68 Sort and limit ChooserActivity targets from ChooserTargetServices
Apply an automated decay factor if apps decide to claim all of their
targets are SUPER IMPORTANT. Apply the multiplier from the apps
themselves as well as a penalty for apps that come in late - let's see
how fast developers get their ChooserTargetServices to start!

Also fix a bug with ResolverDrawerLayout where dragging from the title
area wouldn't always work properly.

Bug 22302285

Change-Id: Ib6eb2b6fb92608790b2267c0f671c9ae59b2907e
2015-07-06 18:39:34 -07:00
Adam Lesinski
8f387fc09a am f036847f: am c6c21522: am a5bd0e3a: am fe45b29a: Merge "BatteryStats: Remove isolated UIDs from /proc/uid_cputime when they are not in use anymore" into mnc-dev
* commit 'f036847f2fe0c217965b808f1608d7d0bd7fd573':
  BatteryStats: Remove isolated UIDs from /proc/uid_cputime when they are not in use anymore
2015-07-07 01:18:04 +00:00
Winson Chung
a9b08df90e am dc91eca6: am 45e1153d: am ef024af4: am 2924dc34: Merge "Adding metrics to overview." into mnc-dev
* commit 'dc91eca6545ae1a9cae1e0336897e26ce313829c':
  Adding metrics to overview.
2015-07-07 01:17:45 +00:00
Adam Lesinski
fe45b29a1c Merge "BatteryStats: Remove isolated UIDs from /proc/uid_cputime when they are not in use anymore" into mnc-dev 2015-07-07 00:32:24 +00:00
Winson Chung
5c9f4b90bf Adding metrics to overview.
Bug: 21528167
Change-Id: Ice1ce892682aa4599b9a689b47af373780897548
2015-07-06 15:52:21 -07:00
Adam Lesinski
61db88fc8b BatteryStats: Remove isolated UIDs from /proc/uid_cputime when they are not in use anymore
Bug:22225933
Change-Id: I384a3c37ad45af981cca5fc3e92643da948d48d0
2015-07-06 15:36:46 -07:00
Adam Lesinski
ebb92a3c40 am 92726ca9: am 1fa6846b: am 948ac4fa: am 1a257545: Merge "BatteryStats: Fix issue with method parameter order..." into mnc-dev
* commit '92726ca9cab7c87cfa249482c37451a87f0bfcd2':
  BatteryStats: Fix issue with method parameter order...
2015-07-06 19:18:14 +00:00