OnePlusHighPowerDetector.isForkedProcInWhiteList

Please refer to the OnePlusHighPowerDetector.isProcInWhiteList hook documentation.

CollectionFif
GroupKill background apps
NameOnePlusHighPowerDetector.isForkedProcInWhiteList
AuthorFif_
Version1
Updated (UTC)2019-03-19 15:40:15
Created (UTC)2019-03-19 15:40:15
Downloads333
Class namecom.android.server.am.OnePlusHighPowerDetector
Method nameisForkedProcInWhiteList
Parameter typescom.android.server.am.OnePlusHighPowerDetector$AppForkedProc
Return typeboolean
Min SDK0
Max SDK999
Min APK0
Max APK2147483647
Excluded packages^(?!android$).*
EnabledYes
OptionalNo
UsageYes
NotifyNo
Settings-
-- Fif.OnePlusHighPowerDetector is a Lua hook definition 
-- designed to work with XPrivacyLua.

-- Fif.OnePlusHighPowerDetector is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.

-- Fif.OnePlusHighPowerDetector is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU General Public License for more details.

-- You should have received a copy of the GNU General Public License
-- along with XPrivacyLua.  If not, see <http://www.gnu.org/licenses/>.

-- Copyright (C) 2019 Philippe Troin (Fif_ on XDA)

function after(hook, param)
  local arg = param:getArgument(0)
  local result = param:getResult()
  local hookName = hook:getName()
  local logPrefix

  if hookName == 'OnePlusHighPowerDetector.isProcInWhiteList' then
    logPrefix = tostring(arg.info.packageName) .. ': '
  else 
    if hookName == 'OnePlusHighPowerDetector.isForkedProcInWhiteList' then
      logPrefix = tostring(arg.pkgName) .. ': '
    else
      log('Unknown hook name: "' .. tostring(hookName) .. '"')
      param:die_by_calling_missing_method()
    end
  end

  -- log(logPrefix .. tostring(result))

  if result ~= true then
    param:setResult(true)
    return true, logPrefix .. tostring(result), logPrefix .. 'true'
  else
    return false
  end
end