2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-12-04 09:07:00 -08:00
|
|
|
#include "mozilla/Hal.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsScreen.h"
|
|
|
|
#include "nsIDocShell.h"
|
|
|
|
#include "nsPresContext.h"
|
|
|
|
#include "nsCOMPtr.h"
|
2011-10-03 12:11:31 -07:00
|
|
|
#include "nsDOMClassInfoID.h"
|
2011-12-04 09:07:00 -08:00
|
|
|
#include "nsIDocShellTreeItem.h"
|
2008-07-26 09:14:49 -07:00
|
|
|
#include "nsLayoutUtils.h"
|
2012-03-14 03:10:48 -07:00
|
|
|
#include "nsDOMEvent.h"
|
2012-05-10 17:49:34 -07:00
|
|
|
#include "nsGlobalWindow.h"
|
2011-12-04 09:07:00 -08:00
|
|
|
|
|
|
|
using namespace mozilla;
|
2012-03-14 03:10:48 -07:00
|
|
|
using namespace mozilla::dom;
|
2011-12-04 09:07:00 -08:00
|
|
|
|
2012-03-14 11:14:53 -07:00
|
|
|
namespace {
|
|
|
|
|
|
|
|
bool
|
|
|
|
IsChromeType(nsIDocShell *aDocShell)
|
|
|
|
{
|
|
|
|
nsCOMPtr<nsIDocShellTreeItem> ds = do_QueryInterface(aDocShell);
|
|
|
|
if (!ds) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
PRInt32 itemType;
|
|
|
|
ds->GetItemType(&itemType);
|
|
|
|
return itemType == nsIDocShellTreeItem::typeChrome;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // anonymous namespace
|
|
|
|
|
2012-03-14 03:10:48 -07:00
|
|
|
/* static */ already_AddRefed<nsScreen>
|
|
|
|
nsScreen::Create(nsPIDOMWindow* aWindow)
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
2012-03-29 09:31:29 -07:00
|
|
|
MOZ_ASSERT(aWindow);
|
|
|
|
|
2012-03-14 03:10:48 -07:00
|
|
|
if (!aWindow->GetDocShell()) {
|
|
|
|
return nsnull;
|
|
|
|
}
|
|
|
|
|
2012-03-29 09:31:29 -07:00
|
|
|
nsCOMPtr<nsIScriptGlobalObject> sgo =
|
|
|
|
do_QueryInterface(static_cast<nsPIDOMWindow*>(aWindow));
|
2012-03-14 03:10:48 -07:00
|
|
|
NS_ENSURE_TRUE(sgo, nsnull);
|
|
|
|
|
|
|
|
nsRefPtr<nsScreen> screen = new nsScreen();
|
|
|
|
screen->BindToOwner(aWindow);
|
|
|
|
|
2012-05-08 14:36:07 -07:00
|
|
|
hal::RegisterScreenConfigurationObserver(screen);
|
|
|
|
hal::ScreenConfiguration config;
|
|
|
|
hal::GetCurrentScreenConfiguration(&config);
|
|
|
|
screen->mOrientation = config.orientation();
|
2012-03-14 03:10:48 -07:00
|
|
|
|
|
|
|
return screen.forget();
|
|
|
|
}
|
|
|
|
|
|
|
|
nsScreen::nsScreen()
|
2012-03-29 09:31:11 -07:00
|
|
|
: mEventListener(nsnull)
|
2012-03-14 03:10:48 -07:00
|
|
|
{
|
2012-02-09 02:29:09 -08:00
|
|
|
}
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-06-22 01:52:47 -07:00
|
|
|
void
|
|
|
|
nsScreen::Reset()
|
|
|
|
{
|
|
|
|
hal::UnlockScreenOrientation();
|
2012-06-22 01:53:23 -07:00
|
|
|
|
|
|
|
if (mEventListener) {
|
|
|
|
nsCOMPtr<nsIDOMEventTarget> target = do_QueryInterface(GetOwner());
|
|
|
|
if (target) {
|
|
|
|
target->RemoveSystemEventListener(NS_LITERAL_STRING("mozfullscreenchange"),
|
|
|
|
mEventListener, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
mEventListener = nsnull;
|
|
|
|
}
|
2012-06-22 01:52:47 -07:00
|
|
|
}
|
|
|
|
|
2012-02-09 07:55:54 -08:00
|
|
|
nsScreen::~nsScreen()
|
|
|
|
{
|
2012-06-22 01:52:47 -07:00
|
|
|
Reset();
|
2012-05-08 14:36:07 -07:00
|
|
|
hal::UnregisterScreenConfigurationObserver(this);
|
2012-02-09 07:55:54 -08:00
|
|
|
}
|
2012-02-09 02:29:09 -08:00
|
|
|
|
2012-02-09 07:55:54 -08:00
|
|
|
|
2012-02-09 08:42:07 -08:00
|
|
|
DOMCI_DATA(Screen, nsScreen)
|
2012-02-09 07:55:54 -08:00
|
|
|
|
2012-03-14 03:10:48 -07:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_CLASS(nsScreen)
|
|
|
|
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsScreen,
|
|
|
|
nsDOMEventTargetHelper)
|
|
|
|
NS_CYCLE_COLLECTION_TRAVERSE_EVENT_HANDLER(mozorientationchange)
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
|
|
|
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsScreen,
|
|
|
|
nsDOMEventTargetHelper)
|
|
|
|
NS_CYCLE_COLLECTION_UNLINK_EVENT_HANDLER(mozorientationchange)
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
// QueryInterface implementation for nsScreen
|
2012-03-14 03:10:48 -07:00
|
|
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsScreen)
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_INTERFACE_MAP_ENTRY(nsIDOMScreen)
|
2012-03-14 03:10:48 -07:00
|
|
|
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMScreen)
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(Screen)
|
2012-03-14 03:10:48 -07:00
|
|
|
NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
|
2012-03-14 11:14:53 -07:00
|
|
|
|
2012-03-14 03:10:48 -07:00
|
|
|
NS_IMPL_ADDREF_INHERITED(nsScreen, nsDOMEventTargetHelper)
|
|
|
|
NS_IMPL_RELEASE_INHERITED(nsScreen, nsDOMEventTargetHelper)
|
2012-03-14 11:14:53 -07:00
|
|
|
|
2012-03-14 03:10:48 -07:00
|
|
|
NS_IMPL_EVENT_HANDLER(nsScreen, mozorientationchange)
|
2012-03-14 11:14:53 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_IMETHODIMP
|
|
|
|
nsScreen::GetTop(PRInt32* aTop)
|
|
|
|
{
|
|
|
|
nsRect rect;
|
|
|
|
nsresult rv = GetRect(rect);
|
|
|
|
|
|
|
|
*aTop = rect.y;
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsScreen::GetLeft(PRInt32* aLeft)
|
|
|
|
{
|
|
|
|
nsRect rect;
|
|
|
|
nsresult rv = GetRect(rect);
|
|
|
|
|
|
|
|
*aLeft = rect.x;
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsScreen::GetWidth(PRInt32* aWidth)
|
|
|
|
{
|
|
|
|
nsRect rect;
|
|
|
|
nsresult rv = GetRect(rect);
|
|
|
|
|
|
|
|
*aWidth = rect.width;
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsScreen::GetHeight(PRInt32* aHeight)
|
|
|
|
{
|
|
|
|
nsRect rect;
|
|
|
|
nsresult rv = GetRect(rect);
|
|
|
|
|
|
|
|
*aHeight = rect.height;
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsScreen::GetPixelDepth(PRInt32* aPixelDepth)
|
|
|
|
{
|
2011-04-16 18:22:44 -07:00
|
|
|
nsDeviceContext* context = GetDeviceContext();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
if (!context) {
|
|
|
|
*aPixelDepth = -1;
|
|
|
|
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
PRUint32 depth;
|
|
|
|
context->GetDepth(depth);
|
|
|
|
|
|
|
|
*aPixelDepth = depth;
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsScreen::GetColorDepth(PRInt32* aColorDepth)
|
|
|
|
{
|
|
|
|
return GetPixelDepth(aColorDepth);
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsScreen::GetAvailWidth(PRInt32* aAvailWidth)
|
|
|
|
{
|
|
|
|
nsRect rect;
|
|
|
|
nsresult rv = GetAvailRect(rect);
|
|
|
|
|
|
|
|
*aAvailWidth = rect.width;
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsScreen::GetAvailHeight(PRInt32* aAvailHeight)
|
|
|
|
{
|
|
|
|
nsRect rect;
|
|
|
|
nsresult rv = GetAvailRect(rect);
|
|
|
|
|
|
|
|
*aAvailHeight = rect.height;
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsScreen::GetAvailLeft(PRInt32* aAvailLeft)
|
|
|
|
{
|
|
|
|
nsRect rect;
|
|
|
|
nsresult rv = GetAvailRect(rect);
|
|
|
|
|
|
|
|
*aAvailLeft = rect.x;
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsScreen::GetAvailTop(PRInt32* aAvailTop)
|
|
|
|
{
|
|
|
|
nsRect rect;
|
|
|
|
nsresult rv = GetAvailRect(rect);
|
|
|
|
|
|
|
|
*aAvailTop = rect.y;
|
|
|
|
|
|
|
|
return rv;
|
|
|
|
}
|
|
|
|
|
2011-04-16 18:22:44 -07:00
|
|
|
nsDeviceContext*
|
2007-03-22 10:30:00 -07:00
|
|
|
nsScreen::GetDeviceContext()
|
|
|
|
{
|
2012-03-14 11:14:53 -07:00
|
|
|
return nsLayoutUtils::GetDeviceContextForScreenInfo(GetOwner());
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
nsScreen::GetRect(nsRect& aRect)
|
|
|
|
{
|
2011-04-16 18:22:44 -07:00
|
|
|
nsDeviceContext *context = GetDeviceContext();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
if (!context) {
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
context->GetRect(aRect);
|
|
|
|
|
|
|
|
aRect.x = nsPresContext::AppUnitsToIntCSSPixels(aRect.x);
|
|
|
|
aRect.y = nsPresContext::AppUnitsToIntCSSPixels(aRect.y);
|
|
|
|
aRect.height = nsPresContext::AppUnitsToIntCSSPixels(aRect.height);
|
|
|
|
aRect.width = nsPresContext::AppUnitsToIntCSSPixels(aRect.width);
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsresult
|
|
|
|
nsScreen::GetAvailRect(nsRect& aRect)
|
|
|
|
{
|
2011-04-16 18:22:44 -07:00
|
|
|
nsDeviceContext *context = GetDeviceContext();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
if (!context) {
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
context->GetClientRect(aRect);
|
|
|
|
|
|
|
|
aRect.x = nsPresContext::AppUnitsToIntCSSPixels(aRect.x);
|
|
|
|
aRect.y = nsPresContext::AppUnitsToIntCSSPixels(aRect.y);
|
|
|
|
aRect.height = nsPresContext::AppUnitsToIntCSSPixels(aRect.height);
|
|
|
|
aRect.width = nsPresContext::AppUnitsToIntCSSPixels(aRect.width);
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|
2011-12-04 09:07:00 -08:00
|
|
|
|
2012-03-14 03:10:48 -07:00
|
|
|
void
|
2012-05-08 14:36:07 -07:00
|
|
|
nsScreen::Notify(const hal::ScreenConfiguration& aConfiguration)
|
2012-03-14 03:10:48 -07:00
|
|
|
{
|
|
|
|
ScreenOrientation previousOrientation = mOrientation;
|
2012-05-08 14:36:07 -07:00
|
|
|
mOrientation = aConfiguration.orientation();
|
2012-03-14 03:10:48 -07:00
|
|
|
|
2012-03-29 12:43:16 -07:00
|
|
|
NS_ASSERTION(mOrientation != eScreenOrientation_None &&
|
2012-03-14 03:10:48 -07:00
|
|
|
mOrientation != eScreenOrientation_EndGuard &&
|
|
|
|
mOrientation != eScreenOrientation_Portrait &&
|
|
|
|
mOrientation != eScreenOrientation_Landscape,
|
|
|
|
"Invalid orientation value passed to notify method!");
|
|
|
|
|
|
|
|
if (mOrientation != previousOrientation) {
|
|
|
|
// TODO: use an helper method, see bug 720768.
|
|
|
|
nsRefPtr<nsDOMEvent> event = new nsDOMEvent(nsnull, nsnull);
|
|
|
|
nsresult rv = event->InitEvent(NS_LITERAL_STRING("mozorientationchange"), false, false);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
rv = event->SetTrusted(true);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool dummy;
|
|
|
|
rv = DispatchEvent(event, &dummy);
|
|
|
|
if (NS_FAILED(rv)) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsScreen::GetMozOrientation(nsAString& aOrientation)
|
|
|
|
{
|
|
|
|
switch (mOrientation) {
|
2012-03-29 12:43:16 -07:00
|
|
|
case eScreenOrientation_None:
|
2012-03-14 03:10:48 -07:00
|
|
|
case eScreenOrientation_EndGuard:
|
|
|
|
case eScreenOrientation_Portrait:
|
|
|
|
case eScreenOrientation_Landscape:
|
|
|
|
NS_ASSERTION(false, "Shouldn't be used when getting value!");
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
case eScreenOrientation_PortraitPrimary:
|
|
|
|
aOrientation.AssignLiteral("portrait-primary");
|
|
|
|
break;
|
|
|
|
case eScreenOrientation_PortraitSecondary:
|
|
|
|
aOrientation.AssignLiteral("portrait-secondary");
|
|
|
|
break;
|
|
|
|
case eScreenOrientation_LandscapePrimary:
|
|
|
|
aOrientation.AssignLiteral("landscape-primary");
|
|
|
|
break;
|
|
|
|
case eScreenOrientation_LandscapeSecondary:
|
|
|
|
aOrientation.AssignLiteral("landscape-secondary");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|
2012-03-29 12:43:16 -07:00
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsScreen::MozLockOrientation(const nsAString& aOrientation, bool* aReturn)
|
|
|
|
{
|
|
|
|
ScreenOrientation orientation;
|
2012-06-22 01:53:03 -07:00
|
|
|
*aReturn = false;
|
2012-03-29 12:43:16 -07:00
|
|
|
|
|
|
|
if (aOrientation.EqualsLiteral("portrait")) {
|
|
|
|
orientation = eScreenOrientation_Portrait;
|
|
|
|
} else if (aOrientation.EqualsLiteral("portrait-primary")) {
|
|
|
|
orientation = eScreenOrientation_PortraitPrimary;
|
|
|
|
} else if (aOrientation.EqualsLiteral("portrait-secondary")) {
|
|
|
|
orientation = eScreenOrientation_PortraitSecondary;
|
|
|
|
} else if (aOrientation.EqualsLiteral("landscape")) {
|
|
|
|
orientation = eScreenOrientation_Landscape;
|
|
|
|
} else if (aOrientation.EqualsLiteral("landscape-primary")) {
|
|
|
|
orientation = eScreenOrientation_LandscapePrimary;
|
|
|
|
} else if (aOrientation.EqualsLiteral("landscape-secondary")) {
|
|
|
|
orientation = eScreenOrientation_LandscapeSecondary;
|
|
|
|
} else {
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2012-03-29 09:31:29 -07:00
|
|
|
if (!GetOwner()) {
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2012-06-22 01:53:03 -07:00
|
|
|
// Chrome code and apps can always lock the screen orientation.
|
|
|
|
if (!IsChromeType(GetOwner()->GetDocShell()) &&
|
|
|
|
!static_cast<nsGlobalWindow*>(GetOwner())->IsPartOfApp()) {
|
2012-04-10 06:38:59 -07:00
|
|
|
nsCOMPtr<nsIDOMDocument> doc;
|
|
|
|
GetOwner()->GetDocument(getter_AddRefs(doc));
|
|
|
|
if (!doc) {
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2012-06-22 01:53:03 -07:00
|
|
|
// Non-apps content can lock orientation only if fullscreen.
|
|
|
|
bool fullscreen;
|
|
|
|
doc->GetMozFullScreen(&fullscreen);
|
|
|
|
if (!fullscreen) {
|
|
|
|
return NS_OK;
|
2012-03-29 09:31:29 -07:00
|
|
|
}
|
2012-03-29 09:31:11 -07:00
|
|
|
|
|
|
|
nsCOMPtr<nsIDOMEventTarget> target = do_QueryInterface(GetOwner());
|
|
|
|
if (!target) {
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!mEventListener) {
|
|
|
|
mEventListener = new FullScreenEventListener();
|
|
|
|
}
|
|
|
|
|
|
|
|
target->AddSystemEventListener(NS_LITERAL_STRING("mozfullscreenchange"),
|
|
|
|
mEventListener, true);
|
2012-03-29 09:31:29 -07:00
|
|
|
}
|
|
|
|
|
2012-03-29 12:43:16 -07:00
|
|
|
*aReturn = hal::LockScreenOrientation(orientation);
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsScreen::MozUnlockOrientation()
|
|
|
|
{
|
|
|
|
hal::UnlockScreenOrientation();
|
|
|
|
return NS_OK;
|
|
|
|
}
|
2012-03-29 09:31:11 -07:00
|
|
|
|
|
|
|
NS_IMPL_ISUPPORTS1(nsScreen::FullScreenEventListener, nsIDOMEventListener)
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsScreen::FullScreenEventListener::HandleEvent(nsIDOMEvent* aEvent)
|
|
|
|
{
|
|
|
|
#ifdef DEBUG
|
|
|
|
nsAutoString eventType;
|
|
|
|
aEvent->GetType(eventType);
|
|
|
|
|
|
|
|
MOZ_ASSERT(eventType.EqualsLiteral("mozfullscreenchange"));
|
|
|
|
#endif
|
|
|
|
|
|
|
|
nsCOMPtr<nsIDOMEventTarget> target;
|
|
|
|
aEvent->GetCurrentTarget(getter_AddRefs(target));
|
|
|
|
|
2012-04-23 01:30:58 -07:00
|
|
|
// We have to make sure that the event we got is the event sent when
|
|
|
|
// fullscreen is disabled because we could get one when fullscreen
|
|
|
|
// got enabled if the lock call is done at the same moment.
|
|
|
|
nsCOMPtr<nsIDOMWindow> window = do_QueryInterface(target);
|
|
|
|
MOZ_ASSERT(window);
|
|
|
|
|
|
|
|
nsCOMPtr<nsIDOMDocument> doc;
|
|
|
|
window->GetDocument(getter_AddRefs(doc));
|
|
|
|
// If we have no doc, we will just continue, remove the event and unlock.
|
|
|
|
// This is an edge case were orientation lock and fullscreen is meaningless.
|
|
|
|
if (doc) {
|
|
|
|
bool fullscreen;
|
|
|
|
doc->GetMozFullScreen(&fullscreen);
|
|
|
|
if (fullscreen) {
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-03-29 09:31:11 -07:00
|
|
|
target->RemoveSystemEventListener(NS_LITERAL_STRING("mozfullscreenchange"),
|
|
|
|
this, true);
|
|
|
|
|
|
|
|
hal::UnlockScreenOrientation();
|
|
|
|
|
|
|
|
return NS_OK;
|
|
|
|
}
|