In the case that the bitmap being passed in was not a bitmap drawable,
we were not retaining any of the attributes from the original drawable.
This patch ensures we ask that drawable to draw on the canvas/bitmap so we
can use that information. Also add tests around it.
Change-Id: I3eefba6e6624fe0bed4965ddf9029320c40f7420
This patch completes the ThemeManagerTest and thus brings the themes
package to 100% test coverage! \o/
Change-Id: I3bdb41781f127c9554c83f56503d591371031a23
TICKET: CYNGNOS-3029
This fixes the assmption that a device will have a default theme
declared in CMSettings, which is not always the case. If no default
theme package is defined in CMSettings we use ThemeConfig.SYSTEM_DEFAULT
instead.
Change-Id: If7952ea984eea0accf3d0990871fb11e3ccc373a
Sometimes the runnable posted to runOnServiceThread() might run a bit
faster than the calls made to the mocked weather provider, which causes
Mockito to throw an exception. Add a timeout to instruct Mockito to
wait for a bit before it verifies if the method was actually called.
Also removed an unused variable in CMWeatherManagerTest
TICKET: CYNGNOS-3043
Change-Id: I53b6541aeb571a6c83d1c26b6723d74c3661e8cc
Java's assert doesn't really do much on android and just returns true, which
makes you feel good about your tests, but its just lying to you. On the long run
its best that you know the real result and fix it, hence switch to JUnit's assert.
CYNGNOS-3042
Change-Id: If7e5982b10abc1f842a52110973566818b1e3bf4
Tests for unique device id are enforced to be implemented correctly
on user builds.
Change-Id: I1c6b24bbf68fe1dce645744f8323c869fdeb9ada
TICKET: CYNGNOS-3026
Since powersave is ignored while the device is plugged in,
and switching pluggedmodes via runtime executing dumpsys commands
is blocked by sepolicy. Ignore the powersave portion of the test.
Change-Id: Ia2b206649a7fc1960cc25d16ffd22379e7c616e3
TICKET: CYNGNOS-2603
Since the API for PerformanceManager returns the number
of profiles supported we can assume what the profiles are
since the HAL provides them in an ordered manner. Thus,
iterate through the size of the number of profiles and verify
each one that's possible.
Change-Id: I87f6d1a847c849bd9e544c1e89a666726c61fe83
TICKET: CYNGNOS-2603
* This is a rework of the session callback API which previously
lived in the framework due to JNI usage. This has been split out
and cleaned up for CMSDK.
* The JNI library lives on the server side, and the app-level
callback has been changed to a protected broadcast. This allows
us to wake up registered services when these events occur.
* Additionally, we support listing all active audio sessions.
* Also brings some JNI love/hate over to CMSDK.
Change-Id: I31c293943474419e3db088bb7ffab75f7440ac0f
Simply, Concierge handles your parcels and makes sure they
get marshalled and unmarshalled correctly when cross IPC
boundaries even when there is a version mismatch between the client
sdk level and the framework implementation.
On incoming parcel (to be unmarshalled):
ParcelInfo incomingParcelInfo = Concierge.receiveParcel(incomingParcel);
int parcelableVersion = incomingParcelInfo.getParcelVersion();
// Do unmarshalling steps here iterating over every plausible version
// Complete the process
incomingParcelInfo.complete();
On outgoing parcel (to be marshalled):
ParcelInfo outgoingParcelInfo = Concierge.prepareParcel(incomingParcel);
// Do marshalling steps here iterating over every plausible version
// Complete the process
outgoingParcelInfo.complete();
Change-Id: I0096851e08ce25908e19e39e6bc4af344e85725e
The feature xml plays two roles:
1) To allow sdk interface (constructor) to throw when system
service is unavailable. This allows for clearer platform
development debugging.
2) To allow for simpler disambiguation of what services to
instrument in a modular environment.
Change-Id: Ic980225df9c115e97f7147cf043cf92bbb225f01
TICKET: CYNGNOS-2293
The feature xml plays two roles:
1) To allow sdk interface (constructor) to throw when system
service is unavailable. This allows for clearer platform
development debugging.
2) To allow for simpler disambiguation of what services to
instrument in a modular environment.
Change-Id: I50f5993ff9c5107fdeaa9a5aa95377235eb3ac02
TICKET: CYNGNOS-2294
The feature xml plays two roles:
1) To allow sdk interface (constructor) to throw when system
service is unavailable. This allows for clearer platform
development debugging.
2) To allow for simpler disambiguation of what services to
instrument in a modular environment.
TICKET: CYNGNOS-2288
Change-Id: Id0adcc1eaa4a0512faf25f11057c45dc2ac733e0
The feature xml plays two roles:
1) To allow sdk interface (constructor) to throw when system
service is unavailable. This allows for clearer platform
development debugging.
2) To allow for simpler disambiguation of what services to
instrument in a modular environment.
TICKET: CYNGNOS-2289
Change-Id: Ice0ae7c45aecbb34e0ea667128b040906c46d7e7
The features xml plays two roles:
1) To allow sdk interface (constructor) to throw when system
service is unavailable. This allows for clearer platform
development debugging.
2) To allow for simpler disambiguation of what services to
instrument in a modular environment.
Change-Id: I41f4ac60af076743909c6090fd50c3ad045bc9e1
Since PerformanceManager is strictly a CyanogenMod construct,
it doesn't make sense to enforce the interfaces with an android
specific permission (even though the implementation is delegated
to power manager). To keep consistency with the other api's,
modify the enforcing permission to a cm specific declaration.
Also add test cases for the PerformanceManager public interfaces.
Change-Id: I430b69dbee73bf94bb60932d1942ab97e3ba193e
Keep any classes extending IInterface so we can have
the BinderTransactionTest run successfully.
Change-Id: Ic49794017e472499cbbf351dfa12732854ceea8d
TICKET: CYNGNOS-2189
-dontskipnonpubliclibraryclasses and class members covers
the processing of external libraries which makes the -injars
option defunct.
Also keep more android support related classes for when we expand
the test package for more coverage.
TICKET: CYNGNOS-2189
Change-Id: I37b66acdac86400f41d1f7f1e6610d1d9ca480b3
To avoid any future release having offset binder transaction
call ids, create a means to validate binder transaction ids
within a parameterized environment based off of prior releases.
This requires utilizing the new android testing support library
for junit4 support.
Change-Id: Iefe3c183de2bdfa127ea53dcf21c8223f0355c34
It's sometimes useful to know what physical device you're using.
CMHW SerialNumber and an "ro.serialno" property already exists, but
are not guaranteed to be unique. Different OEM may use overlapping
numbering schemes, and sometimes placeholder like "012345ABCDE" are
used.
Attempt to work around these shortcomings by defining a new
UniqueDeviceId class that provides a globally unique device ID that
is both deterministic for a given device and designed not to overlap
with IDs of any other devices.
Change-Id: I3f426972558394ba8e78261273ac8521aa603327