ANDROID隠しタスクバーsysteemberフルスクリーン表示


自分の経歴を話しましょう。
(1)systeemiを隠すために、killcome.android.systeemiスレッドを利用して隠し始めましたが、いつもcomp.android.systemUICServiceが起動されます。
私は最初は比較的に悪いです。500ミリ秒ごとに検査を行いました。
コード:
[java]view play copy print?
@Override
  • publicvoid onCreate(Bundelesaved Instance State){
  • super.onCreate(savedInstance State);
  • set ContintView(R.layout.main);
  • ActivityManageram=(ActivityManager)get System Service(Conttext.ACTIVICE)//取得activity管理Listinfos=m.get RunningApProcess();
  • for(RunningApProcess InforunningApProcessiInfo:infos){

  • System.out.println(「process Name================================""+runningApProcess Info.process Name)、
  • if(runningApProcessInfo.processName.equals){
  • System.out.println(「processpid:」+runningApProcess Info.pid);
  • Stringstr="/system/bin/kill"+runningApProcess Info.pid;
  • System.out.printel(「str:」+str);
  • Process process;
  • ルンティメロンタイム
  • try{
  • }
    runtime=Runtime.getRuntime();
  • process=runtime.exec(ス);
  • System.out.println(01010101010110);
  • process=runtime.exec;
  • intexitVal=process.waitFor();
  • System.out.println(「6666666666666666666666666666666666 66 66 66 66 66 66 66 66 66」)、
  • break;
  • }catch(IOExceptione){
  • System.out.println(e);
  • }catch(InterruptedExceptione){
  • //TODOAuto-generatocatch block
  • e.print StockTrace();
  • }
    @Override
    	public void onCreate(Bundle savedInstanceState) {
    		super.onCreate(savedInstanceState);
    		setContentView(R.layout.main);
    		 ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);//   activity  
    
    		List<RunningAppProcessInfo> infos = am.getRunningAppProcesses();
    		for (RunningAppProcessInfo runningAppProcessInfo : infos) {
    			System.out.println("processName:====================:"+runningAppProcessInfo.processName);
    			if(runningAppProcessInfo.processName.equals("com.android.systemui")){
    				System.out.println("processpid: "+runningAppProcessInfo.pid);
    					String str = "/system/bin/kill "+runningAppProcessInfo.pid;
    					System.out.println("str:  "+str);
    					Process process;
    					Runtime runtime;
    					try {
    						runtime = Runtime.getRuntime();
    						process = runtime.exec("su");
    						System.out.println("01010101010");
    						process = runtime.exec(str);
    						 int exitVal = process.waitFor();
    						System.out.println("66666666666666666666666");
    						break;
    					} catch (IOException e) {
    						System.out.println(e);
    					} catch (InterruptedException e) {
    						// TODO Auto-generated catch block
    						e.printStackTrace();
    					}
    (2)長期的な研究でSystemUID.appkを研究しました。これを操作したいと思いました。最初は削除した後、systemUIはまだ実行しています。Kill命令でこのスレッドを直接殺して、エラーを報告しました。SystemUIなどが見つからないと言っていました。迷惑ですが、再起動すればいいです。その間違いはありません。
    苍天は本当に心を负わない人です。もっといい方法を探しています。大体このようにしています。命令によってSystemUID.appkを削除して一つのフォルダに置いて、再びcome.systemUICServiceをスタートさせます。
    回復したいなら、SystemUID.appを/system/ap/に移して、またcomp.system.SystemUICServiceというサービスを再起動します。
    コード参照:
    [java]view play copy print?
    Filesystem_UIFFAKFile=newFile("/system/app/SystemUID.app");@Override
  • publicvoid onCreate(Bundelesaved Instance State){
  • super.onCreate(savedInstance State);
  • set ContintView(R.layout.main);
  • final TogleButotonsysteem BargleButton=(TogleButton)findView ById(R.id.system Bar ToggaleButton);
  • system Bar ToggaleButton.set Checked(system Uniapple.exists();
  • system Bar ToggaleButton.set OnChecked Change Listener
    @Override
  • publicvoid on Checked Checked(CompundButonbuttonView、book anis Checked){
  • }
    system BarTogleButton.set Checked(isChecked);
  • switch System UI();
  • if(isChecked){}
  • Intentintent=newIntent();
  • intent.set Component(newComponentName)
  • 「comp.android.systemui」
  • 「comp.android.system.SystemUICService」);
  • startService;
  • }
  • );
  • prvatevoid witch System UI(){
  • }
    try{}
  • Processp;
  • p=Runtime.getRuntime().exec(ス);//Attempttowritea filetoaroot-only
  • DataOutputStreams=newData Output Stream(p.get Output Stream);
  • os.writeBytes(「mount-ormount,rw/dev/block/stl 6/system」)、
  • if(system Uniapple.exists){
  • os.writeBytes(「mv/system/app/SystemUID.app/system/SystemUID.app」)、
  • }else{
  • }
    OS.writeBytes(「mv/system/SystemUID.app/system/app/SystemUID.app」)、
  • os.writeBytes(「mount-ormount,ro/dev/block/stl 6/system」)、//Close heterminal
  • os.writeBytes(「exit」)、
  • ロス・フュース();
  • p.waitFor();
  • }catch(Exceptione){
  • ShowError Global(e);
  • }
  • protectedvoid Show Errror Global(Exceptione){
  • ByteArayOutputStreambaos=newByteArayOutputStream();
  • PrintStream stream=newPrintStream(baos);
  • e.print StockTrace(stream)
  • stream.flash();
  • newAlertDialog.Buider
  • set IconAttribute(android.R.atr.alertDialogIcon)
  • .setTitle(Epicfail)
  • .set Message(「Error:」+newString(baos.toBytearray().show();
  •  File systemUIapkFile = new File("/system/app/SystemUI.apk");
        
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
            
            final ToggleButton systemBarToggleButton = (ToggleButton) findViewById(R.id.systemBarToggleButton);
            systemBarToggleButton.setChecked(systemUIapkFile.exists());
            systemBarToggleButton.setOnCheckedChangeListener(new OnCheckedChangeListener() {
                @Override
                public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
                    systemBarToggleButton.setChecked(isChecked);
                    switchSystemUI();
                    if (isChecked) {
                        Intent intent = new Intent();
                        intent.setComponent(new ComponentName(
                                "com.android.systemui",
                                "com.android.systemui.SystemUIService"));
                        startService(intent);
                    }
                }
            });
        }
        
        private void switchSystemUI() {
            try {
                Process p;
                p = Runtime.getRuntime().exec("su");
    
                // Attempt to write a file to a root-only
                DataOutputStream os = new DataOutputStream(p.getOutputStream());
                os.writeBytes("mount -o remount,rw /dev/block/stl6 /system
    "); if (systemUIapkFile.exists()) { os.writeBytes("mv /system/app/SystemUI.apk /system/SystemUI.apk
    "); }else { os.writeBytes("mv /system/SystemUI.apk /system/app/SystemUI.apk
    "); } os.writeBytes("mount -o remount,ro /dev/block/stl6 /system
    "); // Close the terminal os.writeBytes("exit
    "); os.flush(); p.waitFor(); } catch (Exception e) { ShowErrorGlobal(e); } } protected void ShowErrorGlobal(Exception e) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream stream = new PrintStream(baos); e.printStackTrace(stream); stream.flush(); new AlertDialog.Builder(this) .setIconAttribute(android.R.attr.alertDialogIcon) .setTitle("Epic fail") .setMessage("Error: " + new String(baos.toByteArray())).show(); }
    (3)
    このようなもっと強いのは、自分で命令操作してもいいです。全部方法です。googleが提供してくれたインタフェースがあれば、直接使えばいいです。
    直接コードを参照してください:
    [java]view play copy print?
    intflags=context.get Window().get Decorview()get SystemUiVisibility();
  • /intfullScreen=View.SYSTEM UUIUHUGUHUGUHUGUHUGUHUHUGREEN;
  • intfullScrreen=0 x 8;
  • if(visible){
  • }
    if((flags&fullScreen)!=0){
  • context.get Window().get Decorview()sets SystemUiVisibility(View.System)
  • }
  • }else{
  • }
    if((flags&fullScreen)==0){
  • context.getWindow().get Decorview()sets SystemUiVisibility(flagh fullScreen);
  • }