Giter VIP home page Giter VIP logo

Comments (3)

uccmawei avatar uccmawei commented on May 27, 2024 1

@QuincySx 阿西吧,简直无语,API都被他们砍掉了,那只能我这边改一下了,谢谢大兄弟的提醒!

from fingerprintidentify.

uccmawei avatar uccmawei commented on May 27, 2024

@QuincySx 这么神奇?我没有OPPO机器,我这里没法测试这点

public final T getSystemService(Class serviceClass) {
// Because subclasses may override getSystemService(String) we cannot
// perform a lookup by class alone. We must first map the class to its
// service name then invoke the string-based method.
String serviceName = getSystemServiceName(serviceClass);
return serviceName != null ? (T)getSystemService(serviceName) : null;
}

但是根据代码来看,2个方法最后都是调用到同一个方法的呀,除非是OPPO把这段代码改掉了?

getSystemServiceName(FingerprintManager.class)
Context.FINGERPRINT_SERVICE

context.getSystemService(FingerprintManager.class);
context.getSystemService(FINGERPRINT_SERVICE);

你可以对比下这几个方法或者常量在你的OPPO机器上的返回值吗?

from fingerprintidentify.

QuincySx avatar QuincySx commented on May 27, 2024

1.使用这个方法会抛出异常
context.getSystemService(FingerprintManager.class);

java.lang.NoSuchMethodError: No virtual method getSystemService(Ljava/lang/Class;)Ljava/lang/Object; in class Landroid/content/Context; or its super classes (declaration of 'android.content.Context' appears in /system/framework/framework.jar:classes2.dex)

2.这个方法也会抛出异常
context.getSystemServiceName(FingerprintManager.class)

java.lang.NoSuchMethodError: No virtual method getSystemServiceName(Ljava/lang/Class;)Ljava/lang/String; in class Landroid/content/Context; or its super classes (declaration of 'android.content.Context' appears in /system/framework/framework.jar:classes2.dex)

3.正常返回 FingerprintManager
context.getSystemService(FINGERPRINT_SERVICE);

4.FINGERPRINT_SERVICE 的值 “fingerprint”

from fingerprintidentify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.