@@ -8,13 +8,13 @@ import BitmapFactory = android.graphics.BitmapFactory;
8
8
import Browser = android . provider . Browser ;
9
9
import Pattern = java . util . regex . Pattern ;
10
10
11
- import { Application , EventData , Utils } from ' @nativescript/core' ;
11
+ import { Application , EventData , Utils } from " @nativescript/core" ;
12
12
import {
13
13
ChromeTabsEvent ,
14
14
BROWSER_ACTIVITY_EVENTS ,
15
15
createStartIntent ,
16
16
createDismissIntent ,
17
- } from ' ./ChromeTabsManagerActivity' ;
17
+ } from " ./ChromeTabsManagerActivity" ;
18
18
import {
19
19
Animations ,
20
20
BrowserResult ,
@@ -24,7 +24,7 @@ import {
24
24
RedirectResolve ,
25
25
RedirectReject ,
26
26
BROWSER_TYPES ,
27
- } from ' ./InAppBrowser.common' ;
27
+ } from " ./InAppBrowser.common" ;
28
28
import {
29
29
Builder ,
30
30
getDrawableId ,
@@ -36,9 +36,9 @@ import {
36
36
getPreferredPackages ,
37
37
openAuthSessionPolyfillAsync ,
38
38
closeAuthSessionPolyfillAsync ,
39
- } from ' ./utils.android' ;
39
+ } from " ./utils.android" ;
40
40
41
- import { tryParseColor } from ' ./utils.common' ;
41
+ import { tryParseColor } from " ./utils.common" ;
42
42
43
43
declare let global : any ;
44
44
@@ -50,32 +50,32 @@ function setup() {
50
50
extends java . lang . Object
51
51
implements InAppBrowserClassMethods
52
52
{
53
- private static ERROR_CODE = ' InAppBrowser' ;
54
- private static KEY_TOOLBAR_COLOR = ' toolbarColor' ;
55
- private static KEY_SECONDARY_TOOLBAR_COLOR = ' secondaryToolbarColor' ;
56
- private static KEY_NAVIGATION_BAR_COLOR = ' navigationBarColor' ;
53
+ private static ERROR_CODE = " InAppBrowser" ;
54
+ private static KEY_TOOLBAR_COLOR = " toolbarColor" ;
55
+ private static KEY_SECONDARY_TOOLBAR_COLOR = " secondaryToolbarColor" ;
56
+ private static KEY_NAVIGATION_BAR_COLOR = " navigationBarColor" ;
57
57
private static KEY_NAVIGATION_BAR_DIVIDER_COLOR =
58
- ' navigationBarDividerColor' ;
59
- private static KEY_ENABLE_URL_BAR_HIDING = ' enableUrlBarHiding' ;
60
- private static KEY_SHOW_PAGE_TITLE = ' showTitle' ;
61
- private static KEY_DEFAULT_SHARE_MENU_ITEM = ' enableDefaultShare' ;
62
- private static KEY_FORCE_CLOSE_ON_REDIRECTION = ' forceCloseOnRedirection' ;
63
- private static KEY_ANIMATIONS = ' animations' ;
64
- private static KEY_HEADERS = ' headers' ;
65
- private static KEY_ANIMATION_START_ENTER = ' startEnter' ;
66
- private static KEY_ANIMATION_START_EXIT = ' startExit' ;
67
- private static KEY_ANIMATION_END_ENTER = ' endEnter' ;
68
- private static KEY_ANIMATION_END_EXIT = ' endExit' ;
69
- private static KEY_HAS_BACK_BUTTON = ' hasBackButton' ;
70
- private static KEY_BROWSER_PACKAGE = ' browserPackage' ;
71
- private static KEY_SHOW_IN_RECENTS = ' showInRecents' ;
72
- private static KEY_INCLUDE_REFERRER = ' includeReferrer' ;
58
+ " navigationBarDividerColor" ;
59
+ private static KEY_ENABLE_URL_BAR_HIDING = " enableUrlBarHiding" ;
60
+ private static KEY_SHOW_PAGE_TITLE = " showTitle" ;
61
+ private static KEY_DEFAULT_SHARE_MENU_ITEM = " enableDefaultShare" ;
62
+ private static KEY_FORCE_CLOSE_ON_REDIRECTION = " forceCloseOnRedirection" ;
63
+ private static KEY_ANIMATIONS = " animations" ;
64
+ private static KEY_HEADERS = " headers" ;
65
+ private static KEY_ANIMATION_START_ENTER = " startEnter" ;
66
+ private static KEY_ANIMATION_START_EXIT = " startExit" ;
67
+ private static KEY_ANIMATION_END_ENTER = " endEnter" ;
68
+ private static KEY_ANIMATION_END_EXIT = " endExit" ;
69
+ private static KEY_HAS_BACK_BUTTON = " hasBackButton" ;
70
+ private static KEY_BROWSER_PACKAGE = " browserPackage" ;
71
+ private static KEY_SHOW_IN_RECENTS = " showInRecents" ;
72
+ private static KEY_INCLUDE_REFERRER = " includeReferrer" ;
73
73
74
74
private static redirectResolve : RedirectResolve ;
75
75
private static redirectReject : RedirectReject ;
76
76
private isLightTheme : boolean ;
77
77
private currentActivity : any ;
78
- private animationIdentifierPattern = Pattern . compile ( ' ^.+:.+/' ) ;
78
+ private animationIdentifierPattern = Pattern . compile ( " ^.+:.+/" ) ;
79
79
80
80
constructor ( ) {
81
81
super ( ) ;
@@ -121,7 +121,7 @@ function setup() {
121
121
inAppBrowserOptions [ InAppBrowserModule . KEY_TOOLBAR_COLOR ] ;
122
122
this . isLightTheme = false ;
123
123
if ( colorString ) {
124
- const color = tryParseColor ( colorString , ' Invalid toolbar color' ) ;
124
+ const color = tryParseColor ( colorString , " Invalid toolbar color" ) ;
125
125
if ( color ) {
126
126
builder . setToolbarColor ( color . android ) ;
127
127
this . isLightTheme = toolbarIsLight ( color . android ) ;
@@ -132,7 +132,7 @@ function setup() {
132
132
if ( colorString ) {
133
133
const color = tryParseColor (
134
134
colorString ,
135
- ' Invalid secondary toolbar color'
135
+ " Invalid secondary toolbar color"
136
136
) ;
137
137
if ( color ) {
138
138
builder . setSecondaryToolbarColor ( color . android ) ;
@@ -143,7 +143,7 @@ function setup() {
143
143
if ( colorString ) {
144
144
const color = tryParseColor (
145
145
colorString ,
146
- ' Invalid navigation bar color'
146
+ " Invalid navigation bar color"
147
147
) ;
148
148
if ( color ) {
149
149
builder . setNavigationBarColor ( color . android ) ;
@@ -156,7 +156,7 @@ function setup() {
156
156
if ( colorString ) {
157
157
const color = tryParseColor (
158
158
colorString ,
159
- ' Invalid navigation bar divider color'
159
+ " Invalid navigation bar divider color"
160
160
) ;
161
161
if ( color ) {
162
162
builder . setNavigationBarDividerColor ( color . android ) ;
@@ -254,7 +254,7 @@ function setup() {
254
254
intent . putExtra (
255
255
Intent . EXTRA_REFERRER ,
256
256
Uri . parse (
257
- ' android-app://' + context . getApplicationContext ( ) . getPackageName ( )
257
+ " android-app://" + context . getApplicationContext ( ) . getPackageName ( )
258
258
)
259
259
) ;
260
260
}
@@ -283,7 +283,7 @@ function setup() {
283
283
BROWSER_ACTIVITY_EVENTS . off ( DISMISSED_EVENT ) ;
284
284
285
285
const result : BrowserResult = {
286
- type : ' dismiss' ,
286
+ type : " dismiss" ,
287
287
} ;
288
288
InAppBrowserModule . redirectResolve ( result ) ;
289
289
this . flowDidFinish ( ) ;
@@ -349,7 +349,7 @@ function setup() {
349
349
} else {
350
350
return context
351
351
. getResources ( )
352
- . getIdentifier ( identifier , ' anim' , context . getPackageName ( ) ) ;
352
+ . getIdentifier ( identifier , " anim" , context . getPackageName ( ) ) ;
353
353
}
354
354
}
355
355
@@ -417,7 +417,7 @@ function setup() {
417
417
return new InAppBrowserModule ( ) ;
418
418
}
419
419
420
- if ( typeof InAppBrowserModuleInstance === ' undefined' ) {
420
+ if ( typeof InAppBrowserModuleInstance === " undefined" ) {
421
421
InAppBrowserModuleInstance = setup ( ) ;
422
422
}
423
423
export const InAppBrowser = InAppBrowserModuleInstance ;
0 commit comments