Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
package com.linkedin.android.shaky.app;

import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
Expand All @@ -24,7 +23,6 @@
import androidx.fragment.app.FragmentActivity;

import com.linkedin.android.shaky.ActionConstants;
import com.linkedin.android.shaky.Shaky;

import java.util.Random;

Expand All @@ -36,9 +34,6 @@ public class ShakyDemo extends FragmentActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_demo);

// Initialize ScreenCaptureManager for the Shaky library
((ShakyApplication) getApplication()).getShaky().initializeScreenCapture(this);

ViewCompat.setOnApplyWindowInsetsListener(
getWindow().findViewById(R.id.demo_background),
Expand Down Expand Up @@ -78,11 +73,6 @@ public void onClick(View v) {
}
});

findViewById(R.id.open_bottom_sheet_button).setOnClickListener(v -> {
SampleBottomSheetDialog bottomSheetDialogFragment = new SampleBottomSheetDialog();
bottomSheetDialogFragment.show(this.getSupportFragmentManager(), bottomSheetDialogFragment.getTag());
});

findViewById(R.id.demo_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Expand All @@ -104,16 +94,5 @@ public void onClick(View v) {
((ShakyApplication) getApplication()).getShaky().startShakeBottomSheetFlowManually();
}
});

((ShakyApplication)getApplication()).getShaky().setUseMediaProjection(true);
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Shaky shaky = ((ShakyApplication) getApplication()).getShaky();
if (!shaky.handleActivityResult(requestCode, resultCode, data)) {
// If Shaky did not handle the result, call the super method
super.onActivityResult(requestCode, resultCode, data);
}
}
}
7 changes: 0 additions & 7 deletions shaky-sample/src/main/res/layout/activity_demo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,6 @@
android:layout_height="wrap_content"
android:text="@string/manual_feedback_trigger"/>

<Button
android:id="@+id/open_bottom_sheet_button"
style="?attr/borderlessButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/open_bottom_sheet"/>

<Button
android:id="@+id/demo_bug_report_button"
style="?attr/borderlessButtonStyle"
Expand Down
1 change: 0 additions & 1 deletion shaky-sample/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<string name="app_name" translatable="false">Shaky</string>
<string name="shake_me" translatable="false">Shake me!</string>
<string name="manual_feedback_trigger" translatable="false">Manually start feedback</string>
<string name="open_bottom_sheet" translatable="false">Open Bottom Sheet modal</string>
<string name="manual_bug_report" translatable="false">Manually start bug report</string>
<string name="manual_bottom_sheet" translatable="false">Manually launch bottom sheet</string>
<string name="show_toast" translatable="false">Show Toast</string>
Expand Down
19 changes: 0 additions & 19 deletions shaky-sample/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,6 @@
<item name="windowActionBar">false</item>
</style>

<!-- Custom BottomSheetDialog style with elevation -->
<style name="CustomBottomSheetDialog" parent="Theme.MaterialComponents.Light.BottomSheetDialog">
<item name="android:windowIsFloating">false</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowSoftInputMode">adjustResize</item>
<item name="bottomSheetStyle">@style/CustomBottomSheet</item>
</style>

<style name="CustomBottomSheet" parent="Widget.MaterialComponents.BottomSheet">
<item name="android:background">@android:color/transparent</item>
<item name="shapeAppearanceOverlay">@style/CustomShapeAppearanceBottomSheetDialog</item>
</style>

<style name="CustomShapeAppearanceBottomSheetDialog" parent="">
<item name="cornerFamily">rounded</item>
<item name="cornerSizeTopRight">16dp</item>
<item name="cornerSizeTopLeft">16dp</item>
</style>

<style name="ShakyChristmasToolbarTheme" parent="@style/ShakyBaseToolbarTheme">
<item name="android:background">@color/red</item>
</style>
Expand Down
11 changes: 0 additions & 11 deletions shaky/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,8 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<!-- Permission for foreground service -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!-- Permission specifically for media projection foreground service type on Android 10+ -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />

<application android:supportsRtl="true">
<activity android:name="com.linkedin.android.shaky.FeedbackActivity" />

<!-- Foreground service for MediaProjection -->
<service
android:name=".ScreenCaptureService"
android:enabled="true"
android:exported="false"
android:foregroundServiceType="mediaProjection" />
</application>
</manifest>
Loading