[3/3] frameworks/base: National Data Roaming

Credits: CyanogenMod

Linked commits:
        opt/telephony: https://gerrit.paranoidandroid.co/#/c/3655/
        services/Telephony: https://gerrit.paranoidandroid.co/#/c/3656/

Change-Id: I0280d516067e1ef50f7321355cbee42009657d7e

Conflicts:
	core/java/android/provider/Settings.java
Update Roboto fonts to Android L versions

Change-Id: I541694b159e32bb90c1889e894c4352e43f3ce40
Frameworks: Heads up meets SlimKat [1/4](Squashed)

Frameworks: Heads up meets SlimKat....SlimKat meets Google IO [1/4]

Conflicts:
	core/java/android/app/IActivityManager.java
	core/java/android/provider/Settings.java
	core/res/res/values/cr_strings.xml
	packages/SystemUI/AndroidManifest.xml
	packages/SystemUI/res/values/cr_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/notification/HoverLayout.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/am/ActivityStack.java
	services/java/com/android/server/am/ActivityStackSupervisor.java

Conflicts:
	packages/SystemUI/res/values/simpleaosp_strings.xml

Slim Heads up: change behaviour of back key

Currently back key hides the heads up. We change it that the back key is still
working for the app which has focus and not for the heads up at all.

Reasons:

1. A lot user requested this due that they often hide the heads up during they work
   on the phone, simply due that the back button is often pressed on a normal workflow.
   The results is indeed that a lot heads up windows are missed excidentaly.

2. First I thought to make it optional. But there is another big reason to do it this way. Current
   behaviour is that the heads up view gets focus...and that we dispatch the back key only. Thing is
   that other key events are still rooted to the heads up window. Well most things a user will not see.
   But eg on apps with input field some keys on the IME keyboard do not work during the heads up is showing
   which is a big no go when we assume that heads up needs to be as much non intrusive as possible.

That being said we remove the dispatch override and give the heads up window FLAG_NOT_FOCUSABLE flag
which will bypass any key events to the window behind which had focus before the heads up showed up.

FLAG_NOT_TOUCH_MODAL we can remove due that FLAG_NOT_FOCUSABLE automatically enables the FLAG_NOT_TOUCH_MODAL flag.

Change-Id: Ied4c7d2dd5b99f89af958f01db980a36d431bbc3

HeadsUp: Only remove heads up if attached to window

Attempting to remove mHeadsUpNoficiationView from the window manager
when it is not currently attached will throw an IllegalArgumentException
so we check if it is attached and if so remove it, otherwise carry on.

As well remove possible left children in statusbarview

Change-Id: Ida916eba496c4183e47288ef24a8a93c46a7eddf

Conflicts:
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

HeadsUp: Correctly add and remove the window

isAttachedToWindow() basically works to determine if the view was attached or not.

But on the boot up process when already addHeadsUpView is called but the system is not
fully up and a recreation happens (eg on TRDS...due that the UIModeManager is doing its work as soon as system is ready)
the view gets attached....but not removed on the recreation due that at this time isAttachedToWindow() will return false even though the
window was added.

To solve simply use a boolean instead of isAttachedToWindow()

Change-Id: Ib576a83cadc581683f2a5b0afc922c53b01888b7

fb: Show heads up at the bottom of the screen (1/2)
Due of user requests and indeed especially on hw key devices for a better
workflow we add an option to show heads up notifications on the bottom instead
of the top.

Animation we leave as is due that if it slide from the bottom into the screen it happens
to often that the user accidentaly interacts with it. If it comes from the top of the
container we add, the user has enough time to realize it. Sometimes a ms can make a big difference.

As well this commit fixes the wrong gap on the top if user boots up directly
into immersive mode.

PS:
- if IME keyboard is showing show the heads up on the top to do not disturb the typing.
PS:
- NPE if updatePosition is called to early from the system.

Conflicts:
	packages/SystemUI/res/values/cr_dimens.xml
	packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Conflicts:
	packages/SystemUI/res/values/simpleaosp_dimens.xml

Launch Heads Up in floating window [1/2]
    AICP'fied.
    To make floating window to work for Hover and Heads Up, notificationhelper
    interface is modified to include a third parameter to indicate whether it's
    called from hover or not.
    To make Heads_Up floating notification work separate from Hover,
    a third parameter is added to the notificationhelper to indicate whether
    we are called from Hover.java. This changes the call.
    PS2-3: Fix authorship
    PS5: separate hover change.
    PS6: change commit message.
    PS7: Merge with Hover change, fix setting preference and code cleanup.
         To make settings work, don't use Boolean with CM CheckBox preference
    PS8: autorship

Conflicts:
	core/java/android/provider/Settings.java

Heads up: option to disable in lockscreen (1/2)

Change-Id: I6d191528362535f5965d4e0960f4f5631da01a3e

Conflicts:
	core/java/android/provider/Settings.java

Conflicts:
	core/java/android/provider/Settings.java
	packages/SystemUI/res/values/simpleaosp_strings.xml
Extend SwipeHelper to support vertical gestures

* Un-hardcode CONSTRAIN_SWIPE and FADE_OUT_DURING_SWIPE, define
  through proper callback, per-layout
* Up (GESTURE_NEGATIVE) and down (GESTURE_POSITIVE), mostly needed
  by new Hover hide /w swipe up gesture

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I68c42a8ccabca73a1b241ba7cf264db9c912fccd

Conflicts:
	packages/SystemUI/src/com/android/systemui/SwipeHelper.java
	packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
	packages/SystemUI/src/com/android/systemui/recent/RecentsVerticalScrollView.java
	packages/SystemUI/src/com/android/systemui/statusbar/notification/HoverLayout.java
	packages/SystemUI/src/com/android/systemui/statusbar/notification/PeekLayout.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpNotificationView.java
	packages/SystemUI/src/com/android/systemui/statusbar/policy/NotificationRowLayout.java
HOVER: Implement hide only on swipe up

* Add an Y axis HideHelper, just extend current X axis SwipeHelper and
  change interested methods behaviors
* Some clean up and indenting

Signed-off-by: Carlo Savignano <stevewatersy@gmail.com>
Change-Id: I42a260ea993c614b0b9b4558a95dd44dd517c4f1