Smooth Spinners: Makes the loading "spinner" animation smoother in non-holo apps

The loading "spinner" animation is quite jerky by default when the progress xml's from
drawable are called in applications that don't use the holo progress animation. The holo
"spinner" animation is already smooth by default. This makes every other "spinner"
animation smooth.

We've been changing this value in all ROM's we release, both AOSP and CM based ones
as well as stock ROM's, since it gives a more polished look to the entire system. In the past
3 years we've been using this small tweak we have not noticed anything that would
adversely affect battery life or system operations as a whole.

Change-Id: I4c333ecaee72844fb4d06a3cc6925b17e2208433
Signed-off-by: Sar Castillo <sar.castillo@gmail.com>
Fix null check for BaseObj.equals.

Change-Id: I4f060697db175cbf0b5617c1220db853bbe53f1f
Avoid duplication of AppWindowToken in created Task

When WindowManagerService creates a new Task, it passes atoken to the
Task constructor. In this case atoken is added to mAppTokens list by
the Task constructor and then it is added manually again by calling
newTask.mAppTokens.add(atoken). As a result, the same atoken is present
in mAppTokens list twice.

When another window token is added to the list, it may be placed in
beetwen duplicated tokens and corresponding window will be hidden from
the screen by corresponding duplicated windows.
From user perspective it means that some windows will not be displayed
on the screen.

The issue is fixed by avoid adding atoken to mAppTokens list manually
when it was added already in Task constructor.

Change-Id: I10628e68186160fffdde07beb7d84ab3cecb7051
Harden NsdManager against null-dereference crashes

Due to race conditions or programming errors, the NsdManager
can attempt to process an asynchronous status message (and issue
a callback to the listener) after the listener has already been
removed from the NsdManager state.  This causes dereferencing of
null objects, and a crash.

Split out the three async-queue message cases:  these are ones
in which message.arg2 does not hold an NsdManager array index
and the code should not interpret this field as if it were.

Add an explicit check for "null listener" (the array index in the
message has already been released), log a warning, and exit early.

Safeguard accesses to the "NSD service type" string from a (possibly
null) NsdServiceInfo object... return a constant "?" string rather
than crashing.

Bug: 9016259

Change-Id: I40aabdfc65d86fdd0eaac7a1e7e56e6ff69796cf
Validate objects are from the correct context.

Change-Id: I7d87b0e253b8d2e36d1aed790cfe3a7dd23e158f
Fix descriptor leak after accepting connections

After accepting a connection on a listening socket and
storing the resulting FileDescriptor into a newly created
LocalSocketImpl, the new impl's "descriptor was created
locally and should be closed normally" flag should be set.

(cherrypicked from 3e7305c6bf6062b5cb1e2ddcec6c6d30b4a8bc0d)

Bug: 11805817
Change-Id: I0a1a7c62ec3fbcf647a44a22110ddc778d14e5f4
Fix ellipsizing of emoji symbols in StatisLayout.

Change-Id: Ia057053a7dd6e5a256499f6bded99872581de18e
frameworks/base: Day and week on data usage (1/2)

Adds the ability to set day and week on when the data usage graph resets, instead of just month.

Change-Id: I61b0aa3bdea015793928e4af2b8d8a79147a123e
Decrease Vol Panel Transparency

As I was kindly told at dinner...160 is aparently too transparent. Bump to 208,
 50% of difference of previous value and 255.

Change-Id: I938d0e37b5807c83d25a35e2fb08fcdfb02db18f
Merge "Smooth Spinners: Makes the loading "spinner" animation smoother in non-holo apps" into kitkat
Merge "Fix null check for BaseObj.equals." into kitkat
Merge "Avoid duplication of AppWindowToken in created Task" into kitkat
Merge "Harden NsdManager against null-dereference crashes" into kitkat
Merge "Validate objects are from the correct context." into kitkat
Merge "Fix descriptor leak after accepting connections" into kitkat
Merge changes I938d0e37,I61b0aa3b into kitkat

* changes:
  Decrease Vol Panel Transparency
  frameworks/base: Day and week on data usage (1/2)
Merge "Fix ellipsizing of emoji symbols in StatisLayout." into kitkat