merge b2g-inbound to mc

This commit is contained in:
Carsten "Tomcat" Book 2013-09-26 13:32:33 +02:00
commit 7e4aa2ff52
8 changed files with 56 additions and 7 deletions

View File

@ -1,4 +1,4 @@
{
"revision": "f22c641c064abac5388209008dd81ba01ec6821e",
"revision": "43bc58df001f2b870fd2d1eb80723cfdccdc7b67",
"repo_path": "/integration/gaia-central"
}

View File

@ -296,10 +296,11 @@ interface nsIDOMMozIccManager : nsIDOMEventTarget
/**
* Indicates the state of the device's ICC card.
*
* Possible values: null, 'unknown', 'absent', 'pinRequired', 'pukRequired',
* 'personalizationInProgress', 'networkLocked', 'corporateLocked',
* 'serviceProviderLocked', 'networkPukRequired', 'corporatePukRequired',
* 'serviceProviderPukRequired', 'personalizationReady', 'ready'.
* Possible values: null, 'illegal', 'unknown', 'absent', 'pinRequired',
* 'pukRequired', 'personalizationInProgress', 'networkLocked',
* 'corporateLocked', 'serviceProviderLocked', 'networkPukRequired',
* 'corporatePukRequired', 'serviceProviderPukRequired',
* 'personalizationReady', 'ready'.
*/
readonly attribute DOMString cardState;

View File

@ -2345,6 +2345,7 @@ this.GECKO_RADIOSTATE_OFF = "off";
this.GECKO_RADIOSTATE_READY = "ready";
this.GECKO_CARDSTATE_NOT_READY = null;
this.GECKO_CARDSTATE_ILLEGAL = "illegal";
this.GECKO_CARDSTATE_UNKNOWN = "unknown";
this.GECKO_CARDSTATE_ABSENT = "absent";
this.GECKO_CARDSTATE_PIN_REQUIRED = "pinRequired";

View File

@ -2977,6 +2977,9 @@ let RIL = {
this.appType = app.app_type;
switch (app.app_state) {
case CARD_APPSTATE_ILLEGAL:
newCardState = GECKO_CARDSTATE_ILLEGAL;
break;
case CARD_APPSTATE_PIN:
newCardState = GECKO_CARDSTATE_PIN_REQUIRED;
break;

View File

@ -1665,6 +1665,42 @@ add_test(function test_personalization_state() {
run_next_test();
});
/**
* Verify SIM app_state in _processICCStatus
*/
add_test(function test_card_app_state() {
let worker = newUint8Worker();
let ril = worker.RIL;
function testCardAppState(cardAppState, geckoCardState) {
let iccStatus = {
gsmUmtsSubscriptionAppIndex: 0,
apps: [
{
app_state: cardAppState
}],
};
ril._processICCStatus(iccStatus);
do_check_eq(ril.cardState, geckoCardState);
}
testCardAppState(CARD_APPSTATE_ILLEGAL,
GECKO_CARDSTATE_ILLEGAL);
testCardAppState(CARD_APPSTATE_PIN,
GECKO_CARDSTATE_PIN_REQUIRED);
testCardAppState(CARD_APPSTATE_PUK,
GECKO_CARDSTATE_PUK_REQUIRED);
testCardAppState(CARD_APPSTATE_READY,
GECKO_CARDSTATE_READY);
testCardAppState(CARD_APPSTATE_UNKNOWN,
GECKO_CARDSTATE_UNKNOWN);
testCardAppState(CARD_APPSTATE_DETECTED,
GECKO_CARDSTATE_UNKNOWN);
run_next_test();
});
/**
* Verify iccSetCardLock - Facility Lock.
*/

View File

@ -66,10 +66,17 @@ GLScreenBuffer::Create(GLContext* gl,
GLScreenBuffer::~GLScreenBuffer()
{
delete mFactory;
delete mStream;
delete mDraw;
delete mRead;
// bug 914823: it is crucial to destroy the Factory _after_ we destroy
// the SharedSurfaces around here! Reason: the shared surfaces will want
// to ask the Allocator (e.g. the ClientLayerManager) to destroy their
// buffers, but that Allocator may be kept alive by the Factory,
// as it currently the case in SurfaceFactory_Gralloc holding a nsRefPtr
// to the Allocator!
delete mFactory;
}

View File

@ -126,7 +126,7 @@
#define TEXT_MDL "text/mdl"
#define TEXT_PLAIN "text/plain"
#define TEXT_RICHTEXT "text/richtext"
#define TEXT_VCARD "text/x-vcard"
#define TEXT_VCARD "text/vcard"
#define TEXT_CSS "text/css"
#define TEXT_JSSS "text/jsss"
#define TEXT_XML "text/xml"

View File

@ -489,6 +489,7 @@ static nsExtraMimeTypeEntry extraMimeEntries [] =
{ TEXT_XUL, "xul", "XML-Based User Interface Language" },
{ TEXT_XML, "xml,xsl,xbl", "Extensible Markup Language" },
{ TEXT_CSS, "css", "Style Sheet" },
{ TEXT_VCARD, "vcf,vcard", "Contact Information" },
{ VIDEO_OGG, "ogv", "Ogg Video" },
{ VIDEO_OGG, "ogg", "Ogg Video" },
{ APPLICATION_OGG, "ogg", "Ogg Video"},