"Fossies" - the Fresh Open Source Software Archive

Member "jitsi-meet-5186/ios/sdk/src/Proximity.m" (30 Jul 2021, 1280 Bytes) of package /linux/misc/jitsi-meet-5186.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Matlab source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 /*
    2  * Copyright @ 2017-present Atlassian Pty Ltd
    3  *
    4  * Licensed under the Apache License, Version 2.0 (the "License");
    5  * you may not use this file except in compliance with the License.
    6  * You may obtain a copy of the License at
    7  *
    8  *     http://www.apache.org/licenses/LICENSE-2.0
    9  *
   10  * Unless required by applicable law or agreed to in writing, software
   11  * distributed under the License is distributed on an "AS IS" BASIS,
   12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   13  * See the License for the specific language governing permissions and
   14  * limitations under the License.
   15  */
   16 
   17 #import <UIKit/UIKit.h>
   18 
   19 #import <React/RCTBridgeModule.h>
   20 
   21 @interface Proximity : NSObject<RCTBridgeModule>
   22 @end
   23 
   24 @implementation Proximity
   25 
   26 RCT_EXPORT_MODULE();
   27 
   28 - (dispatch_queue_t)methodQueue {
   29     return dispatch_get_main_queue();
   30 }
   31 
   32 /**
   33  * Enables / disables the proximity sensor monitoring. On iOS enabling the
   34  * proximity sensor automatically dims the screen and disables touch controls,
   35  * so there is nothing else to do (unlike on Android)!
   36  *
   37  * @param enabled `YES` to enable proximity (sensor) monitoring; `NO`,
   38  * otherwise.
   39  */
   40 RCT_EXPORT_METHOD(setEnabled:(BOOL)enabled) {
   41     [[UIDevice currentDevice] setProximityMonitoringEnabled:enabled];
   42 }
   43 
   44 @end