This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Script to generate dependency graphs for each of the modules. The --exclude-module parameter can | |
# be used to exclude modules which are not part of the root dependency graph (and which, if included | |
# would cause the script to fail. | |
# | |
# Usage: generateModuleGraphs.sh --exclude-module :benchmarks --exclude-module :lint --exclude-module :ui-test-hilt-manifest | |
# Check if the dot command is available | |
if ! command -v dot &> /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onFormSubmit(event) { | |
record_array = [] | |
var form = FormApp.openById('1kpoqfzJ4QGlYU5iDkeeTNheCe3AfeTZ4Eu-AmnbIQv4'); // Form ID | |
var formResponses = form.getResponses(); | |
var formCount = formResponses.length; | |
var formResponse = formResponses[formCount - 1]; | |
var itemResponses = formResponse.getItemResponses(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ConnectionLiveData(context: Context) : LiveData<Boolean>() { | |
private lateinit var networkCallback: ConnectivityManager.NetworkCallback | |
private val cm = context.getSystemService(CONNECTIVITY_SERVICE) as ConnectivityManager | |
private val validNetworks: MutableSet<Network> = HashSet() | |
private fun checkValidNetworks() { | |
postValue(validNetworks.size > 0) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoginActivity extends AccountAuthenticatorActivity | |
implements OAuthWebviewHelperEvents { | |
public static final int PICK_SERVER_REQUEST_CODE = 10; | |
private static final String TAG = "LoginActivity"; | |
private boolean wasBackgrounded; | |
private OAuthWebviewHelper webviewHelper; | |
private ChangeServerReceiver changeServerReceiver; | |
private boolean receiverRegistered; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open class DaggerAuthenticatorActivity : DaggerAppCompatActivity() { | |
private var mAccountAuthenticatorResponse: AccountAuthenticatorResponse? = null | |
private var mResultBundle: Bundle? = null | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
mAccountAuthenticatorResponse = | |
intent.getParcelableExtra(AccountManager.KEY_ACCOUNT_AUTHENTICATOR_RESPONSE) | |
if (mAccountAuthenticatorResponse != null) { | |
mAccountAuthenticatorResponse!!.onRequestContinued() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddressFragment : Fragment() { | |
private lateinit var binding: AddressFragmentBinding | |
private var launcher = registerForActivityResult(AddressAutoComplete()) { place -> | |
if (place != null) { | |
val geocoder = Geocoder(activity) | |
var address : Address? = null | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddressAutoComplete : ActivityResultContract<Unit, Place?>() { | |
override fun createIntent(context: Context, input: Unit?): Intent { | |
val fields = listOf(Place.Field.ADDRESS, Place.Field.NAME) | |
return Autocomplete.IntentBuilder( | |
AutocompleteActivityMode.OVERLAY, fields) | |
.build(context) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OAuthActivity : DaggerAuthenticatorActivity(), OAuthWebviewHelperEvents, EventsObserver { | |
private val timeoutHandler = Handler(Looper.myLooper()!!) | |
private var webViewHelper: OAuthWebviewHelper? = null | |
private lateinit var binding: ActivityOauthBinding | |
private var wasBackgrounded = false | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class SalesforceActivityCompat : AppCompatActivity(), SalesforceActivityInterface { | |
private lateinit var delegate: SalesforceActivityDelegate | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
delegate = SalesforceActivityDelegate(this) | |
delegate.onCreate() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* handleSamplingAndRotationBitmap We | |
* | |
* @param context: we use the parameter context to get content resolver | |
* @selectedImage: this is an Uri that we later convert into a bitmap | |
*/ | |
@Throws(IOException::class) | |
fun handleSamplingAndRotationBitmap( | |
context: Context?, |