我无法Broadcast从作为系统应用程序加载到自定义 rom 中的应用程序发送一个(android:sharedUserId="android.uid.system"在 中使用Manifest)。
我遇到的问题是尝试执行简单的 sendBroadcast 时:
Intent newIntent = new Intent(intent.getExtras().getString(BUNDLE_ACTION_TO_REPLY_ON));
newIntent.putExtra(BUNDLE_FILE_URI, bitmapFile.getAbsolutePath());
newIntent.putExtra(BUNDLE_REPLY_WIDTH, width);
newIntent.putExtra(BUNDLE_REPLY_HEIGHT, height);
newIntent.putExtra(BUNDLE_REPLY_EXTRA, extra);
context.sendBroadcast(newIntent);
我在 Logcat 中收到此警告:
Calling a method in the system process without a qualified user
ContextImpl.java这是在这个过程中被抽出来的warnIfCallingFromSystemProcess()。
有谁知道为什么(如果我需要“修复”它)?