Skip to content

Commit 9830732

Browse files
committed
Refactor: Remove @Sample annotation
Removes the `@Sample` annotation from multiple sample files. The affected files include: - `PhotoPicker.kt` - `DragAndDrop.kt` - `MediaStoreQuery.kt` - `DataAccess.kt` - `SelectedPhotosAccess.kt` - `ScreenshotDetection.kt` These annotations are no longer needed or are being replaced by other mechanisms.
1 parent 49c4592 commit 9830732

File tree

6 files changed

+0
-39
lines changed

6 files changed

+0
-39
lines changed

samples/privacy/transparency/src/main/java/com/example/platform/privacy/transparency/DataAccess.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,10 @@ import androidx.compose.ui.platform.LocalContext
4747
import androidx.compose.ui.platform.LocalLifecycleOwner
4848
import androidx.compose.ui.unit.dp
4949
import androidx.core.app.AppOpsManagerCompat
50-
//import androidx.core.content.getSystemService
5150
import androidx.lifecycle.Lifecycle
5251
import androidx.lifecycle.LifecycleEventObserver
5352
import androidx.lifecycle.LifecycleOwner
54-
//import com.example.platform.base.PermissionBox
5553
import com.example.platform.shared.PermissionBox
56-
//import com.google.android.catalog.framework.annotations.Sample
5754
import com.google.android.gms.location.LocationServices
5855
import com.google.android.gms.location.Priority
5956
import com.google.android.gms.tasks.CancellationTokenSource
@@ -62,13 +59,6 @@ import kotlinx.coroutines.launch
6259
import kotlinx.coroutines.tasks.await
6360

6461
@SuppressLint("MissingPermission")
65-
//@Sample(
66-
// name = "Data Access",
67-
// description = "Demonstrates how to implement data access auditing for your app to identify " +
68-
// "unexpected data access, even from third-party SDKs and libraries.",
69-
// documentation = "https://developer.android.com/guide/topics/data/audit-access",
70-
//)
71-
7262
@RequiresApi(Build.VERSION_CODES.R)
7363
@Composable
7464
fun DataAccessSample() {

samples/privacy/transparency/src/main/java/com/example/platform/privacy/transparency/ScreenshotDetection.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ import androidx.fragment.app.Fragment
3939
import java.text.DateFormat
4040
import java.util.Date
4141

42-
//@Sample(
43-
// name = "Screenshot Detection",
44-
// description = "This sample shows how to detect that the user capture the screen in Android 14 onwards",
45-
//)
4642
@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
4743
class ScreenshotDetectionSample : Fragment() {
4844

samples/storage/src/main/java/com/example/platform/storage/mediastore/MediaStoreQuery.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,10 @@ import androidx.compose.ui.platform.LocalContext
4545
import androidx.compose.ui.text.style.TextOverflow
4646
import androidx.compose.ui.unit.dp
4747
import coil.compose.AsyncImage
48-
//import com.example.platform.base.PermissionBox
4948
import com.example.platform.shared.PermissionBox
50-
//import com.google.android.catalog.framework.annotations.Sample
5149
import kotlinx.coroutines.Dispatchers
5250
import kotlinx.coroutines.withContext
5351

54-
//@Sample(
55-
// name = "MediaStore - Query",
56-
// description = "Query files indexed by MediaStore",
57-
// documentation = "https://developer.android.com/training/data-storage/shared/media#media_store",
58-
//)
5952
@SuppressLint("MissingPermission")
6053
@Composable
6154
fun MediaStoreQuerySample() {

samples/storage/src/main/java/com/example/platform/storage/mediastore/SelectedPhotosAccess.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ import kotlinx.coroutines.Dispatchers
4848
import kotlinx.coroutines.launch
4949
import kotlinx.coroutines.withContext
5050

51-
//@Sample(
52-
// name = "Selected Photos Access",
53-
// description = "Check and request storage permissions",
54-
// documentation = "https://developer.android.com/about/versions/14/changes/partial-photo-video-access",
55-
//)
56-
//@RequiresPermission(anyOf = [READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, READ_EXTERNAL_STORAGE])
5751
@Composable
5852
fun SelectedPhotosAccessSample() {
5953
val context = LocalContext.current

samples/storage/src/main/java/com/example/platform/storage/photopicker/PhotoPicker.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ import coil.compose.AsyncImage
5959
* picker. Check out the AndroidManifest.xml of the storage section to see the <service> declaration
6060
* that enables backport support on Android KitKat onwards using Google Play Services
6161
*/
62-
@OptIn(ExperimentalMaterial3Api::class)
63-
//@Sample(
64-
// name = "PhotoPicker",
65-
// description = "Select images/videos in a privacy-friendly way using the photo picker",
66-
// documentation = "https://developer.android.com/training/data-storage/shared/photopicker",
67-
//)
6862
@Composable
6963
fun PhotoPickerSample() {
7064
var selectedMedia by remember { mutableStateOf(emptyList<Uri>()) }

samples/user-interface/draganddrop/src/main/java/com/example/platform/ui/draganddrop/DragAndDrop.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ private const val TAG = "DragDropSample"
5050
private const val MAX_LENGTH = 200
5151

5252
@RequiresApi(24)
53-
/*@Sample(
54-
name = "Drag and Drop",
55-
description = "Demonstrates basic Drag and Drop functionality.",
56-
documentation = "https://developer.android.com/develop/ui/views/touch-and-input/drag-drop",
57-
)
58-
*/
5953
@Deprecated("The new sample include segregated examples individually for Views, DragAndDropHelper, RichContentReceiver along with Compose")
6054
class DragAndDropActivity : AppCompatActivity() {
6155

0 commit comments

Comments
 (0)