Loading packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +0 −20 Original line number Diff line number Diff line Loading @@ -18,10 +18,8 @@ package com.android.systemui.screenshot; import static android.content.res.Configuration.ORIENTATION_LANDSCAPE; import static android.content.res.Configuration.ORIENTATION_PORTRAIT; import static android.provider.DeviceConfig.NAMESPACE_SYSTEMUI; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.SCREENSHOT_SCROLLING_ENABLED; import static com.android.systemui.statusbar.phone.StatusBar.SYSTEM_DIALOG_REASON_SCREENSHOT; import android.animation.Animator; Loading Loading @@ -51,7 +49,6 @@ import android.graphics.Region; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; import android.graphics.drawable.InsetDrawable; import android.graphics.drawable.LayerDrawable; import android.media.MediaActionSound; Loading @@ -62,7 +59,6 @@ import android.os.Message; import android.os.PowerManager; import android.os.RemoteException; import android.os.UserHandle; import android.provider.DeviceConfig; import android.provider.Settings; import android.util.DisplayMetrics; import android.util.Log; Loading Loading @@ -955,22 +951,6 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset }); mScreenshotPreview.setContentDescription(imageData.editAction.title); if (DeviceConfig.getBoolean(NAMESPACE_SYSTEMUI, SCREENSHOT_SCROLLING_ENABLED, false)) { ScreenshotActionChip scrollChip = (ScreenshotActionChip) inflater.inflate( R.layout.global_screenshot_action_chip, mActionsView, false); Toast scrollNotImplemented = Toast.makeText( mContext, "Not implemented", Toast.LENGTH_SHORT); scrollChip.setText("Extend"); // TODO: add resource and translate scrollChip.setIcon( Icon.createWithResource(mContext, R.drawable.ic_arrow_downward), true); scrollChip.setOnClickListener(v -> { mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_SCROLL_TAPPED); scrollNotImplemented.show(); }); mActionsView.addView(scrollChip); chips.add(scrollChip); } // remove the margin from the last chip so that it's correctly aligned with the end LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) mActionsView.getChildAt(mActionsView.getChildCount() - 1).getLayoutParams(); Loading Loading
packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +0 −20 Original line number Diff line number Diff line Loading @@ -18,10 +18,8 @@ package com.android.systemui.screenshot; import static android.content.res.Configuration.ORIENTATION_LANDSCAPE; import static android.content.res.Configuration.ORIENTATION_PORTRAIT; import static android.provider.DeviceConfig.NAMESPACE_SYSTEMUI; import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.SCREENSHOT_SCROLLING_ENABLED; import static com.android.systemui.statusbar.phone.StatusBar.SYSTEM_DIALOG_REASON_SCREENSHOT; import android.animation.Animator; Loading Loading @@ -51,7 +49,6 @@ import android.graphics.Region; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.Icon; import android.graphics.drawable.InsetDrawable; import android.graphics.drawable.LayerDrawable; import android.media.MediaActionSound; Loading @@ -62,7 +59,6 @@ import android.os.Message; import android.os.PowerManager; import android.os.RemoteException; import android.os.UserHandle; import android.provider.DeviceConfig; import android.provider.Settings; import android.util.DisplayMetrics; import android.util.Log; Loading Loading @@ -955,22 +951,6 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset }); mScreenshotPreview.setContentDescription(imageData.editAction.title); if (DeviceConfig.getBoolean(NAMESPACE_SYSTEMUI, SCREENSHOT_SCROLLING_ENABLED, false)) { ScreenshotActionChip scrollChip = (ScreenshotActionChip) inflater.inflate( R.layout.global_screenshot_action_chip, mActionsView, false); Toast scrollNotImplemented = Toast.makeText( mContext, "Not implemented", Toast.LENGTH_SHORT); scrollChip.setText("Extend"); // TODO: add resource and translate scrollChip.setIcon( Icon.createWithResource(mContext, R.drawable.ic_arrow_downward), true); scrollChip.setOnClickListener(v -> { mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_SCROLL_TAPPED); scrollNotImplemented.show(); }); mActionsView.addView(scrollChip); chips.add(scrollChip); } // remove the margin from the last chip so that it's correctly aligned with the end LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) mActionsView.getChildAt(mActionsView.getChildCount() - 1).getLayoutParams(); Loading