Android build for ungoogled-chromium. https://uc.droidware.info
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

188 lines
9.8 KiB

description: For whatever reason the new APIs are not in beta SDK yet. Remove reference to Android S until we can update sdk rebuilds.
author: Wengling Chen <[email protected]>
---
base/android/java/src/org/chromium/base/compat/ApiHelperForS.java | 13 ++-----
chrome/android/java/AndroidManifest.xml | 2 -
chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiWindowUtils.java | 2 -
chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java | 7 ----
chrome/browser/share/android/java_sources.gni | 2 -
components/permissions/android/java/src/org/chromium/components/permissions/BluetoothChooserDialog.java | 17 ----------
device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java | 5 --
7 files changed, 9 insertions(+), 39 deletions(-)
--- a/base/android/java/src/org/chromium/base/compat/ApiHelperForS.java
+++ b/base/android/java/src/org/chromium/base/compat/ApiHelperForS.java
@@ -36,7 +36,7 @@ public final class ApiHelperForS {
* See {@link ClipDescription#isStyleText()}.
*/
public static boolean isStyleText(ClipDescription clipDescription) {
- return clipDescription.isStyledText();
+ return false;
}
/**
@@ -44,7 +44,7 @@ public final class ApiHelperForS {
*/
public static float getConfidenceScore(
ClipDescription clipDescription, @NonNull String entityType) {
- return clipDescription.getConfidenceScore(entityType);
+ return 0.f;
}
/**
@@ -52,20 +52,18 @@ public final class ApiHelperForS {
* ClipDescription.CLASSIFICATION_COMPLETE.
*/
public static boolean isGetClassificationStatusIsComplete(ClipDescription clipDescription) {
- return clipDescription.getClassificationStatus() == ClipDescription.CLASSIFICATION_COMPLETE;
+ return false;
}
/**
* See {@link ClipData.Item#getTextLinks()}.
*/
public static TextLinks getTextLinks(ClipData.Item item) {
- return item.getTextLinks();
+ return null;
}
public static boolean hasBluetoothConnectPermission() {
- return ApiCompatibilityUtils.checkPermission(ContextUtils.getApplicationContext(),
- Manifest.permission.BLUETOOTH_CONNECT, Process.myPid(), Process.myUid())
- == PackageManager.PERMISSION_GRANTED;
+ return false;
}
/**
@@ -73,6 +71,5 @@ public final class ApiHelperForS {
*/
public static void setAutoEnterEnabled(
PictureInPictureParams.Builder builder, boolean enabled) {
- builder.setAutoEnterEnabled(enabled);
}
}
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -57,7 +57,7 @@ by a child template that "extends" this
filtered view of devices.
-->
<uses-permission-sdk-23 android:name="android.permission.BLUETOOTH_SCAN"
- android:usesPermissionFlags="neverForLocation"/>
+ />
<uses-permission-sdk-23 android:name="android.permission.READ_CONTACTS"/>
<uses-permission-sdk-23 android:name="android.permission.REORDER_TASKS"/>
--- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java
+++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothAdapter.java
@@ -220,10 +220,7 @@ final class ChromeBluetoothAdapter exten
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
Context context = mAdapter.getContext();
- return context.checkCallingOrSelfPermission(Manifest.permission.BLUETOOTH_SCAN)
- == PackageManager.PERMISSION_GRANTED
- && context.checkCallingOrSelfPermission(Manifest.permission.BLUETOOTH_CONNECT)
- == PackageManager.PERMISSION_GRANTED;
+ return false;
}
LocationUtils locationUtils = LocationUtils.getInstance();
--- a/components/permissions/android/java/src/org/chromium/components/permissions/BluetoothChooserDialog.java
+++ b/components/permissions/android/java/src/org/chromium/components/permissions/BluetoothChooserDialog.java
@@ -361,16 +361,9 @@ public class BluetoothChooserDialog
break;
case LinkType.REQUEST_PERMISSIONS:
mItemChooserDialog.setIgnorePendingWindowFocusChangeForClose(true);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
- mWindowAndroid.requestPermissions(
- new String[] {Manifest.permission.BLUETOOTH_SCAN,
- Manifest.permission.BLUETOOTH_CONNECT},
- BluetoothChooserDialog.this);
- } else {
- mWindowAndroid.requestPermissions(
+ mWindowAndroid.requestPermissions(
new String[] {Manifest.permission.ACCESS_FINE_LOCATION},
BluetoothChooserDialog.this);
- }
break;
case LinkType.REQUEST_LOCATION_SERVICES:
mItemChooserDialog.setIgnorePendingWindowFocusChangeForClose(true);
@@ -393,19 +386,11 @@ public class BluetoothChooserDialog
}
private static boolean hasSystemPermissions(WindowAndroid windowAndroid) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
- return windowAndroid.hasPermission(Manifest.permission.BLUETOOTH_SCAN)
- && windowAndroid.hasPermission(Manifest.permission.BLUETOOTH_CONNECT);
- }
return windowAndroid.hasPermission(Manifest.permission.ACCESS_FINE_LOCATION);
}
private static boolean canRequestSystemPermissions(WindowAndroid windowAndroid) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
- return windowAndroid.canRequestPermission(Manifest.permission.BLUETOOTH_SCAN)
- && windowAndroid.canRequestPermission(Manifest.permission.BLUETOOTH_CONNECT);
- }
return windowAndroid.canRequestPermission(Manifest.permission.ACCESS_FINE_LOCATION);
}
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java
@@ -74,7 +74,6 @@ import org.chromium.chrome.browser.prefe
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.chrome.browser.read_later.ReadLaterIPHController;
import org.chromium.chrome.browser.share.ShareDelegate;
-import org.chromium.chrome.browser.share.scroll_capture.ScrollCaptureManager;
import org.chromium.chrome.browser.signin.SyncConsentActivityLauncherImpl;
import org.chromium.chrome.browser.signin.ui.SigninPromoUtil;
import org.chromium.chrome.browser.status_indicator.StatusIndicatorCoordinator;
@@ -152,7 +151,6 @@ public class TabbedRootUiCoordinator ext
private TabObscuringHandler.Observer mContinuousSearchTabObscuringHandlerObserver;
private FindToolbarObserver mContinuousSearchFindToolbarObserver;
private MerchantTrustSignalsCoordinator mMerchantTrustSignalsCoordinator;
- private @Nullable ScrollCaptureManager mScrollCaptureManager;
private CommerceSubscriptionsService mCommerceSubscriptionsService;
private UndoGroupSnackbarController mUndoGroupSnackbarController;
private final IntentRequestTracker mIntentRequestTracker;
@@ -382,10 +380,6 @@ public class TabbedRootUiCoordinator ext
mCommerceSubscriptionsService = null;
}
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && mScrollCaptureManager != null) {
- mScrollCaptureManager.destroy();
- mScrollCaptureManager = null;
- }
super.onDestroy();
}
@@ -544,7 +538,6 @@ public class TabbedRootUiCoordinator ext
return;
}
- mScrollCaptureManager = new ScrollCaptureManager(mActivityTabProvider);
}
// Protected class methods
--- a/chrome/browser/share/android/java_sources.gni
+++ b/chrome/browser/share/android/java_sources.gni
@@ -51,8 +51,6 @@ share_java_sources = [
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetView.java",
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetViewBinder.java",
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetViewProperties.java",
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/scroll_capture/ScrollCaptureCallbackImpl.java",
- "//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/scroll_capture/ScrollCaptureManager.java",
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/send_tab_to_self/DevicePickerBottomSheetAdapter.java",
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/send_tab_to_self/DevicePickerBottomSheetContent.java",
"//chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/send_tab_to_self/MetricsRecorder.java",
--- a/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiWindowUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiWindowUtils.java
@@ -114,7 +114,7 @@ public class MultiWindowUtils implements
ComponentName comp = new ComponentName(packageName, className);
try {
int launchMode = context.getPackageManager().getActivityInfo(comp, 0).launchMode;
- return launchMode == ActivityInfo.LAUNCH_SINGLE_INSTANCE_PER_TASK;
+ return false;
} catch (PackageManager.NameNotFoundException e) {
return false;
}