Commit f7f1d32
Frameworks: Heads up meets SlimKat....SlimKat meets Google IO [1/4]
First introduced from apple, showed as android version on PA as hover and now found
in android code as native implementation we want to do our interpretation of this feature.
Especially thanks PA and CM for some of the UX ideas.
We have basically split this feature in two parts.
1. Googles native integration. We keep it as is and use the native flags for it. Apps
(in our case Dialer, Mms, Email per account) can force show a heads up notification
if the notification is important. So basically same what was shown on Google IO the first
time to the public. Eg the dialer on SlimKat is doing exactly the same now like google want it.
Due that we use same flags like google every future app with heads up support will automatically
show as heads up.
2. Give the user an ability to enable heads up mode for third party apps which do not have a native
integration. Well first thought was on which apps a user would usally use it (keeping in minde the idea from google....heads up
is for important notifications and for nothing more)? Right on chat, email
or social apps. On all other apps it simply does not make sense at all. Which leads into the question why the
current integrations are handling blacklists or whitelists and enable it per default for all apps. This
is from UX point of view an absolutely no go (just imagine the user blacklists half of the 200 apps installed lol).
Aside that parsing long lists is a peformance problem.
So our attempt goes into another direction. Headsup for (native integration is another story) apps is disabled
by default. We bind the information directly to the application package. So each app carries the information itself.
The user can either enable it with a longlick in the notification drawer on the notification or in Settings->app->App info
as well via a check box. As soon it is enabled for this app every notification from this app will show as heads up as long
it is not an ongoing notification.
In general on system signed apps the user is not allowed to change the heads up state. Thats nothing the user should
decide....the system should do. Aside that it prevends user to enable heads up for eg IME selector etc etc.
Thats the basic concept behind. In addition to this concept following things were done.
- Introduce a new expanded notification flag. Apps can send it via extra metadata to force
a expanded heads up notification is it is needed (eg dialer).
- Add a user option to enable always expanded on heads up notification
- Add a user option to set the timeout for the heads up view.
- Introduce a snooze button. Every heads up notification has a snooze button on the top right. If the user press it
heads up is disabled for a certain time (like a do not disturb mode). The time length is user configurable in settings.
- We had a bunch of user which want to use heads up in a more intrusive way. Current default behaviour is that a heads up
shows up if the user did not push the heads up of this app into background. This is due that the system assumes if the user
put it into background he or she do not want to be disturbed by notifications of this app at the moment. Of course in the moment
the user interacted with the background notification heads up is activated again. This leads like google suggested in a very
good non intrusive way. Well but some user use it in another way (especially on immversive mode) and want to be notified on every
notification update of this app via heads up. Due of this understandable other user behaviour we add an option for it to allow
this scenario.
- Detect direction of the swipe. Left swipe will dismiss the notification (if it is not a non clearable). Right swipe will just
hide the heads up and the notification is still in background accessable in the notification drawer.
Other then that some fixes were done as well (eg utilize the back button, correctly handle the hiding of the heads up,
handle action buttons on heads up view correctly, fix several expanded desktop and immersive issues
and some other issues the AOSP implementation currently has)
To summarize...heads up this way is very non intrusive and especially we do not need a bunch of settings or blacklists.
So it is pretty straight forward, fast, clean and user friendly.
Some visual examples:
https://plus.google.com/107859134357373490612/posts/bJABHs1aNMj
Conflicts:
core/java/android/app/Notification.java
core/java/android/provider/Settings.java
core/res/res/values/slim_strings.xml
packages/SystemUI/res/values/slim_strings.xml
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
packages/SystemUI/src/com/android/systemui/statusbar/tv/TvStatusBar.java
services/java/com/android/server/pm/Settings.java1 parent c6eb915 commit f7f1d32
46 files changed
Lines changed: 900 additions & 113 deletions
File tree
- core
- java
- android
- app
- content
- pm
- provider
- widget
- com/android/internal/statusbar
- res
- res/values
- packages/SystemUI
- res
- drawable-hdpi
- drawable-mdpi
- drawable-xhdpi
- drawable-xxhdpi
- drawable
- layout
- values
- src/com/android/systemui/statusbar
- phone
- policy
- tv
- policy/src/com/android/internal/policy/impl
- services/java/com/android/server
- am
- pm
- test-runner/src/android/test/mock
- tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2056 | 2056 | | |
2057 | 2057 | | |
2058 | 2058 | | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
2059 | 2068 | | |
2060 | 2069 | | |
2061 | 2070 | | |
| |||
4740 | 4749 | | |
4741 | 4750 | | |
4742 | 4751 | | |
| 4752 | + | |
| 4753 | + | |
| 4754 | + | |
| 4755 | + | |
| 4756 | + | |
| 4757 | + | |
| 4758 | + | |
| 4759 | + | |
| 4760 | + | |
| 4761 | + | |
| 4762 | + | |
| 4763 | + | |
| 4764 | + | |
| 4765 | + | |
4743 | 4766 | | |
4744 | 4767 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
1382 | 1383 | | |
1383 | 1384 | | |
1384 | 1385 | | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
1385 | 1411 | | |
1386 | 1412 | | |
1387 | 1413 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1705 | 1705 | | |
1706 | 1706 | | |
1707 | 1707 | | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
1708 | 1719 | | |
1709 | 1720 | | |
1710 | 1721 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| 209 | + | |
| 210 | + | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
| |||
700 | 702 | | |
701 | 703 | | |
702 | 704 | | |
| 705 | + | |
703 | 706 | | |
704 | 707 | | |
705 | 708 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
571 | | - | |
| 571 | + | |
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
584 | | - | |
| 584 | + | |
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
589 | 607 | | |
590 | 608 | | |
591 | 609 | | |
| |||
1788 | 1806 | | |
1789 | 1807 | | |
1790 | 1808 | | |
1791 | | - | |
1792 | | - | |
1793 | | - | |
| 1809 | + | |
1794 | 1810 | | |
1795 | 1811 | | |
1796 | 1812 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2439 | 2439 | | |
2440 | 2440 | | |
2441 | 2441 | | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
2442 | 2451 | | |
2443 | 2452 | | |
2444 | 2453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
548 | 554 | | |
549 | 555 | | |
550 | 556 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
241 | 245 | | |
242 | 246 | | |
243 | 247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3221 | 3221 | | |
3222 | 3222 | | |
3223 | 3223 | | |
| 3224 | + | |
| 3225 | + | |
| 3226 | + | |
| 3227 | + | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
3224 | 3240 | | |
3225 | 3241 | | |
3226 | 3242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| 54 | + | |
52 | 55 | | |
53 | 56 | | |
54 | 57 | | |
| |||
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
63 | | - | |
| 66 | + | |
0 commit comments