Key | Description | Uses |
audio.safemedia.force | true for safe media volume | https://android.googlesource.com/platform/frameworks/base/+/master/services/core/java/com/android/server/audio/AudioService.java |
config.disable_bluetooth | - | SystemServer |
config.disable_location | - | SystemServer |
This file contains hidden or 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
import androidx.lifecycle.LiveData | |
import androidx.lifecycle.Observer | |
import androidx.lifecycle.liveData | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.ExperimentalCoroutinesApi | |
import kotlinx.coroutines.channels.awaitClose | |
import kotlinx.coroutines.flow.* | |
import kotlin.time.Duration | |
import kotlin.time.ExperimentalTime | |
import kotlin.time.seconds |
This file contains hidden or 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
import java.util.Iterator; | |
import java.util.NoSuchElementException; | |
import com.google.common.base.Preconditions; | |
/** | |
* Provides data from a matrix represented using a 2D array | |
* | |
* @author Dhwaneet Bhatt | |
* @since Aug 17, 2016 |
This file contains hidden or 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
// When the EditText is touched, disable touches on it's ScrollView's parents. | |
// Once the user lifts up their finger, enable touches on on the ScrollView's parents once again. | |
@OnTouch(R.id.edit_text) | |
boolean handleNoteFieldTouch(View v, MotionEvent event) { | |
v.getParent().getParent().requestDisallowInterceptTouchEvent(true); | |
switch (event.getAction() & MotionEvent.ACTION_MASK){ | |
case MotionEvent.ACTION_UP: | |
v.getParent().getParent().requestDisallowInterceptTouchEvent(false); | |
break; |
This file contains hidden or 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
Below are the Big O performance of common functions of different Java Collections. | |
List | Add | Remove | Get | Contains | Next | Data Structure | |
---------------------|------|--------|------|----------|------|--------------- | |
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array | |
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List | |
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array |