File tree 4 files changed +18
-0
lines changed
calendar/src/java/ti/modules/titanium/calendar
contacts/src/java/ti/modules/titanium/contacts
filesystem/src/java/ti/modules/titanium/filesystem
media/src/java/ti/modules/titanium/media
4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 10
10
import java .util .ArrayList ;
11
11
12
12
import android .provider .CalendarContract ;
13
+
14
+ import org .appcelerator .kroll .KrollDict ;
13
15
import org .appcelerator .kroll .KrollFunction ;
14
16
import org .appcelerator .kroll .KrollModule ;
15
17
import org .appcelerator .kroll .annotations .Kroll ;
@@ -127,6 +129,9 @@ public boolean hasCalendarPermissions()
127
129
public void requestCalendarPermissions (@ Kroll .argument (optional = true ) KrollFunction permissionCallback )
128
130
{
129
131
if (hasCalendarPermissions ()) {
132
+ KrollDict response = new KrollDict ();
133
+ response .putCodeAndMessage (0 , null );
134
+ permissionCallback .callAsync (getKrollObject (), response );
130
135
return ;
131
136
}
132
137
Original file line number Diff line number Diff line change @@ -83,6 +83,9 @@ public boolean hasContactsPermissions()
83
83
public void requestContactsPermissions (@ Kroll .argument (optional = true ) KrollFunction permissionCallback )
84
84
{
85
85
if (hasContactsPermissions ()) {
86
+ KrollDict response = new KrollDict ();
87
+ response .putCodeAndMessage (0 , null );
88
+ permissionCallback .callAsync (getKrollObject (), response );
86
89
return ;
87
90
}
88
91
Original file line number Diff line number Diff line change 15
15
import android .content .Context ;
16
16
import android .content .pm .PackageManager ;
17
17
import android .os .Build ;
18
+ import org .appcelerator .kroll .KrollDict ;
18
19
import org .appcelerator .kroll .KrollFunction ;
19
20
import org .appcelerator .kroll .KrollInvocation ;
20
21
import org .appcelerator .kroll .KrollModule ;
@@ -111,6 +112,9 @@ private boolean hasStoragePermissions()
111
112
public void requestStoragePermissions (@ Kroll .argument (optional = true ) KrollFunction permissionCallback )
112
113
{
113
114
if (hasStoragePermissions ()) {
115
+ KrollDict response = new KrollDict ();
116
+ response .putCodeAndMessage (0 , null );
117
+ permissionCallback .callAsync (getKrollObject (), response );
114
118
return ;
115
119
}
116
120
Original file line number Diff line number Diff line change @@ -541,6 +541,9 @@ public void showCamera(@SuppressWarnings("rawtypes") HashMap options)
541
541
public void requestCameraPermissions (@ Kroll .argument (optional = true ) KrollFunction permissionCallback )
542
542
{
543
543
if (hasCameraPermissions ()) {
544
+ KrollDict response = new KrollDict ();
545
+ response .putCodeAndMessage (0 , null );
546
+ permissionCallback .callAsync (getKrollObject (), response );
544
547
return ;
545
548
}
546
549
@@ -565,6 +568,9 @@ public void requestCameraPermissions(@Kroll.argument(optional = true) KrollFunct
565
568
public void requestAudioRecorderPermissions (@ Kroll .argument (optional = true ) KrollFunction permissionCallback )
566
569
{
567
570
if (hasAudioRecorderPermissions ()) {
571
+ KrollDict response = new KrollDict ();
572
+ response .putCodeAndMessage (0 , null );
573
+ permissionCallback .callAsync (getKrollObject (), response );
568
574
return ;
569
575
}
570
576
String [] permissions = new String [] { Manifest .permission .RECORD_AUDIO };
You can’t perform that action at this time.
0 commit comments