Commit Graph

4718 Commits

Author SHA1 Message Date
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
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
3cc5c24b83 Merge "Fix assist for hardware long-press" into mnc-dev 2015-07-09 19:19:05 +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
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
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
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
1a257545b2 Merge "BatteryStats: Fix issue with method parameter order..." into mnc-dev 2015-07-06 18:00:33 +00:00
Adam Lesinski
f7808b7cf0 BatteryStats: Fix issue with method parameter order...
Argh, this explains some weird instances of negative power
given to Wakelock usage. Realtime and uptime were switched in the
parameter list, and since they're both longs, compiler was happy.

Bug:22295225
Change-Id: I6759504f2690baf66af567d8b1a6d0478bc22228
2015-07-06 10:17:24 -07:00
Svet Ganov
85be0c4e21 Fix app ops aidl as it is also used from native.
bug:22248271

Change-Id: Ic3f31d1ee4d27c1483c9d19929c19946d4c815c6
2015-07-03 16:23:19 -07:00
Rubin Xu
c85c639312 Remove ExternalMediaFormatActivity
This activity is no longer used by any part of the framework.

Bug: 9433509
Change-Id: Iace394b7a11b75ed75b2eefc05990626a7e68ac2
2015-07-02 16:53:57 +01:00
Nicolas Prevot
60373e8060 Merge "Fix the case where an intent bounces several times between users." into mnc-dev 2015-07-02 10:27:58 +00:00
Svet Ganov
68ffcf883c Merge "Teach receivers, activities, providers, and services app ops." into mnc-dev 2015-07-01 23:59:21 +00:00
Svet Ganov
99b6043dad Teach receivers, activities, providers, and services app ops.
Perform app op check in addition to the permisison check for all four
paltform components - activities, content providers, broadcast receivers,
services - if they are guarded by a permssion that has an associated app
op. This ensures that legacy apps will behave correctly if the permission
of the caller has been revoked, i.e. the app op for that permission was
disabled.

bug:22199666

Change-Id: Ia22d1c38d58b3cd6aabdc655cb7c7bddd85da7a2
2015-07-01 16:20:00 -07:00
Dianne Hackborn
6cc53743f5 Merge "Fix issue #20672970: Notifications are not dismissed on hot word detection" into mnc-dev 2015-07-01 22:31:18 +00:00
Dianne Hackborn
4e88bcd399 Fix issue #20672970: Notifications are not dismissed on hot word detection
Add new VoiceInteractionSession.closeSystemDialogs() API that closes
everything except the session itself.

Change-Id: If45f1e120d8ca095b6c8055b6485acb5e710820e
2015-07-01 13:41:03 -07:00
Adam Lesinski
43ae441ad7 BatteryStats: Don't assume every kernel reports a power field in /proc/uid_cputime
Bug:22225706
Change-Id: I4c7d889716345231564c1e96494dc84aab17cf01
2015-07-01 12:09:45 -07:00
Nicolas Prevot
107f7b7bec Fix the case where an intent bounces several times between users.
An intent may bounce several times between users.
In this case, we want mContentUserHint to refer to the original
user.

BUG:19656340
Change-Id: I22a35fab0c228140dcb223899f5e38ff33ee5aed
2015-07-01 17:05:18 +01:00
Chris Wren
c58d169530 Merge changes from topic 'tron' into mnc-dev
* changes:
  remove double count of panel open
  report notification load on panel reveal
2015-07-01 15:33:32 +00:00
Chris Banes
2bc8485ba7 Merge "Fix memory leak in setActionProvider() - framework edition" into mnc-dev 2015-07-01 07:58:05 +00:00
Adam Lesinski
14b5701029 Merge "BatteryStats: Record cpu power usage from /proc/uid_cputime" into mnc-dev 2015-07-01 00:40:25 +00:00
Abodunrinwa Toki
5e2310030b FloatingToolbar: Offset visible rect by the rootview's offset
windowSoftInputMode="adjustPan" config causes the root view to be
offset if necessary when the soft keyboard is shown to keep the text
selection visible. Account for this offset when calculating the
global visible rect of the textview in relation to the screen.

Bug: 21687644
Change-Id: Id44cad387d0a3f1f063880497c234052924717ea
2015-06-30 16:42:27 -07:00
Alan Viverette
aa69922ace Use non-greedy view to draw background in landscape time picker
Bug: 21933765
Change-Id: I95d608e9be166308e3a9b013a2c4c17cd4345046
2015-06-30 15:29:13 -07:00
Adam Lesinski
32ddd53466 Merge "BatteryStats: Account for remaining OS wakelock time at the end of processing all apps" into mnc-dev 2015-06-30 20:30:46 +00:00
Adam Lesinski
43f222f02f BatteryStats: Account for remaining OS wakelock time at the end of processing all apps
Bug:18724932
Change-Id: I01cfd18acb3332ad35fd0d48d9c50bc37e5ccd08
2015-06-30 12:54:41 -07:00
Chris Wren
b659c4f44a report notification load on panel reveal
Counts may differ from user perception. For example, if notifications arrive
after the shade is open (even if it is only peeking) there will not be another
panel_reveal before the user sees the shade.  User perception is more accurately
measured by visibility events.

Peek events will report the notificaiton load as 1.

Bug: 20088581
Change-Id: I10221d4b66a18c223aae21e616615f087c65b1e1
2015-06-30 15:30:22 -04:00
Chris Wren
392527c4cc Merge "add more power manager metrics" into mnc-dev 2015-06-30 17:20:29 +00:00
Abodunrinwa Toki
e40d7a6326 Merge "Fix Floating toolbar overflow width." into mnc-dev 2015-06-30 16:56:23 +00:00
Abodunrinwa Toki
685a14468e Merge "Fix floating toolbar flicker in ExtractEditText mode." into mnc-dev 2015-06-30 16:53:26 +00:00
Chris Wren
9bb290bcc3 add more power manager metrics
dream start/stop
dream duration
screen timeout setting

Bug: 21893298
Change-Id: I783f72953fc40c0d276a7845daa048e2fe0db78c
2015-06-30 10:10:24 -04:00
Chris Banes
c8f6ecc265 Fix memory leak in setActionProvider() - framework edition
Caused by ActionMenuItem's SubUiVisibilityListener
not being nulled when it is replaced via setActionProvider().

BUG: 22189734
Change-Id: Id4deaa05cd5554ca7bdf969a592e4812e39dcb75
2015-06-30 11:17:57 +01:00
Billy Lau
f62f4c94a3 Merge "Bug: 21589105 Rescoping the SYSTEM_ALERT_WINDOW permission to an explicit toggle to be manually enabled in Settings." into mnc-dev 2015-06-30 09:05:34 +00:00
Abodunrinwa Toki
8747f37383 Fix Floating toolbar overflow width.
Also clean out unused methods.

Bug: 22186458
Change-Id: I5ef03cd7938630c0d607b6fecd540f2bd83bbb65
2015-06-29 21:17:22 -07:00
Abodunrinwa Toki
1b57653b50 Fix floating toolbar flicker in ExtractEditText mode.
Fixed by making sure to update visibility immediately after setting a
hide flag on the FloatingToolbarVisibilityHelper.

Bug: 22101632
Change-Id: Iea2d9786c14f6451da836e55f0d880025aa00ed2
2015-06-29 20:43:14 -07:00
Yohei Yukawa
4daf600ee0 Merge "Check system locale when picking up an initial SpellChecker." into mnc-dev 2015-06-29 20:42:54 +00:00
Alan Viverette
a1b647c883 Merge "Always remeasure ListView scrap used to obtain minimum width" into mnc-dev 2015-06-29 19:39:29 +00:00
Jae Seo
82b3f67711 Merge "Use AlertDialog for MediaRouteControllerDialog" into mnc-dev 2015-06-29 17:14:43 +00:00