Please avoid using it for everything that can be fixed trivially, and delaying fixes to future 19 | * diffs without a good reason. 20 | * 21 | *
To use it list one of the type of issue you want to ignore, and supply and extra string 22 | * explaining why this is okay for this case. 23 | * 24 | *
{@code 25 | * @ExcusesForDesignViolations( 26 | * @Excuse(type = "STORY_VIEWER_CAPITALIZATION", reason = "Legacy"), 27 | * @Excuse(type = "MISSING_JAVA_DOC", reason = "DI Module") ) }28 | */ 29 | @Retention(RetentionPolicy.SOURCE) 30 | @Target(AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CLASS) 31 | annotation class ExcusesForDesignViolations(vararg val value: Excuse) 32 | -------------------------------------------------------------------------------- /facebook-core/src/main/java/com/facebook/login/DefaultAudience.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | package com.facebook.login 10 | 11 | import com.facebook.internal.NativeProtocol 12 | 13 | /** 14 | * Certain operations such as publishing a status or publishing a photo require an audience. When 15 | * the user grants an application permission to perform a publish operation, a default audience is 16 | * selected as the publication ceiling for the application. This enumerated value allows the 17 | * application to select which audience to ask the user to grant publish permission for. 18 | */ 19 | enum class DefaultAudience(val nativeProtocolAudience: String?) { 20 | /** Represents an invalid default audience value, can be used when only reading. */ 21 | NONE(null), 22 | 23 | /** Indicates only the user is able to see posts made by the application. */ 24 | ONLY_ME(NativeProtocol.AUDIENCE_ME), 25 | 26 | /** Indicates that the user's friends are able to see posts made by the application. */ 27 | FRIENDS(NativeProtocol.AUDIENCE_FRIENDS), 28 | /** Indicates that all Facebook users are able to see posts made by the application. */ 29 | EVERYONE(NativeProtocol.AUDIENCE_EVERYONE) 30 | } 31 | -------------------------------------------------------------------------------- /facebook-core/src/main/java/com/facebook/login/LoginTargetApp.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | package com.facebook.login 10 | 11 | enum class LoginTargetApp(private val targetApp: String) { 12 | FACEBOOK("facebook"), 13 | INSTAGRAM("instagram"); 14 | 15 | override fun toString(): String = targetApp 16 | 17 | companion object { 18 | /** 19 | * Return the LoginTargetApp by given string 20 | * 21 | * @param stringValue 22 | * @return LoginTargetApp default return LoginTargetApp.FACEBOOK 23 | */ 24 | @JvmStatic 25 | fun fromString(stringValue: String?): LoginTargetApp { 26 | for (targetApp in values()) { 27 | if (targetApp.toString() == stringValue) { 28 | return targetApp 29 | } 30 | } 31 | return FACEBOOK 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /facebook-core/src/main/res/xml/ad_services_config.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 22 | 23 |